]>
Commit | Line | Data |
---|---|---|
40303baa JR |
1 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/Makefile.am util-vserver-0.30.216-pre3126/distrib/Makefile.am |
2 | --- util-vserver-0.30.216-pre3126.org/distrib/Makefile.am 2016-02-24 19:09:17.000000000 +0100 | |
3 | +++ util-vserver-0.30.216-pre3126/distrib/Makefile.am 2021-03-12 21:50:25.804347699 +0100 | |
4 | @@ -45,6 +45,7 @@ nobase_distrib_DATA = defaults/devs \ | |
61c3106d ER |
5 | defaults/apt.conf \ |
6 | defaults/rpm/macros \ | |
7 | defaults/apt/apt.conf \ | |
8 | + defaults/poldek/poldek.conf \ | |
9 | template/initpost template/initpre \ | |
10 | rh9/apt/rpmpriorities rh9/pkgs/01 rh9/pkgs/02 \ | |
11 | fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ | |
40303baa | 12 | @@ -96,7 +97,9 @@ nobase_distrib_DATA = defaults/devs \ |
f7d49881 AM |
13 | suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ |
14 | suse91/rpm/macros \ | |
15 | gentoo/init-vserver.sh gentoo/net.vserver \ | |
16 | - gentoo/reboot.sh gentoo/shutdown.sh | |
b7bfbdc3 | 17 | + gentoo/reboot.sh gentoo/shutdown.sh\ |
8407cd57 ER |
18 | + pld-ac/pkgs/01 pld-ac/rpm/macros pld-ac/rpm/macros.lang \ |
19 | + pld-th/pkgs/01 pld-th/rpm/macros pld-th/rpm/macros.lang | |
e7229914 JR |
20 | |
21 | nobase_confdistrib_DATA = rh9/apt/sources.list \ | |
22 | fc1/apt/sources.list \ | |
40303baa | 23 | @@ -106,7 +109,9 @@ nobase_confdistrib_DATA = rh9/apt/sourc |
fe9ea50c | 24 | fc5/apt/sources.list \ |
25 | fc6/apt/sources.list \ | |
67457f13 | 26 | f7/apt/sources.list \ |
4fadbbef JR |
27 | - suse91/apt/sources.list |
28 | + suse91/apt/sources.list \ | |
61c3106d | 29 | + pld-ac/poldek/repos.d/pld.conf \ |
1e07a54b | 30 | + pld-th/poldek/repos.d/pld.conf |
4fadbbef JR |
31 | |
32 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \ | |
33 | = $(nobase_distrib_SCRIPTS) | |
40303baa JR |
34 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/defaults/poldek/poldek.conf util-vserver-0.30.216-pre3126/distrib/defaults/poldek/poldek.conf |
35 | --- util-vserver-0.30.216-pre3126.org/distrib/defaults/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100 | |
36 | +++ util-vserver-0.30.216-pre3126/distrib/defaults/poldek/poldek.conf 2021-03-12 21:50:25.804347699 +0100 | |
37 | @@ -0,0 +1,11 @@ | |
38 | +# poldek configuration file. | |
39 | + | |
40 | +%includedir repos.d | |
41 | + | |
42 | +[global] | |
43 | +particle install = no | |
44 | +choose equivalents manually = yes | |
45 | +unique package names = yes | |
46 | + | |
47 | +#hold = | |
48 | +ignore = kernel* udev devfs | |
49 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/pkgs/01 util-vserver-0.30.216-pre3126/distrib/pld-ac/pkgs/01 | |
50 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100 | |
51 | +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/pkgs/01 2021-03-12 21:50:25.804347699 +0100 | |
9a398558 | 52 | @@ -0,0 +1,6 @@ |
452506e7 | 53 | +basesystem |
9a398558 ER |
54 | +filesystem |
55 | +glibc-misc | |
4e5a2018 | 56 | +issue |
f5f1d176 | 57 | +rpm-base |
34158836 | 58 | +vserver-packages |
40303baa JR |
59 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/poldek/repos.d/pld.conf util-vserver-0.30.216-pre3126/distrib/pld-ac/poldek/repos.d/pld.conf |
60 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100 | |
61 | +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/poldek/repos.d/pld.conf 2021-03-12 21:50:25.804347699 +0100 | |
cfe366e0 | 62 | @@ -0,0 +1,64 @@ |
4fadbbef | 63 | +# $Id$ |
f0b1d0c6 | 64 | +# PLD Linux Distribution <http://www.pld-linux.org/>. |
cfe366e0 ER |
65 | +# |
66 | +# Main sources for PLD Linux 2.0 (Ac) | |
4fadbbef | 67 | + |
f0b1d0c6 | 68 | +# specify our packages architecture |
4fc43fd1 | 69 | +_arch = %ARCH% |
f0b1d0c6 ER |
70 | + |
71 | +# main PLD-site for often changed things: | |
72 | +_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac | |
73 | + | |
4fadbbef JR |
74 | +## Some mirrors |
75 | +## You can use them if you have better connection there | |
76 | +# CI TASK: | |
4fc43fd1 | 77 | +#_prefix = ftp://ftp.task.pld-linux.org/dists/ac |
4fc43fd1 | 78 | +_prefix = %{_pld_main_prefix} |
4fadbbef | 79 | + |
4fc43fd1 | 80 | +_type = pndir |
4fadbbef | 81 | + |
cfe366e0 | 82 | +# PLD Linux 2.0 (Ac) |
4fadbbef | 83 | +[source] |
4fc43fd1 | 84 | +type = %{_type} |
cfe366e0 | 85 | +name = ac-main |
4fc43fd1 | 86 | +path = %{_prefix}/PLD/%{_arch}/PLD/RPMS/ |
f0b1d0c6 | 87 | +signed = yes |
f0b1d0c6 | 88 | +pri = 1 |
cfe366e0 ER |
89 | +# msmtp-sendmail is broken, yum noarch is older than in updates |
90 | +ignore = msmtp-sendmail* yum* | |
4fadbbef JR |
91 | + |
92 | +[source] | |
4fc43fd1 | 93 | +type = %{_type} |
f0b1d0c6 | 94 | +name = ac-updates |
4fc43fd1 | 95 | +path = %{_prefix}/updates/%{_arch}/ |
f0b1d0c6 ER |
96 | +signed = yes |
97 | +pri = 1 | |
4fadbbef JR |
98 | + |
99 | +[source] | |
4fc43fd1 | 100 | +type = %{_type} |
f0b1d0c6 | 101 | +name = ac-supported |
4fc43fd1 | 102 | +path = %{_prefix}/supported/%{_arch}/ |
cfe366e0 | 103 | +signed = yes |
f0b1d0c6 ER |
104 | +auto = no |
105 | +autoup = no | |
4fadbbef JR |
106 | + |
107 | +[source] | |
4fc43fd1 | 108 | +type = %{_type} |
f0b1d0c6 | 109 | +name = ac-ready |
4fc43fd1 | 110 | +path = %{_pld_main_prefix}/ready/%{_arch}/ |
cfe366e0 | 111 | +#signed = yes |
f0b1d0c6 ER |
112 | +auto = no |
113 | +autoup = no | |
4fadbbef JR |
114 | + |
115 | +[source] | |
4fc43fd1 | 116 | +type = %{_type} |
f0b1d0c6 | 117 | +name = ac-test |
4fc43fd1 | 118 | +path = %{_pld_main_prefix}/test/%{_arch}/ |
f0b1d0c6 ER |
119 | +auto = no |
120 | +autoup = no | |
cfe366e0 ER |
121 | + |
122 | +# ac-main + ac-updates | |
123 | +[source] | |
124 | +type = group | |
125 | +name = ac | |
126 | +sources = ac-main ac-updates | |
40303baa JR |
127 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros |
128 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100 | |
129 | +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros 2021-03-12 21:50:25.804347699 +0100 | |
8407cd57 | 130 | @@ -0,0 +1,3 @@ |
273c55b8 | 131 | +%_netsharedpath /dev:/proc |
d3569d8d | 132 | +%_tmppath /tmp |
7ca29501 | 133 | +%_host_os %_os |
40303baa JR |
134 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros.lang util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros.lang |
135 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros.lang 1970-01-01 01:00:00.000000000 +0100 | |
136 | +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros.lang 2021-03-12 21:50:25.804347699 +0100 | |
8407cd57 ER |
137 | @@ -0,0 +1,3 @@ |
138 | +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725 | |
139 | +# you have to use at least one language beside 'C' | |
140 | +%_install_langs C:en:pl | |
40303baa JR |
141 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/pkgs/01 util-vserver-0.30.216-pre3126/distrib/pld-th/pkgs/01 |
142 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/pkgs/01 1970-01-01 01:00:00.000000000 +0100 | |
143 | +++ util-vserver-0.30.216-pre3126/distrib/pld-th/pkgs/01 2021-03-12 21:50:25.804347699 +0100 | |
9a398558 | 144 | @@ -0,0 +1,6 @@ |
909684f7 | 145 | +basesystem |
9a398558 | 146 | +filesystem |
703ed2bb | 147 | +glibc |
909684f7 AM |
148 | +issue |
149 | +rpm-base | |
150 | +vserver-packages | |
40303baa JR |
151 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/poldek/repos.d/pld.conf util-vserver-0.30.216-pre3126/distrib/pld-th/poldek/repos.d/pld.conf |
152 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100 | |
153 | +++ util-vserver-0.30.216-pre3126/distrib/pld-th/poldek/repos.d/pld.conf 2021-03-12 21:50:25.804347699 +0100 | |
08411a3e | 154 | @@ -0,0 +1,71 @@ |
f97a9ff7 | 155 | +# PLD Linux Distribution <http://www.pld-linux.org/>. |
08411a3e ER |
156 | +# |
157 | +# Main sources for PLD Linux 3.0 (Th) | |
909684f7 | 158 | + |
08411a3e | 159 | +# specify our packages architecture |
4fc43fd1 | 160 | +_arch = %ARCH% |
08411a3e ER |
161 | + |
162 | +# main PLD-site for often changed things (test, ready): | |
163 | +_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th | |
164 | + | |
909684f7 AM |
165 | +## Some mirrors |
166 | +## You can use them if you have better connection there | |
167 | +# CI TASK: | |
4fc43fd1 | 168 | +#_prefix = ftp://ftp.task.pld-linux.org/dists/th |
08411a3e | 169 | +_prefix = %{_pld_main_prefix} |
909684f7 | 170 | + |
08411a3e | 171 | +# PLD Linux 3.0 (Th): main sources |
909684f7 | 172 | +[source] |
08411a3e | 173 | +type = pndir |
f97a9ff7 ER |
174 | +name = th |
175 | +path = %{_prefix}/PLD/%{_arch}/RPMS/ | |
909684f7 AM |
176 | + |
177 | +[source] | |
08411a3e | 178 | +type = pndir |
f97a9ff7 ER |
179 | +name = th |
180 | +path = %{_prefix}/PLD/noarch/RPMS/ | |
909684f7 | 181 | + |
08411a3e ER |
182 | +# PLD Linux 3.0 (Th): obsolete sources (kde3, ...) |
183 | +[source] | |
184 | +type = pndir | |
185 | +name = th-obsolete | |
186 | +path = %{_prefix}/obsolete/%{_arch}/RPMS/ | |
187 | +auto = no | |
188 | +autoup = no | |
f97a9ff7 | 189 | + |
08411a3e ER |
190 | +[source] |
191 | +type = pndir | |
192 | +name = th-obsolete | |
193 | +path = %{_prefix}/obsolete/noarch/RPMS/ | |
194 | +auto = no | |
195 | +autoup = no | |
909684f7 | 196 | + |
08411a3e | 197 | +# PLD Linux 3.0 (Th): ready sources (testing stage before moved to main) |
909684f7 | 198 | +[source] |
08411a3e | 199 | +type = pndir |
f97a9ff7 | 200 | +name = th-ready |
08411a3e | 201 | +path = %{_pld_main_prefix}/ready/%{_arch}/RPMS/ |
f97a9ff7 ER |
202 | +auto = no |
203 | +autoup = no | |
909684f7 | 204 | + |
f97a9ff7 | 205 | +[source] |
08411a3e | 206 | +type = pndir |
f97a9ff7 | 207 | +name = th-ready |
08411a3e | 208 | +path = %{_pld_main_prefix}/ready/noarch/RPMS/ |
f97a9ff7 ER |
209 | +auto = no |
210 | +autoup = no | |
909684f7 | 211 | + |
08411a3e | 212 | +# PLD Linux 3.0 (Th): test sources (built packages to be moved to ready) |
909684f7 | 213 | +[source] |
08411a3e | 214 | +type = pndir |
f97a9ff7 | 215 | +name = th-test |
08411a3e | 216 | +path = %{_pld_main_prefix}/test/%{_arch}/RPMS/ |
f97a9ff7 ER |
217 | +auto = no |
218 | +autoup = no | |
909684f7 AM |
219 | + |
220 | +[source] | |
08411a3e | 221 | +type = pndir |
f97a9ff7 | 222 | +name = th-test |
08411a3e | 223 | +path = %{_pld_main_prefix}/test/noarch/RPMS/ |
f97a9ff7 ER |
224 | +auto = no |
225 | +autoup = no | |
40303baa JR |
226 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros |
227 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100 | |
228 | +++ util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros 2021-03-12 21:50:25.804347699 +0100 | |
8407cd57 | 229 | @@ -0,0 +1,3 @@ |
273c55b8 | 230 | +%_netsharedpath /dev:/proc |
d3569d8d | 231 | +%_tmppath /tmp |
7ca29501 | 232 | +%_host_os %_os |
40303baa JR |
233 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros.lang util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros.lang |
234 | --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros.lang 1970-01-01 01:00:00.000000000 +0100 | |
235 | +++ util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros.lang 2021-03-12 21:50:25.804347699 +0100 | |
8407cd57 ER |
236 | @@ -0,0 +1,3 @@ |
237 | +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725 | |
238 | +# you have to use at least one language beside 'C' | |
239 | +%_install_langs C:en:pl | |
40303baa JR |
240 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/Makefile-files util-vserver-0.30.216-pre3126/scripts/Makefile-files |
241 | --- util-vserver-0.30.216-pre3126.org/scripts/Makefile-files 2016-02-24 19:09:17.000000000 +0100 | |
242 | +++ util-vserver-0.30.216-pre3126/scripts/Makefile-files 2021-03-12 21:50:25.804347699 +0100 | |
243 | @@ -21,6 +21,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ | |
244 | scripts/vapt-get-worker \ | |
245 | scripts/vrpm-worker \ | |
246 | scripts/vyum-worker \ | |
247 | + scripts/vpoldek-worker \ | |
248 | scripts/vrpm-preload \ | |
249 | scripts/vurpm-worker \ | |
250 | scripts/save_s_context \ | |
251 | @@ -50,12 +51,14 @@ scripts_pkglib_src_DTA = scripts/functio | |
252 | scripts/vserver-build.template \ | |
253 | scripts/vserver-build.rsync \ | |
254 | scripts/vserver-build.clone \ | |
255 | + scripts/vserver-build.poldek \ | |
256 | scripts/vserver-build.functions \ | |
257 | scripts/vserver-build.functions.apt \ | |
258 | scripts/vserver-build.functions.pkgmgmt \ | |
259 | scripts/vserver-build.functions.rpm \ | |
260 | scripts/vserver-build.functions.urpmi \ | |
261 | scripts/vserver-build.functions.yum \ | |
262 | + scripts/vserver-build.functions.poldek \ | |
263 | scripts/vserver-setup.functions \ | |
264 | scripts/vserver.functions \ | |
265 | scripts/vserver.start \ | |
266 | @@ -71,6 +74,7 @@ scripts_pkglib_gen_SCRPTS = scripts/vshe | |
267 | scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ | |
268 | scripts/vapt-get-worker \ | |
269 | scripts/vpkg \ | |
270 | + scripts/vpoldek-worker \ | |
271 | scripts/vrpm-worker \ | |
272 | scripts/vrpm-preload \ | |
273 | scripts/start-vservers \ | |
274 | @@ -94,6 +98,7 @@ scripts_legacy_src_PRGS = scripts/legacy | |
275 | scripts_sbin_src_PRGS = scripts/chbind \ | |
276 | scripts/chcontext \ | |
277 | scripts/vapt-get \ | |
278 | + scripts/vpoldek \ | |
279 | scripts/vdispatch-conf \ | |
280 | scripts/vemerge \ | |
281 | scripts/vesync \ | |
282 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/functions util-vserver-0.30.216-pre3126/scripts/functions | |
283 | --- util-vserver-0.30.216-pre3126.org/scripts/functions 2016-02-24 19:09:17.000000000 +0100 | |
284 | +++ util-vserver-0.30.216-pre3126/scripts/functions 2021-03-12 21:50:25.804347699 +0100 | |
285 | @@ -411,6 +411,20 @@ function _pkgSetVarsUrpmi | |
4fadbbef JR |
286 | fi |
287 | } | |
288 | ||
289 | +function _pkgSetVarsPoldek | |
290 | +{ | |
291 | + if test -n "$PKGDIR"; then | |
292 | + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek | |
293 | + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache | |
294 | + else | |
295 | + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek | |
296 | + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache | |
297 | + fi | |
298 | + | |
299 | + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf "" | |
300 | + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG | |
301 | +} | |
302 | + | |
303 | ||
304 | function _pkgMountBase | |
305 | { | |
40303baa | 306 | @@ -495,6 +509,7 @@ function pkgInit |
4fadbbef JR |
307 | apt) _pkgSetVarsApt;; |
308 | yum) _pkgSetVarsYum;; | |
e014ae5d | 309 | urpmi) _pkgSetVarsUrpmi;; |
4fadbbef JR |
310 | + poldek) _pkgSetVarsPoldek;; |
311 | *) echo "Unknown packaging flavor" >&2; exit 1;; | |
312 | esac | |
313 | done | |
40303baa | 314 | @@ -869,6 +884,8 @@ function pkgmgmt.guessStyle() |
4e5a2018 JR |
315 | style=redhat |
316 | elif test -e "$_pgs_vdir"/etc/mandrake-release; then | |
317 | style=mandrake | |
318 | + elif test -e "$_pgs_vdir"/etc/pld-release; then | |
319 | + style=pld | |
320 | elif test -e "$_pgs_vdir"/etc/debian_version; then | |
321 | style=debian | |
322 | elif test -e "$_pgs_vdir"/etc/SuSE-release; then | |
40303baa JR |
323 | @@ -957,6 +974,27 @@ function pkgmgmt.isUrpmiAvailable |
324 | test -n "$have_urpmi" && return 0 || return 1 | |
4fadbbef JR |
325 | } |
326 | ||
327 | +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>] | |
328 | +function pkgmgmt.isPoldekAvailable | |
329 | +{ | |
330 | + local cfgdir="$1" | |
331 | + local vdir="$2" | |
332 | + local is_internal="$3" | |
333 | + | |
334 | + local have_poldek i | |
335 | + if test -n "$is_internal"; then | |
336 | + have_poldek=1 | |
337 | + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek= | |
338 | + else | |
339 | + have_poldek= | |
340 | + for i in /bin /usr/bin /usr/local/bin; do | |
341 | + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; } | |
342 | + done | |
343 | + fi | |
344 | + | |
345 | + test -n "$have_poldek" && return 0 || return 1 | |
346 | +} | |
347 | + | |
348 | ||
349 | function vshelper.doSanityCheck | |
350 | { | |
40303baa JR |
351 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/pkgmgmt util-vserver-0.30.216-pre3126/scripts/pkgmgmt |
352 | --- util-vserver-0.30.216-pre3126.org/scripts/pkgmgmt 2016-02-24 19:09:17.000000000 +0100 | |
353 | +++ util-vserver-0.30.216-pre3126/scripts/pkgmgmt 2021-03-12 21:50:25.804347699 +0100 | |
354 | @@ -195,7 +195,7 @@ packagemanagement: | |
4fadbbef JR |
355 | " |
356 | ||
357 | case $2 in | |
e014ae5d AM |
358 | - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}") |
359 | + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi poldek "${YUM_RELEASEPKGS[@]}") | |
4fadbbef JR |
360 | hasSubstring "$pkgs" ---rpm--- || { |
361 | warning "$ERR | |
362 | * The vserver does not seem to have the 'rpm' package which is required | |
40303baa | 363 | @@ -205,9 +205,9 @@ packagemanagement: |
4fadbbef JR |
364 | ERR= |
365 | } | |
366 | ||
e014ae5d AM |
367 | - hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- || { |
368 | + hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- ---poldek--- || { | |
4fadbbef JR |
369 | warning "$ERR |
370 | -* The vserver does not seem to have a depsolver like 'apt' or 'yum' | |
371 | +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek' | |
372 | installed. It is suggested to install such a program before setting | |
373 | up internal package management." | |
374 | res=1 | |
40303baa | 375 | @@ -381,6 +381,131 @@ Can not continue; use '--force' to overr |
4fadbbef JR |
376 | fi |
377 | } | |
378 | ||
379 | +function processVserver_PLD() | |
380 | +{ | |
381 | + local vserver=$1 | |
382 | + local is_internalize=$2 | |
383 | + local cfgdir | |
384 | + local i | |
385 | + | |
386 | + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \ | |
387 | + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt | |
388 | + | |
389 | + ## Figure out the environment.... | |
390 | + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek= | |
391 | + | |
392 | + local POLDEKETCDIR= | |
393 | + local POLDEKCACHEDIR= | |
394 | + local RPMETCDIR= | |
395 | + local RPMSTATEDIR= | |
396 | + | |
397 | + ## Create directories and assign variables where configuration | |
398 | + ## can/will be found on the host | |
399 | + if test -n "$is_internalize"; then | |
400 | + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" || | |
401 | + panic " | |
402 | +Can not continue; use '--force' to override this check" | |
403 | + | |
404 | + pushd "$vdir" >/dev/null | |
405 | + | |
406 | + test ! -L var/lib/rpm || { | |
407 | + $_EXEC_CD /var/lib $_RM rpm && | |
408 | + $_EXEC_CD /var/lib $_MKDIR -m755 rpm && | |
409 | + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm || | |
410 | + : | |
411 | + } </dev/null 2>/dev/null | |
412 | + | |
413 | + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do | |
414 | + test -d "$i" || | |
415 | + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || : | |
416 | + done #2>/dev/null | |
417 | + | |
418 | + popd >/dev/null | |
419 | + | |
420 | + if test -n "$have_poldek"; then | |
421 | + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek | |
422 | + fi | |
423 | + | |
424 | + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm / | |
425 | + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state | |
426 | + else | |
427 | + mkdir -m755 -p "$cfgdir" | |
428 | + local need_base= | |
429 | + | |
430 | + if test -n "$have_poldek"; then | |
431 | + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc / | |
432 | + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache / | |
433 | + | |
434 | + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc | |
435 | + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache | |
436 | + | |
437 | + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1 | |
438 | + fi | |
439 | + | |
440 | + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc / | |
441 | + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state / | |
442 | + | |
443 | + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc | |
444 | + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state | |
445 | + | |
446 | + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1 | |
447 | + test ! -e "$cfgdir"/base || need_base= | |
448 | + | |
449 | + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base | |
450 | + | |
451 | + mkdir -m755 -p "$PKGCFGDIR" | |
452 | + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \ | |
453 | + "$RPMETCDIR" "$RPMSTATEDIR" | |
454 | + fi | |
455 | + | |
456 | + ## Copy the files... | |
457 | + if test -n "$is_internalize"; then | |
458 | + if test -n "$have_poldek"; then | |
459 | + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek | |
460 | + pushd "$vdir" >/dev/null | |
461 | + _hashAuto /etc/poldek.conf '/' | |
462 | + popd >/dev/null | |
463 | + fi | |
464 | + | |
465 | + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm | |
466 | + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm | |
467 | + | |
468 | + pushd "$vdir" >/dev/null | |
469 | + ## remove %_dbpath settings | |
470 | + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D' | |
471 | + popd >/dev/null | |
472 | + else | |
473 | + if test -n "$have_poldek"; then | |
474 | + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR" | |
475 | + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/' | |
476 | + fi | |
477 | + | |
478 | + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR" | |
479 | + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR" | |
480 | + | |
481 | + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros | |
482 | + fi | |
483 | + | |
484 | + ## Cleanups... | |
485 | + if test -n "$is_internalize"; then | |
486 | + : | |
487 | + else | |
8d5b8ef9 | 488 | + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX) |
4fadbbef JR |
489 | + trap "$_RM -rf $tmpdir" EXIT |
490 | + pushd "$vdir" >/dev/null | |
491 | + $_EXEC_CD /var/lib $_MV rpm $tmpdir/ | |
492 | + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm | |
493 | + $_RM -rf $tmpdir | |
494 | + fi | |
495 | + | |
496 | + ## Finish it... | |
497 | + if test -n "$is_internalize"; then | |
498 | + $_TOUCH "$cfgdir"/internal | |
499 | + else | |
500 | + $_RM -f "$cfgdir"/internal | |
501 | + fi | |
502 | +} | |
503 | + | |
504 | function processVserver_Debian() | |
505 | { | |
506 | local vserver=$1 | |
40303baa | 507 | @@ -435,6 +560,7 @@ function processVserver() |
4fadbbef JR |
508 | |
509 | case "$style" in | |
510 | (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";; | |
511 | + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";; | |
512 | (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";; | |
513 | (*) | |
514 | echo $"Vserver style '$style' is not supported for packagemanagment" >&2 | |
40303baa JR |
515 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/util-vserver-vars.pathsubst util-vserver-0.30.216-pre3126/scripts/util-vserver-vars.pathsubst |
516 | --- util-vserver-0.30.216-pre3126.org/scripts/util-vserver-vars.pathsubst 2016-02-24 19:09:17.000000000 +0100 | |
517 | +++ util-vserver-0.30.216-pre3126/scripts/util-vserver-vars.pathsubst 2021-03-12 21:50:25.807681091 +0100 | |
518 | @@ -58,6 +58,7 @@ _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKG | |
1f4eb45e AM |
519 | _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGDATADIR/vserver-build.functions.yum" |
520 | _LIB_VSERVER_BUILD_FUNCTIONS_URPMI="$__PKGDATADIR/vserver-build.functions.urpmi" | |
521 | _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGDATADIR/vserver-build.functions.pkgmgmt" | |
522 | +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGDATADIR/vserver-build.functions.poldek" | |
4fadbbef | 523 | _LISTDEVIP="$__LEGACYDIR/listdevip" |
1f4eb45e AM |
524 | _LOCKFILE="$__PKGLIBEXECDIR/lockfile" |
525 | _MASK2PREFIX="$__PKGLIBEXECDIR/mask2prefix" | |
40303baa | 526 | @@ -116,6 +117,8 @@ _VURPM="$__SBINDIR/vurpm" |
1f4eb45e | 527 | _VURPM_WORKER="$__PKGLIBEXECDIR/vurpm-worker" |
4fadbbef | 528 | _VYUM="$__SBINDIR/vyum" |
1f4eb45e | 529 | _VYUM_WORKER="$__PKGLIBEXECDIR/vyum-worker" |
4fadbbef | 530 | +_VPOLDEK="$__SBINDIR/vpoldek" |
1f4eb45e | 531 | +_VPOLDEK_WORKER="$__PKGLIBEXECDIR/vpoldek-worker" |
4fadbbef JR |
532 | |
533 | _AWK="@AWK@" | |
fe9ea50c | 534 | _BZIP2="@BZIP2@" |
40303baa JR |
535 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpkg util-vserver-0.30.216-pre3126/scripts/vpkg |
536 | --- util-vserver-0.30.216-pre3126.org/scripts/vpkg 2016-02-24 19:09:17.000000000 +0100 | |
537 | +++ util-vserver-0.30.216-pre3126/scripts/vpkg 2021-03-12 21:50:25.807681091 +0100 | |
538 | @@ -115,6 +115,44 @@ case "$style" in | |
4e5a2018 JR |
539 | fi |
540 | fi | |
541 | ;; | |
542 | + (pld) | |
543 | + rpm_param= | |
544 | + poldek_param= | |
545 | + case "$tag" in | |
546 | + ## rpm outputs sometimes '(contains no files)', so return | |
547 | + ## only the valid output | |
548 | + (get-conffiles) | |
549 | + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );; | |
550 | + (install) | |
551 | + rpm_param=( -Uvh "$@" ) | |
552 | + poldek_param=( --install -v "$@" ) | |
553 | + ;; | |
554 | + esac | |
555 | + | |
556 | + if test -n "$is_external"; then | |
557 | + have_poldek=1 | |
558 | + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek= | |
559 | + else | |
560 | + have_poldek= | |
561 | + for i in /bin /usr/bin /usr/local/bin; do | |
562 | + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; } | |
563 | + done | |
564 | + fi | |
565 | + | |
566 | + if test -n "$is_external"; then | |
567 | + if test "$have_poldek" -a "$poldek_param"; then | |
568 | + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" ) | |
569 | + else | |
570 | + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" ) | |
571 | + fi | |
572 | + else | |
573 | + if test "$have_poldek" -a "$poldek_param"; then | |
574 | + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" ) | |
575 | + else | |
576 | + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" ) | |
577 | + fi | |
578 | + fi | |
579 | + ;; | |
580 | (debian) | |
581 | case "$tag" in | |
582 | (get-conffiles) | |
40303baa JR |
583 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpoldek util-vserver-0.30.216-pre3126/scripts/vpoldek |
584 | --- util-vserver-0.30.216-pre3126.org/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100 | |
585 | +++ util-vserver-0.30.216-pre3126/scripts/vpoldek 2021-03-12 21:50:25.807681091 +0100 | |
521e98dd | 586 | @@ -0,0 +1,74 @@ |
4fadbbef JR |
587 | +#! /bin/bash |
588 | +# $Id$ | |
589 | + | |
521e98dd | 590 | +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> |
4fadbbef JR |
591 | +# |
592 | +# This program is free software; you can redistribute it and/or modify | |
593 | +# it under the terms of the GNU General Public License as published by | |
594 | +# the Free Software Foundation; version 2 of the License. | |
595 | +# | |
596 | +# This program is distributed in the hope that it will be useful, | |
597 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
598 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
599 | +# GNU General Public License for more details. | |
600 | +# | |
601 | +# You should have received a copy of the GNU General Public License | |
602 | +# along with this program; if not, write to the Free Software | |
603 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
604 | + | |
99e1c7ab | 605 | +: ${UTIL_VSERVER_VARS:=/usr/share/util-vserver/util-vserver-vars} |
4fadbbef JR |
606 | +test -e "$UTIL_VSERVER_VARS" || { |
607 | + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 | |
608 | + exit 1 | |
609 | +} | |
610 | +. "$UTIL_VSERVER_VARS" | |
611 | +. "$_LIB_FUNCTIONS" | |
612 | + | |
613 | + | |
614 | +function showHelp() | |
615 | +{ | |
616 | + echo \ | |
617 | +$"Usage: $0 <vserver-name>* [--all] -- <params>+ | |
618 | + | |
619 | +Report bugs to <$PACKAGE_BUGREPORT>." | |
620 | + exit 0 | |
621 | +} | |
622 | + | |
623 | +function showVersion() | |
624 | +{ | |
625 | + echo \ | |
626 | +$"vpoldek $PACKAGE_VERSION -- poldek for vservers | |
627 | +This program is part of $PACKAGE_STRING | |
628 | + | |
521e98dd | 629 | +Copyright (C) 2007 Enrico Scholz |
4fadbbef JR |
630 | +This program is free software; you may redistribute it under the terms of |
631 | +the GNU General Public License. This program has absolutely no warranty." | |
632 | + exit 0 | |
633 | +} | |
634 | + | |
521e98dd AM |
635 | +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 |
636 | +eval set -- "$tmp" | |
637 | + | |
638 | +declare -a send_through poldek_opts | |
4fadbbef | 639 | + |
521e98dd | 640 | +while true; do |
4fadbbef | 641 | + case "$1" in |
521e98dd AM |
642 | + (--help) showHelp $0 ;; |
643 | + (--version) showVersion ;; | |
644 | + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; | |
645 | + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; | |
646 | + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );; | |
647 | + (--) shift; break;; | |
648 | + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;; | |
649 | + esac | |
650 | + shift | |
4fadbbef JR |
651 | +done |
652 | + | |
521e98dd AM |
653 | +VSOMETHING_TITLE=vpoldek |
654 | +VSOMETHING_WORKER=$_VPOLDEK_WORKER | |
655 | +VSOMETHING_PKGMGMT=1 | |
4fadbbef | 656 | + |
521e98dd | 657 | +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT |
4fadbbef | 658 | + |
521e98dd AM |
659 | +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- ) |
660 | +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@" | |
40303baa JR |
661 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpoldek-worker util-vserver-0.30.216-pre3126/scripts/vpoldek-worker |
662 | --- util-vserver-0.30.216-pre3126.org/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100 | |
663 | +++ util-vserver-0.30.216-pre3126/scripts/vpoldek-worker 2021-03-12 21:50:25.807681091 +0100 | |
4fadbbef JR |
664 | @@ -0,0 +1,45 @@ |
665 | +#! /bin/bash | |
666 | +# $Id$ | |
667 | + | |
668 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
669 | +# | |
670 | +# This program is free software; you can redistribute it and/or modify | |
671 | +# it under the terms of the GNU General Public License as published by | |
672 | +# the Free Software Foundation; version 2 of the License. | |
673 | +# | |
674 | +# This program is distributed in the hope that it will be useful, | |
675 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
676 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
677 | +# GNU General Public License for more details. | |
678 | +# | |
679 | +# You should have received a copy of the GNU General Public License | |
680 | +# along with this program; if not, write to the Free Software | |
681 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
682 | + | |
683 | +set -e | |
684 | + | |
99e1c7ab | 685 | +: ${UTIL_VSERVER_VARS:=/usr/share/util-vserver/util-vserver-vars} |
4fadbbef JR |
686 | +test -e "$UTIL_VSERVER_VARS" || { |
687 | + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 | |
688 | + exit 1 | |
689 | +} | |
690 | +. "$UTIL_VSERVER_VARS" | |
691 | +. "$_LIB_FUNCTIONS" | |
692 | + | |
693 | + | |
694 | +vserver="$1" | |
695 | +shift | |
696 | + | |
697 | +pkgInit "$vserver" rpm poldek | |
698 | + | |
699 | +test -z "$_POLDEK" || { | |
700 | + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of" | |
701 | + ${POLDEK:=$_POLDEK} | |
702 | +} | |
703 | + | |
704 | +exec ${_POLDEK:-poldek} \ | |
705 | + -v --root=$VDIR \ | |
706 | + --cachedir=$POLDEKCACHEDIR \ | |
707 | + --conf=$POLDEK_CONFIG \ | |
708 | + --pmcmd=$RPM_BINARY \ | |
709 | + "$@" | |
40303baa JR |
710 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build util-vserver-0.30.216-pre3126/scripts/vserver-build |
711 | --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build 2016-02-24 19:09:17.000000000 +0100 | |
712 | +++ util-vserver-0.30.216-pre3126/scripts/vserver-build 2021-03-12 21:50:25.807681091 +0100 | |
713 | @@ -60,6 +60,9 @@ Possible methods are: | |
4fadbbef JR |
714 | ... installs the base-packages of the given distribution with |
715 | help of 'vyum' | |
e014ae5d | 716 | urpmi ... -- -d <distribution> -m <mirror> |
fe9ea50c | 717 | + poldek ... -- -d <distribution> |
4fadbbef JR |
718 | + ... installs the base-packages of the given distribution with |
719 | + help of 'vpoldek' | |
fe9ea50c | 720 | rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+ |
4fadbbef | 721 | ... installs lists of rpm-packages |
fe9ea50c | 722 | skeleton ... -- [<cmd> <args>*] |
40303baa | 723 | @@ -142,7 +145,7 @@ setup_setDefaults "$VSERVER_NAME" |
4fadbbef JR |
724 | |
725 | case x"$method" in | |
726 | (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; | |
e014ae5d AM |
727 | - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi) |
728 | + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi|xpoldek) | |
1f4eb45e | 729 | . $__PKGDATADIR/vserver-build.$method |
4fadbbef JR |
730 | ;; |
731 | (x) panic $"No build-method specified";; | |
40303baa JR |
732 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions util-vserver-0.30.216-pre3126/scripts/vserver-build.functions |
733 | --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions 2016-02-24 19:09:17.000000000 +0100 | |
734 | +++ util-vserver-0.30.216-pre3126/scripts/vserver-build.functions 2021-03-12 21:50:25.807681091 +0100 | |
735 | @@ -173,6 +173,12 @@ function getDistribution | |
fe9ea50c | 736 | elif test -e /etc/slackware-version; then |
737 | set -- $(cat /etc/slackware-version) | |
4fadbbef JR |
738 | DISTRIBUTION=slackware$2 |
739 | + elif test -e /etc/pld-release; then | |
740 | + old_IFS=$IFS | |
741 | + IFS='()' | |
742 | + set -- $(cat /etc/pld-release) | |
743 | + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z) | |
744 | + IFS=$old_IFS | |
745 | elif test -n "$1"; then | |
746 | DISTRIBUTION=$1 | |
747 | else | |
40303baa JR |
748 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions.poldek util-vserver-0.30.216-pre3126/scripts/vserver-build.functions.poldek |
749 | --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100 | |
750 | +++ util-vserver-0.30.216-pre3126/scripts/vserver-build.functions.poldek 2021-03-12 21:50:25.807681091 +0100 | |
7efe1432 | 751 | @@ -0,0 +1,83 @@ |
4fadbbef JR |
752 | +# $Id$ --*- sh -*-- |
753 | + | |
754 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
755 | +# | |
756 | +# This program is free software; you can redistribute it and/or modify | |
757 | +# it under the terms of the GNU General Public License as published by | |
758 | +# the Free Software Foundation; version 2 of the License. | |
759 | +# | |
760 | +# This program is distributed in the hope that it will be useful, | |
761 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
762 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
763 | +# GNU General Public License for more details. | |
764 | +# | |
765 | +# You should have received a copy of the GNU General Public License | |
766 | +# along with this program; if not, write to the Free Software | |
767 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
768 | + | |
769 | +function poldek.installBasePackages | |
770 | +{ | |
771 | + local name="$1" | |
772 | + local dir="$2" | |
773 | + | |
774 | + test "$dir" != / || return 0 | |
775 | + for filelist in "$dir"/*; do | |
776 | + isRegularFile "$filelist" || continue | |
777 | + local idx=0 | |
778 | + local can_fail=false | |
779 | + local flags='--install' | |
780 | + | |
781 | + set -- $(<$filelist) | |
782 | + while test "$#" -gt 0; do | |
783 | + case "$1" in | |
784 | + --reinstall) flags='--reinstall';; | |
785 | + --can-fail) can_fail=true;; | |
786 | + *) break;; | |
787 | + esac | |
788 | + shift | |
789 | + done | |
790 | + "$_VPOLDEK" "$name" -- $flags $* || $can_fail | |
791 | + done | |
792 | +} | |
793 | + | |
794 | +function poldek.initVariables | |
795 | +{ | |
796 | + findFile POLDEKCONFDEFAULT \ | |
797 | + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \ | |
798 | + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \ | |
799 | + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \ | |
800 | + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \ | |
801 | + '' | |
802 | +} | |
803 | + | |
804 | +function poldek.initFilesystem | |
805 | +{ | |
b7494608 | 806 | + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d |
4fadbbef | 807 | + |
bf7f78a3 | 808 | + $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache |
4fadbbef JR |
809 | + |
810 | + populateDirectory "$PKGCFGDIR/poldek/etc" \ | |
811 | + "$__DISTRIBDIR/defaults/poldek" \ | |
812 | + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \ | |
813 | + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek" | |
814 | + | |
b7494608 ER |
815 | + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \ |
816 | + "$__DISTRIBDIR/defaults/poldek/repos.d" \ | |
817 | + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \ | |
818 | + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d" | |
819 | + | |
3ec2a3c2 ER |
820 | + if [ -n "$SETUP_MACHINE" ]; then |
821 | + say "Using $SETUP_MACHINE as machine" | |
9e5c5359 | 822 | + sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf |
3ec2a3c2 ER |
823 | + fi |
824 | + | |
825 | + if [ -n "$MIRROR" ]; then | |
826 | + say "Using $MIRROR as mirror URL" | |
9e5c5359 | 827 | + sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf |
3ec2a3c2 ER |
828 | + fi |
829 | + | |
f7a03ac0 ER |
830 | + if [ "$DISTRIBUTION" = "pld-ac" ]; then |
831 | + echo 'auto directory dependencies = no' >> "$PKGCFGDIR"/poldek/etc/poldek.conf | |
7efe1432 | 832 | + echo '%_check_dirname_deps 0' >> "$PKGCFGDIR"/rpm/etc/macros |
f7a03ac0 | 833 | + fi |
4fadbbef | 834 | +} |
40303baa JR |
835 | diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build.poldek util-vserver-0.30.216-pre3126/scripts/vserver-build.poldek |
836 | --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100 | |
837 | +++ util-vserver-0.30.216-pre3126/scripts/vserver-build.poldek 2021-03-12 21:50:25.807681091 +0100 | |
3ec2a3c2 | 838 | @@ -0,0 +1,65 @@ |
4fadbbef JR |
839 | +# $Id$ --*- sh -*-- |
840 | + | |
841 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
842 | +# | |
843 | +# This program is free software; you can redistribute it and/or modify | |
844 | +# it under the terms of the GNU General Public License as published by | |
845 | +# the Free Software Foundation; version 2 of the License. | |
846 | +# | |
847 | +# This program is distributed in the hope that it will be useful, | |
848 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
849 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
850 | +# GNU General Public License for more details. | |
851 | +# | |
852 | +# You should have received a copy of the GNU General Public License | |
853 | +# along with this program; if not, write to the Free Software | |
854 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
855 | + | |
3ec2a3c2 | 856 | +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1 |
4fadbbef JR |
857 | +eval set -- "$tmp" |
858 | + | |
859 | +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM" | |
860 | +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK" | |
861 | +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" | |
862 | + | |
863 | +while true; do | |
864 | + case "$1" in | |
865 | + (-d) DISTRIBUTION=$2; shift;; | |
3ec2a3c2 | 866 | + (-m) MIRROR=$2; shift;; |
4fadbbef JR |
867 | + (--debug) set -x;; |
868 | + (--) shift; break ;; | |
869 | + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2 | |
870 | + exit 1 | |
871 | + ;; | |
872 | + esac | |
873 | + shift | |
874 | +done | |
875 | + | |
876 | +getDistribution | |
877 | + | |
878 | +base.init | |
879 | + | |
880 | +pkgmgmt.initVariables | |
881 | +rpm.initVariables | |
882 | +poldek.initVariables | |
883 | + | |
884 | +base.initFilesystem "$OPTION_FORCE" | |
885 | +pkgmgmt.initFilesystem "$OPTION_FORCE" | |
886 | +rpm.initFilesystem | |
887 | +poldek.initFilesystem | |
888 | + | |
889 | +setup_writeOption "$VSERVER_NAME" | |
890 | +setup_writeInitialFstab | |
891 | + | |
892 | +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" | |
893 | +rpm.initDB "$SETUP_CONFDIR" | |
894 | +rpm.importGPGPubKeys "$SETUP_CONFDIR" \ | |
895 | + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \ | |
896 | + "$__CONFDIR/.distributions/.common/pubkeys" \ | |
897 | + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys" | |
898 | + | |
899 | +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole | |
900 | +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR" | |
901 | +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" | |
902 | + | |
903 | +base.setSuccess |