]> git.pld-linux.org Git - packages/util-vserver.git/blame_incremental - util-vserver-pld.patch
- install re-entrant now
[packages/util-vserver.git] / util-vserver-pld.patch
... / ...
CommitLineData
1--- util-vserver-0.30.216-r2837.orig/distrib/defaults/poldek/poldek.conf 1970-01-01 01:00:00.000000000 +0100
2+++ util-vserver-0.30.216-r2837/distrib/defaults/poldek/poldek.conf 2009-06-22 17:48:26.000000000 +0200
3@@ -0,0 +1,11 @@
4+# poldek configuration file.
5+
6+%includedir repos.d
7+
8+[global]
9+particle install = no
10+choose equivalents manually = yes
11+unique package names = yes
12+
13+#hold =
14+ignore = kernel* udev devfs
15--- util-vserver-0.30.216-r2837.orig/distrib/Makefile.am 2009-06-22 17:36:52.000000000 +0200
16+++ util-vserver-0.30.216-r2837/distrib/Makefile.am 2009-06-22 17:49:36.000000000 +0200
17@@ -45,6 +45,7 @@
18 defaults/apt.conf \
19 defaults/rpm/macros \
20 defaults/apt/apt.conf \
21+ defaults/poldek/poldek.conf \
22 template/initpost template/initpre \
23 rh9/apt/rpmpriorities rh9/pkgs/01 rh9/pkgs/02 \
24 fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \
25@@ -85,7 +86,9 @@
26 suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \
27 suse91/rpm/macros \
28 gentoo/init-vserver.sh gentoo/net.vserver \
29- gentoo/reboot.sh gentoo/shutdown.sh
30+ gentoo/reboot.sh gentoo/shutdown.sh\
31+ pld-ac/pkgs/01 pld-ac/rpm/macros \
32+ pld-th/pkgs/01 pld-th/rpm/macros
33
34 nobase_confdistrib_DATA = rh9/apt/sources.list \
35 fc1/apt/sources.list \
36@@ -95,7 +99,9 @@
37 fc5/apt/sources.list \
38 fc6/apt/sources.list \
39 f7/apt/sources.list \
40- suse91/apt/sources.list
41+ suse91/apt/sources.list \
42+ pld-ac/poldek/repos.d/pld.conf \
43+ pld-th/poldek/repos.d/pld.conf
44
45 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
46 = $(nobase_distrib_SCRIPTS)
47--- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/pkgs/01 1970-01-01 01:00:00.000000000 +0100
48+++ util-vserver-0.30.216-r2837/distrib/pld-ac/pkgs/01 2009-06-22 17:48:26.000000000 +0200
49@@ -0,0 +1,6 @@
50+basesystem
51+filesystem
52+glibc-misc
53+issue
54+rpm-base
55+vserver-packages
56--- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
57+++ util-vserver-0.30.216-r2837/distrib/pld-ac/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
58@@ -0,0 +1,64 @@
59+# $Id$
60+# PLD Linux Distribution <http://www.pld-linux.org/>.
61+#
62+# Main sources for PLD Linux 2.0 (Ac)
63+
64+# specify our packages architecture
65+_arch = %ARCH%
66+
67+# main PLD-site for often changed things:
68+_pld_main_prefix = ftp://ftp.ac.pld-linux.org/dists/ac
69+
70+## Some mirrors
71+## You can use them if you have better connection there
72+# CI TASK:
73+#_prefix = ftp://ftp.task.pld-linux.org/dists/ac
74+_prefix = %{_pld_main_prefix}
75+
76+_type = pndir
77+
78+# PLD Linux 2.0 (Ac)
79+[source]
80+type = %{_type}
81+name = ac-main
82+path = %{_prefix}/PLD/%{_arch}/PLD/RPMS/
83+signed = yes
84+pri = 1
85+# msmtp-sendmail is broken, yum noarch is older than in updates
86+ignore = msmtp-sendmail* yum*
87+
88+[source]
89+type = %{_type}
90+name = ac-updates
91+path = %{_prefix}/updates/%{_arch}/
92+signed = yes
93+pri = 1
94+
95+[source]
96+type = %{_type}
97+name = ac-supported
98+path = %{_prefix}/supported/%{_arch}/
99+signed = yes
100+auto = no
101+autoup = no
102+
103+[source]
104+type = %{_type}
105+name = ac-ready
106+path = %{_pld_main_prefix}/ready/%{_arch}/
107+#signed = yes
108+auto = no
109+autoup = no
110+
111+[source]
112+type = %{_type}
113+name = ac-test
114+path = %{_pld_main_prefix}/test/%{_arch}/
115+auto = no
116+autoup = no
117+
118+# ac-main + ac-updates
119+[source]
120+type = group
121+name = ac
122+sources = ac-main ac-updates
123--- util-vserver-0.30.216-r2837.orig/distrib/pld-ac/rpm/macros 1970-01-01 01:00:00.000000000 +0100
124+++ util-vserver-0.30.216-r2837/distrib/pld-ac/rpm/macros 2009-06-22 17:48:26.000000000 +0200
125@@ -0,0 +1,6 @@
126+# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
127+# you have to use at least one language beside 'C'
128+%_install_langs C:en:pl
129+%_netsharedpath /dev:/proc
130+%_tmppath /tmp
131+%_host_os %_os
132--- util-vserver-0.30.216-r2837.orig/distrib/pld-th/pkgs/01 1970-01-01 01:00:00.000000000 +0100
133+++ util-vserver-0.30.216-r2837/distrib/pld-th/pkgs/01 2009-06-22 17:48:26.000000000 +0200
134@@ -0,0 +1,6 @@
135+basesystem
136+filesystem
137+glibc-misc
138+issue
139+rpm-base
140+vserver-packages
141--- util-vserver-0.30.216-r2837.orig/distrib/pld-th/poldek/repos.d/pld.conf 1970-01-01 01:00:00.000000000 +0100
142+++ util-vserver-0.30.216-r2837/distrib/pld-th/poldek/repos.d/pld.conf 2009-06-22 17:48:26.000000000 +0200
143@@ -0,0 +1,71 @@
144+# PLD Linux Distribution <http://www.pld-linux.org/>.
145+#
146+# Main sources for PLD Linux 3.0 (Th)
147+
148+# specify our packages architecture
149+_arch = %ARCH%
150+
151+# main PLD-site for often changed things (test, ready):
152+_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th
153+
154+## Some mirrors
155+## You can use them if you have better connection there
156+# CI TASK:
157+#_prefix = ftp://ftp.task.pld-linux.org/dists/th
158+_prefix = %{_pld_main_prefix}
159+
160+# PLD Linux 3.0 (Th): main sources
161+[source]
162+type = pndir
163+name = th
164+path = %{_prefix}/PLD/%{_arch}/RPMS/
165+
166+[source]
167+type = pndir
168+name = th
169+path = %{_prefix}/PLD/noarch/RPMS/
170+
171+# PLD Linux 3.0 (Th): obsolete sources (kde3, ...)
172+[source]
173+type = pndir
174+name = th-obsolete
175+path = %{_prefix}/obsolete/%{_arch}/RPMS/
176+auto = no
177+autoup = no
178+
179+[source]
180+type = pndir
181+name = th-obsolete
182+path = %{_prefix}/obsolete/noarch/RPMS/
183+auto = no
184+autoup = no
185+
186+# PLD Linux 3.0 (Th): ready sources (testing stage before moved to main)
187+[source]
188+type = pndir
189+name = th-ready
190+path = %{_pld_main_prefix}/ready/%{_arch}/RPMS/
191+auto = no
192+autoup = no
193+
194+[source]
195+type = pndir
196+name = th-ready
197+path = %{_pld_main_prefix}/ready/noarch/RPMS/
198+auto = no
199+autoup = no
200+
201+# PLD Linux 3.0 (Th): test sources (built packages to be moved to ready)
202+[source]
203+type = pndir
204+name = th-test
205+path = %{_pld_main_prefix}/test/%{_arch}/RPMS/
206+auto = no
207+autoup = no
208+
209+[source]
210+type = pndir
211+name = th-test
212+path = %{_pld_main_prefix}/test/noarch/RPMS/
213+auto = no
214+autoup = no
215--- util-vserver-0.30.216-r2837.orig/distrib/pld-th/rpm/macros 1970-01-01 01:00:00.000000000 +0100
216+++ util-vserver-0.30.216-r2837/distrib/pld-th/rpm/macros 2009-06-22 17:48:26.000000000 +0200
217@@ -0,0 +1,6 @@
218+# Because of https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=52725
219+# you have to use at least one language beside 'C'
220+%_install_langs C:en:pl
221+%_netsharedpath /dev:/proc
222+%_tmppath /tmp
223+%_host_os %_os
224--- util-vserver-0.30.216-r2837.orig/scripts/functions 2009-06-22 17:36:35.000000000 +0200
225+++ util-vserver-0.30.216-r2837/scripts/functions 2009-06-22 17:48:26.000000000 +0200
226@@ -403,6 +403,20 @@
227 fi
228 }
229
230+function _pkgSetVarsPoldek
231+{
232+ if test -n "$PKGDIR"; then
233+ findDir POLDEKETCDIR $PKGDIR/poldeketc $PKGDIR/base/poldek/etc /etc/poldek
234+ findDir POLDEKCACHEDIR $PKGDIR/poldek-cache $PKGDIR/base/poldek/cache
235+ else
236+ findDir POLDEKETCDIR "$VDIR"/etc/poldek /etc/poldek
237+ findDir POLDEKCACHEDIR "$VDIR"/var/tmp/poldek-cache
238+ fi
239+
240+ findFile POLDEK_CONFIG "$POLDEKETCDIR"/poldek.conf ""
241+ test -z "$POLDEK_CONFIG" || export POLDEK_CONFIG
242+}
243+
244
245 function _pkgMountBase
246 {
247@@ -476,6 +490,7 @@
248 apt) _pkgSetVarsApt;;
249 yum) _pkgSetVarsYum;;
250 urpmi) _pkgSetVarsUrpmi;;
251+ poldek) _pkgSetVarsPoldek;;
252 *) echo "Unknown packaging flavor" >&2; exit 1;;
253 esac
254 done
255@@ -770,6 +785,8 @@
256 style=redhat
257 elif test -e "$_pgs_vdir"/etc/mandrake-release; then
258 style=mandrake
259+ elif test -e "$_pgs_vdir"/etc/pld-release; then
260+ style=pld
261 elif test -e "$_pgs_vdir"/etc/debian_version; then
262 style=debian
263 elif test -e "$_pgs_vdir"/etc/SuSE-release; then
264@@ -837,6 +854,27 @@
265 test -n "$have_yum" && return 0 || return 1
266 }
267
268+## Usage: pkgmgmt.isPoldekAvailable <cfgdir> <vdir> [<is-internal>]
269+function pkgmgmt.isPoldekAvailable
270+{
271+ local cfgdir="$1"
272+ local vdir="$2"
273+ local is_internal="$3"
274+
275+ local have_poldek i
276+ if test -n "$is_internal"; then
277+ have_poldek=1
278+ test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
279+ else
280+ have_poldek=
281+ for i in /bin /usr/bin /usr/local/bin; do
282+ test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
283+ done
284+ fi
285+
286+ test -n "$have_poldek" && return 0 || return 1
287+}
288+
289
290 function vshelper.doSanityCheck
291 {
292--- util-vserver-0.30.216-r2837.orig/scripts/Makefile-files 2009-06-22 17:36:35.000000000 +0200
293+++ util-vserver-0.30.216-r2837/scripts/Makefile-files 2009-06-22 17:48:26.000000000 +0200
294@@ -21,6 +21,7 @@
295 scripts/vapt-get-worker \
296 scripts/vrpm-worker \
297 scripts/vyum-worker \
298+ scripts/vpoldek-worker \
299 scripts/vrpm-preload \
300 scripts/save_s_context \
301 scripts/vservers.grabinfo.sh \
302@@ -48,12 +49,14 @@
303 scripts/vserver-build.template \
304 scripts/vserver-build.rsync \
305 scripts/vserver-build.clone \
306+ scripts/vserver-build.poldek \
307 scripts/vserver-build.functions \
308 scripts/vserver-build.functions.apt \
309 scripts/vserver-build.functions.pkgmgmt \
310 scripts/vserver-build.functions.rpm \
311 scripts/vserver-build.functions.urpmi \
312 scripts/vserver-build.functions.yum \
313+ scripts/vserver-build.functions.poldek \
314 scripts/vserver-setup.functions \
315 scripts/vserver.functions \
316 scripts/vserver.start \
317@@ -66,6 +69,7 @@
318 scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \
319 scripts/vapt-get-worker \
320 scripts/vpkg \
321+ scripts/vpoldek-worker \
322 scripts/vrpm-worker \
323 scripts/vrpm-preload \
324 scripts/start-vservers \
325@@ -89,6 +93,7 @@
326 scripts_sbin_src_PRGS = scripts/chbind \
327 scripts/chcontext \
328 scripts/vapt-get \
329+ scripts/vpoldek \
330 scripts/vdispatch-conf \
331 scripts/vemerge \
332 scripts/vesync \
333--- util-vserver-0.30.216-r2837.orig/scripts/pkgmgmt 2009-06-22 17:36:34.000000000 +0200
334+++ util-vserver-0.30.216-r2837/scripts/pkgmgmt 2009-06-22 17:48:26.000000000 +0200
335@@ -195,7 +195,7 @@
336 "
337
338 case $2 in
339- (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}")
340+ (RH) pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi poldek "${YUM_RELEASEPKGS[@]}")
341 hasSubstring "$pkgs" ---rpm--- || {
342 warning "$ERR
343 * The vserver does not seem to have the 'rpm' package which is required
344@@ -205,9 +205,9 @@
345 ERR=
346 }
347
348- hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- || {
349+ hasSubstring "$pkgs" ---apt--- ---yum--- ---urpmi--- ---poldek--- || {
350 warning "$ERR
351-* The vserver does not seem to have a depsolver like 'apt' or 'yum'
352+* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
353 installed. It is suggested to install such a program before setting
354 up internal package management."
355 res=1
356@@ -368,6 +368,131 @@
357 fi
358 }
359
360+function processVserver_PLD()
361+{
362+ local vserver=$1
363+ local is_internalize=$2
364+ local cfgdir
365+ local i
366+
367+ cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
368+ cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
369+
370+ ## Figure out the environment....
371+ pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
372+
373+ local POLDEKETCDIR=
374+ local POLDEKCACHEDIR=
375+ local RPMETCDIR=
376+ local RPMSTATEDIR=
377+
378+ ## Create directories and assign variables where configuration
379+ ## can/will be found on the host
380+ if test -n "$is_internalize"; then
381+ verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
382+ panic "
383+Can not continue; use '--force' to override this check"
384+
385+ pushd "$vdir" >/dev/null
386+
387+ test ! -L var/lib/rpm || {
388+ $_EXEC_CD /var/lib $_RM rpm &&
389+ $_EXEC_CD /var/lib $_MKDIR -m755 rpm &&
390+ $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
391+ :
392+ } </dev/null 2>/dev/null
393+
394+ for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
395+ test -d "$i" ||
396+ $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
397+ done #2>/dev/null
398+
399+ popd >/dev/null
400+
401+ if test -n "$have_poldek"; then
402+ findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
403+ fi
404+
405+ findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /etc/rpm /
406+ findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
407+ else
408+ mkdir -m755 -p "$cfgdir"
409+ local need_base=
410+
411+ if test -n "$have_poldek"; then
412+ findDir POLDEKETCDIR "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /
413+ findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache /
414+
415+ test "$POLDEKETCDIR" != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
416+ test "$POLDEKCACHEDIR" != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
417+
418+ test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
419+ fi
420+
421+ findDir RPMETCDIR "$cfgdir"/rpmetc "$cfgdir"/base/rpm/etc /
422+ findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state /
423+
424+ test "$RPMETCDIR" != / || RPMETCDIR=$cfgdir/base/rpm/etc
425+ test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
426+
427+ test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
428+ test ! -e "$cfgdir"/base || need_base=
429+
430+ test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
431+
432+ mkdir -m755 -p "$PKGCFGDIR"
433+ _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
434+ "$RPMETCDIR" "$RPMSTATEDIR"
435+ fi
436+
437+ ## Copy the files...
438+ if test -n "$is_internalize"; then
439+ if test -n "$have_poldek"; then
440+ _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
441+ pushd "$vdir" >/dev/null
442+ _hashAuto /etc/poldek.conf '/'
443+ popd >/dev/null
444+ fi
445+
446+ _copySecure "$vdir" "$RPMETCDIR" /etc/rpm
447+ _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
448+
449+ pushd "$vdir" >/dev/null
450+ ## remove %_dbpath settings
451+ _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
452+ popd >/dev/null
453+ else
454+ if test -n "$have_poldek"; then
455+ _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
456+ _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
457+ fi
458+
459+ _copySecureRev "$vdir" /etc/rpm "$RPMETCDIR"
460+ _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
461+
462+ echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
463+ fi
464+
465+ ## Cleanups...
466+ if test -n "$is_internalize"; then
467+ :
468+ else
469+ tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
470+ trap "$_RM -rf $tmpdir" EXIT
471+ pushd "$vdir" >/dev/null
472+ $_EXEC_CD /var/lib $_MV rpm $tmpdir/
473+ $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
474+ $_RM -rf $tmpdir
475+ fi
476+
477+ ## Finish it...
478+ if test -n "$is_internalize"; then
479+ $_TOUCH "$cfgdir"/internal
480+ else
481+ $_RM -f "$cfgdir"/internal
482+ fi
483+}
484+
485 function processVserver_Debian()
486 {
487 local vserver=$1
488@@ -422,6 +547,7 @@
489
490 case "$style" in
491 (redhat|mandrake) processVserver_RH "$vserver" "$IS_INTERNALIZE";;
492+ (pld) processVserver_PLD "$vserver" "$IS_INTERNALIZE";;
493 (debian) processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
494 (*)
495 echo $"Vserver style '$style' is not supported for packagemanagment" >&2
496--- util-vserver-0.30.216-r2837.orig/scripts/util-vserver-vars.pathsubst 2009-06-22 17:36:34.000000000 +0200
497+++ util-vserver-0.30.216-r2837/scripts/util-vserver-vars.pathsubst 2009-06-22 17:48:26.000000000 +0200
498@@ -54,6 +54,7 @@
499 _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
500 _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
501 _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
502+_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
503 _LISTDEVIP="$__LEGACYDIR/listdevip"
504 _LOCKFILE="$__PKGLIBDIR/lockfile"
505 _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
506@@ -109,6 +110,8 @@
507 _VUNIFY="$__PKGLIBDIR/vunify"
508 _VYUM="$__SBINDIR/vyum"
509 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
510+_VPOLDEK="$__SBINDIR/vpoldek"
511+_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
512
513 _AWK="@AWK@"
514 _BZIP2="@BZIP2@"
515--- util-vserver-0.30.216-r2837.orig/scripts/vpkg 2009-06-22 17:36:34.000000000 +0200
516+++ util-vserver-0.30.216-r2837/scripts/vpkg 2009-06-22 17:48:26.000000000 +0200
517@@ -115,6 +115,44 @@
518 fi
519 fi
520 ;;
521+ (pld)
522+ rpm_param=
523+ poldek_param=
524+ case "$tag" in
525+ ## rpm outputs sometimes '(contains no files)', so return
526+ ## only the valid output
527+ (get-conffiles)
528+ rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
529+ (install)
530+ rpm_param=( -Uvh "$@" )
531+ poldek_param=( --install -v "$@" )
532+ ;;
533+ esac
534+
535+ if test -n "$is_external"; then
536+ have_poldek=1
537+ test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
538+ else
539+ have_poldek=
540+ for i in /bin /usr/bin /usr/local/bin; do
541+ test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
542+ done
543+ fi
544+
545+ if test -n "$is_external"; then
546+ if test "$have_poldek" -a "$poldek_param"; then
547+ cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
548+ else
549+ cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
550+ fi
551+ else
552+ if test "$have_poldek" -a "$poldek_param"; then
553+ cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
554+ else
555+ cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
556+ fi
557+ fi
558+ ;;
559 (debian)
560 case "$tag" in
561 (get-conffiles)
562--- util-vserver-0.30.216-r2837.orig/scripts/vpoldek 1970-01-01 01:00:00.000000000 +0100
563+++ util-vserver-0.30.216-r2837/scripts/vpoldek 2009-06-22 17:48:26.000000000 +0200
564@@ -0,0 +1,74 @@
565+#! /bin/bash
566+# $Id$
567+
568+# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
569+#
570+# This program is free software; you can redistribute it and/or modify
571+# it under the terms of the GNU General Public License as published by
572+# the Free Software Foundation; version 2 of the License.
573+#
574+# This program is distributed in the hope that it will be useful,
575+# but WITHOUT ANY WARRANTY; without even the implied warranty of
576+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
577+# GNU General Public License for more details.
578+#
579+# You should have received a copy of the GNU General Public License
580+# along with this program; if not, write to the Free Software
581+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
582+
583+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
584+test -e "$UTIL_VSERVER_VARS" || {
585+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
586+ exit 1
587+}
588+. "$UTIL_VSERVER_VARS"
589+. "$_LIB_FUNCTIONS"
590+
591+
592+function showHelp()
593+{
594+ echo \
595+$"Usage: $0 <vserver-name>* [--all] -- <params>+
596+
597+Report bugs to <$PACKAGE_BUGREPORT>."
598+ exit 0
599+}
600+
601+function showVersion()
602+{
603+ echo \
604+$"vpoldek $PACKAGE_VERSION -- poldek for vservers
605+This program is part of $PACKAGE_STRING
606+
607+Copyright (C) 2007 Enrico Scholz
608+This program is free software; you may redistribute it under the terms of
609+the GNU General Public License. This program has absolutely no warranty."
610+ exit 0
611+}
612+
613+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
614+eval set -- "$tmp"
615+
616+declare -a send_through poldek_opts
617+
618+while true; do
619+ case "$1" in
620+ (--help) showHelp $0 ;;
621+ (--version) showVersion ;;
622+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;;
623+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );;
624+ (--all) poldek_opts=( "${poldek_opts[@]}" "$1" );;
625+ (--) shift; break;;
626+ (*) echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
627+ esac
628+ shift
629+done
630+
631+VSOMETHING_TITLE=vpoldek
632+VSOMETHING_WORKER=$_VPOLDEK_WORKER
633+VSOMETHING_PKGMGMT=1
634+
635+export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
636+
637+test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
638+exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
639--- util-vserver-0.30.216-r2837.orig/scripts/vpoldek-worker 1970-01-01 01:00:00.000000000 +0100
640+++ util-vserver-0.30.216-r2837/scripts/vpoldek-worker 2009-06-22 17:48:26.000000000 +0200
641@@ -0,0 +1,45 @@
642+#! /bin/bash
643+# $Id$
644+
645+# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
646+#
647+# This program is free software; you can redistribute it and/or modify
648+# it under the terms of the GNU General Public License as published by
649+# the Free Software Foundation; version 2 of the License.
650+#
651+# This program is distributed in the hope that it will be useful,
652+# but WITHOUT ANY WARRANTY; without even the implied warranty of
653+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
654+# GNU General Public License for more details.
655+#
656+# You should have received a copy of the GNU General Public License
657+# along with this program; if not, write to the Free Software
658+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
659+
660+set -e
661+
662+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
663+test -e "$UTIL_VSERVER_VARS" || {
664+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
665+ exit 1
666+}
667+. "$UTIL_VSERVER_VARS"
668+. "$_LIB_FUNCTIONS"
669+
670+
671+vserver="$1"
672+shift
673+
674+pkgInit "$vserver" rpm poldek
675+
676+test -z "$_POLDEK" || {
677+ warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
678+ ${POLDEK:=$_POLDEK}
679+}
680+
681+exec ${_POLDEK:-poldek} \
682+ -v --root=$VDIR \
683+ --cachedir=$POLDEKCACHEDIR \
684+ --conf=$POLDEK_CONFIG \
685+ --pmcmd=$RPM_BINARY \
686+ "$@"
687--- util-vserver-0.30.216-r2837.orig/scripts/vserver-build 2009-06-22 17:36:34.000000000 +0200
688+++ util-vserver-0.30.216-r2837/scripts/vserver-build 2009-06-22 17:48:26.000000000 +0200
689@@ -57,6 +57,9 @@
690 ... installs the base-packages of the given distribution with
691 help of 'vyum'
692 urpmi ... -- -d <distribution> -m <mirror>
693+ poldek ... -- -d <distribution>
694+ ... installs the base-packages of the given distribution with
695+ help of 'vpoldek'
696 rpm ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
697 ... installs lists of rpm-packages
698 skeleton ... -- [<cmd> <args>*]
699@@ -136,7 +139,7 @@
700
701 case x"$method" in
702 (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
703- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi)
704+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi|xpoldek)
705 . $__PKGLIBDIR/vserver-build.$method
706 ;;
707 (x) panic $"No build-method specified";;
708--- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions 2009-06-22 17:36:35.000000000 +0200
709+++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions 2009-06-22 17:48:26.000000000 +0200
710@@ -170,6 +170,12 @@
711 elif test -e /etc/slackware-version; then
712 set -- $(cat /etc/slackware-version)
713 DISTRIBUTION=slackware$2
714+ elif test -e /etc/pld-release; then
715+ old_IFS=$IFS
716+ IFS='()'
717+ set -- $(cat /etc/pld-release)
718+ DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
719+ IFS=$old_IFS
720 elif test -n "$1"; then
721 DISTRIBUTION=$1
722 else
723--- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions.poldek 1970-01-01 01:00:00.000000000 +0100
724+++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions.poldek 2009-06-22 17:48:26.000000000 +0200
725@@ -0,0 +1,81 @@
726+# $Id$ --*- sh -*--
727+
728+# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
729+#
730+# This program is free software; you can redistribute it and/or modify
731+# it under the terms of the GNU General Public License as published by
732+# the Free Software Foundation; version 2 of the License.
733+#
734+# This program is distributed in the hope that it will be useful,
735+# but WITHOUT ANY WARRANTY; without even the implied warranty of
736+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
737+# GNU General Public License for more details.
738+#
739+# You should have received a copy of the GNU General Public License
740+# along with this program; if not, write to the Free Software
741+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
742+
743+function poldek.installBasePackages
744+{
745+ local name="$1"
746+ local dir="$2"
747+
748+ test "$dir" != / || return 0
749+ for filelist in "$dir"/*; do
750+ isRegularFile "$filelist" || continue
751+ local idx=0
752+ local can_fail=false
753+ local flags='--install'
754+
755+ set -- $(<$filelist)
756+ while test "$#" -gt 0; do
757+ case "$1" in
758+ --reinstall) flags='--reinstall';;
759+ --can-fail) can_fail=true;;
760+ *) break;;
761+ esac
762+ shift
763+ done
764+ "$_VPOLDEK" "$name" -- $flags $* || $can_fail
765+ done
766+}
767+
768+function poldek.initVariables
769+{
770+ findFile POLDEKCONFDEFAULT \
771+ "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
772+ "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
773+ "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
774+ "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
775+ ''
776+}
777+
778+function poldek.initFilesystem
779+{
780+ mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
781+
782+ $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
783+
784+ populateDirectory "$PKGCFGDIR/poldek/etc" \
785+ "$__DISTRIBDIR/defaults/poldek" \
786+ "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
787+ "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
788+
789+ populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
790+ "$__DISTRIBDIR/defaults/poldek/repos.d" \
791+ "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
792+ "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
793+
794+ if [ -n "$SETUP_MACHINE" ]; then
795+ say "Using $SETUP_MACHINE as machine"
796+ sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
797+ fi
798+
799+ if [ -n "$MIRROR" ]; then
800+ say "Using $MIRROR as mirror URL"
801+ sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
802+ fi
803+
804+# test -z "$POLDEKCONFDEFAULT" || \
805+# $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
806+}
807--- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.poldek 1970-01-01 01:00:00.000000000 +0100
808+++ util-vserver-0.30.216-r2837/scripts/vserver-build.poldek 2009-06-22 17:48:26.000000000 +0200
809@@ -0,0 +1,65 @@
810+# $Id$ --*- sh -*--
811+
812+# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
813+#
814+# This program is free software; you can redistribute it and/or modify
815+# it under the terms of the GNU General Public License as published by
816+# the Free Software Foundation; version 2 of the License.
817+#
818+# This program is distributed in the hope that it will be useful,
819+# but WITHOUT ANY WARRANTY; without even the implied warranty of
820+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
821+# GNU General Public License for more details.
822+#
823+# You should have received a copy of the GNU General Public License
824+# along with this program; if not, write to the Free Software
825+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
826+
827+tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
828+eval set -- "$tmp"
829+
830+. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
831+. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
832+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
833+
834+while true; do
835+ case "$1" in
836+ (-d) DISTRIBUTION=$2; shift;;
837+ (-m) MIRROR=$2; shift;;
838+ (--debug) set -x;;
839+ (--) shift; break ;;
840+ (*) echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
841+ exit 1
842+ ;;
843+ esac
844+ shift
845+done
846+
847+getDistribution
848+
849+base.init
850+
851+pkgmgmt.initVariables
852+rpm.initVariables
853+poldek.initVariables
854+
855+base.initFilesystem "$OPTION_FORCE"
856+pkgmgmt.initFilesystem "$OPTION_FORCE"
857+rpm.initFilesystem
858+poldek.initFilesystem
859+
860+setup_writeOption "$VSERVER_NAME"
861+setup_writeInitialFstab
862+
863+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
864+rpm.initDB "$SETUP_CONFDIR"
865+rpm.importGPGPubKeys "$SETUP_CONFDIR" \
866+ "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
867+ "$__CONFDIR/.distributions/.common/pubkeys" \
868+ "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
869+
870+$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
871+poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
872+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
873+
874+base.setSuccess
This page took 0.053483 seconds and 4 git commands to generate.