1 |
commit: e7ded9f8dd423ecb57edf9cc25192cb46add05ec |
2 |
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 27 02:37:12 2015 +0000 |
4 |
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 27 02:37:12 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=e7ded9f8 |
7 |
|
8 |
Update catalyst-auto scripts for amd64 / x86 to add support for more targets and improve the detection / copy of stages. |
9 |
|
10 |
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org> |
11 |
|
12 |
tools/catalyst-auto-amd64.conf | 47 ++++++++++++++++++++++++++++-------------- |
13 |
tools/catalyst-auto-x86.conf | 28 +++++++++++++++---------- |
14 |
2 files changed, 48 insertions(+), 27 deletions(-) |
15 |
|
16 |
diff --git a/tools/catalyst-auto-amd64.conf b/tools/catalyst-auto-amd64.conf |
17 |
index 92162fa..5a4ec54 100644 |
18 |
--- a/tools/catalyst-auto-amd64.conf |
19 |
+++ b/tools/catalyst-auto-amd64.conf |
20 |
@@ -10,19 +10,28 @@ source /etc/catalyst/release/build.env |
21 |
SPECS_DIR=${REPO_DIR}/releases/weekly/specs/${ARCH} |
22 |
|
23 |
#SETS="multilib nomultilib x32 hardened_multilib hardened_nomultilib hardened_multilib_selinux hardened_nomultilib_selinux" |
24 |
-SETS="multilib nomultilib x32 hardened_multilib hardened_nomultilib" |
25 |
+SETS=" |
26 |
+ multilib cloud_multilib |
27 |
+ nomultilib cloud_nomultilib |
28 |
+ x32 |
29 |
+ hardened_multilib cloud_hardened_multilib |
30 |
+ hardened_nomultilib cloud_hardened_nomultilib |
31 |
+" |
32 |
+# hardened_multilib_selinux hardened_nomultilib_selinux |
33 |
|
34 |
SET_multilib_SPECS="stage1.spec stage2.spec stage3.spec" |
35 |
-SET_multilib_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec stage4-cloud.spec" |
36 |
+SET_multilib_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec" |
37 |
+SET_cloud_multilib_SPECS="stage4-cloud.spec" |
38 |
SET_nomultilib_SPECS="stage1-nomultilib.spec stage2-nomultilib.spec stage3-nomultilib.spec" |
39 |
-SET_nomultilib_OPTIONAL_SPECS="stage4-nomultilib-cloud.spec" |
40 |
+SET_cloud_nomultilib_SPECS="stage4-nomultilib-cloud.spec" |
41 |
|
42 |
SET_x32_SPECS="stage1-x32.spec stage2-x32.spec stage3-x32.spec" |
43 |
|
44 |
SET_hardened_multilib_SPECS="hardened/stage1.spec hardened/stage2.spec hardened/stage3.spec" |
45 |
-SET_hardened_multilib_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec hardened/stage4-cloud.spec" |
46 |
+SET_hardened_multilib_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec" |
47 |
+SET_cloud_hardened_multilib_SPECS="hardened/stage4-cloud.spec" |
48 |
SET_hardened_nomultilib_SPECS="hardened/stage1-nomultilib.spec hardened/stage2-nomultilib.spec hardened/stage3-nomultilib.spec" |
49 |
-SET_hardened_nomultilib_SPECS="hardened/stage4-nomultilib-cloud.spec" |
50 |
+SET_cloud_hardened_nomultilib_SPECS="hardened/stage4-nomultilib-cloud.spec" |
51 |
|
52 |
SET_hardened_multilib_selinux_SPECS="hardened/stage1-selinux.spec hardened/stage2-selinux.spec hardened/stage3-selinux.spec" |
53 |
SET_hardened_multilib_selinux_OPTIONAL_SPECS="hardened/admincd-stage1-selinux.spec hardened/admincd-stage2-selinux.spec" |
54 |
@@ -30,6 +39,8 @@ SET_hardened_nomultilib_selinux_SPECS="hardened/stage1-selinux-nomultilib.spec h |
55 |
|
56 |
KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/${ARCH} |
57 |
|
58 |
+EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" |
59 |
+ |
60 |
give_latest_from_dates() { |
61 |
sed 's,-20,~20,g' | \ |
62 |
sort -k +1 -n -t '~' |\ |
63 |
@@ -48,7 +59,7 @@ pre_build() { |
64 |
# Symlink the latest stages3 to build from |
65 |
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do |
66 |
pushd $d |
67 |
- for f in $(ls stage3*bz2 | grep -v latest | give_latest_from_dates ) ; do |
68 |
+ for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do |
69 |
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff |
70 |
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff |
71 |
ln -sf $f $of |
72 |
@@ -59,22 +70,26 @@ pre_build() { |
73 |
|
74 |
post_build() { |
75 |
pushd ${BUILD_SRCDIR_BASE}/default |
76 |
- if [ -f stage3-amd64-${DATESTAMP}.tar.bz2 -o -f stage3-amd64-nomultilib-${DATESTAMP}.tar.bz2 ]; then |
77 |
- mkdir -p ${BUILD_DESTDIR_BASE} |
78 |
- cp stage3-*${DATESTAMP}*.bz2* ${BUILD_DESTDIR_BASE} |
79 |
- if [ -f *${DATESTAMP}*.iso ]; then |
80 |
- cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE} |
81 |
+ mkdir -p ${BUILD_DESTDIR_BASE} |
82 |
+ for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do |
83 |
+ if [ -f $file ]; then |
84 |
+ cp $file* ${BUILD_DESTDIR_BASE} |
85 |
fi |
86 |
+ done |
87 |
+ if [ -f *${DATESTAMP}*.iso ]; then |
88 |
+ cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE} |
89 |
fi |
90 |
popd |
91 |
|
92 |
pushd ${BUILD_SRCDIR_BASE}/hardened |
93 |
- if [ -f stage3-amd64-hardened-${DATESTAMP}.tar.bz2 -o -f stage3-amd64-hardened+nomultilib-${DATESTAMP}.tar.bz2 ]; then |
94 |
- mkdir -p ${BUILD_DESTDIR_BASE}/hardened |
95 |
- cp stage3-*${DATESTAMP}*.bz2* ${BUILD_DESTDIR_BASE}/hardened |
96 |
- if [ -f *${DATESTAMP}*.iso ]; then |
97 |
- cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/hardened |
98 |
+ mkdir -p ${BUILD_DESTDIR_BASE}/hardened |
99 |
+ for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do |
100 |
+ if [ -f $file ]; then |
101 |
+ cp $file* ${BUILD_DESTDIR_BASE}/hardened |
102 |
fi |
103 |
+ done |
104 |
+ if [ -f *${DATESTAMP}*.iso ]; then |
105 |
+ cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/hardened |
106 |
fi |
107 |
} |
108 |
|
109 |
|
110 |
diff --git a/tools/catalyst-auto-x86.conf b/tools/catalyst-auto-x86.conf |
111 |
index 7bde015..9b60c81 100644 |
112 |
--- a/tools/catalyst-auto-x86.conf |
113 |
+++ b/tools/catalyst-auto-x86.conf |
114 |
@@ -20,6 +20,8 @@ SET_hardened_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage |
115 |
|
116 |
KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/${ARCH} |
117 |
|
118 |
+EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" |
119 |
+ |
120 |
give_latest_from_dates() { |
121 |
sed 's,-20,~20,g' | \ |
122 |
sort -k +1 -n -t '~' |\ |
123 |
@@ -38,7 +40,7 @@ pre_build() { |
124 |
# Symlink the latest stages3 to build from |
125 |
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do |
126 |
pushd $d |
127 |
- for f in $(ls stage3*bz2 | grep -v latest | give_latest_from_dates ) ; do |
128 |
+ for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do |
129 |
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff |
130 |
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff |
131 |
ln -sf $f $of |
132 |
@@ -49,22 +51,26 @@ pre_build() { |
133 |
|
134 |
post_build() { |
135 |
pushd ${BUILD_SRCDIR_BASE}/default |
136 |
- if [ -f stage3-i486-*${DATESTAMP}*.bz2 -o -f stage3-i686-*${DATESTAMP}*.bz2 ]; then |
137 |
- mkdir -p ${BUILD_DESTDIR_BASE} |
138 |
- cp stage3-i[46]86-*${DATESTAMP}*.bz2* ${BUILD_DESTDIR_BASE} |
139 |
- if [ -f *${DATESTAMP}*.iso ]; then |
140 |
- cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE} |
141 |
+ mkdir -p ${BUILD_DESTDIR_BASE} |
142 |
+ for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do |
143 |
+ if [ -f $file ]; then |
144 |
+ cp $file* ${BUILD_DESTDIR_BASE} |
145 |
fi |
146 |
+ done |
147 |
+ if [ -f *${DATESTAMP}*.iso ]; then |
148 |
+ cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE} |
149 |
fi |
150 |
popd |
151 |
|
152 |
pushd ${BUILD_SRCDIR_BASE}/hardened |
153 |
- if [ -f stage3-i686-*${DATESTAMP}*.bz2 ]; then |
154 |
- mkdir -p ${BUILD_DESTDIR_BASE}/hardened |
155 |
- cp stage3-i686-*${DATESTAMP}*.bz2* ${BUILD_DESTDIR_BASE}/hardened |
156 |
- if [ -f *${DATESTAMP}*.iso ]; then |
157 |
- cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/hardened |
158 |
+ mkdir -p ${BUILD_DESTDIR_BASE}/hardened |
159 |
+ for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} ); do |
160 |
+ if [ -f $file ]; then |
161 |
+ cp $file* ${BUILD_DESTDIR_BASE}/hardened |
162 |
fi |
163 |
+ done |
164 |
+ if [ -f *${DATESTAMP}*.iso ]; then |
165 |
+ cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/hardened |
166 |
fi |
167 |
} |