1 --- util-vserver-0.30.214/distrib/Makefile.am 2008-03-25 22:57:41.202725402 +0200
2 +++ util-vserver-0.30.214/distrib/Makefile.am 2008-03-25 22:59:35.515771366 +0200
6 defaults/apt/apt.conf \
7 + defaults/poldek/poldek.conf \
8 template/initpost template/initpre \
9 rh9/apt/rpmpriorities rh9/pkgs/01 rh9/pkgs/02 \
10 fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \
12 breezy/debootstrap.script dapper/debootstrap.script \
13 edgy/debootstrap.script feisty/debootstrap.script \
14 gutsy/debootstrap.script hoary/debootstrap.script \
15 - warty/debootstrap.script
16 + warty/debootstrap.script \
17 + pld-ac/pkgs/01 pld-ac/rpm/macros \
18 + pld-th/pkgs/01 pld-th/rpm/macros \
19 + pld-ti/pkgs/01 pld-ti/rpm/macros \
21 nobase_confdistrib_DATA = rh9/apt/sources.list \
22 fc1/apt/sources.list \
24 fc5/apt/sources.list \
25 fc6/apt/sources.list \
27 - suse91/apt/sources.list
28 + suse91/apt/sources.list \
29 + pld-ac/poldek/repos.d/pld.conf \
30 + pld-th/poldek/repos.d/pld.conf \
31 + pld-ti/poldek/repos.d/pld.conf \
34 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
35 = $(nobase_distrib_SCRIPTS)
36 --- /dev/null 2007-11-07 17:05:30.000000000 +0200
37 +++ util-vserver-0.30.214/distrib/defaults/poldek/poldek.conf 2008-03-25 19:36:58.721331962 +0200
39 +# poldek configuration file.
44 +particle install = no
45 +choose equivalents manually = yes
46 +unique package names = yes
49 +ignore = kernel* udev devfs
50 --- util-vserver-0.30.214/distrib/pld-ac/pkgs/01 2007-11-15 23:20:48.181172125 +0100
51 +++ util-vserver-0.30.214/distrib/pld-ac/pkgs/01 2008-03-25 23:05:18.538916218 +0200
59 --- util-vserver-0.30.214.org/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
60 +++ util-vserver-0.30.214/distrib/pld-ac/poldek/repos.d/pld.conf 2007-11-15 23:20:48.181172125 +0100
63 +# PLD <http://www.pld-linux.org/>
66 +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
68 +## You can use them if you have better connection there
70 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
77 +type = %{_ac_idxtype}
79 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
83 +type = %{_ac_idxtype}
85 +path = %{_pld_prefix}/updates/%{_pld_arch}/
89 +type = %{_ac_idxtype}
91 +path = %{_pld_prefix}/supported/%{_pld_arch}/
96 +type = %{_ac_idxtype}
98 +path = %{_pld_prefix}/ready/%{_pld_arch}/
102 +type = %{_ac_idxtype}
104 +path = %{_pld_prefix}/test/%{_pld_arch}/
106 --- util-vserver-0.30.214.org/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
107 +++ util-vserver-0.30.214/distrib/pld-ac/rpm/macros 2007-11-15 23:20:48.181172125 +0100
109 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
110 +# you have to use at least one language beside 'C'
111 +%_install_langs C:en:pl
112 +%_netsharedpath /dev
113 --- util-vserver-0.30.214/distrib/pld-th/pkgs/01 2007-11-15 23:20:48.181172125 +0100
114 +++ util-vserver-0.30.214/distrib/pld-th/pkgs/01 2008-03-25 23:05:18.538916218 +0200
122 --- util-vserver-0.30.214.org/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
123 +++ util-vserver-0.30.214/distrib/pld-th/poldek/repos.d/pld.conf 2007-11-15 23:20:48.181172125 +0100
125 +# PLD <http://www.pld-linux.org/>
128 +_pld_prefix = ftp://ftp.th.pld-linux.org/dists/th
130 +## You can use them if you have better connection there
132 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/th
139 +type = %{_th_idxtype}
141 +path = %{_pld_prefix}/PLD/%{_pld_arch}/RPMS/
144 +type = %{_th_idxtype}
146 +path = %{_pld_prefix}/PLD/noarch/RPMS/
149 +type = %{_th_idxtype}
150 +name = th-updates-security
151 +path = %{_pld_prefix}/updates-security/%{_pld_arch}/RPMS/
154 +type = %{_th_idxtype}
155 +name = th-updates-general
156 +path = %{_pld_prefix}/updates-general/%{_pld_arch}/RPMS/
160 +#type = %{_th_idxtype}
161 +#name = th-supported
162 +#path = %{_pld_prefix}/supported/%{_pld_arch}/RPMS/
166 +type = %{_th_idxtype}
168 +path = %{_pld_prefix}/ready/%{_pld_arch}/RPMS/
172 +type = %{_th_idxtype}
174 +path = %{_pld_prefix}/test/%{_pld_arch}/RPMS/
176 --- util-vserver-0.30.214.org/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
177 +++ util-vserver-0.30.214/distrib/pld-th/rpm/macros 2007-11-15 23:20:48.184505622 +0100
179 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
180 +# you have to use at least one language beside 'C'
181 +%_install_langs C:en:pl
182 +%_netsharedpath /dev
183 --- util-vserver-0.30.214/distrib/pld-ti/pkgs/01 2007-11-15 23:20:48.181172125 +0100
184 +++ util-vserver-0.30.214/distrib/pld-ti/pkgs/01 2008-03-25 23:05:18.538916218 +0200
192 --- util-vserver-0.30.214.org/distrib/pld-ti/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
193 +++ util-vserver-0.30.214/distrib/pld-ti/poldek/repos.d/pld.conf 2007-11-15 23:20:48.217840583 +0100
196 +# Unofficial version of PLD Linux Distribution
197 +# http://www.pld-linux.org/Titanium
200 +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium
207 +path = %{_prefix}/PLD/%{_arch}/RPMS/
212 +path = %{_prefix}/PLD/noarch/RPMS/
216 +name = titanium-ready
217 +path = %{_prefix}/ready/%{_arch}/RPMS/
223 +name = titanium-ready
224 +path = %{_prefix}/ready/noarch/RPMS/
230 +name = titanium-test
231 +path = %{_prefix}/test/%{_arch}/RPMS/
237 +name = titanium-test
238 +path = %{_prefix}/test/noarch/RPMS/
241 --- util-vserver-0.30.214.org/distrib/pld-ti/rpm/macros 1970-01-01 01:00:00.000000000 +0100
242 +++ util-vserver-0.30.214/distrib/pld-ti/rpm/macros 2007-11-15 23:20:48.221174080 +0100
244 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
245 +# you have to use at least one language beside 'C'
246 +%_install_langs C:en:pl
247 +%_netsharedpath /dev
248 --- util-vserver-0.30.214.org/scripts/functions 2007-09-02 22:06:41.000000000 +0200
249 +++ util-vserver-0.30.214/scripts/functions 2007-11-15 23:20:48.221174080 +0100
254 +function _pkgSetVarsPoldek
256 + if test -n "$PKGDIR"; then
257 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
258 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
260 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
261 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
264 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
265 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
269 function _pkgMountBase
272 rpm) _pkgSetVarsRPM;;
273 apt) _pkgSetVarsApt;;
274 yum) _pkgSetVarsYum;;
275 + poldek) _pkgSetVarsPoldek;;
276 *) echo "Unknown packaging flavor" >&2; exit 1;;
281 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
283 + elif test -e "$_pgs_vdir"/etc/pld-release; then
285 elif test -e "$_pgs_vdir"/etc/debian_version; then
287 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
289 test -n "$have_yum" && return 0 || return 1
292 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
293 +function pkgmgmt.isPoldekAvailable
297 + local is_internal="$3"
299 + local have_poldek i
300 + if test -n "$is_internal"; then
302 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
305 + for i in /bin /usr/bin /usr/local/bin; do
306 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
310 + test -n "$have_poldek" && return 0 || return 1
314 function vshelper.doSanityCheck
316 --- util-vserver-0.30.214.org/scripts/Makefile-files 2007-09-02 22:06:41.000000000 +0200
317 +++ util-vserver-0.30.214/scripts/Makefile-files 2007-11-15 23:20:48.221174080 +0100
319 scripts/vapt-get-worker \
320 scripts/vrpm-worker \
321 scripts/vyum-worker \
322 + scripts/vpoldek-worker \
323 scripts/vrpm-preload \
324 scripts/save_s_context \
325 scripts/vservers.grabinfo.sh \
327 scripts/vserver-build.template \
328 scripts/vserver-build.rsync \
329 scripts/vserver-build.clone \
330 + scripts/vserver-build.poldek \
331 scripts/vserver-build.functions \
332 scripts/vserver-build.functions.apt \
333 scripts/vserver-build.functions.rpm \
334 scripts/vserver-build.functions.pkgmgmt \
335 scripts/vserver-build.functions.yum \
336 + scripts/vserver-build.functions.poldek \
337 scripts/vserver-setup.functions \
338 scripts/vserver.functions \
339 scripts/vserver.start \
341 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
342 scripts/vapt-get-worker \
344 + scripts/vpoldek-worker \
345 scripts/vrpm-worker \
346 scripts/vrpm-preload \
347 scripts/start-vservers \
349 scripts_sbin_src_PRGS = scripts/chbind \
353 scripts/vdispatch-conf \
356 --- util-vserver-0.30.214.org/scripts/pkgmgmt 2007-09-02 22:06:41.000000000 +0200
357 +++ util-vserver-0.30.214/scripts/pkgmgmt 2007-11-15 23:20:48.221174080 +0100
362 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
363 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
364 hasSubstring "$pkgs" ---rpm--- || {
366 * The vserver does not seem to have the 'rpm' package which is required
371 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
372 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
374 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
375 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
376 installed. It is suggested to install such a program before setting
377 up internal package management."
379 @@ -368,6 +368,131 @@
383 +function processVserver_PLD()
386 + local is_internalize=$2
390 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
391 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
393 + ## Figure out the environment....
394 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
396 + local POLDEKETCDIR=
397 + local POLDEKCACHEDIR=
401 + ## Create directories and assign variables where configuration
402 + ## can/will be found on the host
403 + if test -n "$is_internalize"; then
404 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
406 +Can not continue; use '--force' to override this check"
408 + pushd "$vdir" >/dev/null
410 + test ! -L var/lib/rpm || {
411 + $_EXEC_CD /var/lib $_RM rpm &&
412 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
413 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
415 + } </dev/null 2>/dev/null
417 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
419 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
424 + if test -n "$have_poldek"; then
425 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
428 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
429 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
431 + mkdir -m755 -p "$cfgdir"
434 + if test -n "$have_poldek"; then
435 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
436 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
438 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
439 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
441 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
444 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
445 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
447 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
448 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
450 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
451 + test ! -e "$cfgdir"/base || need_base=
453 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
455 + mkdir -m755 -p "$PKGCFGDIR"
456 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
457 + "$RPMETCDIR" "$RPMSTATEDIR"
460 + ## Copy the files...
461 + if test -n "$is_internalize"; then
462 + if test -n "$have_poldek"; then
463 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
464 + pushd "$vdir" >/dev/null
465 + _hashAuto /etc/poldek.conf '/'
469 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
470 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
472 + pushd "$vdir" >/dev/null
473 + ## remove %_dbpath settings
474 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
477 + if test -n "$have_poldek"; then
478 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
479 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
482 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
483 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
485 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
489 + if test -n "$is_internalize"; then
492 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
493 + trap "$_RM -rf $tmpdir" EXIT
494 + pushd "$vdir" >/dev/null
495 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
496 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
501 + if test -n "$is_internalize"; then
502 + $_TOUCH "$cfgdir"/internal
504 + $_RM -f "$cfgdir"/internal
508 function processVserver_Debian()
514 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
515 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
516 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
518 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
519 --- util-vserver-0.30.214.org/scripts/util-vserver-vars.pathsubst 2007-09-02 22:06:41.000000000 +0200
520 +++ util-vserver-0.30.214/scripts/util-vserver-vars.pathsubst 2007-11-15 23:20:48.221174080 +0100
522 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
523 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
524 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
525 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
526 _LISTDEVIP="$__LEGACYDIR/listdevip"
527 _LOCKFILE="$__PKGLIBDIR/lockfile"
528 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
530 _VUNIFY="$__PKGLIBDIR/vunify"
531 _VYUM="$__SBINDIR/vyum"
532 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
533 +_VPOLDEK="$__SBINDIR/vpoldek"
534 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
538 --- util-vserver-0.30.214.org/scripts/vpkg 2007-09-02 22:06:41.000000000 +0200
539 +++ util-vserver-0.30.214/scripts/vpkg 2007-11-15 23:20:48.221174080 +0100
548 + ## rpm outputs sometimes '(contains no files)', so return
549 + ## only the valid output
551 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
553 + rpm_param=( -Uvh "$@" )
554 + poldek_param=( --install -v "$@" )
558 + if test -n "$is_external"; then
560 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
563 + for i in /bin /usr/bin /usr/local/bin; do
564 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
568 + if test -n "$is_external"; then
569 + if test "$have_poldek" -a "$poldek_param"; then
570 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
572 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
575 + if test "$have_poldek" -a "$poldek_param"; then
576 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
578 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
585 --- util-vserver-0.30.214.org/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
586 +++ util-vserver-0.30.214/scripts/vpoldek 2007-11-15 22:00:24.000000000 +0100
591 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
593 +# This program is free software; you can redistribute it and/or modify
594 +# it under the terms of the GNU General Public License as published by
595 +# the Free Software Foundation; version 2 of the License.
597 +# This program is distributed in the hope that it will be useful,
598 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
599 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
600 +# GNU General Public License for more details.
602 +# You should have received a copy of the GNU General Public License
603 +# along with this program; if not, write to the Free Software
604 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
606 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
607 +test -e "$UTIL_VSERVER_VARS" || {
608 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
611 +. "$UTIL_VSERVER_VARS"
618 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
620 +Report bugs to <$PACKAGE_BUGREPORT>."
624 +function showVersion()
627 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
628 +This program is part of $PACKAGE_STRING
630 +Copyright (C) 2007 Enrico Scholz
631 +This program is free software; you may redistribute it under the terms of
632 +the GNU General Public License. This program has absolutely no warranty."
636 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
639 +declare -a send_through poldek_opts
643 + (--help) showHelp $0 ;;
644 + (--version) showVersion ;;
645 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
646 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
647 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
648 + (--) shift; break;;
649 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
654 +VSOMETHING_TITLE=vpoldek
655 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
656 +VSOMETHING_PKGMGMT=1
658 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
660 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
661 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
662 --- util-vserver-0.30.214.org/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
663 +++ util-vserver-0.30.214/scripts/vpoldek-worker 2007-11-15 22:58:23.000000000 +0100
668 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
670 +# This program is free software; you can redistribute it and/or modify
671 +# it under the terms of the GNU General Public License as published by
672 +# the Free Software Foundation; version 2 of the License.
674 +# This program is distributed in the hope that it will be useful,
675 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
676 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
677 +# GNU General Public License for more details.
679 +# You should have received a copy of the GNU General Public License
680 +# along with this program; if not, write to the Free Software
681 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
685 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
686 +test -e "$UTIL_VSERVER_VARS" || {
687 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
690 +. "$UTIL_VSERVER_VARS"
697 +pkgInit "$vserver" rpm poldek
699 +test -z "$_POLDEK" || {
700 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
701 + ${POLDEK:=$_POLDEK}
704 +exec ${_POLDEK:-poldek} \
706 + --cachedir=$POLDEKCACHEDIR \
707 + --conf=$POLDEK_CONFIG \
708 + --pmcmd=$RPM_BINARY \
710 --- util-vserver-0.30.214.org/scripts/vserver-build 2007-09-02 22:06:41.000000000 +0200
711 +++ util-vserver-0.30.214/scripts/vserver-build 2007-11-15 23:20:48.224507577 +0100
713 yum ... -- -d <distribution>
714 ... installs the base-packages of the given distribution with
716 + poldek ... -- -d <distribution>
717 + ... installs the base-packages of the given distribution with
719 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
720 ... installs lists of rpm-packages
721 skeleton ... -- [<cmd> <args>*]
725 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
726 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone)
727 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xpoldek)
728 . $__PKGLIBDIR/vserver-build.$method
730 (x) panic $"No build-method specified";;
731 --- util-vserver-0.30.214.org/scripts/vserver-build.functions 2007-09-02 22:06:41.000000000 +0200
732 +++ util-vserver-0.30.214/scripts/vserver-build.functions 2007-11-15 23:20:48.224507577 +0100
734 elif test -e /etc/slackware-version; then
735 set -- $(cat /etc/slackware-version)
736 DISTRIBUTION=slackware$2
737 + elif test -e /etc/pld-release; then
740 + set -- $(cat /etc/pld-release)
741 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
743 elif test -n "$1"; then
746 --- util-vserver-0.30.214/scripts/vserver-build.functions.poldek 2008-03-25 19:20:07.685144000 +0200
747 +++ util-vserver-0.30.214/scripts/vserver-build.functions.poldek 2008-03-25 20:37:09.000000000 +0200
751 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
753 +# This program is free software; you can redistribute it and/or modify
754 +# it under the terms of the GNU General Public License as published by
755 +# the Free Software Foundation; version 2 of the License.
757 +# This program is distributed in the hope that it will be useful,
758 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
759 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
760 +# GNU General Public License for more details.
762 +# You should have received a copy of the GNU General Public License
763 +# along with this program; if not, write to the Free Software
764 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
766 +function poldek.installBasePackages
771 + test "$dir" != / || return 0
772 + for filelist in "$dir"/*; do
773 + isRegularFile "$filelist" || continue
775 + local can_fail=false
776 + local flags='--install'
778 + set -- $(<$filelist)
779 + while test "$#" -gt 0; do
781 + --reinstall) flags='--reinstall';;
782 + --can-fail) can_fail=true;;
787 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
791 +function poldek.initVariables
793 + findFile POLDEKCONFDEFAULT \
794 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
795 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
796 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
797 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
801 +function poldek.initFilesystem
803 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
804 + mkdir -p "$PKGCFGBASE"/poldek-cache
806 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
808 + populateDirectory "$PKGCFGDIR/poldek/etc" \
809 + "$__DISTRIBDIR/defaults/poldek" \
810 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
811 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
813 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
814 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
815 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
816 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
818 + if [ -n "$SETUP_MACHINE" ]; then
819 + say "Using $SETUP_MACHINE as machine"
820 + sed -i -e "s#^\(_pld_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/pld.conf
823 + if [ -n "$MIRROR" ]; then
824 + say "Using $MIRROR as mirror URL"
825 + sed -i -e "s#^\(_pld_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/pld.conf
828 +# test -z "$POLDEKCONFDEFAULT" || \
829 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
831 --- util-vserver-0.30.214/scripts/vserver-build.poldek 2007-11-15 23:20:48.224507577 +0100
832 +++ util-vserver-0.30.214/scripts/vserver-build.poldek 2008-03-25 20:25:23.000000000 +0200
836 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
838 +# This program is free software; you can redistribute it and/or modify
839 +# it under the terms of the GNU General Public License as published by
840 +# the Free Software Foundation; version 2 of the License.
842 +# This program is distributed in the hope that it will be useful,
843 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
844 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
845 +# GNU General Public License for more details.
847 +# You should have received a copy of the GNU General Public License
848 +# along with this program; if not, write to the Free Software
849 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
851 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
854 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
855 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
856 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
860 + (-d) DISTRIBUTION=$2; shift;;
861 + (-m) MIRROR=$2; shift;;
863 + (--) shift; break ;;
864 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
875 +pkgmgmt.initVariables
877 +poldek.initVariables
879 +base.initFilesystem "$OPTION_FORCE"
880 +pkgmgmt.initFilesystem "$OPTION_FORCE"
882 +poldek.initFilesystem
884 +setup_writeOption "$VSERVER_NAME"
885 +setup_writeInitialFstab
887 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
888 +rpm.initDB "$SETUP_CONFDIR"
889 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
890 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
891 + "$__CONFDIR/.distributions/.common/pubkeys" \
892 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
894 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
895 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
896 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"