Opened 9 years ago

Closed 9 years ago

#47951 closed enhancement (fixed)

tmux: moved from SF to Github

Reported by: xuchunyang (Chunyang Xu) Owned by: tessus (Helmut K. C. Tessarek)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt)
Port: tmux

Attachments (3)

Portfile-tmux.diff (2.5 KB) - added by xuchunyang (Chunyang Xu) 9 years ago.
tmux.patch (2.6 KB) - added by larryv (Lawrence Velázquez) 9 years ago.
use github-1.0 for tmux and tmux-devel
Portfile-tmux.patch (2.5 KB) - added by tessus (Helmut K. C. Tessarek) 9 years ago.

Download all attachments as: .zip

Change History (15)

Changed 9 years ago by xuchunyang (Chunyang Xu)

Attachment: Portfile-tmux.diff added

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Keywords: haspatch added
Version: 2.3.3

comment:2 Changed 9 years ago by tessus (Helmut K. C. Tessarek)

Thank you, and thanks for the patch. I am aware of the situation, but:

Please don't apply the patch just yet. There are a few things I want to clarify and change first:

  • change the commit point of devel version to a newer one
  • Nicholas, the owner of tmux and the repo, has a rather strange approach to store the release tarballs (in its own repository). I want to get in contact with him and talk about it.

comment:3 Changed 9 years ago by xuchunyang (Chunyang Xu)

I added "revision 1" but now I am not sure if it's necessary.

comment:4 Changed 9 years ago by tessus (Helmut K. C. Tessarek)

No, as far as I know it's not necessary unless you really change the version or add a patch to the sw.

But I was wondering something else right now. With github, you can actually retrieve commit points w/o using git at all. e.g.:

https://github.com/tmux/tmux/archive/<hash>.zip

This has 2 advantages: no dependency on git, and you can use checksums for the devel subport. This also means I could use the same mechanism for the main port, or use the .tar.gz files. Let me think about this a bit. Maybe ryandesign@… has some input on this.

P.S.: Is there a way to 'mention' a person with @username in this ticket system, so that this person gets an email as well?

comment:5 in reply to:  4 Changed 9 years ago by neverpanic (Clemens Lang)

Cc: ryandesign@… added

Replying to tessarek@…:

But I was wondering something else right now. With github, you can actually retrieve commit points w/o using git at all. e.g.:

https://github.com/tmux/tmux/archive/<hash>.zip

This has 2 advantages: no dependency on git, and you can use checksums for the devel subport. This also means I could use the same mechanism for the main port, or use the .tar.gz files. Let me think about this a bit. Maybe ryandesign@… has some input on this.

The github PortGroup does this automatically unless you stop it from doing so. You can check by running port distfiles tmux-devel -- which should give you a HTTP URL.

P.S.: Is there a way to 'mention' a person with @username in this ticket system, so that this person gets an email as well?

No. I've Cc'd Ryan for you.

comment:6 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Yes, github tarballs should be used if possible. Yes, that is the default behavior of the github portgroup.

The git.url line should be removed because the value it's been set to is the default value.

comment:7 Changed 9 years ago by tessus (Helmut K. C. Tessarek)

Now I'm a bit confused. In the documentation https://guide.macports.org/#reference.phases.fetch.git there's no default value for git.url.

Also, there is nowhere any info to be found on github.tarball_from or github.setup. Can you please make this documentation available so that I actually know what I'm doing?

Yes, github tarballs should be used if possible. Yes, that is the default behavior of the github portgroup.

For the main port or the subport? What do you mean by github tarball? In the example below 2.0.tar.gz or tmux-2.0.tar.gz? Why was depends_lib removed in the patch? tmux still depends on these 2 packages.

There are 3 ways to get a release:

  1. https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz (real tarball)
  2. https://github.com/tmux/tmux/archive/2.0.tar.gz (snapshot at time of commit - autogen.sh/autoreconf necessary)
  3. https://github.com/tmux/tmux/archive/7536d690fdb8859193cdfdd2f68752711425bdd0.zip (snapshot at time of commit - autogen.sh/autoreconf necessary)

There are 2 ways to get git versions:

  1. https://github.com/tmux/tmux/archive/7536d690fdb8859193cdfdd2f68752711425bdd0.zip (snapshot at time of commit - autogen.sh/autoreconf necessary)
  2. git clone / using: fetch.type git, git.branch, ... (snapshot at time of commit - autogen.sh/autoreconf necessary)

I'm sorry for my many questions, but there are so many different ways to get this done. Without proper documentation and guides I can't know what I should do.

comment:8 in reply to:  7 Changed 9 years ago by xuchunyang (Chunyang Xu)

Replying to tessarek@…:

Now I'm a bit confused. In the documentation https://guide.macports.org/#reference.phases.fetch.git there's no default value for git.url.

Also, there is nowhere any info to be found on github.tarball_from or github.setup. Can you please make this documentation available so that I actually know what I'm doing?

They are specified by github PortGrouphttps://guide.macports.org/#reference.portgroup, its usage is documented in the comments of github-1.0.tclhttps://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/github-1.0.tcl#L33

(see also /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/github-1.0.tcl)

Yes, github tarballs should be used if possible. Yes, that is the default behavior of the github portgroup.

For the main port or the subport? What do you mean by github tarball? In the example below 2.0.tar.gz or tmux-2.0.tar.gz? Why was depends_lib removed in the patch? tmux still depends on these 2 packages.

It was not removed actually, It's a kind of limitation of viewing diff file from trac.

Version 0, edited 9 years ago by xuchunyang (Chunyang Xu) (next)

Changed 9 years ago by larryv (Lawrence Velázquez)

Attachment: tmux.patch added

use github-1.0 for tmux and tmux-devel

comment:9 in reply to:  7 ; Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to tessarek@…:

Now I'm a bit confused. In the documentation https://guide.macports.org/#reference.phases.fetch.git there's no default value for git.url.

Also, there is nowhere any info to be found on github.tarball_from or github.setup. Can you please make this documentation available so that I actually know what I'm doing?

Sorry, many of our portgroups are not well-documented. There are many, many examples of use in other ports.

You’ll want to look at the github-1.0 portgroup.

For the main port or the subport?

Depends on where github.setup is called. We’ll actually have to handle this a bit carefully to get it right. The github-1.0 portgroup is not one of our good ones.

What do you mean by github tarball?

A tarball containing a particular Git tree.

Why was depends_lib removed in the patch? tmux still depends on these 2 packages.

It wasn’t removed; look at the diff more carefully.

There are 3 ways to get a release:

  1. https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz (real tarball)
  2. https://github.com/tmux/tmux/archive/2.0.tar.gz (snapshot at time of commit - autogen.sh/autoreconf necessary)
  3. https://github.com/tmux/tmux/archive/7536d690fdb8859193cdfdd2f68752711425bdd0.zip (snapshot at time of commit - autogen.sh/autoreconf necessary)

For tmux, we want the first option, to avoid needing Autotools.

There are 2 ways to get git versions:

  1. https://github.com/tmux/tmux/archive/7536d690fdb8859193cdfdd2f68752711425bdd0.zip (snapshot at time of commit - autogen.sh/autoreconf necessary)
  2. git clone / using: fetch.type git, git.branch, ... (snapshot at time of commit - autogen.sh/autoreconf necessary)

For tmux-devel, we’ll want the first option, to avoid doing an actual Git clone. We cannot mirror or cache Git clones.

I’ve just attached a patch that makes the necessary changes.

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

Replying to larryv@…:

Depends on where github.setup is called. We’ll actually have to handle this a bit carefully to get it right. The github-1.0 portgroup is not one of our good ones.

I consider the github portgroup quite good. It's thoroughly documented in the comments in the portgroup file, and it works great, as far as I know. If you have problems with it let me know.

Changed 9 years ago by tessus (Helmut K. C. Tessarek)

Attachment: Portfile-tmux.patch added

comment:11 Changed 9 years ago by tessus (Helmut K. C. Tessarek)

Thank you all for the detailed explanations.

Larry, I took your patch, but changed the commit point for tmux-devel to the latest one (and version and checksums) Portfile-tmux.patch. I've tested it and everthing looks fine.

comment:12 in reply to:  11 Changed 9 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed

Great, thanks.

r137096, r137097

Note: See TracTickets for help on using tickets.