1 --- util-vserver-0.30.216-r2837.orig/distrib/defaults/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
2 +++ util-vserver-0.30.216-r2837/distrib/defaults/poldek/poldek.conf 2009-06-22 17:48:26.000000000 +0200
4 +# poldek configuration file.
10 +choose equivalents manually = yes
11 +unique package names = yes
14 +ignore = kernel* udev devfs
15 --- util-vserver-0.30.216-r2837.orig/distrib/Makefile.am 2009-06-22 17:36:52.000000000 +0200
16 +++ util-vserver-0.30.216-r2837/distrib/Makefile.am 2009-06-22 17:49:36.000000000 +0200
20 defaults/apt/apt.conf \
21 + defaults/poldek/poldek.conf \
22 template/initpost template/initpre \
23 rh9/apt/rpmpriorities rh9/pkgs/01 rh9/pkgs/02 \
24 fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \
26 suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
28 gentoo/init-vserver.sh gentoo/net.vserver \
29 - gentoo/reboot.sh gentoo/shutdown.sh
30 + gentoo/reboot.sh gentoo/shutdown.sh\
31 + pld-ac/pkgs/01 pld-ac/rpm/macros \
32 + pld-th/pkgs/01 pld-th/rpm/macros \
33 + pld-ti/pkgs/01 pld-ti/rpm/macros
35 nobase_confdistrib_DATA = rh9/apt/sources.list \
36 fc1/apt/sources.list \
38 fc5/apt/sources.list \
39 fc6/apt/sources.list \
41 - suse91/apt/sources.list
42 + suse91/apt/sources.list \
43 + pld-ac/poldek/repos.d/pld.conf \
44 + pld-th/poldek/repos.d/pld.conf \
45 + pld-ti/poldek/repos.d/pld.conf
47 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
48 = $(nobase_distrib_SCRIPTS)
49 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100
50 +++ util-vserver-0.30.216-r2837/distrib/pld-ac/pkgs/01 2009-06-22 17:48:26.000000000 +0200
58 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
59 +++ util-vserver-0.30.216-r2837/distrib/pld-ac/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
62 +# PLD Linux Distribution <http://www.pld-linux.org/>.
64 +# Main sources for PLD Linux 2.0 (Ac)
66 +# specify our packages architecture
69 +# main PLD-site for often changed things:
70 +_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
73 +## You can use them if you have better connection there
75 +#_prefix = ftp://ftp.task.pld-linux.org/dists/ac
76 +_prefix = %{_pld_main_prefix}
84 +path = %{_prefix}/PLD/%{_arch}/PLD/RPMS/
87 +# msmtp-sendmail is broken, yum noarch is older than in updates
88 +ignore = msmtp-sendmail* yum*
93 +path = %{_prefix}/updates/%{_arch}/
100 +path = %{_prefix}/supported/%{_arch}/
108 +path = %{_pld_main_prefix}/ready/%{_arch}/
116 +path = %{_pld_main_prefix}/test/%{_arch}/
120 +# ac-main + ac-updates
124 +sources = ac-main ac-updates
125 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
126 +++ util-vserver-0.30.216-r2837/distrib/pld-ac/rpm/macros 2009-06-22 17:48:26.000000000 +0200
128 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
129 +# you have to use at least one language beside 'C'
130 +%_install_langs C:en:pl
131 +%_netsharedpath /dev:/proc
134 --- util-vserver-0.30.216-r2837.orig/distrib/pld-th/pkgs/01 1970-01-01 01:00:00.000000000 +0100
135 +++ util-vserver-0.30.216-r2837/distrib/pld-th/pkgs/01 2009-06-22 17:48:26.000000000 +0200
143 --- util-vserver-0.30.216-r2837.orig/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
144 +++ util-vserver-0.30.216-r2837/distrib/pld-th/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
146 +# PLD Linux Distribution <http://www.pld-linux.org/>.
148 +# Main sources for PLD Linux 3.0 (Th)
150 +# specify our packages architecture
153 +# main PLD-site for often changed things (test, ready):
154 +_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th
157 +## You can use them if you have better connection there
159 +#_prefix = ftp://ftp.task.pld-linux.org/dists/th
160 +_prefix = %{_pld_main_prefix}
162 +# PLD Linux 3.0 (Th): main sources
166 +path = %{_prefix}/PLD/%{_arch}/RPMS/
171 +path = %{_prefix}/PLD/noarch/RPMS/
173 +# PLD Linux 3.0 (Th): obsolete sources (kde3, ...)
177 +path = %{_prefix}/obsolete/%{_arch}/RPMS/
184 +path = %{_prefix}/obsolete/noarch/RPMS/
188 +# PLD Linux 3.0 (Th): ready sources (testing stage before moved to main)
192 +path = %{_pld_main_prefix}/ready/%{_arch}/RPMS/
199 +path = %{_pld_main_prefix}/ready/noarch/RPMS/
203 +# PLD Linux 3.0 (Th): test sources (built packages to be moved to ready)
207 +path = %{_pld_main_prefix}/test/%{_arch}/RPMS/
214 +path = %{_pld_main_prefix}/test/noarch/RPMS/
217 --- util-vserver-0.30.216-r2837.orig/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
218 +++ util-vserver-0.30.216-r2837/distrib/pld-th/rpm/macros 2009-06-22 17:48:26.000000000 +0200
220 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
221 +# you have to use at least one language beside 'C'
222 +%_install_langs C:en:pl
223 +%_netsharedpath /dev:/proc
226 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/pkgs/01 1970-01-01 01:00:00.000000000 +0100
227 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/pkgs/01 2009-06-22 17:48:26.000000000 +0200
235 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
236 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
239 +# Unofficial version of PLD Linux Distribution
240 +# http://www.pld-linux.org/Titanium
243 +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium
250 +path = %{_prefix}/PLD/%{_arch}/RPMS/
255 +path = %{_prefix}/PLD/noarch/RPMS/
259 +name = titanium-ready
260 +path = %{_prefix}/ready/%{_arch}/RPMS/
266 +name = titanium-ready
267 +path = %{_prefix}/ready/noarch/RPMS/
273 +name = titanium-test
274 +path = %{_prefix}/test/%{_arch}/RPMS/
280 +name = titanium-test
281 +path = %{_prefix}/test/noarch/RPMS/
284 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/rpm/macros 1970-01-01 01:00:00.000000000 +0100
285 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/rpm/macros 2009-06-22 17:48:26.000000000 +0200
287 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
288 +# you have to use at least one language beside 'C'
289 +%_install_langs C:en:pl
290 +%_netsharedpath /dev:/proc
293 --- util-vserver-0.30.216-r2837.orig/scripts/functions 2009-06-22 17:36:35.000000000 +0200
294 +++ util-vserver-0.30.216-r2837/scripts/functions 2009-06-22 17:48:26.000000000 +0200
299 +function _pkgSetVarsPoldek
301 + if test -n "$PKGDIR"; then
302 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
303 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
305 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
306 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
309 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
310 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
314 function _pkgMountBase
317 apt) _pkgSetVarsApt;;
318 yum) _pkgSetVarsYum;;
319 urpmi) _pkgSetVarsUrpmi;;
320 + poldek) _pkgSetVarsPoldek;;
321 *) echo "Unknown packaging flavor" >&2; exit 1;;
326 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
328 + elif test -e "$_pgs_vdir"/etc/pld-release; then
330 elif test -e "$_pgs_vdir"/etc/debian_version; then
332 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
334 test -n "$have_yum" && return 0 || return 1
337 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
338 +function pkgmgmt.isPoldekAvailable
342 + local is_internal="$3"
344 + local have_poldek i
345 + if test -n "$is_internal"; then
347 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
350 + for i in /bin /usr/bin /usr/local/bin; do
351 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
355 + test -n "$have_poldek" && return 0 || return 1
359 function vshelper.doSanityCheck
361 --- util-vserver-0.30.216-r2837.orig/scripts/Makefile-files 2009-06-22 17:36:35.000000000 +0200
362 +++ util-vserver-0.30.216-r2837/scripts/Makefile-files 2009-06-22 17:48:26.000000000 +0200
364 scripts/vapt-get-worker \
365 scripts/vrpm-worker \
366 scripts/vyum-worker \
367 + scripts/vpoldek-worker \
368 scripts/vrpm-preload \
369 scripts/save_s_context \
370 scripts/vservers.grabinfo.sh \
372 scripts/vserver-build.template \
373 scripts/vserver-build.rsync \
374 scripts/vserver-build.clone \
375 + scripts/vserver-build.poldek \
376 scripts/vserver-build.functions \
377 scripts/vserver-build.functions.apt \
378 scripts/vserver-build.functions.rpm \
379 scripts/vserver-build.functions.pkgmgmt \
380 scripts/vserver-build.functions.yum \
381 + scripts/vserver-build.functions.poldek \
382 scripts/vserver-setup.functions \
383 scripts/vserver.functions \
384 scripts/vserver.start \
386 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
387 scripts/vapt-get-worker \
389 + scripts/vpoldek-worker \
390 scripts/vrpm-worker \
391 scripts/vrpm-preload \
392 scripts/start-vservers \
394 scripts_sbin_src_PRGS = scripts/chbind \
398 scripts/vdispatch-conf \
401 --- util-vserver-0.30.216-r2837.orig/scripts/pkgmgmt 2009-06-22 17:36:34.000000000 +0200
402 +++ util-vserver-0.30.216-r2837/scripts/pkgmgmt 2009-06-22 17:48:26.000000000 +0200
407 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}")
408 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi poldek "${YUM_RELEASEPKGS[@]}")
409 hasSubstring "$pkgs" ---rpm--- || {
411 * The vserver does not seem to have the 'rpm' package which is required
416 - hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- || {
417 + hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- ---poldek--- || {
419 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
420 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
421 installed. It is suggested to install such a program before setting
422 up internal package management."
424 @@ -368,6 +368,131 @@
428 +function processVserver_PLD()
431 + local is_internalize=$2
435 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
436 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
438 + ## Figure out the environment....
439 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
441 + local POLDEKETCDIR=
442 + local POLDEKCACHEDIR=
446 + ## Create directories and assign variables where configuration
447 + ## can/will be found on the host
448 + if test -n "$is_internalize"; then
449 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
451 +Can not continue; use '--force' to override this check"
453 + pushd "$vdir" >/dev/null
455 + test ! -L var/lib/rpm || {
456 + $_EXEC_CD /var/lib $_RM rpm &&
457 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
458 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
460 + } </dev/null 2>/dev/null
462 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
464 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
469 + if test -n "$have_poldek"; then
470 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
473 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
474 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
476 + mkdir -m755 -p "$cfgdir"
479 + if test -n "$have_poldek"; then
480 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
481 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
483 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
484 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
486 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
489 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
490 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
492 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
493 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
495 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
496 + test ! -e "$cfgdir"/base || need_base=
498 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
500 + mkdir -m755 -p "$PKGCFGDIR"
501 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
502 + "$RPMETCDIR" "$RPMSTATEDIR"
505 + ## Copy the files...
506 + if test -n "$is_internalize"; then
507 + if test -n "$have_poldek"; then
508 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
509 + pushd "$vdir" >/dev/null
510 + _hashAuto /etc/poldek.conf '/'
514 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
515 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
517 + pushd "$vdir" >/dev/null
518 + ## remove %_dbpath settings
519 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
522 + if test -n "$have_poldek"; then
523 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
524 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
527 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
528 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
530 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
534 + if test -n "$is_internalize"; then
537 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
538 + trap "$_RM -rf $tmpdir" EXIT
539 + pushd "$vdir" >/dev/null
540 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
541 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
546 + if test -n "$is_internalize"; then
547 + $_TOUCH "$cfgdir"/internal
549 + $_RM -f "$cfgdir"/internal
553 function processVserver_Debian()
559 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
560 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
561 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
563 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
564 --- util-vserver-0.30.216-r2837.orig/scripts/util-vserver-vars.pathsubst 2009-06-22 17:36:34.000000000 +0200
565 +++ util-vserver-0.30.216-r2837/scripts/util-vserver-vars.pathsubst 2009-06-22 17:48:26.000000000 +0200
567 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
568 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
569 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
570 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
571 _LISTDEVIP="$__LEGACYDIR/listdevip"
572 _LOCKFILE="$__PKGLIBDIR/lockfile"
573 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
575 _VUNIFY="$__PKGLIBDIR/vunify"
576 _VYUM="$__SBINDIR/vyum"
577 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
578 +_VPOLDEK="$__SBINDIR/vpoldek"
579 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
583 --- util-vserver-0.30.216-r2837.orig/scripts/vpkg 2009-06-22 17:36:34.000000000 +0200
584 +++ util-vserver-0.30.216-r2837/scripts/vpkg 2009-06-22 17:48:26.000000000 +0200
593 + ## rpm outputs sometimes '(contains no files)', so return
594 + ## only the valid output
596 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
598 + rpm_param=( -Uvh "$@" )
599 + poldek_param=( --install -v "$@" )
603 + if test -n "$is_external"; then
605 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
608 + for i in /bin /usr/bin /usr/local/bin; do
609 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
613 + if test -n "$is_external"; then
614 + if test "$have_poldek" -a "$poldek_param"; then
615 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
617 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
620 + if test "$have_poldek" -a "$poldek_param"; then
621 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
623 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
630 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
631 +++ util-vserver-0.30.216-r2837/scripts/vpoldek 2009-06-22 17:48:26.000000000 +0200
636 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
638 +# This program is free software; you can redistribute it and/or modify
639 +# it under the terms of the GNU General Public License as published by
640 +# the Free Software Foundation; version 2 of the License.
642 +# This program is distributed in the hope that it will be useful,
643 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
644 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 +# GNU General Public License for more details.
647 +# You should have received a copy of the GNU General Public License
648 +# along with this program; if not, write to the Free Software
649 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
651 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
652 +test -e "$UTIL_VSERVER_VARS" || {
653 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
656 +. "$UTIL_VSERVER_VARS"
663 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
665 +Report bugs to <$PACKAGE_BUGREPORT>."
669 +function showVersion()
672 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
673 +This program is part of $PACKAGE_STRING
675 +Copyright (C) 2007 Enrico Scholz
676 +This program is free software; you may redistribute it under the terms of
677 +the GNU General Public License. This program has absolutely no warranty."
681 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
684 +declare -a send_through poldek_opts
688 + (--help) showHelp $0 ;;
689 + (--version) showVersion ;;
690 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
691 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
692 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
693 + (--) shift; break;;
694 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
699 +VSOMETHING_TITLE=vpoldek
700 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
701 +VSOMETHING_PKGMGMT=1
703 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
705 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
706 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
707 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
708 +++ util-vserver-0.30.216-r2837/scripts/vpoldek-worker 2009-06-22 17:48:26.000000000 +0200
713 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
715 +# This program is free software; you can redistribute it and/or modify
716 +# it under the terms of the GNU General Public License as published by
717 +# the Free Software Foundation; version 2 of the License.
719 +# This program is distributed in the hope that it will be useful,
720 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
721 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
722 +# GNU General Public License for more details.
724 +# You should have received a copy of the GNU General Public License
725 +# along with this program; if not, write to the Free Software
726 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
730 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
731 +test -e "$UTIL_VSERVER_VARS" || {
732 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
735 +. "$UTIL_VSERVER_VARS"
742 +pkgInit "$vserver" rpm poldek
744 +test -z "$_POLDEK" || {
745 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
746 + ${POLDEK:=$_POLDEK}
749 +exec ${_POLDEK:-poldek} \
751 + --cachedir=$POLDEKCACHEDIR \
752 + --conf=$POLDEK_CONFIG \
753 + --pmcmd=$RPM_BINARY \
755 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build 2009-06-22 17:36:34.000000000 +0200
756 +++ util-vserver-0.30.216-r2837/scripts/vserver-build 2009-06-22 17:48:26.000000000 +0200
758 ... installs the base-packages of the given distribution with
760 urpmi ... -- -d <distribution> -m <mirror>
761 + poldek ... -- -d <distribution>
762 + ... installs the base-packages of the given distribution with
764 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
765 ... installs lists of rpm-packages
766 skeleton ... -- [<cmd> <args>*]
770 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
771 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi)
772 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi|xpoldek)
773 . $__PKGLIBDIR/vserver-build.$method
775 (x) panic $"No build-method specified";;
776 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions 2009-06-22 17:36:35.000000000 +0200
777 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions 2009-06-22 17:48:26.000000000 +0200
779 elif test -e /etc/slackware-version; then
780 set -- $(cat /etc/slackware-version)
781 DISTRIBUTION=slackware$2
782 + elif test -e /etc/pld-release; then
785 + set -- $(cat /etc/pld-release)
786 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
788 elif test -n "$1"; then
791 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
792 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions.poldek 2009-06-22 17:48:26.000000000 +0200
796 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
798 +# This program is free software; you can redistribute it and/or modify
799 +# it under the terms of the GNU General Public License as published by
800 +# the Free Software Foundation; version 2 of the License.
802 +# This program is distributed in the hope that it will be useful,
803 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
804 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
805 +# GNU General Public License for more details.
807 +# You should have received a copy of the GNU General Public License
808 +# along with this program; if not, write to the Free Software
809 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
811 +function poldek.installBasePackages
816 + test "$dir" != / || return 0
817 + for filelist in "$dir"/*; do
818 + isRegularFile "$filelist" || continue
820 + local can_fail=false
821 + local flags='--install'
823 + set -- $(<$filelist)
824 + while test "$#" -gt 0; do
826 + --reinstall) flags='--reinstall';;
827 + --can-fail) can_fail=true;;
832 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
836 +function poldek.initVariables
838 + findFile POLDEKCONFDEFAULT \
839 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
840 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
841 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
842 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
846 +function poldek.initFilesystem
848 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
850 + $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
852 + populateDirectory "$PKGCFGDIR/poldek/etc" \
853 + "$__DISTRIBDIR/defaults/poldek" \
854 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
855 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
857 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
858 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
859 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
860 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
862 + if [ -n "$SETUP_MACHINE" ]; then
863 + say "Using $SETUP_MACHINE as machine"
864 + sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
867 + if [ -n "$MIRROR" ]; then
868 + say "Using $MIRROR as mirror URL"
869 + sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
872 +# test -z "$POLDEKCONFDEFAULT" || \
873 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
875 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
876 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.poldek 2009-06-22 17:48:26.000000000 +0200
880 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
882 +# This program is free software; you can redistribute it and/or modify
883 +# it under the terms of the GNU General Public License as published by
884 +# the Free Software Foundation; version 2 of the License.
886 +# This program is distributed in the hope that it will be useful,
887 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
888 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
889 +# GNU General Public License for more details.
891 +# You should have received a copy of the GNU General Public License
892 +# along with this program; if not, write to the Free Software
893 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
895 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
898 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
899 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
900 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
904 + (-d) DISTRIBUTION=$2; shift;;
905 + (-m) MIRROR=$2; shift;;
907 + (--) shift; break ;;
908 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
919 +pkgmgmt.initVariables
921 +poldek.initVariables
923 +base.initFilesystem "$OPTION_FORCE"
924 +pkgmgmt.initFilesystem "$OPTION_FORCE"
926 +poldek.initFilesystem
928 +setup_writeOption "$VSERVER_NAME"
929 +setup_writeInitialFstab
931 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
932 +rpm.initDB "$SETUP_CONFDIR"
933 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
934 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
935 + "$__CONFDIR/.distributions/.common/pubkeys" \
936 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
938 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
939 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
940 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"