From 697ece4455a59b7dc686e04edcd4e000697e4f18 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 30 Apr 2023 22:16:43 +0000 Subject: [PATCH 1/3] musl: 1.2.3 -> 1.2.5 This release fixes the implementation of strverscmp(), so the libtasn1 patch that negates the test can now be removed. --- .../libraries/abseil-cpp/202103.nix | 2 ++ .../libraries/abseil-cpp/202301.nix | 2 ++ .../libraries/libtasn1/default.nix | 9 --------- pkgs/os-specific/linux/musl/default.nix | 19 +++++++------------ 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/pkgs/development/libraries/abseil-cpp/202103.nix b/pkgs/development/libraries/abseil-cpp/202103.nix index 04af3153719a3..3eca133dafe1d 100644 --- a/pkgs/development/libraries/abseil-cpp/202103.nix +++ b/pkgs/development/libraries/abseil-cpp/202103.nix @@ -59,5 +59,7 @@ stdenv.mkDerivation rec { license = licenses.asl20; platforms = platforms.all; maintainers = [ maintainers.andersk ]; + # Requires LFS64 APIs. 202401 and later are fine. + broken = stdenv.hostPlatform.isMusl; }; } diff --git a/pkgs/development/libraries/abseil-cpp/202301.nix b/pkgs/development/libraries/abseil-cpp/202301.nix index 62d98d77a38f3..ab9d477c38500 100644 --- a/pkgs/development/libraries/abseil-cpp/202301.nix +++ b/pkgs/development/libraries/abseil-cpp/202301.nix @@ -44,5 +44,7 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.asl20; platforms = platforms.all; maintainers = [ maintainers.andersk ]; + # Requires LFS64 APIs. 202401 and later are fine. + broken = stdenv.hostPlatform.isMusl; }; }) diff --git a/pkgs/development/libraries/libtasn1/default.nix b/pkgs/development/libraries/libtasn1/default.nix index 3c630bac630de..ef0b52ac8f50a 100644 --- a/pkgs/development/libraries/libtasn1/default.nix +++ b/pkgs/development/libraries/libtasn1/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchurl -, fetchpatch , perl , texinfo @@ -20,14 +19,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-FhPwrBz0hNbsDOO4wG1WJjzHJC8cI7MNgtI940WmP3o="; }; - # Patch borrowed from alpine to work around a specific test failure with musl libc - # Upstream is patching this test in their own CI because that CI is using alpine and thus musl - # https://github.com/gnutls/libtasn1/commit/06e7433c4e587e2ba6df521264138585a63d07c7#diff-037ea159eb0a7cb0ac23b851e66bee30fb838ee8d0d99fa331a1ba65283d37f7R293 - patches = lib.optional stdenv.hostPlatform.isMusl (fetchpatch { - url = "https://git.alpinelinux.org/aports/plain/main/libtasn1/failed-test.patch?id=aaed9995acc1511d54d5d93e1ea3776caf4aa488"; - sha256 = "sha256-GTfwqEelEsGtLEcBwGRfBZZz1vKXRfWXtMx/409YqX8="; - }); - outputs = [ "out" "dev" "devdoc" ]; outputBin = "dev"; diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index eb24879366472..4bb6382d6a691 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -44,11 +44,11 @@ let in stdenv.mkDerivation rec { pname = "musl"; - version = "1.2.3"; + version = "1.2.5"; src = fetchurl { url = "https://musl.libc.org/releases/${pname}-${version}.tar.gz"; - sha256 = "sha256-fVsLYGJSHkYn4JnkydyCSNMqMChelZt+7Kp4DPjP1KQ="; + sha256 = "qaEYu+hNh2TaDqDSizqz+uhHf8fkCF2QECuFlvx8deQ="; }; enableParallelBuilding = true; @@ -71,12 +71,6 @@ stdenv.mkDerivation rec { url = "https://raw.githubusercontent.com/openwrt/openwrt/87606e25afac6776d1bbc67ed284434ec5a832b4/toolchain/musl/patches/300-relative.patch"; sha256 = "0hfadrycb60sm6hb6by4ycgaqc9sgrhh42k39v8xpmcvdzxrsq2n"; }) - - # fix parsing lines with optional fields in fstab etc. NOTE: Remove for the next release since it has been merged upstream - (fetchurl { - url = "https://git.musl-libc.org/cgit/musl/patch/?id=751bee0ee727e8d8b003c87cff77ac76f1dbecd6"; - sha256 = "sha256-qCw132TCSaZrkISmtDb8Q8ufyt8sAJdwACkvfwuoi/0="; - }) ]; CFLAGS = [ "-fstack-protector-strong" ] ++ lib.optional stdenv.hostPlatform.isPower "-mlong-double-64"; @@ -151,10 +145,11 @@ stdenv.mkDerivation rec { license = licenses.mit; platforms = [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" - "armv7l-linux" "i686-linux" "x86_64-linux" "m68k-linux" - "microblaze-linux" "microblazeel-linux" "mips-linux" "mips64-linux" - "mipsel-linux" "mips64el-linux" "powerpc64-linux" "powerpc64le-linux" - "riscv64-linux" "s390x-linux" + "armv7l-linux" "i686-linux" "loongarch64-linux" "m68k-linux" + "microblaze-linux" "microblazeel-linux" "mips-linux" + "mips64-linux" "mips64el-linux" "mipsel-linux" "powerpc64-linux" + "powerpc64le-linux" "riscv32-linux" "riscv64-linux" + "s390x-linux" "x86_64-linux" ]; maintainers = with maintainers; [ thoughtpolice dtzWill ]; }; From dffd22695990a6887733b1c8ecdb9cf8b681d480 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 9 Feb 2024 10:48:37 +0100 Subject: [PATCH 2/3] Revert "pkgsStatic.gsasl: fix build" This reverts commit 248efc2b1792b8db75138bf36ff779778674e6ed. The musl bug has now been fixed. --- pkgs/development/libraries/gsasl/default.nix | 6 ------ pkgs/development/libraries/gsasl/gsasl.patch | 21 -------------------- 2 files changed, 27 deletions(-) delete mode 100644 pkgs/development/libraries/gsasl/gsasl.patch diff --git a/pkgs/development/libraries/gsasl/default.nix b/pkgs/development/libraries/gsasl/default.nix index b9b57de4274ab..8b90892730321 100644 --- a/pkgs/development/libraries/gsasl/default.nix +++ b/pkgs/development/libraries/gsasl/default.nix @@ -11,12 +11,6 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-1FtWLhO9E7n8ILNy9LUyaXQM9iefg28JzhG50yvO4HU="; }; - # This is actually bug in musl. It is already fixed in trunc and - # this patch won't be necessary with musl > 1.2.3. - # - # https://git.musl-libc.org/cgit/musl/commit/?id=b50eb8c36c20f967bd0ed70c0b0db38a450886ba - patches = lib.optional stdenv.hostPlatform.isMusl ./gsasl.patch; - buildInputs = [ libidn libkrb5 ]; configureFlags = [ "--with-gssapi-impl=mit" ]; diff --git a/pkgs/development/libraries/gsasl/gsasl.patch b/pkgs/development/libraries/gsasl/gsasl.patch deleted file mode 100644 index 572d3034967ef..0000000000000 --- a/pkgs/development/libraries/gsasl/gsasl.patch +++ /dev/null @@ -1,21 +0,0 @@ -GNU libc and Musl libc have different ideas what - - strverscmp("UNKNOWN", "2.2.0") - -should return. Hopefully nobody depend on this particular behaviour in -practice. - ---- a/tests/version.c 1970-01-01 00:00:00.000000000 -0000 -+++ b/tests/version.c 1970-01-01 00:00:00.000000000 -0000 -@@ -111,11 +111,5 @@ - exit_code = EXIT_FAILURE; - } - -- if (gsasl_check_version ("UNKNOWN")) -- { -- printf ("FAIL: gsasl_check_version (UNKNOWN)\n"); -- exit_code = EXIT_FAILURE; -- } -- - return exit_code; - } From efcd97fd88a1846530be897127fe70bf4513a71d Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 28 Apr 2024 12:26:08 +0200 Subject: [PATCH 3/3] Revert "pkgsMusl.ostree: fix build" This reverts commit 966f79bea66d16694316885ba5407a22e1c7bead. We've now updated musl to a version that has statx available. --- pkgs/tools/misc/ostree/default.nix | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix index 7b9d9ac51e129..a3fda662614e1 100644 --- a/pkgs/tools/misc/ostree/default.nix +++ b/pkgs/tools/misc/ostree/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , fetchurl -, fetchpatch , pkg-config , gtk-doc , gobject-introspection @@ -51,19 +50,6 @@ in stdenv.mkDerivation rec { sha256 = "sha256-Y8kZCCEzOsc3Pg2SPkwnZrJevc/fTvtEy1koxlidn8s="; }; - patches = lib.optionals stdenv.hostPlatform.isMusl [ - # > I guess my inclination here is to recommend that musl users - # > carry a downstream patch to revert the commits in #3175 until - # > such time as they can update to the new musl. - # https://github.com/ostreedev/ostree/issues/3200#issuecomment-1974819192 - (fetchpatch { - name = "revert-statx.diff"; - url = "https://github.com/ostreedev/ostree/commit/f46cc0cd85b564e40e03c7438a41c8e57f6b836c.diff"; - excludes = [ "ci/*" ]; - revert = true; - hash = "sha256-LsXbRYh4hfjNdt1S384IPlSvtC5f2rgSTZEkIIBkT0g="; - }) - ]; nativeBuildInputs = [ autoconf