Bug 213584

Summary: tar's 'g' substitution flag is broken
Product: Base System Reporter: David Naylor <dbn>
Component: binAssignee: Martin Matuska <mm>
Status: Closed FIXED    
Severity: Affects Some People CC: romain
Priority: ---    
Version: 10.3-RELEASE   
Hardware: Any   
OS: Any   

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.