Opened 10 years ago

Closed 10 years ago

#41007 closed defect (fixed)

textmate2: add missing Mavericks build dependency on gnutar

Reported by: lpsinger (Leo Singer) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: mavericks Cc: ryandesign (Ryan Carsten Schmidt), macports@…, hardwhack
Port: textmate2

Description

textmate2 uses gnutar during its build phase. See attached log and this relevant excerpt:

Downloading ‘https://api.textmate.org/bundles/default’…
scandir("/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_textmate2/textmate2/work/.tmp/bundles.BxQNEicm/Managed/Bundles"): No such file or directory
Downloading... Done!   
bin/create_default_bundles_tbz: line 20: gnutar: command not found

This patch adds gnutar as a build dependency to address MavericksProblems.

Attachments (2)

main.log (338.8 KB) - added by lpsinger (Leo Singer) 10 years ago.
patch-Portfile.diff (375 bytes) - added by lpsinger (Leo Singer) 10 years ago.
Proposed change to Portfile

Download all attachments as: .zip

Change History (17)

Changed 10 years ago by lpsinger (Leo Singer)

Attachment: main.log added

Changed 10 years ago by lpsinger (Leo Singer)

Attachment: patch-Portfile.diff added

Proposed change to Portfile

comment:1 Changed 10 years ago by lpsinger (Leo Singer)

Owner: changed from macports-tickets@… to cal@…

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

If it's not using any exotic gnutar flags, I'd rather patch it to use tar instead and skip the dependency.

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Cc Me!

comment:4 in reply to:  2 Changed 10 years ago by lpsinger (Leo Singer)

Replying to ryandesign@…:

If it's not using any exotic gnutar flags, I'd rather patch it to use tar instead and skip the dependency.

Or send a patch upstream?

comment:5 Changed 10 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:6 Changed 10 years ago by hardwhack

This problem is described with a fix on MavericksProblems

You need to re-install macports and it will install gnu tar.

"Do not create a symlink named /usr/bin/gnutar pointing to a different version of tar or a version of gnutar you installed using MacPorts or yourself."

Recommend closing this ticket.

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 in reply to:  6 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: pjkim00@… added
Keywords: mavericks added

Replying to pjkim00@…:

This problem is described with a fix on MavericksProblems

No, that is a different problem. This ticket needs to remain open until the explicit reference to gnutar is removed from the textmate2 build scripts.

comment:8 in reply to:  7 ; Changed 10 years ago by hardwhack

Replying to ryandesign@…:

No, that is a different problem. This ticket needs to remain open until the explicit reference to gnutar is removed from the textmate2 build scripts.

I am having a problem understanding the difference. If reinstalling macports as described above installs gnutar and it builds correctly, then no problem. The only scenario I can understand is if textmate2 actually does not need gnutar but explicitly lists it as a dependency. Is that the case?

It seems that a LOT of ports require gnutar so I don't think that removing gnutar from just the textmate2 build script will do much for the overall macports experience.

comment:9 in reply to:  8 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to pjkim00@…:

If reinstalling macports as described above installs gnutar and it builds correctly, then no problem.

It does not. Building MacPorts causes it to determine what tar command is available. On previous versions of OS X, it determined that gnutar was available, and used it. On Mavericks, it will determine that tar is available and use it. The problem described in MavericksProblems is when you build MacPorts on an earlier OS and then try to use it on Mavericks. Don't do that.

The only scenario I can understand is if textmate2 actually does not need gnutar but explicitly lists it as a dependency. Is that the case?

textmate2 does not list a dependency on gnutar. But the file bin/create_default_bundles_tbz in the textmate2 source code runs the command gnutar -cf "$TBZ_DST~" "$BZIP2_FLAG" -C "$BUNDLES_DST" "Managed" which of course fails if gnutar does not exist. I don't see any gnutar-specific flags in use there, so I surmise that using tar instead of gnutar in that script would work fine. And yes, as suggested earlier in this thread, that should be reported to the developer of textmate2 so that he can make that change.

