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