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