]> git.pld-linux.org Git - packages/util-vserver.git/blob - util-vserver-pld.patch
- Titanium is no longer part of PLD, moved to separate patch and separate
[packages/util-vserver.git] / util-vserver-pld.patch
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,11 +49,13 @@
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.rpm \
310                                 scripts/vserver-build.functions.pkgmgmt \
311                                 scripts/vserver-build.functions.yum \
312 +                               scripts/vserver-build.functions.poldek \
313                                 scripts/vserver-setup.functions \
314                                 scripts/vserver.functions \
315                                 scripts/vserver.start \
316 @@ -66,6 +69,7 @@
317  scripts_pkglib_src_SCRPTS =    scripts/pkgmgmt \
318                                 scripts/vapt-get-worker \
319                                 scripts/vpkg \
320 +                               scripts/vpoldek-worker \
321                                 scripts/vrpm-worker \
322                                 scripts/vrpm-preload \
323                                 scripts/start-vservers \
324 @@ -89,6 +93,7 @@
325  scripts_sbin_src_PRGS =                scripts/chbind \
326                                 scripts/chcontext \
327                                 scripts/vapt-get \
328 +                               scripts/vpoldek \
329                                 scripts/vdispatch-conf \
330                                 scripts/vemerge \
331                                 scripts/vesync \
332 --- util-vserver-0.30.216-r2837.orig/scripts/pkgmgmt    2009-06-22 17:36:34.000000000 +0200
333 +++ util-vserver-0.30.216-r2837/scripts/pkgmgmt 2009-06-22 17:48:26.000000000 +0200
334 @@ -195,7 +195,7 @@
335  "
336      
337      case $2 in
338 -       (RH)    pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi "${YUM_RELEASEPKGS[@]}")
339 +       (RH)    pkgs=$(vrpm "$1" -- -q --qf '---%{NAME}---\n' rpm apt yum urpmi poldek "${YUM_RELEASEPKGS[@]}")
340                 hasSubstring "$pkgs" ---rpm--- || {
341                     warning "$ERR
342  * The vserver does not seem to have the 'rpm' package which is required
343 @@ -205,9 +205,9 @@
344                     ERR=
345                 }
346                 
347 -               hasSubstring "$pkgs"  ---apt--- ---yum--- ---urpmi--- || {
348 +               hasSubstring "$pkgs"  ---apt--- ---yum--- ---urpmi--- ---poldek--- || {
349                     warning "$ERR
350 -* The vserver does not seem to have a depsolver like 'apt' or 'yum'
351 +* The vserver does not seem to have a depsolver like 'apt', 'yum' or 'poldek'
352    installed. It is suggested to install such a program before setting
353    up internal package management."
354                     res=1
355 @@ -368,6 +368,131 @@
356      fi
357  }
358  
359 +function processVserver_PLD()
360 +{
361 +    local vserver=$1
362 +    local is_internalize=$2
363 +    local cfgdir
364 +    local i
365 +
366 +    cfgdir=$($_VSERVER_INFO "$vserver" APPDIR pkgmgmt) || \
367 +    cfgdir=$($_VSERVER_INFO "$vserver" APPDIR)/pkgmgmt
368 +
369 +    ## Figure out the environment....
370 +    pkgmgmt.isPoldekAvailable "$cfgdir" "$vdir" "$is_internalize" || have_poldek=
371 +
372 +    local POLDEKETCDIR=
373 +    local POLDEKCACHEDIR=
374 +    local RPMETCDIR=
375 +    local RPMSTATEDIR=
376 +
377 +    ## Create directories and assign variables where configuration
378 +    ## can/will be found on the host
379 +    if test -n "$is_internalize"; then
380 +       verifyInternalPackages "$vserver" RH || test -n "$IS_FORCE" ||
381 +           panic "
382 +Can not continue; use '--force' to override this check"
383 +    
384 +       pushd "$vdir" >/dev/null
385 +
386 +       test ! -L var/lib/rpm || {
387 +           $_EXEC_CD /var/lib $_RM            rpm &&
388 +           $_EXEC_CD /var/lib $_MKDIR -m755   rpm &&
389 +           $_EXEC_CD /var/lib $_CHOWN rpm:rpm rpm ||
390 +           :
391 +       } </dev/null 2>/dev/null
392 +
393 +       for i in var/tmp/poldek-cache etc/rpm etc/poldek; do
394 +           test -d "$i" ||
395 +               $_EXEC_CD /$(dirname "$i") $_MKDIR -m755 $(basename "$i") || :
396 +       done #2>/dev/null
397 +       
398 +       popd >/dev/null
399 +       
400 +       if test -n "$have_poldek"; then
401 +           findDir POLDEKETCDIR    "$cfgdir"/poldeketc "$cfgdir"/base/poldek/etc /etc/poldek
402 +       fi
403 +
404 +       findDir RPMETCDIR   "$cfgdir"/rpmetc   "$cfgdir"/base/rpm/etc    /etc/rpm /
405 +       findDir RPMSTATEDIR "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state
406 +    else
407 +       mkdir -m755 -p "$cfgdir"
408 +       local need_base=
409 +
410 +       if test -n "$have_poldek"; then
411 +           findDir POLDEKETCDIR   "$cfgdir"/poldeketc    "$cfgdir"/base/poldek/etc     /
412 +           findDir POLDEKCACHEDIR "$cfgdir"/poldek-cache "$cfgdir"/base/poldek/cache   /
413 +           
414 +           test "$POLDEKETCDIR"    != / || POLDEKETCDIR=$cfgdir/base/poldek/etc
415 +           test "$POLDEKCACHEDIR"  != / || POLDEKCACHEDIR=$cfgdir/base/poldek/cache
416 +
417 +           test -d "$cfgdir"/poldeketc -a -d "$cfgdir"/poldek-cache || need_base=1
418 +       fi
419 +
420 +       findDir RPMETCDIR     "$cfgdir"/rpmetc   "$cfgdir"/base/rpm/etc    /
421 +       findDir RPMSTATEDIR   "$cfgdir"/rpmstate "$cfgdir"/base/rpm/state  /
422 +
423 +       test "$RPMETCDIR"   != / || RPMETCDIR=$cfgdir/base/rpm/etc
424 +       test "$RPMSTATEDIR" != / || RPMSTATEDIR=$cfgdir/base/rpm/state
425 +
426 +       test -d "$cfgdir"/rpmetc -a -d "$cfgdir"/rpmstate || need_base=1
427 +       test ! -e "$cfgdir"/base || need_base=
428 +
429 +       test -z "$need_base" || ln -s "$PKGCFGDIR" "$cfgdir"/base
430 +
431 +       mkdir -m755 -p "$PKGCFGDIR"
432 +       _createDirs "$POLDEKETCDIR" "$POLDEKCACHEDIR" \
433 +                   "$RPMETCDIR" "$RPMSTATEDIR"
434 +    fi
435 +
436 +    ## Copy the files...
437 +    if test -n "$is_internalize"; then
438 +       if test -n "$have_poldek"; then
439 +           _copySecure "$vdir" "$POLDEKETCDIR" /etc/poldek
440 +           pushd "$vdir" >/dev/null
441 +               _hashAuto /etc/poldek.conf '/'
442 +           popd >/dev/null
443 +       fi
444 +
445 +       _copySecure "$vdir" "$RPMETCDIR"   /etc/rpm
446 +       _copySecure "$vdir" "$RPMSTATEDIR" /var/lib/rpm
447 +
448 +       pushd "$vdir" >/dev/null
449 +           ## remove %_dbpath settings
450 +           _substFile /etc/rpm/macros '/^%_dbpath[ \t].*/D'
451 +       popd >/dev/null
452 +    else
453 +       if test -n "$have_poldek"; then
454 +           _copySecureRev "$vdir" /etc/poldek "$POLDEKETCDIR"
455 +           _unhashAuto "$POLDEKETCDIR"/poldek.conf '/'
456 +       fi
457 +
458 +       _copySecureRev "$vdir" /etc/rpm     "$RPMETCDIR"
459 +       _copySecureRev "$vdir" /var/lib/rpm "$RPMSTATEDIR"
460 +
461 +       echo -e "%_dbpath\t\t$rpmdb_mntpoint" >>$RPMETCDIR/macros
462 +    fi
463 +
464 +    ## Cleanups...
465 +    if test -n "$is_internalize"; then
466 +       :
467 +    else
468 +       tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
469 +       trap "$_RM -rf $tmpdir" EXIT
470 +       pushd "$vdir" >/dev/null
471 +       $_EXEC_CD /var/lib $_MV rpm $tmpdir/
472 +       $_EXEC_CD /var/lib $_LN_S "$rpmdb_mntpoint" rpm
473 +       $_RM -rf $tmpdir
474 +    fi
475 +
476 +    ## Finish it...
477 +    if test -n "$is_internalize"; then
478 +       $_TOUCH "$cfgdir"/internal
479 +    else
480 +       $_RM -f "$cfgdir"/internal
481 +    fi
482 +}
483 +
484  function processVserver_Debian()
485  {
486      local vserver=$1
487 @@ -422,6 +547,7 @@
488  
489      case "$style" in
490         (redhat|mandrake)       processVserver_RH     "$vserver" "$IS_INTERNALIZE";;
491 +       (pld)                   processVserver_PLD    "$vserver" "$IS_INTERNALIZE";;
492         (debian)                processVserver_Debian "$vserver" "$IS_INTERNALIZE";;
493         (*)
494             echo $"Vserver style '$style' is not supported for packagemanagment" >&2
495 --- util-vserver-0.30.216-r2837.orig/scripts/util-vserver-vars.pathsubst        2009-06-22 17:36:34.000000000 +0200
496 +++ util-vserver-0.30.216-r2837/scripts/util-vserver-vars.pathsubst     2009-06-22 17:48:26.000000000 +0200
497 @@ -54,6 +54,7 @@
498  _LIB_VSERVER_BUILD_FUNCTIONS_RPM="$__PKGLIBDIR/vserver-build.functions.rpm"
499  _LIB_VSERVER_BUILD_FUNCTIONS_YUM="$__PKGLIBDIR/vserver-build.functions.yum"
500  _LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT="$__PKGLIBDIR/vserver-build.functions.pkgmgmt"
501 +_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK="$__PKGLIBDIR/vserver-build.functions.poldek"
502  _LISTDEVIP="$__LEGACYDIR/listdevip"
503  _LOCKFILE="$__PKGLIBDIR/lockfile"
504  _MASK2PREFIX="$__PKGLIBDIR/mask2prefix"
505 @@ -109,6 +110,8 @@
506  _VUNIFY="$__PKGLIBDIR/vunify"
507  _VYUM="$__SBINDIR/vyum"
508  _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
509 +_VPOLDEK="$__SBINDIR/vpoldek"
510 +_VPOLDEK_WORKER="$__PKGLIBDIR/vpoldek-worker"
511  
512  _AWK="@AWK@"
513  _BZIP2="@BZIP2@"
514 --- util-vserver-0.30.216-r2837.orig/scripts/vpkg       2009-06-22 17:36:34.000000000 +0200
515 +++ util-vserver-0.30.216-r2837/scripts/vpkg    2009-06-22 17:48:26.000000000 +0200
516 @@ -115,6 +115,44 @@
517             fi
518         fi
519         ;;
520 +    (pld)
521 +       rpm_param=
522 +       poldek_param=
523 +       case "$tag" in
524 +           ## rpm outputs sometimes '(contains no files)', so return
525 +           ## only the valid output
526 +           (get-conffiles)
527 +               rpm_param=( -qac --pipe "$_SED '\!^/!p;d'" );;
528 +           (install)
529 +               rpm_param=( -Uvh "$@" )
530 +               poldek_param=( --install -v "$@" )
531 +               ;;
532 +       esac
533 +       
534 +       if test -n "$is_external"; then
535 +           have_poldek=1
536 +           test -d "$cfgdir"/base/poldek -o -d "$cfgdir"/poldeketc || have_poldek=
537 +       else
538 +           have_poldek=
539 +           for i in /bin /usr/bin /usr/local/bin; do
540 +               test ! -x "$vdir$i"/poldek || { have_poldek=1; break; }
541 +           done
542 +       fi
543 +       
544 +       if test -n "$is_external"; then
545 +           if test "$have_poldek" -a "$poldek_param"; then
546 +               cmd=( "$_VPOLDEK" "$vserver" -- "${poldek_param[@]}" )
547 +           else
548 +               cmd=( "$_VRPM" "$vserver" -- "${rpm_param[@]}" )
549 +           fi
550 +       else
551 +           if test "$have_poldek" -a "$poldek_param"; then
552 +               cmd=( "$_VSERVER" --silent "$vserver" exec poldek "${poldek_param[@]}" )
553 +           else
554 +               cmd=( "$_VSERVER" --silent "$vserver" exec rpm "${rpm_param[@]}" )
555 +           fi
556 +       fi
557 +       ;;
558      (debian)
559         case "$tag" in
560             (get-conffiles)
561 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek    1970-01-01 01:00:00.000000000 +0100
562 +++ util-vserver-0.30.216-r2837/scripts/vpoldek 2009-06-22 17:48:26.000000000 +0200
563 @@ -0,0 +1,74 @@
564 +#! /bin/bash
565 +# $Id$
566 +
567 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
568 +#  
569 +# This program is free software; you can redistribute it and/or modify
570 +# it under the terms of the GNU General Public License as published by
571 +# the Free Software Foundation; version 2 of the License.
572 +#  
573 +# This program is distributed in the hope that it will be useful,
574 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
575 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
576 +# GNU General Public License for more details.
577 +#  
578 +# You should have received a copy of the GNU General Public License
579 +# along with this program; if not, write to the Free Software
580 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
581 +
582 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
583 +test -e "$UTIL_VSERVER_VARS" || {
584 +    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
585 +    exit 1
586 +}
587 +. "$UTIL_VSERVER_VARS"
588 +. "$_LIB_FUNCTIONS"
589 +
590 +
591 +function showHelp()
592 +{
593 +    echo \
594 +$"Usage: $0 <vserver-name>* [--all] -- <params>+
595 +
596 +Report bugs to <$PACKAGE_BUGREPORT>."
597 +    exit 0
598 +}
599 +
600 +function showVersion()
601 +{
602 +    echo \
603 +$"vpoldek $PACKAGE_VERSION -- poldek for vservers
604 +This program is part of $PACKAGE_STRING
605 +
606 +Copyright (C) 2007 Enrico Scholz
607 +This program is free software; you may redistribute it under the terms of
608 +the GNU General Public License.  This program has absolutely no warranty."
609 +    exit 0
610 +}
611 +
612 +tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1
613 +eval set -- "$tmp"
614 +
615 +declare -a send_through poldek_opts
616 +
617 +while true; do
618 +    case "$1" in
619 +        (--help)        showHelp $0 ;;
620 +        (--version)     showVersion ;;
621 +        (--debug)       send_through=( "${send_through[@]}" "$1" ); set -x;;
622 +        (--quiet|-q)    send_through=( "${send_through[@]}" "$1" );;
623 +        (--all)         poldek_opts=( "${poldek_opts[@]}" "$1" );;
624 +        (--)            shift; break;;
625 +        (*)             echo $"vpoldek: internal error; arg=='$1'" >&2; exit 1;;
626 +    esac
627 +    shift
628 +done
629 +
630 +VSOMETHING_TITLE=vpoldek
631 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
632 +VSOMETHING_PKGMGMT=1
633 +
634 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
635 +
636 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
637 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
638 --- util-vserver-0.30.216-r2837.orig/scripts/vpoldek-worker     1970-01-01 01:00:00.000000000 +0100
639 +++ util-vserver-0.30.216-r2837/scripts/vpoldek-worker  2009-06-22 17:48:26.000000000 +0200
640 @@ -0,0 +1,45 @@
641 +#! /bin/bash
642 +# $Id$
643 +
644 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
645 +#  
646 +# This program is free software; you can redistribute it and/or modify
647 +# it under the terms of the GNU General Public License as published by
648 +# the Free Software Foundation; version 2 of the License.
649 +#  
650 +# This program is distributed in the hope that it will be useful,
651 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
652 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
653 +# GNU General Public License for more details.
654 +#  
655 +# You should have received a copy of the GNU General Public License
656 +# along with this program; if not, write to the Free Software
657 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
658 +
659 +set -e
660 +
661 +: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars}
662 +test -e "$UTIL_VSERVER_VARS" || {
663 +    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
664 +    exit 1
665 +}
666 +. "$UTIL_VSERVER_VARS"
667 +. "$_LIB_FUNCTIONS"
668 +
669 +
670 +vserver="$1"
671 +shift
672 +
673 +pkgInit "$vserver" rpm poldek
674 +
675 +test -z "$_POLDEK" || {
676 +    warning $"The environment variable \$_POLDEK is not supported anymore; please use \$POLDEK instead of"
677 +    ${POLDEK:=$_POLDEK}
678 +}
679 +
680 +exec ${_POLDEK:-poldek} \
681 +       -v --root=$VDIR \
682 +       --cachedir=$POLDEKCACHEDIR \
683 +       --conf=$POLDEK_CONFIG \
684 +       --pmcmd=$RPM_BINARY \
685 +       "$@"
686 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build      2009-06-22 17:36:34.000000000 +0200
687 +++ util-vserver-0.30.216-r2837/scripts/vserver-build   2009-06-22 17:48:26.000000000 +0200
688 @@ -57,6 +57,9 @@
689                  ...  installs the base-packages of the given distribution with
690                      help of 'vyum'
691      urpmi       ... -- -d <distribution> -m <mirror>
692 +    poldek      ... -- -d <distribution>
693 +                ...  installs the base-packages of the given distribution with
694 +                    help of 'vpoldek'
695      rpm         ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
696                  ...  installs lists of rpm-packages
697      skeleton    ... -- [<cmd> <args>*]
698 @@ -136,7 +139,7 @@
699  
700  case x"$method" in
701      (xlegacy)  exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
702 -    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi)
703 +    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xtemplate|xfai|xrsync|xclone|xurpmi|xpoldek)
704                 . $__PKGLIBDIR/vserver-build.$method
705                 ;;
706      (x)                panic $"No build-method specified";;
707 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions    2009-06-22 17:36:35.000000000 +0200
708 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions 2009-06-22 17:48:26.000000000 +0200
709 @@ -170,6 +170,12 @@
710         elif test -e /etc/slackware-version; then
711             set -- $(cat /etc/slackware-version)
712             DISTRIBUTION=slackware$2
713 +       elif test -e /etc/pld-release; then
714 +           old_IFS=$IFS
715 +           IFS='()'
716 +           set -- $(cat /etc/pld-release)
717 +           DISTRIBUTION=pld-$(echo $2 | tr A-Z a-z)
718 +           IFS=$old_IFS
719         elif test -n "$1"; then
720             DISTRIBUTION=$1
721         else
722 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.functions.poldek     1970-01-01 01:00:00.000000000 +0100
723 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.functions.poldek  2009-06-22 17:48:26.000000000 +0200
724 @@ -0,0 +1,81 @@
725 +# $Id$ --*- sh -*--
726 +
727 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
728 +#  
729 +# This program is free software; you can redistribute it and/or modify
730 +# it under the terms of the GNU General Public License as published by
731 +# the Free Software Foundation; version 2 of the License.
732 +#  
733 +# This program is distributed in the hope that it will be useful,
734 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
735 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
736 +# GNU General Public License for more details.
737 +#  
738 +# You should have received a copy of the GNU General Public License
739 +# along with this program; if not, write to the Free Software
740 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
741 +
742 +function poldek.installBasePackages
743 +{
744 +    local name="$1"
745 +    local dir="$2"
746 +
747 +    test "$dir" != / || return 0
748 +    for filelist in "$dir"/*; do
749 +       isRegularFile "$filelist" || continue
750 +       local idx=0
751 +       local can_fail=false
752 +       local flags='--install'
753 +
754 +       set -- $(<$filelist)
755 +       while test "$#" -gt 0; do
756 +           case "$1" in
757 +               --reinstall) flags='--reinstall';;
758 +               --can-fail)  can_fail=true;;
759 +               *)           break;;
760 +           esac
761 +           shift
762 +       done
763 +       "$_VPOLDEK" "$name" -- $flags $* || $can_fail
764 +    done
765 +}
766 +
767 +function poldek.initVariables
768 +{
769 +    findFile POLDEKCONFDEFAULT \
770 +       "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/poldek.conf" \
771 +       "$__CONFDIR/.defaults/apps/pkgmgmt/poldek/poldek.conf" \
772 +       "$__DISTRIBDIR/$DISTRIBUTION/poldek/poldek.conf" \
773 +       "$__DISTRIBDIR/defaults/poldek/poldek.conf" \
774 +       ''
775 +}
776 +
777 +function poldek.initFilesystem
778 +{
779 +    mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
780 +
781 +    $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
782 +
783 +    populateDirectory "$PKGCFGDIR/poldek/etc" \
784 +       "$__DISTRIBDIR/defaults/poldek" \
785 +       "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
786 +       "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
787 +
788 +    populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
789 +       "$__DISTRIBDIR/defaults/poldek/repos.d" \
790 +       "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
791 +       "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
792 +
793 +       if [ -n "$SETUP_MACHINE" ]; then
794 +               say "Using $SETUP_MACHINE as machine"
795 +               sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
796 +       fi
797 +
798 +       if [ -n "$MIRROR" ]; then
799 +               say "Using $MIRROR as mirror URL"
800 +               sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
801 +       fi
802 +
803 +#    test -z "$POLDEKCONFDEFAULT" || \
804 +#      $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
805 +}
806 --- util-vserver-0.30.216-r2837.orig/scripts/vserver-build.poldek       1970-01-01 01:00:00.000000000 +0100
807 +++ util-vserver-0.30.216-r2837/scripts/vserver-build.poldek    2009-06-22 17:48:26.000000000 +0200
808 @@ -0,0 +1,65 @@
809 +# $Id$ --*- sh -*--
810 +
811 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
812 +#  
813 +# This program is free software; you can redistribute it and/or modify
814 +# it under the terms of the GNU General Public License as published by
815 +# the Free Software Foundation; version 2 of the License.
816 +#  
817 +# This program is distributed in the hope that it will be useful,
818 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
819 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
820 +# GNU General Public License for more details.
821 +#  
822 +# You should have received a copy of the GNU General Public License
823 +# along with this program; if not, write to the Free Software
824 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
825 +
826 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
827 +eval set -- "$tmp"
828 +
829 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
830 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
831 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
832 +
833 +while true; do
834 +    case "$1" in
835 +       (-d)            DISTRIBUTION=$2; shift;;
836 +       (-m)            MIRROR=$2; shift;;
837 +       (--debug)       set -x;;
838 +       (--)            shift; break ;;
839 +       (*)             echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
840 +                       exit 1
841 +                       ;;
842 +    esac
843 +    shift
844 +done
845 +
846 +getDistribution
847 +
848 +base.init
849 +
850 +pkgmgmt.initVariables
851 +rpm.initVariables
852 +poldek.initVariables
853 +
854 +base.initFilesystem    "$OPTION_FORCE"
855 +pkgmgmt.initFilesystem "$OPTION_FORCE"
856 +rpm.initFilesystem
857 +poldek.initFilesystem
858 +
859 +setup_writeOption "$VSERVER_NAME"
860 +setup_writeInitialFstab
861 +
862 +test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
863 +rpm.initDB           "$SETUP_CONFDIR"
864 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
865 +       "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
866 +       "$__CONFDIR/.distributions/.common/pubkeys" \
867 +       "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
868 +
869 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
870 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
871 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
872 +
873 +base.setSuccess
This page took 0.150084 seconds and 4 git commands to generate.