]>
Commit | Line | Data |
---|---|---|
fe9ea50c | 1 | diff -uNrp util-vserver-0.30.212/distrib/Makefile.am util-vserver-0.30.212./distrib/Makefile.am |
2 | --- util-vserver-0.30.212/distrib/Makefile.am 2006-12-09 17:15:33.000000000 +0100 | |
3 | +++ util-vserver-0.30.212./distrib/Makefile.am 2006-12-16 19:50:22.755681000 +0100 | |
4 | @@ -58,7 +58,8 @@ nobase_distrib_DATA = defaults/devs \ | |
5 | centos4/pkgs/01 centos4/pkgs/02 centos4/pkgs/03 \ | |
6 | centos4/yum/yum.conf $(wildcard centos4/yum.repos.d/*.repo) \ | |
e7229914 JR |
7 | suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ |
8 | - suse91/rpm/macros | |
fe9ea50c | 9 | + suse91/rpm/macros pld-ac/pkgs/01 pld-ac/rpm/macros \ |
10 | + pld-ac/rpmlist.d/00.lst | |
e7229914 JR |
11 | |
12 | nobase_confdistrib_DATA = rh9/apt/sources.list \ | |
13 | fc1/apt/sources.list \ | |
fe9ea50c | 14 | @@ -67,7 +68,13 @@ nobase_confdistrib_DATA = rh9/apt/sourc |
4fadbbef | 15 | fc4/apt/sources.list \ |
fe9ea50c | 16 | fc5/apt/sources.list \ |
17 | fc6/apt/sources.list \ | |
4fadbbef JR |
18 | - suse91/apt/sources.list |
19 | + suse91/apt/sources.list \ | |
20 | + pld-ac/poldek/aliases.conf \ | |
21 | + pld-ac/poldek/fetch.conf \ | |
22 | + pld-ac/poldek/pld-source.conf \ | |
23 | + pld-ac/poldek/poldek.conf \ | |
7d1b77ad | 24 | + pld-ac/poldek/source.conf |
fe9ea50c | 25 | + |
4fadbbef JR |
26 | |
27 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \ | |
28 | = $(nobase_distrib_SCRIPTS) | |
fe9ea50c | 29 | @@ -87,6 +94,10 @@ install-data-xtras: |
e7229914 JR |
30 | ln -sf ../redhat/initpost $(DESTDIR)$(distribdir)/$$i/ && \ |
31 | ln -sf ../redhat/initpre $(DESTDIR)$(distribdir)/$$i/; \ | |
32 | done | |
4fadbbef JR |
33 | + POLDEKARCH=$(shell rpm -E '%{_target_cpu}' 2>/dev/null); \ |
34 | + if [ -z "$$POLDEKARCH" ] ; then POLDEKARCH=$(shell uname -m) ; fi ; \ | |
35 | + sed "s|%ARCH%|$$POLDEKARCH|g" $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf > $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf.tmp ; \ | |
36 | + mv $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf.tmp $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf | |
e7229914 JR |
37 | $(mkinstalldirs) $(DESTDIR)$(confdir) \ |
38 | $(DESTDIR)$(confdistribdir)/.common/pubkeys \ | |
39 | $(DESTDIR)$(confdefaultsdir) \ | |
fe9ea50c | 40 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/pkgs/01 util-vserver-0.30.212./distrib/pld-ac/pkgs/01 |
41 | --- util-vserver-0.30.212/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100 | |
42 | +++ util-vserver-0.30.212./distrib/pld-ac/pkgs/01 2006-12-16 19:47:02.225681000 +0100 | |
34158836 | 43 | @@ -0,0 +1,5 @@ |
452506e7 | 44 | +basesystem |
e7229914 | 45 | +glibc |
4e5a2018 | 46 | +issue |
f5f1d176 | 47 | +rpm-base |
34158836 | 48 | +vserver-packages |
fe9ea50c | 49 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/poldek/aliases.conf util-vserver-0.30.212./distrib/pld-ac/poldek/aliases.conf |
50 | --- util-vserver-0.30.212/distrib/pld-ac/poldek/aliases.conf 1970-01-01 01:00:00.000000000 +0100 | |
51 | +++ util-vserver-0.30.212./distrib/pld-ac/poldek/aliases.conf 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
52 | @@ -0,0 +1,30 @@ |
53 | +# System wide aliases | |
54 | +# ls | |
55 | +ll = ls -l | |
56 | +llu = ls -lu | |
57 | +llU = ls -lU | |
58 | +lli = ls -lI | |
59 | + | |
60 | +# install | |
61 | +freshen = install -FN | |
62 | +upgrade = install -F | |
63 | + | |
64 | +# for backward compatybility, greedy is on by default now | |
65 | +greedy-upgrade = install -FG | |
66 | + | |
67 | +just-install = install -IN | |
68 | + | |
69 | +# search | |
70 | +what-requires = search -r | |
71 | +what-provides = search -p | |
72 | +rsearch = search --perlre | |
73 | + | |
74 | +exit = quit | |
75 | + | |
76 | +# for fun | |
77 | +#ls = uninstall kernel | |
78 | + | |
79 | +less = !less | |
80 | +grep = !grep | |
81 | +awk = !awk | |
82 | + | |
fe9ea50c | 83 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/poldek/fetch.conf util-vserver-0.30.212./distrib/pld-ac/poldek/fetch.conf |
84 | --- util-vserver-0.30.212/distrib/pld-ac/poldek/fetch.conf 1970-01-01 01:00:00.000000000 +0100 | |
85 | +++ util-vserver-0.30.212./distrib/pld-ac/poldek/fetch.conf 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
86 | @@ -0,0 +1,62 @@ |
87 | +# Configuration of poldek external file getters. Each [fetcher] section | |
88 | +# declares one external downloader. The syntax is: | |
89 | +# [fetcher] | |
90 | +# name = NAME | |
91 | +# proto = PROTOCOL[ ,PROTOCOL... ] | |
92 | +# cmd = CMD [OPTION...] DESTINATION-MACRO URL-MACRO | |
93 | +# Possible parameters are: | |
94 | +# | |
95 | +#[fetcher] | |
96 | +# Unique name of the fetcher. This is an optional parameter, if not set then | |
97 | +# name is taken from the "cmd" parameter value as "$(basename $cmd)". | |
98 | +#name = foo | |
99 | + | |
100 | +# Protocol or protocols supported by fetcher. Name of the protocol can be | |
101 | +# completely arbitrary, i.e. if you can handle protocol "foo" by writing | |
102 | +# a script which takes URLs in form 'foo://'. | |
103 | +#proto = foo,bar | |
104 | + | |
105 | +# Parameter specifies an external command and its invoking syntax. | |
106 | +# The syntax of "cmd" is: | |
107 | +# cmd = COMMAND [ OPTION... ] {%d,%D} {%p,%P}[n] | |
108 | +# Where COMMAND is the name or full path of command, OPTION is command specific | |
109 | +# options. Macro '%d' is replaced with cache directory, '%D' is replaced with | |
110 | +# 'cache directory/file basename', and '%p' with file basename, %P with file full | |
111 | +# path (URL). Optional suffix 'n' with %p and %P means that command can be | |
112 | +# invoked with multiple files at once. | |
113 | +#cmd = foogetter.sh -N %D %Pn | |
114 | + | |
115 | +##Configured fetchers | |
116 | +[fetcher] | |
117 | +proto = cdrom | |
118 | +cmd = vfjuggle %d %Pn | |
119 | + | |
120 | +[fetcher] | |
121 | +proto = http,ftp,https | |
122 | +cmd = wget -N --dot-style=binary -P %d %Pn | |
123 | + | |
124 | +[fetcher] | |
125 | +proto = http,ftp | |
126 | +cmd = snarf %P %D | |
127 | + | |
128 | +[fetcher] | |
129 | +proto = https | |
130 | +cmd = curl %P -o %D | |
131 | + | |
132 | +[fetcher] | |
133 | +proto = rsync | |
134 | +cmd = rsync -v %P %d | |
135 | + | |
136 | +[fetcher] | |
137 | +proto = smb | |
138 | +cmd = vfsmb -v %P %d | |
139 | + | |
140 | +#[fetcher] | |
141 | +#proto = ssh | |
142 | +#cmd = vfssh.sh %d %Pn | |
143 | + | |
144 | +#[fetcher] | |
145 | +#proto = foo | |
146 | +#cmd = foo.sh %d %Pn | |
147 | + | |
148 | + | |
fe9ea50c | 149 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/poldek/pld-source.conf util-vserver-0.30.212./distrib/pld-ac/poldek/pld-source.conf |
150 | --- util-vserver-0.30.212/distrib/pld-ac/poldek/pld-source.conf 1970-01-01 01:00:00.000000000 +0100 | |
151 | +++ util-vserver-0.30.212./distrib/pld-ac/poldek/pld-source.conf 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
152 | @@ -0,0 +1,47 @@ |
153 | +# $Id$ | |
154 | +# PLD <http://www.pld-linux.org/> | |
155 | + | |
156 | +_pld_arch = %ARCH% | |
157 | +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac | |
158 | +## Some mirrors | |
159 | +## You can use them if you have better connection there | |
160 | +# CI TASK: | |
161 | +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac | |
162 | + | |
163 | + | |
164 | +_ac_idxtype = pndir | |
165 | + | |
166 | +# PLD 2.0 (Ac) | |
167 | +[source] | |
168 | +type = %{_ac_idxtype} | |
169 | +name = ac | |
170 | +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/ | |
171 | + | |
172 | +[source] | |
173 | +type = %{_ac_idxtype} | |
174 | +name = ac-updates-security | |
175 | +path = %{_pld_prefix}/updates/security/%{_pld_arch}/ | |
176 | + | |
177 | +[source] | |
178 | +type = %{_ac_idxtype} | |
179 | +name = ac-updates-general | |
180 | +path = %{_pld_prefix}/updates/general/%{_pld_arch}/ | |
181 | +noauto = yes | |
182 | + | |
183 | +[source] | |
184 | +type = %{_ac_idxtype} | |
185 | +name = ac-supported | |
186 | +path = %{_pld_prefix}/supported/%{_pld_arch}/ | |
187 | +noauto = yes | |
188 | + | |
189 | +[source] | |
190 | +type = %{_ac_idxtype} | |
191 | +name = ac-ready | |
192 | +path = %{_pld_prefix}/ready/%{_pld_arch}/ | |
193 | +noauto = yes | |
194 | + | |
195 | +[source] | |
196 | +type = %{_ac_idxtype} | |
197 | +name = ac-test | |
198 | +path = %{_pld_prefix}/test/%{_pld_arch}/ | |
199 | +noauto = yes | |
fe9ea50c | 200 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/poldek/poldek.conf util-vserver-0.30.212./distrib/pld-ac/poldek/poldek.conf |
201 | --- util-vserver-0.30.212/distrib/pld-ac/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100 | |
202 | +++ util-vserver-0.30.212./distrib/pld-ac/poldek/poldek.conf 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
203 | @@ -0,0 +1,182 @@ |
204 | +# poldek main configuration file. | |
205 | + | |
206 | +# Some macros. Macros are local, they are not visible in included files | |
207 | +# and macros declared in them are not visible to includer. | |
208 | +# Macros names starts with underscore '_'. | |
209 | +# | |
210 | +_distro = pld | |
211 | + | |
212 | +# Both local and remote files may be included. Included files may not contain | |
213 | +# [global] section, it will be ignored anyway. | |
214 | +%include %{_distro}-source.conf | |
215 | + | |
216 | +# local sources | |
217 | +%include source.conf | |
218 | + | |
219 | +# External downloaders configuration, not necessary in most cases, cause | |
220 | +# to internal HTTP and FTP client. | |
221 | +#%include fetch.conf | |
222 | + | |
223 | +[global] | |
224 | + | |
225 | + | |
226 | +# This parameter allows to configure the default repository index type. | |
227 | +#default index type = pndir | |
228 | + | |
229 | +# Cache directory for downloaded files. NOTE: that parent directory of cachedir | |
230 | +# must exists. | |
231 | +#cachedir = $HOME/.poldek-cache | |
232 | + | |
233 | +# Switch to ordinary user at startup when executed by root | |
234 | +#runas = poldek | |
235 | + | |
236 | +# Permits using root privileges for installation only. Automatically turned | |
237 | +# on when poldek executed as ordinary user. | |
238 | +#use sudo = no | |
239 | + | |
240 | +# Load /etc/apt/sources.list. | |
241 | +#load apt sources list = no | |
242 | + | |
243 | +# Handle gzipped indexes externally (needed on RedHat 9 and Fedora Core 1 and 2). | |
244 | +# This option is a workaround for broken zlib linked into librpm; with enabled | |
245 | +# 'auto zlib in rpm' poldek tries to detect such case and then enables external | |
246 | +# *.gz handling automatically. | |
247 | +#vfile external compress = no | |
248 | + | |
249 | +# Auto detection of zlib linked into librpm. See 'vfile external compress' | |
250 | +# description. | |
251 | +#auto zlib in rpm = yes | |
252 | + | |
253 | +# Automatically download whole index if incremental update fails. | |
254 | +#autoupa = yes | |
255 | + | |
256 | +# Do not save given paths into created indexes. This option may significantly | |
257 | +# reduce index size. Example (notice missing starting '/'): | |
258 | +# exclude path = usr/share/doc:usr/share/man:usr/src | |
259 | +#exclude path = | |
260 | + | |
261 | +# Full path name to a PM (rpm for now) binary. | |
262 | +#pm command = /bin/rpm | |
263 | + | |
264 | +# Full path name to sudo binary. | |
265 | +#sudo command = /usr/bin/sudo | |
266 | + | |
267 | + | |
268 | +### File downloaders configuration | |
269 | + | |
270 | +# Send ${USER}@${HOSTNAME} as anonymous FTP password (by default | |
271 | +# 'poldek@znienacka.net' is sent) | |
272 | +#vfile ftp sysuser as anon passwd = no | |
273 | + | |
274 | +# File getters configuration parameter. By this option URL handlers may be configured. | |
275 | +# To get file from HTTP and FTP servers poldek uses its internal client (what is | |
276 | +# recommended), although it can be changedby this option. Others protocols handled | |
277 | +# by external utilities can be configured also. The syntax is: | |
278 | +# default fetcher = PROTOCOL[,PROTOCOL...]:FETCHER_NAME | |
279 | + | |
280 | +# where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch] | |
281 | +# sections (placed in fetch.conf in default configuration). | |
282 | +# Examples: | |
283 | +# default fetcher = ftp,http:internal | |
284 | +# default fetcher = https:wget | |
285 | +# default fetcher = cdrom:vfjuggle | |
286 | +# vfjuggle is a cdrom getter supplied with poldek. | |
287 | +#default fetcher = http,ftp: internal | |
288 | + | |
289 | +# Proxies for internal FTP and HTTP client may be configured in usual | |
290 | +# way, by environment variables ftp_proxy and http_proxy, or by this option. | |
291 | +# Its syntax is similar to "default fetcher" one: | |
292 | +# proxy = PROTOCOL[,PROTOCOL...]:PROXY_URL | |
293 | +# Example: | |
294 | +# proxy = http: http://w3cache.foo.org:8080 | |
295 | +#proxy = | |
296 | + | |
297 | +# Comma separated list of hosts or domains which will not be accessed via proxy. | |
298 | +# Option overrides no_proxy environment variable. | |
299 | +# Example: | |
300 | +# noproxy = localhost, .pl, ftp.foo.bar.org | |
301 | +#noproxy = | |
302 | + | |
303 | +# Internal HTTP and FTP client is stubborn, it retries to retrive | |
304 | +# file if connection breaks. This option tells it how many times | |
305 | +# it should try. | |
306 | +#vfile retries = 128 | |
307 | + | |
308 | + | |
309 | +### Installation options | |
310 | + | |
311 | +# Install packages in small groups instead of doing all-or-nothing | |
312 | +# installations. | |
313 | +particle install = no | |
314 | + | |
315 | +# Do not remove downloaded packages after its successful installation. | |
316 | +#keep downloads = no | |
317 | + | |
318 | +# Controls visibility of multiple package instances with different EVR. | |
319 | +# If on, only one, highest version will be visible. | |
320 | +#unique package names = no | |
321 | + | |
322 | +# Epoch autopromotion during dependency comparision. RPM specific. | |
323 | +# Set it up if you are using system with rpm prior to 4.2.1 version. | |
324 | +#promoteepoch = no | |
325 | + | |
326 | +# Confirm packages installation. | |
327 | +#confirm installation = no | |
328 | + | |
329 | +# Confirm packages removal. | |
330 | +#confirm removal = yes | |
331 | + | |
332 | +# Let the user select package among equivalents. | |
cc65018c | 333 | +choose equivalents manually = yes |
4fadbbef JR |
334 | + |
335 | +# Prevent package listed from being upgraded if they are already installed. | |
336 | +# hold = kernel* dev | |
337 | +#hold = | |
338 | + | |
339 | +# Ignore package list - packages fits given mask will be invisible. | |
340 | +# ignore = *-smp-* foo* | |
341 | +ignore = kernel* udev devfs | |
342 | + | |
343 | +# Conflicts with already installed packages are treated as resolved | |
344 | +# if at least one of multiple-installed package satisfies conflict. | |
345 | +# rpm doesn't support such cases, so --pm-nodeps is needed (use with | |
346 | +# care). | |
347 | +#allow duplicates = yes | |
348 | + | |
349 | + | |
350 | +### RPM specific options | |
351 | + | |
352 | +# rpm macros can be set by this option. Examples: | |
353 | +# rpmdef = _install_langs pl:pl_PL:lt:lt_LT | |
354 | +# Do not install any documentation: | |
355 | +# rpmdef = _netsharedpath /usr/share/info:/usr/share/man | |
356 | +# rpmdef = _excludedocs 1 | |
357 | +#rpmdef = | |
358 | + | |
359 | + | |
360 | +### Dependency processing settings | |
361 | +# Subtle dependency processing options, they should not be changed | |
362 | +# unless you know what you are doing | |
363 | + | |
364 | +# Automatically install packages required by installed ones. | |
365 | +#follow = yes | |
366 | + | |
367 | +# Greedy upgrades, i.e. upgrade packages which dependencies are broken | |
368 | +# by being uninstalled ones. | |
369 | +#greedy = yes | |
370 | + | |
371 | +# Be yet more greedy; if successor of orphaned package found, and this | |
372 | +# successor drags no packages then upgrade the package instead of process | |
373 | +# its dependencies. Option value is implied by 'greedy' one by defalut. | |
374 | +#aggressive greedy = yes | |
375 | + | |
376 | +# Be tolerant for unmatched versioned dependencies which rpm tolerates, e.g. | |
377 | +# package A requires capability foo >= 1.0 while package B provides "foo" | |
378 | +# without any version. Use with care, it may cause weird dependency errors. | |
379 | +#mercy = no | |
380 | + | |
381 | +# Taking into account package Obsoletes. | |
382 | +#obsoletes = yes | |
383 | + | |
384 | +# Taking into account package Conflicts. | |
385 | +#conflicts = yes | |
fe9ea50c | 386 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/poldek/source.conf util-vserver-0.30.212./distrib/pld-ac/poldek/source.conf |
387 | --- util-vserver-0.30.212/distrib/pld-ac/poldek/source.conf 1970-01-01 01:00:00.000000000 +0100 | |
388 | +++ util-vserver-0.30.212./distrib/pld-ac/poldek/source.conf 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
389 | @@ -0,0 +1,85 @@ |
390 | +# Sample poldek sources configuration | |
391 | +# Every source is configured in his own [source] section. | |
392 | +# Possible parameters are: | |
393 | +# | |
394 | +#[source] | |
395 | +# Unique name of the repository. | |
396 | +#name = foo | |
397 | + | |
398 | +# Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum' | |
399 | +# and 'dir' as listed by --stl switch. | |
400 | +#type = pndir | |
401 | + | |
402 | +# This parameter sets index original type i.e type of repository | |
403 | +# from what this repository is created. Default is 'dir' - means | |
404 | +# that directory of packages is scanned. | |
405 | +#original type = dir | |
406 | + | |
407 | +# Unique name of the repository. May be either path or URL. | |
408 | +#path = /some/url/or/dir | |
409 | + | |
410 | +# If package index and packages are stored in different locations then | |
411 | +# prefix stands for packages path. | |
412 | +#prefix = /some/url/or/dir | |
413 | + | |
414 | +# Controls visibility of multiple package instances with different EVR. | |
415 | +# If on, only one, highest version will be visible. | |
416 | +#douniq = no | |
417 | + | |
418 | +# Repository priority. If the same packages (equal names and EVR) | |
419 | +# are available in more than one source then package from highest | |
420 | +# prioritized source are taken. Priority is numeric value. Lower number | |
421 | +# means higher priority, and negative priorities are allowed. | |
422 | +# Priority is numeric value. | |
423 | +#pri = 0 | |
424 | + | |
425 | +# Controling if repository index will be implicit loaded. Set it off if | |
426 | +# the index should be loaded on demand only, i.e. if specified directly | |
427 | +# by --sn option. | |
428 | +#auto = yes | |
429 | + | |
430 | +# Controls if repository index will be implicit updated. Set it off if | |
431 | +# the index should be updated on demand only, i.e. if specified directly | |
432 | +# by --sn option. | |
433 | +#autoup = yes | |
434 | + | |
435 | +# Packages PGP/GPG signatures (if any) will be verified before their | |
436 | +# installation. | |
437 | +#signed = no | |
438 | + | |
439 | +# Have the same meaning as [global] parameter. Example: | |
440 | +# hold = kernel* dev | |
441 | +#hold = | |
442 | + | |
443 | +# Have the same meaning as [global] parameter. Example: | |
444 | +# ignore = kernel*smp* dev | |
445 | +#ignore = | |
446 | + | |
447 | +# Parameter have the same meaning as [global] parameter. | |
448 | +# exclude path = usr/share/doc:usr/share/man:usr/src | |
449 | +#exclude path = | |
450 | + | |
451 | +# Preferred language of package descriptions. If not set, taken from locale | |
452 | +# settings. Example: | |
453 | +# lang = pl_PL:lt_LT | |
454 | +#lang = | |
455 | + | |
456 | +[source] | |
457 | +name = home | |
458 | +type = dir | |
459 | +path = $HOME/rpm/RPMS | |
460 | +auto = no | |
461 | +autoup = no | |
462 | + | |
463 | +#[source] | |
464 | +#type = pndir | |
465 | +#name = foo | |
466 | +#path = ftp://ftp.foo.bar.org/RPMS/ | |
467 | +#pri = -10 | |
468 | +#auto = no | |
469 | +#autoup = no | |
470 | +#signed = yes | |
471 | +#hold = kernel* | |
472 | +#ignore = kernel*-smp-* | |
473 | +#dscr = pl_PL | |
474 | + | |
fe9ea50c | 475 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/rpm/macros util-vserver-0.30.212./distrib/pld-ac/rpm/macros |
476 | --- util-vserver-0.30.212/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100 | |
477 | +++ util-vserver-0.30.212./distrib/pld-ac/rpm/macros 2006-12-16 19:47:02.225681000 +0100 | |
d7090917 | 478 | @@ -0,0 +1,4 @@ |
e7229914 JR |
479 | +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725 |
480 | +# you have to use at least one language beside 'C' | |
481 | +%_install_langs C:en:pl | |
d7090917 | 482 | +%_netsharedpath /dev |
fe9ea50c | 483 | diff -uNrp util-vserver-0.30.212/distrib/pld-ac/rpmlist.d/00.lst util-vserver-0.30.212./distrib/pld-ac/rpmlist.d/00.lst |
484 | --- util-vserver-0.30.212/distrib/pld-ac/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100 | |
485 | +++ util-vserver-0.30.212./distrib/pld-ac/rpmlist.d/00.lst 2006-12-16 19:47:02.225681000 +0100 | |
34158836 | 486 | @@ -0,0 +1,10 @@ |
452506e7 JR |
487 | +basesystem-*.rpm |
488 | +dev-*.rpm | |
e7229914 JR |
489 | +FHS-*.rpm |
490 | +glibc-misc-*.rpm | |
491 | +glibc-[0-9]*.rpm | |
492 | +libgcc-[0-9]*.rpm | |
493 | +setup-*.rpm | |
4e5a2018 | 494 | +issue-[0-9]*.rpm |
f5f1d176 | 495 | +rpm-base-*.rpm |
34158836 | 496 | +vserver-packages-*.rpm |
fe9ea50c | 497 | diff -uNrp util-vserver-0.30.212/scripts/functions util-vserver-0.30.212./scripts/functions |
498 | --- util-vserver-0.30.212/scripts/functions 2006-12-09 17:15:24.000000000 +0100 | |
499 | +++ util-vserver-0.30.212./scripts/functions 2006-12-16 19:47:02.225681000 +0100 | |
500 | @@ -394,6 +394,20 @@ function _pkgSetVarsYum | |
4fadbbef JR |
501 | fi |
502 | } | |
503 | ||
504 | +function _pkgSetVarsPoldek | |
505 | +{ | |
506 | + if test -n "$PKGDIR"; then | |
507 | + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek | |
508 | + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache | |
509 | + else | |
510 | + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek | |
511 | + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache | |
512 | + fi | |
513 | + | |
514 | + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf "" | |
515 | + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG | |
516 | +} | |
517 | + | |
518 | ||
519 | function _pkgMountBase | |
520 | { | |
fe9ea50c | 521 | @@ -467,6 +481,7 @@ function pkgInit |
4fadbbef JR |
522 | rpm) _pkgSetVarsRPM;; |
523 | apt) _pkgSetVarsApt;; | |
524 | yum) _pkgSetVarsYum;; | |
525 | + poldek) _pkgSetVarsPoldek;; | |
526 | *) echo "Unknown packaging flavor" >&2; exit 1;; | |
527 | esac | |
528 | done | |
fe9ea50c | 529 | @@ -750,6 +765,8 @@ function pkgmgmt.guessStyle() |
4e5a2018 JR |
530 | style=redhat |
531 | elif test -e "$_pgs_vdir"/etc/mandrake-release; then | |
532 | style=mandrake | |
533 | + elif test -e "$_pgs_vdir"/etc/pld-release; then | |
534 | + style=pld | |
535 | elif test -e "$_pgs_vdir"/etc/debian_version; then | |
536 | style=debian | |
537 | elif test -e "$_pgs_vdir"/etc/SuSE-release; then | |
fe9ea50c | 538 | @@ -817,6 +834,27 @@ function pkgmgmt.isYumAvailable |
4fadbbef JR |
539 | test -n "$have_yum" && return 0 || return 1 |
540 | } | |
541 | ||
542 | +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>] | |
543 | +function pkgmgmt.isPoldekAvailable | |
544 | +{ | |
545 | + local cfgdir="$1" | |
546 | + local vdir="$2" | |
547 | + local is_internal="$3" | |
548 | + | |
549 | + local have_poldek i | |
550 | + if test -n "$is_internal"; then | |
551 | + have_poldek=1 | |
552 | + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek= | |
553 | + else | |
554 | + have_poldek= | |
555 | + for i in /bin /usr/bin /usr/local/bin; do | |
556 | + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; } | |
557 | + done | |
558 | + fi | |
559 | + | |
560 | + test -n "$have_poldek" && return 0 || return 1 | |
561 | +} | |
562 | + | |
563 | ||
564 | function vshelper.doSanityCheck | |
565 | { | |
fe9ea50c | 566 | diff -uNrp util-vserver-0.30.212/scripts/Makefile-files util-vserver-0.30.212./scripts/Makefile-files |
567 | --- util-vserver-0.30.212/scripts/Makefile-files 2006-12-09 17:15:24.000000000 +0100 | |
568 | +++ util-vserver-0.30.212./scripts/Makefile-files 2006-12-16 19:53:19.455681000 +0100 | |
569 | @@ -21,6 +21,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ | |
570 | scripts/vapt-get-worker \ | |
571 | scripts/vrpm-worker \ | |
572 | scripts/vyum-worker \ | |
573 | + scripts/vpoldek-worker \ | |
574 | scripts/vrpm-preload \ | |
575 | scripts/save_s_context \ | |
576 | scripts/vservers.grabinfo.sh \ | |
577 | @@ -47,11 +48,13 @@ scripts_pkglib_src_DTA = scripts/functio | |
578 | scripts/vserver-build.yum \ | |
579 | scripts/vserver-build.template \ | |
580 | scripts/vserver-build.rsync \ | |
581 | + scripts/vserver-build.poldek \ | |
582 | scripts/vserver-build.functions \ | |
583 | scripts/vserver-build.functions.apt \ | |
584 | scripts/vserver-build.functions.rpm \ | |
585 | scripts/vserver-build.functions.pkgmgmt \ | |
586 | scripts/vserver-build.functions.yum \ | |
587 | + scripts/vserver-build.functions.poldek \ | |
588 | scripts/vserver-setup.functions \ | |
589 | scripts/vserver.functions \ | |
590 | scripts/vserver.start \ | |
591 | @@ -64,6 +67,7 @@ scripts_pkglib_gen_DTA = scripts/util-vs | |
592 | scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ | |
593 | scripts/vapt-get-worker \ | |
594 | scripts/vpkg \ | |
595 | + scripts/vpoldek-worker \ | |
596 | scripts/vrpm-worker \ | |
597 | scripts/vrpm-preload \ | |
598 | scripts/start-vservers \ | |
599 | @@ -86,6 +90,7 @@ scripts_legacy_src_PRGS = scripts/legacy | |
600 | scripts_sbin_src_PRGS = scripts/chbind \ | |
601 | scripts/chcontext \ | |
602 | scripts/vapt-get \ | |
603 | + scripts/vpoldek \ | |
604 | scripts/vdispatch-conf \ | |
605 | scripts/vemerge \ | |
606 | scripts/vesync \ | |
607 | diff -uNrp util-vserver-0.30.212/scripts/pkgmgmt util-vserver-0.30.212./scripts/pkgmgmt | |
608 | --- util-vserver-0.30.212/scripts/pkgmgmt 2006-12-09 17:15:24.000000000 +0100 | |
609 | +++ util-vserver-0.30.212./scripts/pkgmgmt 2006-12-16 19:47:02.225681000 +0100 | |
610 | @@ -195,7 +195,7 @@ packagemanagement: | |
4fadbbef JR |
611 | " |
612 | ||
613 | case $2 in | |
614 | - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}") | |
615 | + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}") | |
616 | hasSubstring "$pkgs" ---rpm--- || { | |
617 | warning "$ERR | |
618 | * The vserver does not seem to have the 'rpm' package which is required | |
fe9ea50c | 619 | @@ -205,9 +205,9 @@ packagemanagement: |
4fadbbef JR |
620 | ERR= |
621 | } | |
622 | ||
623 | - hasSubstring "$pkgs" ---apt--- ---yum--- || { | |
624 | + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || { | |
625 | warning "$ERR | |
626 | -* The vserver does not seem to have a depsolver like 'apt' or 'yum' | |
627 | +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek' | |
628 | installed. It is suggested to install such a program before setting | |
629 | up internal package management." | |
630 | res=1 | |
fe9ea50c | 631 | @@ -368,6 +368,131 @@ Can not continue; use '--force' to overr |
4fadbbef JR |
632 | fi |
633 | } | |
634 | ||
635 | +function processVserver_PLD() | |
636 | +{ | |
637 | + local vserver=$1 | |
638 | + local is_internalize=$2 | |
639 | + local cfgdir | |
640 | + local i | |
641 | + | |
642 | + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \ | |
643 | + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt | |
644 | + | |
645 | + ## Figure out the environment.... | |
646 | + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek= | |
647 | + | |
648 | + local POLDEKETCDIR= | |
649 | + local POLDEKCACHEDIR= | |
650 | + local RPMETCDIR= | |
651 | + local RPMSTATEDIR= | |
652 | + | |
653 | + ## Create directories and assign variables where configuration | |
654 | + ## can/will be found on the host | |
655 | + if test -n "$is_internalize"; then | |
656 | + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" || | |
657 | + panic " | |
658 | +Can not continue; use '--force' to override this check" | |
659 | + | |
660 | + pushd "$vdir" >/dev/null | |
661 | + | |
662 | + test ! -L var/lib/rpm || { | |
663 | + $_EXEC_CD /var/lib $_RM rpm && | |
664 | + $_EXEC_CD /var/lib $_MKDIR -m755 rpm && | |
665 | + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm || | |
666 | + : | |
667 | + } </dev/null 2>/dev/null | |
668 | + | |
669 | + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do | |
670 | + test -d "$i" || | |
671 | + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || : | |
672 | + done #2>/dev/null | |
673 | + | |
674 | + popd >/dev/null | |
675 | + | |
676 | + if test -n "$have_poldek"; then | |
677 | + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek | |
678 | + fi | |
679 | + | |
680 | + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm / | |
681 | + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state | |
682 | + else | |
683 | + mkdir -m755 -p "$cfgdir" | |
684 | + local need_base= | |
685 | + | |
686 | + if test -n "$have_poldek"; then | |
687 | + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc / | |
688 | + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache / | |
689 | + | |
690 | + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc | |
691 | + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache | |
692 | + | |
693 | + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1 | |
694 | + fi | |
695 | + | |
696 | + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc / | |
697 | + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state / | |
698 | + | |
699 | + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc | |
700 | + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state | |
701 | + | |
702 | + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1 | |
703 | + test ! -e "$cfgdir"/base || need_base= | |
704 | + | |
705 | + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base | |
706 | + | |
707 | + mkdir -m755 -p "$PKGCFGDIR" | |
708 | + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \ | |
709 | + "$RPMETCDIR" "$RPMSTATEDIR" | |
710 | + fi | |
711 | + | |
712 | + ## Copy the files... | |
713 | + if test -n "$is_internalize"; then | |
714 | + if test -n "$have_poldek"; then | |
715 | + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek | |
716 | + pushd "$vdir" >/dev/null | |
717 | + _hashAuto /etc/poldek.conf '/' | |
718 | + popd >/dev/null | |
719 | + fi | |
720 | + | |
721 | + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm | |
722 | + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm | |
723 | + | |
724 | + pushd "$vdir" >/dev/null | |
725 | + ## remove %_dbpath settings | |
726 | + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D' | |
727 | + popd >/dev/null | |
728 | + else | |
729 | + if test -n "$have_poldek"; then | |
730 | + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR" | |
731 | + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/' | |
732 | + fi | |
733 | + | |
734 | + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR" | |
735 | + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR" | |
736 | + | |
737 | + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros | |
738 | + fi | |
739 | + | |
740 | + ## Cleanups... | |
741 | + if test -n "$is_internalize"; then | |
742 | + : | |
743 | + else | |
8d5b8ef9 | 744 | + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX) |
4fadbbef JR |
745 | + trap "$_RM -rf $tmpdir" EXIT |
746 | + pushd "$vdir" >/dev/null | |
747 | + $_EXEC_CD /var/lib $_MV rpm $tmpdir/ | |
748 | + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm | |
749 | + $_RM -rf $tmpdir | |
750 | + fi | |
751 | + | |
752 | + ## Finish it... | |
753 | + if test -n "$is_internalize"; then | |
754 | + $_TOUCH "$cfgdir"/internal | |
755 | + else | |
756 | + $_RM -f "$cfgdir"/internal | |
757 | + fi | |
758 | +} | |
759 | + | |
760 | function processVserver_Debian() | |
761 | { | |
762 | local vserver=$1 | |
fe9ea50c | 763 | @@ -417,6 +542,7 @@ function processVserver() |
4fadbbef JR |
764 | |
765 | case "$style" in | |
766 | (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";; | |
767 | + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";; | |
768 | (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";; | |
769 | (*) | |
770 | echo $"Vserver style '$style' is not supported for packagemanagment" >&2 | |
fe9ea50c | 771 | diff -uNrp util-vserver-0.30.212/scripts/util-vserver-vars.pathsubst util-vserver-0.30.212./scripts/util-vserver-vars.pathsubst |
772 | --- util-vserver-0.30.212/scripts/util-vserver-vars.pathsubst 2006-12-09 17:15:24.000000000 +0100 | |
773 | +++ util-vserver-0.30.212./scripts/util-vserver-vars.pathsubst 2006-12-16 19:47:02.225681000 +0100 | |
774 | @@ -51,6 +51,7 @@ _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKG | |
4fadbbef JR |
775 | _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm" |
776 | _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum" | |
777 | _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt" | |
778 | +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek" | |
779 | _LISTDEVIP="$__LEGACYDIR/listdevip" | |
780 | _LOCKFILE="$__PKGLIBDIR/lockfile" | |
781 | _MASK2PREFIX="$__PKGLIBDIR/mask2prefix" | |
fe9ea50c | 782 | @@ -99,6 +100,8 @@ _VUNAME="$__SBINDIR/vuname" |
4fadbbef JR |
783 | _VUNIFY="$__PKGLIBDIR/vunify" |
784 | _VYUM="$__SBINDIR/vyum" | |
785 | _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" | |
786 | +_VPOLDEK="$__SBINDIR/vpoldek" | |
787 | +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker" | |
788 | ||
789 | _AWK="@AWK@" | |
fe9ea50c | 790 | _BZIP2="@BZIP2@" |
791 | diff -uNrp util-vserver-0.30.212/scripts/vpkg util-vserver-0.30.212./scripts/vpkg | |
792 | --- util-vserver-0.30.212/scripts/vpkg 2006-12-09 17:15:24.000000000 +0100 | |
793 | +++ util-vserver-0.30.212./scripts/vpkg 2006-12-16 19:47:02.225681000 +0100 | |
794 | @@ -115,6 +115,44 @@ case "$style" in | |
4e5a2018 JR |
795 | fi |
796 | fi | |
797 | ;; | |
798 | + (pld) | |
799 | + rpm_param= | |
800 | + poldek_param= | |
801 | + case "$tag" in | |
802 | + ## rpm outputs sometimes '(contains no files)', so return | |
803 | + ## only the valid output | |
804 | + (get-conffiles) | |
805 | + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );; | |
806 | + (install) | |
807 | + rpm_param=( -Uvh "$@" ) | |
808 | + poldek_param=( --install -v "$@" ) | |
809 | + ;; | |
810 | + esac | |
811 | + | |
812 | + if test -n "$is_external"; then | |
813 | + have_poldek=1 | |
814 | + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek= | |
815 | + else | |
816 | + have_poldek= | |
817 | + for i in /bin /usr/bin /usr/local/bin; do | |
818 | + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; } | |
819 | + done | |
820 | + fi | |
821 | + | |
822 | + if test -n "$is_external"; then | |
823 | + if test "$have_poldek" -a "$poldek_param"; then | |
824 | + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" ) | |
825 | + else | |
826 | + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" ) | |
827 | + fi | |
828 | + else | |
829 | + if test "$have_poldek" -a "$poldek_param"; then | |
830 | + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" ) | |
831 | + else | |
832 | + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" ) | |
833 | + fi | |
834 | + fi | |
835 | + ;; | |
836 | (debian) | |
837 | case "$tag" in | |
838 | (get-conffiles) | |
fe9ea50c | 839 | diff -uNrp util-vserver-0.30.212/scripts/vpoldek util-vserver-0.30.212./scripts/vpoldek |
840 | --- util-vserver-0.30.212/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100 | |
841 | +++ util-vserver-0.30.212./scripts/vpoldek 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
842 | @@ -0,0 +1,96 @@ |
843 | +#! /bin/bash | |
844 | +# $Id$ | |
845 | + | |
846 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
847 | +# | |
848 | +# This program is free software; you can redistribute it and/or modify | |
849 | +# it under the terms of the GNU General Public License as published by | |
850 | +# the Free Software Foundation; version 2 of the License. | |
851 | +# | |
852 | +# This program is distributed in the hope that it will be useful, | |
853 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
854 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
855 | +# GNU General Public License for more details. | |
856 | +# | |
857 | +# You should have received a copy of the GNU General Public License | |
858 | +# along with this program; if not, write to the Free Software | |
859 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
860 | + | |
861 | +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} | |
862 | +test -e "$UTIL_VSERVER_VARS" || { | |
863 | + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 | |
864 | + exit 1 | |
865 | +} | |
866 | +. "$UTIL_VSERVER_VARS" | |
867 | +. "$_LIB_FUNCTIONS" | |
868 | + | |
869 | + | |
870 | +function showHelp() | |
871 | +{ | |
872 | + echo \ | |
873 | +$"Usage: $0 <vserver-name>* [--all] -- <params>+ | |
874 | + | |
875 | +Report bugs to <$PACKAGE_BUGREPORT>." | |
876 | + exit 0 | |
877 | +} | |
878 | + | |
879 | +function showVersion() | |
880 | +{ | |
881 | + echo \ | |
882 | +$"vpoldek $PACKAGE_VERSION -- poldek for vservers | |
883 | +This program is part of $PACKAGE_STRING | |
884 | + | |
885 | +Copyright (C) 2003 Enrico Scholz | |
886 | +This program is free software; you may redistribute it under the terms of | |
887 | +the GNU General Public License. This program has absolutely no warranty." | |
888 | + exit 0 | |
889 | +} | |
890 | + | |
891 | +is_quiet= | |
892 | +declare -a vservers=() | |
893 | + | |
894 | +while test "$#" -ge 1; do | |
895 | + case "$1" in | |
896 | + --) shift; break;; | |
897 | + --help) showHelp $0;; | |
898 | + --quiet|-q) is_quiet=1 ;; | |
899 | + --all) | |
900 | + getAllVservers tmp | |
901 | + vservers=( "${vservers[@]}" "${tmp[@]}" ) | |
902 | + ;; | |
903 | + --version) | |
904 | + showVersion ;; | |
905 | + *) vservers=( "${vservers[@]}" "$1" ) | |
906 | + esac | |
907 | + shift | |
908 | +done | |
909 | + | |
910 | +cnt=0 | |
911 | +res=255 | |
912 | +for i in "${vservers[@]}"; do | |
913 | + cnt=$[ cnt + 1 ] | |
914 | + | |
915 | + test -n "$is_quiet" || { | |
916 | + colorize bold echo -n "vpoldek: operating on vserver " | |
917 | + colorize bold colorize emph echo "$i" | |
918 | + xtermTitle "vpoldek: operating on vserver '$i' [$cnt/${#vservers[@]}]" | |
919 | + } | |
920 | + | |
921 | + if pkgmgmt.isInternal "$i"; then | |
922 | + $_VSERVER "$i" exec poldek "$@" | |
923 | + else | |
924 | + callInNamespace "$i" \ | |
925 | + "$_VNAMESPACE" --new -- "$_VPOLDEK_WORKER" "$i" "$@" | |
926 | + fi | |
927 | + res=$? | |
928 | + | |
929 | + test $res -eq 0 -o -n "$is_quiet" || { | |
930 | + colorize error echo -n $"vpoldek failed on vserver '$i' with errorcode $res" | |
931 | + echo | |
932 | + } | |
933 | + | |
934 | + test -n "$is_quiet" || echo | |
935 | +done | |
936 | + | |
937 | +test "$cnt" -ge 0 || echo "No vservers specified" >&2 | |
938 | +exit $res | |
fe9ea50c | 939 | diff -uNrp util-vserver-0.30.212/scripts/vpoldek-worker util-vserver-0.30.212./scripts/vpoldek-worker |
940 | --- util-vserver-0.30.212/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100 | |
941 | +++ util-vserver-0.30.212./scripts/vpoldek-worker 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
942 | @@ -0,0 +1,45 @@ |
943 | +#! /bin/bash | |
944 | +# $Id$ | |
945 | + | |
946 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
947 | +# | |
948 | +# This program is free software; you can redistribute it and/or modify | |
949 | +# it under the terms of the GNU General Public License as published by | |
950 | +# the Free Software Foundation; version 2 of the License. | |
951 | +# | |
952 | +# This program is distributed in the hope that it will be useful, | |
953 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
954 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
955 | +# GNU General Public License for more details. | |
956 | +# | |
957 | +# You should have received a copy of the GNU General Public License | |
958 | +# along with this program; if not, write to the Free Software | |
959 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
960 | + | |
961 | +set -e | |
962 | + | |
963 | +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} | |
964 | +test -e "$UTIL_VSERVER_VARS" || { | |
965 | + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 | |
966 | + exit 1 | |
967 | +} | |
968 | +. "$UTIL_VSERVER_VARS" | |
969 | +. "$_LIB_FUNCTIONS" | |
970 | + | |
971 | + | |
972 | +vserver="$1" | |
973 | +shift | |
974 | + | |
975 | +pkgInit "$vserver" rpm poldek | |
976 | + | |
977 | +test -z "$_POLDEK" || { | |
978 | + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of" | |
979 | + ${POLDEK:=$_POLDEK} | |
980 | +} | |
981 | + | |
982 | +exec ${_POLDEK:-poldek} \ | |
983 | + -v --root=$VDIR \ | |
984 | + --cachedir=$POLDEKCACHEDIR \ | |
985 | + --conf=$POLDEK_CONFIG \ | |
986 | + --pmcmd=$RPM_BINARY \ | |
987 | + "$@" | |
fe9ea50c | 988 | diff -uNrp util-vserver-0.30.212/scripts/vserver-build util-vserver-0.30.212./scripts/vserver-build |
989 | --- util-vserver-0.30.212/scripts/vserver-build 2006-12-09 17:15:24.000000000 +0100 | |
990 | +++ util-vserver-0.30.212./scripts/vserver-build 2006-12-16 19:54:59.855681000 +0100 | |
991 | @@ -57,6 +57,9 @@ Possible methods are: | |
992 | yum ... -- -d <distribution> | |
4fadbbef JR |
993 | ... installs the base-packages of the given distribution with |
994 | help of 'vyum' | |
fe9ea50c | 995 | + poldek ... -- -d <distribution> |
4fadbbef JR |
996 | + ... installs the base-packages of the given distribution with |
997 | + help of 'vpoldek' | |
fe9ea50c | 998 | rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+ |
4fadbbef | 999 | ... installs lists of rpm-packages |
fe9ea50c | 1000 | skeleton ... -- [<cmd> <args>*] |
1001 | @@ -134,7 +137,7 @@ setup_setDefaults "$VSERVER_NAME" | |
4fadbbef JR |
1002 | |
1003 | case x"$method" in | |
1004 | (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; | |
fe9ea50c | 1005 | - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync) |
1006 | + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xpoldek) | |
4fadbbef JR |
1007 | . $__PKGLIBDIR/vserver-build.$method |
1008 | ;; | |
1009 | (x) panic $"No build-method specified";; | |
fe9ea50c | 1010 | diff -uNrp util-vserver-0.30.212/scripts/vserver-build.functions util-vserver-0.30.212./scripts/vserver-build.functions |
1011 | --- util-vserver-0.30.212/scripts/vserver-build.functions 2006-12-09 17:15:24.000000000 +0100 | |
1012 | +++ util-vserver-0.30.212./scripts/vserver-build.functions 2006-12-16 19:47:02.225681000 +0100 | |
1013 | @@ -167,6 +167,12 @@ function getDistribution | |
1014 | elif test -e /etc/slackware-version; then | |
1015 | set -- $(cat /etc/slackware-version) | |
4fadbbef JR |
1016 | DISTRIBUTION=slackware$2 |
1017 | + elif test -e /etc/pld-release; then | |
1018 | + old_IFS=$IFS | |
1019 | + IFS='()' | |
1020 | + set -- $(cat /etc/pld-release) | |
1021 | + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z) | |
1022 | + IFS=$old_IFS | |
1023 | elif test -n "$1"; then | |
1024 | DISTRIBUTION=$1 | |
1025 | else | |
fe9ea50c | 1026 | diff -uNrp util-vserver-0.30.212/scripts/vserver-build.functions.poldek util-vserver-0.30.212./scripts/vserver-build.functions.poldek |
1027 | --- util-vserver-0.30.212/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100 | |
1028 | +++ util-vserver-0.30.212./scripts/vserver-build.functions.poldek 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
1029 | @@ -0,0 +1,67 @@ |
1030 | +# $Id$ --*- sh -*-- | |
1031 | + | |
1032 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
1033 | +# | |
1034 | +# This program is free software; you can redistribute it and/or modify | |
1035 | +# it under the terms of the GNU General Public License as published by | |
1036 | +# the Free Software Foundation; version 2 of the License. | |
1037 | +# | |
1038 | +# This program is distributed in the hope that it will be useful, | |
1039 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
1040 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
1041 | +# GNU General Public License for more details. | |
1042 | +# | |
1043 | +# You should have received a copy of the GNU General Public License | |
1044 | +# along with this program; if not, write to the Free Software | |
1045 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
1046 | + | |
1047 | +function poldek.installBasePackages | |
1048 | +{ | |
1049 | + local name="$1" | |
1050 | + local dir="$2" | |
1051 | + | |
1052 | + test "$dir" != / || return 0 | |
1053 | + for filelist in "$dir"/*; do | |
1054 | + isRegularFile "$filelist" || continue | |
1055 | + local idx=0 | |
1056 | + local can_fail=false | |
1057 | + local flags='--install' | |
1058 | + | |
1059 | + set -- $(<$filelist) | |
1060 | + while test "$#" -gt 0; do | |
1061 | + case "$1" in | |
1062 | + --reinstall) flags='--reinstall';; | |
1063 | + --can-fail) can_fail=true;; | |
1064 | + *) break;; | |
1065 | + esac | |
1066 | + shift | |
1067 | + done | |
1068 | + "$_VPOLDEK" "$name" -- $flags $* || $can_fail | |
1069 | + done | |
1070 | +} | |
1071 | + | |
1072 | +function poldek.initVariables | |
1073 | +{ | |
1074 | + findFile POLDEKCONFDEFAULT \ | |
1075 | + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \ | |
1076 | + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \ | |
1077 | + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \ | |
1078 | + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \ | |
1079 | + '' | |
1080 | +} | |
1081 | + | |
1082 | +function poldek.initFilesystem | |
1083 | +{ | |
1084 | + mkdir -p "$PKGCFGDIR"/poldek/etc | |
1085 | + mkdir -p "$PKGCFGBASE"/poldek-cache | |
1086 | + | |
1087 | + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache | |
1088 | + | |
1089 | + populateDirectory "$PKGCFGDIR/poldek/etc" \ | |
1090 | + "$__DISTRIBDIR/defaults/poldek" \ | |
1091 | + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \ | |
1092 | + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek" | |
1093 | + | |
78219c44 JR |
1094 | +# test -z "$POLDEKCONFDEFAULT" || \ |
1095 | +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/ | |
4fadbbef | 1096 | +} |
fe9ea50c | 1097 | diff -uNrp util-vserver-0.30.212/scripts/vserver-build.poldek util-vserver-0.30.212./scripts/vserver-build.poldek |
1098 | --- util-vserver-0.30.212/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100 | |
1099 | +++ util-vserver-0.30.212./scripts/vserver-build.poldek 2006-12-16 19:47:02.225681000 +0100 | |
4fadbbef JR |
1100 | @@ -0,0 +1,64 @@ |
1101 | +# $Id$ --*- sh -*-- | |
1102 | + | |
1103 | +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> | |
1104 | +# | |
1105 | +# This program is free software; you can redistribute it and/or modify | |
1106 | +# it under the terms of the GNU General Public License as published by | |
1107 | +# the Free Software Foundation; version 2 of the License. | |
1108 | +# | |
1109 | +# This program is distributed in the hope that it will be useful, | |
1110 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
1111 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
1112 | +# GNU General Public License for more details. | |
1113 | +# | |
1114 | +# You should have received a copy of the GNU General Public License | |
1115 | +# along with this program; if not, write to the Free Software | |
1116 | +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
1117 | + | |
1118 | +tmp=$(getopt -o +d: --long debug -n "$0" -- "$@") || exit 1 | |
1119 | +eval set -- "$tmp" | |
1120 | + | |
1121 | +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM" | |
1122 | +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK" | |
1123 | +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" | |
1124 | + | |
1125 | +while true; do | |
1126 | + case "$1" in | |
1127 | + (-d) DISTRIBUTION=$2; shift;; | |
1128 | + (--debug) set -x;; | |
1129 | + (--) shift; break ;; | |
1130 | + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2 | |
1131 | + exit 1 | |
1132 | + ;; | |
1133 | + esac | |
1134 | + shift | |
1135 | +done | |
1136 | + | |
1137 | +getDistribution | |
1138 | + | |
1139 | +base.init | |
1140 | + | |
1141 | +pkgmgmt.initVariables | |
1142 | +rpm.initVariables | |
1143 | +poldek.initVariables | |
1144 | + | |
1145 | +base.initFilesystem "$OPTION_FORCE" | |
1146 | +pkgmgmt.initFilesystem "$OPTION_FORCE" | |
1147 | +rpm.initFilesystem | |
1148 | +poldek.initFilesystem | |
1149 | + | |
1150 | +setup_writeOption "$VSERVER_NAME" | |
1151 | +setup_writeInitialFstab | |
1152 | + | |
1153 | +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" | |
1154 | +rpm.initDB "$SETUP_CONFDIR" | |
1155 | +rpm.importGPGPubKeys "$SETUP_CONFDIR" \ | |
1156 | + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \ | |
1157 | + "$__CONFDIR/.distributions/.common/pubkeys" \ | |
1158 | + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys" | |
1159 | + | |
1160 | +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole | |
1161 | +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR" | |
1162 | +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" | |
1163 | + | |
1164 | +base.setSuccess |