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) \
7 suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
9 + suse91/rpm/macros pld-ac/pkgs/01 pld-ac/rpm/macros \
10 + pld-ac/rpmlist.d/00.lst
12 nobase_confdistrib_DATA = rh9/apt/sources.list \
13 fc1/apt/sources.list \
14 @@ -67,7 +68,13 @@ nobase_confdistrib_DATA = rh9/apt/sourc
15 fc4/apt/sources.list \
16 fc5/apt/sources.list \
17 fc6/apt/sources.list \
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 \
24 + pld-ac/poldek/source.conf
27 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
28 = $(nobase_distrib_SCRIPTS)
29 @@ -87,6 +94,10 @@ install-data-xtras:
30 ln -sf ../redhat/initpost $(DESTDIR)$(distribdir)/$$i/ && \
31 ln -sf ../redhat/initpre $(DESTDIR)$(distribdir)/$$i/; \
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
37 $(mkinstalldirs) $(DESTDIR)$(confdir) \
38 $(DESTDIR)$(confdistribdir)/.common/pubkeys \
39 $(DESTDIR)$(confdefaultsdir) \
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
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
53 +# System wide aliases
61 +freshen = install -FN
64 +# for backward compatybility, greedy is on by default now
65 +greedy-upgrade = install -FG
67 +just-install = install -IN
70 +what-requires = search -r
71 +what-provides = search -p
72 +rsearch = search --perlre
77 +#ls = uninstall kernel
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
87 +# Configuration of poldek external file getters. Each [fetcher] section
88 +# declares one external downloader. The syntax is:
91 +# proto = PROTOCOL[ ,PROTOCOL... ]
92 +# cmd = CMD [OPTION...] DESTINATION-MACRO URL-MACRO
93 +# Possible parameters are:
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)".
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://'.
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
115 +##Configured fetchers
118 +cmd = vfjuggle %d %Pn
121 +proto = http,ftp,https
122 +cmd = wget -N --dot-style=binary -P %d %Pn
134 +cmd = rsync -v %P %d
138 +cmd = vfsmb -v %P %d
142 +#cmd = vfssh.sh %d %Pn
146 +#cmd = foo.sh %d %Pn
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
154 +# PLD <http://www.pld-linux.org/>
157 +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
159 +## You can use them if you have better connection there
161 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
168 +type = %{_ac_idxtype}
170 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
173 +type = %{_ac_idxtype}
174 +name = ac-updates-security
175 +path = %{_pld_prefix}/updates/security/%{_pld_arch}/
178 +type = %{_ac_idxtype}
179 +name = ac-updates-general
180 +path = %{_pld_prefix}/updates/general/%{_pld_arch}/
184 +type = %{_ac_idxtype}
186 +path = %{_pld_prefix}/supported/%{_pld_arch}/
190 +type = %{_ac_idxtype}
192 +path = %{_pld_prefix}/ready/%{_pld_arch}/
196 +type = %{_ac_idxtype}
198 +path = %{_pld_prefix}/test/%{_pld_arch}/
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
204 +# poldek main configuration file.
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 '_'.
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
217 +%include source.conf
219 +# External downloaders configuration, not necessary in most cases, cause
220 +# to internal HTTP and FTP client.
221 +#%include fetch.conf
226 +# This parameter allows to configure the default repository index type.
227 +#default index type = pndir
229 +# Cache directory for downloaded files. NOTE: that parent directory of cachedir
231 +#cachedir = $HOME/.poldek-cache
233 +# Switch to ordinary user at startup when executed by root
236 +# Permits using root privileges for installation only. Automatically turned
237 +# on when poldek executed as ordinary user.
240 +# Load /etc/apt/sources.list.
241 +#load apt sources list = no
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
249 +# Auto detection of zlib linked into librpm. See 'vfile external compress'
251 +#auto zlib in rpm = yes
253 +# Automatically download whole index if incremental update fails.
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
261 +# Full path name to a PM (rpm for now) binary.
262 +#pm command = /bin/rpm
264 +# Full path name to sudo binary.
265 +#sudo command = /usr/bin/sudo
268 +### File downloaders configuration
270 +# Send ${USER}@${HOSTNAME} as anonymous FTP password (by default
271 +# 'poldek@znienacka.net' is sent)
272 +#vfile ftp sysuser as anon passwd = no
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
280 +# where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch]
281 +# sections (placed in fetch.conf in default configuration).
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
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
294 +# proxy = http: http://w3cache.foo.org:8080
297 +# Comma separated list of hosts or domains which will not be accessed via proxy.
298 +# Option overrides no_proxy environment variable.
300 +# noproxy = localhost, .pl, ftp.foo.bar.org
303 +# Internal HTTP and FTP client is stubborn, it retries to retrive
304 +# file if connection breaks. This option tells it how many times
306 +#vfile retries = 128
309 +### Installation options
311 +# Install packages in small groups instead of doing all-or-nothing
313 +particle install = no
315 +# Do not remove downloaded packages after its successful installation.
316 +#keep downloads = no
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
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.
326 +# Confirm packages installation.
327 +#confirm installation = no
329 +# Confirm packages removal.
330 +#confirm removal = yes
332 +# Let the user select package among equivalents.
333 +choose equivalents manually = yes
335 +# Prevent package listed from being upgraded if they are already installed.
336 +# hold = kernel* dev
339 +# Ignore package list - packages fits given mask will be invisible.
340 +# ignore = *-smp-* foo*
341 +ignore = kernel* udev devfs
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
347 +#allow duplicates = yes
350 +### RPM specific options
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
360 +### Dependency processing settings
361 +# Subtle dependency processing options, they should not be changed
362 +# unless you know what you are doing
364 +# Automatically install packages required by installed ones.
367 +# Greedy upgrades, i.e. upgrade packages which dependencies are broken
368 +# by being uninstalled ones.
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
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.
381 +# Taking into account package Obsoletes.
384 +# Taking into account package Conflicts.
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
390 +# Sample poldek sources configuration
391 +# Every source is configured in his own [source] section.
392 +# Possible parameters are:
395 +# Unique name of the repository.
398 +# Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum'
399 +# and 'dir' as listed by --stl switch.
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
407 +# Unique name of the repository. May be either path or URL.
408 +#path = /some/url/or/dir
410 +# If package index and packages are stored in different locations then
411 +# prefix stands for packages path.
412 +#prefix = /some/url/or/dir
414 +# Controls visibility of multiple package instances with different EVR.
415 +# If on, only one, highest version will be visible.
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.
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
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
435 +# Packages PGP/GPG signatures (if any) will be verified before their
439 +# Have the same meaning as [global] parameter. Example:
440 +# hold = kernel* dev
443 +# Have the same meaning as [global] parameter. Example:
444 +# ignore = kernel*smp* dev
447 +# Parameter have the same meaning as [global] parameter.
448 +# exclude path = usr/share/doc:usr/share/man:usr/src
451 +# Preferred language of package descriptions. If not set, taken from locale
452 +# settings. Example:
453 +# lang = pl_PL:lt_LT
459 +path = $HOME/rpm/RPMS
466 +#path = ftp://ftp.foo.bar.org/RPMS/
472 +#ignore = kernel*-smp-*
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
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
482 +%_netsharedpath /dev
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
496 +vserver-packages-*.rpm
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
504 +function _pkgSetVarsPoldek
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
510 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
511 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
514 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
515 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
519 function _pkgMountBase
521 @@ -467,6 +481,7 @@ function pkgInit
522 rpm) _pkgSetVarsRPM;;
523 apt) _pkgSetVarsApt;;
524 yum) _pkgSetVarsYum;;
525 + poldek) _pkgSetVarsPoldek;;
526 *) echo "Unknown packaging flavor" >&2; exit 1;;
529 @@ -750,6 +765,8 @@ function pkgmgmt.guessStyle()
531 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
533 + elif test -e "$_pgs_vdir"/etc/pld-release; then
535 elif test -e "$_pgs_vdir"/etc/debian_version; then
537 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
538 @@ -817,6 +834,27 @@ function pkgmgmt.isYumAvailable
539 test -n "$have_yum" && return 0 || return 1
542 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
543 +function pkgmgmt.isPoldekAvailable
547 + local is_internal="$3"
549 + local have_poldek i
550 + if test -n "$is_internal"; then
552 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
555 + for i in /bin /usr/bin /usr/local/bin; do
556 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
560 + test -n "$have_poldek" && return 0 || return 1
564 function vshelper.doSanityCheck
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 \
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 \
604 scripts/vdispatch-conf \
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:
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--- || {
618 * The vserver does not seem to have the 'rpm' package which is required
619 @@ -205,9 +205,9 @@ packagemanagement:
623 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
624 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
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."
631 @@ -368,6 +368,131 @@ Can not continue; use '--force' to overr
635 +function processVserver_PLD()
638 + local is_internalize=$2
642 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
643 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
645 + ## Figure out the environment....
646 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
648 + local POLDEKETCDIR=
649 + local POLDEKCACHEDIR=
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" ||
658 +Can not continue; use '--force' to override this check"
660 + pushd "$vdir" >/dev/null
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 ||
667 + } </dev/null 2>/dev/null
669 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
671 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
676 + if test -n "$have_poldek"; then
677 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
680 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
681 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
683 + mkdir -m755 -p "$cfgdir"
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 /
690 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
691 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
693 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
696 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
697 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
699 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
700 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
702 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
703 + test ! -e "$cfgdir"/base || need_base=
705 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
707 + mkdir -m755 -p "$PKGCFGDIR"
708 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
709 + "$RPMETCDIR" "$RPMSTATEDIR"
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 '/'
721 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
722 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
724 + pushd "$vdir" >/dev/null
725 + ## remove %_dbpath settings
726 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
729 + if test -n "$have_poldek"; then
730 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
731 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
734 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
735 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
737 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
741 + if test -n "$is_internalize"; then
744 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
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
753 + if test -n "$is_internalize"; then
754 + $_TOUCH "$cfgdir"/internal
756 + $_RM -f "$cfgdir"/internal
760 function processVserver_Debian()
763 @@ -417,6 +542,7 @@ function processVserver()
766 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
767 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
768 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
770 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
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
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"
782 @@ -99,6 +100,8 @@ _VUNAME="$__SBINDIR/vuname"
783 _VUNIFY="$__PKGLIBDIR/vunify"
784 _VYUM="$__SBINDIR/vyum"
785 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
786 +_VPOLDEK="$__SBINDIR/vpoldek"
787 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
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
802 + ## rpm outputs sometimes '(contains no files)', so return
803 + ## only the valid output
805 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
807 + rpm_param=( -Uvh "$@" )
808 + poldek_param=( --install -v "$@" )
812 + if test -n "$is_external"; then
814 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
817 + for i in /bin /usr/bin /usr/local/bin; do
818 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
822 + if test -n "$is_external"; then
823 + if test "$have_poldek" -a "$poldek_param"; then
824 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
826 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
829 + if test "$have_poldek" -a "$poldek_param"; then
830 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
832 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
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
846 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
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
866 +. "$UTIL_VSERVER_VARS"
873 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
875 +Report bugs to <$PACKAGE_BUGREPORT>."
879 +function showVersion()
882 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
883 +This program is part of $PACKAGE_STRING
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."
892 +declare -a vservers=()
894 +while test "$#" -ge 1; do
897 + --help) showHelp $0;;
898 + --quiet|-q) is_quiet=1 ;;
901 + vservers=( "${vservers[@]}" "${tmp[@]}" )
905 + *) vservers=( "${vservers[@]}" "$1" )
912 +for i in "${vservers[@]}"; do
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[@]}]"
921 + if pkgmgmt.isInternal "$i"; then
922 + $_VSERVER "$i" exec poldek "$@"
924 + callInNamespace "$i" \
925 + "$_VNAMESPACE" --new -- "$_VPOLDEK_WORKER" "$i" "$@"
929 + test $res -eq 0 -o -n "$is_quiet" || {
930 + colorize error echo -n $"vpoldek failed on vserver '$i' with errorcode $res"
934 + test -n "$is_quiet" || echo
937 +test "$cnt" -ge 0 || echo "No vservers specified" >&2
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
946 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
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
968 +. "$UTIL_VSERVER_VARS"
975 +pkgInit "$vserver" rpm poldek
977 +test -z "$_POLDEK" || {
978 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
979 + ${POLDEK:=$_POLDEK}
982 +exec ${_POLDEK:-poldek} \
984 + --cachedir=$POLDEKCACHEDIR \
985 + --conf=$POLDEK_CONFIG \
986 + --pmcmd=$RPM_BINARY \
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>
993 ... installs the base-packages of the given distribution with
995 + poldek ... -- -d <distribution>
996 + ... installs the base-packages of the given distribution with
998 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
999 ... installs lists of rpm-packages
1000 skeleton ... -- [<cmd> <args>*]
1001 @@ -134,7 +137,7 @@ setup_setDefaults "$VSERVER_NAME"
1004 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
1005 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync)
1006 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xpoldek)
1007 . $__PKGLIBDIR/vserver-build.$method
1009 (x) panic $"No build-method specified";;
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)
1016 DISTRIBUTION=slackware$2
1017 + elif test -e /etc/pld-release; then
1020 + set -- $(cat /etc/pld-release)
1021 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
1023 elif test -n "$1"; then
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
1030 +# $Id$ --*- sh -*--
1032 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
1047 +function poldek.installBasePackages
1052 + test "$dir" != / || return 0
1053 + for filelist in "$dir"/*; do
1054 + isRegularFile "$filelist" || continue
1056 + local can_fail=false
1057 + local flags='--install'
1059 + set -- $(<$filelist)
1060 + while test "$#" -gt 0; do
1062 + --reinstall) flags='--reinstall';;
1063 + --can-fail) can_fail=true;;
1068 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
1072 +function poldek.initVariables
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" \
1082 +function poldek.initFilesystem
1084 + mkdir -p "$PKGCFGDIR"/poldek/etc
1085 + mkdir -p "$PKGCFGBASE"/poldek-cache
1087 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
1089 + populateDirectory "$PKGCFGDIR/poldek/etc" \
1090 + "$__DISTRIBDIR/defaults/poldek" \
1091 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
1092 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
1094 +# test -z "$POLDEKCONFDEFAULT" || \
1095 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
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
1101 +# $Id$ --*- sh -*--
1103 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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.
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.
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.
1118 +tmp=$(getopt -o +d: --long debug -n "$0" -- "$@") || exit 1
1121 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
1122 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
1123 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
1127 + (-d) DISTRIBUTION=$2; shift;;
1128 + (--debug) set -x;;
1129 + (--) shift; break ;;
1130 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
1141 +pkgmgmt.initVariables
1143 +poldek.initVariables
1145 +base.initFilesystem "$OPTION_FORCE"
1146 +pkgmgmt.initFilesystem "$OPTION_FORCE"
1148 +poldek.initFilesystem
1150 +setup_writeOption "$VSERVER_NAME"
1151 +setup_writeInitialFstab
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"
1160 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
1161 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
1162 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"