Bug 244872 (sed-f-) - Read commands from stdin when -f - is passed to sed(1)
Summary: Read commands from stdin when -f - is passed to sed(1)
Status: Closed FIXED
Alias: sed-f-
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mateusz Piotrowski
URL: https://reviews.freebsd.org/D24079
Keywords: patch-ready
Depends on:
Blocks:
 
Reported: 2020-03-17 22:29 UTC by Mateusz Piotrowski
Modified: 2020-06-27 14:32 UTC (History)
3 users (show)

See Also:
antoine: exp-run+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer freebsd_triage 2020-03-17 22:29:42 UTC
This patch teaches sed to interpret the a file name of "-" in
a special way when given to the -f flag. 

This behavior is present in GNU sed.

pfg@ suggested in the Phabricator review to request an exp-run for this change.

Phabricator:
https://reviews.freebsd.org/D24079
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2020-03-22 22:03:15 UTC
This patch does not apply
Comment 2 Mateusz Piotrowski freebsd_committer freebsd_triage 2020-03-23 13:09:03 UTC
Hmm, this is unexpected. 

Nevertheless, I've rebased on the patches on latest head and uploaded them again.

Also, here are the the same patches but in my FreeBSD tree on GitHub:
https://github.com/0mp/freebsd/commits/0mp/sed_-f_-
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2020-04-09 07:32:35 UTC
Exp-run looks fine
Comment 4 Mateusz Piotrowski freebsd_committer freebsd_triage 2020-04-09 09:57:25 UTC
Wonderful news! Thanks a lot!
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-06-10 19:24:10 UTC
A commit references this bug:

Author: 0mp
Date: Wed Jun 10 19:23:59 UTC 2020
New revision: 362017
URL: https://svnweb.freebsd.org/changeset/base/362017

Log:
  Read commands from stdin when -f - is passed to sed(1)

  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

Changes:
  head/usr.bin/sed/main.c
  head/usr.bin/sed/sed.1
  head/usr.bin/sed/tests/sed2_test.sh
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-06-27 14:28:34 UTC
A commit references this bug:

Author: 0mp
Date: Sat Jun 27 14:27:38 UTC 2020
New revision: 362687
URL: https://svnweb.freebsd.org/changeset/base/362687

Log:
  MFC 362017, 362039, 362071:

  Read commands from stdin when -f - is passed to sed(1)

  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
  Differential Revision:	https://reviews.freebsd.org/D24079

  Remove duplicate lines from sed tests

  Reported by:	yuripv
  Approved by:	pfg (src)

  Remove some more duplicate test cases I accidentally committed

  Reported by:	markj, yuripv

Changes:
_U  stable/12/
  stable/12/usr.bin/sed/main.c
  stable/12/usr.bin/sed/sed.1
  stable/12/usr.bin/sed/tests/sed2_test.sh
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-06-27 14:32:39 UTC
A commit references this bug:

Author: 0mp
Date: Sat Jun 27 14:31:34 UTC 2020
New revision: 362688
URL: https://svnweb.freebsd.org/changeset/base/362688

Log:
  MFC 362017, 362039, 362071:

  Read commands from stdin when -f - is passed to sed(1)

  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
  Differential Revision:	https://reviews.freebsd.org/D24079

  Remove duplicate lines from sed tests

  Reported by:	yuripv
  Approved by:	pfg (src)

  Remove some more duplicate test cases I accidentally committed

  Reported by:	markj, yuripv

Changes:
_U  stable/11/
  stable/11/usr.bin/sed/main.c
  stable/11/usr.bin/sed/sed.1
  stable/11/usr.bin/sed/tests/sed2_test.sh