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/distrib/pld-ac/poldek/repos.d/pld.conf 2007-11-15 23:20:48.181172125 +0100
60 +++ util-vserver-0.30.214/distrib/pld-ac/poldek/repos.d/pld.conf 2008-03-25 20:34:12.000000000 +0200
63 +# PLD Linux Distribution <http://www.pld-linux.org/>.
65 +# specify our packages architecture
68 +# main PLD-site for often changed things:
69 +_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
72 +## You can use them if you have better connection there
74 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
75 +#_pld_prefix = %{_pld_main_prefix}
76 +_pld_prefix = %{_pld_main_prefix}
82 +type = %{_ac_idxtype}
84 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
86 +# buggy deps -- use one from updates instead
87 +ignore = msmtp-sendmail*
91 +type = %{_ac_idxtype}
93 +path = %{_pld_prefix}/updates/%{_pld_arch}/
98 +type = %{_ac_idxtype}
100 +path = %{_pld_prefix}/supported/%{_pld_arch}/
106 +type = %{_ac_idxtype}
108 +path = %{_pld_main_prefix}/ready/%{_pld_arch}/
113 +type = %{_ac_idxtype}
115 +path = %{_pld_main_prefix}/test/%{_pld_arch}/
118 --- util-vserver-0.30.214.org/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
119 +++ util-vserver-0.30.214/distrib/pld-ac/rpm/macros 2007-11-15 23:20:48.181172125 +0100
121 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
122 +# you have to use at least one language beside 'C'
123 +%_install_langs C:en:pl
124 +%_netsharedpath /dev
125 --- util-vserver-0.30.214/distrib/pld-th/pkgs/01 2007-11-15 23:20:48.181172125 +0100
126 +++ util-vserver-0.30.214/distrib/pld-th/pkgs/01 2008-03-25 23:05:18.538916218 +0200
134 --- util-vserver-0.30.214.org/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
135 +++ util-vserver-0.30.214/distrib/pld-th/poldek/repos.d/pld.conf 2007-11-15 23:20:48.181172125 +0100
137 +# PLD <http://www.pld-linux.org/>
140 +_pld_prefix = ftp://ftp.th.pld-linux.org/dists/th
142 +## You can use them if you have better connection there
144 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/th
151 +type = %{_th_idxtype}
153 +path = %{_pld_prefix}/PLD/%{_pld_arch}/RPMS/
156 +type = %{_th_idxtype}
158 +path = %{_pld_prefix}/PLD/noarch/RPMS/
161 +type = %{_th_idxtype}
162 +name = th-updates-security
163 +path = %{_pld_prefix}/updates-security/%{_pld_arch}/RPMS/
166 +type = %{_th_idxtype}
167 +name = th-updates-general
168 +path = %{_pld_prefix}/updates-general/%{_pld_arch}/RPMS/
172 +#type = %{_th_idxtype}
173 +#name = th-supported
174 +#path = %{_pld_prefix}/supported/%{_pld_arch}/RPMS/
178 +type = %{_th_idxtype}
180 +path = %{_pld_prefix}/ready/%{_pld_arch}/RPMS/
184 +type = %{_th_idxtype}
186 +path = %{_pld_prefix}/test/%{_pld_arch}/RPMS/
188 --- util-vserver-0.30.214.org/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
189 +++ util-vserver-0.30.214/distrib/pld-th/rpm/macros 2007-11-15 23:20:48.184505622 +0100
191 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
192 +# you have to use at least one language beside 'C'
193 +%_install_langs C:en:pl
194 +%_netsharedpath /dev
195 --- util-vserver-0.30.214/distrib/pld-ti/pkgs/01 2007-11-15 23:20:48.181172125 +0100
196 +++ util-vserver-0.30.214/distrib/pld-ti/pkgs/01 2008-03-25 23:05:18.538916218 +0200
204 --- util-vserver-0.30.214.org/distrib/pld-ti/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
205 +++ util-vserver-0.30.214/distrib/pld-ti/poldek/repos.d/pld.conf 2007-11-15 23:20:48.217840583 +0100
208 +# Unofficial version of PLD Linux Distribution
209 +# http://www.pld-linux.org/Titanium
212 +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium
219 +path = %{_prefix}/PLD/%{_arch}/RPMS/
224 +path = %{_prefix}/PLD/noarch/RPMS/
228 +name = titanium-ready
229 +path = %{_prefix}/ready/%{_arch}/RPMS/
235 +name = titanium-ready
236 +path = %{_prefix}/ready/noarch/RPMS/
242 +name = titanium-test
243 +path = %{_prefix}/test/%{_arch}/RPMS/
249 +name = titanium-test
250 +path = %{_prefix}/test/noarch/RPMS/
253 --- util-vserver-0.30.214.org/distrib/pld-ti/rpm/macros 1970-01-01 01:00:00.000000000 +0100
254 +++ util-vserver-0.30.214/distrib/pld-ti/rpm/macros 2007-11-15 23:20:48.221174080 +0100
256 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
257 +# you have to use at least one language beside 'C'
258 +%_install_langs C:en:pl
259 +%_netsharedpath /dev
260 --- util-vserver-0.30.214.org/scripts/functions 2007-09-02 22:06:41.000000000 +0200
261 +++ util-vserver-0.30.214/scripts/functions 2007-11-15 23:20:48.221174080 +0100
266 +function _pkgSetVarsPoldek
268 + if test -n "$PKGDIR"; then
269 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
270 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
272 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
273 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
276 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
277 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
281 function _pkgMountBase
284 rpm) _pkgSetVarsRPM;;
285 apt) _pkgSetVarsApt;;
286 yum) _pkgSetVarsYum;;
287 + poldek) _pkgSetVarsPoldek;;
288 *) echo "Unknown packaging flavor" >&2; exit 1;;
293 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
295 + elif test -e "$_pgs_vdir"/etc/pld-release; then
297 elif test -e "$_pgs_vdir"/etc/debian_version; then
299 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
301 test -n "$have_yum" && return 0 || return 1
304 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
305 +function pkgmgmt.isPoldekAvailable
309 + local is_internal="$3"
311 + local have_poldek i
312 + if test -n "$is_internal"; then
314 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
317 + for i in /bin /usr/bin /usr/local/bin; do
318 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
322 + test -n "$have_poldek" && return 0 || return 1
326 function vshelper.doSanityCheck
328 --- util-vserver-0.30.214.org/scripts/Makefile-files 2007-09-02 22:06:41.000000000 +0200
329 +++ util-vserver-0.30.214/scripts/Makefile-files 2007-11-15 23:20:48.221174080 +0100
331 scripts/vapt-get-worker \
332 scripts/vrpm-worker \
333 scripts/vyum-worker \
334 + scripts/vpoldek-worker \
335 scripts/vrpm-preload \
336 scripts/save_s_context \
337 scripts/vservers.grabinfo.sh \
339 scripts/vserver-build.template \
340 scripts/vserver-build.rsync \
341 scripts/vserver-build.clone \
342 + scripts/vserver-build.poldek \
343 scripts/vserver-build.functions \
344 scripts/vserver-build.functions.apt \
345 scripts/vserver-build.functions.rpm \
346 scripts/vserver-build.functions.pkgmgmt \
347 scripts/vserver-build.functions.yum \
348 + scripts/vserver-build.functions.poldek \
349 scripts/vserver-setup.functions \
350 scripts/vserver.functions \
351 scripts/vserver.start \
353 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
354 scripts/vapt-get-worker \
356 + scripts/vpoldek-worker \
357 scripts/vrpm-worker \
358 scripts/vrpm-preload \
359 scripts/start-vservers \
361 scripts_sbin_src_PRGS = scripts/chbind \
365 scripts/vdispatch-conf \
368 --- util-vserver-0.30.214.org/scripts/pkgmgmt 2007-09-02 22:06:41.000000000 +0200
369 +++ util-vserver-0.30.214/scripts/pkgmgmt 2007-11-15 23:20:48.221174080 +0100
374 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
375 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
376 hasSubstring "$pkgs" ---rpm--- || {
378 * The vserver does not seem to have the 'rpm' package which is required
383 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
384 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
386 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
387 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
388 installed. It is suggested to install such a program before setting
389 up internal package management."
391 @@ -368,6 +368,131 @@
395 +function processVserver_PLD()
398 + local is_internalize=$2
402 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
403 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
405 + ## Figure out the environment....
406 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
408 + local POLDEKETCDIR=
409 + local POLDEKCACHEDIR=
413 + ## Create directories and assign variables where configuration
414 + ## can/will be found on the host
415 + if test -n "$is_internalize"; then
416 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
418 +Can not continue; use '--force' to override this check"
420 + pushd "$vdir" >/dev/null
422 + test ! -L var/lib/rpm || {
423 + $_EXEC_CD /var/lib $_RM rpm &&
424 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
425 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
427 + } </dev/null 2>/dev/null
429 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
431 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
436 + if test -n "$have_poldek"; then
437 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
440 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
441 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
443 + mkdir -m755 -p "$cfgdir"
446 + if test -n "$have_poldek"; then
447 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
448 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
450 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
451 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
453 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
456 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
457 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
459 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
460 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
462 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
463 + test ! -e "$cfgdir"/base || need_base=
465 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
467 + mkdir -m755 -p "$PKGCFGDIR"
468 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
469 + "$RPMETCDIR" "$RPMSTATEDIR"
472 + ## Copy the files...
473 + if test -n "$is_internalize"; then
474 + if test -n "$have_poldek"; then
475 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
476 + pushd "$vdir" >/dev/null
477 + _hashAuto /etc/poldek.conf '/'
481 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
482 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
484 + pushd "$vdir" >/dev/null
485 + ## remove %_dbpath settings
486 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
489 + if test -n "$have_poldek"; then
490 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
491 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
494 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
495 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
497 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
501 + if test -n "$is_internalize"; then
504 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
505 + trap "$_RM -rf $tmpdir" EXIT
506 + pushd "$vdir" >/dev/null
507 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
508 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
513 + if test -n "$is_internalize"; then
514 + $_TOUCH "$cfgdir"/internal
516 + $_RM -f "$cfgdir"/internal
520 function processVserver_Debian()
526 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
527 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
528 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
530 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
531 --- util-vserver-0.30.214.org/scripts/util-vserver-vars.pathsubst 2007-09-02 22:06:41.000000000 +0200
532 +++ util-vserver-0.30.214/scripts/util-vserver-vars.pathsubst 2007-11-15 23:20:48.221174080 +0100
534 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
535 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
536 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
537 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
538 _LISTDEVIP="$__LEGACYDIR/listdevip"
539 _LOCKFILE="$__PKGLIBDIR/lockfile"
540 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
542 _VUNIFY="$__PKGLIBDIR/vunify"
543 _VYUM="$__SBINDIR/vyum"
544 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
545 +_VPOLDEK="$__SBINDIR/vpoldek"
546 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
550 --- util-vserver-0.30.214.org/scripts/vpkg 2007-09-02 22:06:41.000000000 +0200
551 +++ util-vserver-0.30.214/scripts/vpkg 2007-11-15 23:20:48.221174080 +0100
560 + ## rpm outputs sometimes '(contains no files)', so return
561 + ## only the valid output
563 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
565 + rpm_param=( -Uvh "$@" )
566 + poldek_param=( --install -v "$@" )
570 + if test -n "$is_external"; then
572 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
575 + for i in /bin /usr/bin /usr/local/bin; do
576 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
580 + if test -n "$is_external"; then
581 + if test "$have_poldek" -a "$poldek_param"; then
582 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
584 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
587 + if test "$have_poldek" -a "$poldek_param"; then
588 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
590 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
597 --- util-vserver-0.30.214.org/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
598 +++ util-vserver-0.30.214/scripts/vpoldek 2007-11-15 22:00:24.000000000 +0100
603 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
605 +# This program is free software; you can redistribute it and/or modify
606 +# it under the terms of the GNU General Public License as published by
607 +# the Free Software Foundation; version 2 of the License.
609 +# This program is distributed in the hope that it will be useful,
610 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
611 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
612 +# GNU General Public License for more details.
614 +# You should have received a copy of the GNU General Public License
615 +# along with this program; if not, write to the Free Software
616 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
618 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
619 +test -e "$UTIL_VSERVER_VARS" || {
620 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
623 +. "$UTIL_VSERVER_VARS"
630 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
632 +Report bugs to <$PACKAGE_BUGREPORT>."
636 +function showVersion()
639 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
640 +This program is part of $PACKAGE_STRING
642 +Copyright (C) 2007 Enrico Scholz
643 +This program is free software; you may redistribute it under the terms of
644 +the GNU General Public License. This program has absolutely no warranty."
648 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
651 +declare -a send_through poldek_opts
655 + (--help) showHelp $0 ;;
656 + (--version) showVersion ;;
657 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
658 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
659 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
660 + (--) shift; break;;
661 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
666 +VSOMETHING_TITLE=vpoldek
667 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
668 +VSOMETHING_PKGMGMT=1
670 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
672 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
673 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
674 --- util-vserver-0.30.214.org/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
675 +++ util-vserver-0.30.214/scripts/vpoldek-worker 2007-11-15 22:58:23.000000000 +0100
680 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
682 +# This program is free software; you can redistribute it and/or modify
683 +# it under the terms of the GNU General Public License as published by
684 +# the Free Software Foundation; version 2 of the License.
686 +# This program is distributed in the hope that it will be useful,
687 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
688 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
689 +# GNU General Public License for more details.
691 +# You should have received a copy of the GNU General Public License
692 +# along with this program; if not, write to the Free Software
693 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
697 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
698 +test -e "$UTIL_VSERVER_VARS" || {
699 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
702 +. "$UTIL_VSERVER_VARS"
709 +pkgInit "$vserver" rpm poldek
711 +test -z "$_POLDEK" || {
712 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
713 + ${POLDEK:=$_POLDEK}
716 +exec ${_POLDEK:-poldek} \
718 + --cachedir=$POLDEKCACHEDIR \
719 + --conf=$POLDEK_CONFIG \
720 + --pmcmd=$RPM_BINARY \
722 --- util-vserver-0.30.214.org/scripts/vserver-build 2007-09-02 22:06:41.000000000 +0200
723 +++ util-vserver-0.30.214/scripts/vserver-build 2007-11-15 23:20:48.224507577 +0100
725 yum ... -- -d <distribution>
726 ... installs the base-packages of the given distribution with
728 + poldek ... -- -d <distribution>
729 + ... installs the base-packages of the given distribution with
731 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
732 ... installs lists of rpm-packages
733 skeleton ... -- [<cmd> <args>*]
737 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
738 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone)
739 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xpoldek)
740 . $__PKGLIBDIR/vserver-build.$method
742 (x) panic $"No build-method specified";;
743 --- util-vserver-0.30.214.org/scripts/vserver-build.functions 2007-09-02 22:06:41.000000000 +0200
744 +++ util-vserver-0.30.214/scripts/vserver-build.functions 2007-11-15 23:20:48.224507577 +0100
746 elif test -e /etc/slackware-version; then
747 set -- $(cat /etc/slackware-version)
748 DISTRIBUTION=slackware$2
749 + elif test -e /etc/pld-release; then
752 + set -- $(cat /etc/pld-release)
753 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
755 elif test -n "$1"; then
758 --- util-vserver-0.30.214/scripts/vserver-build.functions.poldek 2008-03-25 19:20:07.685144000 +0200
759 +++ util-vserver-0.30.214/scripts/vserver-build.functions.poldek 2008-03-25 20:37:09.000000000 +0200
763 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
765 +# This program is free software; you can redistribute it and/or modify
766 +# it under the terms of the GNU General Public License as published by
767 +# the Free Software Foundation; version 2 of the License.
769 +# This program is distributed in the hope that it will be useful,
770 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
771 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
772 +# GNU General Public License for more details.
774 +# You should have received a copy of the GNU General Public License
775 +# along with this program; if not, write to the Free Software
776 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
778 +function poldek.installBasePackages
783 + test "$dir" != / || return 0
784 + for filelist in "$dir"/*; do
785 + isRegularFile "$filelist" || continue
787 + local can_fail=false
788 + local flags='--install'
790 + set -- $(<$filelist)
791 + while test "$#" -gt 0; do
793 + --reinstall) flags='--reinstall';;
794 + --can-fail) can_fail=true;;
799 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
803 +function poldek.initVariables
805 + findFile POLDEKCONFDEFAULT \
806 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
807 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
808 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
809 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
813 +function poldek.initFilesystem
815 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
816 + mkdir -p "$PKGCFGBASE"/poldek-cache
818 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
820 + populateDirectory "$PKGCFGDIR/poldek/etc" \
821 + "$__DISTRIBDIR/defaults/poldek" \
822 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
823 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
825 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
826 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
827 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
828 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
830 + if [ -n "$SETUP_MACHINE" ]; then
831 + say "Using $SETUP_MACHINE as machine"
832 + sed -i -e "s#^\(_pld_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/pld.conf
835 + if [ -n "$MIRROR" ]; then
836 + say "Using $MIRROR as mirror URL"
837 + sed -i -e "s#^\(_pld_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/pld.conf
840 +# test -z "$POLDEKCONFDEFAULT" || \
841 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
843 --- util-vserver-0.30.214/scripts/vserver-build.poldek 2007-11-15 23:20:48.224507577 +0100
844 +++ util-vserver-0.30.214/scripts/vserver-build.poldek 2008-03-25 20:25:23.000000000 +0200
848 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
850 +# This program is free software; you can redistribute it and/or modify
851 +# it under the terms of the GNU General Public License as published by
852 +# the Free Software Foundation; version 2 of the License.
854 +# This program is distributed in the hope that it will be useful,
855 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
856 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
857 +# GNU General Public License for more details.
859 +# You should have received a copy of the GNU General Public License
860 +# along with this program; if not, write to the Free Software
861 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
863 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
866 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
867 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
868 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
872 + (-d) DISTRIBUTION=$2; shift;;
873 + (-m) MIRROR=$2; shift;;
875 + (--) shift; break ;;
876 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
887 +pkgmgmt.initVariables
889 +poldek.initVariables
891 +base.initFilesystem "$OPTION_FORCE"
892 +pkgmgmt.initFilesystem "$OPTION_FORCE"
894 +poldek.initFilesystem
896 +setup_writeOption "$VSERVER_NAME"
897 +setup_writeInitialFstab
899 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
900 +rpm.initDB "$SETUP_CONFDIR"
901 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
902 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
903 + "$__CONFDIR/.distributions/.common/pubkeys" \
904 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
906 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
907 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
908 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"