summaryrefslogtreecommitdiffstats
path: root/usr.sbin/portsnap
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2006-05-13 15:56:35 +0000
committercperciva <cperciva@FreeBSD.org>2006-05-13 15:56:35 +0000
commit2407c865b7b9f106797a4089a64b01759afc8cc2 (patch)
treed544dd950df729744b82ef8ee13a7aeaf43cec7a /usr.sbin/portsnap
parent17287f7b9f499f705175d55f92e436ca2d270502 (diff)
downloadFreeBSD-src-2407c865b7b9f106797a4089a64b01759afc8cc2.zip
FreeBSD-src-2407c865b7b9f106797a4089a64b01759afc8cc2.tar.gz
Add a mechanism for constructing INDEX files which include local ports.
Requested by: brooks
Diffstat (limited to 'usr.sbin/portsnap')
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.89
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.sh15
2 files changed, 22 insertions, 2 deletions
diff --git a/usr.sbin/portsnap/portsnap/portsnap.8 b/usr.sbin/portsnap/portsnap/portsnap.8
index c5011f7..5ef3ea7 100644
--- a/usr.sbin/portsnap/portsnap/portsnap.8
+++ b/usr.sbin/portsnap/portsnap/portsnap.8
@@ -37,6 +37,7 @@
.Op Fl d Ar workdir
.Op Fl f Ar conffile
.Op Fl k Ar KEY
+.Op Fl l Ar descfile
.Op Fl p Ar portsdir
.Op Fl s Ar server
.Cm command ...
@@ -70,6 +71,14 @@ command, update INDEX files, but not the rest of the ports tree.
.It Fl k Ar KEY
Expect a public key with given SHA256 hash.
(default: read value from configuration file.)
+.It Fl l Ar descfile
+Merge the specified lcoal describes file into the INDEX files being
+built.
+The
+.Ar descfile
+should be generated by running
+.Cm make describe
+in each of the local port directories.
.It Fl p Ar portsdir
When extracting or updating an uncompressed snapshot,
operate on the directory
diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh
index c730ad4..d74190f 100644
--- a/usr.sbin/portsnap/portsnap/portsnap.sh
+++ b/usr.sbin/portsnap/portsnap/portsnap.sh
@@ -43,6 +43,7 @@ Options:
(default: /etc/portsnap.conf)
-I -- Update INDEX only. (update command only)
-k KEY -- Trust an RSA key with SHA256 hash of KEY
+ -l descfile -- Merge the specified local describes file into the INDEX.
-p portsdir -- Location of uncompressed ports tree
(default: /usr/ports/)
-s server -- Server from which to fetch updates.
@@ -82,6 +83,7 @@ init_params() {
INDEXONLY=""
SERVERNAME=""
REFUSE=""
+ LOCALDESC=""
}
# Parse the command line
@@ -117,6 +119,11 @@ parse_cmdline() {
if [ ! -z "${KEYPRINT}" ]; then usage; fi
shift; KEYPRINT="$1"
;;
+ -l)
+ if [ $# -eq 1 ]; then usage; fi
+ if [ ! -z "${LOCALDESC}" ]; then usage; fi
+ shift; LOCALDESC="$1"
+ ;;
--no-stats)
if [ -z "${STATSREDIR}" ]; then
STATSREDIR="/dev/null"
@@ -203,7 +210,9 @@ default_params() {
_WORKDIR="/var/db/portsnap"
_PORTSDIR="/usr/ports"
_NDEBUG="-n"
- for X in QUIETREDIR QUIETFLAG STATSREDIR WORKDIR PORTSDIR NDEBUG; do
+ _LOCALDESC="/dev/null"
+ for X in QUIETREDIR QUIETFLAG STATSREDIR WORKDIR PORTSDIR \
+ NDEBUG LOCALDESC; do
eval _=\$${X}
eval __=\$_${X}
if [ -z "${_}" ]; then
@@ -821,7 +830,9 @@ fetch_run() {
# Build a ports INDEX file
extract_make_index() {
gunzip -c "${WORKDIR}/files/`look $1 ${WORKDIR}/tINDEX |
- cut -f 2 -d '|'`.gz" | ${MKINDEX} /dev/stdin > ${PORTSDIR}/$2
+ cut -f 2 -d '|'`.gz" |
+ cat - ${LOCALDESC} |
+ ${MKINDEX} /dev/stdin > ${PORTSDIR}/$2
}
# Create INDEX, INDEX-5, INDEX-6
OpenPOWER on IntegriCloud