From: Chris Gianelloni Date: Mon, 12 Sep 2005 18:49:44 +0000 (+0000) Subject: Added livecd/xdm and livecd/xsession options. These are used to setup the default... X-Git-Tag: CATALYST_2_0_6_916~656 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3fe91b4c4a02af0c3a1468c78bdd023509ec68de;p=catalyst.git Added livecd/xdm and livecd/xsession options. These are used to setup the default display manager and X session, respectively. Added supporting documentation to example spec files. Imported more work from my fsscript for the official LiveCD. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@838 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index a01fe51a..5ebf9a69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.330 2005/09/12 17:17:21 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.331 2005/09/12 18:49:44 wolf31o2 Exp $ + + 12 Sep 2005; Chris Gianelloni + examples/livecd-stage2_template.spec, modules/livecd_stage2_target.py, + targets/support/livecdfs-update.sh: + Added livecd/xdm and livecd/xsession options. These are used to setup the + default display manager and X session, respectively. Added supporting + documentation to example spec files. Imported more work from my fsscript for + the official LiveCD. 12 Sep 2005; Chris Gianelloni arch/x86.py: Changing default CHOST for x86 from i386-pc-linux to i686-pc-linux. For diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec index 66462404..4733e216 100644 --- a/examples/livecd-stage2_template.spec +++ b/examples/livecd-stage2_template.spec @@ -235,6 +235,20 @@ livecd/devmanager: # livecd/xinitrc: livecd/xinitrc: +# This is used by catalyst to determine which display manager you wish to +# become the default. This is used on the official Gentoo LiveCD and is valid +# for any livecd/type. +# example: +# livecd/xdm: gdm +livecd/xdm: + +# This is used by catalyst to determine which X session should be started by +# default by the display manager. This is used on the official Gentoo LiveCD +# and is valid for any livecd/type. +# example: +# livecd/xsession: gnome +livecd/xsession: + # This option is used to create non-root users on your CD. It takes a space # separated list of user names. These users will be added to the following # groups: users,wheel,audio,games,cdrom,usb diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 3304e332..57085b09 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.47 2005/08/09 19:02:31 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.48 2005/09/12 18:49:44 wolf31o2 Exp $ """ Builder class for a LiveCD stage2 build. @@ -24,7 +24,8 @@ class livecd_stage2_target(generic_stage_target): "livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc",\ "livecd/root_overlay","livecd/devmanager","livecd/users",\ "gamecd/conf","livecd/users","portage_overlay","livecd/cdfstype",\ - "livecd/linuxrc","livecd/bootargs","gamecd/conf"]) + "livecd/linuxrc","livecd/bootargs","gamecd/conf","livecd/xdm",\ + "livecd/xsession"]) generic_stage_target.__init__(self,spec,addlargs) if not self.settings.has_key("livecd/type"): diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh index 10e6ff6f..34f0c6ea 100755 --- a/targets/support/livecdfs-update.sh +++ b/targets/support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.21 2005/09/08 20:59:07 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.22 2005/09/12 18:49:44 wolf31o2 Exp $ . /tmp/chroot-functions.sh update_env_settings @@ -45,6 +45,12 @@ then for x in ${clst_livecd_users} do useradd -G users,wheel,audio,games,cdrom,usb -c "Default LiveCD User" -m $x + if [ -n "${clst_livecd_xdm}" -a -n "${clst_livecd_xsession}" ] + then + echo "[Desktop]" > /home/$x/.dmrc + echo "Session=${clst_livecd_xsession}" >> /home/$x/.dmrc + chown -R $x:users /home/$x + fi done fi @@ -120,6 +126,21 @@ fi # setup opengl in /etc (if configured) [ -x /usr/sbin/openglify ] && /usr/sbin/openglify +# Setup configured display manager +if [ -n "${clst_livecd_xdm}" ] +then + sed -i "s:#DISPLAYMANAGER=\"xdm\":DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \ + /etc/rc.conf + rc-update add xdm default +fi + +# Setup configured default X Session +if [ -n "${clst_livecd_xsession}" ] +then + sed -i "s:#XSESSION=\"Gnome\":XSESSION=\"${clst_livecd_xsession}\":" \ + /etc/rc.conf +fi + # touch /etc/asound.state touch /etc/asound.state @@ -199,7 +220,6 @@ case ${clst_livecd_type} in ;; esac - # Post configuration case ${clst_livecd_type} in gentoo-gamecd ) @@ -229,7 +249,7 @@ case ${clst_livecd_type} in if [ -e /opt/installer/misc/mkvardb ] then chmod +x /opt/installer/misc/mkvardb - /opt/installer/misc/mkvardb -p livecd-kernel -c sys-kernel -v 2005.0 /boot/kernel* /boot/initrd* $(for i in $(find "/lib/modules/$(uname -r)" -type f); do grep --quiet "${i}" /var/db/pkg/*/*/CONTENTS || echo ${i}; done) + /opt/installer/misc/mkvardb -p livecd-kernel -c sys-kernel -v ${clst_version_stamp} --provide "virtual/alsa" /boot/kernel* /boot/initr* $(for i in $(find "/lib/modules/" -type f); do grep --quiet "${i}" /var/db/pkg/*/*/CONTENTS || echo ${i}; done) fi # This is my hack to reduce tmpfs usage @@ -238,6 +258,9 @@ case ${clst_livecd_type} in rm -rf /usr/livecd/profiles/{co*,default-{1*,a*,b*,d*,h*,i*,m*,p*,s*,x*},g*,hardened-*,n*,x*} mv -f /etc/gconf /usr/livecd mv -f /var/db /usr/livecd + + # This gives us our list of system packages for the installer + USE="-* $(cat /var/db/pkg/sys-libs/glibc*/USE)" emerge -ep system | grep -e '^\[ebuild' | sed -e 's:^\[ebuild .\+\] ::' > /usr/livecd/systempkgs.txt ;; generic-livecd ) # This is my hack to reduce tmpfs usage