1 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/Makefile.am util-vserver-0.30.216-pre3126/distrib/Makefile.am
2 --- util-vserver-0.30.216-pre3126.org/distrib/Makefile.am 2016-02-24 19:09:17.000000000 +0100
3 +++ util-vserver-0.30.216-pre3126/distrib/Makefile.am 2021-03-12 21:50:25.804347699 +0100
4 @@ -45,6 +45,7 @@ nobase_distrib_DATA = defaults/devs \
7 defaults/apt/apt.conf \
8 + defaults/poldek/poldek.conf \
9 template/initpost template/initpre \
10 rh9/apt/rpmpriorities rh9/pkgs/01 rh9/pkgs/02 \
11 fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \
12 @@ -96,7 +97,9 @@ nobase_distrib_DATA = defaults/devs \
13 suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
15 gentoo/init-vserver.sh gentoo/net.vserver \
16 - gentoo/reboot.sh gentoo/shutdown.sh
17 + gentoo/reboot.sh gentoo/shutdown.sh\
18 + pld-ac/pkgs/01 pld-ac/rpm/macros pld-ac/rpm/macros.lang \
19 + pld-th/pkgs/01 pld-th/rpm/macros pld-th/rpm/macros.lang
21 nobase_confdistrib_DATA = rh9/apt/sources.list \
22 fc1/apt/sources.list \
23 @@ -106,7 +109,9 @@ nobase_confdistrib_DATA = rh9/apt/sourc
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
32 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
33 = $(nobase_distrib_SCRIPTS)
34 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/defaults/poldek/poldek.conf util-vserver-0.30.216-pre3126/distrib/defaults/poldek/poldek.conf
35 --- util-vserver-0.30.216-pre3126.org/distrib/defaults/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
36 +++ util-vserver-0.30.216-pre3126/distrib/defaults/poldek/poldek.conf 2021-03-12 21:50:25.804347699 +0100
38 +# poldek configuration file.
43 +particle install = no
44 +choose equivalents manually = yes
45 +unique package names = yes
48 +ignore = kernel* udev devfs
49 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/pkgs/01 util-vserver-0.30.216-pre3126/distrib/pld-ac/pkgs/01
50 --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100
51 +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/pkgs/01 2021-03-12 21:50:25.804347699 +0100
59 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/poldek/repos.d/pld.conf util-vserver-0.30.216-pre3126/distrib/pld-ac/poldek/repos.d/pld.conf
60 --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
61 +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/poldek/repos.d/pld.conf 2021-03-12 21:50:25.804347699 +0100
64 +# PLD Linux Distribution <http://www.pld-linux.org/>.
66 +# Main sources for PLD Linux 2.0 (Ac)
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}
86 +path = %{_prefix}/PLD/%{_arch}/PLD/RPMS/
89 +# msmtp-sendmail is broken, yum noarch is older than in updates
90 +ignore = msmtp-sendmail* yum*
95 +path = %{_prefix}/updates/%{_arch}/
102 +path = %{_prefix}/supported/%{_arch}/
110 +path = %{_pld_main_prefix}/ready/%{_arch}/
118 +path = %{_pld_main_prefix}/test/%{_arch}/
122 +# ac-main + ac-updates
126 +sources = ac-main ac-updates
127 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros
128 --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
129 +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros 2021-03-12 21:50:25.804347699 +0100
131 +%_netsharedpath /dev:/proc
134 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros.lang util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros.lang
135 --- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros.lang 1970-01-01 01:00:00.000000000 +0100
136 +++ util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros.lang 2021-03-12 21:50:25.804347699 +0100
138 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
139 +# you have to use at least one language beside 'C'
140 +%_install_langs C:en:pl
141 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/pkgs/01 util-vserver-0.30.216-pre3126/distrib/pld-th/pkgs/01
142 --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/pkgs/01 1970-01-01 01:00:00.000000000 +0100
143 +++ util-vserver-0.30.216-pre3126/distrib/pld-th/pkgs/01 2021-03-12 21:50:25.804347699 +0100
151 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/poldek/repos.d/pld.conf util-vserver-0.30.216-pre3126/distrib/pld-th/poldek/repos.d/pld.conf
152 --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
153 +++ util-vserver-0.30.216-pre3126/distrib/pld-th/poldek/repos.d/pld.conf 2021-03-12 21:50:25.804347699 +0100
155 +# PLD Linux Distribution <http://www.pld-linux.org/>.
157 +# Main sources for PLD Linux 3.0 (Th)
159 +# specify our packages architecture
162 +# main PLD-site for often changed things (test, ready):
163 +_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th
166 +## You can use them if you have better connection there
168 +#_prefix = ftp://ftp.task.pld-linux.org/dists/th
169 +_prefix = %{_pld_main_prefix}
171 +# PLD Linux 3.0 (Th): main sources
175 +path = %{_prefix}/PLD/%{_arch}/RPMS/
180 +path = %{_prefix}/PLD/noarch/RPMS/
182 +# PLD Linux 3.0 (Th): obsolete sources (kde3, ...)
186 +path = %{_prefix}/obsolete/%{_arch}/RPMS/
193 +path = %{_prefix}/obsolete/noarch/RPMS/
197 +# PLD Linux 3.0 (Th): ready sources (testing stage before moved to main)
201 +path = %{_pld_main_prefix}/ready/%{_arch}/RPMS/
208 +path = %{_pld_main_prefix}/ready/noarch/RPMS/
212 +# PLD Linux 3.0 (Th): test sources (built packages to be moved to ready)
216 +path = %{_pld_main_prefix}/test/%{_arch}/RPMS/
223 +path = %{_pld_main_prefix}/test/noarch/RPMS/
226 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros
227 --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
228 +++ util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros 2021-03-12 21:50:25.804347699 +0100
230 +%_netsharedpath /dev:/proc
233 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros.lang util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros.lang
234 --- util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros.lang 1970-01-01 01:00:00.000000000 +0100
235 +++ util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros.lang 2021-03-12 21:50:25.804347699 +0100
237 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
238 +# you have to use at least one language beside 'C'
239 +%_install_langs C:en:pl
240 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/Makefile-files util-vserver-0.30.216-pre3126/scripts/Makefile-files
241 --- util-vserver-0.30.216-pre3126.org/scripts/Makefile-files 2016-02-24 19:09:17.000000000 +0100
242 +++ util-vserver-0.30.216-pre3126/scripts/Makefile-files 2021-03-12 21:50:25.804347699 +0100
243 @@ -21,6 +21,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
244 scripts/vapt-get-worker \
245 scripts/vrpm-worker \
246 scripts/vyum-worker \
247 + scripts/vpoldek-worker \
248 scripts/vrpm-preload \
249 scripts/vurpm-worker \
250 scripts/save_s_context \
251 @@ -50,12 +51,14 @@ scripts_pkglib_src_DTA = scripts/functio
252 scripts/vserver-build.template \
253 scripts/vserver-build.rsync \
254 scripts/vserver-build.clone \
255 + scripts/vserver-build.poldek \
256 scripts/vserver-build.functions \
257 scripts/vserver-build.functions.apt \
258 scripts/vserver-build.functions.pkgmgmt \
259 scripts/vserver-build.functions.rpm \
260 scripts/vserver-build.functions.urpmi \
261 scripts/vserver-build.functions.yum \
262 + scripts/vserver-build.functions.poldek \
263 scripts/vserver-setup.functions \
264 scripts/vserver.functions \
265 scripts/vserver.start \
266 @@ -71,6 +74,7 @@ scripts_pkglib_gen_SCRPTS = scripts/vshe
267 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
268 scripts/vapt-get-worker \
270 + scripts/vpoldek-worker \
271 scripts/vrpm-worker \
272 scripts/vrpm-preload \
273 scripts/start-vservers \
274 @@ -94,6 +98,7 @@ scripts_legacy_src_PRGS = scripts/legacy
275 scripts_sbin_src_PRGS = scripts/chbind \
279 scripts/vdispatch-conf \
282 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/functions util-vserver-0.30.216-pre3126/scripts/functions
283 --- util-vserver-0.30.216-pre3126.org/scripts/functions 2016-02-24 19:09:17.000000000 +0100
284 +++ util-vserver-0.30.216-pre3126/scripts/functions 2021-03-12 21:50:25.804347699 +0100
285 @@ -411,6 +411,20 @@ function _pkgSetVarsUrpmi
289 +function _pkgSetVarsPoldek
291 + if test -n "$PKGDIR"; then
292 + findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
293 + findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
295 + findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
296 + findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
299 + findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
300 + test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
304 function _pkgMountBase
306 @@ -495,6 +509,7 @@ function pkgInit
307 apt) _pkgSetVarsApt;;
308 yum) _pkgSetVarsYum;;
309 urpmi) _pkgSetVarsUrpmi;;
310 + poldek) _pkgSetVarsPoldek;;
311 *) echo "Unknown packaging flavor" >&2; exit 1;;
314 @@ -869,6 +884,8 @@ function pkgmgmt.guessStyle()
316 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
318 + elif test -e "$_pgs_vdir"/etc/pld-release; then
320 elif test -e "$_pgs_vdir"/etc/debian_version; then
322 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
323 @@ -957,6 +974,27 @@ function pkgmgmt.isUrpmiAvailable
324 test -n "$have_urpmi" && return 0 || return 1
327 +## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
328 +function pkgmgmt.isPoldekAvailable
332 + local is_internal="$3"
334 + local have_poldek i
335 + if test -n "$is_internal"; then
337 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
340 + for i in /bin /usr/bin /usr/local/bin; do
341 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
345 + test -n "$have_poldek" && return 0 || return 1
349 function vshelper.doSanityCheck
351 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/pkgmgmt util-vserver-0.30.216-pre3126/scripts/pkgmgmt
352 --- util-vserver-0.30.216-pre3126.org/scripts/pkgmgmt 2016-02-24 19:09:17.000000000 +0100
353 +++ util-vserver-0.30.216-pre3126/scripts/pkgmgmt 2021-03-12 21:50:25.804347699 +0100
354 @@ -195,7 +195,7 @@ packagemanagement:
358 - (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}")
359 + (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi poldek "${YUM_RELEASEPKGS[@]}")
360 hasSubstring "$pkgs" ---rpm--- || {
362 * The vserver does not seem to have the 'rpm' package which is required
363 @@ -205,9 +205,9 @@ packagemanagement:
367 - hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- || {
368 + hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- ---poldek--- || {
370 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
371 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
372 installed. It is suggested to install such a program before setting
373 up internal package management."
375 @@ -381,6 +381,131 @@ Can not continue; use '--force' to overr
379 +function processVserver_PLD()
382 + local is_internalize=$2
386 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
387 + cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
389 + ## Figure out the environment....
390 + pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
392 + local POLDEKETCDIR=
393 + local POLDEKCACHEDIR=
397 + ## Create directories and assign variables where configuration
398 + ## can/will be found on the host
399 + if test -n "$is_internalize"; then
400 + verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
402 +Can not continue; use '--force' to override this check"
404 + pushd "$vdir" >/dev/null
406 + test ! -L var/lib/rpm || {
407 + $_EXEC_CD /var/lib $_RM rpm &&
408 + $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
409 + $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
411 + } </dev/null 2>/dev/null
413 + for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
415 + $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
420 + if test -n "$have_poldek"; then
421 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
424 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
425 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
427 + mkdir -m755 -p "$cfgdir"
430 + if test -n "$have_poldek"; then
431 + findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
432 + findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
434 + test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
435 + test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
437 + test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
440 + findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
441 + findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
443 + test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
444 + test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
446 + test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
447 + test ! -e "$cfgdir"/base || need_base=
449 + test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
451 + mkdir -m755 -p "$PKGCFGDIR"
452 + _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
453 + "$RPMETCDIR" "$RPMSTATEDIR"
456 + ## Copy the files...
457 + if test -n "$is_internalize"; then
458 + if test -n "$have_poldek"; then
459 + _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
460 + pushd "$vdir" >/dev/null
461 + _hashAuto /etc/poldek.conf '/'
465 + _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
466 + _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
468 + pushd "$vdir" >/dev/null
469 + ## remove %_dbpath settings
470 + _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
473 + if test -n "$have_poldek"; then
474 + _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
475 + _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
478 + _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
479 + _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
481 + echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
485 + if test -n "$is_internalize"; then
488 + tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
489 + trap "$_RM -rf $tmpdir" EXIT
490 + pushd "$vdir" >/dev/null
491 + $_EXEC_CD /var/lib $_MV rpm $tmpdir/
492 + $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
497 + if test -n "$is_internalize"; then
498 + $_TOUCH "$cfgdir"/internal
500 + $_RM -f "$cfgdir"/internal
504 function processVserver_Debian()
507 @@ -435,6 +560,7 @@ function processVserver()
510 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
511 + (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
512 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
514 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
515 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/util-vserver-vars.pathsubst util-vserver-0.30.216-pre3126/scripts/util-vserver-vars.pathsubst
516 --- util-vserver-0.30.216-pre3126.org/scripts/util-vserver-vars.pathsubst 2016-02-24 19:09:17.000000000 +0100
517 +++ util-vserver-0.30.216-pre3126/scripts/util-vserver-vars.pathsubst 2021-03-12 21:50:25.807681091 +0100
518 @@ -58,6 +58,7 @@ _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKG
519 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGDATADIR/vserver-build.functions.yum"
520 _LIB_VSERVER_BUILD_FUNCTIONS_URPMI="$__PKGDATADIR/vserver-build.functions.urpmi"
521 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGDATADIR/vserver-build.functions.pkgmgmt"
522 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGDATADIR/vserver-build.functions.poldek"
523 _LISTDEVIP="$__LEGACYDIR/listdevip"
524 _LOCKFILE="$__PKGLIBEXECDIR/lockfile"
525 _MASK2PREFIX="$__PKGLIBEXECDIR/mask2prefix"
526 @@ -116,6 +117,8 @@ _VURPM="$__SBINDIR/vurpm"
527 _VURPM_WORKER="$__PKGLIBEXECDIR/vurpm-worker"
528 _VYUM="$__SBINDIR/vyum"
529 _VYUM_WORKER="$__PKGLIBEXECDIR/vyum-worker"
530 +_VPOLDEK="$__SBINDIR/vpoldek"
531 +_VPOLDEK_WORKER="$__PKGLIBEXECDIR/vpoldek-worker"
535 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpkg util-vserver-0.30.216-pre3126/scripts/vpkg
536 --- util-vserver-0.30.216-pre3126.org/scripts/vpkg 2016-02-24 19:09:17.000000000 +0100
537 +++ util-vserver-0.30.216-pre3126/scripts/vpkg 2021-03-12 21:50:25.807681091 +0100
538 @@ -115,6 +115,44 @@ case "$style" in
546 + ## rpm outputs sometimes '(contains no files)', so return
547 + ## only the valid output
549 + rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
551 + rpm_param=( -Uvh "$@" )
552 + poldek_param=( --install -v "$@" )
556 + if test -n "$is_external"; then
558 + test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
561 + for i in /bin /usr/bin /usr/local/bin; do
562 + test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
566 + if test -n "$is_external"; then
567 + if test "$have_poldek" -a "$poldek_param"; then
568 + cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
570 + cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
573 + if test "$have_poldek" -a "$poldek_param"; then
574 + cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
576 + cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
583 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpoldek util-vserver-0.30.216-pre3126/scripts/vpoldek
584 --- util-vserver-0.30.216-pre3126.org/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
585 +++ util-vserver-0.30.216-pre3126/scripts/vpoldek 2021-03-12 21:50:25.807681091 +0100
590 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
592 +# This program is free software; you can redistribute it and/or modify
593 +# it under the terms of the GNU General Public License as published by
594 +# the Free Software Foundation; version 2 of the License.
596 +# This program is distributed in the hope that it will be useful,
597 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
598 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
599 +# GNU General Public License for more details.
601 +# You should have received a copy of the GNU General Public License
602 +# along with this program; if not, write to the Free Software
603 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
605 +: ${UTIL_VSERVER_VARS:=/usr/share/util-vserver/util-vserver-vars}
606 +test -e "$UTIL_VSERVER_VARS" || {
607 + echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
610 +. "$UTIL_VSERVER_VARS"
617 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
619 +Report bugs to <$PACKAGE_BUGREPORT>."
623 +function showVersion()
626 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
627 +This program is part of $PACKAGE_STRING
629 +Copyright (C) 2007 Enrico Scholz
630 +This program is free software; you may redistribute it under the terms of
631 +the GNU General Public License. This program has absolutely no warranty."
635 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
638 +declare -a send_through poldek_opts
642 + (--help) showHelp $0 ;;
643 + (--version) showVersion ;;
644 + (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
645 + (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
646 + (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
647 + (--) shift; break;;
648 + (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
653 +VSOMETHING_TITLE=vpoldek
654 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
655 +VSOMETHING_PKGMGMT=1
657 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
659 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
660 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
661 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpoldek-worker util-vserver-0.30.216-pre3126/scripts/vpoldek-worker
662 --- util-vserver-0.30.216-pre3126.org/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
663 +++ util-vserver-0.30.216-pre3126/scripts/vpoldek-worker 2021-03-12 21:50:25.807681091 +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/share/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 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build util-vserver-0.30.216-pre3126/scripts/vserver-build
711 --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build 2016-02-24 19:09:17.000000000 +0100
712 +++ util-vserver-0.30.216-pre3126/scripts/vserver-build 2021-03-12 21:50:25.807681091 +0100
713 @@ -60,6 +60,9 @@ Possible methods are:
714 ... installs the base-packages of the given distribution with
716 urpmi ... -- -d <distribution> -m <mirror>
717 + poldek ... -- -d <distribution>
718 + ... installs the base-packages of the given distribution with
720 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
721 ... installs lists of rpm-packages
722 skeleton ... -- [<cmd> <args>*]
723 @@ -142,7 +145,7 @@ setup_setDefaults "$VSERVER_NAME"
726 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
727 - (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi)
728 + (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi|xpoldek)
729 . $__PKGDATADIR/vserver-build.$method
731 (x) panic $"No build-method specified";;
732 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions util-vserver-0.30.216-pre3126/scripts/vserver-build.functions
733 --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions 2016-02-24 19:09:17.000000000 +0100
734 +++ util-vserver-0.30.216-pre3126/scripts/vserver-build.functions 2021-03-12 21:50:25.807681091 +0100
735 @@ -173,6 +173,12 @@ function getDistribution
736 elif test -e /etc/slackware-version; then
737 set -- $(cat /etc/slackware-version)
738 DISTRIBUTION=slackware$2
739 + elif test -e /etc/pld-release; then
742 + set -- $(cat /etc/pld-release)
743 + DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
745 elif test -n "$1"; then
748 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions.poldek util-vserver-0.30.216-pre3126/scripts/vserver-build.functions.poldek
749 --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
750 +++ util-vserver-0.30.216-pre3126/scripts/vserver-build.functions.poldek 2021-03-12 21:50:25.807681091 +0100
754 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
756 +# This program is free software; you can redistribute it and/or modify
757 +# it under the terms of the GNU General Public License as published by
758 +# the Free Software Foundation; version 2 of the License.
760 +# This program is distributed in the hope that it will be useful,
761 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
762 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
763 +# GNU General Public License for more details.
765 +# You should have received a copy of the GNU General Public License
766 +# along with this program; if not, write to the Free Software
767 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
769 +function poldek.installBasePackages
774 + test "$dir" != / || return 0
775 + for filelist in "$dir"/*; do
776 + isRegularFile "$filelist" || continue
778 + local can_fail=false
779 + local flags='--install'
781 + set -- $(<$filelist)
782 + while test "$#" -gt 0; do
784 + --reinstall) flags='--reinstall';;
785 + --can-fail) can_fail=true;;
790 + "$_VPOLDEK" "$name" -- $flags $* || $can_fail
794 +function poldek.initVariables
796 + findFile POLDEKCONFDEFAULT \
797 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
798 + "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
799 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
800 + "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
804 +function poldek.initFilesystem
806 + mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
808 + $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
810 + populateDirectory "$PKGCFGDIR/poldek/etc" \
811 + "$__DISTRIBDIR/defaults/poldek" \
812 + "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
813 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
815 + populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
816 + "$__DISTRIBDIR/defaults/poldek/repos.d" \
817 + "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
818 + "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
820 + if [ -n "$SETUP_MACHINE" ]; then
821 + say "Using $SETUP_MACHINE as machine"
822 + sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
825 + if [ -n "$MIRROR" ]; then
826 + say "Using $MIRROR as mirror URL"
827 + sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
830 + if [ "$DISTRIBUTION" = "pld-ac" ]; then
831 + echo 'auto directory dependencies = no' >> "$PKGCFGDIR"/poldek/etc/poldek.conf
832 + echo '%_check_dirname_deps 0' >> "$PKGCFGDIR"/rpm/etc/macros
835 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build.poldek util-vserver-0.30.216-pre3126/scripts/vserver-build.poldek
836 --- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
837 +++ util-vserver-0.30.216-pre3126/scripts/vserver-build.poldek 2021-03-12 21:50:25.807681091 +0100
841 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
843 +# This program is free software; you can redistribute it and/or modify
844 +# it under the terms of the GNU General Public License as published by
845 +# the Free Software Foundation; version 2 of the License.
847 +# This program is distributed in the hope that it will be useful,
848 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
849 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
850 +# GNU General Public License for more details.
852 +# You should have received a copy of the GNU General Public License
853 +# along with this program; if not, write to the Free Software
854 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
856 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
859 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
860 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
861 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
865 + (-d) DISTRIBUTION=$2; shift;;
866 + (-m) MIRROR=$2; shift;;
868 + (--) shift; break ;;
869 + (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
880 +pkgmgmt.initVariables
882 +poldek.initVariables
884 +base.initFilesystem "$OPTION_FORCE"
885 +pkgmgmt.initFilesystem "$OPTION_FORCE"
887 +poldek.initFilesystem
889 +setup_writeOption "$VSERVER_NAME"
890 +setup_writeInitialFstab
892 +test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
893 +rpm.initDB "$SETUP_CONFDIR"
894 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
895 + "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
896 + "$__CONFDIR/.distributions/.common/pubkeys" \
897 + "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
899 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
900 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
901 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"