GNU logs - #78176, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#78176] [PATCH] gnu: cyrus-sasl: Fix time.h check
Resent-From: aragaer <aragaer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Thu, 01 May 2025 06:21:02 +0000
Resent-Message-ID: <handler.78176.B.174608046117013 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 78176
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 78176 <at> debbugs.gnu.org
Cc: aragaer <aragaer@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174608046117013
          (code B ref -1); Thu, 01 May 2025 06:21:02 +0000
Received: (at submit) by debbugs.gnu.org; 1 May 2025 06:21:01 +0000
Received: from localhost ([127.0.0.1]:47766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uANI3-0004QI-9w
	for submit <at> debbugs.gnu.org; Thu, 01 May 2025 02:21:00 -0400
Received: from lists.gnu.org ([2001:470:142::17]:40250)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <aragaer@HIDDEN>) id 1uA8YO-0007eK-E5
 for submit <at> debbugs.gnu.org; Wed, 30 Apr 2025 10:36:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <aragaer@HIDDEN>) id 1uA8XT-0001dL-HG
 for guix-patches@HIDDEN; Wed, 30 Apr 2025 10:35:57 -0400
Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <aragaer@HIDDEN>) id 1uA8XQ-0008Qv-Sa
 for guix-patches@HIDDEN; Wed, 30 Apr 2025 10:35:55 -0400
Received: by mail-lf1-x12d.google.com with SMTP id
 2adb3069b0e04-549963b5551so7645759e87.2
 for <guix-patches@HIDDEN>; Wed, 30 Apr 2025 07:35:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1746023749; x=1746628549; darn=gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=vXOFR6JgPUrDX3Gbvz2R6tZimCfOCfhAyD6U4JvtbFg=;
 b=gA67/n9ZEzD+2cgwDdXDXEQ7qTEcPWhFU6jw7ISn7VkOHX1IpXoj13YdV5Sfn/Wvtc
 0ohie8WykZXuycMj+NCqkgtJrhx+4ykKpsH3U29Oxi/+GzJ2OVW9EwhGxmtxbP2cmuEq
 kIbYWb/VGwF5ZaBa9Lmn9afr4f5tTt3JHLMvQBu54aoZCcECv7ChNk6n0e2bHoFy0EBk
 tgpOxxS+XpcI2cbuXd0sCZu/a2COHN9CAQPS3CWjR5ZIYbk8zcb5m33pHEVheeWkVlRL
 rB9Lz3V9iewqBwa30tHrwAWJrLj2X673pWFkY98gDrOg4fPEmBQv7p7h90hrgQW8GpjY
 1y+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1746023749; x=1746628549;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=vXOFR6JgPUrDX3Gbvz2R6tZimCfOCfhAyD6U4JvtbFg=;
 b=FBaQDdKLvzKjhya/SLDdeNUvoV9E6++KAPCItPFJMgiX3rsMOEUJ3bZRN0QiRDaqQz
 LtgNBp6AgwjM7+G+UYkB5wNuO6RVerQQLEzKbUyCSdkg8+HETnfMSUi9lmMaFES1g3ur
 iz7GvPUHbAVJAkqzDiNxLdJretyYA0XVlaPzHLEMzTZ+0NIm7SPK2b3m11SSRZBvQP3/
 yqy11sSS7pEP4Jy9aG2+J5DF7ST1ae5TzCiBVUllngPQw6v5tnzSy1alBR1L3/yvzG2a
 Den5n87Bvpv01FavOAZ9b+vrUDuV3+RU5h7nPj+T8KCNjWLjRQe8iCBTTw96fE12vBS4
 lCtA==
X-Gm-Message-State: AOJu0Yz2XXn+6/bzOkgES4/FIHcSIEL8GZLtRAgkOPgf4WtKbmISCqB7
 8ObsGCYfd/ay5LInyQu1ip7vhF5qu/pV+E78WnktynJVrClwOcfc9crBPbi9
