From d2b0bf5658256ccc85f2cad097d45f82e7804e9c Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 22 May 2024 18:28:24 +0200 Subject: [PATCH 1/5] Revert "util-linux: also downgrade static builds already" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 15d8d27bd66a336e2a26537448d87cfe2d025b7a. Too many issues with 2.40 for now — we're reverting to 2.39. --- pkgs/os-specific/linux/util-linux/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index ef3614bce02ef..41b022496273c 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -22,7 +22,7 @@ let # Temporarily avoid applying the patches on systems where already we have binaries # (in particular x86_64-linux and aarch64-linux) as the package is a huge rebuild there. - avoidRebuild = with stdenv.hostPlatform; isLinux && is64bit && !isStatic; + avoidRebuild = stdenv.isLinux && stdenv.is64bit; in stdenv.mkDerivation rec { pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal"; From 125b5dcfb5871af68c8709d8933efc41286bbb90 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 22 May 2024 18:28:56 +0200 Subject: [PATCH 2/5] Revert "util-linux: 2.40.1 -> 2.39.4 (except 64-bit linux for now)" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fa8ec6702a3ee117c98d5519b6b054b0f75c6e9b. Too many issues with 2.40 for now — we're reverting to 2.39. --- pkgs/os-specific/linux/util-linux/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 41b022496273c..4f957dfcc1675 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -26,17 +26,28 @@ let in stdenv.mkDerivation rec { pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal"; - version = if avoidRebuild then "2.40.1" else "2.39.4"; + version = "2.40.1"; src = fetchurl { url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/util-linux-${version}.tar.xz"; - hash = if avoidRebuild - then "sha256-WeZ2qlPMtEtsOfD/4BqPonSJHJG+8UdHUvrZJGHe8k8=" - else "sha256-bE+HI9r9QcOdk+y/FlCfyIwzzVvTJ3iArlodl6AU/Q4="; + hash = "sha256-WeZ2qlPMtEtsOfD/4BqPonSJHJG+8UdHUvrZJGHe8k8="; }; patches = [ ./rtcwake-search-PATH-for-shutdown.patch + ] ++ lib.optionals (!avoidRebuild) [ + # Backports of patches that hopefully fix an intermittent parallel + # build failure. + (fetchpatch { + name = "pam_lastlog2:-drop-duplicate-assignment-pam_lastlog2_la_LDFLAGS.patch"; + url = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/patch/?id=290748729dc3edf9ea1c680c8954441a5e367a44"; + hash = "sha256-Hi+SrT8UovZyCWf6Jc7s3dc6YLyfOfgqohOEnc7aJq4="; + }) + (fetchpatch { + name = "libuuid:-drop-duplicate-assignment-liuuid_la_LDFLAGS"; + url = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/patch/?id=597e8b246ae31366514ead6cca240a09fe5e1528"; + hash = "sha256-QCx3MD/57x2tV1SlJ79EYyxafhaEH4UC+Dt24DA6P8I="; + }) ]; # We separate some of the utilities into their own outputs. This @@ -87,6 +98,7 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ pkg-config installShellFiles ] + ++ lib.optionals (!avoidRebuild) [ autoreconfHook gtk-doc ] ++ lib.optionals translateManpages [ po4a ]; buildInputs = [ zlib libxcrypt sqlite ] From 7a870b7464dc985c34577340b7daf49c210074f7 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 22 May 2024 18:29:02 +0200 Subject: [PATCH 3/5] Revert "util-linux: try to fix parallel build failures" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit cb8fa2b758f8b3f5b7dfacf46d877ef1635938ea. Too many issues with 2.40 for now — we're reverting to 2.39. --- pkgs/os-specific/linux/util-linux/default.nix | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 4f957dfcc1675..642480b670c71 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,5 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, gtk-doc, pkg-config -, zlib, shadow +{ lib, stdenv, fetchurl, pkg-config, zlib, shadow , capabilitiesSupport ? stdenv.isLinux , libcap_ng , libxcrypt @@ -19,11 +18,7 @@ , memstreamHook , gitUpdater }: -let - # Temporarily avoid applying the patches on systems where already we have binaries - # (in particular x86_64-linux and aarch64-linux) as the package is a huge rebuild there. - avoidRebuild = stdenv.isLinux && stdenv.is64bit; -in + stdenv.mkDerivation rec { pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal"; version = "2.40.1"; @@ -35,19 +30,6 @@ stdenv.mkDerivation rec { patches = [ ./rtcwake-search-PATH-for-shutdown.patch - ] ++ lib.optionals (!avoidRebuild) [ - # Backports of patches that hopefully fix an intermittent parallel - # build failure. - (fetchpatch { - name = "pam_lastlog2:-drop-duplicate-assignment-pam_lastlog2_la_LDFLAGS.patch"; - url = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/patch/?id=290748729dc3edf9ea1c680c8954441a5e367a44"; - hash = "sha256-Hi+SrT8UovZyCWf6Jc7s3dc6YLyfOfgqohOEnc7aJq4="; - }) - (fetchpatch { - name = "libuuid:-drop-duplicate-assignment-liuuid_la_LDFLAGS"; - url = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/patch/?id=597e8b246ae31366514ead6cca240a09fe5e1528"; - hash = "sha256-QCx3MD/57x2tV1SlJ79EYyxafhaEH4UC+Dt24DA6P8I="; - }) ]; # We separate some of the utilities into their own outputs. This @@ -98,7 +80,6 @@ stdenv.mkDerivation rec { ]; nativeBuildInputs = [ pkg-config installShellFiles ] - ++ lib.optionals (!avoidRebuild) [ autoreconfHook gtk-doc ] ++ lib.optionals translateManpages [ po4a ]; buildInputs = [ zlib libxcrypt sqlite ] From 0dbb16a0030a6f30a94217c6ae3d48e5e95c717a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 22 May 2024 18:29:05 +0200 Subject: [PATCH 4/5] Revert "util-linux: 2.39.3 -> 2.40.1" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 57bdbabed57431940bafd22371c910c187213ea2. Too many issues with 2.40 for now — we're reverting to 2.39. Fixes: https://github.com/NixOS/nixpkgs/pull/311988 --- pkgs/os-specific/linux/util-linux/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 642480b670c71..ba989b41a6cac 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -2,7 +2,6 @@ , capabilitiesSupport ? stdenv.isLinux , libcap_ng , libxcrypt -, sqlite , ncursesSupport ? true , ncurses , pamSupport ? true @@ -21,11 +20,11 @@ stdenv.mkDerivation rec { pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal"; - version = "2.40.1"; + version = "2.39.3"; src = fetchurl { url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/util-linux-${version}.tar.xz"; - hash = "sha256-WeZ2qlPMtEtsOfD/4BqPonSJHJG+8UdHUvrZJGHe8k8="; + hash = "sha256-e2YF5I0aSfQ8xLTPxZ8xPQ3VQC+kC5aBC9Vy4Wff7Q8="; }; patches = [ @@ -41,7 +40,7 @@ stdenv.mkDerivation rec { separateDebugInfo = true; postPatch = '' - patchShebangs tests/run.sh tools/all_syscalls + patchShebangs tests/run.sh substituteInPlace sys-utils/eject.c \ --replace "/bin/umount" "$bin/bin/umount" @@ -60,7 +59,6 @@ stdenv.mkDerivation rec { "--enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin" "--disable-makeinstall-setuid" "--disable-makeinstall-chown" "--disable-su" # provided by shadow - "--with-tmpfilesdir=${placeholder "out"}/lib/tmpfiles.d" (lib.enableFeature writeSupport "write") (lib.enableFeature nlsSupport "nls") (lib.withFeature ncursesSupport "ncursesw") @@ -82,7 +80,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config installShellFiles ] ++ lib.optionals translateManpages [ po4a ]; - buildInputs = [ zlib libxcrypt sqlite ] + buildInputs = [ zlib libxcrypt ] ++ lib.optionals pamSupport [ pam ] ++ lib.optionals capabilitiesSupport [ libcap_ng ] ++ lib.optionals ncursesSupport [ ncurses ] From 9ffb5583b1f5bb2285611887c832cde2c3e3e15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 24 May 2024 11:01:09 +0200 Subject: [PATCH 5/5] util-linux: 2.39.3 -> 2.39.4 https://github.com/util-linux/util-linux/blob/v2.39.4/Documentation/releases/v2.39.4-ReleaseNotes --- pkgs/os-specific/linux/util-linux/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index ba989b41a6cac..af7a4f9f423a3 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -20,11 +20,11 @@ stdenv.mkDerivation rec { pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal"; - version = "2.39.3"; + version = "2.39.4"; src = fetchurl { url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/util-linux-${version}.tar.xz"; - hash = "sha256-e2YF5I0aSfQ8xLTPxZ8xPQ3VQC+kC5aBC9Vy4Wff7Q8="; + hash = "sha256-bE+HI9r9QcOdk+y/FlCfyIwzzVvTJ3iArlodl6AU/Q4="; }; patches = [