It seems that a LOT of ports require gnutar so I don't think that removing gnutar from just the textmate2 build script will do much for the overall macports experience.

Assuming that MacPorts has been built on the OS it is being used on, then:

  • Any port that declares a dependency on gnutar is fine.
  • Any port that doesn't declare a dependency on gnutar and doesn't need gnutar is fine.
  • Any port that uses tar is fine.
  • The problem is only ports that use gnutar but don't declare a dependency on it, like textmate2. That's what this ticket is about.
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:10 in reply to:  9 Changed 10 years ago by lpsinger (Leo Singer)

Replying to ryandesign@…:

Replying to pjkim00@…:

If reinstalling macports as described above installs gnutar and it builds correctly, then no problem.

It does not. Building MacPorts causes it to determine what tar command is available. On previous versions of OS X, it determined that gnutar was available, and used it. On Mavericks, it will determine that tar is available and use it. The problem described in MavericksProblems is when you build MacPorts on an earlier OS and then try to use it on Mavericks. Don't do that.

I didn't build MacPorts; I am using the Mavericks dmg.

The only scenario I can understand is if textmate2 actually does not need gnutar but explicitly lists it as a dependency. Is that the case?

textmate2 does not list a dependency on gnutar. But the file bin/create_default_bundles_tbz in the textmate2 source code runs the command gnutar -cf "$TBZ_DST~" "$BZIP2_FLAG" -C "$BUNDLES_DST" "Managed" which of course fails if gnutar does not exist. I don't see any gnutar-specific flags in use there, so I surmise that using tar instead of gnutar in that script would work fine. And yes, as suggested earlier in this thread, that should be reported to the developer of textmate2 so that he can make that change.

It seems that a LOT of ports require gnutar so I don't think that removing gnutar from just the textmate2 build script will do much for the overall macports experience.

Assuming that MacPorts has been built on the OS it is being used on, then:

  • Any port that declares a dependency on gnutar is fine.
  • Any port that doesn't declare a dependency on gnutar and doesn't need gnutar is fine.
  • Any port that uses tar is fine.
  • The problem is only ports that use gnutar but don't declare a dependency on it, like textmate2. That's what this ticket is about.

Correct.

comment:11 Changed 10 years ago by hardwhack

I see (said the blind man). You have obviously given this much more thought with more insight than I have. My only observation is that gnutar was installed by default so it seems a lot of ports left out gnutar as a dependency so this problem applies to quite a few ports. It was the loss of gnutar upon upgrading to Mavericks that precipitated this problem.

comment:12 in reply to:  11 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to pjkim00@…:

I see (said the blind man). You have obviously given this much more thought with more insight than I have. My only observation is that gnutar was installed by default so it seems a lot of ports left out gnutar as a dependency so this problem applies to quite a few ports. It was the loss of gnutar upon upgrading to Mavericks that precipitated this problem.

gnutar used to be part of OS X so we did not notice that ports were using it; now that it is no longer a part of OS X as of Mavericks we are noticing it. Please file additional tickets for any other ports that are using gnutar that need dependencies added or patches created to use tar instead.

comment:13 in reply to:  9 ; Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I surmise that using tar instead of gnutar in that script would work fine. And yes, as suggested earlier in this thread, that should be reported to the developer of textmate2 so that he can make that change.

I have reported the bug to the developer: https://github.com/textmate/textmate/issues/1180

comment:14 in reply to:  13 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I have reported the bug to the developer: https://github.com/textmate/textmate/issues/1180

The developer says gnutar is needed and that tar will not suffice, so we can add a dependency on gnutar for now and revisit it later if we think it's worth it. The patch in #41027 addresses this issue.

comment:15 Changed 10 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

This should be fixed by updating to a9495 in r112904, which no longer uses gnutar (see ​https://github.com/textmate/textmate/issues/1180).

Note: See TracTickets for help on using tickets.