]> CyberLeo.Net >> Repos - CDN/cdn-ports-overlay.git/blob - cdn/ports/ports-mgmt/poudriere/files/patch-jail_create_from_tarball.patch
ports-mgmt/poudriere: add patch to provide tarball jail creation method
[CDN/cdn-ports-overlay.git] / cdn / ports / ports-mgmt / poudriere / files / patch-jail_create_from_tarball.patch
1 --- src/share/poudriere/jail.sh.orig    2013-09-09 12:10:56.000000000 -0500
2 +++ src/share/poudriere/jail.sh 2013-09-09 17:26:15.000000000 -0500
3 @@ -55,6 +55,7 @@
4                       Other possible method are: \"allbsd\" retrieve a
5                       snapshot from allbsd.org's website or \"ftp-archive\"
6                       for old releases that're no longer available on \"ftp\".
7 +                     Can also be \"tarball\" or \"tarball:/full/path/to/txz\".
8      -p tree       -- Specify which ports tree the jail to start/stop with
9      -P patch      -- Specify a patch file to apply to the source before committing.
10      -t version    -- version to upgrade to
11 @@ -161,6 +162,9 @@
12         allbsd|gjb)
13                 err 1 "Upgrade is not supported with allbsd, to upgrade, please delete and recreate the jail"
14                 ;;
15 +       tarball*)
16 +               err 1 "Upgrade is not supported with tarball; to upgrade, please delete and recreate the jail"
17 +               ;;
18         *)
19                 err 1 "Unsupported method"
20                 ;;
21 @@ -349,6 +353,13 @@
22         echo " done"
23  }
24  
25 +install_from_tarball() {
26 +       : ${TARBALL=/usr/obj/${VERSION}-${ARCH}.txz}
27 +       msg "Installing ${VERSION} ${ARCH} from ${TARBALL} ..."
28 +       tar -xpf ${TARBALL} -C ${JAILMNT}/ || err 1 " fail"
29 +       echo " done"
30 +}
31 +
32  create_jail() {
33         jail_exists ${JAILNAME} && err 2 "The jail ${JAILNAME} already exists"
34  
35 @@ -368,6 +379,11 @@
36         fi
37  
38         case ${METHOD} in
39 +       tarball*)
40 +               FCT=install_from_tarball
41 +               TARBALL=${METHOD##*:}
42 +               METHOD=${METHOD%%:*}
43 +               ;;
44         ftp|gjb|ftp-archive)
45                 FCT=install_from_ftp
46                 ;;