]> git.pld-linux.org Git - packages/util-vserver.git/blob - util-vserver-pld.patch
- poldek cache in /var/cache/vserver/poldek
[packages/util-vserver.git] / util-vserver-pld.patch
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
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 @@
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 \
18 +                          pld-th/pkgs/01 pld-th/rpm/macros \
19 +                          pld-ti/pkgs/01 pld-ti/rpm/macros
20  
21  nobase_confdistrib_DATA        =  rh9/apt/sources.list \
22                            fc1/apt/sources.list \
23 @@ -83,7 +87,10 @@
24                            fc5/apt/sources.list \
25                            fc6/apt/sources.list \
26                            f7/apt/sources.list \
27 -                          suse91/apt/sources.list
28 +                          suse91/apt/sources.list \
29 +                          pld-ac/poldek/repos.d/pld.conf \
30 +                          pld-th/poldek/repos.d/pld.conf \
31 +                          pld-ti/poldek/repos.d/pld.conf
32  
33  AM_INSTALLCHECK_STD_OPTIONS_EXEMPT \
34                         =  $(nobase_distrib_SCRIPTS)
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
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 @@
52 +basesystem
53 +filesystem
54 +glibc-misc
55 +issue
56 +rpm-base
57 +vserver-packages
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 @@
61 +# $Id$
62 +# PLD Linux Distribution <http://www.pld-linux.org/>.
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 +_prefix = %{_pld_main_prefix}
76 +
77 +_type = pndir
78 +
79 +# PLD 2.0 (Ac)
80 +[source]
81 +type   = %{_type}
82 +name   = ac
83 +path   = %{_prefix}/PLD/%{_arch}/PLD/RPMS/
84 +signed = yes
85 +# buggy deps -- use one from updates instead
86 +ignore = msmtp-sendmail*
87 +pri    = 1
88 +
89 +[source]
90 +type   = %{_type}
91 +name   = ac-updates
92 +path   = %{_prefix}/updates/%{_arch}/
93 +signed = yes
94 +pri    = 1
95 +
96 +[source]
97 +type   = %{_type}
98 +name   = ac-supported
99 +path   = %{_prefix}/supported/%{_arch}/
100 +auto   = no
101 +autoup = no
102 +signed = yes
103 +
104 +[source]
105 +type   = %{_type}
106 +name   = ac-ready
107 +path   = %{_pld_main_prefix}/ready/%{_arch}/
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 --- 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
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
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 @@
127 +basesystem
128 +filesystem
129 +glibc-misc
130 +issue
131 +rpm-base
132 +vserver-packages
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/>.
137 +
138 +_arch   = %ARCH%
139 +_prefix = ftp://ftp.th.pld-linux.org/dists/th
140 +## Some mirrors
141 +## You can use them if you have better connection there
142 +# CI TASK:
143 +#_prefix = ftp://ftp.task.pld-linux.org/dists/th
144 +
145 +_type = pndir
146 +
147 +# PLD 3.0 (Th)
148 +[source]
149 +type   = %{_type}
150 +name   = th
151 +path   = %{_prefix}/PLD/%{_arch}/RPMS/
152 +
153 +[source]
154 +type   = %{_type}
155 +name   = th
156 +path   = %{_prefix}/PLD/noarch/RPMS/
157 +
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
173 +
174 +[source]
175 +type   = %{_type}
176 +name   = th-ready
177 +path   = %{_prefix}/ready/%{_arch}/RPMS/
178 +auto   = no
179 +autoup = no
180 +
181 +[source]
182 +type   = %{_type}
183 +name   = th-ready
184 +path   = %{_prefix}/ready/noarch/RPMS/
185 +auto   = no
186 +autoup = no
187 +
188 +[source]
189 +type   = %{_type}
190 +name   = th-test
191 +path   = %{_prefix}/test/%{_arch}/RPMS/
192 +auto   = no
193 +autoup = no
194 +
195 +[source]
196 +type   = %{_type}
197 +name   = th-test
198 +path   = %{_prefix}/test/noarch/RPMS/
199 +auto   = no
200 +autoup = no
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
203 @@ -0,0 +1,4 @@
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
207 +%_netsharedpath                /dev
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 @@
211 +basesystem
212 +filesystem
213 +glibc-misc
214 +issue
215 +rpm-base
216 +vserver-packages
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
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
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
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
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
275 @@ -403,6 +403,20 @@
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  {
296 @@ -476,6 +490,7 @@
297             rpm)        _pkgSetVarsRPM;;
298             apt)        _pkgSetVarsApt;;
299             yum)        _pkgSetVarsYum;;
300 +           poldek)     _pkgSetVarsPoldek;;
301             *)          echo "Unknown packaging flavor" >&2; exit 1;;
302         esac
303      done
304 @@ -764,6 +779,8 @@
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
313 @@ -831,6 +848,27 @@
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  {
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
343 @@ -21,6 +21,7 @@
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 \
351 @@ -47,11 +48,13 @@
352                                 scripts/vserver-build.template \
353                                 scripts/vserver-build.rsync \
354                                 scripts/vserver-build.clone \
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 \
365 @@ -65,6 +68,7 @@
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 \
373 @@ -88,6 +92,7 @@
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 \
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
383 @@ -195,7 +195,7 @@
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
392 @@ -205,9 +205,9 @@
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
404 @@ -368,6 +368,131 @@
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
517 +       tmpdir=$($_MKTEMPDIR -p /var/tmp pgmgmt.XXXXXX)
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
536 @@ -422,6 +547,7 @@
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
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
546 @@ -53,6 +53,7 @@
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"
554 @@ -105,6 +106,8 @@
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@"
562  _BZIP2="@BZIP2@"
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
565 @@ -115,6 +115,44 @@
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)
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 @@
613 +#! /bin/bash
614 +# $Id$
615 +
616 +# Copyright (C) 2007 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
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 +
655 +Copyright (C) 2007 Enrico Scholz
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 +
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
665 +
666 +while true; do
667 +    case "$1" in
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
677 +done
678 +
679 +VSOMETHING_TITLE=vpoldek
680 +VSOMETHING_WORKER=$_VPOLDEK_WORKER
681 +VSOMETHING_PKGMGMT=1
682 +
683 +export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
684 +
685 +test ${#poldek_opts[@]} -eq 0 || poldek_opts=( "${poldek_opts[@]}" -- )
686 +exec $_VSOMETHING "${send_through[@]}" poldek "${poldek_opts[@]}" "$@"
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
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 +       "$@"
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
737 @@ -57,6 +57,9 @@
738      yum         ... -- -d <distribution>
739                  ...  installs the base-packages of the given distribution with
740                      help of 'vyum'
741 +    poldek      ... -- -d <distribution>
742 +                ...  installs the base-packages of the given distribution with
743 +                    help of 'vpoldek'
744      rpm         ... -- [-d <distribution>] --empty|([--force] [--nodeps] <manifest>)+
745                  ...  installs lists of rpm-packages
746      skeleton    ... -- [<cmd> <args>*]
747 @@ -136,7 +139,7 @@
748  
749  case x"$method" in
750      (xlegacy)  exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
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)
753                 . $__PKGLIBDIR/vserver-build.$method
754                 ;;
755      (x)                panic $"No build-method specified";;
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
758 @@ -167,6 +167,12 @@
759         elif test -e /etc/slackware-version; then
760             set -- $(cat /etc/slackware-version)
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
771 --- util-vserver-0.30.214/scripts/vserver-build.functions.poldek        2008-03-25 20:37:09.000000000 +0200
772 +++ util-vserver-0.30.214/scripts/vserver-build.functions.poldek        2008-03-25 20:37:09.000000000 +0200
773 @@ -0,0 +1,81 @@
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 +{
828 +    mkdir -p "$PKGCFGDIR"/poldek/etc/repos.d
829 +
830 +    $_LN_S "$__CONFDIR"/.defaults/cachebase/poldek "$PKGCFGDIR"/poldek/cache
831 +
832 +    populateDirectory "$PKGCFGDIR/poldek/etc" \
833 +       "$__DISTRIBDIR/defaults/poldek" \
834 +       "$__DISTRIBDIR/$DISTRIBUTION/poldek" \
835 +       "$__CONFDIR/.distributions/$DISTRIBUTION/poldek"
836 +
837 +    populateDirectory "$PKGCFGDIR/poldek/etc/repos.d" \
838 +       "$__DISTRIBDIR/defaults/poldek/repos.d" \
839 +       "$__DISTRIBDIR/$DISTRIBUTION/poldek/repos.d" \
840 +       "$__CONFDIR/.distributions/$DISTRIBUTION/poldek/repos.d"
841 +
842 +       if [ -n "$SETUP_MACHINE" ]; then
843 +               say "Using $SETUP_MACHINE as machine"
844 +               sed -i -e "s#^\(_arch\s*\)=.*#\1= $SETUP_MACHINE#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
845 +       fi
846 +
847 +       if [ -n "$MIRROR" ]; then
848 +               say "Using $MIRROR as mirror URL"
849 +               sed -i -e "s#^\(_prefix\s*\)=.*#\1= $MIRROR#" "$PKGCFGDIR"/poldek/etc/repos.d/*.conf
850 +       fi
851 +
852 +#    test -z "$POLDEKCONFDEFAULT" || \
853 +#      $_LN_S "$POLDEKCONFDEFAULT" "$PKGCFGDIR"/poldek/etc/
854 +}
855 --- util-vserver-0.30.214/scripts/vserver-build.poldek  2007-11-15 23:20:48.224507577 +0100
856 +++ util-vserver-0.30.214/scripts/vserver-build.poldek  2008-03-25 20:25:23.000000000 +0200
857 @@ -0,0 +1,65 @@
858 +# $Id$ --*- sh -*--
859 +
860 +# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
861 +#  
862 +# This program is free software; you can redistribute it and/or modify
863 +# it under the terms of the GNU General Public License as published by
864 +# the Free Software Foundation; version 2 of the License.
865 +#  
866 +# This program is distributed in the hope that it will be useful,
867 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
868 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
869 +# GNU General Public License for more details.
870 +#  
871 +# You should have received a copy of the GNU General Public License
872 +# along with this program; if not, write to the Free Software
873 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
874 +
875 +tmp=$(getopt -o +d:,m: --long debug -n "$0" -- "$@") || exit 1
876 +eval set -- "$tmp"
877 +
878 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_RPM"
879 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_POLDEK"
880 +. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
881 +
882 +while true; do
883 +    case "$1" in
884 +       (-d)            DISTRIBUTION=$2; shift;;
885 +       (-m)            MIRROR=$2; shift;;
886 +       (--debug)       set -x;;
887 +       (--)            shift; break ;;
888 +       (*)             echo "vserver-build.poldek: internal error: unrecognized option '$1'" >&2
889 +                       exit 1
890 +                       ;;
891 +    esac
892 +    shift
893 +done
894 +
895 +getDistribution
896 +
897 +base.init
898 +
899 +pkgmgmt.initVariables
900 +rpm.initVariables
901 +poldek.initVariables
902 +
903 +base.initFilesystem    "$OPTION_FORCE"
904 +pkgmgmt.initFilesystem "$OPTION_FORCE"
905 +rpm.initFilesystem
906 +poldek.initFilesystem
907 +
908 +setup_writeOption "$VSERVER_NAME"
909 +setup_writeInitialFstab
910 +
911 +test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
912 +rpm.initDB           "$SETUP_CONFDIR"
913 +rpm.importGPGPubKeys "$SETUP_CONFDIR" \
914 +       "$__CONFDIR/.distributions/$DISTRIBUTION/pubkeys" \
915 +       "$__CONFDIR/.distributions/.common/pubkeys" \
916 +       "$__DISTRIBDIR/$DISTRIBUTION/pubkeys"
917 +
918 +$_VPOLDEK "$SETUP_CONFDIR" -- --update-whole
919 +poldek.installBasePackages "$SETUP_CONFDIR" "$PKGINSTALLDIR"
920 +test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
921 +
922 +base.setSuccess
This page took 0.155973 seconds and 4 git commands to generate.