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