From 4c16406089abc2229410971793c38e4381693fc8 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 18 Feb 2023 13:30:01 +0100 Subject: [PATCH 1/4] mailutils: 3.14 -> 3.15 Release notes: http://savannah.gnu.org/forum/forum.php?forum_id=10160 --- pkgs/tools/networking/mailutils/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 3d15124b7d26..c930119493dd 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -27,11 +27,11 @@ stdenv.mkDerivation rec { pname = "mailutils"; - version = "3.14"; + version = "3.15"; src = fetchurl { url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-wMWzj+qLRaSvzUNkh/Knb9VSUJLQN4gTputVQsIScTk="; + hash = "sha256-t9DChsNS/MfaeXjP1hfMZnNrIfqJGqT4iFX1FjVPLds="; }; separateDebugInfo = true; @@ -154,6 +154,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ orivej vrthra ]; homepage = "https://www.gnu.org/software/mailutils/"; + changelog = "https://git.savannah.gnu.org/cgit/mailutils.git/tree/NEWS"; # Some of the dependencies fail to build on {cyg,dar}win. platforms = platforms.gnu ++ platforms.unix; From 027f21971490d62f8aecada5412dbe444b0a68ce Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 18 Feb 2023 13:19:45 +0100 Subject: [PATCH 2/4] mailutils: make Python and Guile support optional Disabling both reduces the closure size from 232MB -> 92MB. --- pkgs/tools/networking/mailutils/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index c930119493dd..215f7e5291a4 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -23,6 +23,9 @@ , sasl , system-sendmail , libxcrypt + +, pythonSupport ? true +, guileSupport ? true }: stdenv.mkDerivation rec { @@ -56,16 +59,16 @@ stdenv.mkDerivation rec { gdbm gnutls gss - guile libmysqlclient mailcap ncurses pam - python3 readline sasl libxcrypt - ] ++ lib.optionals stdenv.isLinux [ nettools ]; + ] ++ lib.optionals stdenv.isLinux [ nettools ] + ++ lib.optionals pythonSupport [ python3 ] + ++ lib.optionals guileSupport [ guile ]; patches = [ ./fix-build-mb-len-max.patch @@ -88,7 +91,8 @@ stdenv.mkDerivation rec { "--with-path-sendmail=${system-sendmail}/bin/sendmail" "--with-mail-rc=/etc/mail.rc" "DEFAULT_CUPS_CONFDIR=${mailcap}/etc" # provides mime.types to mimeview - ]; + ] ++ lib.optional (!pythonSupport) "--without-python" + ++ lib.optional (!guileSupport) "--without-guile"; readmsg-tests = let p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files"; From 98bfe47a433abf826c8529fa441d0abeaa4c3040 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 18 Feb 2023 13:33:30 +0100 Subject: [PATCH 3/4] mailutils: enable parallel building again --- pkgs/tools/networking/mailutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 215f7e5291a4..445b1c213ddf 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { }) ]; - enableParallelBuilding = false; + enableParallelBuilding = true; hardeningDisable = [ "format" ]; configureFlags = [ From 699f1d0c762ba89af507617c88c4f01f340760df Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 18 Feb 2023 15:06:12 +0100 Subject: [PATCH 4/4] mailutils: fix and enable testing * Remove readmsg-tests: the missing files are now present and the files that were fetched caused test failures. * Remove references to maidag, it was removed upstream. * Fix test macro and enable tests. --- pkgs/tools/networking/mailutils/default.nix | 27 ++++----------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 445b1c213ddf..2ce2414b50ae 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -94,31 +94,15 @@ stdenv.mkDerivation rec { ] ++ lib.optional (!pythonSupport) "--without-python" ++ lib.optional (!guileSupport) "--without-guile"; - readmsg-tests = let - p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files"; - in [ - (fetchurl { url = "${p}/hdr.at"; sha256 = "0phpkqyhs26chn63wjns6ydx9468ng3ssbjbfhcvza8h78jlsd98"; }) - (fetchurl { url = "${p}/nohdr.at"; sha256 = "1vkbkfkbqj6ml62s1am8i286hxwnpsmbhbnq0i2i0j1i7iwkk4b7"; }) - (fetchurl { url = "${p}/twomsg.at"; sha256 = "15m29rg2xxa17xhx6jp4s2vwa9d4khw8092vpygqbwlhw68alk9g"; }) - (fetchurl { url = "${p}/weed.at"; sha256 = "1101xakhc99f5gb9cs3mmydn43ayli7b270pzbvh7f9rbvh0d0nh"; }) - ]; - nativeCheckInputs = [ dejagnu ]; - doCheck = false; # fails 1 out of a bunch of tests, looks like a bug + doCheck = true; doInstallCheck = false; # fails preCheck = '' - # Add missing test files - cp ${builtins.toString readmsg-tests} readmsg/tests/ - for f in hdr.at nohdr.at twomsg.at weed.at; do - mv readmsg/tests/*-$f readmsg/tests/$f - done # Disable comsat tests that fail without tty in the sandbox. tty -s || echo > comsat/tests/testsuite.at - # Disable lmtp tests that require root spool. - echo > maidag/tests/lmtp.at - # Disable mda tests that require /etc/passwd to contain root. - grep -qo '^root:' /etc/passwd || echo > maidag/tests/mda.at + # Remove broken macro + sed -i '/AT_TESTED/d' libmu_scm/tests/testsuite.at # Provide libraries for mhn. export LD_LIBRARY_PATH=$(pwd)/lib/.libs ''; @@ -145,9 +129,8 @@ stdenv.mkDerivation rec { Scheme. The utilities provided by Mailutils include imap4d and pop3d mail - servers, mail reporting utility comsatd, general-purpose mail delivery - agent maidag, mail filtering program sieve, and an implementation of MH - message handling system. + servers, mail reporting utility comsatd, mail filtering program sieve, + and an implementation of MH message handling system. ''; license = with licenses; [