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
45 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
46 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/aliases.conf 1970-01-01 01:00:00.000000000 +0100
47 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/aliases.conf 2006-01-20 13:42:33.000000000 +0100
49 +# System wide aliases
57 +freshen = install -FN
60 +# for backward compatybility, greedy is on by default now
61 +greedy-upgrade = install -FG
63 +just-install = install -IN
66 +what-requires = search -r
67 +what-provides = search -p
68 +rsearch = search --perlre
73 +#ls = uninstall kernel
79 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
80 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/fetch.conf 1970-01-01 01:00:00.000000000 +0100
81 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/fetch.conf 2006-01-20 13:42:29.000000000 +0100
83 +# Configuration of poldek external file getters. Each [fetcher] section
84 +# declares one external downloader. The syntax is:
87 +# proto = PROTOCOL[ ,PROTOCOL... ]
88 +# cmd = CMD [OPTION...] DESTINATION-MACRO URL-MACRO
89 +# Possible parameters are:
92 +# Unique name of the fetcher. This is an optional parameter, if not set then
93 +# name is taken from the "cmd" parameter value as "$(basename $cmd)".
96 +# Protocol or protocols supported by fetcher. Name of the protocol can be
97 +# completely arbitrary, i.e. if you can handle protocol "foo" by writing
98 +# a script which takes URLs in form 'foo://'.
101 +# Parameter specifies an external command and its invoking syntax.
102 +# The syntax of "cmd" is:
103 +# cmd = COMMAND [ OPTION... ] {%d,%D} {%p,%P}[n]
104 +# Where COMMAND is the name or full path of command, OPTION is command specific
105 +# options. Macro '%d' is replaced with cache directory, '%D' is replaced with
106 +# 'cache directory/file basename', and '%p' with file basename, %P with file full
107 +# path (URL). Optional suffix 'n' with %p and %P means that command can be
108 +# invoked with multiple files at once.
109 +#cmd = foogetter.sh -N %D %Pn
111 +##Configured fetchers
114 +cmd = vfjuggle %d %Pn
117 +proto = http,ftp,https
118 +cmd = wget -N --dot-style=binary -P %d %Pn
130 +cmd = rsync -v %P %d
134 +cmd = vfsmb -v %P %d
138 +#cmd = vfssh.sh %d %Pn
142 +#cmd = foo.sh %d %Pn
145 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
146 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/pld-source.conf 1970-01-01 01:00:00.000000000 +0100
147 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/pld-source.conf 2006-01-20 13:44:14.000000000 +0100
150 +# PLD <http://www.pld-linux.org/>
153 +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
155 +## You can use them if you have better connection there
157 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
164 +type = %{_ac_idxtype}
166 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
169 +type = %{_ac_idxtype}
170 +name = ac-updates-security
171 +path = %{_pld_prefix}/updates/security/%{_pld_arch}/
174 +type = %{_ac_idxtype}
175 +name = ac-updates-general
176 +path = %{_pld_prefix}/updates/general/%{_pld_arch}/
180 +type = %{_ac_idxtype}
182 +path = %{_pld_prefix}/supported/%{_pld_arch}/
186 +type = %{_ac_idxtype}
188 +path = %{_pld_prefix}/ready/%{_pld_arch}/
192 +type = %{_ac_idxtype}
194 +path = %{_pld_prefix}/test/%{_pld_arch}/
196 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
197 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
198 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/poldek.conf 2006-01-20 13:44:46.000000000 +0100
200 +# poldek main configuration file.
202 +# Some macros. Macros are local, they are not visible in included files
203 +# and macros declared in them are not visible to includer.
204 +# Macros names starts with underscore '_'.
208 +# Both local and remote files may be included. Included files may not contain
209 +# [global] section, it will be ignored anyway.
210 +%include %{_distro}-source.conf
213 +%include source.conf
215 +# External downloaders configuration, not necessary in most cases, cause
216 +# to internal HTTP and FTP client.
217 +#%include fetch.conf
222 +# This parameter allows to configure the default repository index type.
223 +#default index type = pndir
225 +# Cache directory for downloaded files. NOTE: that parent directory of cachedir
227 +#cachedir = $HOME/.poldek-cache
229 +# Switch to ordinary user at startup when executed by root
232 +# Permits using root privileges for installation only. Automatically turned
233 +# on when poldek executed as ordinary user.
236 +# Load /etc/apt/sources.list.
237 +#load apt sources list = no
239 +# Handle gzipped indexes externally (needed on RedHat 9 and Fedora Core 1 and 2).
240 +# This option is a workaround for broken zlib linked into librpm; with enabled
241 +# 'auto zlib in rpm' poldek tries to detect such case and then enables external
242 +# *.gz handling automatically.
243 +#vfile external compress = no
245 +# Auto detection of zlib linked into librpm. See 'vfile external compress'
247 +#auto zlib in rpm = yes
249 +# Automatically download whole index if incremental update fails.
252 +# Do not save given paths into created indexes. This option may significantly
253 +# reduce index size. Example (notice missing starting '/'):
254 +# exclude path = usr/share/doc:usr/share/man:usr/src
257 +# Full path name to a PM (rpm for now) binary.
258 +#pm command = /bin/rpm
260 +# Full path name to sudo binary.
261 +#sudo command = /usr/bin/sudo
264 +### File downloaders configuration
266 +# Send ${USER}@${HOSTNAME} as anonymous FTP password (by default
267 +# 'poldek@znienacka.net' is sent)
268 +#vfile ftp sysuser as anon passwd = no
270 +# File getters configuration parameter. By this option URL handlers may be configured.
271 +# To get file from HTTP and FTP servers poldek uses its internal client (what is
272 +# recommended), although it can be changedby this option. Others protocols handled
273 +# by external utilities can be configured also. The syntax is:
274 +# default fetcher = PROTOCOL[,PROTOCOL...]:FETCHER_NAME
276 +# where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch]
277 +# sections (placed in fetch.conf in default configuration).
279 +# default fetcher = ftp,http:internal
280 +# default fetcher = https:wget
281 +# default fetcher = cdrom:vfjuggle
282 +# vfjuggle is a cdrom getter supplied with poldek.
283 +#default fetcher = http,ftp: internal
285 +# Proxies for internal FTP and HTTP client may be configured in usual
286 +# way, by environment variables ftp_proxy and http_proxy, or by this option.
287 +# Its syntax is similar to "default fetcher" one:
288 +# proxy = PROTOCOL[,PROTOCOL...]:PROXY_URL
290 +# proxy = http: http://w3cache.foo.org:8080
293 +# Comma separated list of hosts or domains which will not be accessed via proxy.
294 +# Option overrides no_proxy environment variable.
296 +# noproxy = localhost, .pl, ftp.foo.bar.org
299 +# Internal HTTP and FTP client is stubborn, it retries to retrive
300 +# file if connection breaks. This option tells it how many times
302 +#vfile retries = 128
305 +### Installation options
307 +# Install packages in small groups instead of doing all-or-nothing
309 +particle install = no
311 +# Do not remove downloaded packages after its successful installation.
312 +#keep downloads = no
314 +# Controls visibility of multiple package instances with different EVR.
315 +# If on, only one, highest version will be visible.
316 +#unique package names = no
318 +# Epoch autopromotion during dependency comparision. RPM specific.
319 +# Set it up if you are using system with rpm prior to 4.2.1 version.
322 +# Confirm packages installation.
323 +#confirm installation = no
325 +# Confirm packages removal.
326 +#confirm removal = yes
328 +# Let the user select package among equivalents.
329 +#choose equivalents manually = no
331 +# Prevent package listed from being upgraded if they are already installed.
332 +# hold = kernel* dev
335 +# Ignore package list - packages fits given mask will be invisible.
336 +# ignore = *-smp-* foo*
337 +ignore = kernel* udev devfs
339 +# Conflicts with already installed packages are treated as resolved
340 +# if at least one of multiple-installed package satisfies conflict.
341 +# rpm doesn't support such cases, so --pm-nodeps is needed (use with
343 +#allow duplicates = yes
346 +### RPM specific options
348 +# rpm macros can be set by this option. Examples:
349 +# rpmdef = _install_langs pl:pl_PL:lt:lt_LT
350 +# Do not install any documentation:
351 +# rpmdef = _netsharedpath /usr/share/info:/usr/share/man
352 +# rpmdef = _excludedocs 1
356 +### Dependency processing settings
357 +# Subtle dependency processing options, they should not be changed
358 +# unless you know what you are doing
360 +# Automatically install packages required by installed ones.
363 +# Greedy upgrades, i.e. upgrade packages which dependencies are broken
364 +# by being uninstalled ones.
367 +# Be yet more greedy; if successor of orphaned package found, and this
368 +# successor drags no packages then upgrade the package instead of process
369 +# its dependencies. Option value is implied by 'greedy' one by defalut.
370 +#aggressive greedy = yes
372 +# Be tolerant for unmatched versioned dependencies which rpm tolerates, e.g.
373 +# package A requires capability foo >= 1.0 while package B provides "foo"
374 +# without any version. Use with care, it may cause weird dependency errors.
377 +# Taking into account package Obsoletes.
380 +# Taking into account package Conflicts.
382 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
383 --- util-vserver-0.30.209-clean/distrib/pld-ac/poldek/source.conf 1970-01-01 01:00:00.000000000 +0100
384 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/poldek/source.conf 2006-01-20 13:42:29.000000000 +0100
386 +# Sample poldek sources configuration
387 +# Every source is configured in his own [source] section.
388 +# Possible parameters are:
391 +# Unique name of the repository.
394 +# Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum'
395 +# and 'dir' as listed by --stl switch.
398 +# This parameter sets index original type i.e type of repository
399 +# from what this repository is created. Default is 'dir' - means
400 +# that directory of packages is scanned.
401 +#original type = dir
403 +# Unique name of the repository. May be either path or URL.
404 +#path = /some/url/or/dir
406 +# If package index and packages are stored in different locations then
407 +# prefix stands for packages path.
408 +#prefix = /some/url/or/dir
410 +# Controls visibility of multiple package instances with different EVR.
411 +# If on, only one, highest version will be visible.
414 +# Repository priority. If the same packages (equal names and EVR)
415 +# are available in more than one source then package from highest
416 +# prioritized source are taken. Priority is numeric value. Lower number
417 +# means higher priority, and negative priorities are allowed.
418 +# Priority is numeric value.
421 +# Controling if repository index will be implicit loaded. Set it off if
422 +# the index should be loaded on demand only, i.e. if specified directly
426 +# Controls if repository index will be implicit updated. Set it off if
427 +# the index should be updated on demand only, i.e. if specified directly
431 +# Packages PGP/GPG signatures (if any) will be verified before their
435 +# Have the same meaning as [global] parameter. Example:
436 +# hold = kernel* dev
439 +# Have the same meaning as [global] parameter. Example:
440 +# ignore = kernel*smp* dev
443 +# Parameter have the same meaning as [global] parameter.
444 +# exclude path = usr/share/doc:usr/share/man:usr/src
447 +# Preferred language of package descriptions. If not set, taken from locale
448 +# settings. Example:
449 +# lang = pl_PL:lt_LT
455 +path = $HOME/rpm/RPMS
462 +#path = ftp://ftp.foo.bar.org/RPMS/
468 +#ignore = kernel*-smp-*
471 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
472 --- util-vserver-0.30.209-clean/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
473 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/rpm/macros 2006-01-20 13:45:53.000000000 +0100
475 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
476 +# you have to use at least one language beside 'C'
477 +%_install_langs C:en:pl
478 +%_netsharedpath /dev
479 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
480 --- util-vserver-0.30.209-clean/distrib/pld-ac/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100
481 +++ util-vserver-0.30.209-poldek2/distrib/pld-ac/rpmlist.d/00.lst 2006-01-20 13:45:53.000000000 +0100
491 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/Makefile-files util-vserver-0.30.209-poldek2/scripts/Makefile-files
492 --- util-vserver-0.30.209-clean/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200
493 +++ util-vserver-0.30.209-poldek2/scripts/Makefile-files 2006-01-20 13:45:53.000000000 +0100
495 scripts/vapt-get-worker \
496 scripts/vrpm-worker \
497 scripts/vyum-worker \
498 + scripts/vpoldek-worker \
499 scripts/vrpm-preload \
500 scripts/save_s_context \
501 scripts/vservers.grabinfo.sh \
503 scripts/vserver-build.debootstrap \
504 scripts/vserver-build.rpm \
505 scripts/vserver-build.yum \
506 + scripts/vserver-build.poldek \
507 scripts/vserver-build.functions \
508 scripts/vserver-build.functions.apt \
509 scripts/vserver-build.functions.rpm \
510 scripts/vserver-build.functions.pkgmgmt \
511 scripts/vserver-build.functions.yum \
512 + scripts/vserver-build.functions.poldek \
513 scripts/vserver-setup.functions \
514 scripts/vserver.functions \
515 scripts/vserver.start \
517 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
518 scripts/vapt-get-worker \
520 + scripts/vpoldek-worker \
521 scripts/vrpm-worker \
522 scripts/vrpm-preload \
523 scripts/start-vservers \
526 scripts_sbin_src_PRGS = scripts/chcontext \
532 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/functions util-vserver-0.30.209-poldek2/scripts/functions
533 --- util-vserver-0.30.209-clean/scripts/functions 2005-10-28 19:59:37.000000000 +0200
534 +++ util-vserver-0.30.209-poldek2/scripts/functions 2006-01-20 16:46:03.000000000 +0100
539 +function _pkgSetVarsPoldek
541 + if test -n "$PKGDIR"; then
542 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
543 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
545 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
546 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
549 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
550 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
554 function _pkgMountBase
557 rpm) _pkgSetVarsRPM;;
558 apt) _pkgSetVarsApt;;
559 yum) _pkgSetVarsYum;;
560 + poldek) _pkgSetVarsPoldek;;
561 *) echo "Unknown packaging flavor" >&2; exit 1;;
566 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
568 + elif test -e "$_pgs_vdir"/etc/pld-release; then
570 elif test -e "$_pgs_vdir"/etc/debian_version; then
572 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
574 test -n "$have_yum" && return 0 || return 1
577 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
578 +function pkgmgmt.isPoldekAvailable
582 + local is_internal="$3"
584 + local have_poldek i
585 + if test -n "$is_internal"; then
587 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
590 + for i in /bin /usr/bin /usr/local/bin; do
591 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
595 + test -n "$have_poldek" && return 0 || return 1
599 function vshelper.doSanityCheck
601 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/pkgmgmt util-vserver-0.30.209-poldek2/scripts/pkgmgmt
602 --- util-vserver-0.30.209-clean/scripts/pkgmgmt 2005-07-03 19:43:34.000000000 +0200
603 +++ util-vserver-0.30.209-poldek2/scripts/pkgmgmt 2006-01-20 14:40:48.000000000 +0100
608 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
609 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
610 hasSubstring "$pkgs" ---rpm--- || {
612 * The vserver does not seem to have the 'rpm' package which is required
617 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
618 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
620 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
621 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
622 installed. It is suggested to install such a program before setting
623 up internal package management."
625 @@ -366,6 +366,131 @@
629 +function processVserver_PLD()
632 + local is_internalize=$2
636 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
637 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
639 + ## Figure out the environment....
640 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
642 + local POLDEKETCDIR=
643 + local POLDEKCACHEDIR=
647 + ## Create directories and assign variables where configuration
648 + ## can/will be found on the host
649 + if test -n "$is_internalize"; then
650 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
652 +Can not continue; use '--force' to override this check"
654 + pushd "$vdir" >/dev/null
656 + test ! -L var/lib/rpm || {
657 + $_EXEC_CD /var/lib $_RM rpm &&
658 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
659 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
661 + } </dev/null 2>/dev/null
663 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
665 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
670 + if test -n "$have_poldek"; then
671 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
674 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
675 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
677 + mkdir -m755 -p "$cfgdir"
680 + if test -n "$have_poldek"; then
681 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
682 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
684 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
685 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
687 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
690 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
691 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
693 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
694 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
696 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
697 + test ! -e "$cfgdir"/base || need_base=
699 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
701 + mkdir -m755 -p "$PKGCFGDIR"
702 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
703 + "$RPMETCDIR" "$RPMSTATEDIR"
706 + ## Copy the files...
707 + if test -n "$is_internalize"; then
708 + if test -n "$have_poldek"; then
709 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
710 + pushd "$vdir" >/dev/null
711 + _hashAuto /etc/poldek.conf '/'
715 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
716 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
718 + pushd "$vdir" >/dev/null
719 + ## remove %_dbpath settings
720 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
723 + if test -n "$have_poldek"; then
724 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
725 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
728 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
729 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
731 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
735 + if test -n "$is_internalize"; then
738 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
739 + trap "$_RM -rf $tmpdir" EXIT
740 + pushd "$vdir" >/dev/null
741 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
742 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
747 + if test -n "$is_internalize"; then
748 + $_TOUCH "$cfgdir"/internal
750 + $_RM -f "$cfgdir"/internal
754 function processVserver_Debian()
760 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
761 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
762 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
764 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
765 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
766 --- util-vserver-0.30.209-clean/scripts/util-vserver-vars.pathsubst 2005-07-03 19:43:55.000000000 +0200
767 +++ util-vserver-0.30.209-poldek2/scripts/util-vserver-vars.pathsubst 2006-01-20 13:45:53.000000000 +0100
769 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
770 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
771 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
772 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
773 _LISTDEVIP="$__LEGACYDIR/listdevip"
774 _LOCKFILE="$__PKGLIBDIR/lockfile"
775 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
777 _VUNIFY="$__PKGLIBDIR/vunify"
778 _VYUM="$__SBINDIR/vyum"
779 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
780 +_VPOLDEK="$__SBINDIR/vpoldek"
781 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
785 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpkg util-vserver-0.30.209-poldek2/scripts/vpkg
786 --- util-vserver-0.30.209-clean/scripts/vpkg 2005-03-21 21:03:30.000000000 +0100
787 +++ util-vserver-0.30.209-poldek2/scripts/vpkg 2006-01-20 13:45:53.000000000 +0100
796 + ## rpm outputs sometimes '(contains no files)', so return
797 + ## only the valid output
799 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
801 + rpm_param=( -Uvh "$@" )
802 + poldek_param=( --install -v "$@" )
806 + if test -n "$is_external"; then
808 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
811 + for i in /bin /usr/bin /usr/local/bin; do
812 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
816 + if test -n "$is_external"; then
817 + if test "$have_poldek" -a "$poldek_param"; then
818 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
820 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
823 + if test "$have_poldek" -a "$poldek_param"; then
824 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
826 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
833 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpoldek util-vserver-0.30.209-poldek2/scripts/vpoldek
834 --- util-vserver-0.30.209-clean/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
835 +++ util-vserver-0.30.209-poldek2/scripts/vpoldek 2006-01-20 13:45:53.000000000 +0100
840 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
842 +# This program is free software; you can redistribute it and/or modify
843 +# it under the terms of the GNU General Public License as published by
844 +# the Free Software Foundation; version 2 of the License.
846 +# This program is distributed in the hope that it will be useful,
847 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
848 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
849 +# GNU General Public License for more details.
851 +# You should have received a copy of the GNU General Public License
852 +# along with this program; if not, write to the Free Software
853 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
855 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
856 +test -e "$UTIL_VSERVER_VARS" || {
857 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
860 +. "$UTIL_VSERVER_VARS"
867 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
869 +Report bugs to <$PACKAGE_BUGREPORT>."
873 +function showVersion()
876 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
877 +This program is part of $PACKAGE_STRING
879 +Copyright (C) 2003 Enrico Scholz
880 +This program is free software; you may redistribute it under the terms of
881 +the GNU General Public License. This program has absolutely no warranty."
886 +declare -a vservers=()
888 +while test "$#" -ge 1; do
891 + --help) showHelp $0;;
892 + --quiet|-q) is_quiet=1 ;;
895 + vservers=( "${vservers[@]}" "${tmp[@]}" )
899 + *) vservers=( "${vservers[@]}" "$1" )
906 +for i in "${vservers[@]}"; do
909 + test -n "$is_quiet" || {
910 + colorize bold echo -n "vpoldek: operating on vserver "
911 + colorize bold colorize emph echo "$i"
912 + xtermTitle "vpoldek: operating on vserver '$i' [$cnt/${#vservers[@]}]"
915 + if pkgmgmt.isInternal "$i"; then
916 + $_VSERVER "$i" exec poldek "$@"
918 + callInNamespace "$i" \
919 + "$_VNAMESPACE" --new -- "$_VPOLDEK_WORKER" "$i" "$@"
923 + test $res -eq 0 -o -n "$is_quiet" || {
924 + colorize error echo -n $"vpoldek failed on vserver '$i' with errorcode $res"
928 + test -n "$is_quiet" || echo
931 +test "$cnt" -ge 0 || echo "No vservers specified" >&2
933 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vpoldek-worker util-vserver-0.30.209-poldek2/scripts/vpoldek-worker
934 --- util-vserver-0.30.209-clean/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
935 +++ util-vserver-0.30.209-poldek2/scripts/vpoldek-worker 2006-01-20 13:45:53.000000000 +0100
940 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
942 +# This program is free software; you can redistribute it and/or modify
943 +# it under the terms of the GNU General Public License as published by
944 +# the Free Software Foundation; version 2 of the License.
946 +# This program is distributed in the hope that it will be useful,
947 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
948 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
949 +# GNU General Public License for more details.
951 +# You should have received a copy of the GNU General Public License
952 +# along with this program; if not, write to the Free Software
953 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
957 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
958 +test -e "$UTIL_VSERVER_VARS" || {
959 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
962 +. "$UTIL_VSERVER_VARS"
969 +pkgInit "$vserver" rpm poldek
971 +test -z "$_POLDEK" || {
972 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
973 + ${POLDEK:=$_POLDEK}
976 +exec ${_POLDEK:-poldek} \
978 + --cachedir=$POLDEKCACHEDIR \
979 + --conf=$POLDEK_CONFIG \
980 + --pmcmd=$RPM_BINARY \
982 diff -urN -x '*~' -x '*.orig' util-vserver-0.30.209-clean/scripts/vserver-build util-vserver-0.30.209-poldek2/scripts/vserver-build
983 --- util-vserver-0.30.209-clean/scripts/vserver-build 2006-01-20 13:45:34.000000000 +0100
984 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build 2006-01-20 13:45:53.000000000 +0100
986 yum ... -- -d <distribution>
987 ... installs the base-packages of the given distribution with
989 + poldek ... -- -d <distribution>
990 + ... installs the base-packages of the given distribution with
992 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
993 ... installs lists of rpm-packages
994 skeleton ... -- [<cmd> <args>*]
998 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
999 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm)
1000 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xpoldek)
1001 . $__PKGLIBDIR/vserver-build.$method
1003 (x) panic $"No build-method specified";;
1004 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
1005 --- util-vserver-0.30.209-clean/scripts/vserver-build.functions 2005-10-28 20:40:39.000000000 +0200
1006 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.functions 2006-01-20 13:55:09.000000000 +0100
1007 @@ -137,6 +137,12 @@
1008 elif test -e /etc/slackware-release; then
1009 set -- $(cat /etc/slackware-release)
1010 DISTRIBUTION=slackware$2
1011 + elif test -e /etc/pld-release; then
1014 + set -- $(cat /etc/pld-release)
1015 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
1017 elif test -n "$1"; then
1020 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
1021 --- util-vserver-0.30.209-clean/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
1022 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.functions.poldek 2006-01-20 14:47:58.000000000 +0100
1024 +# $Id$ --*- sh -*--
1026 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1028 +# This program is free software; you can redistribute it and/or modify
1029 +# it under the terms of the GNU General Public License as published by
1030 +# the Free Software Foundation; version 2 of the License.
1032 +# This program is distributed in the hope that it will be useful,
1033 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1034 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1035 +# GNU General Public License for more details.
1037 +# You should have received a copy of the GNU General Public License
1038 +# along with this program; if not, write to the Free Software
1039 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1041 +function poldek.installBasePackages
1046 + test "$dir" != / || return 0
1047 + for filelist in "$dir"/*; do
1048 + isRegularFile "$filelist" || continue
1050 + local can_fail=false
1051 + local flags='--install'
1053 + set -- $(<$filelist)
1054 + while test "$#" -gt 0; do
1056 + --reinstall) flags='--reinstall';;
1057 + --can-fail) can_fail=true;;
1062 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
1066 +function poldek.initVariables
1068 + findFile POLDEKCONFDEFAULT \
1069 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
1070 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
1071 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
1072 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
1076 +function poldek.initFilesystem
1078 + mkdir -p "$PKGCFGDIR"/poldek/etc
1079 + mkdir -p "$PKGCFGBASE"/poldek-cache
1081 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
1083 + populateDirectory "$PKGCFGDIR/poldek/etc" \
1084 + "$__DISTRIBDIR/defaults/poldek" \
1085 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
1086 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
1088 +# test -z "$POLDEKCONFDEFAULT" || \
1089 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
1091 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
1092 --- util-vserver-0.30.209-clean/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
1093 +++ util-vserver-0.30.209-poldek2/scripts/vserver-build.poldek 2006-01-20 13:45:53.000000000 +0100
1095 +# $Id$ --*- sh -*--
1097 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
1099 +# This program is free software; you can redistribute it and/or modify
1100 +# it under the terms of the GNU General Public License as published by
1101 +# the Free Software Foundation; version 2 of the License.
1103 +# This program is distributed in the hope that it will be useful,
1104 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1105 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1106 +# GNU General Public License for more details.
1108 +# You should have received a copy of the GNU General Public License
1109 +# along with this program; if not, write to the Free Software
1110 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1112 +tmp=$(getopt -o +d: --long debug -n "$0" -- "$@") || exit 1
1115 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
1116 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
1117 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
1121 + (-d) DISTRIBUTION=$2; shift;;
1122 + (--debug) set -x;;
1123 + (--) shift; break ;;
1124 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
1135 +pkgmgmt.initVariables
1137 +poldek.initVariables
1139 +base.initFilesystem "$OPTION_FORCE"
1140 +pkgmgmt.initFilesystem "$OPTION_FORCE"
1142 +poldek.initFilesystem
1144 +setup_writeOption "$VSERVER_NAME"
1145 +setup_writeInitialFstab
1147 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
1148 +rpm.initDB "$SETUP_CONFDIR"
1149 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
1150 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
1151 + "$__CONFDIR/.distributions/.common/pubkeys" \
1152 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
1154 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
1155 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
1156 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"