From 62437e483786a4af7566abc8519869c0b3ff7a82 Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Tue, 18 May 2004 02:09:57 +0000 Subject: [PATCH] check changelog git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@375 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 10 +++++- livecd/runscript-support/kmerge.sh | 10 ++++-- livecd/runscript-support/livecdfs-update.sh | 13 +++++++- livecd/runscript/default-runscript.sh | 18 ++++++++--- livecd/runscript/x86-archscript.sh | 14 ++++----- modules/livecd_stage2_target.py | 35 ++++++++++++--------- 6 files changed, 69 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9c2ee3d..b35008c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.49 2004/05/17 01:41:53 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.50 2004/05/18 02:09:57 zhen Exp $ + + 17 May 2004; John Davis + livecd/runscript/default-runscript.sh, livecd/runscript/x86-archscript.sh, + livecd/runscript-support/kmerge.sh, + livecd/runscript-support/livecdfs-update.sh, + modules/livecd_stage2_target.py: + fixes for the genkernel arg handling - we can now do it on a per-kernel basis. + we also now have basic motd copying support for more branded livecds 16 May 2004; John Davis livecd/runscript-support/kmerge.sh, modules/livecd_stage2_target.py: diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index af4b42b0..63b0f133 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # 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.2 2004/05/17 01:41:53 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.3 2004/05/18 02:09:57 zhen Exp $ die() { echo "$1" @@ -21,6 +21,7 @@ rm /etc/localtime ln -s /usr/share/zoneinfo/UTC /etc/localtime [ -e /var/tmp/${clst_kname}.use ] && export USE="$( cat /var/tmp/${clst_kname}.use )" || unset USE +[ -e /var/tmp/${clst_kname}.gk_kernargs ] && source /var/tmp/${clst_kname}.gk_kernargs # Don't use pkgcache here, as the kernel source may get emerge with different USE variables # (and thus different patches enabled/disabled.) Also, there's no real benefit in using the # pkgcache for kernel source ebuilds. @@ -47,7 +48,11 @@ SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'` EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"` clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV} -genkernel ${clst_livecd_genkernel_args} --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 +echo "GENKERNEL ARGS" +echo "MAINARGS: ${clst_livecd_gk_mainargs}" +echo "KERNARGS: ${clst_livecd_gk_kernargs}" + +genkernel ${clst_livecd_gk_mainargs} ${clst_livecd_gk_kernargs} --kerneldir=/usr/src/linux --kernel-config=/var/tmp/${clst_kname}.config --minkernpackage=/tmp/binaries/${clst_kname}.tar.bz2 all || exit 1 #now we merge any kernel-dependent packages if [ -e /var/tmp/${clst_kname}.packages ] @@ -66,4 +71,3 @@ fi #now the unmerge... (wipe db entry) emerge -C ${clst_ksource} unset USE - diff --git a/livecd/runscript-support/livecdfs-update.sh b/livecd/runscript-support/livecdfs-update.sh index 13b4b9b7..a05e89b4 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 Technologies, Inc. # 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.1 2004/05/12 21:18:50 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.2 2004/05/18 02:09:57 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -49,3 +49,14 @@ then 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 + +# tweak the motd for gentoo releases +if [ "${clst_livecd_type}" = "gentoo-release-universal" ] +then + sed -i -e 's/^##GREETING/Welcome to the Gentoo Linux Universal Installation LiveCD!/' /etc/motd +fi + +if [ "${clst_livecd_type}" = "gentoo-release-minimal" ] +then + sed -i -e 's/^##GREETING/Welcome to the Gentoo Linux Minimal Installation LiveCD!/' /etc/motd +fi diff --git a/livecd/runscript/default-runscript.sh b/livecd/runscript/default-runscript.sh index 875e7cd8..ab4907c1 100644 --- a/livecd/runscript/default-runscript.sh +++ b/livecd/runscript/default-runscript.sh @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # 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.9 2004/05/12 21:18:50 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.10 2004/05/18 02:09:57 zhen Exp $ #return codes to be used by archscript die() { @@ -124,8 +124,15 @@ case $1 in # overwrite /etc/init.d/local in the livecd root rm -f ${clst_chroot_path}/etc/init.d/local cp -a ${clst_sharedir}/livecd/files/livecd-rclocal ${clst_chroot_path}/etc/init.d/local - - # now, finalize and tweak the livecd fs + + # move over the motd (if applicable) + if [ -n ${clst_livecd_motd} ] + then + rm -r ${clst_chroot_path}/etc/motd + cp -a ${clst_livecd_motd} ${clst_chroot_path}/etc/motd + fi + + # now, finalize and tweak the livecd fs (inside of the chroot) cp ${clst_sharedir}/livecd/runscript-support/livecdfs-update.sh ${clst_chroot_path}/tmp ${clst_CHROOT} ${clst_chroot_path} /tmp/livecdfs-update.sh || exit 1 rm -f ${clst_chroot_path}/tmp/livecdfs-update.sh @@ -133,10 +140,10 @@ case $1 in clean) find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \; - ;; + ;; bootloader) - ;; + ;; cdfs) loopret=1 @@ -165,6 +172,7 @@ case $1 in ;; iso) + mkdir ${clst_cdroot_path}/docs ;; esac exit 0 diff --git a/livecd/runscript/x86-archscript.sh b/livecd/runscript/x86-archscript.sh index cc33e21c..7c28432d 100644 --- a/livecd/runscript/x86-archscript.sh +++ b/livecd/runscript/x86-archscript.sh @@ -1,16 +1,16 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.5 2004/05/17 01:44:37 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.6 2004/05/18 02:09:57 zhen Exp $ case $1 in kernel) - ;; + ;; preclean) - ;; + ;; clean) - ;; + ;; bootloader) # CDFSTYPE and loop_opts are exported from the default @@ -77,13 +77,13 @@ case $1 in echo "label memtest86" >> $icfg echo " kernel memtest86" >> $icfg fi - ;; + ;; cdfs) - ;; + ;; iso) #this is for the livecd-final target, and calls the proper command to build the iso file mkisofs -J -R -l -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -z ${clst_cdroot_path} - ;; + ;; esac diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 8f89a3fd..9d70291d 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,6 +1,6 @@ # Distributed under the GNU General Public License version 2 # Copyright 2003-2004 Gentoo Technologies, Inc. -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.2 2004/05/17 01:41:53 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.3 2004/05/18 02:09:57 zhen Exp $ """ Builder class for a LiveCD stage2 build. @@ -27,8 +27,10 @@ class livecd_stage2_target(generic_stage_target): self.valid_values.append("boot/kernel/"+x+"/extraversion") self.valid_values.append("boot/kernel/"+x+"/packages") self.valid_values.append("boot/kernel/"+x+"/use") + self.valid_values.append("boot/kernel/"+x+"/gk_kernargs") self.valid_values.extend(self.required_values) - self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm","livecd/unmerge","livecd/iso","livecd/genkernel_args"]) + self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm","livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type","livecd/motd","livecd/readme"]) + generic_stage_target.__init__(self,spec,addlargs) file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"]) @@ -110,22 +112,25 @@ class livecd_stage2_target(generic_stage_target): self.unbind() raise CatalystError, "Can't find kernel config: "+self.settings["boot/kernel/"+kname+"/config"] - # We must support multiple configs for the same kernel, so we must manually edit the - # EXTRAVERSION on the kernel to allow them to coexist. The extraversion field gets appended - # to the current EXTRAVERSION in the kernel Makefile. Examples of this usage are UP vs SMP kernels, - # and on PPC64 we need a seperate pSeries, iSeries, and PPC970 (G5) kernels, all compiled off the - # same source, without having to release a seperate livecd for each (since other than the kernel, - # they are all binary compatible) + # We must support multiple configs for the same kernel, + # so we must manually edit the EXTRAVERSION on the kernel to allow them to coexist. + # The extraversion field gets appended to the current EXTRAVERSION + # in the kernel Makefile. Examples of this usage are UP vs SMP kernels, + # and on PPC64 we need a seperate pSeries, iSeries, and PPC970 (G5) kernels, + # all compiled off the same source, without having to release a seperate + # livecd for each (since other than the kernel, they are all binary compatible) if self.settings.has_key("boot/kernel/"+kname+"/extraversion"): - #extraversion is now an optional parameter, so that don't need to worry about it unless - #they have to + # extraversion is now an optional parameter, so that don't need to + # worry about it unless they have to args.append(self.settings["boot/kernel/"+kname+"/extraversion"]) else: - #this value will be detected on the bash side and indicate that EXTRAVERSION processing - #should be skipped + # this value will be detected on the bash side and indicate + # that EXTRAVERSION processing + # should be skipped args.append("NULL_VALUE") - #write out /var/tmp/kname.(use|packages) files, used for kernel USE and extra packages settings - for extra in ["use","packages"]: + # write out /var/tmp/kname.(use|packages) files, used for kernel USE + # and extra packages settings + for extra in ["use","packages","gk_kernargs"]: if self.settings.has_key("boot/kernel/"+kname+"/"+extra): myex=self.settings["boot/kernel/"+kname+"/"+extra] if type(myex)==types.ListType: @@ -137,6 +142,8 @@ class livecd_stage2_target(generic_stage_target): raise CatalystError,"Couldn't create file /var/tmp/"+kname+"."+extra+" in chroot." if extra=="use": myf.write("export USE=\""+myex+"\"\n") + if extra=="gk_kernargs": + myf.write("export clst_livecd_gk_kernargs=\""+myex+"\"\n") else: myf.write(myex+"\n") myf.close() -- 2.26.2