summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313955 (emaste):gjb2017-05-221-0/+2
| | | | | | | | | | | bsdgrep: document ignored option -u MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if running on an UNIX system." The option has no effect on systems that do not use CRLF line endings. PR: 171200 Sponsored by: The FreeBSD Foundation
* MFC r303676:dim2016-08-091-1/+1
| | | | | | | | | | | | | | Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" or "+" (these are invalid, because there is no preceding operand). When bsdgrep attempts to emulate GNU grep in discarding and ignoring the invalid ? or + operators, some later logic in tre_compile_fast() goes beyond the end of the buffer, leading to a crash. Fix this by bailing out, and reporting a bad pattern instead. Approved by: re (gjb, kib) Reported by: Steve Kargl
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-041-31/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* MFHgjb2016-03-141-1/+1
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Fix a bug in bsdgrep that caused the program to hang in a tight loop forian2016-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some combinations of command line options and search patterns. The code was examining regexec flags looking for a regcomp flag value. The fix is to look in the struct field where the decoded regcomp flag was stored when the regex was compiled. With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep extensions). It now passes the kyua tests except for one test that requires the -z/--null-data gnu extension, and one test involving outputting context lines across multiple files which appears to sometimes output an extra delimiter line ("--") between matches (a rather obscure failure of a rather obscure feature, so bsdgrep should be generally usable now).
* | MFHgjb2016-03-101-0/+11
|\ \ | |/ | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Connect MK_TESTS.bdrewery2016-03-091-0/+11
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-7/+3
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* Bump GCC max-inline-insns-single in libiconv_modules and greppfg2015-07-261-0/+2
| | | | | | | This is required by our FORTIFY_SOURCE implementation as it does more inlining. As a rule of thumb, FORTIFY_SOURCE doubles the number of inlines except that in grep inlining blows up for some reason.
* new dependssjg2015-06-161-1/+0
|
* Add META_MODE support.sjg2015-06-132-0/+26
|\ | | | | | | | | | | | | | | | | | | | | 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
| * Avoid bogus MLINKS when MK_LZMA_SUPPORT=yes and MK_BSD_GREP=nosjg2015-06-081-0/+2
| |
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-274-38/+55
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-194-3/+48
| |\
| * \ Merge head from 7/28sjg2014-08-194-9/+21
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge from headsjg2014-05-081-1/+1
| |\ \ \
| * \ \ \ Merge headsjg2014-04-285-34/+34
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-052-3/+3
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| * | | | | | Sync with HEAD.obrien2013-02-086-11/+36
| |\ \ \ \ \ \
| | \ \ \ \ \ \
| | \ \ \ \ \ \
| *-. \ \ \ \ \ \ Sync from headsjg2012-11-042-5/+6
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+23
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | bsdgrep: fix regression in the -f option since r268799pfg2015-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caused by an incomplete merge from NetBSD. PR: 198725 MFC after: 3 days
* | | | | | | | | Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != nongie2015-01-301-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
* | | | | | | | | Fix xz handling for files larger than 32K.delphij2015-01-211-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Stefan Ehmann <shoesoft gmx net> PR: bin/186861 MFC after: 2 weeks
* | | | | | | | | Add a ${CP} alias for copying files in the build.will2015-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
* | | | | | | | | Convert to usr.bin/ to LIBADDbapt2014-11-251-8/+4
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | | Integrate usr.bin/grep/tests from NetBSD into atf/kyuangie2014-10-092-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | | | | | | | bsdgrep: Work-around for segmentation fault.pfg2014-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix by David Carlier. Obtained from: HardenedBSD PR: 167921 MFC after: 1 month
* | | | | | | | Fix incremental builds involving non-root users with read-only source files.will2014-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefiles should not assume that source files can be overwritten. This is the common case for Perforce source trees. This is a followup commit to r211243 in the same vein. MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: r1036319 on 2014/01/29, r1046711 on 2014/03/06
* | | | | | | | - Do not look for more matching lines if -L is specifiedgabor2014-08-181-1/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: eadler (based on) MFC after: 2 weeks
* | | | | | | grep: fix some memory leaks.pfg2014-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add memory leak fix missing from r268799. Obtained from: NetBSD
* | | | | | | grep: fix some memory leaks.pfg2014-07-172-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring a couple of changes from NetBSD: queue.c (CVS Rev. 1.4. 1.5) Fix memory leaks. NULL does not need a cast. grep.c (CVS Rev. 1.6) Use the more portable getline. Obtained from: NetBSD MFC after: 3 days
* | | | | | | grep: Fix type.pfg2014-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: NetBSD (CVS rev. 1.17) MFC after: 3 days
* | | | | | | Fix a bug in bsdgrep(1) where patterns are not correctlygjb2014-06-201-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detected. Certain criteria must be met for this bug to show up: * the -w flag is specified, and * neither -o or --color are specified, and * the pattern is part of another word in the line, and * the other word that contains the pattern occurs first PR: 181973 MFC after: 3 days Sponsored by: The FreeBSD Foundation
* | | | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | from the latter.
* | | | | Various style(9) fixes and typos in grep, sort and patch.pfg2014-04-213-29/+29
| | | | | | | | | | | | | | | | | | | | MFC after: 3 days
* | | | | Don't test WITHOUT_FOO in program makefiles, test MK_FOO instead.imp2014-04-011-4/+4
| | | | |
* | | | | mdoc: minor paragraph fixes.joel2014-02-081-1/+1
| |_|_|/ |/| | |
* | | | grep -i does not work for simple patterns and single byte locales, likeache2013-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LANG=ru_RU.KOI8-R grep -i <some single KOI8-R letter> Fix it. MFC after: 3 days
* | | | Adjust CFLAGS to pick up correct regex.h and posix/regex.h. Note thisjkim2013-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | actually reverts r250860 and r250861. Reported by: gjb, tinderbox
* | | | Revert r246917, as it is causing incorrect behaviour as reported onmarkj2013-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | freebsd-current. PR: bin/175213 Approved by: emaste (co-mentor)
* | | | Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is amarkj2013-02-171-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | valid index into the input buffer. PR: bin/175213 Reviewed by: gabor Approved by: emaste (co-mentor) MFC after: 1 week
* | | - Avoid unnecessary strdup()gabor2013-01-201-2/+2
| | | | | | | | | | | | | | | Submitted by: ache MFC after: 5 days
* | | Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".obrien2013-01-082-5/+19
| | | | | | | | | | | | | | | | | | Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255. Obtained from: Juniper Networks
OpenPOWER on IntegriCloud