From 4e39505449baa89abfdb1d234f540d0e366d793d Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Mon, 26 Jan 2015 06:27:07 +0000 Subject: [PATCH] Add MK_HAST knob for building and installing hastd(8), et al MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division --- etc/rc.d/Makefile | 5 ++++- sbin/Makefile | 7 +++++-- share/examples/Makefile | 15 +++++++++------ share/mk/src.opts.mk | 1 + tools/build/mk/OptionalObsoleteFiles.inc | 14 ++++++++++++++ tools/build/options/WITHOUT_HAST | 4 ++++ 6 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 tools/build/options/WITHOUT_HAST diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 3cd07110323b..21ddb36d33cd 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -48,7 +48,6 @@ FILES= DAEMON \ gptboot \ growfs \ gssd \ - hastd \ ${_hcsecd} \ hostapd \ hostid \ @@ -178,6 +177,10 @@ _casperd= casperd FILES+= ccd .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid diff --git a/sbin/Makefile b/sbin/Makefile index 1c34e0cc50f0..111919ee2dd3 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -30,8 +30,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ kldconfig \ @@ -88,6 +86,11 @@ SUBDIR+= ccdconfig SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif diff --git a/share/examples/Makefile b/share/examples/Makefile index 79de48eb3129..0765a4376fbb 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -14,7 +14,6 @@ LDIRS= BSD_daemon \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -64,11 +63,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -202,6 +196,15 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 8082b141527d..63dcb1bdb1f6 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -92,6 +92,7 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ GPL_DTC \ GROFF \ + HAST \ HTML \ HYPERV \ ICONV \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index ecd471199fdd..575c101492a2 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2144,6 +2144,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz OLD_FILES+=usr/share/man/man8/gssd.8.gz .endif +.if ${MK_HAST} == no +OLD_FILES+=sbin/hastctl +OLD_FILES+=sbin/hastd +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/man/man5/hast.conf.5.gz +OLD_FILES+=usr/share/man/man8/hastctl.8.gz +OLD_FILES+=usr/share/man/man8/hastd.8.gz +OLD_DIRS+=usr/share/examples/hast +.endif + .if ${MK_HESIOD} == no OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/hesiod.h diff --git a/tools/build/options/WITHOUT_HAST b/tools/build/options/WITHOUT_HAST new file mode 100644 index 000000000000..0c31b8c3d0ca --- /dev/null +++ b/tools/build/options/WITHOUT_HAST @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr hastd 8 +and related utilities.