I pretty much manually applied all the changes in the patch to the new codebase and then generated a new diff because the pull request mentioned at the top of the patch was not accepted and will probably never be updated again.
thin-provisioning-tools has a _huge_ closure size (hundreds of
megabytes) and the only reference in the output of the lvm2 package is a
_comment_ in the etc/lvm.conf
The lvm2 package thus does not seem to depend on thin-provisoning-tools
in any way.
Reverts 9326a89910
thin provisoning is broken with or without this change:
https://github.com/NixOS/nixpkgs/issues/15516
A proper fix is here:
https://github.com/NixOS/nixpkgs/pull/46541
References:
$ nix why-depends nixpkgs#lvm2 nixpkgs#thin-provisioning-tools
/nix/store/n7zwwxi0ihjks7qk9bq5lbkniligfcqc-lvm2-2.03.11
└───etc/lvm.conf: …_check_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-prov>
→ /nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0
$ ag thin-provisioning-tools --search-binary
etc/lvm.conf
1093: # (See package device-mapper-persistent-data or thin-provisioning-tools)
1095: # thin_check_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/thin_check"
1100: # (See package device-mapper-persistent-data or thin-provisioning-tools)
1102: # thin_dump_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/thin_dump"
1108: # (See package device-mapper-persistent-data or thin-provisioning-tools)
1110: # thin_repair_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/thin_repair"
1155: # (See package device-mapper-persistent-data or thin-provisioning-tools)
1157: # cache_check_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/cache_check"
1162: # (See package device-mapper-persistent-data or thin-provisioning-tools)
1164: # cache_dump_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/cache_dump"
1170: # (See package device-mapper-persistent-data or thin-provisioning-tools)
1172: # cache_repair_executable = "/nix/store/w5an38q6byfr1sihks66srbqdii9hnsd-thin-provisioning-tools-0.9.0/bin/cache_repair"
Also removing a comment that instructs maintainers to cross-check
the hash with one that is posted upstream, because as @lilyball
reasoned:
"I'm not really sure what the benefit of comparing the hash is; if the
download is tampered with, the hash is served from the same site and
would presumably be tampered with as well, and the download is done over
https and declares its Content-Length so there's no risk of truncation
(which would cause the file to fail to unpack anyway)"