]> git.pld-linux.org Git - packages/util-vserver.git/blobdiff - util-vserver-pld.patch
- rediff patches
[packages/util-vserver.git] / util-vserver-pld.patch
index 427773783250ecf8445d618f8a5419cea9b46c38..81700f0d64d2cf7cec501c07ffd84f4f0626c835 100644 (file)
-diff -urN util-vserver-0.30.207/distrib/Makefile.am util-vserver-0.30.207-pld/distrib/Makefile.am
---- util-vserver-0.30.207/distrib/Makefile.am  2005-04-08 21:12:09.000000000 +0200
-+++ util-vserver-0.30.207-pld/distrib/Makefile.am      2005-05-17 15:27:16.884625000 +0200
-@@ -43,7 +43,8 @@
-                          fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \
-                          $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/distrib/Makefile.am util-vserver-0.30.216-pre3126/distrib/Makefile.am
+--- util-vserver-0.30.216-pre3126.org/distrib/Makefile.am      2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/Makefile.am  2021-03-12 21:50:25.804347699 +0100
+@@ -45,6 +45,7 @@ nobase_distrib_DATA  =  defaults/devs \
+                          defaults/apt.conf \
+                          defaults/rpm/macros \
+                          defaults/apt/apt.conf \
++                         defaults/poldek/poldek.conf \
+                          template/initpost template/initpre \
+                          rh9/apt/rpmpriorities    rh9/pkgs/01    rh9/pkgs/02 \
+                          fc1/apt/rpmpriorities    fc1/pkgs/01    fc1/pkgs/02 \
+@@ -96,7 +97,9 @@ nobase_distrib_DATA  =  defaults/devs \
                           suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
--                         suse91/rpm/macros
-+                         suse91/rpm/macros \
-+                         pld-ac/pkgs/01 pld-ac/rpm/macros pld-ac/rpmlist.d/00.lst
+                          suse91/rpm/macros \
+                          gentoo/init-vserver.sh gentoo/net.vserver \
+-                         gentoo/reboot.sh gentoo/shutdown.sh
++                         gentoo/reboot.sh gentoo/shutdown.sh\
++                         pld-ac/pkgs/01 pld-ac/rpm/macros pld-ac/rpm/macros.lang \
++                         pld-th/pkgs/01 pld-th/rpm/macros pld-th/rpm/macros.lang
  
  nobase_confdistrib_DATA       =  rh9/apt/sources.list \
                           fc1/apt/sources.list \
