Skip to content

Commit

Permalink
WITHOUT_SERVICESDB:
Browse files Browse the repository at this point in the history
Add src.conf knob to disable the installation of /var/db/services.db

Default to leaving services.db in place, but allow the removal of the
file and its creation with a src.conf knob.

This file ends up being 2MB in size.  For small systems this is a waste
of space but its a tradeoff.

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D9655
  • Loading branch information
seanbruno committed Jul 4, 2018
1 parent 968ac17 commit 6f07757
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
9 changes: 7 additions & 2 deletions etc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,17 @@ distribution:
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${BIN1} ${DESTDIR}/etc; \
cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \
${DESTDIR}/etc/services; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
${BIN2} ${DESTDIR}/etc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;

.if ${MK_SERVICESDB} != "no"
cd ${.CURDIR}; \
services_mkdb ${CAP_MKDB_ENDIAN} -q -o ${DESTDIR}/var/db/services.db \
${DESTDIR}/etc/services;
.endif

.if ${MK_BSNMP} != "no"
cd ${.CURDIR}; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
Expand Down
1 change: 1 addition & 0 deletions share/mk/src.opts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ __DEFAULT_YES_OPTIONS = \
RESCUE \
ROUTED \
SENDMAIL \
SERVICESDB \
SETUID_LOGIN \
SHAREDOCS \
SOURCELESS \
Expand Down
4 changes: 4 additions & 0 deletions tools/build/mk/OptionalObsoleteFiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7527,6 +7527,10 @@ OLD_DIRS+=usr/share/sendmail/cf
OLD_DIRS+=usr/share/sendmail
.endif

.if ${MK_SERVICESDB} == no
OLD_FILES+=var/db/services.db
.endif

.if ${MK_SHAREDOCS} == no
OLD_FILES+=usr/share/doc/pjdfstest/README
OLD_DIRS+=usr/share/doc/pjdfstest
Expand Down
3 changes: 3 additions & 0 deletions tools/build/options/WITHOUT_SERVICESDB
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.\" $FreeBSD$
Set to not install
.Pa /var/db/services.db .

0 comments on commit 6f07757

Please sign in to comment.