[DragonFlyBSD - Submit #2966] (New) freebsd 11 grep version 2.5.1

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Wed Nov 9 12:54:08 PST 2016


Issue #2966 has been reported by htse.

----------------------------------------
Submit #2966: freebsd 11 grep version 2.5.1
http://bugs.dragonflybsd.org/issues/2966

* Author: htse
* Status: New
* Priority: Normal
* Assignee: 
* Category: Userland
* Target version: 4.2.x
----------------------------------------
What? FreeBSD 11 grep executable from their userland, BSD license. ( FreeBSD: stable/11/usr.bin/grep/grep.c 280307 2015-03-21 00:21:30Z pfg )
why? because I saw it on this page as TODO: https://www.dragonflybsd.org/docs/developer/ProjectsPage/



* MAKEFILE *
Makefile has options to disable LZMA and bzip2 support (default = yes)
grep/Makefile:
MK_LZMA_SUPPORT =  "yes"/"no"
MK_BZIP2_SUPPORT = "yes"/"no"

NLS contingent on NLS being defined otherwise CFLAGS+= -DWITHOUT_NLS



* MISSING OPTION *
MK_GNU_GREP_COMPAT not done/verified right now since I didn't knew if it made sense to keep if/when you can still have gnu grep as well :/ (kindly advise)
grep/Makefile:
# .if ${MK_GNU_GREP_COMPAT} != "no"
#CFLAGS+= -I${DESTDIR}/usr/include/gnu
#LIBADD+=       gnuregex
# .endif



* CHANGE TO ORIGINAL FUNCTIONALITY *
grep/util.c:146
I silenced a recursive warning message because it prints "warning: %s: recursive directory loop" to regular output, not stderr (rendering 2>/dev/null 
useless), if it would be better I'll check the warnx outputting function to see if I can redirect it to stderr. GNU grep does not print anything here either, I checked the source.

I haven't removed anything that compiled contrib gnu grep afaik, that might need to be checked



* INSTALLED EXECUTABLES *
/usr/bin:
[always]
grep fgrep egrep zgrep zegrep zfgrep

[MK_LZMA_SUPPORT]
lzegrep lzgrep  xzegrep xzgrep lzfgrep xzfgrep

[MK_BZIP2_SUPPORT]
bzegrep bzgrep bzfgrep

(which are all symlinks to grep binary) 



* INSTALLED MANPAGES *
/usr/share/man/man1:
egrep.1.gz zfgrep.1.gz bzegrep.1.gz lzgrep.1.gz xzfgrep.1.gz zgrep.1.gz lzfgrep.1.gz
xzgrep.1.gz fgrep.1.gz zegrep.1.gz bzgrep.1.gz xzegrep.1.gz bzfgrep.1.gz
pgrep.1.gz lzegrep.1.gz grep.1.gz


* TESTING *
This grep was used by me through a few reboot and multiple make clean/buildkernel/buildworld as well as random personal usage. No errors were detected, nothing broke. 


As always, I welcome all critiques and comments so I can learn and grow.

---Files--------------------------------
freebsd_grep.patch (136 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Submit mailing list