Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.97k stars 11.34k forks source link

`brew audit` complains about github /tarball/ vs /archive/ URLs for several formulae #18797

Closed apjanke closed 11 years ago

apjanke commented 11 years ago

Hello! I've been using homebrew for a while now, great stuff. Ran in to a small issue this week when playing around with it to better learn how it works.

When doing a brew audit for all formulae, it reports errors for many formulae that are downloading from "https://github.com/.../tarball/..." URLs instead of the /archive/ URL scheme, saying "Use /archive/ URLs for GitHub tarballs". I'm on homebrew version 0.9.4, with brew update done today bringing me to version 3f8ee127. As of today, 110 formulae are getting this complaint.

[@ in ~]
$ brew audit
ape:
 * Use /archive/ URLs for GitHub tarballs (url is https://github.com/APE-Project/APE_Server/tarball/v1.1.0).

appledoc:
 * Use /archive/ URLs for GitHub tarballs (url is https://github.com/tomaz/appledoc/tarball/v2.1).
[...snip...]

yle-dl:
 * `depends_on` can take requirement classes directly

Error: 117 problems in 116 formulae

I've attached my brew audit output as a gist: https://gist.github.com/apjanke/5265277

Seems like audit would be more useful if it had a clean baseline. There are a couple other more important sounding complaints (e.g. about not depending on postgresql) nestled in there that might be getting lost. Is this something that's worth cleaning up? And since it's a simple issue that affects many formulae, is it something a single dev could do in one branch/commit. Or would that be seen as intrusive by the maintainers of the individual formulae, and fixes should be done separately to each formula through its maintainer?

I'd be willing to take a stab at this if it would be appropriate.

Affected formulae: ape appledoc arping authexec autoenv blueutil brew-gem brew-pip bup casperjs chipmunk clay cocot colloquypush contacts couchdb-lucene cpansearch cppcheck css-crush daemonize darner direnv disco discount dotwrp doubledown drip ent exodriver f3 fasd field3d freerdp fuse4x fuse4x-kext gibo gist git-cola git-encrypt git-extras git-ftp git-gerrit git-ssh git-tracker git-url-sub grok gti hiredis htop-osx hub imapfilter ios-sim jbig2enc jsawk jsdoc3 jsmin kes lastfmfpclient lbdb libgit2 liblastfm libmonome logentries macvim mdbtools mdxmini metalua minc minisat narwhal ninja opencolorio openmeeg osm-pbf pbrt pdal peg-markdown pianobar pit plenv plt-racket plustache pmdmini pngpaste pngquant points2grid poster rbenv rbenv-bundler rbenv-default-gems rbenv-gemset rbenv-vars redo redsocks repl resty roundup ruby-build runcocoa serialosc shell.fm sickbeard sshfs the_silver_searcher tup vf voms vowpal-wabbit webkit2png xbee-comm

Fixing this will require updating both the URL and the sha1 hash value in each of the affected installs. The tarballs that are downloaded from the /archive/ and /tarball/ URLs differ at least because they name the top-level directory differently, even if they're grabbing the same repo contents. (Beneath that dir, files look identical, for the ones I checked.)

MikeMcQuaid commented 11 years ago

You can run brew audit on individual formulae. It doesn't have a clean baseline just because basically we know there are issues that need fixed but haven't got round to fixing it properly yet.

MikeMcQuaid commented 11 years ago

But yeh, if you can clean any of these up please do and fire up a pull request, thanks.

apjanke commented 11 years ago

What's the standard for testing formulae that have been altered? I've set up a "clean" OS X 10.8.3 build in a VM with just XCode and a fresh homebrew install as a baseline testing environment. Can I update the URLs for multiple formulae and test them all in one big brew install run, or do I need to test each formula separately from a clean system?

jacknagel commented 11 years ago

As long as you're only changing to the new URL (and not updating the version), you don't need to test the install

apjanke commented 11 years ago

Okay, I'm going to take give this a try then.

jacknagel commented 11 years ago

To summarize:

Closing because we don't need an issue open for this, but definitely welcome audit cleanups.

apjanke commented 11 years ago

Okay, so if I update the old-style tarball URLs for some formulae to clean up the audit warnings, what issue should I link the pull request against? Make a separate issue when a batch is ready for pulling?

jacknagel commented 11 years ago

Pull requests are issues, just submit a pull request.

apjanke commented 11 years ago

Okay, made a pull request covering formulae A-K: https://github.com/mxcl/homebrew/pull/18813

Smolations commented 10 years ago

I think this should be re-opened or a new issue reported (which I'd be happy to do). The GitHub API will be on v3 by default starting April 2014. Brew should accept both formats until the old /archive/ format is officially deprecated, don't you think?

jacknagel commented 10 years ago

@Smolations as I also noted in your pull request, the URLs in question are unrelated to the API.