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