mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
linuxPackages.drbd: fix file collision (#307550)
This commit is contained in:
parent
7c65c2e202
commit
c2c2960d2a
@ -26,12 +26,12 @@ stdenv.mkDerivation rec {
|
||||
# 6.4 and newer provide a in-tree version of the handshake module https://www.kernel.org/doc/html/v6.4/networking/tls-handshake.html
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D drbd/drbd.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
|
||||
install -D drbd/drbd_transport_tcp.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
|
||||
install -D drbd/drbd_transport_lb-tcp.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
|
||||
install -D drbd/drbd_transport_rdma.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
|
||||
install -D drbd/drbd.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd9
|
||||
install -D drbd/drbd_transport_tcp.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd9
|
||||
install -D drbd/drbd_transport_lb-tcp.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd9
|
||||
install -D drbd/drbd_transport_rdma.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd9
|
||||
${lib.optionalString (lib.versionOlder kernel.version "6.4") ''
|
||||
install -D drbd/drbd-kernel-compat/handshake/handshake.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
|
||||
install -D drbd/drbd-kernel-compat/handshake/handshake.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd9
|
||||
''}
|
||||
runHook postInstall
|
||||
'';
|
||||
@ -41,9 +41,13 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace Makefile --replace 'SHELL=/bin/bash' 'SHELL=${builtins.getEnv "SHELL"}'
|
||||
'';
|
||||
|
||||
# builder.pl had complained about the same file (drbd.ko.xz) provided by two different packages
|
||||
# builder.pl also had complained about different permissions between the files from the two packages
|
||||
# The compression is required because the kernel has the CONFIG_MODULE_COMPRESS_XZ option enabled
|
||||
postFixup = ''
|
||||
for ko in $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd/*.ko; do
|
||||
for ko in $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd9/*.ko; do
|
||||
xz --compress -6 --threads=0 $ko
|
||||
chmod 0444 $ko.xz
|
||||
done
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user