Merge pull request #89948 (nixpart0 build fixes)
This includes a bunch of fixes against glibc >= 2.28 by @pbogdan, thanks a lot :-) While I haven't tested this by bootstrapping a NixOps Hetzner machine (this is what nixpart0 is used for), I'm merging this anyway, since the worst that could happen is that it's still broken. I've build this on x86_64-linux but didn't extensively test it.
This commit is contained in:
commit
4c633178b9
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, lvm2, libgcrypt, libuuid, pkgconfig, popt
|
{ stdenv, fetchurl, fetchpatch, lvm2, libgcrypt, libuuid, pkgconfig, popt
|
||||||
, enablePython ? true, python ? null
|
, enablePython ? true, python ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -12,6 +12,15 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1n1qk5chyjspbiianrdb55fhb4wl0vfyqz2br05vfb24v4qlgbx2";
|
sha256 = "1n1qk5chyjspbiianrdb55fhb4wl0vfyqz2br05vfb24v4qlgbx2";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix build with glibc >= 2.28
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-fs/cryptsetup/files/cryptsetup-1.7.1-sysmacros.patch?id=d72316f97ebcc7fe622b21574442a9ac59b9115f";
|
||||||
|
sha256 = "0xbhazgl44bimqhcrhajk016w9wi7bkrgwyfq13xmrvyrllqvgdx";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [ "--enable-cryptsetup-reencrypt" ]
|
configureFlags = [ "--enable-cryptsetup-reencrypt" ]
|
||||||
++ stdenv.lib.optional enablePython "--enable-python";
|
++ stdenv.lib.optional enablePython "--enable-python";
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ let
|
||||||
|
|
||||||
cryptsetup = import ./cryptsetup.nix {
|
cryptsetup = import ./cryptsetup.nix {
|
||||||
inherit stdenv fetchurl python;
|
inherit stdenv fetchurl python;
|
||||||
inherit (pkgs) pkgconfig libgcrypt libuuid popt lvm2;
|
inherit (pkgs) fetchpatch pkgconfig libgcrypt libuuid popt lvm2;
|
||||||
};
|
};
|
||||||
|
|
||||||
dmraid = import ./dmraid.nix {
|
dmraid = import ./dmraid.nix {
|
||||||
|
@ -27,17 +27,17 @@ let
|
||||||
|
|
||||||
lvm2 = import ./lvm2.nix {
|
lvm2 = import ./lvm2.nix {
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
inherit (pkgs) pkgconfig utillinux systemd coreutils;
|
inherit (pkgs) fetchpatch pkgconfig utillinux systemd coreutils;
|
||||||
};
|
};
|
||||||
|
|
||||||
multipath_tools = import ./multipath-tools.nix {
|
multipath_tools = import ./multipath-tools.nix {
|
||||||
inherit stdenv fetchurl lvm2;
|
inherit stdenv fetchurl lvm2;
|
||||||
inherit (pkgs) readline systemd libaio gzip;
|
inherit (pkgs) fetchpatch readline systemd libaio gzip;
|
||||||
};
|
};
|
||||||
|
|
||||||
parted = import ./parted.nix {
|
parted = import ./parted.nix {
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
inherit (pkgs) utillinux readline libuuid gettext check lvm2;
|
inherit (pkgs) fetchpatch utillinux readline libuuid gettext check lvm2;
|
||||||
};
|
};
|
||||||
|
|
||||||
pyblock = import ./pyblock.nix {
|
pyblock = import ./pyblock.nix {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, systemd, utillinux, coreutils }:
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, systemd, utillinux, coreutils }:
|
||||||
|
|
||||||
let
|
let
|
||||||
v = "2.02.106";
|
v = "2.02.106";
|
||||||
|
@ -12,6 +12,18 @@ stdenv.mkDerivation {
|
||||||
sha256 = "0nr833bl0q4zq52drjxmmpf7bs6kqxwa5kahwwxm9411khkxz0vc";
|
sha256 = "0nr833bl0q4zq52drjxmmpf7bs6kqxwa5kahwwxm9411khkxz0vc";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix build with glibc >= 2.28
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/lvmteam/lvm2/commit/92d5a8441007f578e000b492cecf67d6b8a87405.patch";
|
||||||
|
sha256 = "1yqd6jng0b370k53vks1shg57yhfyribhpmv19km5zsjqf0qqx2d";
|
||||||
|
excludes = [
|
||||||
|
"libdm/libdm-stats.c"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--disable-readline"
|
"--disable-readline"
|
||||||
"--enable-udev_rules"
|
"--enable-udev_rules"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# FIXME: unify with pkgs/os-specific/linux/multipath-tools/default.nix.
|
# FIXME: unify with pkgs/os-specific/linux/multipath-tools/default.nix.
|
||||||
|
|
||||||
{ stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }:
|
{ stdenv, fetchurl, fetchpatch, lvm2, libaio, gzip, readline, systemd }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "multipath-tools-0.4.9";
|
name = "multipath-tools-0.4.9";
|
||||||
|
@ -10,6 +10,18 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "04n7kazp1zrlqfza32phmqla0xkcq4zwn176qff5ida4a60whi4d";
|
sha256 = "04n7kazp1zrlqfza32phmqla0xkcq4zwn176qff5ida4a60whi4d";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix build with glibc >= 2.28
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-fs/multipath-tools/files/multipath-tools-0.6.4-sysmacros.patch?id=eb22b954c177b5c1e2b6ed5c7cdd02f40f40d757";
|
||||||
|
sha256 = "1an0cgmz7g03c4qjimhpm9fcf2iswws18lwqxi688k87qm3xb5qd";
|
||||||
|
excludes = [
|
||||||
|
"libmultipath/util.c"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
buildInputs = [ lvm2 libaio readline gzip ];
|
buildInputs = [ lvm2 libaio readline gzip ];
|
||||||
|
@ -26,6 +38,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id
|
substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id
|
||||||
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id
|
substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.lib}/lib/udev/scsi_id
|
||||||
|
|
||||||
|
sed -i -re '
|
||||||
|
s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'",
|
||||||
|
' libmultipath/defaults.h
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, lvm2, libuuid, gettext, readline
|
{ stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline
|
||||||
, utillinux, check, enableStatic ? false }:
|
, utillinux, check, enableStatic ? false }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "05fa4m1bky9d13hqv91jlnngzlyn7y4rnnyq6d86w0dg3vww372y";
|
sha256 = "05fa4m1bky9d13hqv91jlnngzlyn7y4rnnyq6d86w0dg3vww372y";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix build with glibc >= 2.28
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-block/parted/files/parted-3.2-sysmacros.patch?id=8e2414f551c14166f259f9a25a594aec7a5b9ea0";
|
||||||
|
sha256 = "0fdgifjbri7n28hv74zksac05gw72p2czzvyar0jp62b9dnql3mp";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ libuuid ]
|
buildInputs = [ libuuid ]
|
||||||
++ stdenv.lib.optional (readline != null) readline
|
++ stdenv.lib.optional (readline != null) readline
|
||||||
++ stdenv.lib.optional (gettext != null) gettext
|
++ stdenv.lib.optional (gettext != null) gettext
|
||||||
|
|
12
pkgs/tools/filesystems/nixpart/0.4/pyblock-sysmacros.h.patch
Normal file
12
pkgs/tools/filesystems/nixpart/0.4/pyblock-sysmacros.h.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/dm.c b/dm.c
|
||||||
|
index 5daa0e5..d5b84c8 100644
|
||||||
|
--- a/dm.c
|
||||||
|
+++ b/dm.c
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#include <sys/sysmacros.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdarg.h>
|
|
@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "f6cef88969300a6564498557eeea1d8da58acceae238077852ff261a2cb1d815";
|
sha256 = "f6cef88969300a6564498557eeea1d8da58acceae238077852ff261a2cb1d815";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix build with glibc >= 2.28
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
||||||
|
./pyblock-sysmacros.h.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i -e 's|/usr/include/python|${python}/include/python|' \
|
sed -i -e 's|/usr/include/python|${python}/include/python|' \
|
||||||
-e 's/-Werror *//' -e 's|/usr/|'"$out"'/|' Makefile
|
-e 's/-Werror *//' -e 's|/usr/|'"$out"'/|' Makefile
|
||||||
|
|
Loading…
Reference in New Issue
Block a user