[MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
----------------------+--------------------
 Reporter:  janstary  |      Owner:
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  base      |    Version:  2.4.99
 Keywords:            |       Port:
----------------------+--------------------
 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.

--
Ticket URL: <https://trac.macports.org/ticket/55575>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+--------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:
      Port:            |
-----------------------+--------------------
Changes (by janstary):

 * Attachment "main.log" added.

 log of the failed sudo port -vst install

--
Ticket URL: <https://trac.macports.org/ticket/55575>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------
Changes (by ryandesign):

 * keywords:   => highsierra


Comment:

 This appears to be a bug in macOS High Sierra. It was
 [https://lists.macports.org/pipermail/macports-
 dev/2017-December/037025.html previously discussed on the mailing list].

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------
Changes (by lpsinger):

 * cc: aronnax (added)


--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------

Comment (by raimue):

 Filed as rdar://problem/36469208 with the Apple Bug Reporter.

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------

Comment (by raimue):

 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.

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------

Comment (by janstary):

 Can someone please explain how following symlinks allows you to "clone
 directories"?

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------

Comment (by janstary):

 Without COPYFILE_CLONE, copyfile(3) seems to copy the destination file OK.
 https://lists.macports.org/pipermail/macports-
 dev/2017-December/037091.html

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------

Comment (by neverpanic):

 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.

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:            |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------

Comment (by raimue):

 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.

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+------------------------
  Reporter:  janstary  |      Owner:  raimue
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.4.99
Resolution:  fixed     |   Keywords:  highsierra
      Port:            |
-----------------------+------------------------
Changes (by raimue):

 * owner:   => raimue
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"995dde8476c48580db4f6eedfde09e90dc5e8c99/macports-base"
 995dde8476c48580db4f6eedfde09e90dc5e8c99/macports-base]:
 {{{
 #!ConfigurableCommitTicketReference repository="macports-base"
 revision="995dde8476c48580db4f6eedfde09e90dc5e8c99"
 sip_copy_proc: Avoid COPYFILE_CLONE

 Apple broke the copyfile(3) interface with macOS 10.13.3 High Sierra as
 there is no way any more to make it follow symlinks when COPYFILE_CLONE
 is used. According to rdar://problem/36469208 this change was
 intentional.

 Instead of adding more conditionals to check whether the file to clone
 is actually a symlink, just do not attempt to clone it at all but make
 a normal copy. This will usually only take a few megabytes of disk space
 anyway.

 Closes: https://trac.macports.org/ticket/55575
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+-----------------------------
  Reporter:  janstary  |      Owner:  raimue
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:  MacPorts Future
 Component:  base      |    Version:  2.4.99
Resolution:  fixed     |   Keywords:  highsierra
      Port:            |
-----------------------+-----------------------------
Changes (by raimue):

 * milestone:   => MacPorts Future


--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+---------------------------------------
  Reporter:  janstary  |      Owner:  raimue
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:  MacPorts Future
 Component:  base      |    Version:  2.4.2
Resolution:  fixed     |   Keywords:  highsierra needs-backport
      Port:            |
-----------------------+---------------------------------------
Changes (by raimue):

 * keywords:  highsierra => highsierra needs-backport
 * version:  2.4.99 => 2.4.2


Comment:

 This is actually broken in the released version on macOS 10.13.3 High
 Sierra and needs to be backported to [milestone:"MacPorts 2.4.3"].

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:13>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+---------------------------------------
  Reporter:  janstary  |      Owner:  raimue
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:  MacPorts Future
 Component:  base      |    Version:  2.4.2
Resolution:  fixed     |   Keywords:  highsierra needs-backport
      Port:            |
-----------------------+---------------------------------------

Comment (by raimue):

 In [changeset:"b58d578a8e1aed0fa186ca059c337589a588e0af/macports-base"
 b58d578a8e1aed0fa186ca059c337589a588e0af/macports-base]:
 {{{
 #!ConfigurableCommitTicketReference repository="macports-base"
 revision="b58d578a8e1aed0fa186ca059c337589a588e0af"
 sip_copy_proc: Avoid COPYFILE_CLONE

 Apple broke the copyfile(3) interface with macOS 10.13.3 High Sierra as
 there is no way any more to make it follow symlinks when COPYFILE_CLONE
 is used. According to rdar://problem/36469208 this change was
 intentional.

 Instead of adding more conditionals to check whether the file to clone
 is actually a symlink, just do not attempt to clone it at all but make
 a normal copy. This will usually only take a few megabytes of disk space
 anyway.

 Closes: https://trac.macports.org/ticket/55575
 (cherry picked from commit 995dde8476c48580db4f6eedfde09e90dc5e8c99)
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #55575: port -vst install fails with "/usr/bin/tar: No such file or directory"

MacPorts
In reply to this post by MacPorts
#55575: port -vst install fails with "/usr/bin/tar: No such file or directory"
-----------------------+----------------------------
  Reporter:  janstary  |      Owner:  raimue
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:  MacPorts 2.4.3
 Component:  base      |    Version:  2.4.2
Resolution:  fixed     |   Keywords:  highsierra
      Port:            |
-----------------------+----------------------------
Changes (by raimue):

 * keywords:  highsierra needs-backport => highsierra
 * milestone:  MacPorts Future => MacPorts 2.4.3


--
Ticket URL: <https://trac.macports.org/ticket/55575#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS