I have installed a very barebones server with NixOS. Whenever I run nixos-rebuild it shows the following warnings:
collision between `/nix/store/vyq3g7s0adhsg98vynbgvhlzcnq614r1-systemd-239.20190110/sbin/resolvconf' and `/nix/store/5m7kwh9495zqpd63sj3pl6pqcb9k7fph-openresolv-3.9.0/sbin/resolvconf'
collision between `/nix/store/vyq3g7s0adhsg98vynbgvhlzcnq614r1-systemd-239.20190110/bin/resolvconf' and `/nix/store/5m7kwh9495zqpd63sj3pl6pqcb9k7fph-openresolv-3.9.0/bin/resolvconf'
collision between `/nix/store/xmyw5h1bf7qvkqc1hchr5wqri58v9pxd-getent-1003.1-2008/bin/getent' and `/nix/store/5arqv53qr6dzrzcs88dnssalgwnrj9cy-glibc-2.27-bin/bin/getent'
collision between `/nix/store/vmbynab44f4bnqhxpadjr8qrnh572nfc-getconf-1003.1-2008/bin/getconf' and `/nix/store/5arqv53qr6dzrzcs88dnssalgwnrj9cy-glibc-2.27-bin/bin/getconf'
collision between `/nix/store/4s97950k4iibphwq5is0y2f64c5v7mbc-gnutar-1.31/libexec/rmt' and `/nix/store/z571hvkn00gzc2m9zlrw8h1l9n0pa65x-cpio-2.12/libexec/rmt'
collision between `/nix/store/4s97950k4iibphwq5is0y2f64c5v7mbc-gnutar-1.31/share/man/man8/rmt.8.gz' and `/nix/store/z571hvkn00gzc2m9zlrw8h1l9n0pa65x-cpio-2.12/share/man/man8/rmt.8.gz'
collision between `/nix/store/8d0hpg4j25bw3c3bkc7bd5cc52rrf5nw-procps-3.3.15/bin/uptime' and `/nix/store/brwmxi4vnd8byrf2mmd0xjxa679ndddm-coreutils-8.30/bin/uptime'
collision between `/nix/store/8d0hpg4j25bw3c3bkc7bd5cc52rrf5nw-procps-3.3.15/bin/kill' and `/nix/store/brwmxi4vnd8byrf2mmd0xjxa679ndddm-coreutils-8.30/bin/kill'
collision between `/nix/store/8d0hpg4j25bw3c3bkc7bd5cc52rrf5nw-procps-3.3.15/share/man/man1/kill.1.gz' and `/nix/store/brwmxi4vnd8byrf2mmd0xjxa679ndddm-coreutils-8.30/share/man/man1/kill.1.gz'
collision between `/nix/store/8d0hpg4j25bw3c3bkc7bd5cc52rrf5nw-procps-3.3.15/share/man/man1/uptime.1.gz' and `/nix/store/brwmxi4vnd8byrf2mmd0xjxa679ndddm-coreutils-8.30/share/man/man1/uptime.1.gz'
collision between `/nix/store/mbkp2r3ifzrqfy83a1yqln87md0mzg6q-util-linux-2.33.1-bin/sbin/kill' and `/nix/store/8d0hpg4j25bw3c3bkc7bd5cc52rrf5nw-procps-3.3.15/sbin/kill'
collision between `/nix/store/mbkp2r3ifzrqfy83a1yqln87md0mzg6q-util-linux-2.33.1-bin/bin/kill' and `/nix/store/brwmxi4vnd8byrf2mmd0xjxa679ndddm-coreutils-8.30/bin/kill'
collision between `/nix/store/4gfrafldk8n66wnzgbjwlfls47h573ym-util-linux-2.33.1-man/share/man/man1/kill.1.gz' and `/nix/store/brwmxi4vnd8byrf2mmd0xjxa679ndddm-coreutils-8.30/share/man/man1/kill.1.gz'
I get that it does not matter _that_ much which of these are used, but it makes these commands not very transparent. Why is resolvconf being used from systemd and not openresolv, while openresolv is apparently part of systemPackages?
Should we make sure these packages will not both be part of systemPackages or should we make sure the files are only available in one of the two packages?
nixos-rebuild switch - system: `"x86_64-linux"`
- host os: `Linux 4.14.98, NixOS, 19.03pre169106.1a88aa9e0cd (Koi)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.2.1`
- channels(root): `"nixos-19.03pre169108.36f31600749, nixpkgs-19.03pre169106.1a88aa9e0cd"`
- nixpkgs: `/root/.nix-defexpr/channels/nixpkgs`
These are usually fixable by just setting priority values. coreutils should probably have a lower priority as they are usually cross platform but not as many supported features.
The getconf and getent are interesting because they are actually symlinks to glibc. But we might as well make unixtools lower priority as well.
Is this something we should do nixpkgs-wide? Will that avoid the warning messages?
I was thinking why these are providing the same files and why both packages are being used. For instance, do we really need openresolv or is that included unintentionally?
The priorities is a way to solve this safely, but I feel like there shouldn't be any conflicts for the base packages at all.
Maybe openresolv we can leave out of systemPackages. But, some of these collisions are kind of unavoidable. We need both procps and coreutils even though they both provide kill bunary. It might be interesting to see which other distros use but IIRC they are almost identical
For coreutils, ArchLinux seems to leave out the kill binary: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/coreutils#n39
This also feels a bit wrong, as it isn't the original package anymore. Changing the priority does indeed sound like a better option. Coreutils should have a lower priority.
I tried giving coreutils a lower priority, but it doesn't seem to have made a difference for those warnings. https://github.com/mayflower/nixpkgs/commit/5d0f7b3e6a002e434a208e995a5e0986f53ad31a
oh it already has lowprio: https://github.com/NixOS/nixpkgs/blob/45c073e4da8ef4234f07f537238b65a31788d99b/nixos/modules/config/system-path.nix#L10
but it doesn't really work when everything has the same priority.
systemd-resolved is not enable by default so resolvconf shouln't be really pointing to resolvectl.
I think the dummy command provided for compatibility doesn't work correctly if resolved is not running and dhcpcd needs it to configure interfaces.
@rnhmjoj Should we just give openresolv a higher priority than systemd?
@matthewbauer Yes, correct.
The dhcpcd resolvconf hook check if resolvconf is installed and, because the command is in the PATH,
it won't fall back to writing /etc/resolv.conf directly but will attempt to execute something like this:
echo 'nameserver 10.0.1.1' | resolvconf -a wlan0
Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found.
Reproducible way to see these collisions:
With a file nixpkgs/vm.nix set to
{...}: {}
I ran
in the 7f35ed9df40 (the latest commit on the release-19.03 branch), and I get these collision messages:
collision between `/nix/store/8sj7f49hq62bgn66qkhjdiq5k1knk7pi-systemd-239.20190219/bin/resolvconf' and `/nix/store/qrwvyvrnvvs4isjrmzpi4y8abhnlnjvx-openresolv-3.9.0/bin/resolvconf'
collision between `/nix/store/8sj7f49hq62bgn66qkhjdiq5k1knk7pi-systemd-239.20190219/sbin/resolvconf' and `/nix/store/qrwvyvrnvvs4isjrmzpi4y8abhnlnjvx-openresolv-3.9.0/sbin/resolvconf'
collision between `/nix/store/gnyad5wqf37ggwcdrp5rxjbxi8ciyx87-getent-1003.1-2008/bin/getent' and `/nix/store/p1aicp5gllvlnnr8a49i3inrgal1w812-glibc-2.27-bin/bin/getent'
collision between `/nix/store/q5lbfi48m8ghkkciwwldpxwyhp68jrmg-getconf-1003.1-2008/bin/getconf' and `/nix/store/p1aicp5gllvlnnr8a49i3inrgal1w812-glibc-2.27-bin/bin/getconf'
collision between `/nix/store/r6mklr53a3fs5197fz4rl7i5937bw9af-gnutar-1.31/libexec/rmt' and `/nix/store/ays51n1vgklzynpsifk6gjcplfrabaz4-cpio-2.12/libexec/rmt'
collision between `/nix/store/r6mklr53a3fs5197fz4rl7i5937bw9af-gnutar-1.31/share/man/man8/rmt.8.gz' and `/nix/store/ays51n1vgklzynpsifk6gjcplfrabaz4-cpio-2.12/share/man/man8/rmt.8.gz'
collision between `/nix/store/c8nja3vqayc6xl9bpjhn493j99djhjqm-procps-3.3.15/bin/kill' and `/nix/store/iwip9xwp1rrfkilq9wgcgqyqc1nv12p6-coreutils-8.30/bin/kill'
collision between `/nix/store/c8nja3vqayc6xl9bpjhn493j99djhjqm-procps-3.3.15/bin/uptime' and `/nix/store/iwip9xwp1rrfkilq9wgcgqyqc1nv12p6-coreutils-8.30/bin/uptime'
collision between `/nix/store/c8nja3vqayc6xl9bpjhn493j99djhjqm-procps-3.3.15/share/man/man1/kill.1.gz' and `/nix/store/iwip9xwp1rrfkilq9wgcgqyqc1nv12p6-coreutils-8.30/share/man/man1/kill.1.gz'
collision between `/nix/store/c8nja3vqayc6xl9bpjhn493j99djhjqm-procps-3.3.15/share/man/man1/uptime.1.gz' and `/nix/store/iwip9xwp1rrfkilq9wgcgqyqc1nv12p6-coreutils-8.30/share/man/man1/uptime.1.gz'
collision between `/nix/store/mnnx1yny4b43djzpcbi5z7236bcsfr1b-util-linux-2.33.1-bin/bin/kill' and `/nix/store/iwip9xwp1rrfkilq9wgcgqyqc1nv12p6-coreutils-8.30/bin/kill'
collision between `/nix/store/mnnx1yny4b43djzpcbi5z7236bcsfr1b-util-linux-2.33.1-bin/sbin/kill' and `/nix/store/c8nja3vqayc6xl9bpjhn493j99djhjqm-procps-3.3.15/sbin/kill'
collision between `/nix/store/fkjxdnsv03k8m8ysc248sv0fdchl511b-util-linux-2.33.1-man/share/man/man1/kill.1.gz' and `/nix/store/iwip9xwp1rrfkilq9wgcgqyqc1nv12p6-coreutils-8.30/share/man/man1/kill.1.gz'
ping
Hi all
nixos-version
19.03.172361.cf3e277dd0b (Koi)
I have the same collision on kill gnutar resolvconf
but also on
collision between /nix/store/iv79hkw8fh1mdhin7f78vwdi3396y3iy-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/128x128/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/128x128/apps/phonon-gstreamer.png'
collision between /nix/store/iv79hkw8fh1mdhin7f78vwdi3396y3iy-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/64x64/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/64x64/apps/phonon-gstreamer.png'
collision between /nix/store/iv79hkw8fh1mdhin7f78vwdi3396y3iy-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/22x22/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/22x22/apps/phonon-gstreamer.png'
collision between /nix/store/iv79hkw8fh1mdhin7f78vwdi3396y3iy-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/16x16/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/16x16/apps/phonon-gstreamer.png'
collision between /nix/store/iv79hkw8fh1mdhin7f78vwdi3396y3iy-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/scalable/apps/phonon-gstreamer.svgz' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/scalable/apps/phonon-gstreamer.svgz'
collision between /nix/store/iv79hkw8fh1mdhin7f78vwdi3396y3iy-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/48x48/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/48x48/apps/phonon-gstreamer.png'
collision between /nix/store/g65w9fpc5b3xgl15s2xvigv0d0z6487p-phonon-backend-gstreamer-qt4-4.9.0/share/icons/hicolor/128x128/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/128x128/apps/phonon-gstreamer.png'
collision between /nix/store/g65w9fpc5b3xgl15s2xvigv0d0z6487p-phonon-backend-gstreamer-qt4-4.9.0/share/icons/hicolor/64x64/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/64x64/apps/phonon-gstreamer.png'
collision between /nix/store/g65w9fpc5b3xgl15s2xvigv0d0z6487p-phonon-backend-gstreamer-qt4-4.9.0/share/icons/hicolor/22x22/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/22x22/apps/phonon-gstreamer.png'
collision between /nix/store/g65w9fpc5b3xgl15s2xvigv0d0z6487p-phonon-backend-gstreamer-qt4-4.9.0/share/icons/hicolor/16x16/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/16x16/apps/phonon-gstreamer.png'
collision between /nix/store/g65w9fpc5b3xgl15s2xvigv0d0z6487p-phonon-backend-gstreamer-qt4-4.9.0/share/icons/hicolor/scalable/apps/phonon-gstreamer.svgz' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/scalable/apps/phonon-gstreamer.svgz'
collision between /nix/store/g65w9fpc5b3xgl15s2xvigv0d0z6487p-phonon-backend-gstreamer-qt4-4.9.0/share/icons/hicolor/48x48/apps/phonon-gstreamer.png' and/nix/store/mrfyscriilpbyqvnfpgwa87ly4hky3jr-phonon-backend-gstreamer-qt5-4.9.0/share/icons/hicolor/48x48/apps/phonon-gstreamer.png'
@pirboazo This seems to include many more collisions than related to this issue.
Maybe rather than changing the nix-env priority, a better solution is to remove some of these programs (e.g. delete $out/bin/kill in util-linux's postInstall).
Maybe rather than changing the nix-env priority, a better solution is to remove some of these programs (e.g. delete
$out/bin/killin util-linux'spostInstall).
That seems hacky to me. What if you want util-linux's version of kill? Presumably if the maintainer thinks it's worth including, someone has a use for it. Nixpkgs shouldn't be making these decisions at the derivation level. Something like meta seems ideal because you can change it without effecting the derivation.
Since #61138 and #61180 were merged, does that mean this issue can be closed now?
I think so, I don't see these collisions anymore.
Let me know if this isn't fixed after all.
Most helpful comment
oh it already has lowprio: https://github.com/NixOS/nixpkgs/blob/45c073e4da8ef4234f07f537238b65a31788d99b/nixos/modules/config/system-path.nix#L10
but it doesn't really work when everything has the same priority.