X-Gm-Gg: ASbGncufsYEh8vthUiO/Ov5n6C7S2VefELVveCh3vtZGhM22Z4XsDZKEl7SM/jP5aev
 Q4PJ2e4WUr2qwwOnC38JcFptz1aIznP8BQ9zUcGPHcHnUjls7sy8itt8xfJ5JGwypRj7I3KoYv5
 4kAr4A/GE6o19mB2XZsjZeJIPUBEI5TFCz/lUvyP3GMKfADFSb6UYG52h2EXX15A/pud3jXI3+8
 CseXgYIKt2NKT7S3Dxu7dgyXR3ZNARWee6czlU7DtSW/jNpJ9F9y1zubCDks6hZQzpe431v4w4E
 /Ggoec3Zo+0+pRXkGV0rdA3sOkf1SoLENIs2O24dwQ69MJMjlueaKieVAaEmrtXdPg==
X-Google-Smtp-Source: AGHT+IE9qHY7VmkiYCgLYdt7AEUA+CXUnG3tAIHwbbtXd0uQgy7GhVOsLqzC2XZdAnLqxG8x8NWGOg==
X-Received: by 2002:a05:6512:1252:b0:54d:68bd:2846 with SMTP id
 2adb3069b0e04-54ea336b7afmr926746e87.29.1746023747926; 
 Wed, 30 Apr 2025 07:35:47 -0700 (PDT)
Received: from localhost (78-107-235-32.static.corbina.ru. [78.107.235.32])
 by smtp.gmail.com with ESMTPSA id
 2adb3069b0e04-54e7cb3b60esm2151880e87.86.2025.04.30.07.35.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 30 Apr 2025 07:35:47 -0700 (PDT)
From: aragaer <aragaer@HIDDEN>
Date: Wed, 30 Apr 2025 17:35:43 +0300
Message-ID: <20250430143544.7264-1-aragaer@HIDDEN>
X-Mailer: git-send-email 2.49.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::12d;
 envelope-from=aragaer@HIDDEN; helo=mail-lf1-x12d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Mailman-Approved-At: Thu, 01 May 2025 02:20:58 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

The code conditionally includes <time.h> in some places but configure script
never checks for time.h, so it is never included. This works most of the time
but fails when doing cross compilation.

The patch was submitted to cyrus-sasl repository shortly after the 2.1.28
release (https://github.com/cyrusimap/cyrus-sasl/commit/266f0acf7f5e029afbb3e263437039e50cd6c262).

The package itself is a dependency for over 2000 other packages, but the
change only affects the build process. It should not break anything, only fix
an existing build failure.

Change-Id: I46e3801d50758f79df0447dd3bd483b427277e12
---
 gnu/local.mk                                  |  1 +
 gnu/packages/cyrus-sasl.scm                   | 47 +++++++++------
 .../patches/cyrus-sasl-fix-time-h.patch       | 57 +++++++++++++++++++
 3 files changed, 88 insertions(+), 17 deletions(-)
 create mode 100644 gnu/packages/patches/cyrus-sasl-fix-time-h.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3efe47fe17..b59315368b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1163,6 +1163,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/curlftpfs-fix-no_verify_hostname.patch	\
   %D%/packages/patches/cursynth-wave-rand.patch			\
   %D%/packages/patches/cvs-CVE-2017-12836.patch		\
+  %D%/packages/patches/cyrus-sasl-fix-time-h.patch		\
   %D%/packages/patches/d-feet-drop-unused-meson-argument.patch	\
   %D%/packages/patches/dante-non-darwin.patch			\
   %D%/packages/patches/date-ignore-zonenow.patch	\
diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index ef408f2dd7..e7a011c9e7 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -28,6 +28,8 @@ (define-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages tls)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build utils)
+  #:use-module (guix build mix-build-system)
   #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -37,27 +39,38 @@ (define-public cyrus-sasl
   (package
     (name "cyrus-sasl")
     (version "2.1.28")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/cyrusimap/cyrus-sasl"
-                                  "/releases/download/cyrus-sasl-" version
-                                  "/cyrus-sasl-" version ".tar.gz"))
-              (sha256
-               (base32
-                "135kbgyfpa1mwqp5dm223yr6ddzi4vjm7cr414d7rmhys2mwdkvw"))))
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/cyrusimap/cyrus-sasl"
+                           "/releases/download/cyrus-sasl-"
+                           version
+                           "/cyrus-sasl-"
+                           version
+                           ".tar.gz"))
+       (sha256
+        (base32 "135kbgyfpa1mwqp5dm223yr6ddzi4vjm7cr414d7rmhys2mwdkvw"))
+       (patches (search-patches "cyrus-sasl-fix-time-h.patch"))))
     (build-system gnu-build-system)
     (inputs (list gdbm libxcrypt mit-krb5 openssl))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)))
     (arguments
      (list
-      #:configure-flags #~(list (string-append "--with-plugindir="
-                                               (assoc-ref %outputs "out")
-                                               "/lib/sasl2")
-                                ;; When cross-compiling the build system is
-                                ;; unable to determine whether SPNEGO is
-                                ;; supported; Kerberos does, so enable it.
-                                #$@(if (%current-target-system)
-                                       '("ac_cv_gssapi_supports_spnego=yes")
-                                       '()))
+      #:phases '(modify-phases %standard-phases
+                  (add-before 'configure 'autoreconf
+                    (lambda* (#:key system #:allow-other-keys)
+                      (invoke "autoreconf" "-vfi"))))
+      #:configure-flags
+      #~(list (string-append "--with-plugindir="
+                             (assoc-ref %outputs "out") "/lib/sasl2")
+              ;; When cross-compiling the build system is
+              ;; unable to determine whether SPNEGO is
+              ;; supported; Kerberos does, so enable it.
+              #$@(if (%current-target-system)
+                     '("ac_cv_gssapi_supports_spnego=yes")
+                     '()))
 
       ;; The 'plugins' directory has shared source files, such as
       ;; 'plugin_common.c'.  When building the shared libraries there, libtool