-@@ -67,6 +68,7 @@
-                               ln -sf ../redhat/initpost $(DESTDIR)$(distribdir)/$$i/ && \
-                               ln -sf ../redhat/initpre  $(DESTDIR)$(distribdir)/$$i/; \
-                       done
-+                      ln -sf pld-ac $(DESTDIR)$(distribdir)/pld1.99
-                       $(mkinstalldirs) $(DESTDIR)$(confdir) \
-                               $(DESTDIR)$(confdistribdir)/.common/pubkeys \
-                               $(DESTDIR)$(confdefaultsdir) \
-diff -urN util-vserver-0.30.207/distrib/pld-ac/pkgs/01 util-vserver-0.30.207-pld/distrib/pld-ac/pkgs/01
---- util-vserver-0.30.207/distrib/pld-ac/pkgs/01       1970-01-01 01:00:00.000000000 +0100
-+++ util-vserver-0.30.207-pld/distrib/pld-ac/pkgs/01   2005-05-16 19:09:20.000000000 +0200
+@@ -106,7 +109,9 @@ nobase_confdistrib_DATA    =  rh9/apt/sourc
+                          fc5/apt/sources.list \
+                          fc6/apt/sources.list \
+                          f7/apt/sources.list \
+-                         suse91/apt/sources.list
++                         suse91/apt/sources.list \
++                         pld-ac/poldek/repos.d/pld.conf \
++                         pld-th/poldek/repos.d/pld.conf
+ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
+                       =  $(nobase_distrib_SCRIPTS)
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/defaults/poldek/poldek.conf      1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/defaults/poldek/poldek.conf  2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,11 @@
++# poldek configuration file.
++
++%includedir repos.d
++
++[global]
++particle install = no
++choose equivalents manually = yes
++unique package names = yes
++
++#hold =
++ignore = kernel* udev devfs
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/pkgs/01   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-ac/pkgs/01       2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,6 @@
++basesystem
++filesystem
++glibc-misc
++issue
++rpm-base
++vserver-packages
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/poldek/repos.d/pld.conf   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-ac/poldek/repos.d/pld.conf       2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,64 @@
++# $Id$
++# PLD Linux Distribution <http://www.pld-linux.org/>.
++#
++# Main sources for PLD Linux 2.0 (Ac)
++
++# specify our packages architecture
++_arch   = %ARCH%
++
++# main PLD-site for often changed things:
++_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
++
++## Some mirrors
++## You can use them if you have better connection there
++# CI TASK:
++#_prefix = ftp://ftp.task.pld-linux.org/dists/ac
++_prefix = %{_pld_main_prefix}
++
++_type = pndir
++
++# PLD Linux 2.0 (Ac)
++[source]
++type   = %{_type}
++name   = ac-main
++path   = %{_prefix}/PLD/%{_arch}/PLD/RPMS/
++signed = yes
++pri    = 1
++# msmtp-sendmail is broken, yum noarch is older than in updates
++ignore = msmtp-sendmail* yum*
++
++[source]
++type   = %{_type}
++name   = ac-updates
++path   = %{_prefix}/updates/%{_arch}/
++signed = yes
++pri    = 1
++
++[source]
++type   = %{_type}
++name   = ac-supported
++path   = %{_prefix}/supported/%{_arch}/
++signed = yes
++auto   = no
++autoup = no
++
++[source]
++type   = %{_type}
++name   = ac-ready
++path   = %{_pld_main_prefix}/ready/%{_arch}/
++#signed = yes
++auto   = no
++autoup = no
++
++[source]
++type   = %{_type}
++name   = ac-test
++path   = %{_pld_main_prefix}/test/%{_arch}/
++auto   = no
++autoup = no
++
++# ac-main + ac-updates
++[source]
++type   = group
++name   = ac
++sources = ac-main ac-updates
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros        1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros    2021-03-12 21:50:25.804347699 +0100
 @@ -0,0 +1,3 @@
++%_netsharedpath               /dev:/proc
++%_tmppath                     /tmp
++%_host_os                     %_os
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-ac/rpm/macros.lang   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-ac/rpm/macros.lang       2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,3 @@
++# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
++# you have to use at least one language beside 'C'
++%_install_langs               C:en:pl
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-th/pkgs/01   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-th/pkgs/01       2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,6 @@
 +basesystem
++filesystem
 +glibc
 +issue
