aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/grep
Commit message (Collapse)AuthorAgeFilesLines
* gnu: remove gnugrep and libgnuregexKyle Evans2020-12-2564-17979/+0
| | | | Differential Revision: https://reviews.freebsd.org/D27732
* build: provide a default WARNS for all in-tree buildsKyle Evans2020-09-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current default is provided in various Makefile.inc in some top-level directories and covers a good portion of the tree, but doesn't cover parts of the build a little deeper (e.g. libcasper). Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that variable is defined. This lets us relatively cleanly provide a default WARNS no matter where you're building in the src tree without breaking things outside of the tree. Crunchgen has been updated as a bootstrap tool to work on this change because it needs r365605 at a minimum to succeed. The cleanup necessary to successfully walk over this change on WITHOUT_CLEAN builds has been added. There is a supplemental project to this to list all of the warnings that are encountered when the environment has WARNS=6 NO_WERROR=yes: https://warns.kevans.dev -- this project will hopefully eventually go away in favor of CI doing a much better job than it. Reviewed by: emaste, brooks, ngie (all earlier version) Reviewed by: emaste, arichardson (depend-cleanup.sh change) Differential Revision: https://reviews.freebsd.org/D26455 Notes: svn path=/head/; revision=365887
* grep(1) outputs NOT-matched lines with multi-byte charactersPedro F. Giffuni2019-01-101-9/+22
| | | | | | | | PR 113343 MFC after: 2 months Notes: svn path=/head/; revision=342910
* Use a script wrapper for <compress>grepBaptiste Daroussin2018-04-251-13/+0
| | | | | | | | | | | | | | | | | | | | | Import the wrapper script from zstdgrep (written by wiz@netbsd.org) Modify it to support more than just zstd (adding support for gzip, lzma, xz and bzip2) Write a simple manpage dedicated for it. Only use that new wrapper both for gnu grep and bsd grep Next step will be removing code related to compression format from bsdgrep Reviewed by: kevans Approved by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15193 Notes: svn path=/head/; revision=332993
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Utilize SYSROOT from r320119 in places where DESTDIR may be wanting WORLDTMP.Bryan Drewery2017-06-191-1/+1
| | | | | | | | | | | | | | Since buildenv exports SYSROOT all of these uses will now look in WORLDTMP by default. sys/boot/efi/loader/Makefile A LIBSTAND hack is no longer required for buildenv. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320122
* Back out non-collating [a-z] ranges.Andrey A. Chernov2016-07-141-5/+0
| | | | | | | | | | | Instead of changing the whole course to another POSIX-permitted way for consistency and uniformity I decide to completely ignore missing regex fucntionality and focus on fixing bugs in what we have now, too many small obstacles we have choicing other way, counting ports. Corresponding libc changes are backed out in r302824. Notes: svn path=/head/; revision=302833
* After removing collation for [a-z] ranges in r302512, do it here too.Andrey A. Chernov2016-07-131-0/+5
| | | | | | | | | | | | | | Instead of trying to expand whole range at regcomp() stage as we do, GNU regex allocates separate ranges [start,end] set each character is checked against, so collation is possible and turned on for ranges here. When something like that will be implemented or our obsoleted regex code will be replaced to something like TRE, and in case we decide to use collation in [a-z] ranges, all changes related to r302512 can be backed out, but now we need consistency. Notes: svn path=/head/; revision=302781
* gnugrep: Update the configuration.Pedro F. Giffuni2016-05-221-2/+2
| | | | | | | | | The only effect is that it will use our native iconv(3). Relnotes: yes Notes: svn path=/head/; revision=300435
* META MODE: Update dependencies with 'the-lot' and add missing directories.Bryan Drewery2015-12-011-0/+2
| | | | | | | | | | | | | | | | | This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291563
* Include "system.h" for isdir() prototype.Craig Rodrigues2015-11-041-0/+1
| | | | | | | | Submitted by: bofh Differential Revision: https://reviews.freebsd.org/D2711 Notes: svn path=/head/; revision=290350
* META_MODE: Remove DEP_MACHINE from Makefile.depend files.Bryan Drewery2015-09-251-2/+0
| | | | | | | | | This has not been needed since r246865 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288228
* META_MODE: Remove DEP_RELDIR from Makefile.depend files.Bryan Drewery2015-09-251-2/+0
| | | | | | | | | This has not been needed since r284171 in projects/bmake. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=288226
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * Merge sync of headSimon J. Gerraty2015-05-274-2107/+3
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-191-0/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ Merge from headSimon J. Gerraty2013-09-053-14/+18
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ Sync with HEAD.David E. O'Brien2013-02-081-2/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | Add a ${CP} alias for copying files in the build.Will Andrews2015-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users build FreeBSD as non-root in Perforce workspaces. By default, Perforce sets files read-only unless they're explicitly being edited. As a result, the -f argument must be used to cp in order to override the read-only flag when copying source files to object directories. Bare use of 'cp' should be avoided in the future. Update all current users of 'cp' in the src tree. Reviewed by: emaste MFC after: 1 week Sponsored by: Spectra Logic Notes: svn path=/head/; revision=277273
* | | | | | Remove GNU texinfo from base along with all info pages.Baptiste Daroussin2015-01-024-2102/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be able to info pages consider installing texinfo from ports print/texinfo or via pkg: pkg install texinfo Differential Revision: https://reviews.freebsd.org/D1409 Reviewed by: emaste, imp (previous version) Relnotes: yes Notes: svn path=/head/; revision=276551
* | | | | | Convert to LIBADDBaptiste Daroussin2014-11-251-4/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275077
* | | | | Add gnugrep.1 to CLEANFILES.Glen Barber2014-08-261-0/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270668
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | | Part of r245761 makes "grep -D skip" broken for pipes, i.e.Andrey A. Chernov2013-08-081-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | echo xxx | grep -D skip xxx returns nothing. Instead of just removing added S_ISFIFO condition (originally absent in this version of grep), make it work as latest GNU version does: don't skip directories and devices if fd == STDIN_FILENO. Notes: svn path=/head/; revision=254093
* | | Adjust CFLAGS to pick up correct regex.h and posix/regex.h. Note thisJung-uk Kim2013-06-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | actually reverts r250860 and r250861. Reported by: gjb, tinderbox Notes: svn path=/head/; revision=251468
* | | Connect libgnuregex 2.17 to the build.Jung-uk Kim2013-06-051-1/+2
| | | | | | | | | | | | Notes: svn path=/head/; revision=251438
* | | Don't look for headers outside of the source or object directories. InMarcel Moolenaar2013-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | particular, don't use DESTDIR. Such creates an unnecessary dependency on the build machine. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=250861
* | | grep: change some int types.Pedro F. Giffuni2013-05-203-9/+11
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change several int variables to size_t, ssize_t, or ptrdiff_t. This should fix the bug described in CVE-2012-5667 when an input line is so long that its length cannot be stored in an int variable. This is based on NetBSD's revision which says: This change to NetBSD's version of GNU grep 2.5.1 (licenced under GPLv2) was made without direct reference to any code licenced under GPLv3. Obtained from: NetBSD MFC after: 3 days Notes: svn path=/head/; revision=250823
* | Make "-D skip" option work with FIFO by opening file in non-blocking mode.David Xu2013-01-221-2/+6
|/ | | | | | | | Reviewed by: jhb Tested by: delphij Notes: svn path=/head/; revision=245761
* Build and install a BSD licensed grep.David E. O'Brien2011-05-251-0/+15
| | | | | | | | | | | If WITH_BSD_GREP is not set, it will be 'bsdgrep' and GNUgrep will be '[ef]grep'. Otherwise, BSD-grep will be the grep family, and GNUgrep will be 'gnugrep'. Discussed with: brooks Notes: svn path=/head/; revision=222273
* For files not named on the command line, only the basename is comparedDavid E. O'Brien2009-01-301-2/+5
| | | | | | | | | | | | to the exclude pattern. Change this so that "grep --exclude='*/.svn/*' -[Rr] foo *" DWIM. Obtained from: dave+news001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Dave Gibson) Obtained from: comp.unix.questions [Thu, 15 Mar 2007 18:54:38 +0000] Obtained from: http://unix.derkeiler.com/Newsgroups/comp.unix.questions/2007-03/msg00046.html Notes: svn path=/head/; revision=187907
* Add the -P option back, but with a note that it is not supported on FreeBSD.Tom Rhodes2006-10-111-0/+6
| | | | | | | Requested by: ru Notes: svn path=/head/; revision=163231
* grep -P xxx file.txtTom Rhodes2006-10-101-5/+0
| | | | | | | | | | "The -P option is not supported" Removed from the manual page via this commit. PR: 99831 Notes: svn path=/head/; revision=163188
* Correctly locate the character preceeding the matched string in -wTim J. Robbins2006-02-191-5/+35
| | | | | | | | | mode when in non-UTF-8 multibyte locales (e.g. EUC, GB2312, etc.). PR: 91909 Notes: svn path=/head/; revision=155829
* Fix a markup nit.Ruslan Ermilov2005-12-181-0/+1
| | | | | | | | PR: docs/88848 Prodded by: remko Notes: svn path=/head/; revision=153507
* Fix 'grep -Fw' for encodings other than UTF-8 (RH bug #161700).Tim J. Robbins2005-10-251-2/+2
| | | | | | | | PR: 87969 Obtained from: Fedora (Tim Waugh) Notes: svn path=/head/; revision=151647
* Document [:blank:].Stefan Farfeleder2005-10-231-0/+1
| | | | Notes: svn path=/head/; revision=151584
* Remove redundant string length check from the previous commit.Jung-uk Kim2005-10-211-2/+2
| | | | Notes: svn path=/head/; revision=151534
* Fix a longstanding buglet in bz-prefixed grep(1).Jung-uk Kim2005-10-201-5/+5
| | | | Notes: svn path=/head/; revision=151527
* Pass the RE_ICASE flag to re_set_syntax() as appropriate to fixTim J. Robbins2005-05-311-3/+3
| | | | | | | | | case-insensitive matching (-i option) in certain multibyte locales. Obtained from: Fedora Notes: svn path=/head/; revision=146820
* Add a note explaining what local modifications have been made to GNU grep,Tim J. Robbins2005-05-141-0/+37
| | | | | | | and giving advice on importing future releases. Notes: svn path=/head/; revision=146208
* Fixed -w handling for EGexecute.Tim J. Robbins2005-05-141-4/+83
| | | | | | | Obtained from: Fedora (Tim Waugh) Notes: svn path=/head/; revision=146207
* Automatically disable DFA when processing multibyte input. GREP_USE_DFATim J. Robbins2005-05-141-3/+28
| | | | | | | | | environment variable overrides. Obtained from: Fedora (Tim Waugh) Notes: svn path=/head/; revision=146206
* Better multibyte handling in EGexecute() and Fexecute(). Fixed -Fi forTim J. Robbins2005-05-141-131/+525
| | | | | | | | | multibyte input (RH bug #143079). Obtained from: Fedora (Jakub Jelinek, Tim Waugh) Notes: svn path=/head/; revision=146205
* Removed redundant (and incorrect) code in prline. Fixes grep -i --color "",Tim J. Robbins2005-05-141-27/+0
| | | | | | | | | | among other things. PR: 79063 Obtained from: Fedora (Tim Waugh) Notes: svn path=/head/; revision=146204
* Fix background colour problems with --color output (RH bug #138913).Tim J. Robbins2005-05-141-0/+1
| | | | | | | Obtained from: Karsten Hopp via Fedora Notes: svn path=/head/; revision=146203
* Fixed a bug in the fgrep patch, exposed by the dfa-optional patchTim J. Robbins2005-05-141-27/+22
| | | | | | | | | (RH bug #138558). Removed bogus part of grep-2.5.1-fgrep patch. Obtained from: Fedora (Jakub Jelinek, Tim Waugh) Notes: svn path=/head/; revision=146201
* Fix dfa multibyte character class matching when -i is used (RH bug #123363).Tim J. Robbins2005-05-141-0/+2
| | | | | | | Obtained from: Fedora (Tim Waugh) Notes: svn path=/head/; revision=146200