1 |
commit: 2779b4af6a0ea7d5dd730a0bbabd1df1744d181e |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 29 17:38:11 2019 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 29 17:39:10 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=2779b4af |
7 |
|
8 |
catalyst-auto: Update sparc64 conf based on ppc |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
tools/catalyst-auto-sparc64.conf | 91 ++++++++++++++++++---------------------- |
13 |
1 file changed, 41 insertions(+), 50 deletions(-) |
14 |
|
15 |
diff --git a/tools/catalyst-auto-sparc64.conf b/tools/catalyst-auto-sparc64.conf |
16 |
index e153871b..1b28d283 100644 |
17 |
--- a/tools/catalyst-auto-sparc64.conf |
18 |
+++ b/tools/catalyst-auto-sparc64.conf |
19 |
@@ -1,80 +1,71 @@ |
20 |
# This is the config file for the catalyst-auto script. It should be pretty |
21 |
# self-explanatory. |
22 |
|
23 |
-ARCH="sparc" |
24 |
-TYPE="auto" |
25 |
-host="$(hostname)" |
26 |
+SPECS_DIR=${REPO_DIR}/releases/weekly/specs/sparc |
27 |
|
28 |
-EMAIL_TO="bkohler@g.o" |
29 |
+SPECS="sparc/stage1.spec sparc/stage3.spec sparc64/stage1.spec sparc64/stage3.spec" |
30 |
+OPTIONAL_SPECS="sparc64/installcd-stage1.spec sparc64/installcd-stage2-minimal.spec" |
31 |
|
32 |
-source /etc/catalyst/release/build.env |
33 |
+KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/powerpc |
34 |
|
35 |
-SPECS_DIR=${REPO_DIR}/releases/weekly/specs/sparc/sparc64 |
36 |
- |
37 |
-SETS="default" |
38 |
- |
39 |
-SET_default_SPECS="stage1.spec stage2.spec stage3.spec" |
40 |
-SET_default_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec" |
41 |
- |
42 |
-#SET_multilib_SPECS="multilib/stage1.spec multilib/stage2.spec multilib/stage3.spec" |
43 |
- |
44 |
-KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc |
45 |
- |
46 |
-EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" |
47 |
+EMAIL_SUBJECT_PREPEND="[sparc-auto]" |
48 |
|
49 |
give_latest_from_dates() { |
50 |
- sed 's,-20,~20,g' | \ |
51 |
- sort -k +1 -n -t '~' | \ |
52 |
- awk -F\~ \ |
53 |
- 'BEGIN{i=$1; o=$0}; |
54 |
- { if($1 != i && i != "") { print o; }; i=$1; o=$0; } |
55 |
- END { print o; };' | \ |
56 |
- tr '~' '-' |
57 |
+ sed 's,-20,~20,g' | \ |
58 |
+ sort -k +1 -n -t '~' |\ |
59 |
+ awk -F\~ \ |
60 |
+ 'BEGIN{i=$1; o=$0}; |
61 |
+ { if($1 != i && i != "") { print o; }; i=$1; o=$0; } |
62 |
+ END { print o; };' | \ |
63 |
+ tr '~' '-' |
64 |
+} |
65 |
+ |
66 |
+# Replace the date/time stamp in the filename to "latest". |
67 |
+# Forms we handle: |
68 |
+# stage3-xxx-2018.0.tar.xz |
69 |
+# stage3-xxx-20180116.tar.xz |
70 |
+# stage3-xxx-20180116T015819Z.tar.xz |
71 |
+convert_filename() { |
72 |
+ sed -E 's:-20[0-9]+(\.[0-9]+|T[0-9]+Z)?:-latest:g' |
73 |
} |
74 |
|
75 |
update_symlinks() { |
76 |
# Symlink the latest stages3 to build from |
77 |
- for d in ${BUILD_SRCDIR_BASE}/default; do |
78 |
- pushd $d >/dev/null |
79 |
- for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do |
80 |
- # 20yymmddThhmmssZ |
81 |
- # 20yymmddhhmmss |
82 |
- # 20yymmdd |
83 |
- # 20yy.n |
84 |
- of=$(perl -p \ |
85 |
- -e 's/20\d{6}T\d{6}Z/latest/g;' \ |
86 |
- -e 's/20\d{6}\d{6}/latest/g;' \ |
87 |
- -e 's/20\d{6}/latest/g;' \ |
88 |
- -e 's/20\d{2}\.\d{2}/latest/g;' \ |
89 |
- <<<"$f") |
90 |
- ln -svf "$f" "$of" |
91 |
+ local d f |
92 |
+ for d in "${BUILD_SRCDIR_BASE}/builds/default" ; do |
93 |
+ pushd "${d}" >/dev/null |
94 |
+ for f in $(ls stage3-sparc-*xz | grep -v latest | give_latest_from_dates) ; do |
95 |
+ local of=$(echo "${f}" | convert_filename) |
96 |
+ ln -sf "${f}" "${of}" |
97 |
+ done |
98 |
+ for f in $(ls stage3-sparc64-*xz | grep -v latest | give_latest_from_dates) ; do |
99 |
+ local of=$(echo "${f}" | convert_filename) |
100 |
+ ln -sf "${f}" "${of}" |
101 |
done |
102 |
popd >/dev/null |
103 |
done |
104 |
} |
105 |
|
106 |
upload() { |
107 |
- rsync -e 'ssh -i /root/.ssh/id_rsa' \ |
108 |
- -a \ |
109 |
- --omit-dir-times \ |
110 |
- --delay-updates \ |
111 |
- "$@" \ |
112 |
- sparc@×××××××××××××××××.org: |
113 |
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" sparc@×××××××××××××××××.org: |
114 |
} |
115 |
|
116 |
post_build() { |
117 |
local set=$1 spec=$2 |
118 |
|
119 |
- pushd "${BUILD_SRCDIR_BASE}/default/" > /dev/null |
120 |
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null |
121 |
|
122 |
case ${spec} in |
123 |
- stage3.spec) |
124 |
- upload stage3-*${DATESTAMP}*${EXTENSIONS}* |
125 |
+ sparc64/installcd-stage2-minimal.spec) |
126 |
+ upload *${TIMESTAMP}*.iso* |
127 |
+ ;; |
128 |
+ sparc/stage3.spec) |
129 |
+ upload stage3-sparc-*${TIMESTAMP}*.xz* |
130 |
;; |
131 |
- installcd-stage2-minimal.spec) |
132 |
- upload *${DATESTAMP}*.iso* |
133 |
+ sparc64/stage3.spec) |
134 |
+ upload stage3-sparc64-*${TIMESTAMP}*.xz* |
135 |
;; |
136 |
esac |
137 |
|
138 |
- popd > /dev/null |
139 |
+ popd >/dev/null |
140 |
} |