-diff -urN util-vserver-0.30.207/distrib/pld-ac/rpm/macros util-vserver-0.30.207-pld/distrib/pld-ac/rpm/macros
---- util-vserver-0.30.207/distrib/pld-ac/rpm/macros    1970-01-01 01:00:00.000000000 +0100
-+++ util-vserver-0.30.207-pld/distrib/pld-ac/rpm/macros        2005-05-17 15:23:04.279026888 +0200
-@@ -0,0 +1,4 @@
++rpm-base
++vserver-packages
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-th/poldek/repos.d/pld.conf   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-th/poldek/repos.d/pld.conf       2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,71 @@
++# PLD Linux Distribution <http://www.pld-linux.org/>.
++#
++# Main sources for PLD Linux 3.0 (Th)
++
++# specify our packages architecture
++_arch   = %ARCH%
++
++# main PLD-site for often changed things (test, ready):
++_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th
++
++## Some mirrors
++## You can use them if you have better connection there
++# CI TASK:
++#_prefix = ftp://ftp.task.pld-linux.org/dists/th
++_prefix = %{_pld_main_prefix}
++
++# PLD Linux 3.0 (Th): main sources
++[source]
++type   = pndir
++name   = th
++path   = %{_prefix}/PLD/%{_arch}/RPMS/
++
++[source]
++type   = pndir
++name   = th
++path   = %{_prefix}/PLD/noarch/RPMS/
++
++# PLD Linux 3.0 (Th): obsolete sources (kde3, ...)
++[source]
++type   = pndir
++name   = th-obsolete
++path   = %{_prefix}/obsolete/%{_arch}/RPMS/
++auto   = no
++autoup = no
++
++[source]
++type   = pndir
++name   = th-obsolete
++path   = %{_prefix}/obsolete/noarch/RPMS/
++auto   = no
++autoup = no
++
++# PLD Linux 3.0 (Th): ready sources (testing stage before moved to main)
++[source]
++type   = pndir
++name   = th-ready
++path   = %{_pld_main_prefix}/ready/%{_arch}/RPMS/
++auto   = no
++autoup = no
++
++[source]
++type   = pndir
++name   = th-ready
++path   = %{_pld_main_prefix}/ready/noarch/RPMS/
++auto   = no
++autoup = no
++
++# PLD Linux 3.0 (Th): test sources (built packages to be moved to ready)
++[source]
++type   = pndir
++name   = th-test
++path   = %{_pld_main_prefix}/test/%{_arch}/RPMS/
++auto   = no
++autoup = no
++
++[source]
++type   = pndir
++name   = th-test
++path   = %{_pld_main_prefix}/test/noarch/RPMS/
++auto   = no
++autoup = no
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros        1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros    2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,3 @@
++%_netsharedpath               /dev:/proc
++%_tmppath                     /tmp
++%_host_os                     %_os
+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
+--- util-vserver-0.30.216-pre3126.org/distrib/pld-th/rpm/macros.lang   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/distrib/pld-th/rpm/macros.lang       2021-03-12 21:50:25.804347699 +0100
+@@ -0,0 +1,3 @@
 +# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
 +# you have to use at least one language beside 'C'
 +%_install_langs               C:en:pl
