Bug 213584 - tar's 'g' substitution flag is broken
Summary: tar's 'g' substitution flag is broken
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Martin Matuska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 05:37 UTC by David Naylor
Modified: 2018-12-11 07:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Naylor freebsd_committer freebsd_triage 2016-10-18 05:37:48 UTC
When extracting a zip archive it may be required to replace the '\' with '/'.  To achieve this the following command is used:

# tar -s'|\\|/|g' -xf /path/to/zip

however the substitution only applies to the first occurance per file.  This has been confirmed to happen on FreeBSD < 11.  

See Port's commit 424052 for further details.
Comment 1 David Naylor freebsd_committer freebsd_triage 2016-10-18 14:45:39 UTC
Assign to mm@, who did the last two updates to tar(1).
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-10-18 16:05:50 UTC
A commit references this bug:

Author: dbn
Date: Tue Oct 18 16:05:20 UTC 2016
New revision: 424173
URL: https://svnweb.freebsd.org/changeset/ports/424173

Log:
  lang/fsharp: fix build on FreeBSD < 11.

   - change substitution since make(1) on FreeBSD 9 does not like variables
     within a substitution.
   - repeat tar substitution command since tar(1) on FreeBSD 9/10 does not
     obay the 'g' substitution command.

  Reported by:    pkg-fallout
  PR:             213584

Changes:
  head/lang/fsharp/Makefile
Comment 3 David Naylor freebsd_committer freebsd_triage 2018-12-11 07:20:01 UTC
With FreeBSD 10 EOL this is no longer a problem.