summaryrefslogtreecommitdiffstats
path: root/etc/Makefile
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2013-01-15 00:12:34 +0000
committerbrooks <brooks@FreeBSD.org>2013-01-15 00:12:34 +0000
commit8251e188c6ba82c959a91d5bed4b7a1e622ae326 (patch)
treea312712d1d5379dde1366032cb42f5ffb302cca1 /etc/Makefile
parent9bcfc5995dcac43a412f130666f5c7f2e676ce60 (diff)
downloadFreeBSD-src-8251e188c6ba82c959a91d5bed4b7a1e622ae326.zip
FreeBSD-src-8251e188c6ba82c959a91d5bed4b7a1e622ae326.tar.gz
Add an option DB_FROM_SRC to use src/etc's user/group databases when
installing. This allows things like running installworld for 10-CURRENT on a 9.0-RELEASE system without adding extra users and groups to the passwd and group files. To prevent potentially risky uid/gid mismatches on systems with non-standard local values, require that DESTDIR be set if DB_FROM_SRC is set. Sponsored by: DARPA, AFRL Reviewed by: peter
Diffstat (limited to 'etc/Makefile')
-rw-r--r--etc/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/etc/Makefile b/etc/Makefile
index c18908f..dc5f1af 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -291,25 +291,27 @@ distribution:
${DESTDIR}/etc/nsswitch.conf
.endif
+MTREE_CMD?= mtree
+
distrib-dirs:
- mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
- mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
- mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
- mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
+ ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
+ ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
+ ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
+ ${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
-p ${DESTDIR}/usr/include
.if ${MK_BIND_LIBS} != "no"
- mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
+ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
-p ${DESTDIR}/usr/include
.endif
.if ${MK_BIND_MTREE} != "no"
- mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
+ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
-p ${DESTDIR}/var/named
.endif
.if ${MK_GROFF} != "no"
- mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr
+ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr
.endif
.if ${MK_SENDMAIL} != "no"
- mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
+ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
.endif
cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
OpenPOWER on IntegriCloud