b4c1ef5c2b
Previously, if you were to boot this image you would be greeted with an error message telling you that the background could not be set. To fix this the package eterm was added to the fluxbox world file to be pulled in on build-time. However, this only solved the problem of being unable to set the background manually. To have fluxbox set it automatically the .xinit was altered to call "exec startfluxbox". When fluxbox is called by that command it searches for and executes the startup file located in ~/.fluxbox/. This commit also adds a custom startup file which sets the background to the default background: /usr/share/backgrounds/background.jpg. This commit also includes one unrelated alteration to fluxbox-run.sh which changes the fluxbox init file to look at the custom menu in /usr/share/fluxbox/usermenu instead of ~/.fluxbox/my-menu.
97 lines
3.6 KiB
Bash
Executable file
97 lines
3.6 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
ARCH=${ARCH:-"amd64"}
|
|
ROOTFS="th-${ARCH}-fluxbox"
|
|
|
|
PWD="$(pwd)"
|
|
STAGE3="/var/tmp/catalyst/builds/hardened/${ARCH}/stage3-${ARCH}-hardened-latest.tar.bz2"
|
|
LAYMAN="/var/lib/layman"
|
|
KERNEL_SOURCE="/usr/src/linux-tinhat"
|
|
|
|
MAKE_BASE="xfce4"
|
|
KEYWORDS_BASE="gnome"
|
|
USE_BASE="xfce4"
|
|
WORLD_BASE="fluxbox"
|
|
|
|
source run-base.sh
|
|
|
|
setup_usergroups() {
|
|
local DCONF_LOCAL="http://dev.gentoo.org/~blueness/lilblue/user"
|
|
|
|
cp -f passwd.sh "${ROOTFS}"/tmp/
|
|
chroot "${ROOTFS}"/ /tmp/passwd.sh
|
|
rm -f "${ROOTFS}"/tmp/passwd.sh
|
|
|
|
rm -rf "${ROOTFS}"/etc/skel
|
|
cp -a thuser "${ROOTFS}"/etc/skel
|
|
|
|
cp -f files/usermenu "${ROOTFS}"/usr/share/fluxbox/
|
|
cp -f files/fluxbox-startup "${ROOTFS}"/usr/share/fluxbox/startup
|
|
|
|
sed -i 's/^\/usr\/*.*/exec startfluxbox/' "${ROOTFS}"/etc/skel/.xinitrc
|
|
mkdir -p "${ROOTFS}"/etc/skel/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos,.ssh,.cache/dconf,.config/dconf,.fluxbox}
|
|
|
|
chmod 700 "${ROOTFS}"/etc/skel/.ssh
|
|
wget -O "${ROOTFS}"/etc/skel/.config/dconf/user "${DCONF_LOCAL}"
|
|
wget -O "${ROOTFS}"/etc/skel/.cache/dconf/user "${DCONF_LOCAL}"
|
|
|
|
rm -rf "${ROOTFS}"/home/thuser
|
|
cp -a thuser "${ROOTFS}"/home/thuser
|
|
sed -i -e 's/^\/usr\/*.*/exec startfluxbox/' "${ROOTFS}"/home/thuser/.xinitrc
|
|
cp -a files/{Encrypt,Save,Utilities} "${ROOTFS}"/home/thuser
|
|
rm -rf "${ROOTFS}"/home/thuser/Utilities/post_gnome3_install.sh
|
|
mkdir -p "${ROOTFS}"/home/thuser/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos,.ssh,.cache/dconf,.config/dconf,.fluxbox}
|
|
cp -f "${ROOTFS}"/usr/share/fluxbox/{apps,init,keys,menu,overlay,startup,usermenu,windowmenu} /home/thuser/.fluxbox/
|
|
chmod 700 "${ROOTFS}"/home/thuser/.ssh
|
|
wget -O "${ROOTFS}"/home/thuser/.config/dconf/user "${DCONF_LOCAL}"
|
|
wget -O "${ROOTFS}"/home/thuser/.cache/dconf/user "${DCONF_LOCAL}"
|
|
|
|
chroot "${ROOTFS}"/ chown -R thuser:thuser /home/thuser
|
|
sed -i 's/# \(%wheel.*NOPASSWD\)/\1/' "${ROOTFS}"/etc/sudoers
|
|
sed -i 's/^\/usr\/*.*/\/usr\/bin\/fluxbox/' "${ROOTFS}"/etc/skel/.xinitrc
|
|
}
|
|
|
|
setup_confs() {
|
|
local IMAGE="http://dev.gentoo.org/~blueness/lilblue/gentoo1600x1200.jpg"
|
|
|
|
sed -i 's/^\(DISPLAYMANAGER="\)xdm/\1slim/' "${ROOTFS}"/etc/conf.d/xdm
|
|
sed -i 's/^\(login.*\)/# \1/' "${ROOTFS}"/etc/slim.conf
|
|
sed -i '/# login_cmd.*Xsession/ a\login_cmd exec /bin/bash -login ~/.xinitrc' "${ROOTFS}"/etc/slim.conf
|
|
sed -i 's/^\(sessiondir.*\)/# \1/' "${ROOTFS}"/etc/slim.conf
|
|
sed -i '/# sessiondir.*/ a\sessiondir /etc/X11/Sessions' "${ROOTFS}"/etc/slim.conf
|
|
sed -i 's/^session\.menuFile.*./session\.menuFile: \/usr\/share\/fluxbox\/usermenu/' "${ROOTFS}"/usr/share/fluxbox/init
|
|
mkdir -p "${ROOTFS}"/usr/share/backgrounds/
|
|
wget -O "${ROOTFS}"/usr/share/backgrounds/background.jpg "${IMAGE}"
|
|
|
|
sed -i '/^SYNC/d' "${ROOTFS}"/etc/portage/make.conf
|
|
sed -i '/^GENTOO_MIRRORS/d' "${ROOTFS}"/etc/portage/make.conf
|
|
sed -i 's/^MAKEOPTS/#MAKEOPTS/' "${ROOTFS}"/etc/portage/make.conf
|
|
sed -i 's/^exec \/sbin\/*.*/exec \/sbin\/switch_root \/mnt\/tmpfs \/sbin\/init/' configs/init
|
|
sed -i 's/^clock=\"*.*\"$/clock=\"local\"/' "${ROOTFS}"/etc/conf.d/hwclock
|
|
|
|
cp -a files/locale/locale.gen "${ROOTFS}"/etc/
|
|
chroot "${ROOTFS}"/ locale-gen
|
|
chroot "${ROOTFS}"/ eselect locale set 3
|
|
cp -a files/locale/02locale "${ROOTFS}"/etc/conf.d/
|
|
# In kernels 3.9 and above, we must disallow-other-stacks because of SO_REUSEPORT
|
|
sed -i 's/^#\(disallow-other-stacks=\)no/\1yes/g' "${ROOTFS}"/etc/avahi/avahi-daemon.conf
|
|
}
|
|
|
|
main() {
|
|
unpack_stage3
|
|
mount_dirs
|
|
populate_etc
|
|
rebuild_toolchain
|
|
rebuild_world
|
|
update_world
|
|
build_kernel
|
|
setup_initrc
|
|
setup_usergroups
|
|
setup_confs
|
|
cleanup_dirs
|
|
unmount_dirs
|
|
make_iso
|
|
}
|
|
|
|
main > fluxbox-${ARCH}-build.log 2>&1 &
|