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.org/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100
51 +++ util-vserver-0.30.214/distrib/pld-ac/pkgs/01 2007-11-15 23:20:48.181172125 +0100
58 --- util-vserver-0.30.214.org/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
59 +++ util-vserver-0.30.214/distrib/pld-ac/poldek/repos.d/pld.conf 2007-11-15 23:20:48.181172125 +0100
62 +# PLD <http://www.pld-linux.org/>
65 +_pld_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
67 +## You can use them if you have better connection there
69 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/ac
76 +type = %{_ac_idxtype}
78 +path = %{_pld_prefix}/PLD/%{_pld_arch}/PLD/RPMS/
82 +type = %{_ac_idxtype}
84 +path = %{_pld_prefix}/updates/%{_pld_arch}/
88 +type = %{_ac_idxtype}
90 +path = %{_pld_prefix}/supported/%{_pld_arch}/
95 +type = %{_ac_idxtype}
97 +path = %{_pld_prefix}/ready/%{_pld_arch}/
101 +type = %{_ac_idxtype}
103 +path = %{_pld_prefix}/test/%{_pld_arch}/
105 --- util-vserver-0.30.214.org/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
106 +++ util-vserver-0.30.214/distrib/pld-ac/rpm/macros 2007-11-15 23:20:48.181172125 +0100
108 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
109 +# you have to use at least one language beside 'C'
110 +%_install_langs C:en:pl
111 +%_netsharedpath /dev
112 --- util-vserver-0.30.214.org/distrib/pld-th/pkgs/01 1970-01-01 01:00:00.000000000 +0100
113 +++ util-vserver-0.30.214/distrib/pld-th/pkgs/01 2007-11-15 23:20:48.181172125 +0100
120 --- util-vserver-0.30.214.org/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
121 +++ util-vserver-0.30.214/distrib/pld-th/poldek/repos.d/pld.conf 2007-11-15 23:20:48.181172125 +0100
123 +# PLD <http://www.pld-linux.org/>
126 +_pld_prefix = ftp://ftp.th.pld-linux.org/dists/th
128 +## You can use them if you have better connection there
130 +#_pld_prefix = ftp://ftp.task.pld-linux.org/dists/th
137 +type = %{_th_idxtype}
139 +path = %{_pld_prefix}/PLD/%{_pld_arch}/RPMS/
142 +type = %{_th_idxtype}
144 +path = %{_pld_prefix}/PLD/noarch/RPMS/
147 +type = %{_th_idxtype}
148 +name = th-updates-security
149 +path = %{_pld_prefix}/updates-security/%{_pld_arch}/RPMS/
152 +type = %{_th_idxtype}
153 +name = th-updates-general
154 +path = %{_pld_prefix}/updates-general/%{_pld_arch}/RPMS/
158 +#type = %{_th_idxtype}
159 +#name = th-supported
160 +#path = %{_pld_prefix}/supported/%{_pld_arch}/RPMS/
164 +type = %{_th_idxtype}
166 +path = %{_pld_prefix}/ready/%{_pld_arch}/RPMS/
170 +type = %{_th_idxtype}
172 +path = %{_pld_prefix}/test/%{_pld_arch}/RPMS/
174 --- util-vserver-0.30.214.org/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
175 +++ util-vserver-0.30.214/distrib/pld-th/rpm/macros 2007-11-15 23:20:48.184505622 +0100
177 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
178 +# you have to use at least one language beside 'C'
179 +%_install_langs C:en:pl
180 +%_netsharedpath /dev
181 --- util-vserver-0.30.214.org/distrib/pld-ti/pkgs/01 1970-01-01 01:00:00.000000000 +0100
182 +++ util-vserver-0.30.214/distrib/pld-ti/pkgs/01 2007-11-15 23:20:48.217840583 +0100
189 --- util-vserver-0.30.214.org/distrib/pld-ti/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
190 +++ util-vserver-0.30.214/distrib/pld-ti/poldek/repos.d/pld.conf 2007-11-15 23:20:48.217840583 +0100
193 +# Unofficial version of PLD Linux Distribution
194 +# http://www.pld-linux.org/Titanium
197 +_prefix = ftp://ftp.titanium.pld-linux.org/branches/titanium
204 +path = %{_prefix}/PLD/%{_arch}/RPMS/
209 +path = %{_prefix}/PLD/noarch/RPMS/
213 +name = titanium-ready
214 +path = %{_prefix}/ready/%{_arch}/RPMS/
220 +name = titanium-ready
221 +path = %{_prefix}/ready/noarch/RPMS/
227 +name = titanium-test
228 +path = %{_prefix}/test/%{_arch}/RPMS/
234 +name = titanium-test
235 +path = %{_prefix}/test/noarch/RPMS/
238 --- util-vserver-0.30.214.org/distrib/pld-ti/rpm/macros 1970-01-01 01:00:00.000000000 +0100
239 +++ util-vserver-0.30.214/distrib/pld-ti/rpm/macros 2007-11-15 23:20:48.221174080 +0100
241 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
242 +# you have to use at least one language beside 'C'
243 +%_install_langs C:en:pl
244 +%_netsharedpath /dev
245 --- util-vserver-0.30.214.org/scripts/functions 2007-09-02 22:06:41.000000000 +0200
246 +++ util-vserver-0.30.214/scripts/functions 2007-11-15 23:20:48.221174080 +0100
251 +function _pkgSetVarsPoldek
253 + if test -n "$PKGDIR"; then
254 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
255 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
257 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
258 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
261 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
262 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
266 function _pkgMountBase
269 rpm) _pkgSetVarsRPM;;
270 apt) _pkgSetVarsApt;;
271 yum) _pkgSetVarsYum;;
272 + poldek) _pkgSetVarsPoldek;;
273 *) echo "Unknown packaging flavor" >&2; exit 1;;
278 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
280 + elif test -e "$_pgs_vdir"/etc/pld-release; then
282 elif test -e "$_pgs_vdir"/etc/debian_version; then
284 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
286 test -n "$have_yum" && return 0 || return 1
289 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
290 +function pkgmgmt.isPoldekAvailable
294 + local is_internal="$3"
296 + local have_poldek i
297 + if test -n "$is_internal"; then
299 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
302 + for i in /bin /usr/bin /usr/local/bin; do
303 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
307 + test -n "$have_poldek" && return 0 || return 1
311 function vshelper.doSanityCheck
313 --- util-vserver-0.30.214.org/scripts/Makefile-files 2007-09-02 22:06:41.000000000 +0200
314 +++ util-vserver-0.30.214/scripts/Makefile-files 2007-11-15 23:20:48.221174080 +0100
316 scripts/vapt-get-worker \
317 scripts/vrpm-worker \
318 scripts/vyum-worker \
319 + scripts/vpoldek-worker \
320 scripts/vrpm-preload \
321 scripts/save_s_context \
322 scripts/vservers.grabinfo.sh \
324 scripts/vserver-build.template \
325 scripts/vserver-build.rsync \
326 scripts/vserver-build.clone \
327 + scripts/vserver-build.poldek \
328 scripts/vserver-build.functions \
329 scripts/vserver-build.functions.apt \
330 scripts/vserver-build.functions.rpm \
331 scripts/vserver-build.functions.pkgmgmt \
332 scripts/vserver-build.functions.yum \
333 + scripts/vserver-build.functions.poldek \
334 scripts/vserver-setup.functions \
335 scripts/vserver.functions \
336 scripts/vserver.start \
338 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
339 scripts/vapt-get-worker \
341 + scripts/vpoldek-worker \
342 scripts/vrpm-worker \
343 scripts/vrpm-preload \
344 scripts/start-vservers \
346 scripts_sbin_src_PRGS = scripts/chbind \
350 scripts/vdispatch-conf \
353 --- util-vserver-0.30.214.org/scripts/pkgmgmt 2007-09-02 22:06:41.000000000 +0200
354 +++ util-vserver-0.30.214/scripts/pkgmgmt 2007-11-15 23:20:48.221174080 +0100
359 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum "${YUM_RELEASEPKGS[@]}")
360 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum poldek "${YUM_RELEASEPKGS[@]}")
361 hasSubstring "$pkgs" ---rpm--- || {
363 * The vserver does not seem to have the 'rpm' package which is required
368 - hasSubstring "$pkgs" ---apt--- ---yum--- || {
369 + hasSubstring "$pkgs" ---apt--- ---yum--- ---poldek--- || {
371 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
372 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
373 installed. It is suggested to install such a program before setting
374 up internal package management."
376 @@ -368,6 +368,131 @@
380 +function processVserver_PLD()
383 + local is_internalize=$2
387 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
388 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
390 + ## Figure out the environment....
391 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
393 + local POLDEKETCDIR=
394 + local POLDEKCACHEDIR=
398 + ## Create directories and assign variables where configuration
399 + ## can/will be found on the host
400 + if test -n "$is_internalize"; then
401 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
403 +Can not continue; use '--force' to override this check"
405 + pushd "$vdir" >/dev/null
407 + test ! -L var/lib/rpm || {
408 + $_EXEC_CD /var/lib $_RM rpm &&
409 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
410 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
412 + } </dev/null 2>/dev/null
414 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
416 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
421 + if test -n "$have_poldek"; then
422 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
425 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
426 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
428 + mkdir -m755 -p "$cfgdir"
431 + if test -n "$have_poldek"; then
432 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
433 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
435 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
436 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
438 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
441 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
442 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
444 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
445 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
447 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
448 + test ! -e "$cfgdir"/base || need_base=
450 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
452 + mkdir -m755 -p "$PKGCFGDIR"
453 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
454 + "$RPMETCDIR" "$RPMSTATEDIR"
457 + ## Copy the files...
458 + if test -n "$is_internalize"; then
459 + if test -n "$have_poldek"; then
460 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
461 + pushd "$vdir" >/dev/null
462 + _hashAuto /etc/poldek.conf '/'
466 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
467 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
469 + pushd "$vdir" >/dev/null
470 + ## remove %_dbpath settings
471 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
474 + if test -n "$have_poldek"; then
475 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
476 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
479 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
480 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
482 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
486 + if test -n "$is_internalize"; then
489 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
490 + trap "$_RM -rf $tmpdir" EXIT
491 + pushd "$vdir" >/dev/null
492 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
493 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
498 + if test -n "$is_internalize"; then
499 + $_TOUCH "$cfgdir"/internal
501 + $_RM -f "$cfgdir"/internal
505 function processVserver_Debian()
511 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
512 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
513 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
515 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
516 --- util-vserver-0.30.214.org/scripts/util-vserver-vars.pathsubst 2007-09-02 22:06:41.000000000 +0200
517 +++ util-vserver-0.30.214/scripts/util-vserver-vars.pathsubst 2007-11-15 23:20:48.221174080 +0100
519 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
520 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
521 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
522 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
523 _LISTDEVIP="$__LEGACYDIR/listdevip"
524 _LOCKFILE="$__PKGLIBDIR/lockfile"
525 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
527 _VUNIFY="$__PKGLIBDIR/vunify"
528 _VYUM="$__SBINDIR/vyum"
529 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
530 +_VPOLDEK="$__SBINDIR/vpoldek"
531 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
535 --- util-vserver-0.30.214.org/scripts/vpkg 2007-09-02 22:06:41.000000000 +0200
536 +++ util-vserver-0.30.214/scripts/vpkg 2007-11-15 23:20:48.221174080 +0100
545 + ## rpm outputs sometimes '(contains no files)', so return
546 + ## only the valid output
548 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
550 + rpm_param=( -Uvh "$@" )
551 + poldek_param=( --install -v "$@" )
555 + if test -n "$is_external"; then
557 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
560 + for i in /bin /usr/bin /usr/local/bin; do
561 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
565 + if test -n "$is_external"; then
566 + if test "$have_poldek" -a "$poldek_param"; then
567 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
569 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
572 + if test "$have_poldek" -a "$poldek_param"; then
573 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
575 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
582 --- util-vserver-0.30.214.org/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
583 +++ util-vserver-0.30.214/scripts/vpoldek 2007-11-15 22:00:24.000000000 +0100
588 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
590 +# This program is free software; you can redistribute it and/or modify
591 +# it under the terms of the GNU General Public License as published by
592 +# the Free Software Foundation; version 2 of the License.
594 +# This program is distributed in the hope that it will be useful,
595 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
596 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
597 +# GNU General Public License for more details.
599 +# You should have received a copy of the GNU General Public License
600 +# along with this program; if not, write to the Free Software
601 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
603 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
604 +test -e "$UTIL_VSERVER_VARS" || {
605 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
608 +. "$UTIL_VSERVER_VARS"
615 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
617 +Report bugs to <$PACKAGE_BUGREPORT>."
621 +function showVersion()
624 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
625 +This program is part of $PACKAGE_STRING
627 +Copyright (C) 2007 Enrico Scholz
628 +This program is free software; you may redistribute it under the terms of
629 +the GNU General Public License. This program has absolutely no warranty."
633 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
636 +declare -a send_through poldek_opts
640 + (--help) showHelp $0 ;;
641 + (--version) showVersion ;;
642 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
643 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
644 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
645 + (--) shift; break;;
646 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
651 +VSOMETHING_TITLE=vpoldek
652 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
653 +VSOMETHING_PKGMGMT=1
655 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
657 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
658 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
659 --- util-vserver-0.30.214.org/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
660 +++ util-vserver-0.30.214/scripts/vpoldek-worker 2007-11-15 22:58:23.000000000 +0100
665 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
667 +# This program is free software; you can redistribute it and/or modify
668 +# it under the terms of the GNU General Public License as published by
669 +# the Free Software Foundation; version 2 of the License.
671 +# This program is distributed in the hope that it will be useful,
672 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
673 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
674 +# GNU General Public License for more details.
676 +# You should have received a copy of the GNU General Public License
677 +# along with this program; if not, write to the Free Software
678 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
682 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
683 +test -e "$UTIL_VSERVER_VARS" || {
684 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
687 +. "$UTIL_VSERVER_VARS"
694 +pkgInit "$vserver" rpm poldek
696 +test -z "$_POLDEK" || {
697 + warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
698 + ${POLDEK:=$_POLDEK}
701 +exec ${_POLDEK:-poldek} \
703 + --cachedir=$POLDEKCACHEDIR \
704 + --conf=$POLDEK_CONFIG \
705 + --pmcmd=$RPM_BINARY \
707 --- util-vserver-0.30.214.org/scripts/vserver-build 2007-09-02 22:06:41.000000000 +0200
708 +++ util-vserver-0.30.214/scripts/vserver-build 2007-11-15 23:20:48.224507577 +0100
710 yum ... -- -d <distribution>
711 ... installs the base-packages of the given distribution with
713 + poldek ... -- -d <distribution>
714 + ... installs the base-packages of the given distribution with
716 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
717 ... installs lists of rpm-packages
718 skeleton ... -- [<cmd> <args>*]
722 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
723 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone)
724 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xpoldek)
725 . $__PKGLIBDIR/vserver-build.$method
727 (x) panic $"No build-method specified";;
728 --- util-vserver-0.30.214.org/scripts/vserver-build.functions 2007-09-02 22:06:41.000000000 +0200
729 +++ util-vserver-0.30.214/scripts/vserver-build.functions 2007-11-15 23:20:48.224507577 +0100
731 elif test -e /etc/slackware-version; then
732 set -- $(cat /etc/slackware-version)
733 DISTRIBUTION=slackware$2
734 + elif test -e /etc/pld-release; then
737 + set -- $(cat /etc/pld-release)
738 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
740 elif test -n "$1"; then
743 --- util-vserver-0.30.214/scripts/vserver-build.functions.poldek 2008-03-25 19:20:07.685144000 +0200
744 +++ util-vserver-0.30.214/scripts/vserver-build.functions.poldek 2008-03-25 20:37:09.000000000 +0200
748 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
750 +# This program is free software; you can redistribute it and/or modify
751 +# it under the terms of the GNU General Public License as published by
752 +# the Free Software Foundation; version 2 of the License.
754 +# This program is distributed in the hope that it will be useful,
755 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
756 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
757 +# GNU General Public License for more details.
759 +# You should have received a copy of the GNU General Public License
760 +# along with this program; if not, write to the Free Software
761 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
763 +function poldek.installBasePackages
768 + test "$dir" != / || return 0
769 + for filelist in "$dir"/*; do
770 + isRegularFile "$filelist" || continue
772 + local can_fail=false
773 + local flags='--install'
775 + set -- $(<$filelist)
776 + while test "$#" -gt 0; do
778 + --reinstall) flags='--reinstall';;
779 + --can-fail) can_fail=true;;
784 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
788 +function poldek.initVariables
790 + findFile POLDEKCONFDEFAULT \
791 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
792 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
793 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
794 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
798 +function poldek.initFilesystem
800 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
801 + mkdir -p "$PKGCFGBASE"/poldek-cache
803 + $_LN_S "$PKGCFGBASE"/poldek-cache "$PKGCFGDIR"/poldek/cache
805 + populateDirectory "$PKGCFGDIR/poldek/etc" \
806 + "$__DISTRIBDIR/defaults/poldek" \
807 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
808 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
810 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
811 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
812 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
813 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
815 + if [ -n "$SETUP_MACHINE" ]; then
816 + say "Using $SETUP_MACHINE as machine"
817 + sed -i -e "s#^\(_pld_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/pld.conf
820 + if [ -n "$MIRROR" ]; then
821 + say "Using $MIRROR as mirror URL"
822 + sed -i -e "s#^\(_pld_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/pld.conf
825 +# test -z "$POLDEKCONFDEFAULT" || \
826 +# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
828 --- util-vserver-0.30.214/scripts/vserver-build.poldek 2007-11-15 23:20:48.224507577 +0100
829 +++ util-vserver-0.30.214/scripts/vserver-build.poldek 2008-03-25 20:25:23.000000000 +0200
833 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
835 +# This program is free software; you can redistribute it and/or modify
836 +# it under the terms of the GNU General Public License as published by
837 +# the Free Software Foundation; version 2 of the License.
839 +# This program is distributed in the hope that it will be useful,
840 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
841 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
842 +# GNU General Public License for more details.
844 +# You should have received a copy of the GNU General Public License
845 +# along with this program; if not, write to the Free Software
846 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
848 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
851 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
852 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
853 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
857 + (-d) DISTRIBUTION=$2; shift;;
858 + (-m) MIRROR=$2; shift;;
860 + (--) shift; break ;;
861 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
872 +pkgmgmt.initVariables
874 +poldek.initVariables
876 +base.initFilesystem "$OPTION_FORCE"
877 +pkgmgmt.initFilesystem "$OPTION_FORCE"
879 +poldek.initFilesystem
881 +setup_writeOption "$VSERVER_NAME"
882 +setup_writeInitialFstab
884 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
885 +rpm.initDB "$SETUP_CONFDIR"
886 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
887 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
888 + "$__CONFDIR/.distributions/.common/pubkeys" \
889 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
891 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
892 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
893 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"