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/>.
149 +_prefix = ftp://ftp.th.pld-linux.org/dists/th
151 +## You can use them if you have better connection there
153 +#_prefix = ftp://ftp.task.pld-linux.org/dists/th
161 +path = %{_prefix}/PLD/%{_arch}/RPMS/
166 +path = %{_prefix}/PLD/noarch/RPMS/
171 +#path = %{_prefix}/updates/%{_arch}/RPMS/
176 +#path = %{_prefix}/updates/noarch/RPMS/
180 +#name = th-supported
181 +#path = %{_prefix}/supported/%{_arch}/
187 +path = %{_prefix}/ready/%{_arch}/RPMS/
194 +path = %{_prefix}/ready/noarch/RPMS/
201 +path = %{_prefix}/test/%{_arch}/RPMS/
208 +path = %{_prefix}/test/noarch/RPMS/
211 --- util-vserver-0.30.216-r2837.orig/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
212 +++ util-vserver-0.30.216-r2837/distrib/pld-th/rpm/macros 2009-06-22 17:48:26.000000000 +0200
214 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
215 +# you have to use at least one language beside 'C'
216 +%_install_langs C:en:pl
217 +%_netsharedpath /dev:/proc
220 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/pkgs/01 1970-01-01 01:00:00.000000000 +0100
221 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/pkgs/01 2009-06-22 17:48:26.000000000 +0200
229 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
230 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
233 +# Unofficial version of PLD Linux Distribution
234 +# http://www.pld-linux.org/Titanium
237 +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium
244 +path = %{_prefix}/PLD/%{_arch}/RPMS/
249 +path = %{_prefix}/PLD/noarch/RPMS/
253 +name = titanium-ready
254 +path = %{_prefix}/ready/%{_arch}/RPMS/
260 +name = titanium-ready
261 +path = %{_prefix}/ready/noarch/RPMS/
267 +name = titanium-test
268 +path = %{_prefix}/test/%{_arch}/RPMS/
274 +name = titanium-test
275 +path = %{_prefix}/test/noarch/RPMS/
278 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/rpm/macros 1970-01-01 01:00:00.000000000 +0100
279 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/rpm/macros 2009-06-22 17:48:26.000000000 +0200
281 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
282 +# you have to use at least one language beside 'C'
283 +%_install_langs C:en:pl
284 +%_netsharedpath /dev:/proc
287 --- util-vserver-0.30.216-r2837.orig/scripts/functions 2009-06-22 17:36:35.000000000 +0200
288 +++ util-vserver-0.30.216-r2837/scripts/functions 2009-06-22 17:48:26.000000000 +0200
293 +function _pkgSetVarsPoldek
295 + if test -n "$PKGDIR"; then
296 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
297 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
299 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
300 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
303 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
304 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
308 function _pkgMountBase
311 rpm) _pkgSetVarsRPM;;
312 apt) _pkgSetVarsApt;;
313 yum) _pkgSetVarsYum;;
314 + poldek) _pkgSetVarsPoldek;;
315 *) echo "Unknown packaging flavor" >&2; exit 1;;
320 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
322 + elif test -e "$_pgs_vdir"/etc/pld-release; then
324 elif test -e "$_pgs_vdir"/etc/debian_version; then
326 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
328 test -n "$have_yum" && return 0 || return 1
331 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
332 +function pkgmgmt.isPoldekAvailable
336 + local is_internal="$3"
338 + local have_poldek i
339 + if test -n "$is_internal"; then
341 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
344 + for i in /bin /usr/bin /usr/local/bin; do
345 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
349 + test -n "$have_poldek" && return 0 || return 1
353 function vshelper.doSanityCheck
355 --- util-vserver-0.30.216-r2837.orig/scripts/Makefile-files 2009-06-22 17:36:35.000000000 +0200
356 +++ util-vserver-0.30.216-r2837/scripts/Makefile-files 2009-06-22 17:48:26.000000000 +0200
358 scripts/vapt-get-worker \
359 scripts/vrpm-worker \
360 scripts/vyum-worker \
361 + scripts/vpoldek-worker \
362 scripts/vrpm-preload \
363 scripts/save_s_context \
364 scripts/vservers.grabinfo.sh \
366 scripts/vserver-build.template \
367 scripts/vserver-build.rsync \
368 scripts/vserver-build.clone \
369 + scripts/vserver-build.poldek \
370 scripts/vserver-build.functions \
371 scripts/vserver-build.functions.apt \
372 scripts/vserver-build.functions.rpm \
373 scripts/vserver-build.functions.pkgmgmt \
374 scripts/vserver-build.functions.yum \
375 + scripts/vserver-build.functions.poldek \
376 scripts/vserver-setup.functions \
377 scripts/vserver.functions \
378 scripts/vserver.start \
380 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
381 scripts/vapt-get-worker \
383 + scripts/vpoldek-worker \
384 scripts/vrpm-worker \
385 scripts/vrpm-preload \
386 scripts/start-vservers \
388 scripts_sbin_src_PRGS = scripts/chbind \
392 scripts/vdispatch-conf \
395 --- util-vserver-0.30.216-r2837.orig/scripts/pkgmgmt 2009-06-22 17:36:34.000000000 +0200
396 +++ util-vserver-0.30.216-r2837/scripts/pkgmgmt 2009-06-22 17:48:26.000000000 +0200
401 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
402 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
403 hasSubstring "$pkgs" ---rpm--- || {
405 * The vserver does not seem to have the 'rpm' package which is required
410 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
411 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
413 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
414 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
415 installed. It is suggested to install such a program before setting
416 up internal package management."
418 @@ -368,6 +368,131 @@
422 +function processVserver_PLD()
425 + local is_internalize=$2
429 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
430 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
432 + ## Figure out the environment....
433 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
435 + local POLDEKETCDIR=
436 + local POLDEKCACHEDIR=
440 + ## Create directories and assign variables where configuration
441 + ## can/will be found on the host
442 + if test -n "$is_internalize"; then
443 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
445 +Can not continue; use '--force' to override this check"
447 + pushd "$vdir" >/dev/null
449 + test ! -L var/lib/rpm || {
450 + $_EXEC_CD /var/lib $_RM rpm &&
451 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
452 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
454 + } </dev/null 2>/dev/null
456 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
458 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
463 + if test -n "$have_poldek"; then
464 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
467 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
468 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
470 + mkdir -m755 -p "$cfgdir"
473 + if test -n "$have_poldek"; then
474 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
475 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
477 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
478 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
480 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
483 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
484 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
486 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
487 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
489 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
490 + test ! -e "$cfgdir"/base || need_base=
492 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
494 + mkdir -m755 -p "$PKGCFGDIR"
495 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
496 + "$RPMETCDIR" "$RPMSTATEDIR"
499 + ## Copy the files...
500 + if test -n "$is_internalize"; then
501 + if test -n "$have_poldek"; then
502 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
503 + pushd "$vdir" >/dev/null
504 + _hashAuto /etc/poldek.conf '/'
508 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
509 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
511 + pushd "$vdir" >/dev/null
512 + ## remove %_dbpath settings
513 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
516 + if test -n "$have_poldek"; then
517 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
518 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
521 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
522 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
524 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
528 + if test -n "$is_internalize"; then
531 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
532 + trap "$_RM -rf $tmpdir" EXIT
533 + pushd "$vdir" >/dev/null
534 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
535 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
540 + if test -n "$is_internalize"; then
541 + $_TOUCH "$cfgdir"/internal
543 + $_RM -f "$cfgdir"/internal
547 function processVserver_Debian()
553 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
554 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
555 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
557 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
558 --- util-vserver-0.30.216-r2837.orig/scripts/util-vserver-vars.pathsubst 2009-06-22 17:36:34.000000000 +0200
559 +++ util-vserver-0.30.216-r2837/scripts/util-vserver-vars.pathsubst 2009-06-22 17:48:26.000000000 +0200
561 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
562 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
563 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
564 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
565 _LISTDEVIP="$__LEGACYDIR/listdevip"
566 _LOCKFILE="$__PKGLIBDIR/lockfile"
567 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
569 _VUNIFY="$__PKGLIBDIR/vunify"
570 _VYUM="$__SBINDIR/vyum"
571 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
572 +_VPOLDEK="$__SBINDIR/vpoldek"
573 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
577 --- util-vserver-0.30.216-r2837.orig/scripts/vpkg 2009-06-22 17:36:34.000000000 +0200
578 +++ util-vserver-0.30.216-r2837/scripts/vpkg 2009-06-22 17:48:26.000000000 +0200
587 + ## rpm outputs sometimes '(contains no files)', so return
588 + ## only the valid output
590 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
592 + rpm_param=( -Uvh "$@" )
593 + poldek_param=( --install -v "$@" )
597 + if test -n "$is_external"; then
599 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
602 + for i in /bin /usr/bin /usr/local/bin; do
603 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
607 + if test -n "$is_external"; then
608 + if test "$have_poldek" -a "$poldek_param"; then
609 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
611 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
614 + if test "$have_poldek" -a "$poldek_param"; then
615 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
617 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
624 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
625 +++ util-vserver-0.30.216-r2837/scripts/vpoldek 2009-06-22 17:48:26.000000000 +0200
630 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
632 +# This program is free software; you can redistribute it and/or modify
633 +# it under the terms of the GNU General Public License as published by
634 +# the Free Software Foundation; version 2 of the License.
636 +# This program is distributed in the hope that it will be useful,
637 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
638 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
639 +# GNU General Public License for more details.
641 +# You should have received a copy of the GNU General Public License
642 +# along with this program; if not, write to the Free Software
643 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
645 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
646 +test -e "$UTIL_VSERVER_VARS" || {
647 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
650 +. "$UTIL_VSERVER_VARS"
657 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
659 +Report bugs to <$PACKAGE_BUGREPORT>."
663 +function showVersion()
666 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
667 +This program is part of $PACKAGE_STRING
669 +Copyright (C) 2007 Enrico Scholz
670 +This program is free software; you may redistribute it under the terms of
671 +the GNU General Public License. This program has absolutely no warranty."
675 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
678 +declare -a send_through poldek_opts
682 + (--help) showHelp $0 ;;
683 + (--version) showVersion ;;
684 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
685 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
686 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
687 + (--) shift; break;;
688 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
693 +VSOMETHING_TITLE=vpoldek
694 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
695 +VSOMETHING_PKGMGMT=1
697 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
699 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
700 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
701 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
702 +++ util-vserver-0.30.216-r2837/scripts/vpoldek-worker 2009-06-22 17:48:26.000000000 +0200
707 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
709 +# This program is free software; you can redistribute it and/or modify
710 +# it under the terms of the GNU General Public License as published by
711 +# the Free Software Foundation; version 2 of the License.
713 +# This program is distributed in the hope that it will be useful,
714 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
715 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
716 +# GNU General Public License for more details.
718 +# You should have received a copy of the GNU General Public License
719 +# along with this program; if not, write to the Free Software
720 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
724 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
725 +test -e "$UTIL_VSERVER_VARS" || {
726 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
729 +. "$UTIL_VSERVER_VARS"
736 +pkgInit "$vserver" rpm poldek
738 +test -z "$_POLDEK" || {
739 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
740 + ${POLDEK:=$_POLDEK}
743 +exec ${_POLDEK:-poldek} \
745 + --cachedir=$POLDEKCACHEDIR \
746 + --conf=$POLDEK_CONFIG \
747 + --pmcmd=$RPM_BINARY \
749 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build 2009-06-22 17:36:34.000000000 +0200
750 +++ util-vserver-0.30.216-r2837/scripts/vserver-build 2009-06-22 17:48:26.000000000 +0200
752 yum ... -- -d <distribution>
753 ... installs the base-packages of the given distribution with
755 + poldek ... -- -d <distribution>
756 + ... installs the base-packages of the given distribution with
758 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
759 ... installs lists of rpm-packages
760 skeleton ... -- [<cmd> <args>*]
764 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
765 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone)
766 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xpoldek)
767 . $__PKGLIBDIR/vserver-build.$method
769 (x) panic $"No build-method specified";;
770 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions 2009-06-22 17:36:35.000000000 +0200
771 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions 2009-06-22 17:48:26.000000000 +0200
773 elif test -e /etc/slackware-version; then
774 set -- $(cat /etc/slackware-version)
775 DISTRIBUTION=slackware$2
776 + elif test -e /etc/pld-release; then
779 + set -- $(cat /etc/pld-release)
780 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
782 elif test -n "$1"; then
785 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
786 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions.poldek 2009-06-22 17:48:26.000000000 +0200
790 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
792 +# This program is free software; you can redistribute it and/or modify
793 +# it under the terms of the GNU General Public License as published by
794 +# the Free Software Foundation; version 2 of the License.
796 +# This program is distributed in the hope that it will be useful,
797 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
798 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
799 +# GNU General Public License for more details.
801 +# You should have received a copy of the GNU General Public License
802 +# along with this program; if not, write to the Free Software
803 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
805 +function poldek.installBasePackages
810 + test "$dir" != / || return 0
811 + for filelist in "$dir"/*; do
812 + isRegularFile "$filelist" || continue
814 + local can_fail=false
815 + local flags='--install'
817 + set -- $(<$filelist)
818 + while test "$#" -gt 0; do
820 + --reinstall) flags='--reinstall';;
821 + --can-fail) can_fail=true;;
826 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
830 +function poldek.initVariables
832 + findFile POLDEKCONFDEFAULT \
833 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
834 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
835 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
836 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
840 +function poldek.initFilesystem
842 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
844 + $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
846 + populateDirectory "$PKGCFGDIR/poldek/etc" \
847 + "$__DISTRIBDIR/defaults/poldek" \
848 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
849 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
851 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
852 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
853 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
854 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
856 + if [ -n "$SETUP_MACHINE" ]; then
857 + say "Using $SETUP_MACHINE as machine"
858 + sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
861 + if [ -n "$MIRROR" ]; then
862 + say "Using $MIRROR as mirror URL"
863 + sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
866 +# test -z "$POLDEKCONFDEFAULT" || \
867 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
869 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
870 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.poldek 2009-06-22 17:48:26.000000000 +0200
874 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
876 +# This program is free software; you can redistribute it and/or modify
877 +# it under the terms of the GNU General Public License as published by
878 +# the Free Software Foundation; version 2 of the License.
880 +# This program is distributed in the hope that it will be useful,
881 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
882 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
883 +# GNU General Public License for more details.
885 +# You should have received a copy of the GNU General Public License
886 +# along with this program; if not, write to the Free Software
887 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
889 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
892 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
893 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
894 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
898 + (-d) DISTRIBUTION=$2; shift;;
899 + (-m) MIRROR=$2; shift;;
901 + (--) shift; break ;;
902 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
913 +pkgmgmt.initVariables
915 +poldek.initVariables
917 +base.initFilesystem "$OPTION_FORCE"
918 +pkgmgmt.initFilesystem "$OPTION_FORCE"
920 +poldek.initFilesystem
922 +setup_writeOption "$VSERVER_NAME"
923 +setup_writeInitialFstab
925 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
926 +rpm.initDB "$SETUP_CONFDIR"
927 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
928 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
929 + "$__CONFDIR/.distributions/.common/pubkeys" \
930 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
932 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
933 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
934 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"