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

Add "linter" warning for common unstable fetchpatch URLs #72294

Open
nh2 opened this issue Oct 30, 2019 · 8 comments
Open

Add "linter" warning for common unstable fetchpatch URLs #72294

nh2 opened this issue Oct 30, 2019 · 8 comments

Comments

@nh2
Copy link
Contributor

nh2 commented Oct 30, 2019

Doing git grep -E 'url = .*archlinux.*.patch' | grep -v 'id=' shows that many packages use unstable URLs in fetchpatch whose contents will change as the upstream changes their patches, and break builds and reproducibility then.

Example from current nixpkgs master:

% git grep -E 'url = .*archlinux.*.patch' | grep -v 'id='
pkgs/applications/graphics/hugin/default.nix:      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/hugin-exiv2-0.27.1.patch?h=packages/hugin";
pkgs/applications/misc/abook/default.nix:       url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/gcc5.patch?h=packages/abook";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-gps_read.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-incomplete-type.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-proj_api.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-qt5-build.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-qtgui-include.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-ver_str.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/improve-gpx-creator.patch?h=qlandkartegt";
pkgs/applications/misc/qlandkartegt/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/improve-gpx-name.patch?h=qlandkartegt";
pkgs/applications/networking/browsers/firefox/common.nix:      url = "https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/09c7fa0dc1d87922e3b464c0fa084df1227fca79/extra/firefox/arm.patch";
pkgs/applications/networking/browsers/firefox/common.nix:      url = "https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/09c7fa0dc1d87922e3b464c0fa084df1227fca79/extra/firefox/build-arm-libopus.patch";
pkgs/applications/networking/browsers/firefox/packages.nix:    url = "https://aur.archlinux.org/cgit/aur.git/plain/deny_missing_docs.patch"
pkgs/applications/science/astronomy/celestia/default.nix:    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-gcc46.patch?h=packages/celestia";
pkgs/applications/science/astronomy/celestia/default.nix:    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng15.patch?h=packages/celestia";
pkgs/applications/science/astronomy/celestia/default.nix:    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-libpng16.patch?h=packages/celestia";
pkgs/applications/science/astronomy/celestia/default.nix:    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/celestia-1.6.1-linking.patch?h=packages/celestia";
pkgs/applications/science/electronics/fritzing/default.nix:    url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Squashed-commit-of-the-following.patch?h=fritzing";
pkgs/development/interpreters/hugs/default.nix:        url = https://aur.archlinux.org/cgit/aur.git/plain/hsbase_inline.patch?h=hugs;
pkgs/development/interpreters/lua-5/default.nix:    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/lua-arch.patch?h=packages/lua51";
pkgs/development/interpreters/lua-5/default.nix:    url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/liblua.so.patch?h=packages/lua52";
pkgs/development/mobile/webos/novacomd.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Use-usb_bulk_-read-write-instead-of-homemade-handler.patch?h=palm-novacom-git";
pkgs/games/btanks/default.nix:      url = "https://aur.archlinux.org/cgit/aur.git/plain/lua52.patch?h=btanks";
pkgs/servers/nosql/mongodb/default.nix:        url = https://projects.archlinux.org/svntogit/community.git/plain/trunk/boost160.patch?h=packages/mongodb;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0001-fail-logging.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0002-info-to-debug.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0003-man-page-spelling.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0004-mkchroot.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0005-mkchroot-arch.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0006-mkchroot-symlink.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0007-destdir.patch?h=rssh;
pkgs/shells/rssh/default.nix:      url = https://aur.archlinux.org/cgit/aur.git/plain/0008-rsync-protocol.patch?h=rssh;
pkgs/tools/networking/cadaver/default.nix:      url = https://projects.archlinux.org/svntogit/community.git/plain/trunk/disable-sslv2.patch?h=packages/cadaver;
pkgs/tools/typesetting/biber/default.nix:      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/biber-fix-tests.patch?h=5d0fffd493550e28b2fb81ad114d62a7c9403812";
pkgs/tools/typesetting/biber/default.nix:      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/biber-fix-tests-2.patch?h=5d0fffd493550e28b2fb81ad114d62a7c9403812";

It would be cool to have some form of regex-list based warning shown to the user and in PRs that detects e.g. use of common locations like archlinux.org and probably Gentoo and Alpine, when they are used in fetchpatch URLs with.

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@nh2
Copy link
Contributor Author

nh2 commented Jun 2, 2020

still important to me

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@stale
Copy link

stale bot commented Nov 29, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 29, 2020
@nh2
Copy link
Contributor Author

nh2 commented Nov 29, 2020

still important to me

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 29, 2020
@melg8
Copy link

melg8 commented Apr 5, 2021

Important to me as well.

@liff
Copy link
Contributor

liff commented Aug 25, 2021

Perhaps this issue could be “moved” to nixpkgs-hammering? I believe that is the tool that @r-rmcgibbo runs to get suggestions for PRs?

Also the debian-sources check mentioned on jtojnar/nixpkgs-hammering#1 looks kind of similar to this issue.

@stale
Copy link

stale bot commented Apr 29, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 29, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@liff @nh2 @melg8 and others