From: Eric Edgar Date: Tue, 22 Nov 2005 20:36:18 +0000 (+0000) Subject: Tinderbox script: added newuse, tinderbox and grp targets added support for overridin... X-Git-Tag: CATALYST_2_0_6_916~586 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=185efc3995e74733f715f3b879f56f30a15f6c4f;p=catalyst.git Tinderbox script: added newuse, tinderbox and grp targets added support for overriding the pkgcache location via pkgcache_path - pkgcache_path: /path/to/cache in the spec file, updated example specs to note pkgcache_path git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@908 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index dfb5e2a3..7da9adef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.395 2005/11/22 19:30:10 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.396 2005/11/22 20:36:17 rocket Exp $ + + 22 Nov 2005; Eric Edgar examples/grp_template.spec, + examples/livecd-stage1_template.spec, examples/stage4_template.spec, + modules/grp_target.py, modules/tinderbox_target.py, + targets/tinderbox/tinderbox-chroot.sh: + Tinderbox script: added newuse, tinderbox and grp targets added support for + overriding the pkgcache location via pkgcache_path - pkgcache_path: + /path/to/cache in the spec file, updated example specs to note pkgcache_path 22 Nov 2005; Chris Gianelloni files/catalyst.conf: Added portdir example to catalyst.conf for bug #113272. diff --git a/examples/grp_template.spec b/examples/grp_template.spec index 7aea887f..2bcaf6eb 100644 --- a/examples/grp_template.spec +++ b/examples/grp_template.spec @@ -56,6 +56,13 @@ distcc_hosts: # portage_confdir: /etc/portage portage_confdir: +# This allows the optional directory containing the output packages for catalyst. +# Mainly used as a way for different spec files to access the same cache directory +# Default behavior is for this location to be autogenerated by catalyst based on the spec file. +# example: +# pkgcache_path: /tmp/packages +pkgcache_path: + # Since GRP is capable of building packages/source sets for more than one CD, # this defines the layout for the directories under $clst_sharedir/builds. # example: diff --git a/examples/livecd-stage1_template.spec b/examples/livecd-stage1_template.spec index e09c1ea5..69241594 100644 --- a/examples/livecd-stage1_template.spec +++ b/examples/livecd-stage1_template.spec @@ -56,6 +56,13 @@ distcc_hosts: # portage_confdir: /etc/portage portage_confdir: +# This allows the optional directory containing the output packages for catalyst. +# Mainly used as a way for different spec files to access the same cache directory +# Default behavior is for this location to be autogenerated by catalyst based on the spec file. +# example: +# pkgcache_path: /tmp/packages +pkgcache_path: + # The livecd-stage1 target is where you will build packages for your CD. These # packages can be built with customized USE settings. The settings here are # additive to the default USE configured by the profile. For building release diff --git a/examples/stage4_template.spec b/examples/stage4_template.spec index fad01b20..8de0415a 100644 --- a/examples/stage4_template.spec +++ b/examples/stage4_template.spec @@ -56,6 +56,13 @@ distcc_hosts: # portage_confdir: /etc/portage portage_confdir: +# This allows the optional directory containing the output packages for catalyst. +# Mainly used as a way for different spec files to access the same cache directory +# Default behavior is for this location to be autogenerated by catalyst based on the spec file. +# example: +# pkgcache_path: /tmp/packages +pkgcache_path: + # The stage4-stage1 target is where you will build packages for your CD. These # packages can be built with customized USE settings. The settings here are # additive to the default USE configured by the profile. For building release @@ -73,18 +80,6 @@ stage4/use: # stage4/packages: livecd-tools dhcpcd acpid apmd gentoo-sources kudzu-knoppix hotplug coldplug fxload irssi gpm syslog-ng parted links raidtools dosfstools nfs-utils jfsutils xfsprogs e2fsprogs reiserfsprogs ntfsprogs pwgen rp-pppoe screen mirrorselect penggy iputils hwdata-knoppix hwsetup lvm2 evms vim pptpclient mdadm ethtool wireless-tools prism54-firmware wpa_supplicant stage4/packages: - -# The cdfstype is used to determine what sort of CD we should build. This is -# used to set the type of loopback filesystem that we will use on our CD. -# Possible options are as follows: -# squashfs - This gives the best compression, but requires a kernel patch. -# zisofs - This uses in-kernel compression and is supported on all platforms. -# normal - This creates a loop without compression. -# noloop - This copies the files to the CD directly, withuot using a loopback. -# example: -# stage4/fstype: squashfs -stage4/fstype: - # A fsscript is simply a shell script that is copied into the chroot of the CD # after the kernel(s) and any external modules have been compiled and is # executed within the chroot. It can contain any commands that are available diff --git a/modules/grp_target.py b/modules/grp_target.py index 9ddc3ee6..02ff1f68 100644 --- a/modules/grp_target.py +++ b/modules/grp_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/grp_target.py,v 1.14 2005/08/09 14:12:26 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/grp_target.py,v 1.15 2005/11/22 20:36:18 rocket Exp $ """ The builder class for GRP (Gentoo Reference Platform) builds. @@ -45,6 +45,13 @@ class grp_target(generic_stage_target): self.unbind() raise CatalystError,"GRP build aborting due to error." + def set_pkgcache_path(self): + if self.settings.has_key("pkgcache_path"): + if type(self.settings["pkgcache_path"]) != types.StringType: + self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) + else: + generic_stage_target.set_pkgcache_path(self) + def set_action_sequence(self): self.settings["action_sequence"]=["unpack","unpack_snapshot",\ "config_profile_link","setup_confdir","bind","chroot_setup",\ diff --git a/modules/tinderbox_target.py b/modules/tinderbox_target.py index e19acec8..3feedb37 100644 --- a/modules/tinderbox_target.py +++ b/modules/tinderbox_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/tinderbox_target.py,v 1.13 2005/11/02 21:54:29 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/tinderbox_target.py,v 1.14 2005/11/22 20:36:18 rocket Exp $ """ builder class for the tinderbox target @@ -27,6 +27,14 @@ class tinderbox_target(generic_stage_target): except CatalystError: self.unbind() raise CatalystError,"Tinderbox aborting due to error." + + def set_pkgcache_path(self): + if self.settings.has_key("pkgcache_path"): + if type(self.settings["pkgcache_path"]) != types.StringType: + self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) + else: + generic_stage_target.set_pkgcache_path(self) + def set_cleanables(self): self.settings["cleanables"]=["/etc/resolv.conf","/var/tmp/*","/root/*",\ "/usr/portage"] diff --git a/targets/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh index ca6d5be6..ebabfc69 100755 --- a/targets/tinderbox/tinderbox-chroot.sh +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.13 2005/10/06 20:56:54 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.14 2005/11/22 20:36:18 rocket Exp $ . /tmp/chroot-functions.sh @@ -26,7 +26,7 @@ for x in ${clst_tinderbox_packages} do if [ -n "${clst_VERBOSE}" ] then - emerge --usepkg --buildpkg -vp $x + emerge --usepkg --buildpkg --newuse -vp $x echo "Press any key within 15 seconds to pause the build..." read -s -t 15 -n 1 if [ $? -eq 0 ] @@ -38,7 +38,7 @@ do mkdir -p /tmp/packages/$x export PORT_LOGDIR="/tmp/packages/$x" - emerge --usepkg --buildpkg $x + emerge --usepkg --buildpkg --newuse $x if [ "$?" != "0" ] then