[MacPorts] #40518: github portgroup github.master_sites should point to .../archive/... not .../tarball/...

MacPorts noreply at macports.org
Thu Dec 18 20:08:13 PST 2014


#40518: github portgroup github.master_sites should point to .../archive/... not
.../tarball/...
-----------------------------+--------------------------------
  Reporter:  fred.brunner@…  |      Owner:  macports-tickets@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.2.0
Resolution:                  |   Keywords:
      Port:  github          |
-----------------------------+--------------------------------

Comment (by jason-macports@…):

 Replying to [comment:1 ryandesign@…]:
 > The portgroup works fine for me as is.
 >
 > Making the suggested change seems to cause the checksums of existing
 ports' distfiles to change, which would necessitate changes to every port
 using the github portgroup, so before considering doing so I would want to
 understand the benefit.

 Perhaps I'm restating things that are already known, but from the
 discussion over on #46241 ...

 While playing w/ the GitHub API, I discovered that the old API is
 redirected to a legacy API, e.g., the prior
   `https://github.com/user/repo/{tarball,zipball}/{branch,tag,sha}`
 is redirected to
 `https://codeload.github.com/user/repo/legacy.{tar.gz,zip}/{branch,tag,sha}`

 However, based on the file structure of the returned archive, it's not
 clear this is a drop-in replacement, i.e., the top level director is
 `user-repo-sha/`.  So it seems likely that checksums using the existing
 would have to be revisited.

 Alternatively, for GitHub'ers using the v3 API, perhaps just by default,
 could you grant `github.tarball_from` a new `archive` or `v3` option,
 e.g.,
 {{{
 #!tcl
 archive {
   github.master_sites ${github.homepage}/archive/${version}
 }
 default { ...
 }}}

 It may also be possible to query the repo via the API to determine what
 method it used to to provide distfiles, e.g., `gitflow` AVH Edition v3
 items of interest:
 {{{
 "has_downloads": true,
 "archive_url":
 "https://api.github.com/repos/petervanderdoes/gitflow/{archive_format}{/ref}",
 "releases_url":
 "https://api.github.com/repos/petervanderdoes/gitflow/releases{/id}",
 "downloads_url":
 "https://api.github.com/repos/petervanderdoes/gitflow/downloads",
 }}}
 unfortunately, querying `downloads_url` returns an empty set, e.g.,
 {{{
 $ curl -o- https://api.github.com/repos/petervanderdoes/gitflow/downloads
 [

 ]
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/40518#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list