Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/sets maketars:
details: https://anonhg.NetBSD.org/src/rev/298b283e0776
branches: trunk
changeset: 540571:298b283e0776
user: lukem <lukem%NetBSD.org@localhost>
date: Thu Dec 19 06:21:45 2002 +0000
description:
maketars:
- add "-N etcdir", to be used for pax & mtree -N. defaults to ${DESTDIR}/etc
Makefile:
- if UNPRIVED, call maketars with "-N ${NETBSDSRCDIR}/etc", so that
"make UNPRIVED= DESTDIR=/foo installsets" can work with an empty
${DESTDIR}/etc. (i.e, after a make build without install-etc-files)
diffstat:
distrib/sets/Makefile | 12 +++++++-----
distrib/sets/maketars | 22 ++++++++++++++--------
2 files changed, 21 insertions(+), 13 deletions(-)
diffs (117 lines):
diff -r 7e3db0784b20 -r 298b283e0776 distrib/sets/Makefile
--- a/distrib/sets/Makefile Thu Dec 19 02:15:31 2002 +0000
+++ b/distrib/sets/Makefile Thu Dec 19 06:21:45 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2002/12/16 00:30:39 lukem Exp $
+# $NetBSD: Makefile,v 1.20 2002/12/19 06:21:45 lukem Exp $
# The `all' target must appear before bsd.own.mk is pulled in.
all:
@@ -55,8 +55,9 @@
.if (${DESTDIR} != "")
${MAKE} checkflist
.endif
- ${SETSENV} sh ${.CURDIR}/maketars ${UNPRIVED:D-M ${METALOG}} \
- -d ${DESTDIR:S,^$,/,} -t ${RELEASEDIR}/binary/sets ${MAKETARSETS}
+ ${SETSENV} sh ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
+ ${UNPRIVED:D-M ${METALOG} -N ${NETBSDSRCDIR}/etc} \
+ -t ${RELEASEDIR}/binary/sets ${MAKETARSETS}
.PRECIOUS: makesums
makesums: check_RELEASEDIR
@@ -68,8 +69,9 @@
@echo "setenv INSTALLDIR before doing that!"
@false
.endif
- ${SETSENV} sh ${.CURDIR}/maketars ${UNPRIVED:D-M ${METALOG}} \
- -d ${DESTDIR:S,^$,/,} -i ${INSTALLDIR} ${INSTALLSETS}
+ ${SETSENV} sh ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \
+ ${UNPRIVED:D-M ${METALOG} -N ${NETBSDSRCDIR}/etc} \
+ -i ${INSTALLDIR} ${INSTALLSETS}
#
# MAIN ENTRY POINTS
diff -r 7e3db0784b20 -r 298b283e0776 distrib/sets/maketars
--- a/distrib/sets/maketars Thu Dec 19 02:15:31 2002 +0000
+++ b/distrib/sets/maketars Thu Dec 19 06:21:45 2002 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: maketars,v 1.29 2002/12/17 01:59:32 lukem Exp $
+# $NetBSD: maketars,v 1.30 2002/12/19 06:21:45 lukem Exp $
#
# Make release tar files for some or all lists. Usage:
# maketars [-b] [-x] [-a arch] [-m machine] [-s setsdir]
@@ -22,6 +22,7 @@
dest=$DESTDIR
metalog=
installdir=
+etcdir=
# handle args
while : ; do
@@ -44,6 +45,9 @@
-m*)
machine=$2; shift
;;
+ -N*)
+ etcdir=$2; shift
+ ;;
-s*)
setd=$2; shift
;;
@@ -55,15 +59,16 @@
;;
-*)
cat 1>&2 <<USAGE
-Usage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir] [-M metalog]
- [-d dest] [-t tars] [setname ...]
+Usage: $0 [-b] [-x] [-i idir] [-a arch] [-m machine] [-s setsdir]
+ [-M metalog] [-N etcdir] [-d dest] [-t tars] [setname ...]
-b make netbsd + x11 lists
-x only make x11 lists
- -i targdir install sets to targdir instead of creating tar files
+ -i idir install sets to idir instead of creating tar files
-a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [$machine_arch]
-m machine set machine (e.g, amiga, i386, macppc) [$machine]
-s setsdir directory to find sets [$setd]
-M metalog metalog file
+ -N etcdir etc dir for metalog use [$dest/etc]
-d dest \$DESTDIR [$dest]
-t tars \$RELEASEDIR [$tars]
[setname ...] sets to build [$lists]
@@ -92,6 +97,7 @@
echo \$DESTDIR must be set
exit 1
fi
+: ${etcdir:=${dest}/etc}
# Make sure we don't loop forever if mkdir will always fail.
@@ -119,10 +125,10 @@
if [ -n "$metalog" ]; then
echo "Parsing $metalog"
(
- cat ${dest}/etc/mtree/NetBSD.dist
+ cat ${etcdir}/mtree/NetBSD.dist
echo "/unset all"
sed -e "s,^\.$dest,.," < $metalog
- ) | ${MTREE} -D -k all -N ${dest}/etc | \
+ ) | ${MTREE} -D -k all -N ${etcdir} | \
sed -e 's,\(.*\) \(\..*\),\2 \1,' > $SDIR/metalog
fi
@@ -152,11 +158,11 @@
if [ -n "$installdir" ]; then
( cd $dest ; \
- ${PAX} -rwpe -d ${metalog:+-N$dest/etc} ${metalog:+-M} \
+ ${PAX} -rwpe -d ${metalog:+-N${etcdir}} ${metalog:+-M} \
$installdir < ${SDIR}/plist.$setname )
else
( cd $dest ; \
- ${PAX} -w -d -z ${metalog:+-N$dest/etc} ${metalog:+-M} \
+ ${PAX} -w -d -z ${metalog:+-N${etcdir}} ${metalog:+-M} \
< ${SDIR}/plist.$setname ) > ${tars}/$out
fi
es=$(($es + $?))
Home |
Main Index |
Thread Index |
Old Index