-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse Sparkle appcasts to detect need for Cask updates #260
Comments
I came here to post this very issue :) How do you envision this being implemented? I assume it'd be a Ruby Module but haven't done any research to see if any already exist. I'll wait to hear your thoughts before starting in with a list of questions. |
I was just talking with a co-worker and he pointed out that products which use Sparkle will have something like:
in their This means we could programmaticly determine if an app was using Sparkle, then handle the update gracefully. This also goes along with my "can we add logic/processing" question in #308 (comment) |
FWIW I have been researching this on my own for the past several months, and there are LOT of apps which do NOT make it easy to find their Sparkle feeds. (No, I don't know why either.) In fact I would say that the majority of the apps that I have looked at do not put their feed info in the Info.plist file. I finally installed an HTTP "sniffer" to discover some of them, only to discover that some of them seem to fetch this information by HTTPS (grrrr). Also, while there seems to be some amount of similarity between Sparkle feeds, there is enough difference between them that I have been parsing each one of them rather than trying to come up with "one parser to rule them all" so to speak. This can be as simple as some apps ONLY keep the latest version listed in their Sparkle feed, while others seem to keep ALL of them. Some put the latest information on top, others put it on the bottom. And so on. Last but not least: while many of them seem to use "sparkle:version" and/or "sparkle:shortVersionString" to indicate the latest version, some of them seem to have come up with their own version naming scheme. (Again, I don't know why, maybe some of them pre-date this "standard"?) Since I don't know ruby (hangs head in geek shame) I have just been parsing them using curl and awk, sed, tr, grep. This is not (at all) intended to suggest that the developers not try to use Sparkle feeds, just to highlight the fact that it might not be as easy as it initially seems. |
…o_check firefox-ux is a nightly, and should use :no_check
I neglected to cross-reference this original issue, but we have been working on appcasts since #3105. We aren't ready to close this — not nearly — because the |
Indeed, parsing the appcasts is probably the most difficult part of this process. Just from looking at the Appcast XMLs of two Casks, I realize they don't have some field with a "short" version number that is easily accessible (e.g. 1.2.3), but rather, there were only |
FWIW: I have been working on this problem for awhile now for a personal Many appcast feeds only show the most recent version, but some of them Most put new entries on the top, but some put them at the bottom. Some apps make it almost impossible to even find their appcast feed, Most aggravating are those whose apps obviously have some process for I am not suggesting that Cask should not do this -- it absolutely For my project I ended up writing per-feed parsing scripts (mostly just On 20 Jun 2014, at 22:55, Caleb Xu wrote:
|
Thanks for the data points. In #4847 adds a More importantly, a |
Also FWIW: I also wrote a Sparkle feed parser for a Python-based project for sysadmins, AutoPkg, which collects community-built 'recipes' for obtaining and deploying software updates to managed Mac clients. I stumbled across this because we also have a trivial parser for pulling the URL out of a cask formula. Here's our 'processor' that handles returning a URL for the latest download from an appcast feed. It's been a while since I looked at it - it hasn't needed any revision since I wrote it over a year ago - but essentially, Sparkle first looks for They also fall back to parsing the URL for a version but without any real validation of a version string: I think there have been a couple cases where a vendor's appcast feed server only returns something when passed a specific User-Agent header. Although these might have been for applications which are paid and for which the vendor doesn't provide a public download. |
Thanks @timsutton! For pulling the URL out of a Cask, try |
Thanks, that could be useful. For our project, however, we don't have any requirement of Homebrew and cask, and instead just read and parse a formula's .rb file via GitHub raw urls. |
That's interesting, because we were just talking with @sdegutis about whether Cask files should be more static for the purpose of interop with other projects (on IRC and in #5458). Meanwhile (in the other direction) @vitorgalvao has been changing many Casks since #4910 so that the I guess I have gone offtopic for the current issue. If you have any problems with interop, do file an issue or catch us on IRC. Being scriptable and hackable is one of our goals, as described in https://github.com/caskroom/homebrew-cask/blob/master/doc/HACKING.md#what-is-the-design-philosophy . |
(:+1: for static configuration files) |
So, regarding the feeds:
|
Many thanks, @pornel! As mentioned elsewhere, we have identified appcasts for almost one third of all app Casks by extracting |
@rolandwalker Our project always had the goal of static recipe files, and instead provide different "Processors" that are able to parse feeds and deal with URLs but then figure out if the download has changed compared to the previous one, compare with versions in a repo, etc. Users who want to write a recipe to get the latest app by a vendor that doesn't use Sparkle but instead wrote their own custom auto-updater mechanism (of which there are many!), they end up reverse-engineering the feed system and implementing the necessary logic in their own processor and ship that with the recipe files. The benefit is that while users keep their community repos up to date to keep track with any changes by the vendor, the recipes themselves don't need to change from minor version to minor version of a given app. Of course, the benefit of brew-cask work is that you distribute the work among a ton of contributors, and the casks are very easy for anyone to contribute to. |
Hi, is this still being worked on? Anything I can help test or document? |
@jm3 Many casks have the proper stanza, but the feature is completely non-working yet. We don’t even have the proper idea of how we should be about doing it. |
Closing based on discussion in #15908 ( |
Many mac apps use the Sparkle update framework:
http://sparkle.andymatuschak.org/
It's got a standardized "publish an update" format:
https://github.com/andymatuschak/Sparkle/wiki/publishing-an-update
We could leverage this to detect when an app might need an update.
That would be pretty cool yeah? 😎
The text was updated successfully, but these errors were encountered: