From 6570a70ab34c34b8b3bc9f08d5ece17471a1c871 Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Sat, 10 Jan 2004 22:09:03 +0000 Subject: [PATCH] examples/ directory re-organization git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@125 d1e1f19c-881f-0410-ab34-b69fee027534 --- .../{ => amd64}/amd64-stage1-20031110.spec | 0 examples/amd64/amd64-stage1-20031204.spec | 7 + .../{ => amd64}/amd64-stage2-20031110.spec | 0 examples/amd64/amd64-stage2-20031204.spec | 7 + examples/amd64/amd64-stage2-20031228.spec | 7 + .../{ => amd64}/amd64-stage3-20031110.spec | 0 examples/amd64/amd64-stage3-20031204.spec | 7 + examples/amd64/amd64-stage3-20031228.spec | 7 + examples/{ => generic}/snapshot.spec | 0 examples/{ => hppa}/hppa-grp-20040110.spec | 0 .../amd64/amd64-livecd-stage1-20031222.spec | 12 ++ .../amd64}/amd64-livecd-stage2-20031222.spec | 0 .../amd64/amd64-livecd-stage3-20031222.spec | 50 ++++++++ .../cdtar}/isolinux-2.08-cdtar.tar.bz2 | Bin .../runscript/x86-isolinux-loop-example.sh | 120 ++++++++++++++++++ .../x86}/x86-livecd-stage1-20031215.spec | 0 .../x86}/x86-livecd-stage2-20031215.spec | 0 .../x86/x86-livecd-stage3-20031215.spec | 47 +++++++ examples/{ => ppc}/ppc-grp-20031215.spec | 0 examples/{ => ppc}/ppc-stage1-20031204.spec | 0 examples/ppc/ppc-stage1-20031228.spec | 7 + examples/{ => ppc}/ppc-stage2-20031204.spec | 0 examples/ppc/ppc-stage2-20031228.spec | 7 + examples/{ => ppc}/ppc-stage3-20031204.spec | 0 examples/ppc/ppc-stage3-20031208.spec | 7 + examples/ppc/ppc-stage3-20031228.spec | 7 + examples/x86-livecd-stage3-20031215.spec | 16 --- examples/x86-livecd-stage3-runscript.sh | 104 --------------- examples/{ => x86}/x86-grp-20031102.spec | 0 examples/{ => x86}/x86-stage1-20031102.spec | 0 examples/{ => x86}/x86-stage1-20031109.spec | 0 examples/x86/x86-stage1-20031228.spec | 7 + examples/{ => x86}/x86-stage2-20031102.spec | 0 examples/{ => x86}/x86-stage2-20031109.spec | 0 examples/x86/x86-stage2-20031228.spec | 7 + examples/{ => x86}/x86-stage3-20031102.spec | 0 examples/{ => x86}/x86-stage3-20031109.spec | 0 examples/x86/x86-stage3-20031228.spec | 7 + .../{ => x86}/x86-tinderbox-20031102.spec | 0 39 files changed, 313 insertions(+), 120 deletions(-) rename examples/{ => amd64}/amd64-stage1-20031110.spec (100%) create mode 100644 examples/amd64/amd64-stage1-20031204.spec rename examples/{ => amd64}/amd64-stage2-20031110.spec (100%) create mode 100644 examples/amd64/amd64-stage2-20031204.spec create mode 100644 examples/amd64/amd64-stage2-20031228.spec rename examples/{ => amd64}/amd64-stage3-20031110.spec (100%) create mode 100644 examples/amd64/amd64-stage3-20031204.spec create mode 100644 examples/amd64/amd64-stage3-20031228.spec rename examples/{ => generic}/snapshot.spec (100%) rename examples/{ => hppa}/hppa-grp-20040110.spec (100%) create mode 100644 examples/livecd/amd64/amd64-livecd-stage1-20031222.spec rename examples/{ => livecd/amd64}/amd64-livecd-stage2-20031222.spec (100%) create mode 100644 examples/livecd/amd64/amd64-livecd-stage3-20031222.spec rename examples/{ => livecd/cdtar}/isolinux-2.08-cdtar.tar.bz2 (100%) create mode 100644 examples/livecd/runscript/x86-isolinux-loop-example.sh rename examples/{ => livecd/x86}/x86-livecd-stage1-20031215.spec (100%) rename examples/{ => livecd/x86}/x86-livecd-stage2-20031215.spec (100%) create mode 100644 examples/livecd/x86/x86-livecd-stage3-20031215.spec rename examples/{ => ppc}/ppc-grp-20031215.spec (100%) rename examples/{ => ppc}/ppc-stage1-20031204.spec (100%) create mode 100644 examples/ppc/ppc-stage1-20031228.spec rename examples/{ => ppc}/ppc-stage2-20031204.spec (100%) create mode 100644 examples/ppc/ppc-stage2-20031228.spec rename examples/{ => ppc}/ppc-stage3-20031204.spec (100%) create mode 100644 examples/ppc/ppc-stage3-20031208.spec create mode 100644 examples/ppc/ppc-stage3-20031228.spec delete mode 100644 examples/x86-livecd-stage3-20031215.spec delete mode 100644 examples/x86-livecd-stage3-runscript.sh rename examples/{ => x86}/x86-grp-20031102.spec (100%) rename examples/{ => x86}/x86-stage1-20031102.spec (100%) rename examples/{ => x86}/x86-stage1-20031109.spec (100%) create mode 100644 examples/x86/x86-stage1-20031228.spec rename examples/{ => x86}/x86-stage2-20031102.spec (100%) rename examples/{ => x86}/x86-stage2-20031109.spec (100%) create mode 100644 examples/x86/x86-stage2-20031228.spec rename examples/{ => x86}/x86-stage3-20031102.spec (100%) rename examples/{ => x86}/x86-stage3-20031109.spec (100%) create mode 100644 examples/x86/x86-stage3-20031228.spec rename examples/{ => x86}/x86-tinderbox-20031102.spec (100%) diff --git a/examples/amd64-stage1-20031110.spec b/examples/amd64/amd64-stage1-20031110.spec similarity index 100% rename from examples/amd64-stage1-20031110.spec rename to examples/amd64/amd64-stage1-20031110.spec diff --git a/examples/amd64/amd64-stage1-20031204.spec b/examples/amd64/amd64-stage1-20031204.spec new file mode 100644 index 00000000..056bf956 --- /dev/null +++ b/examples/amd64/amd64-stage1-20031204.spec @@ -0,0 +1,7 @@ +subarch: amd64 +version_stamp: 20031204 +target: stage1 +rel_type: default +rel_version: 1.4 +snapshot: 20031204 +source_subpath: default-amd64-1.4/stage2-amd64-20031204 diff --git a/examples/amd64-stage2-20031110.spec b/examples/amd64/amd64-stage2-20031110.spec similarity index 100% rename from examples/amd64-stage2-20031110.spec rename to examples/amd64/amd64-stage2-20031110.spec diff --git a/examples/amd64/amd64-stage2-20031204.spec b/examples/amd64/amd64-stage2-20031204.spec new file mode 100644 index 00000000..9b6d8cff --- /dev/null +++ b/examples/amd64/amd64-stage2-20031204.spec @@ -0,0 +1,7 @@ +subarch: amd64 +version_stamp: 20031204 +target: stage2 +rel_type: default +rel_version: 1.4 +snapshot: 20031204 +source_subpath: default-amd64-1.4/stage1-amd64-20031204 diff --git a/examples/amd64/amd64-stage2-20031228.spec b/examples/amd64/amd64-stage2-20031228.spec new file mode 100644 index 00000000..63f55a17 --- /dev/null +++ b/examples/amd64/amd64-stage2-20031228.spec @@ -0,0 +1,7 @@ +subarch: amd64 +version_stamp: 20031228 +target: stage2 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-amd64-1.4/stage1-amd64-20031204 diff --git a/examples/amd64-stage3-20031110.spec b/examples/amd64/amd64-stage3-20031110.spec similarity index 100% rename from examples/amd64-stage3-20031110.spec rename to examples/amd64/amd64-stage3-20031110.spec diff --git a/examples/amd64/amd64-stage3-20031204.spec b/examples/amd64/amd64-stage3-20031204.spec new file mode 100644 index 00000000..fd4031e8 --- /dev/null +++ b/examples/amd64/amd64-stage3-20031204.spec @@ -0,0 +1,7 @@ +subarch: amd64 +version_stamp: 20031204 +target: stage3 +rel_type: default +rel_version: 1.4 +snapshot: 20031204 +source_subpath: default-amd64-1.4/stage2-amd64-20031204 diff --git a/examples/amd64/amd64-stage3-20031228.spec b/examples/amd64/amd64-stage3-20031228.spec new file mode 100644 index 00000000..e76c6cfb --- /dev/null +++ b/examples/amd64/amd64-stage3-20031228.spec @@ -0,0 +1,7 @@ +subarch: amd64 +version_stamp: 20031228 +target: stage3 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-amd64-1.4/stage2-amd64-20031228 diff --git a/examples/snapshot.spec b/examples/generic/snapshot.spec similarity index 100% rename from examples/snapshot.spec rename to examples/generic/snapshot.spec diff --git a/examples/hppa-grp-20040110.spec b/examples/hppa/hppa-grp-20040110.spec similarity index 100% rename from examples/hppa-grp-20040110.spec rename to examples/hppa/hppa-grp-20040110.spec diff --git a/examples/livecd/amd64/amd64-livecd-stage1-20031222.spec b/examples/livecd/amd64/amd64-livecd-stage1-20031222.spec new file mode 100644 index 00000000..f94f1788 --- /dev/null +++ b/examples/livecd/amd64/amd64-livecd-stage1-20031222.spec @@ -0,0 +1,12 @@ +subarch: amd64 +version_stamp: 20031222 +target: livecd-stage1 +rel_type: default +rel_version: 1.4 +snapshot: 20031222 +source_subpath: default-amd64-1.4/stage3-amd64-20031221 +livecd-stage1/packages: + irssi +livecd-stage1/use: + -X + -gtk diff --git a/examples/amd64-livecd-stage2-20031222.spec b/examples/livecd/amd64/amd64-livecd-stage2-20031222.spec similarity index 100% rename from examples/amd64-livecd-stage2-20031222.spec rename to examples/livecd/amd64/amd64-livecd-stage2-20031222.spec diff --git a/examples/livecd/amd64/amd64-livecd-stage3-20031222.spec b/examples/livecd/amd64/amd64-livecd-stage3-20031222.spec new file mode 100644 index 00000000..1ef5cc91 --- /dev/null +++ b/examples/livecd/amd64/amd64-livecd-stage3-20031222.spec @@ -0,0 +1,50 @@ +subarch: amd64 +version_stamp: 20031222 +target: livecd-stage3 +rel_type: default +rel_version: 1.4 +snapshot: 20031222 +source_subpath: default-amd64-1.4/livecd-stage2-amd64-20031222 +boot/kernel: gentoo +livecd-stage3/cdtar: /home/drobbins/cvs/gentoo/src/catalyst/examples/isolinux-2.08-cdtar.tar.bz2 +livecd-stage3/runscript: /home/drobbins/cvs/gentoo/src/catalyst/examples/x86-livecd-stage3-runscript.sh +livecd-stage3/unmerge: + autoconf automake bin86 binutils libtool m4 bison ld.so make perl patch linux-headers man-pages + sash bison flex gettext texinfo ccache addpatches man groff lib-compat gcc python miscfiles ucl +livecd-stage3/empty: + /var/tmp + /var/cache + /var/db + /var/empty + /var/cache + /var/lock + /tmp + /usr/portage + /usr/share/man + /usr/share/info + /usr/share/unimaps + /usr/include + /usr/share/zoneinfo + /usr/share/dict + /usr/share/doc + /usr/share/ss + /usr/share/state + /usr/share/texinfo + /usr/lib/python2.2 + /usr/lib/portage + /usr/share/gettext + /usr/share/i18n + /usr/share/rfc + /usr/X11R6/man + /usr/X11R6/include + /usr/X11R6/lib/X11/config + /usr/X11R6/lib/X11/etc + /usr/X11R6/lib/X11/doc + /usr/src + /usr/share/doc + /usr/share/man +livecd-stage3/rm: + /lib/*.a + /usr/lib/*.a + /usr/lib/gcc-lib/*/*/libgcj* + /usr/X11R6/lib/*.a diff --git a/examples/isolinux-2.08-cdtar.tar.bz2 b/examples/livecd/cdtar/isolinux-2.08-cdtar.tar.bz2 similarity index 100% rename from examples/isolinux-2.08-cdtar.tar.bz2 rename to examples/livecd/cdtar/isolinux-2.08-cdtar.tar.bz2 diff --git a/examples/livecd/runscript/x86-isolinux-loop-example.sh b/examples/livecd/runscript/x86-isolinux-loop-example.sh new file mode 100644 index 00000000..57042741 --- /dev/null +++ b/examples/livecd/runscript/x86-isolinux-loop-example.sh @@ -0,0 +1,120 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/examples/livecd/runscript/Attic/x86-isolinux-loop-example.sh,v 1.1 2004/01/10 22:09:03 drobbins Exp $ + +die() { + echo "$1" + exit 1 +} + +#The order that catalyst does things for livecd-stage3 is as follows: +# +# runscript: run +# runscript: preclean (bind mounts still mounted) +# catalyst: do livecd-stage3/unmerge (bind mounts still mounted) +# catalyst: bind mounts unmounted +# catalyst: do livecd-stage3/empty +# catalyst: do livecd-stage3/delete +# runscript: livecd-stage3/clean +# runscript: cdroot_setup + +case $1 in +run) + #For doing things inside the chroot before the "preclean". Normally, "preclean" + #should be used, or steps should be performed in the livecd-stage2 stage. + $clst_CHROOT $clst_chroot_path /bin/bash << EOF + echo "meep" +EOF + [ $? -ne 0 ] && exit 1 +;; +preclean) + #preclean runs with bind mounts active -- for running any commands inside chroot. + #The chroot environment has not been trimmed in any way, so you still have a full + #environment. + $clst_CHROOT $clst_chroot_path /bin/bash << EOF + echo "CDBOOT=1" >> /etc/rc.conf +EOF + [ $? -ne 0 ] && exit 1 +;; +clean) + #livecd-stage3/unmerge, bind-unmount, and livecd-stage3/{empty,delete,prune} + #have already executed at this point. You now have the opportunity to perform + #any additional cleaning steps that may be required. + find $clst_chroot_path/usr/lib -iname "*.pyc" -exec rm -f {} \; + ;; +cdroot_setup) + #Time to 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. Then we get genkernel-built + #kernels and initrds in place, create the loopback fs on $clst_cdroot_path, + #mount it, copy our bootable filesystem over, umount it, and we then have a + #ready-to-burn ISO tree at $clst_cdroot_path. + + cdtar=$clst_livecd_stage3_cdtar + [ "$cdtar" = "" ] && die "No livecd-stage3/cdtar specified (required)" + tar xjpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar" + if [ "$clst_boot_kernel" = "" ] + then + echo "No boot/kernel setting defined, exiting." + exit 1 + fi + first="" + for x in $clst_boot_kernel + do + if [ "$first" = "" ] + then + #grab name of first kernel + first="$x" + fi + if [ ! -e "$clst_binaries_source_path/$x.tar.bz2" ] + then + echo "Can't find kernel tarball at $clst_binaries_source_path/$x.tar.bz2" + exit 1 + fi + tar xjvf $clst_binaries_source_path/$x.tar.bz2 -C $clst_cdroot_path/isolinux + #change kernel name from "kernel" to "gentoo", for example + mv $clst_cdroot_path/isolinux/kernel $clst_cdroot_path/isolinux/$x + #change initrd name from "initrd" to "gentoo.igz", for example + mv $clst_cdroot_path/isolinux/initrd $clst_cdroot_path/isolinux/$x.igz + done + icfg=$clst_cdroot_path/isolinux/isolinux.cfg + echo "default $first" > $icfg + for x in $clst_boot_kernel + do + echo >> $icfg + echo "label $x" >> $icfg + echo " kernel $x" >> $icfg + echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc" >> $icfg + done + #OK, now we need to prepare the loopback filesystem that we'll be booting. This is + #tricky. + echo "Calculating size of loopback filesystem..." + loopsize=`du -ks $clst_chroot_path | cut -f1` + [ "$loopsize" = "0" ] && loopsize=1 + #increase the size by 1/3, then divide by 4 to get 4k blocks + loopsize=$(( ( $loopsize + ( $loopsize / 2 ) ) / 4 )) + echo "Creating loopback file..." + dd if=/dev/zero of=$clst_cdroot_path/livecd.loop bs=4k count=$loopsize || die "livecd.loop creation failure" + #echo "Calculating number of inodes required for ext2 filesystem..." + #numnodes=`find $clst_chroot_path | wc -l` + #numnodes=$(( $numnodes + 200 )) + mke2fs -m 0 -F -b 4096 -q $clst_cdroot_path/livecd.loop || die "Couldn't create ext2 filesystem" + install -d $clst_cdroot_path/loopmount + sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug + mount -t ext2 -o loop $clst_cdroot_path/livecd.loop $clst_cdroot_path/loopmount || die "Couldn't mount loopback ext2 filesystem" + sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug + echo "cp -a $clst_chroot_path/* $clst_cdroot_path/loopmount" + cp -a $clst_chroot_path/* $clst_cdroot_path/loopmount + [ $? -ne 0 ] && { umount $clst_cdroot_path/loopmount; die "Couldn't copy files to loopback ext2 filesystem"; } + umount $clst_cdroot_path/loopmount || die "Couldn't unmount loopback ext2 filesystem" + rm -rf $clst_cdroot_path/loopmount + #now, $clst_cdroot_path should contain a proper bootable image for our iso, including + #boot loader and loopback filesystem. + ;; +iso_create) + #this is for the livecd-final target, and calls the proper command to build the iso file + mkisofs -J -R -l -o ${clst_iso_path} -b isolinux/isolinux.bin -c isolinux/boot.cat \ + -no-emul-boot -boot-load-size 4 -boot-info-table $clst_cdroot_path + ;; +esac +exit 0 diff --git a/examples/x86-livecd-stage1-20031215.spec b/examples/livecd/x86/x86-livecd-stage1-20031215.spec similarity index 100% rename from examples/x86-livecd-stage1-20031215.spec rename to examples/livecd/x86/x86-livecd-stage1-20031215.spec diff --git a/examples/x86-livecd-stage2-20031215.spec b/examples/livecd/x86/x86-livecd-stage2-20031215.spec similarity index 100% rename from examples/x86-livecd-stage2-20031215.spec rename to examples/livecd/x86/x86-livecd-stage2-20031215.spec diff --git a/examples/livecd/x86/x86-livecd-stage3-20031215.spec b/examples/livecd/x86/x86-livecd-stage3-20031215.spec new file mode 100644 index 00000000..44157057 --- /dev/null +++ b/examples/livecd/x86/x86-livecd-stage3-20031215.spec @@ -0,0 +1,47 @@ +subarch: x86 +version_stamp: 20031215 +target: livecd-stage2 +rel_type: default +rel_version: 1.4 +snapshot: 20031215 +source_subpath: default-x86-1.4/livecd-stage2-x86-20031215 +boot/kernel: gentoo +livecd-stage3/cdtar: /path/to/cd.tar +livecd-stage3/runscript: /path/to/myrunscript.sh +livecd-stage3/empty: + /var/tmp + /var/cache + /var/db + /var/empty + /var/cache + /var/lock + /tmp + /usr/portage + /usr/share/man + /usr/share/info + /usr/share/unimaps + /usr/include + /usr/share/zoneinfo + /usr/share/dict + /usr/share/doc + /usr/share/ss + /usr/share/state + /usr/share/texinfo + /usr/lib/python2.2 + /usr/lib/portage + /usr/share/gettext + /usr/share/i18n + /usr/share/rfc + /usr/X11R6/man + /usr/X11R6/include + /usr/X11R6/lib/X11/config + /usr/X11R6/lib/X11/etc + /usr/X11R6/lib/X11/doc + /usr/src + /usr/share/doc + /usr/share/man +livecd-stage3/delete: + /lib/*.a + /usr/lib/*.a + /usr/lib/gcc-lib/*/*/libgcj* + /usr/X11R6/lib/*.a diff --git a/examples/ppc-grp-20031215.spec b/examples/ppc/ppc-grp-20031215.spec similarity index 100% rename from examples/ppc-grp-20031215.spec rename to examples/ppc/ppc-grp-20031215.spec diff --git a/examples/ppc-stage1-20031204.spec b/examples/ppc/ppc-stage1-20031204.spec similarity index 100% rename from examples/ppc-stage1-20031204.spec rename to examples/ppc/ppc-stage1-20031204.spec diff --git a/examples/ppc/ppc-stage1-20031228.spec b/examples/ppc/ppc-stage1-20031228.spec new file mode 100644 index 00000000..e02285cb --- /dev/null +++ b/examples/ppc/ppc-stage1-20031228.spec @@ -0,0 +1,7 @@ +subarch: ppc +version_stamp: 20031228 +target: stage1 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-ppc-1.4/stage3-ppc-20031208 diff --git a/examples/ppc-stage2-20031204.spec b/examples/ppc/ppc-stage2-20031204.spec similarity index 100% rename from examples/ppc-stage2-20031204.spec rename to examples/ppc/ppc-stage2-20031204.spec diff --git a/examples/ppc/ppc-stage2-20031228.spec b/examples/ppc/ppc-stage2-20031228.spec new file mode 100644 index 00000000..ae84123a --- /dev/null +++ b/examples/ppc/ppc-stage2-20031228.spec @@ -0,0 +1,7 @@ +subarch: ppc +version_stamp: 20031228 +target: stage2 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-ppc-1.4/stage1-ppc-20031228 diff --git a/examples/ppc-stage3-20031204.spec b/examples/ppc/ppc-stage3-20031204.spec similarity index 100% rename from examples/ppc-stage3-20031204.spec rename to examples/ppc/ppc-stage3-20031204.spec diff --git a/examples/ppc/ppc-stage3-20031208.spec b/examples/ppc/ppc-stage3-20031208.spec new file mode 100644 index 00000000..e8aa1acb --- /dev/null +++ b/examples/ppc/ppc-stage3-20031208.spec @@ -0,0 +1,7 @@ +subarch: ppc +version_stamp: 20031208 +target: stage3 +rel_type: default +rel_version: 1.4 +snapshot: 20031208 +source_subpath: default-ppc-1.4/stage2-ppc-20031204 diff --git a/examples/ppc/ppc-stage3-20031228.spec b/examples/ppc/ppc-stage3-20031228.spec new file mode 100644 index 00000000..5e678afd --- /dev/null +++ b/examples/ppc/ppc-stage3-20031228.spec @@ -0,0 +1,7 @@ +subarch: ppc +version_stamp: 20031228 +target: stage3 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-ppc-1.4/stage2-ppc-20031228 diff --git a/examples/x86-livecd-stage3-20031215.spec b/examples/x86-livecd-stage3-20031215.spec deleted file mode 100644 index c2f1651b..00000000 --- a/examples/x86-livecd-stage3-20031215.spec +++ /dev/null @@ -1,16 +0,0 @@ -subarch: x86 -version_stamp: 20031215 -target: livecd-stage2 -rel_type: default -rel_version: 1.4 -snapshot: 20031215 -source_subpath: default-x86-1.4/livecd-stage2-x86-20031215 -boot/kernel: gentoo -livecd-stage3/cdtar: /path/to/cd.tar -livecd-stage3/runscript: /path/to/myrunscript.sh -livecd-stage3/clean: - /usr/src/linux - /usr/share/doc - /usr/share/man - /var/db/pkg - /var/tmp diff --git a/examples/x86-livecd-stage3-runscript.sh b/examples/x86-livecd-stage3-runscript.sh deleted file mode 100644 index ce6dfea3..00000000 --- a/examples/x86-livecd-stage3-runscript.sh +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 1999-2004 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/examples/Attic/x86-livecd-stage3-runscript.sh,v 1.3 2004/01/09 22:35:05 drobbins Exp $ - -die() { - echo "$1" - exit 1 -} - -case $1 in -run) - #for running anything inside the chroot before the cleaning begins. This would normally - #be done during the build of the livecd-stage2 target, but we support doing stuff here - #too (although it should be avoided when possible.) - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - echo "CDBOOT=1" >> /etc/rc.conf -EOF - [ $? -ne 0 ] && exit 1 -;; -preclean) - #preclean runs with bind mounts active -- for running any commands inside chroot - $clst_CHROOT $clst_chroot_path /bin/bash << EOF - emerge -C gcc binutils -EOF - [ $? -ne 0 ] && exit 1 -;; -clean) - #clean runs after the bind mounts have been deactivated and and "livecd-stage3/clean" - #directories have been wiped. This is where you should run commands that wipe out - #things like static libraries, or other things that can't be cleaned up using the - #"livecd-stage3/clean" variable in the spec file (which is used to wipe out directory - #trees.) - find $clst_chroot_path/usr/lib -iname "*.a" -exec rm -f {} \; - ;; -cdroot_setup) - #use this to set up the cdroot ($clst_cdroot_path). This directory is meant to contain - #a filesystem tree of what will be burned to the CD. We extract the "cdtar" to this - #directory, which will normally contain a pre-built binary boot-loader and a filesystem - #skeleton for the ISO. - - cdtar=$clst_livecd_stage3_cdtar - [ "$cdtar" = "" ] && die "No livecd-stage3/cdtar specified (required)" - tar xjpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar" - if [ "$clst_boot_kernel" = "" ] - then - echo "No boot/kernel setting defined, exiting." - exit 1 - fi - first="" - for x in $clst_boot_kernel - do - if [ "$first" = "" ] - then - #grab name of first kernel - first="$x" - fi - if [ ! -e "$clst_source_path/$x.tar.bz2" ] - then - echo "Can't find kernel tarball at $clst_source_path/$x.tar.bz2" - exit 1 - fi - tar xjvf $clst_source_path/$x.tar.bz2 -C $clst_cdroot_path/isolinux - #change kernel name from "kernel" to "gentoo", for example - mv $clst_cdroot_path/isolinux/kernel $clst_cdroot_path/isolinux/$x - #change initrd name from "initrd" to "gentoo.igz", for example - mv $clst_cdroot_path/isolinux/initrd $clst_cdroot_path/isolinux/$x.igz - done - icfg=$clst_cdroot_path/isolinux/isolinux.cfg - echo "default $first" > $icfg - for x in $clst_boot_kernel - do - echo >> $icfg - echo "label $x" >> $icfg - echo " kernel $x" >> $icfg - echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc" >> $icfg - done - #OK, now we need to prepare the loopback filesystem that we'll be booting. This is - #tricky. - echo "Calculating size of loopback filesystem..." - loopsize=`du -ks $clst_cdroot_path` - #increase the size by 1/4, then divide by 4 to get 4k blocks - loopsize=$(( ( $loopsize + ( $loopsize /4 ) ) / 4 ) )) - echo "Creating loopback file..." - dd if=/dev/zero of=$clst_cdroot_path/livecd.loop bs=4k count=$loopsize || die "livecd.loop creation failure" - echo "Calculating number of inodes required for ext2 filesystem..." - numnodes=`find $clst_chroot_path | wc -l` - numnodes=$(( $numnodes + 200 )) - mke2fs -F -b 4096 -m 0 -N $numnodes -q $clst_cdroot_path/livecd.loop || die "Couldn't create ext2 filesystem" - #some error handling should probably be added here for handling the loopback mount cleanup - install -d $clst_cdroot_path/loopmount - mount -t ext2 -o loop $clst_cdroot_path/livecd.loop || die "Couldn't mount loopback ext2 filesystem" - cp -a $clst_chroot_path/* $clst_cdroot_path/loopmount - [ $? -ne 0 ] && ( umount $clst_cdroot_path/loopmount; die "Couldn't copy files to loopback ext2 filesystem" ) - umount $clst_cdroot_path/loopmount || die "Couldn't unmount loopback ext2 filesystem" - rm -rf $clst_cdroot_path/loopmount - #now, $clst_cdroot_path should contain a proper bootable image for our iso, including - #boot loader and loopback filesystem. - ;; -iso_create) - #this is for the livecd-final target, and calls the proper command to build the iso file - mkisofs -J -R -l -o ${clst_iso_path} -b isolinux/isolinux.bin -c isolinux/boot.cat \ - -no-emul-boot -boot-load-size 4 -boot-info-table $clst_cdroot_path - ;; -esac diff --git a/examples/x86-grp-20031102.spec b/examples/x86/x86-grp-20031102.spec similarity index 100% rename from examples/x86-grp-20031102.spec rename to examples/x86/x86-grp-20031102.spec diff --git a/examples/x86-stage1-20031102.spec b/examples/x86/x86-stage1-20031102.spec similarity index 100% rename from examples/x86-stage1-20031102.spec rename to examples/x86/x86-stage1-20031102.spec diff --git a/examples/x86-stage1-20031109.spec b/examples/x86/x86-stage1-20031109.spec similarity index 100% rename from examples/x86-stage1-20031109.spec rename to examples/x86/x86-stage1-20031109.spec diff --git a/examples/x86/x86-stage1-20031228.spec b/examples/x86/x86-stage1-20031228.spec new file mode 100644 index 00000000..7e3a8609 --- /dev/null +++ b/examples/x86/x86-stage1-20031228.spec @@ -0,0 +1,7 @@ +subarch: x86 +version_stamp: 20031228 +target: stage1 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-x86-1.4/stage2-x86-20031103 diff --git a/examples/x86-stage2-20031102.spec b/examples/x86/x86-stage2-20031102.spec similarity index 100% rename from examples/x86-stage2-20031102.spec rename to examples/x86/x86-stage2-20031102.spec diff --git a/examples/x86-stage2-20031109.spec b/examples/x86/x86-stage2-20031109.spec similarity index 100% rename from examples/x86-stage2-20031109.spec rename to examples/x86/x86-stage2-20031109.spec diff --git a/examples/x86/x86-stage2-20031228.spec b/examples/x86/x86-stage2-20031228.spec new file mode 100644 index 00000000..2e95a840 --- /dev/null +++ b/examples/x86/x86-stage2-20031228.spec @@ -0,0 +1,7 @@ +subarch: x86 +version_stamp: 20031228 +target: stage2 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-x86-1.4/stage1-x86-20031228 diff --git a/examples/x86-stage3-20031102.spec b/examples/x86/x86-stage3-20031102.spec similarity index 100% rename from examples/x86-stage3-20031102.spec rename to examples/x86/x86-stage3-20031102.spec diff --git a/examples/x86-stage3-20031109.spec b/examples/x86/x86-stage3-20031109.spec similarity index 100% rename from examples/x86-stage3-20031109.spec rename to examples/x86/x86-stage3-20031109.spec diff --git a/examples/x86/x86-stage3-20031228.spec b/examples/x86/x86-stage3-20031228.spec new file mode 100644 index 00000000..4312aefb --- /dev/null +++ b/examples/x86/x86-stage3-20031228.spec @@ -0,0 +1,7 @@ +subarch: x86 +version_stamp: 20031228 +target: stage3 +rel_type: default +rel_version: 1.4 +snapshot: 20031228 +source_subpath: default-x86-1.4/stage2-x86-20031228 diff --git a/examples/x86-tinderbox-20031102.spec b/examples/x86/x86-tinderbox-20031102.spec similarity index 100% rename from examples/x86-tinderbox-20031102.spec rename to examples/x86/x86-tinderbox-20031102.spec -- 2.26.2