| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
r363679 is in-fact the future change referenced by the comment, helpfully
left and forgotten by kevans. Instead of just silently not matching, we
should now be erroring out with vigor.
Notes:
svn path=/head/; revision=363693
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'y' does not handle bracket expressions, treat '[' as ordinary character
and do not apply bracket expression checks (GNU sed agrees).
PR: 247931
Reviewed by: pfg, kevans
Tested by: antoine (exp-run), Quentin L'Hours <lhoursquentin@gmail.com>
Differential Revision: https://reviews.freebsd.org/D25640
Notes:
svn path=/head/; revision=363543
|
|
|
|
|
|
|
|
|
|
|
| |
This is visible when e.g. 8.20 is failing:
not ok 96 8.20 # \ in y command
8.20's comment should be '[ as an s delimiter and its escapes'.
Notes:
svn path=/head/; revision=363138
|
|
|
|
|
|
|
|
|
| |
Reported by: markj, yuripv
MFC after: 2 weeks
X-MFC-With: 362017
Notes:
svn path=/head/; revision=362071
|
|
|
|
|
|
|
|
|
|
| |
Reported by: yuripv
Approved by: pfg (src)
MFC after: 2 weeks
X-MFC-With: 362017
Notes:
svn path=/head/; revision=362039
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch teaches sed to interpret a "-" in a special way when given
as an argument to the -f flag.
This behavior is also present in GNU sed.
PR: 244872
Tested by: antoine (exp-run)
Reviewed by: pfg, tobik (older version)
Approved by: pfg (src)
Relnotes: yes
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24079
Notes:
svn path=/head/; revision=362017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Somewhat predictably, software often wants to use \x27/\x24 among others so
that they can decline worrying about ugly escaping, if said escaping is even
possible. Right now, this software is using these and getting the wrong
results, as we'll interpret those as x27 and x24 respectively. Some examples
of this, when an exp-run was ran, were science/octopus and misc/vifm.
Go ahead and process these at all times. We allow either one or two digits,
and the tests account for both. If extra digits are specified, e.g. \x2727,
then the third and fourth digits are interpreted literally as one might
expect.
PR: 229925
MFC after: 2 weeks
Notes:
svn path=/head/; revision=361884
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently, when the -u, -i and -I options where added to sed(1), it was
forgotten to add them to both lines in the SYNOPSIS section. They were only
added to the second line, although they apply to both.
With the updated SYNOPSIS, it is now allowed (and consistent) to run:
sed -i BAK s/foo/bar/g some_file
PR: 240556
Submitted by: Oliver Fromme
MFC after: 5 days
Notes:
svn path=/head/; revision=361248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is both reasonable and a common GNUism that a lot of ported software
expects.
Universally process \r, \n, and \t into carriage return, newline, and tab
respectively. Newline still doesn't function in contexts where it can't
(e.g. BRE), but we process it anyways rather than passing
UB \n (escaped ordinary) through to the underlying regex engine.
Adding a --posix flag to disable these was considered, but sed.1 already
declares this version of sed a super-set of POSIX specification and this
behavior is the most likely expected when one attempts to use one of these
escape sequences in pattern space.
This differs from pre-r197362 behavior in that we now honor the three
arguably most common escape sequences used with sed(1) and we do so outside
of character classes, too.
Other escape sequences, like \s and \S, will come later when GNU extensions
are added to libregex; sed will likely link against libregex by default,
since the GNU extensions tend to be fairly un-intrusive.
PR: 229925
Reviewed by: bapt, emaste, pfg
Differential Revision: https://reviews.freebsd.org/D22750
Notes:
svn path=/head/; revision=355590
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of them are needed to be able to boot to single user and be able
to repair a existing FreeBSD installation so put them directly into
FreeBSD-runtime.
Reviewed by: bapt, gjb
Differential Revision: https://reviews.freebsd.org/D21503
Notes:
svn path=/head/; revision=351855
|
|
|
|
|
|
|
|
|
|
|
| |
results file to the build.
Reviewed by: kevans
Approved by: kib (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17776
Notes:
svn path=/head/; revision=339955
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't just exit when encountering the 'q' command if we edit file
inplace, and give mf_fgets() a chance to actually handle the
inplace case.
Also add a regression test.
Submitted by: Yuri Pankov <yuripv@yuripv.net>
Approved by: re (kib)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D16798
Notes:
svn path=/head/; revision=338375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix is only partial and causes an asymmetry which breaks a test in
multi_test.sh.
We should consider both parts of the issue found in OpenBSD[1], but for now
just revert the change.
[1] http://undeadly.org/cgi?action=article;sid=20180728110010
Reported by: asomers
Notes:
svn path=/head/; revision=337920
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't generally support the weird case of regular expresions delimited
by an opening square bracket ('[') but POSIX says that inside
bracket expressions, escaping is not possible and both '[' and '\'
represent themselves.
PR: 230198 (exp-run)
Obtained from: OpenBSD
Notes:
svn path=/head/; revision=337419
|
|
|
|
| |
Notes:
svn path=/head/; revision=336929
|
|
|
|
|
|
|
|
|
| |
Hinted by: OpenBSD (CVS 1.32)
MFC after: 1 week
Notes:
svn path=/head/; revision=336926
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently some tools are not able to determine if all the cases of a
switch are covered. Make use of the attribute for cases like this.
Hinted by: DragonFlyBSD GGC8 (but fixed differently)
CID: 976552
Notes:
svn path=/head/; revision=336143
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Notes:
svn path=/head/; revision=326025
|
|
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=325188
|
|
|
|
|
|
|
|
|
| |
`SUBDIR.${MK_TESTS}+= tests` idiom.
This is a follow up to r321912.
Notes:
svn path=/projects/make-check-sandbox/; revision=321914
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .
No functional change intended.
MFC after: 1 weeks
Notes:
svn path=/head/; revision=321912
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the file by adding the global (g) option at the end. Without it, only the
first match is replaced, subsequent ones are ignored. The intention of the
example is to demonstrate something else, but adding the g matches the example
to what the description says.
Discussed with: brd (on IRC)
MFC after: 1 week
Notes:
svn path=/head/; revision=317378
|
|
|
|
|
|
|
|
|
| |
Reviewed by: wblock, bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9958
Notes:
svn path=/head/; revision=316030
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
Notes:
svn path=/head/; revision=314436
|
|
|
|
|
|
|
|
|
|
|
|
| |
The S_ISREG check was restored, such that the code will again fail with
in-place replacements on symlinks
MFC after: 12 days
X-MFC with: r313277
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=313397
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use S_ISREG instead of manual & (also it's better to compare the
result from & and the pattern instead of just assuming it's one bit
value).
Pointed out by Tianjie Mao <tjmao tjmao com>.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4827
Notes:
svn path=/head/; revision=313277
|
|
|
|
|
|
|
|
|
|
|
| |
The symlink testcase is expected to fail, post-r312519 (the revert of
r312404); mark it so.
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=312521
|
|
|
|
|
|
|
|
|
|
|
|
| |
suite as usr.bin/sed/sed_test
Don't expect :emptybackref to fail -- it succeeds on FreeBSD
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=312520
|
|
|
|
|
|
|
|
|
| |
rely on the previous behavior.
Requested by: antonie (portmgr)
Notes:
svn path=/head/; revision=312519
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
result from & and the pattern instead of just assuming it's one bit
value).
Pointed out by Tianjie Mao <tjmao tjmao com>.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4827
Notes:
svn path=/head/; revision=312404
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r297602, which included a __FreeBSD_version bump to 1100105, we changed
sed 'i' and 'a' from discarding whitespaces to conform with what GNU and
sysvish sed do.
There are arguments in favor of keeping the old behavior but the new
behavior is also useful for migration purposes. It seems important to at
least consider the case of developers depending on the previous behavior,
so add a CFLAG to enable the old behaviour.
PR: 213474
MFC after: 5 days
Notes:
svn path=/head/; revision=308314
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While big, the change was meant to have no effect on behavior and instead
so far we have found two regressions: one in the etcupdate tests and
another one in the games/openttd port[1].
Revert to a known working state. We will likely have to split the patch in
functional parts before bringing back the changes.
PR: 195929
Reported by: danfe, madpilot [1]
Notes:
svn path=/head/; revision=303662
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'\n' was specifically added to -e arguments prior to r303047. Restore
historical behavior which in turn fixes usr.sbin/etcupdate/preworld_test:main .
The fix is being committed to address the issue in the short term and may be
iterated upon as noted in bug 211399
Discussed with: mi, pfg
Differential Revision: https://reviews.freebsd.org/D7368
PR: 195929, 211399 [*]
MFC after: 18 days
X-MFC with: r303047
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=303572
|
|
|
|
|
|
|
|
| |
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=303538
|
|
|
|
| |
Notes:
svn path=/head/; revision=303526
|
|
|
|
|
|
|
|
|
| |
POSIX allows these functions to modify their input buffer, so that they
have storage for the return value. Pull copies of the filename before
calling these utility functions.
Notes:
svn path=/head/; revision=303443
|
|
|
|
|
|
|
|
|
|
| |
It passes out of the box today
MFC after: 2 months
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=303367
|
|
|
|
| |
Notes:
svn path=/head/; revision=303146
|
|
|
|
|
|
|
|
|
|
|
| |
Const-ify several variables, make it build cleanly with WARNS level 5.
Submitted by: mi
PR: 195929
MFC after: 1 month
Notes:
svn path=/head/; revision=303047
|
|
|
|
|
|
|
|
|
|
|
| |
Detected by running the gsed tests.
Submitted by: Mikhail Teterin
PR: 195929
MFC after: 3 days
Notes:
svn path=/head/; revision=302973
|
|
|
|
|
|
|
|
|
|
| |
This was causing some strange behaviour.
Reported by: olivier
Obtained from: OpenBSD (CVS rev. 1.28)
Notes:
svn path=/head/; revision=301138
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summarizing the findings in the OpenBSD list:
This solves a reproduceable issue with very recent Mesa where REG_NOTBOL
combined with a match at the begin of the string causes our regex library
to treat the word as not begin of word.
Thanks to Martijn van Duren and Ingo Schwarze for taking the time to
solve this in the least invasive way.
PR: 209352, 209387
Taken from: openbsd-tech (Martijn van Duren)
MFC after: 1 month
Notes:
svn path=/head/; revision=300684
|
|
|
|
|
|
|
|
|
|
|
| |
Use the capital I instead of the lowercase.
Submitted by: Mikhail T.
PR: 195929
MFC after: 2 weeks
Notes:
svn path=/head/; revision=299377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplify redundant malloc'ing in sed -e.
It is causing havoc in the ports tree:
===> Configuring for wxsvg-1.5.7
sed: 1: "/gcc_dir=\\`/s/gcc /$CC /": bad flag in substitute command: '/'
*** Error code 1
===> Patching for vips-8.3.1
sed: 1: "1s|^#![[:space:]]*/usr/ ...": bad flag in substitute command: 's'
*** Error code 1
PR: 195929
Reported by: danilo
Notes:
svn path=/head/; revision=299294
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When encountering an -e argument, sed currently mallocs a string to COPY
the optarg -- with '\n' appended. The appendage does not seem necessary --
indeed, the same call to add_compunit processing the sole command (given
without -e) passes the *argv verbatim: without making a copy, and without
appending newline.
This matches what is done in other BSDs.
Submitted by: Mikhail T.
PR: 195929
MFC after: 2 weeks
Notes:
svn path=/head/; revision=299279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the main loop of the "sed s/..." command, shortening it by ten
lines and simplifying it by removing the switch statement implementing
/g, /1, and /2 separately and repetitively.
This will be needed to bring a fix from OpenBSD later.
Obtained from: OpenBSD (schwarze CVS Rev. 1.18)
MFC after: 3 weeks
Notes:
svn path=/head/; revision=299211
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=299094
|
|
|
|
|
|
|
|
|
| |
No functional change, only trivial cases are done in this sweep,
Discussed in: freebsd-current
Notes:
svn path=/head/; revision=298440
|
|\
| |
| |
| |
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/projects/release-pkg/; revision=297605
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This appears to be implementation dependent but convenient and makes
our sed behave more like GNU sed.
Given that it is not the historic behavior, bump FreeBSD_version
should userland/ports somehow depend on it.
Obtained from: NetBSD (bin/49872)
Reviewed by: bdrewery
PR: 208554
Merge after: NEVER
Notes:
svn path=/head/; revision=297602
|