From: Chris Gianelloni Date: Wed, 9 Mar 2005 00:22:05 +0000 (+0000) Subject: Added livecd/volid to set the volume ID when creating the ISO, patch by Gustavo Zacar... X-Git-Tag: CATALYST_2_0_6_916~811 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70867320238e6951817b0573d04c09eaf81e9e96;p=catalyst.git Added livecd/volid to set the volume ID when creating the ISO, patch by Gustavo Zacarias . Also copied sparc64-archscript.sh to sparc-archscript.sh and removing sparc64 one, as they are identical now. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@562 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index e4283c0b..70161985 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.187 2005/03/08 18:41:41 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.188 2005/03/09 00:22:05 wolf31o2 Exp $ + + 08 Mar 2005; Chris Gianelloni + livecd/runscript/alpha-archscript.sh, livecd/runscript/hppa-archscript.sh, + livecd/runscript/ppc-archscript.sh, livecd/runscript/sparc-archscript.sh, + -livecd/runscript/sparc64-archscript.sh, + livecd/runscript/x86-archscript.sh, modules/livecd_stage2_target.py: + Added livecd/volid to set the volume ID when creating the ISO, patch by + Gustavo Zacarias . Also copied sparc64-archscript.sh to + sparc-archscript.sh and removing sparc64 one, as they are identical now. 08 Mar 2005; Chris Gianelloni +livecd/cdtar/isolinux-2.13-cdtar.tar.bz2, diff --git a/livecd/runscript/alpha-archscript.sh b/livecd/runscript/alpha-archscript.sh index 728fc295..400c6397 100755 --- a/livecd/runscript/alpha-archscript.sh +++ b/livecd/runscript/alpha-archscript.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/alpha-archscript.sh,v 1.9 2005/03/03 22:36:08 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/alpha-archscript.sh,v 1.10 2005/03/09 00:22:05 wolf31o2 Exp $ case $1 in kernel) @@ -71,7 +71,7 @@ case $1 in # command to build the iso file case ${clst_livecd_cdfstype} in zisofs) - mkisofs -J -R -l -z -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image" + mkisofs -J -R -l -z -V "${iso_volume_id}" -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image" ;; *) mkisofs -J -R -l -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image" diff --git a/livecd/runscript/hppa-archscript.sh b/livecd/runscript/hppa-archscript.sh index aa0aae7a..f6e35433 100644 --- a/livecd/runscript/hppa-archscript.sh +++ b/livecd/runscript/hppa-archscript.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/hppa-archscript.sh,v 1.8 2005/03/03 22:36:08 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/hppa-archscript.sh,v 1.9 2005/03/09 00:22:05 wolf31o2 Exp $ case $1 in kernel) @@ -83,7 +83,7 @@ case $1 in iso) #this is for the livecd-stage2 target, and calls the proper command to build the iso file - mkisofs -J -R -l -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image" + mkisofs -J -R -l -V "${iso_volume_id} -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image" palo -f boot/palo.conf -C ${2} ;; esac diff --git a/livecd/runscript/ppc-archscript.sh b/livecd/runscript/ppc-archscript.sh index e01cd4cd..6ea87a62 100644 --- a/livecd/runscript/ppc-archscript.sh +++ b/livecd/runscript/ppc-archscript.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/ppc-archscript.sh,v 1.6 2005/03/03 22:36:08 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/ppc-archscript.sh,v 1.7 2005/03/09 00:22:05 wolf31o2 Exp $ case $1 in kernel) @@ -58,6 +58,6 @@ case $1 in iso) # The name of the iso should be retrieved from the specs. For now, asssume GentooPPC_2004.0 - mkisofs -J -r -netatalk -hfs -probe -map boot/map.hfs -part -no-desktop -hfs-volid GentooPPC_2004.0 -hfs-bless ./boot -o ${2} ${clst_cdroot_path} + mkisofs -J -r -netatalk -hfs -probe -map boot/map.hfs -part -no-desktop -hfs-volid GentooPPC_2004.0 -hfs-bless ./boot -V "${iso_volume_id}" -o ${2} ${clst_cdroot_path} ;; esac diff --git a/livecd/runscript/sparc-archscript.sh b/livecd/runscript/sparc-archscript.sh index 4704ed34..0f5df870 100644 --- a/livecd/runscript/sparc-archscript.sh +++ b/livecd/runscript/sparc-archscript.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/sparc-archscript.sh,v 1.10 2005/03/07 00:20:37 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/sparc-archscript.sh,v 1.11 2005/03/09 00:22:05 wolf31o2 Exp $ case $1 in kernel) @@ -85,7 +85,7 @@ case $1 in # Seems silo 1.3.x+ breaks on newer machines # when booting from CD (current as of silo 1.4.8) mv ${clst_cdroot_path}/boot/mkisofs.sparc.fu /tmp - /tmp/mkisofs.sparc.fu -o ${2} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -abstract 'Gentoo Linux Sparc' -copyright 'Gentoo Foundation' -P 'Gentoo Linux Sparc' -p 'Gentoo Linux Sparc' -V 'Gentoo Linux Sparc 2005.0' -A 'Gentoo Linux Sparc' ${clst_cdroot_path} || die "Cannot make ISO image" + /tmp/mkisofs.sparc.fu -o ${2} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V "${iso_volume_id}" ${clst_cdroot_path} || die "Cannot make ISO image" rm /tmp/mkisofs.sparc.fu ;; esac diff --git a/livecd/runscript/sparc64-archscript.sh b/livecd/runscript/sparc64-archscript.sh deleted file mode 100644 index 15f17963..00000000 --- a/livecd/runscript/sparc64-archscript.sh +++ /dev/null @@ -1,91 +0,0 @@ -# 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/sparc64-archscript.sh,v 1.11 2005/03/03 22:36:08 wolf31o2 Exp $ - -case $1 in - kernel) - ;; - - preclean) - ;; - - clean) - ;; - - bootloader) - # Create a filesystem tree for the ISO at - # $clst_cdroot_path. We extract the "cdtar" to this directory, - # which will normally contains a pre-built binary - # boot-loader/filesystem skeleton for the ISO. - - cdtar=${clst_livecd_cdtar} - [ -z "$cdtar" ] && die "Required key livecd/cdtar not defined, exiting" - tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}" - # Here is where we poke in our identifier - touch ${clst_cdroot_path}/livecd - [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not defined, exiting" - - # install the kernels built in kmerge.sh - first="" - for x in ${clst_boot_kernel} - do - kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2" - - if [ -z "${first}" ] - then - # grab name of first kernel - first="${x}" - fi - - [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}" - tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot - - # change kernel name from "kernel" to "gentoo", for example - mv ${clst_cdroot_path}/boot/kernel-* ${clst_cdroot_path}/boot/${x} - - # change initrd name from "initrd" to "gentoo.igz", for example - mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz - done - - # figure out what device manager we are using and handle it accordingly - if [ "${clst_livecd_devmanager}" == "udev" ] - then - cmdline_opts="${cmdline_opts} udev nodevfs" - else - cmdline_opts="${cmdline_opts} noudev devfs" - fi - - scfg=${clst_cdroot_path}/boot/silo.conf - echo "default=\"help\"" > ${scfg} - echo "message=\"/boot/boot.msg\"" >> ${scfg} - - for x in ${clst_boot_kernel} - do - echo >> ${icfg} - echo "image=\"/boot/${x}\"" >> ${scfg} - echo -e "\tlabel=\"${x}\"" >> ${scfg} - echo -e "\tappend=\"initrd=/boot/${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> ${scfg} - - done - - echo "image=\"cat /boot/silo.conf\"" >> ${scfg} - echo -e "label=\"config\"" >> ${scfg} - echo "image=\"cat /boot/video.msg\"" >> ${scfg} - echo -e "label=\"video\"" >> ${scfg} - echo "image=\"cat /boot/help.msg\"" >> ${scfg} - echo -e "label=\"help\"" >> ${scfg} - ;; - - cdfs) - ;; - - iso) - # Old silo + patched mkisofs fubar magic - # Only silo 1.2.x seems to work for most hardware - # Seems silo 1.3.x+ breaks on newer machines - # when booting from CD (current as of silo 1.4.8) - mv ${clst_cdroot_path}/boot/mkisofs.sparc.fu /tmp - /tmp/mkisofs.sparc.fu -o ${2} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -abstract 'Gentoo Linux Sparc' -copyright 'Gentoo Foundation' -P 'Gentoo Linux Sparc' -p 'Gentoo Linux Sparc' -V 'Gentoo Linux Sparc 2004.3' -A 'Gentoo Linux Sparc' ${clst_cdroot_path} || die "Cannot make ISO image" - rm /tmp/mkisofs.sparc.fu - ;; -esac diff --git a/livecd/runscript/x86-archscript.sh b/livecd/runscript/x86-archscript.sh index 65fe8a73..8887ab87 100644 --- a/livecd/runscript/x86-archscript.sh +++ b/livecd/runscript/x86-archscript.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/x86-archscript.sh,v 1.23 2005/03/03 22:36:08 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.24 2005/03/09 00:22:05 wolf31o2 Exp $ case $1 in kernel) @@ -113,10 +113,10 @@ case $1 in # to build the iso file case ${clst_livecd_cdfstype} in zisofs) - 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} || die "Cannot make ISO image" + mkisofs -J -R -l -V "${iso_volume_id}" -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -z ${clst_cdroot_path} || die "Cannot make ISO image" ;; *) - mkisofs -J -R -l -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_cdroot_path} || die "Cannot make ISO image" + mkisofs -J -R -l -V "${iso_volume_id}" -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_cdroot_path} || die "Cannot make ISO image" ;; esac ;; diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 5c1ac3bc..ec6da48c 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_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/livecd_stage2_target.py,v 1.29 2005/01/10 01:05:59 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.30 2005/03/09 00:22:05 wolf31o2 Exp $ """ Builder class for a LiveCD stage2 build. @@ -47,6 +47,12 @@ class livecd_stage2_target(generic_stage_target): file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"]) if self.settings.has_key("portage_confdir"): file_locate(self.settings,["portage_confdir"],expand=0) + + if self.settings.has_key("livecd/volid"): + self.volumeid = string.join(self.settings["livecd/volid"]) + if len(self.volumeid)>32: + raise CatalystError,"ISO volume id must not exceed 32 characters." + os.putenv("iso_volume_id",self.volumeid); def unpack_and_bind(self): if not os.path.exists(self.settings["chroot_path"]):