From 2d12e0b30eb12ef359ffdd626a85c096b7cfd80b Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 18 Jan 2014 06:58:01 -0600 Subject: [PATCH] ports-mgmt/poudriere: add patch to provide tarball jail creation method --- .../patch-jail_create_from_tarball.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 cdn/ports/ports-mgmt/poudriere/files/patch-jail_create_from_tarball.patch diff --git a/cdn/ports/ports-mgmt/poudriere/files/patch-jail_create_from_tarball.patch b/cdn/ports/ports-mgmt/poudriere/files/patch-jail_create_from_tarball.patch new file mode 100644 index 0000000..0f67d1f --- /dev/null +++ b/cdn/ports/ports-mgmt/poudriere/files/patch-jail_create_from_tarball.patch @@ -0,0 +1,46 @@ +--- src/share/poudriere/jail.sh.orig 2013-09-09 12:10:56.000000000 -0500 ++++ src/share/poudriere/jail.sh 2013-09-09 17:26:15.000000000 -0500 +@@ -55,6 +55,7 @@ + Other possible method are: \"allbsd\" retrieve a + snapshot from allbsd.org's website or \"ftp-archive\" + for old releases that're no longer available on \"ftp\". ++ Can also be \"tarball\" or \"tarball:/full/path/to/txz\". + -p tree -- Specify which ports tree the jail to start/stop with + -P patch -- Specify a patch file to apply to the source before committing. + -t version -- version to upgrade to +@@ -161,6 +162,9 @@ + allbsd|gjb) + err 1 "Upgrade is not supported with allbsd, to upgrade, please delete and recreate the jail" + ;; ++ tarball*) ++ err 1 "Upgrade is not supported with tarball; to upgrade, please delete and recreate the jail" ++ ;; + *) + err 1 "Unsupported method" + ;; +@@ -349,6 +353,13 @@ + echo " done" + } + ++install_from_tarball() { ++ : ${TARBALL=/usr/obj/${VERSION}-${ARCH}.txz} ++ msg "Installing ${VERSION} ${ARCH} from ${TARBALL} ..." ++ tar -xpf ${TARBALL} -C ${JAILMNT}/ || err 1 " fail" ++ echo " done" ++} ++ + create_jail() { + jail_exists ${JAILNAME} && err 2 "The jail ${JAILNAME} already exists" + +@@ -368,6 +379,11 @@ + fi + + case ${METHOD} in ++ tarball*) ++ FCT=install_from_tarball ++ TARBALL=${METHOD##*:} ++ METHOD=${METHOD%%:*} ++ ;; + ftp|gjb|ftp-archive) + FCT=install_from_ftp + ;; -- 2.42.0