1 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/Makefile.am util-vserver-0.30.209-poldek2/distrib/Makefile.am
2 --- util-vserver-0.30.209-clean/distrib/Makefile.am 2005-10-28 19:53:49.000000000 +0200
3 +++ util-vserver-0.30.209-poldek2/distrib/Makefile.am 2006-01-20 14:00:20.000000000 +0100
5 centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \
6 centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \
7 suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
10 + pld-ac/pkgs/01 pld-ac/rpm/macros pld-ac/rpmlist.d/00.lst
12 nobase_confdistrib_DATA = rh9/apt/sources.list \
13 fc1/apt/sources.list \
14 fc2/apt/sources.list \
15 fc3/apt/sources.list \
16 fc4/apt/sources.list \
17 - suse91/apt/sources.list
18 + suse91/apt/sources.list \
19 + pld-ac/poldek/aliases.conf \
20 + pld-ac/poldek/fetch.conf \
21 + pld-ac/poldek/pld-source.conf \
22 + pld-ac/poldek/poldek.conf \
23 + pld-ac/poldek/source.conf
25 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
26 = $(nobase_distrib_SCRIPTS)
28 ln -sf ../redhat/initpost $(DESTDIR)$(distribdir)/$$i/ && \
29 ln -sf ../redhat/initpre $(DESTDIR)$(distribdir)/$$i/; \
31 + POLDEKARCH=$(shell rpm -E '%{_target_cpu}' 2>/dev/null); \
32 + if [ -z "$$POLDEKARCH" ] ; then POLDEKARCH=$(shell uname -m) ; fi ; \
33 + sed "s|%ARCH%|$$POLDEKARCH|g" $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf > $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf.tmp ; \
34 + mv $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf.tmp $(DESTDIR)$(confdistribdir)/pld-ac/poldek/pld-source.conf
35 $(mkinstalldirs) $(DESTDIR)$(confdir) \
36 $(DESTDIR)$(confdistribdir)/.common/pubkeys \
37 $(DESTDIR)$(confdefaultsdir) \
38 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/pkgs/01 util-vserver-0.30.209-poldek2/distrib/pld-ac/pkgs/01
39 --- util-vserver-0.30.209-clean/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100
40 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/pkgs/01 2006-01-20 13:45:53.000000000 +0100
46 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/poldek/aliases.conf util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/aliases.conf
47 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/aliases.conf 1970-01-01 01:00:00.000000000 +0100
48 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/aliases.conf 2006-01-20 13:42:33.000000000 +0100
50 +# System wide aliases
58 +freshen = install -FN
61 +# for backward compatybility, greedy is on by default now
62 +greedy-upgrade = install -FG
64 +just-install = install -IN
67 +what-requires = search -r
68 +what-provides = search -p
69 +rsearch = search --perlre
74 +#ls = uninstall kernel
80 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/poldek/fetch.conf util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/fetch.conf
81 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/fetch.conf 1970-01-01 01:00:00.000000000 +0100
82 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/fetch.conf 2006-01-20 13:42:29.000000000 +0100
84 +# Configuration of poldek external file getters. Each [fetcher] section
85 +# declares one external downloader. The syntax is:
88 +# proto = PROTOCOL[ ,PROTOCOL... ]
89 +# cmd = CMD [OPTION...] DESTINATION-MACRO URL-MACRO
90 +# Possible parameters are:
93 +# Unique name of the fetcher. This is an optional parameter, if not set then
94 +# name is taken from the "cmd" parameter value as "$(basename $cmd)".
97 +# Protocol or protocols supported by fetcher. Name of the protocol can be
98 +# completely arbitrary, i.e. if you can handle protocol "foo" by writing
99 +# a script which takes URLs in form 'foo://'.
102 +# Parameter specifies an external command and its invoking syntax.
103 +# The syntax of "cmd" is:
104 +# cmd = COMMAND [ OPTION... ] {%d,%D} {%p,%P}[n]
105 +# Where COMMAND is the name or full path of command, OPTION is command specific
106 +# options. Macro '%d' is replaced with cache directory, '%D' is replaced with
107 +# 'cache directory/file basename', and '%p' with file basename, %P with file full
108 +# path (URL). Optional suffix 'n' with %p and %P means that command can be
109 +# invoked with multiple files at once.
110 +#cmd = foogetter.sh -N %D %Pn
112 +##Configured fetchers
115 +cmd = vfjuggle %d %Pn
118 +proto = http,ftp,https
119 +cmd = wget -N --dot-style=binary -P %d %Pn
131 +cmd = rsync -v %P %d
135 +cmd = vfsmb -v %P %d
139 +#cmd = vfssh.sh %d %Pn
143 +#cmd = foo.sh %d %Pn
146 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/poldek/pld-source.conf util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/pld-source.conf
147 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/pld-source.conf 1970-01-01 01:00:00.000000000 +0100
148 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/pld-source.conf 2006-01-20 13:44:14.000000000 +0100
151 +# PLD <http://www.pld-linux.org/>
154 +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
156 +## You can use them if you have better connection there
158 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
165 +type = %{_ac_idxtype}
167 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
170 +type = %{_ac_idxtype}
171 +name = ac-updates-security
172 +path = %{_pld_prefix}/updates/security/%{_pld_arch}/
175 +type = %{_ac_idxtype}
176 +name = ac-updates-general
177 +path = %{_pld_prefix}/updates/general/%{_pld_arch}/
181 +type = %{_ac_idxtype}
183 +path = %{_pld_prefix}/supported/%{_pld_arch}/
187 +type = %{_ac_idxtype}
189 +path = %{_pld_prefix}/ready/%{_pld_arch}/
193 +type = %{_ac_idxtype}
195 +path = %{_pld_prefix}/test/%{_pld_arch}/
197 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/poldek/poldek.conf util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/poldek.conf
198 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
199 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/poldek.conf 2006-01-20 13:44:46.000000000 +0100
201 +# poldek main configuration file.
203 +# Some macros. Macros are local, they are not visible in included files
204 +# and macros declared in them are not visible to includer.
205 +# Macros names starts with underscore '_'.
209 +# Both local and remote files may be included. Included files may not contain
210 +# [global] section, it will be ignored anyway.
211 +%include %{_distro}-source.conf
214 +%include source.conf
216 +# External downloaders configuration, not necessary in most cases, cause
217 +# to internal HTTP and FTP client.
218 +#%include fetch.conf
223 +# This parameter allows to configure the default repository index type.
224 +#default index type = pndir
226 +# Cache directory for downloaded files. NOTE: that parent directory of cachedir
228 +#cachedir = $HOME/.poldek-cache
230 +# Switch to ordinary user at startup when executed by root
233 +# Permits using root privileges for installation only. Automatically turned
234 +# on when poldek executed as ordinary user.
237 +# Load /etc/apt/sources.list.
238 +#load apt sources list = no
240 +# Handle gzipped indexes externally (needed on RedHat 9 and Fedora Core 1 and 2).
241 +# This option is a workaround for broken zlib linked into librpm; with enabled
242 +# 'auto zlib in rpm' poldek tries to detect such case and then enables external
243 +# *.gz handling automatically.
244 +#vfile external compress = no
246 +# Auto detection of zlib linked into librpm. See 'vfile external compress'
248 +#auto zlib in rpm = yes
250 +# Automatically download whole index if incremental update fails.
253 +# Do not save given paths into created indexes. This option may significantly
254 +# reduce index size. Example (notice missing starting '/'):
255 +# exclude path = usr/share/doc:usr/share/man:usr/src
258 +# Full path name to a PM (rpm for now) binary.
259 +#pm command = /bin/rpm
261 +# Full path name to sudo binary.
262 +#sudo command = /usr/bin/sudo
265 +### File downloaders configuration
267 +# Send ${USER}@${HOSTNAME} as anonymous FTP password (by default
268 +# 'poldek@znienacka.net' is sent)
269 +#vfile ftp sysuser as anon passwd = no
271 +# File getters configuration parameter. By this option URL handlers may be configured.
272 +# To get file from HTTP and FTP servers poldek uses its internal client (what is
273 +# recommended), although it can be changedby this option. Others protocols handled
274 +# by external utilities can be configured also. The syntax is:
275 +# default fetcher = PROTOCOL[,PROTOCOL...]:FETCHER_NAME
277 +# where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch]
278 +# sections (placed in fetch.conf in default configuration).
280 +# default fetcher = ftp,http:internal
281 +# default fetcher = https:wget
282 +# default fetcher = cdrom:vfjuggle
283 +# vfjuggle is a cdrom getter supplied with poldek.
284 +#default fetcher = http,ftp: internal
286 +# Proxies for internal FTP and HTTP client may be configured in usual
287 +# way, by environment variables ftp_proxy and http_proxy, or by this option.
288 +# Its syntax is similar to "default fetcher" one:
289 +# proxy = PROTOCOL[,PROTOCOL...]:PROXY_URL
291 +# proxy = http: http://w3cache.foo.org:8080
294 +# Comma separated list of hosts or domains which will not be accessed via proxy.
295 +# Option overrides no_proxy environment variable.
297 +# noproxy = localhost, .pl, ftp.foo.bar.org
300 +# Internal HTTP and FTP client is stubborn, it retries to retrive
301 +# file if connection breaks. This option tells it how many times
303 +#vfile retries = 128
306 +### Installation options
308 +# Install packages in small groups instead of doing all-or-nothing
310 +particle install = no
312 +# Do not remove downloaded packages after its successful installation.
313 +#keep downloads = no
315 +# Controls visibility of multiple package instances with different EVR.
316 +# If on, only one, highest version will be visible.
317 +#unique package names = no
319 +# Epoch autopromotion during dependency comparision. RPM specific.
320 +# Set it up if you are using system with rpm prior to 4.2.1 version.
323 +# Confirm packages installation.
324 +#confirm installation = no
326 +# Confirm packages removal.
327 +#confirm removal = yes
329 +# Let the user select package among equivalents.
330 +#choose equivalents manually = no
332 +# Prevent package listed from being upgraded if they are already installed.
333 +# hold = kernel* dev
336 +# Ignore package list - packages fits given mask will be invisible.
337 +# ignore = *-smp-* foo*
338 +ignore = kernel* udev devfs
340 +# Conflicts with already installed packages are treated as resolved
341 +# if at least one of multiple-installed package satisfies conflict.
342 +# rpm doesn't support such cases, so --pm-nodeps is needed (use with
344 +#allow duplicates = yes
347 +### RPM specific options
349 +# rpm macros can be set by this option. Examples:
350 +# rpmdef = _install_langs pl:pl_PL:lt:lt_LT
351 +# Do not install any documentation:
352 +# rpmdef = _netsharedpath /usr/share/info:/usr/share/man
353 +# rpmdef = _excludedocs 1
357 +### Dependency processing settings
358 +# Subtle dependency processing options, they should not be changed
359 +# unless you know what you are doing
361 +# Automatically install packages required by installed ones.
364 +# Greedy upgrades, i.e. upgrade packages which dependencies are broken
365 +# by being uninstalled ones.
368 +# Be yet more greedy; if successor of orphaned package found, and this
369 +# successor drags no packages then upgrade the package instead of process
370 +# its dependencies. Option value is implied by 'greedy' one by defalut.
371 +#aggressive greedy = yes
373 +# Be tolerant for unmatched versioned dependencies which rpm tolerates, e.g.
374 +# package A requires capability foo >= 1.0 while package B provides "foo"
375 +# without any version. Use with care, it may cause weird dependency errors.
378 +# Taking into account package Obsoletes.
381 +# Taking into account package Conflicts.
383 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/poldek/source.conf util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/source.conf
384 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/source.conf 1970-01-01 01:00:00.000000000 +0100
385 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/source.conf 2006-01-20 13:42:29.000000000 +0100
387 +# Sample poldek sources configuration
388 +# Every source is configured in his own [source] section.
389 +# Possible parameters are:
392 +# Unique name of the repository.
395 +# Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum'
396 +# and 'dir' as listed by --stl switch.
399 +# This parameter sets index original type i.e type of repository
400 +# from what this repository is created. Default is 'dir' - means
401 +# that directory of packages is scanned.
402 +#original type = dir
404 +# Unique name of the repository. May be either path or URL.
405 +#path = /some/url/or/dir
407 +# If package index and packages are stored in different locations then
408 +# prefix stands for packages path.
409 +#prefix = /some/url/or/dir
411 +# Controls visibility of multiple package instances with different EVR.
412 +# If on, only one, highest version will be visible.
415 +# Repository priority. If the same packages (equal names and EVR)
416 +# are available in more than one source then package from highest
417 +# prioritized source are taken. Priority is numeric value. Lower number
418 +# means higher priority, and negative priorities are allowed.
419 +# Priority is numeric value.
422 +# Controling if repository index will be implicit loaded. Set it off if
423 +# the index should be loaded on demand only, i.e. if specified directly
427 +# Controls if repository index will be implicit updated. Set it off if
428 +# the index should be updated on demand only, i.e. if specified directly
432 +# Packages PGP/GPG signatures (if any) will be verified before their
436 +# Have the same meaning as [global] parameter. Example:
437 +# hold = kernel* dev
440 +# Have the same meaning as [global] parameter. Example:
441 +# ignore = kernel*smp* dev
444 +# Parameter have the same meaning as [global] parameter.
445 +# exclude path = usr/share/doc:usr/share/man:usr/src
448 +# Preferred language of package descriptions. If not set, taken from locale
449 +# settings. Example:
450 +# lang = pl_PL:lt_LT
456 +path = $HOME/rpm/RPMS
463 +#path = ftp://ftp.foo.bar.org/RPMS/
469 +#ignore = kernel*-smp-*
472 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/rpm/macros util-vserver-0.30.209-poldek2/distrib/pld-ac/rpm/macros
473 --- util-vserver-0.30.209-clean/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
474 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/rpm/macros 2006-01-20 13:45:53.000000000 +0100
476 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
477 +# you have to use at least one language beside 'C'
478 +%_install_langs C:en:pl
479 +%_netsharedpath /dev
480 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/distrib/pld-ac/rpmlist.d/00.lst util-vserver-0.30.209-poldek2/distrib/pld-ac/rpmlist.d/00.lst
481 --- util-vserver-0.30.209-clean/distrib/pld-ac/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100
482 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/rpmlist.d/00.lst 2006-01-20 13:45:53.000000000 +0100
493 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/Makefile-files util-vserver-0.30.209-poldek2/scripts/Makefile-files
494 --- util-vserver-0.30.209-clean/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200
495 +++ util-vserver-0.30.209-poldek2/scripts/Makefile-files 2006-01-20 13:45:53.000000000 +0100
497 scripts/vapt-get-worker \
498 scripts/vrpm-worker \
499 scripts/vyum-worker \
500 + scripts/vpoldek-worker \
501 scripts/vrpm-preload \
502 scripts/save_s_context \
503 scripts/vservers.grabinfo.sh \
505 scripts/vserver-build.debootstrap \
506 scripts/vserver-build.rpm \
507 scripts/vserver-build.yum \
508 + scripts/vserver-build.poldek \
509 scripts/vserver-build.functions \
510 scripts/vserver-build.functions.apt \
511 scripts/vserver-build.functions.rpm \
512 scripts/vserver-build.functions.pkgmgmt \
513 scripts/vserver-build.functions.yum \
514 + scripts/vserver-build.functions.poldek \
515 scripts/vserver-setup.functions \
516 scripts/vserver.functions \
517 scripts/vserver.start \
519 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
520 scripts/vapt-get-worker \
522 + scripts/vpoldek-worker \
523 scripts/vrpm-worker \
524 scripts/vrpm-preload \
525 scripts/start-vservers \
528 scripts_sbin_src_PRGS = scripts/chcontext \
534 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/functions util-vserver-0.30.209-poldek2/scripts/functions
535 --- util-vserver-0.30.209-clean/scripts/functions 2005-10-28 19:59:37.000000000 +0200
536 +++ util-vserver-0.30.209-poldek2/scripts/functions 2006-01-20 16:46:03.000000000 +0100
541 +function _pkgSetVarsPoldek
543 + if test -n "$PKGDIR"; then
544 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
545 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
547 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
548 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
551 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
552 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
556 function _pkgMountBase
559 rpm) _pkgSetVarsRPM;;
560 apt) _pkgSetVarsApt;;
561 yum) _pkgSetVarsYum;;
562 + poldek) _pkgSetVarsPoldek;;
563 *) echo "Unknown packaging flavor" >&2; exit 1;;
568 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
570 + elif test -e "$_pgs_vdir"/etc/pld-release; then
572 elif test -e "$_pgs_vdir"/etc/debian_version; then
574 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
576 test -n "$have_yum" && return 0 || return 1
579 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
580 +function pkgmgmt.isPoldekAvailable
584 + local is_internal="$3"
586 + local have_poldek i
587 + if test -n "$is_internal"; then
589 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
592 + for i in /bin /usr/bin /usr/local/bin; do
593 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
597 + test -n "$have_poldek" && return 0 || return 1
601 function vshelper.doSanityCheck
603 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/pkgmgmt util-vserver-0.30.209-poldek2/scripts/pkgmgmt
604 --- util-vserver-0.30.209-clean/scripts/pkgmgmt 2005-07-03 19:43:34.000000000 +0200
605 +++ util-vserver-0.30.209-poldek2/scripts/pkgmgmt 2006-01-20 14:40:48.000000000 +0100
610 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
611 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
612 hasSubstring "$pkgs" ---rpm--- || {
614 * The vserver does not seem to have the 'rpm' package which is required
619 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
620 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
622 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
623 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
624 installed. It is suggested to install such a program before setting
625 up internal package management."
627 @@ -366,6 +366,131 @@
631 +function processVserver_PLD()
634 + local is_internalize=$2
638 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
639 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
641 + ## Figure out the environment....
642 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
644 + local POLDEKETCDIR=
645 + local POLDEKCACHEDIR=
649 + ## Create directories and assign variables where configuration
650 + ## can/will be found on the host
651 + if test -n "$is_internalize"; then
652 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
654 +Can not continue; use '--force' to override this check"
656 + pushd "$vdir" >/dev/null
658 + test ! -L var/lib/rpm || {
659 + $_EXEC_CD /var/lib $_RM rpm &&
660 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
661 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
663 + } </dev/null 2>/dev/null
665 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
667 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
672 + if test -n "$have_poldek"; then
673 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
676 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
677 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
679 + mkdir -m755 -p "$cfgdir"
682 + if test -n "$have_poldek"; then
683 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
684 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
686 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
687 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
689 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
692 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
693 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
695 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
696 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
698 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
699 + test ! -e "$cfgdir"/base || need_base=
701 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
703 + mkdir -m755 -p "$PKGCFGDIR"
704 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
705 + "$RPMETCDIR" "$RPMSTATEDIR"
708 + ## Copy the files...
709 + if test -n "$is_internalize"; then
710 + if test -n "$have_poldek"; then
711 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
712 + pushd "$vdir" >/dev/null
713 + _hashAuto /etc/poldek.conf '/'
717 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
718 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
720 + pushd "$vdir" >/dev/null
721 + ## remove %_dbpath settings
722 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
725 + if test -n "$have_poldek"; then
726 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
727 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
730 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
731 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
733 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
737 + if test -n "$is_internalize"; then
740 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
741 + trap "$_RM -rf $tmpdir" EXIT
742 + pushd "$vdir" >/dev/null
743 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
744 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
749 + if test -n "$is_internalize"; then
750 + $_TOUCH "$cfgdir"/internal
752 + $_RM -f "$cfgdir"/internal
756 function processVserver_Debian()
762 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
763 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
764 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
766 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
767 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/util-vserver-vars.pathsubst util-vserver-0.30.209-poldek2/scripts/util-vserver-vars.pathsubst
768 --- util-vserver-0.30.209-clean/scripts/util-vserver-vars.pathsubst 2005-07-03 19:43:55.000000000 +0200
769 +++ util-vserver-0.30.209-poldek2/scripts/util-vserver-vars.pathsubst 2006-01-20 13:45:53.000000000 +0100
771 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
772 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
773 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
774 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
775 _LISTDEVIP="$__LEGACYDIR/listdevip"
776 _LOCKFILE="$__PKGLIBDIR/lockfile"
777 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
779 _VUNIFY="$__PKGLIBDIR/vunify"
780 _VYUM="$__SBINDIR/vyum"
781 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
782 +_VPOLDEK="$__SBINDIR/vpoldek"
783 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
787 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpkg util-vserver-0.30.209-poldek2/scripts/vpkg
788 --- util-vserver-0.30.209-clean/scripts/vpkg 2005-03-21 21:03:30.000000000 +0100
789 +++ util-vserver-0.30.209-poldek2/scripts/vpkg 2006-01-20 13:45:53.000000000 +0100
798 + ## rpm outputs sometimes '(contains no files)', so return
799 + ## only the valid output
801 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
803 + rpm_param=( -Uvh "$@" )
804 + poldek_param=( --install -v "$@" )
808 + if test -n "$is_external"; then
810 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
813 + for i in /bin /usr/bin /usr/local/bin; do
814 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
818 + if test -n "$is_external"; then
819 + if test "$have_poldek" -a "$poldek_param"; then
820 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
822 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
825 + if test "$have_poldek" -a "$poldek_param"; then
826 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
828 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
835 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpoldek util-vserver-0.30.209-poldek2/scripts/vpoldek
836 --- util-vserver-0.30.209-clean/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
837 +++ util-vserver-0.30.209-poldek2/scripts/vpoldek 2006-01-20 13:45:53.000000000 +0100
842 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
844 +# This program is free software; you can redistribute it and/or modify
845 +# it under the terms of the GNU General Public License as published by
846 +# the Free Software Foundation; version 2 of the License.
848 +# This program is distributed in the hope that it will be useful,
849 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
850 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
851 +# GNU General Public License for more details.
853 +# You should have received a copy of the GNU General Public License
854 +# along with this program; if not, write to the Free Software
855 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
857 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
858 +test -e "$UTIL_VSERVER_VARS" || {
859 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
862 +. "$UTIL_VSERVER_VARS"
869 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
871 +Report bugs to <$PACKAGE_BUGREPORT>."
875 +function showVersion()
878 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
879 +This program is part of $PACKAGE_STRING
881 +Copyright (C) 2003 Enrico Scholz
882 +This program is free software; you may redistribute it under the terms of
883 +the GNU General Public License. This program has absolutely no warranty."
888 +declare -a vservers=()
890 +while test "$#" -ge 1; do
893 + --help) showHelp $0;;
894 + --quiet|-q) is_quiet=1 ;;
897 + vservers=( "${vservers[@]}" "${tmp[@]}" )
901 + *) vservers=( "${vservers[@]}" "$1" )
908 +for i in "${vservers[@]}"; do
911 + test -n "$is_quiet" || {
912 + colorize bold echo -n "vpoldek: operating on vserver "
913 + colorize bold colorize emph echo "$i"
914 + xtermTitle "vpoldek: operating on vserver '$i' [$cnt/${#vservers[@]}]"
917 + if pkgmgmt.isInternal "$i"; then
918 + $_VSERVER "$i" exec poldek "$@"
920 + callInNamespace "$i" \
921 + "$_VNAMESPACE" --new -- "$_VPOLDEK_WORKER" "$i" "$@"
925 + test $res -eq 0 -o -n "$is_quiet" || {
926 + colorize error echo -n $"vpoldek failed on vserver '$i' with errorcode $res"
930 + test -n "$is_quiet" || echo
933 +test "$cnt" -ge 0 || echo "No vservers specified" >&2
935 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpoldek-worker util-vserver-0.30.209-poldek2/scripts/vpoldek-worker
936 --- util-vserver-0.30.209-clean/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
937 +++ util-vserver-0.30.209-poldek2/scripts/vpoldek-worker 2006-01-20 13:45:53.000000000 +0100
942 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
944 +# This program is free software; you can redistribute it and/or modify
945 +# it under the terms of the GNU General Public License as published by
946 +# the Free Software Foundation; version 2 of the License.
948 +# This program is distributed in the hope that it will be useful,
949 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
950 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
951 +# GNU General Public License for more details.
953 +# You should have received a copy of the GNU General Public License
954 +# along with this program; if not, write to the Free Software
955 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
959 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
960 +test -e "$UTIL_VSERVER_VARS" || {
961 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
964 +. "$UTIL_VSERVER_VARS"
971 +pkgInit "$vserver" rpm poldek
973 +test -z "$_POLDEK" || {
974 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
975 + ${POLDEK:=$_POLDEK}
978 +exec ${_POLDEK:-poldek} \
980 + --cachedir=$POLDEKCACHEDIR \
981 + --conf=$POLDEK_CONFIG \
982 + --pmcmd=$RPM_BINARY \
984 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vserver-build util-vserver-0.30.209-poldek2/scripts/vserver-build
985 --- util-vserver-0.30.209-clean/scripts/vserver-build 2006-01-20 13:45:34.000000000 +0100
986 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build 2006-01-20 13:45:53.000000000 +0100
988 yum ... -- -d <distribution>
989 ... installs the base-packages of the given distribution with
991 + poldek ... -- -d <distribution>
992 + ... installs the base-packages of the given distribution with
994 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
995 ... installs lists of rpm-packages
996 skeleton ... -- [<cmd> <args>*]
1000 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
1001 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm)
1002 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xpoldek)
1003 . $__PKGLIBDIR/vserver-build.$method
1005 (x) panic $"No build-method specified";;
1006 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vserver-build.functions util-vserver-0.30.209-poldek2/scripts/vserver-build.functions
1007 --- util-vserver-0.30.209-clean/scripts/vserver-build.functions 2005-10-28 20:40:39.000000000 +0200
1008 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.functions 2006-01-20 13:55:09.000000000 +0100
1009 @@ -137,6 +137,12 @@
1010 elif test -e /etc/slackware-release; then
1011 set -- $(cat /etc/slackware-release)
1012 DISTRIBUTION=slackware$2
1013 + elif test -e /etc/pld-release; then
1016 + set -- $(cat /etc/pld-release)
1017 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
1019 elif test -n "$1"; then
1022 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vserver-build.functions.poldek util-vserver-0.30.209-poldek2/scripts/vserver-build.functions.poldek
1023 --- util-vserver-0.30.209-clean/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
1024 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.functions.poldek 2006-01-20 14:47:58.000000000 +0100
1026 +# $Id$ --*- sh -*--
1028 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1030 +# This program is free software; you can redistribute it and/or modify
1031 +# it under the terms of the GNU General Public License as published by
1032 +# the Free Software Foundation; version 2 of the License.
1034 +# This program is distributed in the hope that it will be useful,
1035 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1036 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1037 +# GNU General Public License for more details.
1039 +# You should have received a copy of the GNU General Public License
1040 +# along with this program; if not, write to the Free Software
1041 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1043 +function poldek.installBasePackages
1048 + test "$dir" != / || return 0
1049 + for filelist in "$dir"/*; do
1050 + isRegularFile "$filelist" || continue
1052 + local can_fail=false
1053 + local flags='--install'
1055 + set -- $(<$filelist)
1056 + while test "$#" -gt 0; do
1058 + --reinstall) flags='--reinstall';;
1059 + --can-fail) can_fail=true;;
1064 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
1068 +function poldek.initVariables
1070 + findFile POLDEKCONFDEFAULT \
1071 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
1072 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
1073 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
1074 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
1078 +function poldek.initFilesystem
1080 + mkdir -p "$PKGCFGDIR"/poldek/etc
1081 + mkdir -p "$PKGCFGBASE"/poldek-cache
1083 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
1085 + populateDirectory "$PKGCFGDIR/poldek/etc" \
1086 + "$__DISTRIBDIR/defaults/poldek" \
1087 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
1088 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
1090 +# test -z "$POLDEKCONFDEFAULT" || \
1091 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
1093 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vserver-build.poldek util-vserver-0.30.209-poldek2/scripts/vserver-build.poldek
1094 --- util-vserver-0.30.209-clean/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
1095 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.poldek 2006-01-20 13:45:53.000000000 +0100
1097 +# $Id$ --*- sh -*--
1099 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1101 +# This program is free software; you can redistribute it and/or modify
1102 +# it under the terms of the GNU General Public License as published by
1103 +# the Free Software Foundation; version 2 of the License.
1105 +# This program is distributed in the hope that it will be useful,
1106 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1107 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1108 +# GNU General Public License for more details.
1110 +# You should have received a copy of the GNU General Public License
1111 +# along with this program; if not, write to the Free Software
1112 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1114 +tmp=$(getopt -o +d: --long debug -n "$0" -- "$@") || exit 1
1117 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
1118 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
1119 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
1123 + (-d) DISTRIBUTION=$2; shift;;
1124 + (--debug) set -x;;
1125 + (--) shift; break ;;
1126 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
1137 +pkgmgmt.initVariables
1139 +poldek.initVariables
1141 +base.initFilesystem "$OPTION_FORCE"
1142 +pkgmgmt.initFilesystem "$OPTION_FORCE"
1144 +poldek.initFilesystem
1146 +setup_writeOption "$VSERVER_NAME"
1147 +setup_writeInitialFstab
1149 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
1150 +rpm.initDB "$SETUP_CONFDIR"
1151 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
1152 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
1153 + "$__CONFDIR/.distributions/.common/pubkeys" \
1154 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
1156 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
1157 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
1158 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"