From: Chris Gianelloni Date: Mon, 28 Feb 2005 23:21:09 +0000 (+0000) Subject: Removed x-setup from local.start and added in symlinks for gconf, portage profiles... X-Git-Tag: CATALYST_2_0_6_916~827 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=24ba6860bdb24fa4b56f8a217dcf1729f6f50547;p=catalyst.git Removed x-setup from local.start and added in symlinks for gconf, portage profiles (for installer) and /var/db. Added a touch for root's .bashrc for baselayout and removed /etc/startx from the environmental type. Commented unmerge of sources in kmerge.sh, as they should be unmerged by the spec file. Changed livecdfs-update.sh to setup /etc/hosts properly, allow wheel users to use sudo with no password, mount /usr/lib/X11/xkb/compiled as tmpfs for X, use the latest pci.ids and usb.ids from portage, and create /lib/firmware if it doesn't exist. Commented unmerge of genkernel in post-kmerge.sh, as it should be unmerged by the spec file. Fixed typo in snapshot_target.py. Made gconfd check in livecd-stage1.sh work if more than one gconfd-2 is running. Added a gcc-config fix to stage1-chroot.sh. Changed gcc-config check in stage1-preclean2-chroot.sh to ensure gcc-config is an executable. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@546 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 9845d5c6..29a38a8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,27 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.172 2005/02/04 16:55:59 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.173 2005/02/28 23:21:09 wolf31o2 Exp $ + + 28 Feb 2005; Chris Gianelloni + livecd/files/livecd-local.start, livecd/runscript/default-runscript.sh, + livecd/runscript-support/kmerge.sh, + livecd/runscript-support/livecdfs-update.sh, + livecd/runscript-support/post-kmerge.sh, modules/snapshot_target.py, + targets/livecd-stage1/livecd-stage1.sh, targets/stage1/stage1-chroot.sh, + targets/stage1/stage1-preclean2-chroot.sh: + Removed x-setup from local.start and added in symlinks for gconf, portage + profiles (for installer) and /var/db. Added a touch for root's .bashrc for + baselayout and removed /etc/startx from the environmental type. Commented + unmerge of sources in kmerge.sh, as they should be unmerged by the spec + file. Changed livecdfs-update.sh to setup /etc/hosts properly, allow wheel + users to use sudo with no password, mount /usr/lib/X11/xkb/compiled as tmpfs + for X, use the latest pci.ids and usb.ids from portage, and create + /lib/firmware if it doesn't exist. Commented unmerge of genkernel in + post-kmerge.sh, as it should be unmerged by the spec file. Fixed typo in + snapshot_target.py. Made gconfd check in livecd-stage1.sh work if more than + one gconfd-2 is running. Added a gcc-config fix to stage1-chroot.sh. Changed + gcc-config check in stage1-preclean2-chroot.sh to ensure gcc-config is an + executable. 04 Feb 2005; Chris Gianelloni files/catalyst.conf: Removed ccache from default options as it breaks catalyst when merged with diff --git a/livecd/files/livecd-local.start b/livecd/files/livecd-local.start index 52dc4220..a70733d8 100644 --- a/livecd/files/livecd-local.start +++ b/livecd/files/livecd-local.start @@ -3,7 +3,18 @@ # This is a good place to load any misc. # programs on startup ( 1>&2 ) -if [ -e /etc/startx ] && [ -x /usr/sbin/x-setup ] +if [ -d /usr/livecd/profiles ] then - /usr/sbin/x-setup + mkdir -p /usr/portage/profiles + ln -sf /usr/livecd/profiles /usr/portage/profiles +fi + +if [ -d /usr/livecd/gconf ] +then + ln -sf /usr/livecd/gconf /etc/gconf +fi + +if [ -d /usr/livecd/db ] +then + ln -sf /usr/livecd/db /var/db fi diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index eaa69f2d..bafd42fa 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.22 2005/01/28 21:00:08 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.23 2005/02/28 23:21:09 wolf31o2 Exp $ die() { echo "$1" @@ -157,7 +157,7 @@ fi /sbin/modules-update --assume-kernel=${clst_fudgeuname} #now the unmerge... (wipe db entry) -emerge -C ${clst_ksource} +#emerge -C ${clst_ksource} unset USE echo diff --git a/livecd/runscript-support/livecdfs-update.sh b/livecd/runscript-support/livecdfs-update.sh index 75a7e8d8..973b9716 100755 --- a/livecd/runscript-support/livecdfs-update.sh +++ b/livecd/runscript-support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.30 2005/01/31 13:46:59 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.31 2005/02/28 23:21:09 wolf31o2 Exp $ /usr/sbin/env-update source /etc/profile @@ -34,9 +34,6 @@ rc-update add pwgen default [ -e /etc/init.d/alsasound ] && rc-update add alsasound default [ -e /etc/init.d/hdparm ] && rc-update add hdparm default -# This was mistakenly added, but only works on x86 currently -#[ -e /etc/startx ] && rc-update add mkxf86config default - # Comment out current getty settings sed -i -e '/^c[0-9]/ s/^/#/' /etc/inittab @@ -73,7 +70,11 @@ cp /usr/share/zoneinfo/GMT /etc/localtime # setup the hostname echo "livecd" > /etc/hostname echo "gentoo" > /etc/dnsdomainname -sed -i 's:localhost:livecd.gentoo localhost:' /etc/hosts +#sed -i 's:localhost:livecd.gentoo localhost:' /etc/hosts +echo "127.0.0.1 livecd.gentoo livecd localhost" > /etc/hosts + +# setup sudoers +sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers # setup dhcp on all detected ethernet devices echo "iface_eth0=\"dhcp\""> /etc/conf.d/net @@ -93,8 +94,15 @@ ln -sf net.eth0 net.eth4 mkdir -p /etc/sysconfig # fstab tweaks -echo "tmpfs / tmpfs defaults 0 0" > /etc/fstab -echo "tmpfs /lib/firmware tmpfs defaults 0 0" >> /etc/fstab +echo "tmpfs / tmpfs defaults 0 0" > /etc/fstab +echo "tmpfs /lib/firmware tmpfs defaults 0 0" >> /etc/fstab +# if /usr/lib/X11/xkb/compiled then make it tmpfs +if [ -d /usr/lib/X11/xkb/compiled ] +then + echo "tmpfs /usr/lib/X11/xkb/compiled tmpfs defaults 0 0" >> /etc/fstab +fi + +# devfs tweaks sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf # tweak the livecd fstab so that users know not to edit it @@ -117,10 +125,10 @@ echo "alias grep='grep --color=auto'" >> /etc/profile # make sure we have the latest pci and hotplug ids if [ -d /usr/share/hwdata ] then - [ -f /usr/share/misc/pci.ids ] && rm -f /usr/share/misc/pci.ids - [ -f /usr/share/misc/usb.ids ] && rm -f /usr/share/misc/usb.ids - ln -s /usr/share/hwdata/pci.ids /usr/share/misc/pci.ids - ln -s /usr/share/hwdata/usb.ids /usr/share/misc/usb.ids + [ -f /usr/share/hwdata/pci.ids ] && rm -f /usr/share/hwdata/pci.ids + [ -f /usr/share/hwdata/usb.ids ] && rm -f /usr/share/hwdata/usb.ids + ln -s /usr/share/misc/pci.ids /usr/share/hwdata/pci.ids + ln -s /usr/share/misc/usb.ids /usr/share/hwdata/usb.ids fi # setup opengl in /etc (if configured) @@ -184,6 +192,9 @@ then fi fi +# Create firmware directory if it does not exist +[ ! -d /lib/firmware ] && mkdir -p /lib/firmware + # tar up the firmware so that it does not get clobbered by the livecd mounts if [ -n "$(ls /lib/firmware)" ] then diff --git a/livecd/runscript-support/post-kmerge.sh b/livecd/runscript-support/post-kmerge.sh index ea3bd296..4cd6d99a 100755 --- a/livecd/runscript-support/post-kmerge.sh +++ b/livecd/runscript-support/post-kmerge.sh @@ -1,12 +1,12 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/post-kmerge.sh,v 1.3 2004/10/15 02:41:03 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/post-kmerge.sh,v 1.4 2005/02/28 23:21:09 wolf31o2 Exp $ /usr/sbin/env-update source /etc/profile -emerge -C genkernel +#emerge -C genkernel /sbin/depscan.sh find /lib/modules -name modules.dep -exec touch {} \; diff --git a/livecd/runscript/default-runscript.sh b/livecd/runscript/default-runscript.sh index c918371c..01515f64 100644 --- a/livecd/runscript/default-runscript.sh +++ b/livecd/runscript/default-runscript.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.20 2004/12/16 17:51:23 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.21 2005/02/28 23:21:09 wolf31o2 Exp $ #return codes to be used by archscript die() { @@ -143,12 +143,13 @@ case $1 in # move over the environment cp -a ${clst_sharedir}/livecd/files/livecd-bash_profile \ ${clst_chroot_path}/root/.bash_profile + touch ${clst_chroot_path}/root/.bashrc cp -a ${clst_sharedir}/livecd/files/livecd-local.start \ ${clst_chroot_path}/etc/conf.d/local.start # touch /etc/startx if our livecd/type requires it - if [ "${clst_livecd_type}" = "gentoo-release-environmental" ] \ - || [ "${clst_livecd_type}" = "gentoo-gamecd" ] + if [ "${clst_livecd_type}" = "gentoo-gamecd" ] #\ + #|| [ "${clst_livecd_type}" = "gentoo-release-environmental" ] then touch ${clst_chroot_path}/etc/startx fi diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py index 85cfa89f..3e926876 100644 --- a/modules/snapshot_target.py +++ b/modules/snapshot_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/snapshot_target.py,v 1.6 2005/02/04 16:46:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/snapshot_target.py,v 1.7 2005/02/28 23:21:09 wolf31o2 Exp $ """ Builder class for snapshots. @@ -37,7 +37,7 @@ class snapshot_target(generic_target): if not os.path.exists(mytmp): os.makedirs(mytmp) - cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ --exlude /local/ --exclude CVS/ "+\ + cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ "+\ self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure") if self.settings.has_key("portdir_overlay"): diff --git a/targets/livecd-stage1/livecd-stage1.sh b/targets/livecd-stage1/livecd-stage1.sh index d49b0637..01197f08 100755 --- a/targets/livecd-stage1/livecd-stage1.sh +++ b/targets/livecd-stage1/livecd-stage1.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.18 2005/01/30 00:48:03 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.19 2005/02/28 23:21:09 wolf31o2 Exp $ case $1 in enter) @@ -16,7 +16,8 @@ case $1 in ;; preclean) - if [ `pidof gconfd-2` ] + GCONFD_RUNNING="`pidof gconfd-2`" + if [ -z "${GCONFD_RUNNING}" ] then killall -9 gconfd-2 fi diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 744510ff..5dbe1460 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.28 2005/01/28 18:37:23 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.29 2005/02/28 23:21:09 wolf31o2 Exp $ portage_version=`/usr/lib/portage/bin/portageq best_version / sys-apps/portage \ | cut -d/ -f2 | cut -d- -f2,3` @@ -15,6 +15,13 @@ fi /usr/sbin/env-update source /etc/profile +if [ -x /usr/bin/gcc-config ] +then + gcc_current=`gcc-config -c` + gcc-config 3 && source /etc/profile + gcc-config ${gcc_current} && source /etc/profile +fi + [ -f /tmp/envscript ] && source /tmp/envscript if [ -n "${clst_CCACHE}" ] diff --git a/targets/stage1/stage1-preclean2-chroot.sh b/targets/stage1/stage1-preclean2-chroot.sh index fd6cad35..50243022 100755 --- a/targets/stage1/stage1-preclean2-chroot.sh +++ b/targets/stage1/stage1-preclean2-chroot.sh @@ -1,12 +1,12 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean2-chroot.sh,v 1.7 2005/01/26 15:34:28 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean2-chroot.sh,v 1.8 2005/02/28 23:21:09 wolf31o2 Exp $ # now, some finishing touches to initialize gcc-config.... unset ROOT -if [ -e /usr/bin/gcc-config ] +if [ -x /usr/bin/gcc-config ] then mythang=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 ) gcc-config ${mythang}; /usr/sbin/env-update; source /etc/profile