From 95172d9ebefc6b4bce3fd4a54e098027dad44ea6 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Thu, 8 Jul 2021 09:04:20 -0600 Subject: [PATCH 1/6] idutils: fix by using latest gnulib --- pkgs/tools/misc/idutils/default.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/misc/idutils/default.nix b/pkgs/tools/misc/idutils/default.nix index ac64fe9e8bc4..e43ab2ae8797 100644 --- a/pkgs/tools/misc/idutils/default.nix +++ b/pkgs/tools/misc/idutils/default.nix @@ -1,27 +1,29 @@ -{ fetchurl, lib, stdenv, emacs }: +{ fetchurl, lib, stdenv, emacs, gnulib, autoconf, bison, automake, gettext, gperf, texinfo, perl, rsync, gawk}: stdenv.mkDerivation rec { - name = "idutils-4.6"; + pname = "idutils"; + version = "4.6"; src = fetchurl { - url = "mirror://gnu/idutils/${name}.tar.xz"; + url = "mirror://gnu/idutils/idutils-${version}.tar.xz"; sha256 = "1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1"; }; - preConfigure = - '' - # Fix for building on Glibc 2.16. Won't be needed once the - # gnulib in idutils is updated. - sed -i '/gets is a security hole/d' lib/stdio.in.h + preConfigure = '' + # replace embedded gnulib tests with those from gnulib package + bash -O extglob -c "cd gnulib-tests; rm -r !(Makefile.am)" + substituteInPlace ./configure.ac --replace "AC_PREREQ(2.61)" "AC_PREREQ(2.64)" + ./bootstrap --force --gnulib-srcdir=${gnulib} --skip-po --bootstrap-sync --no-git ''; buildInputs = lib.optional stdenv.isLinux emacs; + nativeBuildInputs = [ gnulib autoconf bison automake gettext gperf texinfo perl rsync gawk ]; doCheck = !stdenv.isDarwin; patches = [ ./nix-mapping.patch ]; - meta = { + meta = with lib; { description = "Text searching utility"; longDescription = '' @@ -46,10 +48,9 @@ stdenv.mkDerivation rec { ''; homepage = "https://www.gnu.org/software/idutils/"; - license = lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; - maintainers = [ ]; + maintainers = with maintainers; [ gfrascadorio ]; platforms = lib.platforms.all; - broken = true; }; } From 1d8caaff1ccb7b94a2adb8629aa84eff5a422343 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Thu, 8 Jul 2021 09:06:08 -0600 Subject: [PATCH 2/6] xprintidle-ng: latest gnulib requires autoconf 2.64 --- pkgs/tools/X11/xprintidle-ng/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/X11/xprintidle-ng/default.nix b/pkgs/tools/X11/xprintidle-ng/default.nix index 758450d36545..61e48de7f5e1 100644 --- a/pkgs/tools/X11/xprintidle-ng/default.nix +++ b/pkgs/tools/X11/xprintidle-ng/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace configure.ac \ - --replace "AC_PREREQ([2.62])" "AC_PREREQ([2.63])" + --replace "AC_PREREQ([2.62])" "AC_PREREQ([2.64])" ''; nativeBuildInputs = [ From 8f68b7c15d17682e950e507906d776c3a82086e2 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Thu, 8 Jul 2021 09:11:17 -0600 Subject: [PATCH 3/6] lbzip2: latest gnulib requires autoconf 2.64 --- pkgs/tools/compression/lbzip2/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/compression/lbzip2/default.nix b/pkgs/tools/compression/lbzip2/default.nix index 4072dd43aef1..ad36ebb81de6 100644 --- a/pkgs/tools/compression/lbzip2/default.nix +++ b/pkgs/tools/compression/lbzip2/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf automake ]; preConfigure = '' + substituteInPlace configure.ac --replace 'AC_PREREQ([2.63])' 'AC_PREREQ(2.64)' ./build-aux/autogen.sh ''; From 7128fc621d900ee0bd24137a6cf6f948c283e785 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Thu, 8 Jul 2021 09:12:13 -0600 Subject: [PATCH 4/6] grub: latest gnulib requires autoconf 2.64 --- pkgs/tools/misc/grub/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/misc/grub/default.nix b/pkgs/tools/misc/grub/default.nix index 6d747bf8c6e7..2371bdb0e055 100644 --- a/pkgs/tools/misc/grub/default.nix +++ b/pkgs/tools/misc/grub/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation { ++ map fetchurl (import ./grub1.patches.nix) ; + preConfigure = '' + substituteInPlace ./configure.ac --replace 'AC_PREREQ(2.61)' 'AC_PREREQ(2.64)' + ''; + # autoreconfHook required for the splashimage patch. nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ texinfo ]; From 66ef9b55f0bb04c2e1e9811005519cb241a86125 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Sat, 10 Jul 2021 20:11:03 -0600 Subject: [PATCH 5/6] grub2: needs older version of gnulib --- pkgs/top-level/all-packages.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 280283e07619..bc9dc339ac8a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5546,7 +5546,17 @@ in grub2 = grub2_full; - grub2_full = callPackage ../tools/misc/grub/2.0x.nix { }; + grub2_full = callPackage ../tools/misc/grub/2.0x.nix { + # update breaks grub2 + gnulib = pkgs.gnulib.overrideAttrs (oldAttrs: rec { + version = "20200223"; + src = fetchgit { + url = "https://git.savannah.gnu.org/r/gnulib.git"; + rev = "292fd5d6ff5ecce81ec3c648f353732a9ece83c0"; + sha256 = "0hkg3nql8nsll0vrqk4ifda0v4kpi67xz42r8daqsql6c4rciqnw"; + }; + }); + }; grub2_efi = grub2.override { efiSupport = true; From 030b3e5a129d822a8f1eb4c4c0f7edc597f53374 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Tue, 13 Jul 2021 07:12:15 -0600 Subject: [PATCH 6/6] gnulib: update to latest version from savanah --- pkgs/development/tools/gnulib/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/gnulib/default.nix b/pkgs/development/tools/gnulib/default.nix index 7441d4018a85..708cdb511a84 100644 --- a/pkgs/development/tools/gnulib/default.nix +++ b/pkgs/development/tools/gnulib/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation { pname = "gnulib"; - version = "20200223"; + version = "20210702"; src = fetchgit { url = "https://git.savannah.gnu.org/r/gnulib.git"; - rev = "292fd5d6ff5ecce81ec3c648f353732a9ece83c0"; - sha256 = "0hkg3nql8nsll0vrqk4ifda0v4kpi67xz42r8daqsql6c4rciqnw"; + rev = "901694b904cd861adc2529b2e05a3fb33f9b534f"; + sha256 = "1f5znlv2wjziglw9vlygdgm4jfbsz34h2dz6w4h90bl4hm0ycb1w"; }; postPatch = ''