1 diff -urN util-vserver-0.30.216-r2837.orig/distrib/defaults/poldek/poldek.conf util-vserver-0.30.216-r2837/distrib/defaults/poldek/poldek.conf
2 --- util-vserver-0.30.216-r2837.orig/distrib/defaults/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
3 +++ util-vserver-0.30.216-r2837/distrib/defaults/poldek/poldek.conf 2009-06-22 17:48:26.000000000 +0200
5 +# poldek configuration file.
10 +particle install = no
11 +choose equivalents manually = yes
12 +unique package names = yes
15 +ignore = kernel* udev devfs
16 diff -urN util-vserver-0.30.216-r2837.orig/distrib/Makefile.am util-vserver-0.30.216-r2837/distrib/Makefile.am
17 --- util-vserver-0.30.216-r2837.orig/distrib/Makefile.am 2009-06-22 17:36:52.000000000 +0200
18 +++ util-vserver-0.30.216-r2837/distrib/Makefile.am 2009-06-22 17:49:36.000000000 +0200
22 defaults/apt/apt.conf \
23 + defaults/poldek/poldek.conf \
24 template/initpost template/initpre \
25 rh9/apt/rpmpriorities rh9/pkgs/01 rh9/pkgs/02 \
26 fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \
28 suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
30 gentoo/init-vserver.sh gentoo/net.vserver \
31 - gentoo/reboot.sh gentoo/shutdown.sh
32 + gentoo/reboot.sh gentoo/shutdown.sh\
33 + pld-ac/pkgs/01 pld-ac/rpm/macros \
34 + pld-th/pkgs/01 pld-th/rpm/macros \
35 + pld-ti/pkgs/01 pld-ti/rpm/macros
37 nobase_confdistrib_DATA = rh9/apt/sources.list \
38 fc1/apt/sources.list \
40 fc5/apt/sources.list \
41 fc6/apt/sources.list \
43 - suse91/apt/sources.list
44 + suse91/apt/sources.list \
45 + pld-ac/poldek/repos.d/pld.conf \
46 + pld-th/poldek/repos.d/pld.conf \
47 + pld-ti/poldek/repos.d/pld.conf
49 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
50 = $(nobase_distrib_SCRIPTS)
51 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-ac/pkgs/01 util-vserver-0.30.216-r2837/distrib/pld-ac/pkgs/01
52 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100
53 +++ util-vserver-0.30.216-r2837/distrib/pld-ac/pkgs/01 2009-06-22 17:48:26.000000000 +0200
61 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-ac/poldek/repos.d/pld.conf util-vserver-0.30.216-r2837/distrib/pld-ac/poldek/repos.d/pld.conf
62 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
63 +++ util-vserver-0.30.216-r2837/distrib/pld-ac/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
66 +# PLD Linux Distribution <http://www.pld-linux.org/>.
68 +# specify our packages architecture
71 +# main PLD-site for often changed things:
72 +_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
75 +## You can use them if you have better connection there
77 +#_prefix = ftp://ftp.task.pld-linux.org/dists/ac
78 +#_prefix = %{_pld_main_prefix}
79 +_prefix = %{_pld_main_prefix}
87 +path = %{_prefix}/PLD/%{_arch}/PLD/RPMS/
89 +# buggy deps -- use one from updates instead
90 +ignore = msmtp-sendmail*
96 +path = %{_prefix}/updates/%{_arch}/
103 +path = %{_prefix}/supported/%{_arch}/
111 +path = %{_pld_main_prefix}/ready/%{_arch}/
118 +path = %{_pld_main_prefix}/test/%{_arch}/
121 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-ac/rpm/macros util-vserver-0.30.216-r2837/distrib/pld-ac/rpm/macros
122 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
123 +++ util-vserver-0.30.216-r2837/distrib/pld-ac/rpm/macros 2009-06-22 17:48:26.000000000 +0200
125 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
126 +# you have to use at least one language beside 'C'
127 +%_install_langs C:en:pl
128 +%_netsharedpath /dev:/proc
131 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-th/pkgs/01 util-vserver-0.30.216-r2837/distrib/pld-th/pkgs/01
132 --- util-vserver-0.30.216-r2837.orig/distrib/pld-th/pkgs/01 1970-01-01 01:00:00.000000000 +0100
133 +++ util-vserver-0.30.216-r2837/distrib/pld-th/pkgs/01 2009-06-22 17:48:26.000000000 +0200
141 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-th/poldek/repos.d/pld.conf util-vserver-0.30.216-r2837/distrib/pld-th/poldek/repos.d/pld.conf
142 --- util-vserver-0.30.216-r2837.orig/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
143 +++ util-vserver-0.30.216-r2837/distrib/pld-th/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
145 +# PLD Linux Distribution <http://www.pld-linux.org/>.
148 +_prefix = ftp://ftp.th.pld-linux.org/dists/th
150 +## You can use them if you have better connection there
152 +#_prefix = ftp://ftp.task.pld-linux.org/dists/th
160 +path = %{_prefix}/PLD/%{_arch}/RPMS/
165 +path = %{_prefix}/PLD/noarch/RPMS/
170 +#path = %{_prefix}/updates/%{_arch}/RPMS/
175 +#path = %{_prefix}/updates/noarch/RPMS/
179 +#name = th-supported
180 +#path = %{_prefix}/supported/%{_arch}/
186 +path = %{_prefix}/ready/%{_arch}/RPMS/
193 +path = %{_prefix}/ready/noarch/RPMS/
200 +path = %{_prefix}/test/%{_arch}/RPMS/
207 +path = %{_prefix}/test/noarch/RPMS/
210 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-th/rpm/macros util-vserver-0.30.216-r2837/distrib/pld-th/rpm/macros
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 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-ti/pkgs/01 util-vserver-0.30.216-r2837/distrib/pld-ti/pkgs/01
221 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/pkgs/01 1970-01-01 01:00:00.000000000 +0100
222 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/pkgs/01 2009-06-22 17:48:26.000000000 +0200
230 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-ti/poldek/repos.d/pld.conf util-vserver-0.30.216-r2837/distrib/pld-ti/poldek/repos.d/pld.conf
231 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
232 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
235 +# Unofficial version of PLD Linux Distribution
236 +# http://www.pld-linux.org/Titanium
239 +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium
246 +path = %{_prefix}/PLD/%{_arch}/RPMS/
251 +path = %{_prefix}/PLD/noarch/RPMS/
255 +name = titanium-ready
256 +path = %{_prefix}/ready/%{_arch}/RPMS/
262 +name = titanium-ready
263 +path = %{_prefix}/ready/noarch/RPMS/
269 +name = titanium-test
270 +path = %{_prefix}/test/%{_arch}/RPMS/
276 +name = titanium-test
277 +path = %{_prefix}/test/noarch/RPMS/
280 diff -urN util-vserver-0.30.216-r2837.orig/distrib/pld-ti/rpm/macros util-vserver-0.30.216-r2837/distrib/pld-ti/rpm/macros
281 --- util-vserver-0.30.216-r2837.orig/distrib/pld-ti/rpm/macros 1970-01-01 01:00:00.000000000 +0100
282 +++ util-vserver-0.30.216-r2837/distrib/pld-ti/rpm/macros 2009-06-22 17:48:26.000000000 +0200
284 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
285 +# you have to use at least one language beside 'C'
286 +%_install_langs C:en:pl
287 +%_netsharedpath /dev:/proc
290 diff -urN util-vserver-0.30.216-r2837.orig/scripts/functions util-vserver-0.30.216-r2837/scripts/functions
291 --- util-vserver-0.30.216-r2837.orig/scripts/functions 2009-06-22 17:36:35.000000000 +0200
292 +++ util-vserver-0.30.216-r2837/scripts/functions 2009-06-22 17:48:26.000000000 +0200
297 +function _pkgSetVarsPoldek
299 + if test -n "$PKGDIR"; then
300 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
301 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
303 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
304 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
307 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
308 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
312 function _pkgMountBase
315 rpm) _pkgSetVarsRPM;;
316 apt) _pkgSetVarsApt;;
317 yum) _pkgSetVarsYum;;
318 + poldek) _pkgSetVarsPoldek;;
319 *) echo "Unknown packaging flavor" >&2; exit 1;;
324 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
326 + elif test -e "$_pgs_vdir"/etc/pld-release; then
328 elif test -e "$_pgs_vdir"/etc/debian_version; then
330 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
332 test -n "$have_yum" && return 0 || return 1
335 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
336 +function pkgmgmt.isPoldekAvailable
340 + local is_internal="$3"
342 + local have_poldek i
343 + if test -n "$is_internal"; then
345 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
348 + for i in /bin /usr/bin /usr/local/bin; do
349 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
353 + test -n "$have_poldek" && return 0 || return 1
357 function vshelper.doSanityCheck
359 diff -urN util-vserver-0.30.216-r2837.orig/scripts/Makefile-files util-vserver-0.30.216-r2837/scripts/Makefile-files
360 --- util-vserver-0.30.216-r2837.orig/scripts/Makefile-files 2009-06-22 17:36:35.000000000 +0200
361 +++ util-vserver-0.30.216-r2837/scripts/Makefile-files 2009-06-22 17:48:26.000000000 +0200
363 scripts/vapt-get-worker \
364 scripts/vrpm-worker \
365 scripts/vyum-worker \
366 + scripts/vpoldek-worker \
367 scripts/vrpm-preload \
368 scripts/save_s_context \
369 scripts/vservers.grabinfo.sh \
371 scripts/vserver-build.template \
372 scripts/vserver-build.rsync \
373 scripts/vserver-build.clone \
374 + scripts/vserver-build.poldek \
375 scripts/vserver-build.functions \
376 scripts/vserver-build.functions.apt \
377 scripts/vserver-build.functions.rpm \
378 scripts/vserver-build.functions.pkgmgmt \
379 scripts/vserver-build.functions.yum \
380 + scripts/vserver-build.functions.poldek \
381 scripts/vserver-setup.functions \
382 scripts/vserver.functions \
383 scripts/vserver.start \
385 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
386 scripts/vapt-get-worker \
388 + scripts/vpoldek-worker \
389 scripts/vrpm-worker \
390 scripts/vrpm-preload \
391 scripts/start-vservers \
393 scripts_sbin_src_PRGS = scripts/chbind \
397 scripts/vdispatch-conf \
400 diff -urN util-vserver-0.30.216-r2837.orig/scripts/pkgmgmt util-vserver-0.30.216-r2837/scripts/pkgmgmt
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 "${YUM_RELEASEPKGS[@]}")
408 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum 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--- || {
417 + hasSubstring "$pkgs" ---apt--- ---yum--- ---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 diff -urN util-vserver-0.30.216-r2837.orig/scripts/util-vserver-vars.pathsubst util-vserver-0.30.216-r2837/scripts/util-vserver-vars.pathsubst
565 --- util-vserver-0.30.216-r2837.orig/scripts/util-vserver-vars.pathsubst 2009-06-22 17:36:34.000000000 +0200
566 +++ util-vserver-0.30.216-r2837/scripts/util-vserver-vars.pathsubst 2009-06-22 17:48:26.000000000 +0200
568 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
569 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
570 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
571 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
572 _LISTDEVIP="$__LEGACYDIR/listdevip"
573 _LOCKFILE="$__PKGLIBDIR/lockfile"
574 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
576 _VUNIFY="$__PKGLIBDIR/vunify"
577 _VYUM="$__SBINDIR/vyum"
578 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
579 +_VPOLDEK="$__SBINDIR/vpoldek"
580 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
584 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vpkg util-vserver-0.30.216-r2837/scripts/vpkg
585 --- util-vserver-0.30.216-r2837.orig/scripts/vpkg 2009-06-22 17:36:34.000000000 +0200
586 +++ util-vserver-0.30.216-r2837/scripts/vpkg 2009-06-22 17:48:26.000000000 +0200
595 + ## rpm outputs sometimes '(contains no files)', so return
596 + ## only the valid output
598 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
600 + rpm_param=( -Uvh "$@" )
601 + poldek_param=( --install -v "$@" )
605 + if test -n "$is_external"; then
607 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
610 + for i in /bin /usr/bin /usr/local/bin; do
611 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
615 + if test -n "$is_external"; then
616 + if test "$have_poldek" -a "$poldek_param"; then
617 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
619 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
622 + if test "$have_poldek" -a "$poldek_param"; then
623 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
625 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
632 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vpoldek util-vserver-0.30.216-r2837/scripts/vpoldek
633 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
634 +++ util-vserver-0.30.216-r2837/scripts/vpoldek 2009-06-22 17:48:26.000000000 +0200
639 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
641 +# This program is free software; you can redistribute it and/or modify
642 +# it under the terms of the GNU General Public License as published by
643 +# the Free Software Foundation; version 2 of the License.
645 +# This program is distributed in the hope that it will be useful,
646 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
647 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
648 +# GNU General Public License for more details.
650 +# You should have received a copy of the GNU General Public License
651 +# along with this program; if not, write to the Free Software
652 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
654 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
655 +test -e "$UTIL_VSERVER_VARS" || {
656 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
659 +. "$UTIL_VSERVER_VARS"
666 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
668 +Report bugs to <$PACKAGE_BUGREPORT>."
672 +function showVersion()
675 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
676 +This program is part of $PACKAGE_STRING
678 +Copyright (C) 2007 Enrico Scholz
679 +This program is free software; you may redistribute it under the terms of
680 +the GNU General Public License. This program has absolutely no warranty."
684 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
687 +declare -a send_through poldek_opts
691 + (--help) showHelp $0 ;;
692 + (--version) showVersion ;;
693 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
694 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
695 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
696 + (--) shift; break;;
697 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
702 +VSOMETHING_TITLE=vpoldek
703 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
704 +VSOMETHING_PKGMGMT=1
706 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
708 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
709 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
710 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vpoldek-worker util-vserver-0.30.216-r2837/scripts/vpoldek-worker
711 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
712 +++ util-vserver-0.30.216-r2837/scripts/vpoldek-worker 2009-06-22 17:48:26.000000000 +0200
717 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
719 +# This program is free software; you can redistribute it and/or modify
720 +# it under the terms of the GNU General Public License as published by
721 +# the Free Software Foundation; version 2 of the License.
723 +# This program is distributed in the hope that it will be useful,
724 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
725 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
726 +# GNU General Public License for more details.
728 +# You should have received a copy of the GNU General Public License
729 +# along with this program; if not, write to the Free Software
730 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
734 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
735 +test -e "$UTIL_VSERVER_VARS" || {
736 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
739 +. "$UTIL_VSERVER_VARS"
746 +pkgInit "$vserver" rpm poldek
748 +test -z "$_POLDEK" || {
749 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
750 + ${POLDEK:=$_POLDEK}
753 +exec ${_POLDEK:-poldek} \
755 + --cachedir=$POLDEKCACHEDIR \
756 + --conf=$POLDEK_CONFIG \
757 + --pmcmd=$RPM_BINARY \
759 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vserver-build util-vserver-0.30.216-r2837/scripts/vserver-build
760 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build 2009-06-22 17:36:34.000000000 +0200
761 +++ util-vserver-0.30.216-r2837/scripts/vserver-build 2009-06-22 17:48:26.000000000 +0200
763 yum ... -- -d <distribution>
764 ... installs the base-packages of the given distribution with
766 + poldek ... -- -d <distribution>
767 + ... installs the base-packages of the given distribution with
769 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
770 ... installs lists of rpm-packages
771 skeleton ... -- [<cmd> <args>*]
775 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
776 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone)
777 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xpoldek)
778 . $__PKGLIBDIR/vserver-build.$method
780 (x) panic $"No build-method specified";;
781 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions util-vserver-0.30.216-r2837/scripts/vserver-build.functions
782 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions 2009-06-22 17:36:35.000000000 +0200
783 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions 2009-06-22 17:48:26.000000000 +0200
785 elif test -e /etc/slackware-version; then
786 set -- $(cat /etc/slackware-version)
787 DISTRIBUTION=slackware$2
788 + elif test -e /etc/pld-release; then
791 + set -- $(cat /etc/pld-release)
792 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
794 elif test -n "$1"; then
797 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions.poldek util-vserver-0.30.216-r2837/scripts/vserver-build.functions.poldek
798 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
799 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions.poldek 2009-06-22 17:48:26.000000000 +0200
803 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
805 +# This program is free software; you can redistribute it and/or modify
806 +# it under the terms of the GNU General Public License as published by
807 +# the Free Software Foundation; version 2 of the License.
809 +# This program is distributed in the hope that it will be useful,
810 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
811 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
812 +# GNU General Public License for more details.
814 +# You should have received a copy of the GNU General Public License
815 +# along with this program; if not, write to the Free Software
816 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
818 +function poldek.installBasePackages
823 + test "$dir" != / || return 0
824 + for filelist in "$dir"/*; do
825 + isRegularFile "$filelist" || continue
827 + local can_fail=false
828 + local flags='--install'
830 + set -- $(<$filelist)
831 + while test "$#" -gt 0; do
833 + --reinstall) flags='--reinstall';;
834 + --can-fail) can_fail=true;;
839 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
843 +function poldek.initVariables
845 + findFile POLDEKCONFDEFAULT \
846 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
847 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
848 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
849 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
853 +function poldek.initFilesystem
855 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
857 + $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
859 + populateDirectory "$PKGCFGDIR/poldek/etc" \
860 + "$__DISTRIBDIR/defaults/poldek" \
861 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
862 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
864 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
865 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
866 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
867 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
869 + if [ -n "$SETUP_MACHINE" ]; then
870 + say "Using $SETUP_MACHINE as machine"
871 + sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
874 + if [ -n "$MIRROR" ]; then
875 + say "Using $MIRROR as mirror URL"
876 + sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
879 +# test -z "$POLDEKCONFDEFAULT" || \
880 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
882 diff -urN util-vserver-0.30.216-r2837.orig/scripts/vserver-build.poldek util-vserver-0.30.216-r2837/scripts/vserver-build.poldek
883 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
884 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.poldek 2009-06-22 17:48:26.000000000 +0200
888 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
890 +# This program is free software; you can redistribute it and/or modify
891 +# it under the terms of the GNU General Public License as published by
892 +# the Free Software Foundation; version 2 of the License.
894 +# This program is distributed in the hope that it will be useful,
895 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
896 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
897 +# GNU General Public License for more details.
899 +# You should have received a copy of the GNU General Public License
900 +# along with this program; if not, write to the Free Software
901 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
903 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
906 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
907 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
908 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
912 + (-d) DISTRIBUTION=$2; shift;;
913 + (-m) MIRROR=$2; shift;;
915 + (--) shift; break ;;
916 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
927 +pkgmgmt.initVariables
929 +poldek.initVariables
931 +base.initFilesystem "$OPTION_FORCE"
932 +pkgmgmt.initFilesystem "$OPTION_FORCE"
934 +poldek.initFilesystem
936 +setup_writeOption "$VSERVER_NAME"
937 +setup_writeInitialFstab
939 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
940 +rpm.initDB "$SETUP_CONFDIR"
941 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
942 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
943 + "$__CONFDIR/.distributions/.common/pubkeys" \
944 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
946 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
947 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
948 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"