From 3088b6ad97c1bc16bcdb2f1555eb8df54b9a4f61 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Fri, 22 Oct 2004 04:23:16 +0000 Subject: [PATCH] Changed kernel build caching to use kerncache option, rather than pkgcache option. Fixed --postconf and --callback for builds that do not require them. Removed delay when removing package sin the system profile. This is now catalyst 1.1.0, so enjoy. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@474 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 11 +++++- files/catalyst.conf | 12 ++++-- livecd/runscript-support/kmerge.sh | 41 +++++++++++++++------ livecd/runscript-support/livecdfs-update.sh | 4 +- targets/livecd-stage2/unmerge.sh | 4 +- targets/netboot/netboot-kernel.sh | 6 +-- 6 files changed, 54 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 202a8c09..bea31b01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.103 2004/10/21 17:19:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.104 2004/10/22 04:23:16 wolf31o2 Exp $ + + 22 Oct 2004; Chris Gianelloni files/catalyst.conf, + livecd/runscript-support/kmerge.sh, + livecd/runscript-support/livecdfs-update.sh, + targets/livecd-stage2/unmerge.sh, targets/netboot/netboot-kernel.sh: + Changed kernel build caching to use kerncache option, rather than pkgcache + option. Fixed --postconf and --callback for builds that do not require them. + Removed delay when removing package sin the system profile. This is now + catalyst 1.1.0, so enjoy. 21 Oct 2004; Chris Gianelloni livecd/runscript-support/livecdfs-update.sh: diff --git a/files/catalyst.conf b/files/catalyst.conf index 979292c9..035fe9cb 100644 --- a/files/catalyst.conf +++ b/files/catalyst.conf @@ -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/files/catalyst.conf,v 1.7 2004/10/19 04:06:35 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/files/catalyst.conf,v 1.8 2004/10/22 04:23:16 wolf31o2 Exp $ # Simple desriptions of catalyst settings. Please refer to the online # documentation for more information. @@ -11,9 +11,13 @@ distdir="/usr/portage/distfiles" # options set different build-time options for catalyst. Some examples are: # ccache = enables build time ccache support (highly recommended) -# distcc = enable distcc support for building. You have to set distcc_hosts in your spec file. -# pkgcache = keeps a tbz2 of every built package (useful if your build stops prematurely) -options="ccache pkgcache" +# distcc = enable distcc support for building. You have to set distcc_hosts in +# your spec file. +# pkgcache = keeps a tbz2 of every built package (useful if your build stops +# prematurely) +# kerncache = keeps a tbz2 of your built kernel and modules (useful if your +# build stops in livecd-stage2) +options="ccache pkgcache kerncache" # sharedir specifies where all of the catalyst runtime executables are. Most users do # not need to change this. diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index 076e6399..608f8484 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # 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.17 2004/10/21 17:06:21 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.18 2004/10/22 04:23:16 wolf31o2 Exp $ die() { echo "$1" @@ -34,18 +34,14 @@ build_kernel() { do clst_kernel_postconf="${clst_kernel_postconf} ${x}" done - GK_ARGS="${GK_ARGS} --postconf=\"${clst_kernel_postconf}\"" fi if [ -e "/var/tmp/${clst_kname}.packages" ] then for x in $( cat /var/tmp/${clst_kname}.packages ) do - # we don't want to use the pkgcache for these since the results - # are kernel-dependent. clst_kernel_merge="${clst_kernel_merge} ${x}" done - GK_ARGS="${GK_ARGS} --callback=\"${clst_kernel_merge}\"" fi if [ "${clst_livecd_devmanager}" == "udev" ] @@ -54,16 +50,31 @@ build_kernel() { fi # build with genkernel using the set options - # callback is put here to avoid escaping issues - genkernel ${GK_ARGS} || exit 1 - + # callback and postconf are put here to avoid escaping issues + if [ -e "/var/tmp/${clst_kname}.packages" -a \ + -e "/var/tmp/${clst_kname}.postconf" ] + then + genkernel --callback="emerge ${clst_kernel_merge}" \ + --postconf="emerge ${clst_kernel_postconf}" \ + ${GK_ARGS} || exit 1 + elif [ -e "/var/tmp/${clst_kname}.packages" ] + then + genkernel --callback="emerge ${clst_kernel_merge}" \ + ${GK_ARGS} || exit 1 + elif [ -e "/var/tmp/${clst_kname}.postconf" ] + then + genkernel --postconf="emerge ${clst_kernel_postconf}" \ + ${GK_ARGS} || exit 1 + else + genkernel ${GK_ARGS} || exit 1 + fi + # pack up the modules for resuming if [ -n "${clst_KERNCACHE}" ] then tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \ - /lib/modules/"${1}" || die "Could not package kernel modules, exiting" + /lib/modules/${1} || die "Could not package kernel modules, exiting" fi - } # Script to build each kernel, kernel-related packages @@ -137,10 +148,16 @@ else fi /sbin/modules-update --assume-kernel=${clst_fudgeuname} - + #now the unmerge... (wipe db entry) emerge -C ${clst_ksource} unset USE +echo # keep the config around so that we can resume at some point -[ -n "${clst_KERNCACHE}" ] && cp /var/tmp/${clst_kname}.config /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config +if [ -n "${clst_KERNCACHE}" ] +then + cp /var/tmp/${clst_kname}.config \ + /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config +fi +echo diff --git a/livecd/runscript-support/livecdfs-update.sh b/livecd/runscript-support/livecdfs-update.sh index 78ec24bc..d8ad4a46 100755 --- a/livecd/runscript-support/livecdfs-update.sh +++ b/livecd/runscript-support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # 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.18 2004/10/21 17:19:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.19 2004/10/22 04:23:16 wolf31o2 Exp $ /usr/sbin/env-update source /etc/profile @@ -142,5 +142,5 @@ then fi # tar up the firmware so that it does not get clobbered by the livecd mounts -[ -n $(ls /usr/lib/hotplug/firmware) ] && tar cjpf /usr/lib/hotplug/firmware.tar.bz2 /usr/lib/hotplug/firmware/* +[ -n $(ls /usr/lib/hotplug/firmware) ] && tar cvjpf /usr/lib/hotplug/firmware.tar.bz2 /usr/lib/hotplug/firmware/* ln -sf /lib/firmware /usr/lib/hotplug/firmware diff --git a/targets/livecd-stage2/unmerge.sh b/targets/livecd-stage2/unmerge.sh index 318c0308..8ef99809 100644 --- a/targets/livecd-stage2/unmerge.sh +++ b/targets/livecd-stage2/unmerge.sh @@ -1,8 +1,8 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/unmerge.sh,v 1.4 2004/10/15 02:46:58 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/unmerge.sh,v 1.5 2004/10/22 04:23:16 wolf31o2 Exp $ $clst_CHROOT $clst_chroot_path /bin/bash << EOF - emerge -C $* + EMERGE_WARNING_DELAY=0 emerge -C $* EOF exit 0 diff --git a/targets/netboot/netboot-kernel.sh b/targets/netboot/netboot-kernel.sh index 227daa13..9324c251 100644 --- a/targets/netboot/netboot-kernel.sh +++ b/targets/netboot/netboot-kernel.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # 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.3 2004/10/11 14:19:30 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-kernel.sh,v 1.4 2004/10/22 04:23:16 wolf31o2 Exp $ /usr/sbin/env-update source /etc/profile @@ -16,7 +16,7 @@ export USE_ORDER="env:conf:defaults" mkdir -p ${GK_BINARIES} BUILD_KERNEL=1 -if [ -n "${clst_PKGCACHE}" ] +if [ -n "${clst_KERNCACHE}" ] then GK_PKGDIR="$(portageq envvar PKGDIR)/All/genkernel" mkdir -p ${GK_PKGDIR} @@ -55,7 +55,7 @@ then tar -jxf ${GK_BINARIES}/kernel.tar.bz2 -C ${GK_BINARIES} mv ${GK_BINARIES}/{${kernname},kernel} || exit 1 - if [ -n "${clst_PKGCACHE}" ] + if [ -n "${clst_KERNCACHE}" ] then case ${clst_mainarch} in alpha|arm|sparc);; -- 2.26.2