]> git.pld-linux.org Git - packages/util-vserver.git/blob - util-vserver-rpm5.patch
- rediff patches
[packages/util-vserver.git] / util-vserver-rpm5.patch
1 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/Makefile-files util-vserver-0.30.216-pre3126/scripts/Makefile-files
2 --- util-vserver-0.30.216-pre3126.org/scripts/Makefile-files    2021-03-12 21:50:31.004440077 +0100
3 +++ util-vserver-0.30.216-pre3126/scripts/Makefile-files        2021-03-12 21:50:31.127775612 +0100
4 @@ -20,6 +20,7 @@
5  AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
6                                 scripts/vapt-get-worker \
7                                 scripts/vrpm-worker \
8 +                               scripts/vrpm-convertdb-worker \
9                                 scripts/vyum-worker \
10                                 scripts/vpoldek-worker \
11                                 scripts/vrpm-preload \
12 @@ -76,6 +77,7 @@ scripts_pkglib_src_SCRPTS =   scripts/pkgm
13                                 scripts/vpkg \
14                                 scripts/vpoldek-worker \
15                                 scripts/vrpm-worker \
16 +                               scripts/vrpm-convertdb-worker \
17                                 scripts/vrpm-preload \
18                                 scripts/start-vservers \
19                                 scripts/vprocunhide \
20 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vrpm util-vserver-0.30.216-pre3126/scripts/vrpm
21 --- util-vserver-0.30.216-pre3126.org/scripts/vrpm      2016-02-24 19:09:17.000000000 +0100
22 +++ util-vserver-0.30.216-pre3126/scripts/vrpm  2021-03-12 21:50:31.127775612 +0100
23 @@ -46,6 +46,9 @@ the GNU General Public License.  This pr
24      exit 0
25  }
26  
27 +rpmversion=$(awk '/^%_rpmversion/ { split($2,ver,/\./); print ver[1] }' /usr/lib/rpm/macros 2>/dev/null)
28 +[ -z "$rpmversion" ] && rpmversion=5
29 +
30  tmp=$(getopt -o +q --long help,version,debug,quiet,$VS_ALLVSERVERS_ARGS -n "$0" -- "$@") || exit 1
31  eval set -- "$tmp"
32  
33 @@ -70,4 +73,15 @@ VSOMETHING_PKGMGMT=1
34  export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT
35  
36  test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- )
37 +if [ "$rpmversion" -ge 5 ]; then
38 +    declare -a rpm_opts
39 +    [ ${#vsomething_opts[@]} -eq 0 ] && rpm_opts=( "$1" "--" )
40 +    if [[ "$@" = *--initdb* ]]; then
41 +       exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "${rpm_opts[@]}" -qa
42 +    fi
43 +    if [[ "$@" = *--convertdb* ]]; then
44 +       VSOMETHING_WORKER=$__PKGLIBDIR/vrpm-convertdb-worker
45 +       exec $_VSOMETHING "${send_through[@]}" /usr/lib/rpm/bin/dbupgrade.sh "${vsomething_opts[@]}" "${rpm_opts[@]}"
46 +    fi
47 +fi
48  exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "$@"
49 diff -urNp -x '*.orig' util-vserver-0.30.216-pre3126.org/scripts/vrpm-convertdb-worker util-vserver-0.30.216-pre3126/scripts/vrpm-convertdb-worker
50 --- util-vserver-0.30.216-pre3126.org/scripts/vrpm-convertdb-worker     1970-01-01 01:00:00.000000000 +0100
51 +++ util-vserver-0.30.216-pre3126/scripts/vrpm-convertdb-worker 2021-03-12 21:50:31.127775612 +0100
52 @@ -0,0 +1,18 @@
53 +#!/bin/bash
54 +
55 +set -e
56 +
57 +: ${UTIL_VSERVER_VARS:=/usr/share/util-vserver/util-vserver-vars}
58 +test -e "$UTIL_VSERVER_VARS" || {
59 +    echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2
60 +    exit 1
61 +}
62 +. "$UTIL_VSERVER_VARS"
63 +. "$_LIB_FUNCTIONS"
64 +
65 +vserver=$1
66 +shift
67 +
68 +pkgInit "$vserver" rpm
69 +
70 +exec /usr/lib/rpm/bin/dbupgrade.sh -r "$VDIR" "$@"
This page took 0.032152 seconds and 3 git commands to generate.