# 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 <zhen@gentoo.org>
+ 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 <zhen@gentoo.org>
livecd/runscript-support/kmerge.sh, modules/livecd_stage2_target.py:
#!/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"
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.
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 ]
#now the unmerge... (wipe db entry)
emerge -C ${clst_ksource}
unset USE
-
#!/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
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
# 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() {
# 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
clean)
find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
- ;;
+ ;;
bootloader)
- ;;
+ ;;
cdfs)
loopret=1
;;
iso)
+ mkdir ${clst_cdroot_path}/docs
;;
esac
exit 0
# 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
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
# 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.
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"])
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:
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()