diff options
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/audit/default.nix | 9 | ||||
-rw-r--r-- | pkgs/os-specific/linux/bcc/default.nix | 8 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel-headers/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/manual-config.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kexec-tools/default.nix | 7 | ||||
-rw-r--r-- | pkgs/os-specific/linux/libsepol/default.nix | 16 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 4 |
7 files changed, 35 insertions, 16 deletions
diff --git a/pkgs/os-specific/linux/audit/default.nix b/pkgs/os-specific/linux/audit/default.nix index 6fa7ba28d8e..a7f17e44950 100644 --- a/pkgs/os-specific/linux/audit/default.nix +++ b/pkgs/os-specific/linux/audit/default.nix @@ -37,7 +37,14 @@ stdenv.mkDerivation rec { # TODO: Remove the musl patches when # https://github.com/linux-audit/audit-userspace/pull/25 # is available with the next release. - patches = [ ./patches/weak-symbols.patch ] + patches = [ + ./patches/weak-symbols.patch + (fetchpatch { + # upstream build fix against -fno-common compilers like >=gcc-10 + url = "https://github.com/linux-audit/audit-userspace/commit/017e6c6ab95df55f34e339d2139def83e5dada1f.patch"; + sha256 = "100xa1rzkv0mvhjbfgpfm72f7c4p68syflvgc3xm6pxgrqqmfq8h"; + }) + ] ++ lib.optional stdenv.hostPlatform.isMusl [ ( let patch = fetchpatch { diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index 929981df470..221f38faa87 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch +{ lib, stdenv, fetchFromGitHub , makeWrapper, cmake, llvmPackages, kernel , flex, bison, elfutils, python, luajit, netperf, iperf, libelf , systemtap, bash, libbpf @@ -29,12 +29,6 @@ python.pkgs.buildPythonApplication rec { # This is needed until we fix # https://github.com/NixOS/nixpkgs/issues/40427 ./fix-deadlock-detector-import.patch - # Add definition for BTF_KIND_FLOAT, added in Linux 5.14 - # Can be removed once linuxHeaders (used here via glibc) are bumped to 5.14+. - (fetchpatch { - url = "https://salsa.debian.org/debian/bpfcc/-/raw/71136ef5b66a2ecefd635a7aca2e0e835ff09095/debian/patches/0004-compat-defs.patch"; - sha256 = "05s1zxihwkvbl2r2mqc5dj7fpcipqyvwr11v8b9hqbwjkm3qpz40"; - }) ]; propagatedBuildInputs = [ python.pkgs.netaddr ]; diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index 9d727838b3f..27428b37284 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -81,12 +81,12 @@ let in { inherit makeLinuxHeaders; - linuxHeaders = let version = "5.12"; in + linuxHeaders = let version = "5.14"; in makeLinuxHeaders { inherit version; src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "sha256-fQ328r8jhNaNC9jh/j4HHWQ2Tc3GAC57XIfJLUj6w2Y="; + sha256 = "sha256-fgaLXg0mpisQ5TILJdzldYjLvG94HAkEQhOMnJwycbI="; }; patches = [ ./no-relocs.patch # for building x86 kernel headers on non-ELF platforms diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index dc59a3f2610..44e0b1d77b2 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -261,8 +261,7 @@ let find . -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w # Keep root and arch-specific Makefiles - chmod u-w Makefile - chmod u-w arch/$arch/Makefile* + chmod u-w Makefile arch/"$arch"/Makefile* # Keep whole scripts dir chmod u-w -R scripts diff --git a/pkgs/os-specific/linux/kexec-tools/default.nix b/pkgs/os-specific/linux/kexec-tools/default.nix index 21d803e2b72..6e6eecd4931 100644 --- a/pkgs/os-specific/linux/kexec-tools/default.nix +++ b/pkgs/os-specific/linux/kexec-tools/default.nix @@ -29,6 +29,13 @@ stdenv.mkDerivation rec { url = "https://src.fedoraproject.org/rpms/kexec-tools/raw/cb1e5463b5298b064e9b6c86ad6fe3505fec9298/f/kexec-tools-2.0.20-fix-broken-multiboot2-buliding-for-i386.patch"; sha256 = "1kzmcsbhwfdgxlc5s88ir0n494phww1j16yk0z42x09qlkxxkg0l"; }) + + (fetchpatch { + # upstream build fix against -fno-common compilers like >=gcc-10 + name = "fno-common.patch"; + url = "https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/patch/?id=cc087b11462af9f971a2c090d07e8d780a867b50"; + sha256 = "043hcsy6m14h64p6b9w25c7a3y0f487322dj81l6mbm6sws6s9lv"; + }) ]; meta = with lib; { diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix index 732ad88c70d..e90c0894209 100644 --- a/pkgs/os-specific/linux/libsepol/default.nix +++ b/pkgs/os-specific/linux/libsepol/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, flex }: +{ lib, stdenv, fetchurl, fetchpatch, flex }: stdenv.mkDerivation rec { pname = "libsepol"; @@ -13,6 +13,20 @@ stdenv.mkDerivation rec { sha256 = "0ygb6dh5lng91xs6xiqf5v0nxa68qmjc787p0s5h9w89364f2yjv"; }; + patches = [ + # upstream build fix against -fno-common compilers like >=gcc-10 + (fetchpatch { + url = "https://github.com/SELinuxProject/selinux/commit/a96e8c59ecac84096d870b42701a504791a8cc8c.patch"; + sha256 = "0aybv4kzbhx8xq6s82dsh4ib76k59qzh2bgxmk44iq5cjnqn5rd6"; + stripLen = 1; + }) + (fetchpatch { + url = "https://github.com/SELinuxProject/selinux/commit/3d32fc24d6aff360a538c63dad08ca5c957551b0.patch"; + sha256 = "1mphwdlj4d6mwmsp5xkpf6ci4rxhgbi3fm79d08h4jbzxaf4wny4"; + stripLen = 1; + }) + ]; + postPatch = lib.optionalString stdenv.hostPlatform.isStatic '' substituteInPlace src/Makefile --replace 'all: $(LIBA) $(LIBSO)' 'all: $(LIBA)' sed -i $'/^\t.*LIBSO/d' src/Makefile diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 9f92c34cee6..e0a4128b0cd 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -184,9 +184,6 @@ stdenv.mkDerivation { substituteInPlace src/basic/path-util.h --replace "@defaultPathNormal@" "${placeholder "out"}/bin/" substituteInPlace src/boot/efi/meson.build \ --replace \ - "find_program('ld'" \ - "find_program('${stdenv.cc.bintools.targetPrefix}ld'" \ - --replace \ "find_program('objcopy'" \ "find_program('${stdenv.cc.bintools.targetPrefix}objcopy'" '' + ( @@ -408,6 +405,7 @@ stdenv.mkDerivation { "-Dsmack=true" "-Db_pie=true" "-Dinstall-sysconfdir=false" + "-Defi-ld=${stdenv.cc.bintools.targetPrefix}ld" /* As of now, systemd doesn't allow runtime configuration of these values. So the settings in /etc/login.defs have no effect on it. Many people think this |