-+%_netsharedpath               /dev
-diff -urN util-vserver-0.30.207/distrib/pld-ac/rpmlist.d/00.lst util-vserver-0.30.207-pld/distrib/pld-ac/rpmlist.d/00.lst
---- util-vserver-0.30.207/distrib/pld-ac/rpmlist.d/00.lst      1970-01-01 01:00:00.000000000 +0100
-+++ util-vserver-0.30.207-pld/distrib/pld-ac/rpmlist.d/00.lst  2005-05-17 15:15:56.643037440 +0200
-@@ -0,0 +1,8 @@
-+basesystem-*.rpm
-+dev-*.rpm
-+FHS-*.rpm
-+glibc-misc-*.rpm
-+glibc-[0-9]*.rpm
-+libgcc-[0-9]*.rpm
-+setup-*.rpm
-+issue-[0-9]*.rpm
-diff -ur -x '*~' -x .libs -x .deps util-vserver-0.30.207/scripts/functions util-vserver-0.30.207-poldek/scripts/functions
---- util-vserver-0.30.207/scripts/functions    2005-05-20 18:33:27.361745984 +0200
-+++ util-vserver-0.30.207-poldek/scripts/functions     2005-05-20 18:33:06.191964280 +0200
-@@ -674,6 +674,8 @@
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/Makefile-files util-vserver-0.30.216-pre3126/scripts/Makefile-files
+--- util-vserver-0.30.216-pre3126.org/scripts/Makefile-files   2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/Makefile-files       2021-03-12 21:50:25.804347699 +0100
+@@ -21,6 +21,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
+                               scripts/vapt-get-worker \
+                               scripts/vrpm-worker \
+                               scripts/vyum-worker \
++                              scripts/vpoldek-worker \
+                               scripts/vrpm-preload \
+                               scripts/vurpm-worker \
+                               scripts/save_s_context \
+@@ -50,12 +51,14 @@ scripts_pkglib_src_DTA =   scripts/functio
+                               scripts/vserver-build.template \
+                               scripts/vserver-build.rsync \
+                               scripts/vserver-build.clone \
++                              scripts/vserver-build.poldek \
+                               scripts/vserver-build.functions \
+                               scripts/vserver-build.functions.apt \
+                               scripts/vserver-build.functions.pkgmgmt \
+                               scripts/vserver-build.functions.rpm \
+                               scripts/vserver-build.functions.urpmi \
+                               scripts/vserver-build.functions.yum \
++                              scripts/vserver-build.functions.poldek \
+                               scripts/vserver-setup.functions \
+                               scripts/vserver.functions \
+                               scripts/vserver.start \
+@@ -71,6 +74,7 @@ scripts_pkglib_gen_SCRPTS =  scripts/vshe
+ scripts_pkglib_src_SCRPTS =   scripts/pkgmgmt \
+                               scripts/vapt-get-worker \
+                               scripts/vpkg \
++                              scripts/vpoldek-worker \
+                               scripts/vrpm-worker \
+                               scripts/vrpm-preload \
+                               scripts/start-vservers \
+@@ -94,6 +98,7 @@ scripts_legacy_src_PRGS =    scripts/legacy
+ scripts_sbin_src_PRGS =               scripts/chbind \
+                               scripts/chcontext \
+                               scripts/vapt-get \
++                              scripts/vpoldek \
+                               scripts/vdispatch-conf \
+                               scripts/vemerge \
+                               scripts/vesync \
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/functions util-vserver-0.30.216-pre3126/scripts/functions
+--- util-vserver-0.30.216-pre3126.org/scripts/functions        2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/functions    2021-03-12 21:50:25.804347699 +0100
+@@ -411,6 +411,20 @@ function _pkgSetVarsUrpmi
+     fi
+ }
++function _pkgSetVarsPoldek
++{
++    if test -n "$PKGDIR"; then
++      findDir POLDEKETCDIR    $PKGDIR/poldeketc      $PKGDIR/base/poldek/etc       /etc/poldek
++      findDir POLDEKCACHEDIR  $PKGDIR/poldek-cache   $PKGDIR/base/poldek/cache
++    else
++      findDir POLDEKETCDIR    "$VDIR"/etc/poldek      /etc/poldek
++      findDir POLDEKCACHEDIR  "$VDIR"/var/tmp/poldek-cache
++    fi
++
++    findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
++    test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
++}
++
+ function _pkgMountBase
+ {
+@@ -495,6 +509,7 @@ function pkgInit
+           apt)        _pkgSetVarsApt;;
+           yum)        _pkgSetVarsYum;;
+           urpmi)      _pkgSetVarsUrpmi;;
++          poldek)     _pkgSetVarsPoldek;;
+           *)          echo "Unknown packaging flavor" >&2; exit 1;;
+       esac
+     done
+@@ -869,6 +884,8 @@ function pkgmgmt.guessStyle()
        style=redhat
      elif test -e "$_pgs_vdir"/etc/mandrake-release; then
        style=mandrake
@@ -58,23 +320,222 @@ diff -ur -x '*~' -x .libs -x .deps util-vserver-0.30.207/scripts/functions util-
      elif test -e "$_pgs_vdir"/etc/debian_version; then
        style=debian
      elif test -e "$_pgs_vdir"/etc/SuSE-release; then
