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
47 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
48 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/aliases.conf 1970-01-01 01:00:00.000000000 +0100
49 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/aliases.conf 2006-01-20 13:42:33.000000000 +0100
51 +# System wide aliases
59 +freshen = install -FN
62 +# for backward compatybility, greedy is on by default now
63 +greedy-upgrade = install -FG
65 +just-install = install -IN
68 +what-requires = search -r
69 +what-provides = search -p
70 +rsearch = search --perlre
75 +#ls = uninstall kernel
81 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
82 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/fetch.conf 1970-01-01 01:00:00.000000000 +0100
83 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/fetch.conf 2006-01-20 13:42:29.000000000 +0100
85 +# Configuration of poldek external file getters. Each [fetcher] section
86 +# declares one external downloader. The syntax is:
89 +# proto = PROTOCOL[ ,PROTOCOL... ]
90 +# cmd = CMD [OPTION...] DESTINATION-MACRO URL-MACRO
91 +# Possible parameters are:
94 +# Unique name of the fetcher. This is an optional parameter, if not set then
95 +# name is taken from the "cmd" parameter value as "$(basename $cmd)".
98 +# Protocol or protocols supported by fetcher. Name of the protocol can be
99 +# completely arbitrary, i.e. if you can handle protocol "foo" by writing
100 +# a script which takes URLs in form 'foo://'.
103 +# Parameter specifies an external command and its invoking syntax.
104 +# The syntax of "cmd" is:
105 +# cmd = COMMAND [ OPTION... ] {%d,%D} {%p,%P}[n]
106 +# Where COMMAND is the name or full path of command, OPTION is command specific
107 +# options. Macro '%d' is replaced with cache directory, '%D' is replaced with
108 +# 'cache directory/file basename', and '%p' with file basename, %P with file full
109 +# path (URL). Optional suffix 'n' with %p and %P means that command can be
110 +# invoked with multiple files at once.
111 +#cmd = foogetter.sh -N %D %Pn
113 +##Configured fetchers
116 +cmd = vfjuggle %d %Pn
119 +proto = http,ftp,https
120 +cmd = wget -N --dot-style=binary -P %d %Pn
132 +cmd = rsync -v %P %d
136 +cmd = vfsmb -v %P %d
140 +#cmd = vfssh.sh %d %Pn
144 +#cmd = foo.sh %d %Pn
147 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
148 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/pld-source.conf 1970-01-01 01:00:00.000000000 +0100
149 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/pld-source.conf 2006-01-20 13:44:14.000000000 +0100
152 +# PLD <http://www.pld-linux.org/>
155 +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
157 +## You can use them if you have better connection there
159 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
166 +type = %{_ac_idxtype}
168 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
171 +type = %{_ac_idxtype}
172 +name = ac-updates-security
173 +path = %{_pld_prefix}/updates/security/%{_pld_arch}/
176 +type = %{_ac_idxtype}
177 +name = ac-updates-general
178 +path = %{_pld_prefix}/updates/general/%{_pld_arch}/
182 +type = %{_ac_idxtype}
184 +path = %{_pld_prefix}/supported/%{_pld_arch}/
188 +type = %{_ac_idxtype}
190 +path = %{_pld_prefix}/ready/%{_pld_arch}/
194 +type = %{_ac_idxtype}
196 +path = %{_pld_prefix}/test/%{_pld_arch}/
198 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
199 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
200 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/poldek.conf 2006-01-20 13:44:46.000000000 +0100
202 +# poldek main configuration file.
204 +# Some macros. Macros are local, they are not visible in included files
205 +# and macros declared in them are not visible to includer.
206 +# Macros names starts with underscore '_'.
210 +# Both local and remote files may be included. Included files may not contain
211 +# [global] section, it will be ignored anyway.
212 +%include %{_distro}-source.conf
215 +%include source.conf
217 +# External downloaders configuration, not necessary in most cases, cause
218 +# to internal HTTP and FTP client.
219 +#%include fetch.conf
224 +# This parameter allows to configure the default repository index type.
225 +#default index type = pndir
227 +# Cache directory for downloaded files. NOTE: that parent directory of cachedir
229 +#cachedir = $HOME/.poldek-cache
231 +# Switch to ordinary user at startup when executed by root
234 +# Permits using root privileges for installation only. Automatically turned
235 +# on when poldek executed as ordinary user.
238 +# Load /etc/apt/sources.list.
239 +#load apt sources list = no
241 +# Handle gzipped indexes externally (needed on RedHat 9 and Fedora Core 1 and 2).
242 +# This option is a workaround for broken zlib linked into librpm; with enabled
243 +# 'auto zlib in rpm' poldek tries to detect such case and then enables external
244 +# *.gz handling automatically.
245 +#vfile external compress = no
247 +# Auto detection of zlib linked into librpm. See 'vfile external compress'
249 +#auto zlib in rpm = yes
251 +# Automatically download whole index if incremental update fails.
254 +# Do not save given paths into created indexes. This option may significantly
255 +# reduce index size. Example (notice missing starting '/'):
256 +# exclude path = usr/share/doc:usr/share/man:usr/src
259 +# Full path name to a PM (rpm for now) binary.
260 +#pm command = /bin/rpm
262 +# Full path name to sudo binary.
263 +#sudo command = /usr/bin/sudo
266 +### File downloaders configuration
268 +# Send ${USER}@${HOSTNAME} as anonymous FTP password (by default
269 +# 'poldek@znienacka.net' is sent)
270 +#vfile ftp sysuser as anon passwd = no
272 +# File getters configuration parameter. By this option URL handlers may be configured.
273 +# To get file from HTTP and FTP servers poldek uses its internal client (what is
274 +# recommended), although it can be changedby this option. Others protocols handled
275 +# by external utilities can be configured also. The syntax is:
276 +# default fetcher = PROTOCOL[,PROTOCOL...]:FETCHER_NAME
278 +# where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch]
279 +# sections (placed in fetch.conf in default configuration).
281 +# default fetcher = ftp,http:internal
282 +# default fetcher = https:wget
283 +# default fetcher = cdrom:vfjuggle
284 +# vfjuggle is a cdrom getter supplied with poldek.
285 +#default fetcher = http,ftp: internal
287 +# Proxies for internal FTP and HTTP client may be configured in usual
288 +# way, by environment variables ftp_proxy and http_proxy, or by this option.
289 +# Its syntax is similar to "default fetcher" one:
290 +# proxy = PROTOCOL[,PROTOCOL...]:PROXY_URL
292 +# proxy = http: http://w3cache.foo.org:8080
295 +# Comma separated list of hosts or domains which will not be accessed via proxy.
296 +# Option overrides no_proxy environment variable.
298 +# noproxy = localhost, .pl, ftp.foo.bar.org
301 +# Internal HTTP and FTP client is stubborn, it retries to retrive
302 +# file if connection breaks. This option tells it how many times
304 +#vfile retries = 128
307 +### Installation options
309 +# Install packages in small groups instead of doing all-or-nothing
311 +particle install = no
313 +# Do not remove downloaded packages after its successful installation.
314 +#keep downloads = no
316 +# Controls visibility of multiple package instances with different EVR.
317 +# If on, only one, highest version will be visible.
318 +#unique package names = no
320 +# Epoch autopromotion during dependency comparision. RPM specific.
321 +# Set it up if you are using system with rpm prior to 4.2.1 version.
324 +# Confirm packages installation.
325 +#confirm installation = no
327 +# Confirm packages removal.
328 +#confirm removal = yes
330 +# Let the user select package among equivalents.
331 +choose equivalents manually = yes
333 +# Prevent package listed from being upgraded if they are already installed.
334 +# hold = kernel* dev
337 +# Ignore package list - packages fits given mask will be invisible.
338 +# ignore = *-smp-* foo*
339 +ignore = kernel* udev devfs
341 +# Conflicts with already installed packages are treated as resolved
342 +# if at least one of multiple-installed package satisfies conflict.
343 +# rpm doesn't support such cases, so --pm-nodeps is needed (use with
345 +#allow duplicates = yes
348 +### RPM specific options
350 +# rpm macros can be set by this option. Examples:
351 +# rpmdef = _install_langs pl:pl_PL:lt:lt_LT
352 +# Do not install any documentation:
353 +# rpmdef = _netsharedpath /usr/share/info:/usr/share/man
354 +# rpmdef = _excludedocs 1
358 +### Dependency processing settings
359 +# Subtle dependency processing options, they should not be changed
360 +# unless you know what you are doing
362 +# Automatically install packages required by installed ones.
365 +# Greedy upgrades, i.e. upgrade packages which dependencies are broken
366 +# by being uninstalled ones.
369 +# Be yet more greedy; if successor of orphaned package found, and this
370 +# successor drags no packages then upgrade the package instead of process
371 +# its dependencies. Option value is implied by 'greedy' one by defalut.
372 +#aggressive greedy = yes
374 +# Be tolerant for unmatched versioned dependencies which rpm tolerates, e.g.
375 +# package A requires capability foo >= 1.0 while package B provides "foo"
376 +# without any version. Use with care, it may cause weird dependency errors.
379 +# Taking into account package Obsoletes.
382 +# Taking into account package Conflicts.
384 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
385 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/source.conf 1970-01-01 01:00:00.000000000 +0100
386 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/source.conf 2006-01-20 13:42:29.000000000 +0100
388 +# Sample poldek sources configuration
389 +# Every source is configured in his own [source] section.
390 +# Possible parameters are:
393 +# Unique name of the repository.
396 +# Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum'
397 +# and 'dir' as listed by --stl switch.
400 +# This parameter sets index original type i.e type of repository
401 +# from what this repository is created. Default is 'dir' - means
402 +# that directory of packages is scanned.
403 +#original type = dir
405 +# Unique name of the repository. May be either path or URL.
406 +#path = /some/url/or/dir
408 +# If package index and packages are stored in different locations then
409 +# prefix stands for packages path.
410 +#prefix = /some/url/or/dir
412 +# Controls visibility of multiple package instances with different EVR.
413 +# If on, only one, highest version will be visible.
416 +# Repository priority. If the same packages (equal names and EVR)
417 +# are available in more than one source then package from highest
418 +# prioritized source are taken. Priority is numeric value. Lower number
419 +# means higher priority, and negative priorities are allowed.
420 +# Priority is numeric value.
423 +# Controling if repository index will be implicit loaded. Set it off if
424 +# the index should be loaded on demand only, i.e. if specified directly
428 +# Controls if repository index will be implicit updated. Set it off if
429 +# the index should be updated on demand only, i.e. if specified directly
433 +# Packages PGP/GPG signatures (if any) will be verified before their
437 +# Have the same meaning as [global] parameter. Example:
438 +# hold = kernel* dev
441 +# Have the same meaning as [global] parameter. Example:
442 +# ignore = kernel*smp* dev
445 +# Parameter have the same meaning as [global] parameter.
446 +# exclude path = usr/share/doc:usr/share/man:usr/src
449 +# Preferred language of package descriptions. If not set, taken from locale
450 +# settings. Example:
451 +# lang = pl_PL:lt_LT
457 +path = $HOME/rpm/RPMS
464 +#path = ftp://ftp.foo.bar.org/RPMS/
470 +#ignore = kernel*-smp-*
473 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
474 --- util-vserver-0.30.209-clean/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
475 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/rpm/macros 2006-01-20 13:45:53.000000000 +0100
477 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
478 +# you have to use at least one language beside 'C'
479 +%_install_langs C:en:pl
480 +%_netsharedpath /dev
481 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
482 --- util-vserver-0.30.209-clean/distrib/pld-ac/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100
483 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/rpmlist.d/00.lst 2006-01-20 13:45:53.000000000 +0100
494 +vserver-packages-*.rpm
495 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/Makefile-files util-vserver-0.30.209-poldek2/scripts/Makefile-files
496 --- util-vserver-0.30.209-clean/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200
497 +++ util-vserver-0.30.209-poldek2/scripts/Makefile-files 2006-01-20 13:45:53.000000000 +0100
499 scripts/vapt-get-worker \
500 scripts/vrpm-worker \
501 scripts/vyum-worker \
502 + scripts/vpoldek-worker \
503 scripts/vrpm-preload \
504 scripts/save_s_context \
505 scripts/vservers.grabinfo.sh \
507 scripts/vserver-build.debootstrap \
508 scripts/vserver-build.rpm \
509 scripts/vserver-build.yum \
510 + scripts/vserver-build.poldek \
511 scripts/vserver-build.functions \
512 scripts/vserver-build.functions.apt \
513 scripts/vserver-build.functions.rpm \
514 scripts/vserver-build.functions.pkgmgmt \
515 scripts/vserver-build.functions.yum \
516 + scripts/vserver-build.functions.poldek \
517 scripts/vserver-setup.functions \
518 scripts/vserver.functions \
519 scripts/vserver.start \
521 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
522 scripts/vapt-get-worker \
524 + scripts/vpoldek-worker \
525 scripts/vrpm-worker \
526 scripts/vrpm-preload \
527 scripts/start-vservers \
530 scripts_sbin_src_PRGS = scripts/chcontext \
536 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/functions util-vserver-0.30.209-poldek2/scripts/functions
537 --- util-vserver-0.30.209-clean/scripts/functions 2005-10-28 19:59:37.000000000 +0200
538 +++ util-vserver-0.30.209-poldek2/scripts/functions 2006-01-20 16:46:03.000000000 +0100
543 +function _pkgSetVarsPoldek
545 + if test -n "$PKGDIR"; then
546 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
547 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
549 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
550 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
553 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
554 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
558 function _pkgMountBase
561 rpm) _pkgSetVarsRPM;;
562 apt) _pkgSetVarsApt;;
563 yum) _pkgSetVarsYum;;
564 + poldek) _pkgSetVarsPoldek;;
565 *) echo "Unknown packaging flavor" >&2; exit 1;;
570 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
572 + elif test -e "$_pgs_vdir"/etc/pld-release; then
574 elif test -e "$_pgs_vdir"/etc/debian_version; then
576 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
578 test -n "$have_yum" && return 0 || return 1
581 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
582 +function pkgmgmt.isPoldekAvailable
586 + local is_internal="$3"
588 + local have_poldek i
589 + if test -n "$is_internal"; then
591 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
594 + for i in /bin /usr/bin /usr/local/bin; do
595 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
599 + test -n "$have_poldek" && return 0 || return 1
603 function vshelper.doSanityCheck
605 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/pkgmgmt util-vserver-0.30.209-poldek2/scripts/pkgmgmt
606 --- util-vserver-0.30.209-clean/scripts/pkgmgmt 2005-07-03 19:43:34.000000000 +0200
607 +++ util-vserver-0.30.209-poldek2/scripts/pkgmgmt 2006-01-20 14:40:48.000000000 +0100
612 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
613 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
614 hasSubstring "$pkgs" ---rpm--- || {
616 * The vserver does not seem to have the 'rpm' package which is required
621 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
622 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
624 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
625 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
626 installed. It is suggested to install such a program before setting
627 up internal package management."
629 @@ -366,6 +366,131 @@
633 +function processVserver_PLD()
636 + local is_internalize=$2
640 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
641 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
643 + ## Figure out the environment....
644 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
646 + local POLDEKETCDIR=
647 + local POLDEKCACHEDIR=
651 + ## Create directories and assign variables where configuration
652 + ## can/will be found on the host
653 + if test -n "$is_internalize"; then
654 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
656 +Can not continue; use '--force' to override this check"
658 + pushd "$vdir" >/dev/null
660 + test ! -L var/lib/rpm || {
661 + $_EXEC_CD /var/lib $_RM rpm &&
662 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
663 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
665 + } </dev/null 2>/dev/null
667 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
669 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
674 + if test -n "$have_poldek"; then
675 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
678 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
679 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
681 + mkdir -m755 -p "$cfgdir"
684 + if test -n "$have_poldek"; then
685 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
686 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
688 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
689 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
691 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
694 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
695 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
697 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
698 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
700 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
701 + test ! -e "$cfgdir"/base || need_base=
703 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
705 + mkdir -m755 -p "$PKGCFGDIR"
706 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
707 + "$RPMETCDIR" "$RPMSTATEDIR"
710 + ## Copy the files...
711 + if test -n "$is_internalize"; then
712 + if test -n "$have_poldek"; then
713 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
714 + pushd "$vdir" >/dev/null
715 + _hashAuto /etc/poldek.conf '/'
719 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
720 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
722 + pushd "$vdir" >/dev/null
723 + ## remove %_dbpath settings
724 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
727 + if test -n "$have_poldek"; then
728 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
729 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
732 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
733 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
735 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
739 + if test -n "$is_internalize"; then
742 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
743 + trap "$_RM -rf $tmpdir" EXIT
744 + pushd "$vdir" >/dev/null
745 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
746 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
751 + if test -n "$is_internalize"; then
752 + $_TOUCH "$cfgdir"/internal
754 + $_RM -f "$cfgdir"/internal
758 function processVserver_Debian()
764 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
765 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
766 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
768 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
769 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
770 --- util-vserver-0.30.209-clean/scripts/util-vserver-vars.pathsubst 2005-07-03 19:43:55.000000000 +0200
771 +++ util-vserver-0.30.209-poldek2/scripts/util-vserver-vars.pathsubst 2006-01-20 13:45:53.000000000 +0100
773 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
774 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
775 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
776 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
777 _LISTDEVIP="$__LEGACYDIR/listdevip"
778 _LOCKFILE="$__PKGLIBDIR/lockfile"
779 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
781 _VUNIFY="$__PKGLIBDIR/vunify"
782 _VYUM="$__SBINDIR/vyum"
783 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
784 +_VPOLDEK="$__SBINDIR/vpoldek"
785 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
789 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpkg util-vserver-0.30.209-poldek2/scripts/vpkg
790 --- util-vserver-0.30.209-clean/scripts/vpkg 2005-03-21 21:03:30.000000000 +0100
791 +++ util-vserver-0.30.209-poldek2/scripts/vpkg 2006-01-20 13:45:53.000000000 +0100
800 + ## rpm outputs sometimes '(contains no files)', so return
801 + ## only the valid output
803 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
805 + rpm_param=( -Uvh "$@" )
806 + poldek_param=( --install -v "$@" )
810 + if test -n "$is_external"; then
812 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
815 + for i in /bin /usr/bin /usr/local/bin; do
816 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
820 + if test -n "$is_external"; then
821 + if test "$have_poldek" -a "$poldek_param"; then
822 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
824 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
827 + if test "$have_poldek" -a "$poldek_param"; then
828 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
830 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
837 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpoldek util-vserver-0.30.209-poldek2/scripts/vpoldek
838 --- util-vserver-0.30.209-clean/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
839 +++ util-vserver-0.30.209-poldek2/scripts/vpoldek 2006-01-20 13:45:53.000000000 +0100
844 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
846 +# This program is free software; you can redistribute it and/or modify
847 +# it under the terms of the GNU General Public License as published by
848 +# the Free Software Foundation; version 2 of the License.
850 +# This program is distributed in the hope that it will be useful,
851 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
852 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
853 +# GNU General Public License for more details.
855 +# You should have received a copy of the GNU General Public License
856 +# along with this program; if not, write to the Free Software
857 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
859 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
860 +test -e "$UTIL_VSERVER_VARS" || {
861 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
864 +. "$UTIL_VSERVER_VARS"
871 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
873 +Report bugs to <$PACKAGE_BUGREPORT>."
877 +function showVersion()
880 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
881 +This program is part of $PACKAGE_STRING
883 +Copyright (C) 2003 Enrico Scholz
884 +This program is free software; you may redistribute it under the terms of
885 +the GNU General Public License. This program has absolutely no warranty."
890 +declare -a vservers=()
892 +while test "$#" -ge 1; do
895 + --help) showHelp $0;;
896 + --quiet|-q) is_quiet=1 ;;
899 + vservers=( "${vservers[@]}" "${tmp[@]}" )
903 + *) vservers=( "${vservers[@]}" "$1" )
910 +for i in "${vservers[@]}"; do
913 + test -n "$is_quiet" || {
914 + colorize bold echo -n "vpoldek: operating on vserver "
915 + colorize bold colorize emph echo "$i"
916 + xtermTitle "vpoldek: operating on vserver '$i' [$cnt/${#vservers[@]}]"
919 + if pkgmgmt.isInternal "$i"; then
920 + $_VSERVER "$i" exec poldek "$@"
922 + callInNamespace "$i" \
923 + "$_VNAMESPACE" --new -- "$_VPOLDEK_WORKER" "$i" "$@"
927 + test $res -eq 0 -o -n "$is_quiet" || {
928 + colorize error echo -n $"vpoldek failed on vserver '$i' with errorcode $res"
932 + test -n "$is_quiet" || echo
935 +test "$cnt" -ge 0 || echo "No vservers specified" >&2
937 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpoldek-worker util-vserver-0.30.209-poldek2/scripts/vpoldek-worker
938 --- util-vserver-0.30.209-clean/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
939 +++ util-vserver-0.30.209-poldek2/scripts/vpoldek-worker 2006-01-20 13:45:53.000000000 +0100
944 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
946 +# This program is free software; you can redistribute it and/or modify
947 +# it under the terms of the GNU General Public License as published by
948 +# the Free Software Foundation; version 2 of the License.
950 +# This program is distributed in the hope that it will be useful,
951 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
952 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
953 +# GNU General Public License for more details.
955 +# You should have received a copy of the GNU General Public License
956 +# along with this program; if not, write to the Free Software
957 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
961 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
962 +test -e "$UTIL_VSERVER_VARS" || {
963 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
966 +. "$UTIL_VSERVER_VARS"
973 +pkgInit "$vserver" rpm poldek
975 +test -z "$_POLDEK" || {
976 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
977 + ${POLDEK:=$_POLDEK}
980 +exec ${_POLDEK:-poldek} \
982 + --cachedir=$POLDEKCACHEDIR \
983 + --conf=$POLDEK_CONFIG \
984 + --pmcmd=$RPM_BINARY \
986 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vserver-build util-vserver-0.30.209-poldek2/scripts/vserver-build
987 --- util-vserver-0.30.209-clean/scripts/vserver-build 2006-01-20 13:45:34.000000000 +0100
988 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build 2006-01-20 13:45:53.000000000 +0100
990 yum ... -- -d <distribution>
991 ... installs the base-packages of the given distribution with
993 + poldek ... -- -d <distribution>
994 + ... installs the base-packages of the given distribution with
996 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
997 ... installs lists of rpm-packages
998 skeleton ... -- [<cmd> <args>*]
1002 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
1003 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm)
1004 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xpoldek)
1005 . $__PKGLIBDIR/vserver-build.$method
1007 (x) panic $"No build-method specified";;
1008 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
1009 --- util-vserver-0.30.209-clean/scripts/vserver-build.functions 2005-10-28 20:40:39.000000000 +0200
1010 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.functions 2006-01-20 13:55:09.000000000 +0100
1011 @@ -137,6 +137,12 @@
1012 elif test -e /etc/slackware-release; then
1013 set -- $(cat /etc/slackware-release)
1014 DISTRIBUTION=slackware$2
1015 + elif test -e /etc/pld-release; then
1018 + set -- $(cat /etc/pld-release)
1019 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
1021 elif test -n "$1"; then
1024 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
1025 --- util-vserver-0.30.209-clean/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
1026 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.functions.poldek 2006-01-20 14:47:58.000000000 +0100
1028 +# $Id$ --*- sh -*--
1030 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1032 +# This program is free software; you can redistribute it and/or modify
1033 +# it under the terms of the GNU General Public License as published by
1034 +# the Free Software Foundation; version 2 of the License.
1036 +# This program is distributed in the hope that it will be useful,
1037 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1038 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1039 +# GNU General Public License for more details.
1041 +# You should have received a copy of the GNU General Public License
1042 +# along with this program; if not, write to the Free Software
1043 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1045 +function poldek.installBasePackages
1050 + test "$dir" != / || return 0
1051 + for filelist in "$dir"/*; do
1052 + isRegularFile "$filelist" || continue
1054 + local can_fail=false
1055 + local flags='--install'
1057 + set -- $(<$filelist)
1058 + while test "$#" -gt 0; do
1060 + --reinstall) flags='--reinstall';;
1061 + --can-fail) can_fail=true;;
1066 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
1070 +function poldek.initVariables
1072 + findFile POLDEKCONFDEFAULT \
1073 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
1074 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
1075 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
1076 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
1080 +function poldek.initFilesystem
1082 + mkdir -p "$PKGCFGDIR"/poldek/etc
1083 + mkdir -p "$PKGCFGBASE"/poldek-cache
1085 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
1087 + populateDirectory "$PKGCFGDIR/poldek/etc" \
1088 + "$__DISTRIBDIR/defaults/poldek" \
1089 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
1090 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
1092 +# test -z "$POLDEKCONFDEFAULT" || \
1093 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
1095 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
1096 --- util-vserver-0.30.209-clean/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
1097 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.poldek 2006-01-20 13:45:53.000000000 +0100
1099 +# $Id$ --*- sh -*--
1101 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1103 +# This program is free software; you can redistribute it and/or modify
1104 +# it under the terms of the GNU General Public License as published by
1105 +# the Free Software Foundation; version 2 of the License.
1107 +# This program is distributed in the hope that it will be useful,
1108 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1109 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1110 +# GNU General Public License for more details.
1112 +# You should have received a copy of the GNU General Public License
1113 +# along with this program; if not, write to the Free Software
1114 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1116 +tmp=$(getopt -o +d: --long debug -n "$0" -- "$@") || exit 1
1119 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
1120 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
1121 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
1125 + (-d) DISTRIBUTION=$2; shift;;
1126 + (--debug) set -x;;
1127 + (--) shift; break ;;
1128 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
1139 +pkgmgmt.initVariables
1141 +poldek.initVariables
1143 +base.initFilesystem "$OPTION_FORCE"
1144 +pkgmgmt.initFilesystem "$OPTION_FORCE"
1146 +poldek.initFilesystem
1148 +setup_writeOption "$VSERVER_NAME"
1149 +setup_writeInitialFstab
1151 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
1152 +rpm.initDB "$SETUP_CONFDIR"
1153 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
1154 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
1155 + "$__CONFDIR/.distributions/.common/pubkeys" \
1156 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
1158 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
1159 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
1160 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"