From 8aff76fb37b58a74832831ac1c54a013a64b35e7 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 22 Dec 2020 15:36:40 -0600 Subject: [PATCH] build: remove the option to build gnugrep Unconditionally install bsdgrep as grep, bootstrap or not. Remove all build glue and stop installing both gnugrep and libgnuregex now that all consumers of the latter are gone. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27732 --- ObsoleteFiles.inc | 14 +++++++++++++ etc/mtree/BSD.include.dist | 4 ---- gnu/lib/Makefile | 4 ---- gnu/usr.bin/Makefile | 1 - share/mk/bsd.libnames.mk | 1 - share/mk/src.libnames.mk | 2 -- share/mk/src.opts.mk | 2 -- tools/build/mk/OptionalObsoleteFiles.inc | 26 ------------------------ tools/build/options/WITHOUT_BSD_GREP | 2 -- tools/build/options/WITHOUT_GNU_GREP | 3 --- tools/build/options/WITH_BSD_GREP | 2 -- tools/build/options/WITH_GNU_GREP | 3 --- usr.bin/grep/Makefile | 26 ++++++++---------------- 13 files changed, 22 insertions(+), 68 deletions(-) delete mode 100644 tools/build/options/WITHOUT_BSD_GREP delete mode 100644 tools/build/options/WITHOUT_GNU_GREP delete mode 100644 tools/build/options/WITH_BSD_GREP delete mode 100644 tools/build/options/WITH_GNU_GREP diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 27f59a7570802d..040e2115275bf1 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,20 @@ # xargs -n1 | sort | uniq -d; # done +# 20201225: libregex removed +OLD_FILES+=usr/lib/libgnuregex.so +OLD_LIBS+=usr/lib/libgnuregex.so.5 +OLD_FILES+=usr/lib/libgnuregex_p.a +OLD_FILES+=usr/include/gnu/posix/regex.h +OLD_DIRS+=usr/include/gnu/posix +OLD_FILES+=usr/include/gnu/regex.h +OLD_DIRS+=usr/include/gnu +OLD_FILES+=usr/include/gnuregex.h + +# 20201225: gnugrep removed +OLD_FILES+=usr/bin/gnugrep +OLD_FILES+=usr/share/man/man1/gnugrep.1.gz + # 20201224: mk48txx(4) removed OLD_FILES+=usr/share/man/man4/mk48txx.4.gz diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index ec71a7f4509fad..071fba7e87ac6f 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -167,10 +167,6 @@ virstor .. .. - gnu - posix - .. - .. gssapi .. infiniband diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index b31838503ded6c..1b42da3778830f 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -6,10 +6,6 @@ SUBDIR= SUBDIR.${MK_DIALOG}+= libdialog SUBDIR.${MK_TESTS}+= tests -.if ${MK_GNU_GREP} != "no" -SUBDIR+= libregex -.endif - SUBDIR_PARALLEL= .include diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index f0aff545ddc905..9910365a5b0a0c 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -4,7 +4,6 @@ SUBDIR.${MK_DIALOG}+= dialog SUBDIR.${MK_GNU_DIFF}+= diff3 -SUBDIR.${MK_GNU_GREP}+= grep SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index eba09ffa5fdaf8..feb7f4c4070ef1 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -67,7 +67,6 @@ LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${LIBDESTDIR}${LIBDIR_BASE}/libform.a LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a -LIBGNUREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index aa2ab42da62bf9..ee94279e0cca6b 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -117,7 +117,6 @@ _LIBRARIES= \ fetch \ figpar \ geom \ - gnuregex \ gpio \ gssapi \ gssapi_krb5 \ @@ -624,7 +623,6 @@ LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog -LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex LIBSSPDIR= ${OBJTOP}/lib/libssp LIBSSP_NONSHAREDDIR= ${OBJTOP}/lib/libssp_nonshared LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1 diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ef8a71a6ebb964..b87826781318c6 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -68,7 +68,6 @@ __DEFAULT_YES_OPTIONS = \ BOOTPARAMD \ BOOTPD \ BSD_CPIO \ - BSD_GREP \ BSDINSTALL \ BSNMP \ BZIP2 \ @@ -206,7 +205,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ - GNU_GREP \ HESIOD \ LIBSOFT \ LOADER_FIREWIRE \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index a3e353e5574bd7..2c554f5f58c35a 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2312,31 +2312,6 @@ OLD_FILES+=usr/bin/diff3 OLD_FILES+=usr/share/man/man1/diff3.1.gz .endif -.if ${MK_GNU_GREP} == no -OLD_FILES+=usr/bin/gnugrep -OLD_FILES+=usr/share/man/man1/gnugrep.1.gz -.if ${MK_BSD_GREP} == no -OLD_FILES+=usr/bin/bzgrep -OLD_FILES+=usr/bin/bzegrep -OLD_FILES+=usr/bin/bzfgrep -OLD_FILES+=usr/bin/egrep -OLD_FILES+=usr/bin/fgrep -OLD_FILES+=usr/bin/grep -OLD_FILES+=usr/bin/zegrep -OLD_FILES+=usr/bin/zfgrep -OLD_FILES+=usr/bin/zgrep -OLD_FILES+=usr/share/man/man1/bzegrep.1.gz -OLD_FILES+=usr/share/man/man1/bzfgrep.1.gz -OLD_FILES+=usr/share/man/man1/bzgrep.1.gz -OLD_FILES+=usr/share/man/man1/egrep.1.gz -OLD_FILES+=usr/share/man/man1/fgrep.1.gz -OLD_FILES+=usr/share/man/man1/grep.1.gz -OLD_FILES+=usr/share/man/man1/zegrep.1.gz -OLD_FILES+=usr/share/man/man1/zfgrep.1.gz -OLD_FILES+=usr/share/man/man1/zgrep.1.gz -.endif -.endif - .if ${MK_GSSAPI} == no OLD_FILES+=usr/include/gssapi/gssapi.h OLD_DIRS+=usr/include/gssapi @@ -7440,7 +7415,6 @@ OLD_FILES+=usr/lib/libformw_p.a OLD_FILES+=usr/lib/libgcc_eh_p.a OLD_FILES+=usr/lib/libgcc_p.a OLD_FILES+=usr/lib/libgeom_p.a -OLD_FILES+=usr/lib/libgnuregex_p.a OLD_FILES+=usr/lib/libgpio_p.a OLD_FILES+=usr/lib/libgssapi_krb5_p.a OLD_FILES+=usr/lib/libgssapi_ntlm_p.a diff --git a/tools/build/options/WITHOUT_BSD_GREP b/tools/build/options/WITHOUT_BSD_GREP deleted file mode 100644 index b598d8aca0128c..00000000000000 --- a/tools/build/options/WITHOUT_BSD_GREP +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Install GNU grep as '[ef]grep' instead of BSD grep. diff --git a/tools/build/options/WITHOUT_GNU_GREP b/tools/build/options/WITHOUT_GNU_GREP deleted file mode 100644 index 1bb7d4a53ebaf5..00000000000000 --- a/tools/build/options/WITHOUT_GNU_GREP +++ /dev/null @@ -1,3 +0,0 @@ -.\" $FreeBSD$ -Set to not build GNU -.Xr grep 1 . diff --git a/tools/build/options/WITH_BSD_GREP b/tools/build/options/WITH_BSD_GREP deleted file mode 100644 index e6641173e2d19a..00000000000000 --- a/tools/build/options/WITH_BSD_GREP +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Install BSD-licensed grep as '[ef]grep' instead of GNU grep. diff --git a/tools/build/options/WITH_GNU_GREP b/tools/build/options/WITH_GNU_GREP deleted file mode 100644 index 1d19a7df092c2d..00000000000000 --- a/tools/build/options/WITH_GNU_GREP +++ /dev/null @@ -1,3 +0,0 @@ -.\" $FreeBSD$ -Build and install GNU -.Xr grep 1 . diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index be3f095c1ad886..3210dffd71fbb2 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -4,17 +4,9 @@ .include -.if ${MK_BSD_GREP} == "yes" || defined(BOOTSTRAPPING) PROG= grep MAN1= grep.1 zgrep.1 -.else -PROG= bsdgrep -CLEANFILES+= bsdgrep.1 -MAN1= bsdgrep.1 zgrep.1 -bsdgrep.1: grep.1 - ${CP} ${.ALLSRC} ${.TARGET} -.endif SRCS= file.c grep.c queue.c util.c SCRIPTS= zgrep.sh @@ -33,6 +25,10 @@ LINKS= ${BINDIR}/zgrep ${BINDIR}/zfgrep \ ${BINDIR}/zgrep ${BINDIR}/zstdegrep \ ${BINDIR}/zgrep ${BINDIR}/zstdegrep +LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ + ${BINDIR}/grep ${BINDIR}/fgrep \ + ${BINDIR}/grep ${BINDIR}/rgrep \ + MLINKS= zgrep.1 zfgrep.1 \ zgrep.1 zegrep.1 \ zgrep.1 bzgrep.1 \ @@ -48,17 +44,11 @@ MLINKS= zgrep.1 zfgrep.1 \ zgrep.1 zstdegrep.1 \ zgrep.1 zstdfgrep.1 -CFLAGS.gcc+= --param max-inline-insns-single=500 - -.if ${MK_BSD_GREP} == "yes" || defined(BOOTSTRAPPING) -LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ - ${BINDIR}/grep ${BINDIR}/fgrep \ - ${BINDIR}/grep ${BINDIR}/rgrep \ +MLINKS+= grep.1 egrep.1 \ + grep.1 fgrep.1 \ + grep.1 rgrep.1 -MLINKS+= grep.1 egrep.1 \ - grep.1 fgrep.1 \ - grep.1 rgrep.1 -.endif +CFLAGS.gcc+= --param max-inline-insns-single=500 .if !defined(BOOTSTRAPPING) LIBADD+= regex