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