Added livecd/volid to set the volume ID when creating the ISO, patch by Gustavo Zacar...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 9 Mar 2005 00:22:05 +0000 (00:22 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 9 Mar 2005 00:22:05 +0000 (00:22 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@562 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
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 [deleted file]
livecd/runscript/x86-archscript.sh
modules/livecd_stage2_target.py

index e4283c0b46914a81df129e471a34ca522afca088..701619854186dda194d861be4cf566cbf1b3f1bc 100644 (file)
--- 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 <wolf31o2@gentoo.org>
+  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 <gustavoz@gentoo.org>. Also copied sparc64-archscript.sh to
+  sparc-archscript.sh and removing sparc64 one, as they are identical now.
 
   08 Mar 2005; Chris Gianelloni <wolf31o2@gentoo.org>
   +livecd/cdtar/isolinux-2.13-cdtar.tar.bz2,
index 728fc295e5386b1e0df79ba5a2d62793e700413b..400c63978de68056038e48393df34a9248408830 100755 (executable)
@@ -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"
index aa0aae7aace572744c5e2e607a75528f79054fc0..f6e3543333230294c18674e305baf9ce4eeb7133 100644 (file)
@@ -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 - ${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
index e01cd4cdc65ca68083df6058c3b1dc3dcbaeca47..6ea87a627a09b96e9e691b5769f8fc7d75bc6443 100644 (file)
@@ -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
index 4704ed3427ae9cd41aa542674310494d8777165e..0f5df870e6a4e3a7b7149577663e84cd6f781527 100644 (file)
@@ -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 (file)
index 15f1796..0000000
+++ /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
index 65fe8a7301c799a57b7eb04c7067222ef1c00273..8887ab8785c5af8d6c07bad7073c83add80749df 100644 (file)
@@ -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
                ;;
index 5c1ac3bc51618de737d2ce6333637684e15a1784..ec6da48c54a4dc433799a96b448a09dd00e23178 100644 (file)
@@ -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"]):