From unknown Fri Sep 05 20:55:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#78176] [PATCH] gnu: cyrus-sasl: Fix time.h check Resent-From: aragaer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 May 2025 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78176 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78176@debbugs.gnu.org Cc: aragaer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@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 ) id 1uANI3-0004QI-9w for submit@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 ) id 1uA8YO-0007eK-E5 for submit@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 ) id 1uA8XT-0001dL-HG for guix-patches@gnu.org; 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 ) id 1uA8XQ-0008Qv-Sa for guix-patches@gnu.org; Wed, 30 Apr 2025 10:35:55 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-549963b5551so7645759e87.2 for ; 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 Date: Wed, 30 Apr 2025 17:35:43 +0300 Message-ID: <20250430143544.7264-1-aragaer@gmail.com> 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@gmail.com; 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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) The code conditionally includes 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 +Date: Wed, 23 Feb 2022 00:45:15 +0000 +Subject: [PATCH] Fix 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 +--- + 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 + ++#ifdef HAVE_TIME_H ++#include ++#endif ++ + #include + #include + #include -- 2.49.0 From unknown Fri Sep 05 20:55:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: aragaer Subject: bug#78176: closed (Re: [PATCH] gnu: cyrus-sasl: Fix time.h check) Message-ID: References: <20250430143544.7264-1-aragaer@gmail.com> X-Gnu-PR-Message: they-closed 78176 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 78176@debbugs.gnu.org Date: Thu, 21 Aug 2025 08:43:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1755765783-27560-1" This is a multi-part message in MIME format... ------------=_1755765783-27560-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #78176: [PATCH] gnu: cyrus-sasl: Fix time.h check which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 78176@debbugs.gnu.org. --=20 78176: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78176 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1755765783-27560-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 78176-done) by debbugs.gnu.org; 21 Aug 2025 08:42:20 +0000 Received: from localhost ([127.0.0.1]:58914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1up0sF-00079N-KI for submit@debbugs.gnu.org; Thu, 21 Aug 2025 04:42:20 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:37686) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1up0s4-00078Q-9N for 78176-done@debbugs.gnu.org; Thu, 21 Aug 2025 04:42:15 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 926272BF; Thu, 21 Aug 2025 10:42:00 +0200 (CEST) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id tggqUXuZpEFh; Thu, 21 Aug 2025 10:42:00 +0200 (CEST) Received: from jurong (167.76.29.93.rev.sfr.net [93.29.76.167]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B794B122; Thu, 21 Aug 2025 10:41:59 +0200 (CEST) Date: Thu, 21 Aug 2025 10:41:58 +0200 From: Andreas Enge To: aragaer Subject: Re: [PATCH] gnu: cyrus-sasl: Fix time.h check Message-ID: References: <20250430143544.7264-1-aragaer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250430143544.7264-1-aragaer@gmail.com> X-Rspamd-Server: hera X-Spamd-Bar: ----- X-Rspamd-Queue-Id: 926272BF X-Spamd-Result: default: False [-5.58 / 15.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM(-2.98)[-0.995]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78176-done Cc: 78176-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks for the patch! We normally avoid whitespace and styling changes, as they obscure the real changes. Since the commit did not apply anymore, I have just taken the patch and retyped the changes. Notice also the new style for inputs; they can be simple lists, no need for adding the names as strings. This is now on our new platform, Codeberg, as https://codeberg.org/guix/guix/pulls/2146 and will be applied to a branch soon; closing it here. Andreas ------------=_1755765783-27560-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ) id 1uANI3-0004QI-9w for submit@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 ) id 1uA8YO-0007eK-E5 for submit@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 ) id 1uA8XT-0001dL-HG for guix-patches@gnu.org; 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 ) id 1uA8XQ-0008Qv-Sa for guix-patches@gnu.org; Wed, 30 Apr 2025 10:35:55 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-549963b5551so7645759e87.2 for ; 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 To: guix-patches@gnu.org Subject: [PATCH] gnu: cyrus-sasl: Fix time.h check Date: Wed, 30 Apr 2025 17:35:43 +0300 Message-ID: <20250430143544.7264-1-aragaer@gmail.com> 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@gmail.com; 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-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 01 May 2025 02:20:58 -0400 Cc: aragaer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) The code conditionally includes 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 +Date: Wed, 23 Feb 2022 00:45:15 +0000 +Subject: [PATCH] Fix 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 +--- + 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 + ++#ifdef HAVE_TIME_H ++#include ++#endif ++ + #include + #include + #include -- 2.49.0 ------------=_1755765783-27560-1--