From patchwork Wed Apr 30 14:35:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: aragaer X-Patchwork-Id: 42203 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E63BB27BC4B; Thu, 1 May 2025 10:24:55 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3536C27BC49 for ; Thu, 1 May 2025 10:24:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAQ9u-0005jm-J6; Thu, 01 May 2025 05:24:46 -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 1uANI8-0004q4-1o for guix-patches@gnu.org; Thu, 01 May 2025 02:21:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uANI7-0006ok-24 for guix-patches@gnu.org; Thu, 01 May 2025 02:21:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=vXOFR6JgPUrDX3Gbvz2R6tZimCfOCfhAyD6U4JvtbFg=; b=eBgCKzVLtJu6+4YLWBJi3gpO6CRTSHgs4/pAi0zSZq6K+C9eFSZHA7tj4KtowbRvtisErmWFF17/tOO3NupmpNoMR8agLdbxthG7U7rnLUmAQb+310M+mmeqGwy38mfCa5D+/LlmxeZNVdrLibUdAIYOJW0DsKHqOOeYlhO9I8vtq3XyC6gK+6Ardsh2n4IdI8pWcT53lmB1okHm07bSfAK9DdOYDjQeZurlF64lCz+ZYpDhlPmbPxEOSIWkGDN/L1JFWwf3B3bN4bv/Ev/tUrklDhD8gznlYhgypkfAf1kT81jqA03/E3IVbhfpIa6xs+adyWlQDfG90BrF1Ge8HQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uANI6-0004Qx-QX for guix-patches@gnu.org; Thu, 01 May 2025 02:21:02 -0400 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 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-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 X-Mailman-Approved-At: Thu, 01 May 2025 05:24:39 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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