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
Enhancement suggestion: RSS based updates #122
Comments
Cool! How did you learn about nixpkgs-update? Currently, our only input source is Repology's API https://repology.org/, which I like because it provides a list of packages we are almost certainly out of date on. However, it lacks the ability to discover the latest version of package unless some other distribution or source has already updated. (It uses some interesting sources of versions, like Wikidata https://repology.org/repository/wikidata. ) The main input to the core update functionality is a triple of
Any input source we can make like that would work with nixpkgs-update. Probably we can easily remove the requirement of the old version. Thanks for pointing out that GitHub makes RSS feeds of projects. That might be simpler to use than GitHub's API. The project is already making use of GitHub's API, so I would probably still just try that first. The CPAN link said "Please come back later". Ryan |
I've encountered that while browsing the forums..
I've updated the example to a link that works.
I've had an idea in the past to use rsstail (packaged) and write a crafty shell script to do on my own what nixpkgs-update does.. Do you think perhaps nixpkgs-update could leverage that? As opposed to implementing or using a Haskell RSS library to do it all in house.. Other external programs which may be of use are:
|
Maybe. My initial thought was to just use some XML parser library. This discussion has got me more excited about this! If we could create a service that checks GitHub RSS feeds for all of the packages that use GitHub once a day, we could update a bunch of stuff immediately with almost no repository maintainer work. |
That's wonderful to hear :) I'm no Haskell developer and I think I won't have enough time to learn it good enough for this project in the amount of time I have until I start university. I am however, rather apt as for writing a POC script that will use one of the external programs I listed above. As for the actual design of it, I was thinking of either a daemon or a cronjob that could be deployed on a server and that will use either either castget (cron) or rsstail (daemon). However, this script will need an external executable that will be based upon what nixpkgs-update does now. Do you think you could write (perhaps in a seperate project / branch) a 'simpler' version of the current nixpkgs-update that will produce an executable that accepts as 2/3 arguments the attrpath and the new version? If you think this is a good path to go into, I'd be happy to write this script and use this executable. |
It already basically works this way, but the instructions in the README could be better! https://github.com/ryantm/nixpkgs-update has the instructions. Instead of following Step 2 make your own script that generates the
You also need to have a The PR will probably lie a little bit saying that the data came from Repology. Also, if you want, you could send me a list of packages that have new versions and I could run the list. |
Boy then this can become really simple! I'd like to ask just a few more questions before I'll dive into this:
Should it delete the old entry before adding the new one?
|
Yes, because currently, it doesn't try to update a package if there is already an open PR to update it, so it wills kip the second one.
It runs through the whole
For now, you could probably make a cronjob that first generates the packages-to-update.txt file then calls nixpkgs-update. |
Oh right, I think I get a better idea now as for how I'll implement this.. Since I will need to get a list of all packages that their Oh and BTW, what does the |
Nothing really specific. I'd probably try to make a nix expression that generates a list of attrpaths that have src attributes that contain something specific to GitHub.
The |
Starting with something like https://raw.githubusercontent.com/NixOS/ofborg/released/ofborg/src/outpaths.nix from OfBorg https://github.com/nixos/ofborg might be good, since it can handle some of the complexities of the all packages attrset. |
Thanks for the link, I'll look into that, I guess this part of my script will consume most of my time.. I'm trying to give a try to
And I do have |
#122 (comment) suggests it might be a dependency.
Well, I just pushed a commit that adds |
Doesn't help.. same error. BTW, do you have to recompile it after every garbage collection? Or do you link a certain derivation to your |
What Operating System are you running it on? I'm running it on NixOS.
I'm not sure. When I run it, it runs for so long that I haven't really been paying attention to how long it takes to start up. |
I am using NixOS. |
Are you using the command documented in the README? i.e
|
I just tried doing it again from a different directory like this:
Do you want to message me on IRC or something and we can try to work this out? |
Oh, I just realized your error message is about |
I think the problem was that I tried running it with the following
It's a real update BTW that needs to be done.. I don't want to actually create a PR with it so I used the
And it printed the following:
I won't mind moving the discussion to Riot or Telegram, as I'm too young for IRC 😎 but however, it's getting rather late here in my time zone and I'd like to keep working on this at another time. My Riot id is: |
Okay, that makes sense; that cloning part needs to be improved, or dumped back on the user. These "clean up" and "couldn't delete" messages are normal. Did you have any other issue after that? I don't use Riot or Telgram. I am ryantm on Keybase. I also use Signal sorta, and Google Hangouts mostly. |
I'll set this up tomorrow and send you a message. |
For this, we'll probably want to filter the updates by https://github.com/repology/repology-rules so we don't do development updates. |
The main purpose for this issue was to enable automatic updates for GitHub and GitLab Repos. Now this is working (right? at least for GitHub I think...). As for other projects which may use a custom RSS feed for declaring releases, perhaps it'll be better to open a different issue for supporting automatic updates for such projects? I'm thinking it's not worth the effort, as such RSS feeds are an edge case I haven't encountered yet... |
Hey,
I'm a relatively new NixOS user and one of my main motives to switch to it was this effort made by the community. You are a real hero @ryantm !
Ever since I started having my custom Arch Linux packages, I relied upon https://github.com/rss2email/rss2email along with GitHub's or GitLab's releases' atom feeds (e.g https://github.com/NixOS/nixpkgs/releases.atom).
My experience with this method of getting update notifications is rather good - I get automatic emails for new releases of packages I maintain and I edit the source code after every update.
I was wondering, was it ever considered to use these RSS urls to check for updates? BTW I'm not sure about automatic updates for Perl packages but cpan has RSS feeds for releases as well (e.g https://metacpan.org/feed/distribution/MIME-Tools).
The text was updated successfully, but these errors were encountered: