[PC-BSD Commits] r18466 - in pcbsd/current/src-sh/pbi-manager: . man8
svn at pcbsd.org
svn at pcbsd.org
Thu Aug 16 09:52:46 PDT 2012
Author: kris
Date: 2012-08-16 16:52:46 +0000 (Thu, 16 Aug 2012)
New Revision: 18466
Modified:
pcbsd/current/src-sh/pbi-manager/man8/pbi_makepatch.8
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Add --tmpfs option to pbi_makepatch, and use it for auto-building. This can
shave off another 30 minutes on some large PBIs
Modified: pcbsd/current/src-sh/pbi-manager/man8/pbi_makepatch.8
===================================================================
--- pcbsd/current/src-sh/pbi-manager/man8/pbi_makepatch.8 2012-08-16 16:28:58 UTC (rev 18465)
+++ pcbsd/current/src-sh/pbi-manager/man8/pbi_makepatch.8 2012-08-16 16:52:46 UTC (rev 18466)
@@ -8,6 +8,7 @@
.Nm
.Op Fl o Ar outdir
.Op Fl -sign Ar keyfile
+.Op Fl -tmpfs
.Op Ar oldpbi
.Op Ar newpbi
.Sh DESCRIPTION
@@ -21,6 +22,8 @@
Save the resulting .PBP file to the specified outdir
.It Fl -sign Ar keyfile
Use the specified openssl key to digitally sign the patch file
+.It Fl -tmpfs
+Use tmpfs for the extraction of the oldpbi and newpbi
.Sh NOTES
For details about the module format, please refer to the wiki guide:
http://wiki.pcbsd.org/index.php/PBI_Module_Builder_Guide
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-08-16 16:28:58 UTC (rev 18465)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-08-16 16:52:46 UTC (rev 18466)
@@ -164,6 +164,7 @@
Options:
-o outdir -- Save the .PBP file to outdir
+ --tmpfs -- Use TMPFS for extracting PBIs
--sign key -- Sign the PBI with specified openssl key
--no-checksig -- Ignore signature verification and force install
@@ -456,6 +457,8 @@
--sign) if [ $# -eq 1 ]; then usage_makepatch_pbi; fi
shift; PBI_SSLPRIVKEY="$1"
;;
+ --tmpfs) PBI_MP_TMPFS="YES"
+ ;;
--no-checksig) PBI_SKIPSIGVERIFY="YES" ;;
*) if [ $# -gt 2 ]; then usage_makepatch_pbi; fi
PBI_OLDFILENAME="$1"
@@ -1580,6 +1583,13 @@
echo "Cleaning up patch data..."
fi
+ # If we used tmpfs, unmount the dirs
+ if [ "$PBI_MP_TMPFS" = "YES" ] ; then
+ umount "${_pbiNewDir}" 2>/dev/null
+ umount "${_pbiOldDir}" 2>/dev/null
+ umount "${_pbiPatchDir}" 2>/dev/null
+ fi
+
if [ -n "${_pbiNewDir}" -a -d "${_pbiNewDir}" -a "${_pbiNewDir}" != "/" ] ; then
rm -rf "${_pbiNewDir}" >/dev/null 2>/dev/null
chflags -R noschg "${_pbiNewDir}" >/dev/null 2>/dev/null
@@ -5722,6 +5732,9 @@
local _mpflags="-o $_curPBIdir"
fi
+ # Check if we need to enable tmpfs
+ if [ "$PBI_AB_TMPFS" = "YES" ] ; then _mpflags="${_mpflags} --tmpfs" ; fi
+
# Build a list of old PBIs we need to make patches from
for _oPBI in `ls ${_oldPBIdir}/*.pbi 2>/dev/null`
do
@@ -5787,6 +5800,13 @@
mkdir -p "$_pbiOldDir"
mkdir -p "$_pbiPatchDir"
+ # If using tmpfs to speed up patch process
+ if [ "$PBI_MP_TMPFS" = "YES" ] ; then
+ mount -t tmpfs tmpfs "${_pbiNewDir}"
+ mount -t tmpfs tmpfs "${_pbiOldDir}"
+ mount -t tmpfs tmpfs "${_pbiPatchDir}"
+ fi
+
local _opts="-e --licagree"
if [ "${PBI_SKIPSIGVERIFY}" = "YES" ] ; then
_opts="${_opts} --no-checksig"
@@ -6757,6 +6777,7 @@
sleep 2
fi
chroot_make_cleanup
+ rm_pbipatchfiles
rm_tmpdir
exit 0
}
More information about the Commits
mailing list