#55575 closed defect (fixed)
port -vst install fails with "/usr/bin/tar: No such file or directory"
Reported by: | janstary (Jan Starý) | Owned by: | raimue (Rainer Müller) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.4.3 |
Component: | base | Version: | 2.4.2 |
Keywords: | highsierra | Cc: | mohd-akram (Mohamed Akram), aronnax, l2dy (Zero King) |
Port: |
Description
This is 2.4.99 on MacOS 13.10.2
Trying to install a port with sudo port -vst install
repeatably fails.
For example, sudo port -vst install pstree
will fail, the log saying
:info:extract Executing: cd "/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_pstree/pstree/work/pstree-2.39" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/pstree/pstree-2.39.tar.gz' | /usr/bin/tar -xf - :debug:extract system: cd "/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_pstree/pstree/work/pstree-2.39" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/pstree/pstree-2.39.tar.gz' | /usr/bin/tar -xf - :info:extract sh: /usr/bin/tar: No such file or directory :info:extract gzip: error writing to output: Broken pipe :info:extract gzip: /opt/local/var/macports/distfiles/pstree/pstree-2.39.tar.gz: uncompress failed :info:extract Command failed: cd "/opt/local/var/macports/build/_opt_mports_macports-ports_sysutils_pstree/pstree/work/pstree-2.39" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/pstree/pstree-2.39.tar.gz' | /usr/bin/tar -xf - :info:extract Exit code: 127
The same happens with sudpo port -t intall
, with any other port.
On the other hand, sudo port -vs install pstree
will work,
so I suspect the -t
to be the culprit.
Attachments (1)
Change History (16)
Changed 7 years ago by janstary (Jan Starý)
comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | highsierra added |
---|
This appears to be a bug in macOS High Sierra introduced in 10.13.2. It was previously discussed on the mailing list.
comment:2 Changed 7 years ago by mohd-akram (Mohamed Akram)
Cc: | mohd-akram added |
---|
comment:3 Changed 7 years ago by lpsinger (Leo Singer)
Cc: | aronnax added |
---|
comment:4 Changed 7 years ago by raimue (Rainer Müller)
Filed as rdar://problem/36469208 with the Apple Bug Reporter.
comment:5 Changed 7 years ago by l2dy (Zero King)
Cc: | l2dy added |
---|
comment:6 Changed 7 years ago by raimue (Rainer Müller)
Reply from Apple on the bug report:
This issue behaves as intended based on the following:
This change was intentional as following symlinks allows you to clone directories (which is disallowed due to potential system slowdown in apfs). We will update the man page to reflect this.
This is not a bug in clonefileat(), this was an intentional change in copyfile itself.
comment:7 Changed 7 years ago by janstary (Jan Starý)
Can someone please explain how following symlinks allows you to "clone directories"?
comment:8 Changed 7 years ago by janstary (Jan Starý)
Without COPYFILE_CLONE, copyfile(3) seems to copy the destination file OK. https://lists.macports.org/pipermail/macports-dev/2017-December/037091.html
comment:9 Changed 7 years ago by neverpanic (Clemens Lang)
Yeah, I believe the intent of the original change was to use COPYFILE_CLONE so that no additional storage would be required on APFS.
Since Apple now intentionally broke their own API, we only have the option of following the symlinks ourselves, or going back to the old model that requires double the storage.
comment:10 Changed 7 years ago by raimue (Rainer Müller)
I have no idea what Apple meant in the answer with "clone directories". I got no answer on a rebuttal and the rdar was closed without further comment.
comment:11 Changed 7 years ago by raimue (Rainer Müller)
Owner: | set to raimue |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:12 Changed 7 years ago by raimue (Rainer Müller)
Milestone: | → MacPorts Future |
---|
comment:13 Changed 7 years ago by raimue (Rainer Müller)
Keywords: | needs-backport added |
---|---|
Version: | 2.4.99 → 2.4.2 |
This is actually broken in the released version on macOS 10.13.3 High Sierra and needs to be backported to MacPorts 2.4.3.
comment:14 Changed 7 years ago by raimue (Rainer Müller)
comment:15 Changed 7 years ago by raimue (Rainer Müller)
Keywords: | needs-backport removed |
---|---|
Milestone: | MacPorts Future → MacPorts 2.4.3 |
log of the failed sudo port -vst install