Gentoo Archives: gentoo-releng

From: Mike Frysinger <vapier@g.o>
To: gentoo-releng@l.g.o
Subject: [gentoo-releng] [PATCH] add autobuild support for s390/s390x
Date: Thu, 23 Jan 2014 04:11:48
Message-Id: 1390450310-7425-1-git-send-email-vapier@gentoo.org
1 ---
2 releases/weekly/specs/s390/s390/stage1.spec | 8 +++++
3 releases/weekly/specs/s390/s390/stage2.spec | 7 ++++
4 releases/weekly/specs/s390/s390/stage3.spec | 7 ++++
5 releases/weekly/specs/s390/s390x/stage1.spec | 8 +++++
6 releases/weekly/specs/s390/s390x/stage2.spec | 7 ++++
7 releases/weekly/specs/s390/s390x/stage3.spec | 7 ++++
8 tools/catalyst-auto-s390.conf | 54 ++++++++++++++++++++++++++++
9 tools/catalyst-auto-s390x.conf | 54 ++++++++++++++++++++++++++++
10 8 files changed, 152 insertions(+)
11 create mode 100644 releases/weekly/specs/s390/s390/stage1.spec
12 create mode 100644 releases/weekly/specs/s390/s390/stage2.spec
13 create mode 100644 releases/weekly/specs/s390/s390/stage3.spec
14 create mode 100644 releases/weekly/specs/s390/s390x/stage1.spec
15 create mode 100644 releases/weekly/specs/s390/s390x/stage2.spec
16 create mode 100644 releases/weekly/specs/s390/s390x/stage3.spec
17 create mode 100644 tools/catalyst-auto-s390.conf
18 create mode 100644 tools/catalyst-auto-s390x.conf
19
20 diff --git a/releases/weekly/specs/s390/s390/stage1.spec b/releases/weekly/specs/s390/s390/stage1.spec
21 new file mode 100644
22 index 0000000..8d89acb
23 --- /dev/null
24 +++ b/releases/weekly/specs/s390/s390/stage1.spec
25 @@ -0,0 +1,8 @@
26 +subarch: s390
27 +version_stamp: 2008.0
28 +target: stage1
29 +rel_type: default
30 +profile: default/linux/s390/13.0
31 +snapshot: 2008.0
32 +source_subpath: default/stage3-s390-latest
33 +update_seed: yes
34 diff --git a/releases/weekly/specs/s390/s390/stage2.spec b/releases/weekly/specs/s390/s390/stage2.spec
35 new file mode 100644
36 index 0000000..b8e475b
37 --- /dev/null
38 +++ b/releases/weekly/specs/s390/s390/stage2.spec
39 @@ -0,0 +1,7 @@
40 +subarch: s390
41 +version_stamp: 2008.0
42 +target: stage2
43 +rel_type: default
44 +profile: default/linux/s390/13.0
45 +snapshot: 2008.0
46 +source_subpath: default/stage1-s390-2008.0
47 diff --git a/releases/weekly/specs/s390/s390/stage3.spec b/releases/weekly/specs/s390/s390/stage3.spec
48 new file mode 100644
49 index 0000000..7a129a7
50 --- /dev/null
51 +++ b/releases/weekly/specs/s390/s390/stage3.spec
52 @@ -0,0 +1,7 @@
53 +subarch: s390
54 +version_stamp: 2008.0
55 +target: stage3
56 +rel_type: default
57 +profile: default/linux/s390/13.0
58 +snapshot: 2008.0
59 +source_subpath: default/stage2-s390-2008.0
60 diff --git a/releases/weekly/specs/s390/s390x/stage1.spec b/releases/weekly/specs/s390/s390x/stage1.spec
61 new file mode 100644
62 index 0000000..d57f10e
63 --- /dev/null
64 +++ b/releases/weekly/specs/s390/s390x/stage1.spec
65 @@ -0,0 +1,8 @@
66 +subarch: s390x
67 +version_stamp: 2008.0
68 +target: stage1
69 +rel_type: default
70 +profile: default/linux/s390/13.0/s390x
71 +snapshot: 2008.0
72 +source_subpath: default/stage3-s390x-latest
73 +update_seed: yes
74 diff --git a/releases/weekly/specs/s390/s390x/stage2.spec b/releases/weekly/specs/s390/s390x/stage2.spec
75 new file mode 100644
76 index 0000000..d83acc0
77 --- /dev/null
78 +++ b/releases/weekly/specs/s390/s390x/stage2.spec
79 @@ -0,0 +1,7 @@
80 +subarch: s390x
81 +version_stamp: 2008.0
82 +target: stage2
83 +rel_type: default
84 +profile: default/linux/s390/13.0/s390x
85 +snapshot: 2008.0
86 +source_subpath: default/stage1-s390x-2008.0
87 diff --git a/releases/weekly/specs/s390/s390x/stage3.spec b/releases/weekly/specs/s390/s390x/stage3.spec
88 new file mode 100644
89 index 0000000..1e091bc
90 --- /dev/null
91 +++ b/releases/weekly/specs/s390/s390x/stage3.spec
92 @@ -0,0 +1,7 @@
93 +subarch: s390x
94 +version_stamp: 2008.0
95 +target: stage3
96 +rel_type: default
97 +profile: default/linux/s390/13.0/s390x
98 +snapshot: 2008.0
99 +source_subpath: default/stage2-s390x-2008.0
100 diff --git a/tools/catalyst-auto-s390.conf b/tools/catalyst-auto-s390.conf
101 new file mode 100644
102 index 0000000..d8f975c
103 --- /dev/null
104 +++ b/tools/catalyst-auto-s390.conf
105 @@ -0,0 +1,54 @@
106 +# This is the config file for the catalyst-auto script. It should be pretty
107 +# self-explanatory.
108 +
109 +GITDIR=/root/releng/
110 +
111 +SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390
112 +SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`
113 +
114 +SETS="default"
115 +
116 +SET_default_SPECS="stage1.spec stage2.spec stage3.spec"
117 +
118 +#KCONFIG_DIR=${GITDIR}/releases/weekly/kconfig/s390
119 +
120 +EMAIL_TO=releng@g.o,gentoo-releng-autobuilds@l.g.o
121 +EMAIL_FROM=catalyst@$(hostname)
122 +EMAIL_SUBJECT_PREPEND="[${SUBARCH}-auto]"
123 +
124 +
125 +CATALYST_CONFIG=/etc/catalyst/catalyst.conf
126 +
127 +BUILD_SRCDIR_BASE=`grep storedir= $CATALYST_CONFIG | cut -d '=' -f2 | sed -e 's/"//g'`
128 +
129 +give_latest_from_dates() {
130 + sed 's,-20,~20,g' | \
131 + sort -k +1 -n -t '~' |\
132 + awk -F\~ \
133 + 'BEGIN{i=$1; o=$0};
134 + { if($1 != i && i != "") { print o; }; i=$1; o=$0; }
135 + END { print o; };' | \
136 + tr '~' '-'
137 +}
138 +
139 +
140 +pre_build() {
141 + cd ${GITDIR}
142 + git pull
143 +
144 + # Symlink the latest stages3 to build from
145 + for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
146 + pushd $d
147 + for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
148 + of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
149 + of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
150 + ln -sf $f $of
151 + done
152 + popd
153 + done
154 +}
155 +
156 +
157 +post_build() {
158 + rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2* s390@××××××××××××××.org:
159 +}
160 diff --git a/tools/catalyst-auto-s390x.conf b/tools/catalyst-auto-s390x.conf
161 new file mode 100644
162 index 0000000..c085330
163 --- /dev/null
164 +++ b/tools/catalyst-auto-s390x.conf
165 @@ -0,0 +1,54 @@
166 +# This is the config file for the catalyst-auto script. It should be pretty
167 +# self-explanatory.
168 +
169 +GITDIR=/root/releng/
170 +
171 +SPECS_DIR=${GITDIR}/releases/weekly/specs/s390/s390x
172 +SUBARCH=`grep subarch $SPECS_DIR/stage1.spec | awk '{print $2}'`
173 +
174 +SETS="default"
175 +
176 +SET_default_SPECS="stage1.spec stage2.spec stage3.spec"
177 +
178 +#KCONFIG_DIR=${GITDIR}/releases/weekly/kconfig/s390
179 +
180 +EMAIL_TO=releng@g.o,gentoo-releng-autobuilds@l.g.o
181 +EMAIL_FROM=catalyst@$(hostname)
182 +EMAIL_SUBJECT_PREPEND="[${SUBARCH}-auto]"
183 +
184 +
185 +CATALYST_CONFIG=/etc/catalyst/catalyst.conf
186 +
187 +BUILD_SRCDIR_BASE=`grep storedir= $CATALYST_CONFIG | cut -d '=' -f2 | sed -e 's/"//g'`
188 +
189 +give_latest_from_dates() {
190 + sed 's,-20,~20,g' | \
191 + sort -k +1 -n -t '~' |\
192 + awk -F\~ \
193 + 'BEGIN{i=$1; o=$0};
194 + { if($1 != i && i != "") { print o; }; i=$1; o=$0; }
195 + END { print o; };' | \
196 + tr '~' '-'
197 +}
198 +
199 +
200 +pre_build() {
201 + cd ${GITDIR}
202 + git pull
203 +
204 + # Symlink the latest stages3 to build from
205 + for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
206 + pushd $d
207 + for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
208 + of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
209 + of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
210 + ln -sf $f $of
211 + done
212 + popd
213 + done
214 +}
215 +
216 +
217 +post_build() {
218 + rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2* s390@××××××××××××××.org:
219 +}
220 --
221 1.8.4.3

Replies

Subject Author
Re: [gentoo-releng] [PATCH] add autobuild support for s390/s390x Mike Frysinger <vapier@g.o>