commit: aa2c1085b5c4ee42eefe7fd69f7a30f94316a95e
Author: Matthew Thode <mthode <AT> mthode <DOT> org>
AuthorDate: Fri Mar 2 16:17:20 2018 +0000
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Fri Mar 2 16:17:20 2018 +0000
URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=aa2c1085
add stage4 to systemd stage generation
tools-systemd/common.sh | 7 ++--
tools-systemd/run.sh | 11 +++++--
tools-systemd/stage4-amd64.spec | 73 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+), 5 deletions(-)
diff --git a/tools-systemd/common.sh b/tools-systemd/common.sh
index 9a0a03af..d9570d05 100644
--- a/tools-systemd/common.sh
+++ b/tools-systemd/common.sh
@@ -2,7 +2,7 @@
source /etc/catalyst/catalyst.conf
-mydate=`date +%Y%m%d`
+mydate=$(date +%Y%m%d)
undo_grsec() {
@@ -27,11 +27,12 @@ EOF
do_stages() {
local arch=$1
- for s in 1 2 3; do
+ for s in 1 2 3 4; do
local tgpath="${storedir}/builds/systemd/${arch}"
local target="stage${s}-${arch}-systemd-${mydate}.tar.bz2"
local tglink="stage${s}-${arch}-systemd.tar.bz2"
-
+ # only run the amd64 stage4
+ [[ $arch == i686 ]] && [[ $s == 4 ]] && continue
if [[ ! -f "${tgpath}/${tglink}" ]]; then
touch stage${s}-${arch}-systemd.log
echo "!!! ${tglink} at ${tgpath} doesn't exist" \
diff --git a/tools-systemd/run.sh b/tools-systemd/run.sh
index 064700fb..4535883c 100755
--- a/tools-systemd/run.sh
+++ b/tools-systemd/run.sh
@@ -5,22 +5,29 @@ source common.sh
prepare_confs() {
local arch=$1
- for s in 1 2 3; do
+ for s in 1 2 3 4; do
+ # don't make i686 stage4
+ [[ $arch == i686 ]] && [[ $s == 4 ]] && continue
local cstage=stage${s}
local p=$(( s - 1 ))
[[ $p == 0 ]] && p=3
local pstage=stage${p}
+ local repo_dir="$( cd "$( dirname ${BASH_SOURCE[0]} )../" && pwd )"
+ local template="stage-all.conf.template"
+ # set the template file if stage4
+ [[ $s == 4 ]] && specfile=stage4-amd64.spec
local parch="${arch}"
[[ "${arch}" == "i686" ]] && parch="x86"
- cat stage-all.conf.template | \
+ cat ${specfile} | \
sed -e "s:\(^version_stamp.*$\):\1-${mydate}:" \
-e "s:CSTAGE:${cstage}:g" \
-e "s:PSTAGE:${pstage}:g" \
-e "s:SARCH:${arch}:g" \
-e "s:PARCH:${parch}:g" \
+ -e "s:@REPO_DIR@:${repo_dir}:g" \
> stage${s}-${arch}-systemd.conf
done
}
diff --git a/tools-systemd/stage4-amd64.spec b/tools-systemd/stage4-amd64.spec
new file mode 100644
index 00000000..720fc694
--- /dev/null
+++ b/tools-systemd/stage4-amd64.spec
@@ -0,0 +1,73 @@
+subarch: SARCH
+target: CSTAGE
+version_stamp: systemd
+rel_type: systemd/SARCH
+profile: default/linux/PARCH/17.0/systemd
+snapshot: current
+source_subpath: systemd/SARCH/PSTAGE-SARCH-systemd
+portage_confdir: @REPO_DIR@/releases/weekly/portage/stages/
+
+stage4/use:
+ bash-completion
+ bindist
+ bzip2
+ idm
+ ipv6
+ mmx
+ sse
+ sse2
+ urandom
+
+stage4/packages:
+ app-admin/sudo
+ net-misc/dhcp
+ net-misc/iputils
+ sys-boot/grub
+ sys-apps/gptfdisk
+ sys-apps/iproute2
+ sys-apps/lsb-release
+ sys-devel/bc
+ sys-power/acpid
+stage4/fsscript: @REPO_DIR@/releases/weekly/scripts/cloud-prep.sh
+stage4/rcadd:
+ acpid|default
+ net.lo|default
+ netmount|default
+ sshd|default
+
+boot/kernel: gentoo
+boot/kernel/gentoo/sources: gentoo-sources
+boot/kernel/gentoo/config:
@REPO_DIR@/releases/weekly/kconfig/amd64/cloud-amd64-gentoo.config
+boot/kernel/gentoo/extraversion: openstack
+boot/kernel/gentoo/gk_kernargs: --all-ramdisk-modules
+
+# all of the cleanup...
+stage4/unmerge:
+ sys-kernel/genkernel
+ sys-kernel/gentoo-sources
+
+stage4/empty:
+ /root/.ccache
+ /tmp
+ /usr/portage/distfiles
+ /usr/src
+ /var/cache/edb/dep
+ /var/cache/genkernel
+ /var/cache/portage/distfiles
+ /var/empty
+ /var/run
+ /var/state
+ /var/tmp
+
+stage4/rm:
+ /etc/*-
+ /etc/*.old
+ /etc/ssh/ssh_host_*
+ /root/.*history
+ /root/.lesshst
+ /root/.ssh/known_hosts
+ /root/.viminfo
+ # Remove any generated stuff by genkernel
+ /usr/share/genkernel
+ # This is 3MB of crap for each copy
+
/usr/lib64/python*/site-packages/gentoolkit/test/eclean/testdistfiles.tar.gz