diff --git a/gnu/packages/patches/cyrus-sasl-fix-time-h.patch b/gnu/packages/patches/cyrus-sasl-fix-time-h.patch
new file mode 100644
index 0000000000..922c4cb322
--- /dev/null
+++ b/gnu/packages/patches/cyrus-sasl-fix-time-h.patch
@@ -0,0 +1,57 @@
+From 266f0acf7f5e029afbb3e263437039e50cd6c262 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@HIDDEN>
+Date: Wed, 23 Feb 2022 00:45:15 +0000
+Subject: [PATCH] Fix <time.h> check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We're conditionally including based on HAVE_TIME_H in a bunch of places,
+but we're not actually checking for time.h, so that's never going to be defined.
+
+While at it, add in a missing include in the cram plugin.
+
+This fixes a bunch of implicit declaration warnings:
+```
+ * cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
+ * cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration]
+ * cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
+ * cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
+ * cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration]
+ * cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration]
+```
+
+Signed-off-by: Sam James <sam@HIDDEN>
+---
+ configure.ac   | 2 +-
+ plugins/cram.c | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e1bf53b6..ad781830 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1290,7 +1290,7 @@ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ 
+ AC_HEADER_DIRENT
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h)
++AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h time.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h)
+ 
+ IPv6_CHECK_SS_FAMILY()
+ IPv6_CHECK_SA_LEN()
+diff --git a/plugins/cram.c b/plugins/cram.c
+index d02e9baa..695aaa91 100644
+--- a/plugins/cram.c
++++ b/plugins/cram.c
+@@ -53,6 +53,10 @@
+ #endif
+ #include <fcntl.h>
+ 
++#ifdef HAVE_TIME_H
++#include <time.h>
++#endif
++
+ #include <sasl.h>
+ #include <saslplug.h>
+ #include <saslutil.h>
-- 
2.49.0





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: aragaer <aragaer@HIDDEN>
Subject: bug#78176: Acknowledgement ([PATCH] gnu: cyrus-sasl: Fix time.h
 check)
Message-ID: <handler.78176.B.174608046117013.ack <at> debbugs.gnu.org>
References: <20250430143544.7264-1-aragaer@HIDDEN>
X-Gnu-PR-Message: ack 78176
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 78176 <at> debbugs.gnu.org
Date: Thu, 01 May 2025 06:21:03 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 78176 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
78176: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78176
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Thu, 1 May 2025 06:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.