From 4cda0c2382d4626e1e8d39af75b022e15826d248 Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Wed, 6 Oct 2004 16:00:09 +0000 Subject: [PATCH] code cleanup git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@450 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 8 +++++- catalyst | 4 +-- files/catalyst.1 | 43 +++++++++++++++++------------- livecd/runscript-support/kmerge.sh | 6 +---- targets/netboot/netboot-busybox.sh | 10 +++---- targets/netboot/netboot-image.sh | 9 +------ targets/netboot/netboot-kernel.sh | 4 +-- targets/netboot/netboot.sh | 4 +-- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index e03855db..ba534782 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # 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.89 2004/10/06 01:34:29 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.90 2004/10/06 16:00:09 zhen Exp $ + + 06 Oct 2004; John Davis files/catalyst.1, + livecd/runscript-support/kmerge.sh, targets/netboot/netboot-busybox.sh, + targets/netboot/netboot-image.sh, targets/netboot/netboot-kernel.sh, + targets/netboot/netboot.sh: + more code cleanup and maintenance 05 Oct 2004; John Davis modules/catalyst_support.py, modules/generic_stage_target.py, +modules/netboot.py, diff --git a/catalyst b/catalyst index 586be0e5..070d8a99 100755 --- a/catalyst +++ b/catalyst @@ -1,14 +1,14 @@ #!/usr/bin/python # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.48 2004/10/04 13:10:32 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.49 2004/10/06 16:00:09 zhen Exp $ # Maintained in full by John Davis import os,sys,imp,string,getopt __maintainer__="John Davis " -__version__="1.0.9" +__version__="1.1.0" conf_values={} diff --git a/files/catalyst.1 b/files/catalyst.1 index 9b6bf6b6..ed414ba2 100644 --- a/files/catalyst.1 +++ b/files/catalyst.1 @@ -1,4 +1,4 @@ -.TH "CATALYST" "1" "August 12, 2004" "Catalyst 1.0.9" "Catalyst" +.TH "CATALYST" "1" "August 12, 2004" "Catalyst 1.1.0" "Catalyst" .SH NAME catalyst \- The Gentoo Linux Release Engineering meta-tool @@ -20,7 +20,7 @@ catalyst \- The Gentoo Linux Release Engineering meta-tool .SH DESCRIPTION \fBcatalyst\fR is the tool that the Gentoo Release Engineering team utilizes to build all Gentoo Linux releases. It is capable of building -installation stages, bootable LiveCDs, and Gentoo Reference Platform (GRP) +installation stages, bootable LiveCDs, netboot images, and Gentoo Reference Platform (GRP) sets. \fBcatalyst\fR is also capable of providing a simple tinderbox environment for ebuild/package testing. @@ -30,45 +30,50 @@ on the web at . .SH OPTIONS .TP -.BR "\-\-help " (\fB\-h\fR) -Print the help message and exit +.BR "\-\-cli " (\fB\-C\fR) +This option is to be used in place of a specfile. All options are passed +to \fBcatalyst\fR on the commandline. Please note that this option must +be the last option passed to \fBcatalyst\fR for everything to work correctly. .TP -.BR "\-\-version " (\fB\-v\fR) -Print the version information and exit +.BR "\-\-config " (\fB\-c\fR) +Tell \fBcatalyst\fR to use a user-defined configuration file. A sample +configuration file is installed at /etc/catalyst/catalyst.conf. .TP .BR "\-\-debug " (\fB\-d\fR) Enable debugging mode .TP -.BR "\-\-config " (\fB\-c\fR) -Tell \fBcatalyst\fR to use a user-defined configuration file. A sample -configuration file is installed at /etc/catalyst/catalyst.conf. +.BR "\-\-file " (\fB\-f\fR) +Tell \fBcatalyst\fR to use the user supplied specfile. .TP -.BR "\-\-cli " (\fB\-C\fR) -This option is to be used in place of a specfile. All options are passed -to \fBcatalyst\fR on the commandline. Please note that this option must -be the last option passed to \fBcatalyst\fR for everything to work correctly. +.BR "\-\-help " (\fB\-h\fR) +Print the help message and exit .TP -.BR "\-\-file " (\fB\-f\fR) -Tell \fBcatalyst\fR to use the user supplied specfile. +.BR "\-\-snapshot " (\fB\-s\fR) +Create a Portage snapshot using the specified identifier stamp. .TP .BR "\-\-verbose " (\fB\-V\fR) Enable verbose mode. +.BR "\-\-version " (\fB\-v\fR) +Print the version information and exit +.TP + .SH EXAMPLES .TP Using the commandline option (\-C, \-\-cli) to build a Portage snapshot: -.LP catalyst \-C target=snapshot version_stamp=my_date -.LP +.TP Using the specfile option (\-f, \-\-file) to build a stage target: -.LP catalyst \-f stage1\-specfile.spec +.TP +Using the snapshot option (\-s, \-\-snapshot) to package a Portage snapshot using the datestamp 20041006: +catalyst \-s 20041006 .SH FILES .TP @@ -92,4 +97,4 @@ A more in-depth examination of Catalyst options and procedures can be found link John Davis .SH "CVS HEADER" -$Id: catalyst.1,v 1.2 2004/09/18 19:32:13 zhen Exp $ +$Id: catalyst.1,v 1.3 2004/10/06 16:00:09 zhen Exp $ diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index 0a11660a..643e1d6b 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.10 2004/09/29 01:32:51 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.11 2004/10/06 16:00:09 zhen Exp $ die() { echo "$1" @@ -102,10 +102,6 @@ then echo sleep 5 - # copy over our config file so that kernel_merge packages like pcmcia don't complain - #cp /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config /usr/src/linux/.config - #emerge ${clst_kernel_merge} - # unpack our modules to the LiveCD fs echo echo "Unpacking kernel modules from the previous build..." diff --git a/targets/netboot/netboot-busybox.sh b/targets/netboot/netboot-busybox.sh index 381554c5..81031c5c 100644 --- a/targets/netboot/netboot-busybox.sh +++ b/targets/netboot/netboot-busybox.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-busybox.sh,v 1.1 2004/10/06 01:34:29 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-busybox.sh,v 1.2 2004/10/06 16:00:09 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -29,7 +29,7 @@ mkdir -pv ${IMAGE_PATH} ROOT=${IMAGE_PATH} emerge --nodeps ${clst_emergeopts} busybox || exit 1 # Remove portage's unneeded files -rm -R ${IMAGE_PATH}/etc -rm -R ${IMAGE_PATH}/tmp -rm -R ${IMAGE_PATH}/usr -rm -R ${IMAGE_PATH}/var +rm -rf ${IMAGE_PATH}/etc +rm -rf ${IMAGE_PATH}/tmp +rm -rf ${IMAGE_PATH}/usr +rm -rf ${IMAGE_PATH}/var diff --git a/targets/netboot/netboot-image.sh b/targets/netboot/netboot-image.sh index e6544ef5..3b6065c5 100644 --- a/targets/netboot/netboot-image.sh +++ b/targets/netboot/netboot-image.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-image.sh,v 1.1 2004/10/06 01:34:29 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-image.sh,v 1.2 2004/10/06 16:00:09 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -95,9 +95,7 @@ function copy_file() { fi } - # Copy the files needed in the chroot - copy_libs ${IMAGE_PATH}/bin/busybox FILES="${@}" @@ -106,24 +104,19 @@ do copy_file ${f} done - # Copy the kernel modules - [ ! -e ${IMAGE_PATH}/lib ] && mkdir -p ${IMAGE_PATH}/lib cp -Rv /lib/modules ${IMAGE_PATH}/lib #find ${IMAGE_PATH}/lib -name \*.o -o -name \*.ko | xargs strip -R .comment -R .note # Extract the base tarball - tar xjvf ${TARBALL} -C ${IMAGE_PATH}/ # Unpack the kernel - tar xjvf ${GK_BINARIES}/kernel.tar.bz2 -C / mv -f /kernel-2.* /kernel # Create the ramdisk - IMAGE_SIZE=`du -s ${IMAGE_PATH} | awk '{ print $1 }'` dd if=/dev/zero of=/ramdisk bs=1k count=$((IMAGE_SIZE + 500)) diff --git a/targets/netboot/netboot-kernel.sh b/targets/netboot/netboot-kernel.sh index 0d90d8c7..d9610bec 100644 --- a/targets/netboot/netboot-kernel.sh +++ b/targets/netboot/netboot-kernel.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-kernel.sh,v 1.1 2004/10/06 01:34:29 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-kernel.sh,v 1.2 2004/10/06 16:00:09 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -44,5 +44,5 @@ USE="${@}" emerge ${KERNEL_SOURCES} || exit 1 mkdir -p ${GK_BINARIES} genkernel --kerneldir=/usr/src/linux --kernel-config=/var/tmp/kernel.config \ - --minkernpackage=${GK_BINARIES}/kernel.tar.bz2 \ + --minkernpackage=${GK_BINARIES}/kernel-${clst_version_stamp}.tar.bz2 \ kernel || exit 1 diff --git a/targets/netboot/netboot.sh b/targets/netboot/netboot.sh index ad91b1b2..caf0150d 100644 --- a/targets/netboot/netboot.sh +++ b/targets/netboot/netboot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot.sh,v 1.1 2004/10/06 01:34:29 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot.sh,v 1.2 2004/10/06 16:00:09 zhen Exp $ export GK_BINARIES=/usr/portage/packages/gk_binaries export IMAGE_PATH=/image @@ -56,8 +56,8 @@ case $1 in ${clst_CHROOT} ${clst_chroot_path} /tmp/netboot-image.sh ${IMAGE_PATH} /netboot-base.tar.bz2 ${@} || exit 1 rm -f ${clst_chroot_path}/tmp/netboot-image.sh exit 0 - ;; + finish) [ ! -e ${clst_target_path} ] && mkdir -p ${clst_target_path} cp ${clst_chroot_path}/ramdisk ${clst_chroot_path}/kernel ${clst_target_path} -- 2.26.2