[issue2120] zgrep command missing on leaf

YONETANI Tomokazu y0n3t4n1 at gmail.com
Tue Sep 27 22:43:55 PDT 2011


On Tue, Sep 27, 2011 at 10:12:23PM +0000, Thomas Nikolajsen (via DragonFly issue tracker) wrote:
> 
> Thomas Nikolajsen <thomas.nikolajsen at mail.dk> added the comment:
> 
> What is best way to resolve this?
> 
> I see three options:
> 1) revert to previous grep;
> I'm not aware of any benefit from upgrading.

I'm fond of --color option in the newer grep program :)

> 2) install other zgrep (etc) program in base
> 3) accept missing zgrep (etc) and document in UPDATING

When we switched to libz-based gzip, we also obtained the z*grep script
in our tree, but it didn't work because our grep program was too old,
and it natively supported gzip'ped files, so simply the script wasn't
needed to be installed.  The gzip support in grep was probably FreeBSD-
local modification, so someone can merge it for the new version, too,
but until that happens, here's a small patch to re-activate the z*grep
script.  I can commit it later today, if there's no objection.

diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc
index d43f64f..1a09924 100644
--- a/Makefile_upgrade.inc
+++ b/Makefile_upgrade.inc
@@ -1588,15 +1588,6 @@ TO_REMOVE+=/usr/share/man/cat9/memoryallocators.9.gz
 TO_REMOVE+=/usr/share/man/man9/memoryallocators.9.gz
 TO_REMOVE+=/usr/share/man/cat4/rc.4.gz
 TO_REMOVE+=/usr/share/man/man4/rc.4.gz
-TO_REMOVE+=/usr/bin/zegrep
-TO_REMOVE+=/usr/share/man/cat1/zegrep.1.gz
-TO_REMOVE+=/usr/share/man/man1/zegrep.1.gz
-TO_REMOVE+=/usr/bin/zfgrep
-TO_REMOVE+=/usr/share/man/cat1/zfgrep.1.gz
-TO_REMOVE+=/usr/share/man/man1/zfgrep.1.gz
-TO_REMOVE+=/usr/bin/zgrep
-TO_REMOVE+=/usr/share/man/cat1/zgrep.1.gz
-TO_REMOVE+=/usr/share/man/man1/zgrep.1.gz
 TO_REMOVE+=/usr/include/dev/disk/mpt/mpilib/fc_log.h
 TO_REMOVE+=/boot/kernel/ipl.ko
 TO_REMOVE+=/etc/periodic/security/510.ipfdenied
diff --git a/usr.bin/gzip/Makefile b/usr.bin/gzip/Makefile
index 38e8d05..9fe453a 100644
--- a/usr.bin/gzip/Makefile
+++ b/usr.bin/gzip/Makefile
@@ -2,7 +2,7 @@
 # $DragonFly: src/usr.bin/gzip/Makefile,v 1.5 2007/08/27 16:50:54 pavalos Exp $
 
 PROG=		gzip
-MAN=		gzip.1 gzexe.1 zdiff.1 zforce.1 zmore.1 znew.1
+MAN=		gzip.1 gzexe.1 zdiff.1 zforce.1 zgrep.1 zmore.1 znew.1
 
 DPADD=		${LIBZ}
 LDADD=		-lz
@@ -19,18 +19,22 @@ LDADD+=		-lbz2
 CFLAGS+=	-DNO_BZIP2_SUPPORT
 .endif
 
-SCRIPTS=	gzexe zdiff zforce zmore znew
+SCRIPTS=	gzexe zdiff zforce zgrep zmore znew
 
 MLINKS+=	gzip.1 gunzip.1 \
 		gzip.1 gzcat.1 \
 		gzip.1 zcat.1 \
 		zdiff.1 zcmp.1 \
+		zgrep.1 zegrep.1 \
+		zgrep.1 zfgrep.1 \
 		zmore.1	zless.1
 
 LINKS+=		${BINDIR}/gzip ${BINDIR}/gunzip \
 		${BINDIR}/gzip ${BINDIR}/gzcat \
 		${BINDIR}/gzip ${BINDIR}/zcat \
 		${BINDIR}/zdiff ${BINDIR}/zcmp \
+		${BINDIR}/zgrep ${BINDIR}/zegrep \
+		${BINDIR}/zgrep ${BINDIR}/zfgrep \
 		${BINDIR}/zmore ${BINDIR}/zless
 
 .include <bsd.prog.mk>





More information about the Bugs mailing list