Repository navigation
various: fix pname misuse in urls - #483962
Conversation
27bcbf0 to
5992d9d
Compare
Review dismissed automatically
5992d9d to
9701da8
Compare
9701da8 to
4254839
Compare
This comment was marked as resolved.
This comment was marked as resolved.
If the URL was rewritten to a different one, it wouldn't create a rebuild because it's a FOD and the hash hasn't changed. We should somehow verify that the URLs haven't changed. My first concern is how does the script handle cases with multiple {
stdenv,
fetchurl,
}:
let
some-component = stdenv.mkDerivation rec {
pname = "sub-package";
version = "1.0.0";
src = fetchurl {
url = "https://some-software.com/${pname}/${version}";
hash = "";
};
};
in
stdenv.mkDerivation rec {
pname = "main-package";
version = "1.0.0";
src = fetchurl {
url = "https://some-software.com/${pname}/${version}";
hash = "";
};
buildInputs = [ some-component ];
}I'll try to write a script that evaluates the (Sorry for "my" last comment, this is the first time I've tried https://github.com/DieracDelta/srcbot in the hope of automatically verifying that sources hasn't changed, but looks like it was designed to get the changed packages from CI/ user input.) |
gepbird
left a comment
There was a problem hiding this comment.
Thanks!
I checked the first 25 files manually and verified the rest with the below methods.
I'm confident this is safe to merge :)
Each file has 1 line removal and 1 line addition
This can be seen from the patch header at https://github.com/NixOS/nixpkgs/pull/483962.patch, for example:
pkgs/by-name/ae/aeolus-stops/package.nix | 2 +-There are only 3 files with multiple changes, I verified those manually (caused by nixfmt and rec removal):
pkgs/by-name/lu/luculent/package.nix | 4 ++--
pkgs/by-name/ma/man-pages-posix/package.nix | 4 ++--
pkgs/by-name/mp/mp3gain/package.nix | 4 +---Each modified file touches url in src and it's a fetch* call
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3Packages.unidiff
import re
from unidiff import PatchSet
for diff in PatchSet.from_filename("483962.patch"):
if not re.compile(r"src = fetch.* {.*-\s*url = .*\+\s*url = .*};", re.DOTALL).search(str(diff)):
print("no matches in file: " + diff.path)There are 6 outliers (didn't match src =, or the closing } for the fetch* call was outside of the hunk, manually verified that these are correct):
no matches in file: pkgs/by-name/fr/freetype/package.nix
no matches in file: pkgs/by-name/gd/gdk-pixbuf/package.nix
no matches in file: pkgs/by-name/gr/groove/package.nix
no matches in file: pkgs/by-name/li/libsignon-glib/package.nix
no matches in file: pkgs/by-name/me/mesa_glu/package.nix
no matches in file: pkgs/by-name/wa/warzone2100/package.nixURL evaluates to the same value as before this PR
# file: eval-urls.nix
let
pkgs = import ./. {};
# pnames are obtained from git file paths
pnames = ["aeolus-stops" "aeolus" "aewan" "aften" "aldo" "altermime" "AMB-plugins" "apache-flex-sdk" "apcupsd" "applgrid" "apr" "aprutil" "argus-clients" "argus" "arphic-ukai" "arphic-uming" "artisan" "astyle" "atanks" "atftp" "auctex" "autobuild" "autocutsel" "autossh" "autotalent" "avfs" "awstats" "babeld" "bacula" "barcode" "bb" "bftpd" "bison" "black-hole-solver" "bleachbit" "bliss" "blobwars" "blueman" "boolstuff" "brasero-unwrapped" "bristol" "bsdbuild" "bsdiff" "btrbk" "buddy" "buildtorrent" "bvi" "bwm_ng" "cachefilesd" "calcurse" "cantarell-fonts" "catdoc" "catdvi" "cbftp" "cddiscid" "cdi2iso" "cdpr" "cgui" "chemtool" "chromium-bsu" "chrony" "cifs-utils" "clamav" "cln" "clustal-omega" "clutter-gst" "cntlm" "coan" "cogl" "colm" "commonsCompress" "commonsFileUpload" "commonsIo" "complexity" "conntrack-tools" "construo" "corosync" "courier-prime" "cppcms" "cppdb" "cppreference-doc" "cppunit" "cpputest" "cpuid" "cramfsswap" "crip" "crrcsim" "crunch" "csa" "cscope" "csv2odf" "culmus" "cutee" "cvs2svn" "cytoscape" "czmq" "d2coding" "dadadodo" "dante" "dar" "datefudge" "dbxml" "dd_rescue" "ddrutility" "dedup" "dejagnu" "devilspie2" "devtodo" "dfu-util" "dgen-sdl" "di" "dico" "disnixos" "dit" "djmount" "djview" "djvulibre" "dkimproxy" "dnsmasq" "dnstracer" "dos2unix" "dovecot" "dpic" "dspam" "dssi" "dvd-slideshow" "dvdbackup" "dvdplusrwtools" "easytag" "ebtables" "ebumeter" "edgetpu-compiler" "efont-unicode" "eggdbus" "egypt" "elfutils" "eli" "em" "emma" "enca" "enet" "ephemeralpg" "eq10q" "evolution-ews" "exempi" "exim" "exonerate" "exrtools" "ext4magic" "farstream" "fatsort" "fcrackzip" "fcron" "fdk_aac" "fim" "findbugs" "firefly-desktop" "flink" "fllog" "flmsg" "flpsed" "flrig" "fluxbox" "flwrap" "foremost" "forktty" "fox" "fox_1_6" "frame" "freeipmi" "freetds" "freetype" "ftop" "fuse-emulator" "g-wrap" "gama" "garmintools" "gatling" "gcal" "gd" "gdk-pixbuf" "gdl" "gengetopt" "genromfs" "getxbook" "gexiv2" "gl117" "gl2ps" "glade" "glee" "glibmm" "global" "glpk" "gmm" "gmu" "gnaural" "gnome-console" "gnome-doc-utils" "gnome-icon-theme" "gnome-menus" "gnome-multi-writer" "gnome-photos" "gnome-tweaks" "gnome-user-docs" "gnome-video-effects" "gnote" "gnu-pw-mgr" "gnuclad" "gnushogi" "gob2" "gobi_loader" "gofish" "goocanvasmm2" "gource" "gp2c" "gperf" "gptfdisk" "gpu-screen-recorder-gtk" "gpu-screen-recorder" "gputils" "grail" "graphs" "grepcidr" "grilo-plugins" "groff" "groove" "gsettings-desktop-schemas" "gsl" "gsm" "gsound" "gspell" "gtk-engine-murrine" "gtk-sharp-3_0" "gtkdatabox" "gtkimageview" "gtksourceviewmm" "gtksourceviewmm4" "gtkspell2" "gtkspellmm" "gtkwave" "gtranslator" "gts" "guile-cairo" "guile-json" "guile-lib" "guile-opengl" "guile-reader" "gupnp-dlna" "gxemul" "gxmessage" "hamlib_3" "hermit" "hitch" "hivex" "hoppet" "hostapd" "html-xml-utils" "htmlcxx" "htslib" "humanity-icon-theme" "hyena" "iconnamingutils" "id3lib" "id3v2" "ifmetric" "imagination" "indent" "inetutils" "intercal" "intltool" "iptstate" "ipvsadm" "ispell" "ispike" "itstool" "jaaa" "jack_oscrolloscope" "jackmeter" "japa" "jbang" "jconvolver" "jed" "jibri" "jicofo" "jitsi-meet-prosody" "jitsi-videobridge" "joe" "jpeginfo" "json-glib" "jsonrpc-glib" "julia-mono" "kacst" "kanif" "keyutils" "kgraphviewer" "khmeros" "klavaro" "komga" "koules" "kpcli" "kytea" "kythe" "lame" "languagetool" "lao" "lci" "lcms1" "lcms2" "ldns" "libaacs" "libaal" "libabigail" "libabw" "libaio" "libasr" "libass" "libasyncns" "libaudclient" "libavc1394" "libbdplus" "libbluray" "libbs2b" "libbsd" "libcacard" "libcanberra" "libcddb" "libcdr" "libdaemon" "libdazzle" "libdbi" "libdc1394" "libdivecomputer" "libdrm" "libdsk" "libdvbcsa" "libdvbpsi" "libdvdcss" "libelf" "libestr" "libev" "libevdev" "libexecinfo" "libexosip" "libextractor" "libexttextcat" "libffi_3_3" "libfido2" "libfishsound" "libftdi" "libgaminggear" "libgdamm" "libgepub" "libgig" "libgmpris" "libgnomekbd" "libgnt" "libgovirt" "libgpg-error" "libgringotts" "libgweather" "libgxps" "libibmad" "libibumad" "libinfinity" "libinklevel" "libiodbc" "libircclient" "libisds" "liblangtag" "liblo" "liblscp" "libmad" "libmatheval" "libmaxminddb" "libmhash" "libmng" "libmodplug" "libmpeg2" "libmspack" "libnatpmp" "libnatspec" "libnbd" "libnetfilter_acct" "libnetfilter_conntrack" "libnetfilter_cthelper" "libnetfilter_cttimeout" "libnetfilter_log" "libnetfilter_queue" "libnftnl" "libnma" "libnotify" "libnova" "liboauth" "libofa" "liboggz" "libomxil-bellagio" "libosinfo" "libowfat" "libpar2" "libpcap" "libpgf" "libptytty" "libraw1394" "libreswan" "libshout" "libsignon-glib" "libsmi" "libspectre" "libspectrum" "libstatgrab" "libstroke" "libthreadar" "libticables2" "libticalcs2" "libticonv" "libtifiles2" "libu2f-host" "libu2f-server" "libuchardet" "libudfread" "libva-vdpau-driver" "libvdpau" "libvirt-glib" "libvisio" "libvorbis" "libvori" "libvterm" "libwebcam" "libwpg" "libwps" "libx86" "libxmi" "libykneomgr" "libyubikey" "libzmf" "lighttpd" "lilv" "lingot" "link-grammar" "linuxConsoleTools" "liquidwar" "lirc" "lklug-sinhala" "lldpd" "lmodern" "log4cpp" "log4cxx" "logstalgia" "loudmouth" "ltl2ba" "lttng-tools" "lttng-ust_2_12" "lttv" "luculent" "lv2" "lwm" "lxgw-wenkai" "lzip" "lzo" "m17n_db" "macse" "man-pages-posix" "mc" "mda_lv2" "memcached" "menumaker" "mesa-demos" "mesa_glu" "meterbridge" "mi2ly" "mikmod" "mimetic" "miniHttpd" "minidlna" "mm-common" "mno16" "motif" "mousetweaks" "movit" "mp3gain" "mp3val" "mpop" "msilbc" "msr" "mtdev" "mtools" "mtx" "musl" "mylvmbackup" "nanum" "nasm" "nasty" "nedit" "nemiver" "net-snmp" "networkmanager-openconnect" "networkmanager-strongswan" "networkmanager-vpnc" "networkmanagerapplet" "newt" "ngircd" "niftyreg" "nitrogen" "nkf" "nload" "npapi_sdk" "nss_pam_ldapd" "nut" "oath-toolkit" "obitools3" "objconv" "oddjob" "oidentd" "onboard" "openbox" "openfst" "opengrok" "openldap" "openntpd" "openocd" "openpa" "opensmtpd" "opusTools" "osinfo-db" "osmo" "out-of-tree" "p0f" "palp" "pam_mktemp" "pam_u2f" "paperkey" "paxctl" "paxtest" "pbzip2" "pcb" "pcg_c" "pcsc-cyberjack" "pdfchain" "pdfgrep" "peg" "pflogsumm" "pgbouncer" "phrasendrescher" "picosat" "pig" "pinpoint" "pioneers" "pitivi" "pkg-config-unwrapped" "plank" "plib" "plplot" "polytopes_db" "poppler_data" "pptp" "pptpd" "psftools" "pspp" "psutils" "qpid-cpp" "quast" "quilt" "radeontools" "randoop" "randtype" "rapidxml" "rascal" "rcs" "rdfind" "read-edid" "retro-gtk" "rgxg" "rhythmbox" "riemann" "rinutils" "ripmime" "rman" "roccat-tools" "rosegarden" "rpm2targz" "rscw" "rt-tests" "rush" "safefile" "sagittarius-scheme" "samtools" "sbc" "scanbd" "schroedinger" "scrypt" "sdparm" "seccure" "semodule-utils" "seq24" "seren" "serf" "setserial" "shhopt" "siege" "sipcalc" "smbnetfs" "socat" "sound-juicer" "sound-theme-freedesktop" "source-han-code-jp" "sourceHighlight" "spectmorph" "spf-engine" "spice-gtk" "spice-protocol" "spice-vdagent" "spice" "splat" "sqsh" "srecord" "sselp" "sshguard" "sshoogr" "sslmate" "stacks" "stm32flash" "strace" "streamripper" "stricat" "stun" "suricata" "survex" "svrcore" "swaks" "sylpheed" "synapse" "tachyon" "takao" "talkfilters" "talloc" "tanidvr" "tasksh" "tboot" "tdb" "ted" "telepathy-farstream" "telepathy-glib" "telepathy-idle" "telepathy-mission-control" "tessera" "tetraproc" "tevent" "thttpd" "tibetan-machine" "tidyp" "tie" "tilem" "timeline" "tipa" "tiptop" "tokyocabinet" "totem-pl-parser" "tpm-quote-tools" "tpm2-tools" "tqsl" "traceroute" "treemix" "trigger" "trousers" "trx" "tsocks" "ttf_bitstream_vera" "tudu" "tusk" "tvbrowser" "tweak" "ucommon" "udns" "uget" "unifont_upper" "unpaper" "unrtf" "unscii" "untex" "uw-ttyp0" "vassal" "vbindiff" "vcdimager" "vdmfec" "vdpauinfo" "vdrsymbols" "verifast" "virt-what" "vkdt" "vkeybd" "vlan" "vmpk" "vo-aacenc" "vocproc" "vrb" "wakelan" "warzone2100" "wbox" "wcalc" "wcslib" "wdiff" "weather" "weka" "wiki-js" "wily" "wimlib" "wipe" "wireless-regdb" "wmctrl" "wol" "worldpainter" "wqy_microhei" "wqy_zenhei" "x42-plugins" "xbill" "xcbutilxrm" "xearth" "xercesc" "xfsdump" "xfsprogs" "xlog" "xmacro" "xmedcon" "xmlindent" "xmlrpc_c" "xoscope" "xosd" "xplanet" "xsokoban" "xtruss" "xwayland" "xylib" "xzoom" "yasr" "yate" "yelp-tools" "ytalk" "zerofree" "zita-alsa-pcmi" "zita-at1" "zita-njbridge" "zs-wait4host" "zssh"];
in
pkgs.lib.concatMapStringsSep "\n" (pname: pkgs.${pname}.src.url) pnamesgit checkout 4254839dacf917d37c79e62cbf75b1eceed0d7a0~1
nix-instantiate --raw --eval eval-urls.nix > before
git checkout 4254839dacf917d37c79e62cbf75b1eceed0d7a0
nix-instantiate --raw --eval eval-urls.nix > after
diff before after # no output, all went good!
true, sorry i feel dumb now thanks for checking that the urls didn't change |
4254839 to
0a61c71
Compare
|
resolved merge conflicts by removing changes in conflicting files |
0a61c71 to
36af9b6
Compare
36af9b6 to
9c8e960
Compare
gepbird
left a comment
There was a problem hiding this comment.
Still looks good, I ran the above checks again.
|
Look people, if you're going to keep sending random treewides that don't practically improve things, AT LEAST send them to staging so I don't have to keep fixing your merge conflicts every 6 hours. |
|
Wouldn't it create even more merge conflicts this way? |
ref: #277994
pname misuse in urls was easy to automatically fix
script:
Things done