Skip to content
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

treewide: Add passthru.updateScript to gnome pkgs #60198

Merged
merged 2 commits into from May 13, 2019

Conversation

JohnAZoidberg
Copy link
Member

@JohnAZoidberg JohnAZoidberg commented Apr 25, 2019

Motivation for this change

For packages that are hosted on the gnome mirror it's very easy.
Inspired by #36150

I changed some source URLs but they should be equivalent to the original.

Changed some derivations to use pname instead of name so that causes many package rebuilds :/

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@JohnAZoidberg
Copy link
Member Author

JohnAZoidberg commented Apr 25, 2019

Oh I should base this off of staging, right?
Or staging-next? Which branch was it?

pkgs/tools/security/polkit-gnome/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/libnotify/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/hyena/default.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/vala/default.nix Outdated Show resolved Hide resolved
@jtojnar
Copy link
Contributor

jtojnar commented Apr 25, 2019

Thanks for taking care of this!


GNOME update script ignores the versions with odd minors by default because they are usually considered unstable. For projects where it is not the case, or we want the unstable version, we need to override the versionPolicy attribute.

Yes, staging is the correct branch.

@JohnAZoidberg
Copy link
Member Author

How did you determine for which packages this is not the case?
Those that are in nixpkgs with an odd minor?

@jtojnar
Copy link
Contributor

jtojnar commented Apr 25, 2019

How did you determine for which packages this is not the case?
Those that are in nixpkgs with an odd minor?

Yup, just checked the minor part of version. Maybe some of those are unstable by accident, we should probably check the repos.

@JohnAZoidberg
Copy link
Member Author

I looked at the repos and it doesn't seem that any of them use odd versions to indicate unstable. I'm not actually sure it's so common that it should be the default policy for us.

However I noticed that some of the packages have been abandoned for quite a while and aren't used anymore - I'll probably remove them in another PR or start a discussion in an issue.

@jtojnar
Copy link
Contributor

jtojnar commented Apr 25, 2019

I looked at the repos and it doesn't seem that any of them use odd versions to indicate unstable. I'm not actually sure it's so common that it should be the default policy for us.

I would say about 90% of packages hosted on GNOME servers, the packages with updateScript should have a correct version policy set so greping nixpkgs can give you pretty acurate image.

However I noticed that some of the packages have been abandoned for quite a while and aren't used anymore - I'll probably remove them in another PR or start a discussion in an issue.

At least glabels and ekiga have a new major release in the works. opal will probably be updated with ekiga.

Maybe we can get rid of pangox-compat if nothing else depends on it.

@JohnAZoidberg
Copy link
Member Author

I looked at the repos and it doesn't seem that any of them use odd versions to indicate unstable. I'm not actually sure it's so common that it should be the default policy for us.

I would say about 90% of packages hosted on GNOME servers, the packages with updateScript should have a correct version policy set so greping nixpkgs can give you pretty acurate image.

What do you mean?
Do we need to add the policy? Do they have that policy upstream?
Ohh okay, this odd policy is just the default for GNOME packages, alright.
I take my statement back, it's probably the right default.

However I noticed that some of the packages have been abandoned for quite a while and aren't used anymore - I'll probably remove them in another PR or start a discussion in an issue.

At least glabels and ekiga have a new major release in the works. opal will probably be updated with ekiga.

Maybe we can get rid of pangox-compat if nothing else depends on it.
I'm speaking about hyena (and the only program that uses it: pdf-mod) and polkit-gnome.

@JohnAZoidberg
Copy link
Member Author

I'll add some more tonight.

@ofborg ofborg bot added 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: python labels Apr 26, 2019
@jtojnar
Copy link
Contributor

jtojnar commented Apr 26, 2019

Do we actually want to add update scripts to packages that will never receive an update? In particular those under Archive namespace like https://gitlab.gnome.org/Archive/pygtk

@JohnAZoidberg
Copy link
Member Author

JohnAZoidberg commented Apr 28, 2019

Not really, no. I'd like to mark them as "non maintained" or "abandoned" somehow, so that it's obvious in nixpkgs.
I think this would be useful in general. Then other general update scripts could ignore those packages.
What would you think if I added a message to meta.knownVulnerabilities?

@JohnAZoidberg
Copy link
Member Author

Not really, no. I'd like to mark them as "non maintained" or "abandoned" somehow, so that it's obvious in nixpkgs.
I think this would be useful in general. Then other general update scripts could ignore those packages.
What would you think if I added a message to meta.knownVulnerabilities?

Well meta.knownVulnerabilities is probably not a good idea since that makes the package opt-in - as ofborg shows.

@jtojnar jtojnar mentioned this pull request Apr 30, 2019
10 tasks
@worldofpeace
Copy link
Contributor

worldofpeace commented May 1, 2019

@JohnAZoidberg I merged 393ca4c in #60548 so you can drop it here.

libnotify also got updateScript at some point in bc757ff

jtojnar
jtojnar previously requested changes May 4, 2019
pkgs/applications/graphics/gthumb/default.nix Outdated Show resolved Hide resolved
pkgs/applications/graphics/gthumb/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/gcab/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/libwnck/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pygtk/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pygtk/default.nix Outdated Show resolved Hide resolved
pkgs/misc/themes/gtk2/gtk-engine-murrine/default.nix Outdated Show resolved Hide resolved
pkgs/tools/security/polkit-gnome/default.nix Outdated Show resolved Hide resolved
@JohnAZoidberg JohnAZoidberg force-pushed the gnome-auto-update branch 3 times, most recently from 3da4297 to a27bd07 Compare May 4, 2019 15:34
@FRidh
Copy link
Member

FRidh commented May 12, 2019

What's the status?

@worldofpeace
Copy link
Contributor

I think it should be fine, (haven't really looked at everything it's a lot) just need to resolve conflicts.

`updateScript` lets us update packages automatically.
For packages that are hosted on the gnome mirror it's very easy to add
that. Inspired by NixOS#36150
@JohnAZoidberg
Copy link
Member Author

Alright, I rebased. Just needed to fix that one tiny conflict.
Didn't change anything else ;)

- Update homepage URLs
- Add missing meta entries
@worldofpeace
Copy link
Contributor

Removed the reference to repositories.git.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excluding the things in pkgs/desktops/gnome-2 we've gone from 40 to 24 occurrences that
the command to track this in #36150 can catch.

@worldofpeace worldofpeace merged commit baf6640 into NixOS:staging May 13, 2019
@worldofpeace
Copy link
Contributor

Thanks @JohnAZoidberg for the fixes ✨

@JohnAZoidberg JohnAZoidberg deleted the gnome-auto-update branch May 13, 2019 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants