From owner-svn-src-all@freebsd.org Fri Apr 21 14:50:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8874D48182; Fri, 21 Apr 2017 14:50:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B74A18D5; Fri, 21 Apr 2017 14:50:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3LEoTEK039854; Fri, 21 Apr 2017 14:50:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3LEoTIl039851; Fri, 21 Apr 2017 14:50:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201704211450.v3LEoTIl039851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 21 Apr 2017 14:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317255 - in head: share/man/man5 share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2017 14:50:30 -0000 Author: emaste Date: Fri Apr 21 14:50:29 2017 New Revision: 317255 URL: https://svnweb.freebsd.org/changeset/base/317255 Log: bsdgrep: disable GNU_GREP_COMPAT by default The GNU extension bits in the base system are old, no longer faithful to upstream, and surprising in some regards. Switch to documenting WITH_GNU_GREP_COMPAT and default GNU_GREP_COMPAT to OFF in the name of good behavior. According to http://www.regular-expressions.info, GNU extensions: - Add missing quantifiers to BREs: \?, \+ - Add branching to BREs: \| - Add backreferences (\1 through \9) to EREs - Add \w, \W, \s, and \S corresponding to :alnum:, [^[:alnum:]], :space:, and [^[:space:]] respectively - Add word boundaries and anchors: \b: word boundary \B: not word boundary \<: Strt of word \>: End of word \`: Start of subject string \': End of subject string These extensions are still available in /usr/bin/grep by default today, as it is still GNU grep. As part of the bsdgrep migration plan these extensions may be added to bsdgrep's regex support if necessary. Submitted by: Kyle Evans Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10114 Added: head/tools/build/options/WITH_GNU_GREP_COMPAT (contents, props changed) Modified: head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Apr 21 14:36:09 2017 (r317254) +++ head/share/man/man5/src.conf.5 Fri Apr 21 14:50:29 2017 (r317255) @@ -732,9 +732,10 @@ and .It Va WITHOUT_GNU_GREP Set to not build GNU .Xr grep 1 . -.It Va WITHOUT_GNU_GREP_COMPAT -Set this option to omit the gnu extensions to grep from being included in -BSD grep. +.It Va WITH_GNU_GREP_COMPAT +Set this option to include GNU extensions in +.Xr bsdgrep 1 +by linking against libgnuregex. .It Va WITHOUT_GPIO Set to not build .Xr gpioctl 8 Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Apr 21 14:36:09 2017 (r317254) +++ head/share/mk/src.opts.mk Fri Apr 21 14:50:29 2017 (r317255) @@ -99,7 +99,6 @@ __DEFAULT_YES_OPTIONS = \ GCOV \ GNU_DIFF \ GNU_GREP \ - GNU_GREP_COMPAT \ GPIO \ GPL_DTC \ GROFF \ @@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ CLANG_EXTRAS \ DTRACE_TESTS \ + GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ NAND \ Added: head/tools/build/options/WITH_GNU_GREP_COMPAT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_GNU_GREP_COMPAT Fri Apr 21 14:50:29 2017 (r317255) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set this option to include GNU extensions in +.Xr bsdgrep 1 +by linking against libgnuregex.