-diff -urN util-vserver-0.30.207/scripts/vserver-build.functions util-vserver-0.30.207-pld/scripts/vserver-build.functions
---- util-vserver-0.30.207/scripts/vserver-build.functions      2005-04-16 23:20:45.000000000 +0200
-+++ util-vserver-0.30.207-pld/scripts/vserver-build.functions  2005-05-17 15:13:49.646343872 +0200
-@@ -133,6 +133,9 @@
-       elif test -e /etc/slackware-release; then
-           set -- $(cat /etc/slackware-release)
-           DISTRIBUTION=slackware$2
-+      elif test -e /etc/pld-release; then
-+          set -- $(cat /etc/pld-release)
-+          DISTRIBUTION=pld$1
-       elif test -n "$1"; then
-           DISTRIBUTION=$1
-       else
-diff -ur -x '*~' -x .libs -x .deps util-vserver-0.30.207/scripts/vpkg util-vserver-0.30.207-poldek/scripts/vpkg
---- util-vserver-0.30.207/scripts/vpkg 2005-03-21 21:03:30.000000000 +0100
-+++ util-vserver-0.30.207-poldek/scripts/vpkg  2005-05-20 18:22:18.745391120 +0200
-@@ -115,6 +115,44 @@
+@@ -957,6 +974,27 @@ function pkgmgmt.isUrpmiAvailable
+     test -n "$have_urpmi" && return 0 || return 1
+ }
++## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
++function pkgmgmt.isPoldekAvailable
++{
++    local cfgdir="$1"
++    local vdir="$2"
++    local is_internal="$3"
++    
++    local have_poldek i
++    if test -n "$is_internal"; then
++      have_poldek=1
++      test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
++    else
++      have_poldek=
++      for i in /bin /usr/bin /usr/local/bin; do
++          test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
++      done
++    fi
++
++    test -n "$have_poldek" && return 0 || return 1
++}
++
+ function vshelper.doSanityCheck
+ {
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/pkgmgmt util-vserver-0.30.216-pre3126/scripts/pkgmgmt
+--- util-vserver-0.30.216-pre3126.org/scripts/pkgmgmt  2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/pkgmgmt      2021-03-12 21:50:25.804347699 +0100
+@@ -195,7 +195,7 @@ packagemanagement:
+ "
+     
+     case $2 in
+-      (RH)    pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}")
++      (RH)    pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi poldek "${YUM_RELEASEPKGS[@]}")
+               hasSubstring "$pkgs" ---rpm--- || {
+                   warning "$ERR
+ * The vserver does not seem to have the 'rpm' package which is required
+@@ -205,9 +205,9 @@ packagemanagement:
+                   ERR=
+               }
+               
+-              hasSubstring "$pkgs"  ---apt--- ---yum--- ---urpmi--- || {
++              hasSubstring "$pkgs"  ---apt--- ---yum--- ---urpmi--- ---poldek--- || {
+                   warning "$ERR
+-* The vserver does not seem to have a depsolver like 'apt' or 'yum'
++* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
+   installed. It is suggested to install such a program before setting
+   up internal package management."
+                   res=1
+@@ -381,6 +381,131 @@ Can not continue; use '--force' to overr
+     fi
+ }
++function processVserver_PLD()
++{
++    local vserver=$1
++    local is_internalize=$2
++    local cfgdir
++    local i
++
++    cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
++    cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
++
++    ## Figure out the environment....
++    pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
++
++    local POLDEKETCDIR=
++    local POLDEKCACHEDIR=
++    local RPMETCDIR=
++    local RPMSTATEDIR=
++
++    ## Create directories and assign variables where configuration
++    ## can/will be found on the host
++    if test -n "$is_internalize"; then
++      verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
++          panic "
++Can not continue; use '--force' to override this check"
++    
++      pushd "$vdir" >/dev/null
++
++      test ! -L var/lib/rpm || {
++          $_EXEC_CD /var/lib $_RM            rpm &&
++          $_EXEC_CD /var/lib $_MKDIR -m755   rpm &&
++          $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
++          :
++      } </dev/null 2>/dev/null
++
++      for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
++          test -d "$i" ||
++              $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
++      done #2>/dev/null
++      
++      popd >/dev/null
++      
++      if test -n "$have_poldek"; then
++          findDir POLDEKETCDIR    "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
++      fi
++
++      findDir RPMETCDIR   "$cfgdir"/rpmetc   "$cfgdir"/base/rpm/etc    /etc/rpm /
++      findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
++    else
++      mkdir -m755 -p "$cfgdir"
++      local need_base=
++
++      if test -n "$have_poldek"; then
++          findDir POLDEKETCDIR   "$cfgdir"/poldeketc    "$cfgdir"/base/poldek/etc     /
++          findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache   /
++          
++          test "$POLDEKETCDIR"    != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
++          test "$POLDEKCACHEDIR"  != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
++
++          test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
++      fi
++
++      findDir RPMETCDIR     "$cfgdir"/rpmetc   "$cfgdir"/base/rpm/etc    /
++      findDir RPMSTATEDIR   "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state  /
++
++      test "$RPMETCDIR"   != / || RPMETCDIR=$cfgdir/base/rpm/etc
++      test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
++
++      test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
++      test ! -e "$cfgdir"/base || need_base=
++
++      test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
++
++      mkdir -m755 -p "$PKGCFGDIR"
++      _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
++                  "$RPMETCDIR" "$RPMSTATEDIR"
++    fi
++
++    ## Copy the files...
++    if test -n "$is_internalize"; then
++      if test -n "$have_poldek"; then
++          _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
++          pushd "$vdir" >/dev/null
++              _hashAuto /etc/poldek.conf '/'
++          popd >/dev/null
++      fi
++
++      _copySecure "$vdir" "$RPMETCDIR"   /etc/rpm
++      _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
++
++      pushd "$vdir" >/dev/null
++          ## remove %_dbpath settings
++          _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
++      popd >/dev/null
++    else
++      if test -n "$have_poldek"; then
++          _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
++          _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
++      fi
++
++      _copySecureRev "$vdir" /etc/rpm     "$RPMETCDIR"
++      _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
++
++      echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
++    fi
++
++    ## Cleanups...
++    if test -n "$is_internalize"; then
++      :
++    else
++      tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
++      trap "$_RM -rf $tmpdir" EXIT
++      pushd "$vdir" >/dev/null
++      $_EXEC_CD /var/lib $_MV rpm $tmpdir/
++      $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
++      $_RM -rf $tmpdir
++    fi
++
++    ## Finish it...
++    if test -n "$is_internalize"; then
++      $_TOUCH "$cfgdir"/internal
++    else
++      $_RM -f "$cfgdir"/internal
++    fi
++}
++
+ function processVserver_Debian()
+ {
+     local vserver=$1
+@@ -435,6 +560,7 @@ function processVserver()
+     case "$style" in
+       (redhat|mandrake)       processVserver_RH     "$vserver" "$IS_INTERNALIZE";;
++      (pld)                   processVserver_PLD    "$vserver" "$IS_INTERNALIZE";;
+       (debian)                processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
+       (*)
+           echo $"Vserver style '$style' is not supported for packagemanagment" >&2
+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
+--- util-vserver-0.30.216-pre3126.org/scripts/util-vserver-vars.pathsubst      2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/util-vserver-vars.pathsubst  2021-03-12 21:50:25.807681091 +0100
+@@ -58,6 +58,7 @@ _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKG
+ _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGDATADIR/vserver-build.functions.yum"
+ _LIB_VSERVER_BUILD_FUNCTIONS_URPMI="$__PKGDATADIR/vserver-build.functions.urpmi"
+ _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGDATADIR/vserver-build.functions.pkgmgmt"
++_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGDATADIR/vserver-build.functions.poldek"
+ _LISTDEVIP="$__LEGACYDIR/listdevip"
+ _LOCKFILE="$__PKGLIBEXECDIR/lockfile"
+ _MASK2PREFIX="$__PKGLIBEXECDIR/mask2prefix"
+@@ -116,6 +117,8 @@ _VURPM="$__SBINDIR/vurpm"
+ _VURPM_WORKER="$__PKGLIBEXECDIR/vurpm-worker"
+ _VYUM="$__SBINDIR/vyum"
+ _VYUM_WORKER="$__PKGLIBEXECDIR/vyum-worker"
++_VPOLDEK="$__SBINDIR/vpoldek"
++_VPOLDEK_WORKER="$__PKGLIBEXECDIR/vpoldek-worker"
+ _AWK="@AWK@"
+ _BZIP2="@BZIP2@"
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpkg util-vserver-0.30.216-pre3126/scripts/vpkg
+--- util-vserver-0.30.216-pre3126.org/scripts/vpkg     2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vpkg 2021-03-12 21:50:25.807681091 +0100
+@@ -115,6 +115,44 @@ case "$style" in
            fi
        fi
        ;;
@@ -119,3 +580,324 @@ diff -ur -x '*~' -x .libs -x .deps util-vserver-0.30.207/scripts/vpkg util-vserv
      (debian)
        case "$tag" in
            (get-conffiles)
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpoldek util-vserver-0.30.216-pre3126/scripts/vpoldek
+--- util-vserver-0.30.216-pre3126.org/scripts/vpoldek  1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vpoldek      2021-03-12 21:50:25.807681091 +0100
+@@ -0,0 +1,74 @@
++#! /bin/bash
++# $Id$
++
++# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
++#  
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; version 2 of the License.
++#  
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#  
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++: ${UTIL_VSERVER_VARS:=/usr/share/util-vserver/util-vserver-vars}
++test -e "$UTIL_VSERVER_VARS" || {
++    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
++    exit 1
++}
++. "$UTIL_VSERVER_VARS"
++. "$_LIB_FUNCTIONS"
++
++
++function showHelp()
++{
++    echo \
++$"Usage: $0 <vserver-name>* [--all] -- <params>+
++
++Report bugs to <$PACKAGE_BUGREPORT>."
++    exit 0
++}
++
++function showVersion()
++{
++    echo \
++$"vpoldek $PACKAGE_VERSION -- poldek for vservers
++This program is part of $PACKAGE_STRING
++
++Copyright (C) 2007 Enrico Scholz
++This program is free software; you may redistribute it under the terms of
++the GNU General Public License.  This program has absolutely no warranty."
++    exit 0
++}
++
++tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
++eval set -- "$tmp"
++
++declare -a send_through poldek_opts
++
++while true; do
++    case "$1" in
++        (--help)        showHelp $0 ;;
++        (--version)     showVersion ;;
++        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
++        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
++        (--all)         poldek_opts=( "${poldek_opts[@]}" "$1" );;
++        (--)            shift; break;;
++        (*)             echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
++    esac
++    shift
++done
++
++VSOMETHING_TITLE=vpoldek
++VSOMETHING_WORKER=$_VPOLDEK_WORKER
++VSOMETHING_PKGMGMT=1
++
++export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
++
++test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
++exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vpoldek-worker util-vserver-0.30.216-pre3126/scripts/vpoldek-worker
+--- util-vserver-0.30.216-pre3126.org/scripts/vpoldek-worker   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vpoldek-worker       2021-03-12 21:50:25.807681091 +0100
+@@ -0,0 +1,45 @@
++#! /bin/bash
++# $Id$
++
++# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
++#  
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; version 2 of the License.
++#  
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#  
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++set -e
++
++: ${UTIL_VSERVER_VARS:=/usr/share/util-vserver/util-vserver-vars}
++test -e "$UTIL_VSERVER_VARS" || {
++    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
++    exit 1
++}
++. "$UTIL_VSERVER_VARS"
++. "$_LIB_FUNCTIONS"
++
++
++vserver="$1"
++shift
++
++pkgInit "$vserver" rpm poldek
++
++test -z "$_POLDEK" || {
++    warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
++    ${POLDEK:=$_POLDEK}
++}
++
++exec ${_POLDEK:-poldek} \
++      -v --root=$VDIR \
++      --cachedir=$POLDEKCACHEDIR \
++      --conf=$POLDEK_CONFIG \
++      --pmcmd=$RPM_BINARY \
++      "$@"
+diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vserver-build util-vserver-0.30.216-pre3126/scripts/vserver-build
+--- util-vserver-0.30.216-pre3126.org/scripts/vserver-build    2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vserver-build        2021-03-12 21:50:25.807681091 +0100
+@@ -60,6 +60,9 @@ Possible methods are:
+                 ...  installs the base-packages of the given distribution with
+                    help of 'vyum'
+     urpmi       ... -- -d <distribution> -m <mirror>
++    poldek      ... -- -d <distribution>
++                ...  installs the base-packages of the given distribution with
++                   help of 'vpoldek'
+     rpm         ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
+                 ...  installs lists of rpm-packages
+     skeleton    ... -- [<cmd> <args>*]
+@@ -142,7 +145,7 @@ setup_setDefaults "$VSERVER_NAME"
+ case x"$method" in
+     (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
+-    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi)
++    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi|xpoldek)
+               . $__PKGDATADIR/vserver-build.$method
+               ;;
+     (x)               panic $"No build-method specified";;
+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
+--- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions  2016-02-24 19:09:17.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vserver-build.functions      2021-03-12 21:50:25.807681091 +0100
+@@ -173,6 +173,12 @@ function getDistribution
+       elif test -e /etc/slackware-version; then
+           set -- $(cat /etc/slackware-version)
+           DISTRIBUTION=slackware$2
++      elif test -e /etc/pld-release; then
++          old_IFS=$IFS
++          IFS='()'
++          set -- $(cat /etc/pld-release)
++          DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
++          IFS=$old_IFS
+       elif test -n "$1"; then
+           DISTRIBUTION=$1
+       else
+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
+--- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.functions.poldek   1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vserver-build.functions.poldek       2021-03-12 21:50:25.807681091 +0100
+@@ -0,0 +1,83 @@
++# $Id$        --*- sh -*--
++
++# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
++#  
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; version 2 of the License.
++#  
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#  
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++function poldek.installBasePackages
++{
++    local name="$1"
++    local dir="$2"
++
++    test "$dir" != / || return 0
++    for filelist in "$dir"/*; do
++      isRegularFile "$filelist" || continue
++      local idx=0
++      local can_fail=false
++      local flags='--install'
++
++      set -- $(<$filelist)
++      while test "$#" -gt 0; do
++          case "$1" in
++              --reinstall) flags='--reinstall';;
++              --can-fail)  can_fail=true;;
++              *)           break;;
++          esac
++          shift
++      done
++      "$_VPOLDEK" "$name" -- $flags $* || $can_fail
++    done
++}
++
++function poldek.initVariables
++{
++    findFile POLDEKCONFDEFAULT \
++      "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
++      "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
++      "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
++      "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
++      ''
++}
++
++function poldek.initFilesystem
++{
++    mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
++
++    $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
++
++    populateDirectory "$PKGCFGDIR/poldek/etc" \
++      "$__DISTRIBDIR/defaults/poldek" \
++      "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
++      "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
++
++    populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
++      "$__DISTRIBDIR/defaults/poldek/repos.d" \
++      "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
++      "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
++
++      if [ -n "$SETUP_MACHINE" ]; then
++              say "Using $SETUP_MACHINE as machine"
++              sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
++      fi
++
++      if [ -n "$MIRROR" ]; then
++              say "Using $MIRROR as mirror URL"
++              sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
++      fi
++
++      if [ "$DISTRIBUTION" = "pld-ac" ]; then
++              echo 'auto directory dependencies = no' >>  "$PKGCFGDIR"/poldek/etc/poldek.conf
++              echo '%_check_dirname_deps 0' >> "$PKGCFGDIR"/rpm/etc/macros
++      fi
++}
+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
+--- util-vserver-0.30.216-pre3126.org/scripts/vserver-build.poldek     1970-01-01 01:00:00.000000000 +0100
++++ util-vserver-0.30.216-pre3126/scripts/vserver-build.poldek 2021-03-12 21:50:25.807681091 +0100
+@@ -0,0 +1,65 @@
++# $Id$        --*- sh -*--
++
++# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
++#  
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; version 2 of the License.
++#  
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#  
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
++eval set -- "$tmp"
++
++. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
++. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
++. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
++
++while true; do
++    case "$1" in
++      (-d)            DISTRIBUTION=$2; shift;;
++      (-m)            MIRROR=$2; shift;;
++      (--debug)       set -x;;
++      (--)            shift; break ;;
++      (*)             echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
++                      exit 1
++                      ;;
++    esac
++    shift
++done
++
++getDistribution
++
++base.init
++
++pkgmgmt.initVariables
++rpm.initVariables
++poldek.initVariables
++
++base.initFilesystem    "$OPTION_FORCE"
++pkgmgmt.initFilesystem "$OPTION_FORCE"
++rpm.initFilesystem
++poldek.initFilesystem
++
++setup_writeOption "$VSERVER_NAME"
++setup_writeInitialFstab
++
++test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
++rpm.initDB          "$SETUP_CONFDIR"
++rpm.importGPGPubKeys "$SETUP_CONFDIR" \
++      "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
++      "$__CONFDIR/.distributions/.common/pubkeys" \
++      "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
++
++$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
++poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
++test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
++
++base.setSuccess
This page took 0.054863 seconds and 4 git commands to generate.