[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/11: gnu: opensmtpd: Fix cross-compilation.
From: |
guix-commits |
Subject: |
08/11: gnu: opensmtpd: Fix cross-compilation. |
Date: |
Thu, 22 Aug 2024 17:54:51 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 83338f5a72c80eb7bb75d4e3f31266318bb4d4a3
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Aug 18 02:00:00 2024 +0200
gnu: opensmtpd: Fix cross-compilation.
* gnu/packages/mail.scm (opensmtpd)[arguments]: Specify the correct,
non-native ‘zcat’ in #:configure-flags. Fix the 'patch-FHS-file-names
phase to do the same for ‘cat’ & ‘sh’.
[inputs]: Add bash-minimal, coreutils, and gzip.
Change-Id: I0877b982929b4931abf0fc82871d05cab9e888c0
---
gnu/packages/mail.scm | 41 +++++++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index a41f5e2ed5..1f24592834 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -3289,7 +3289,10 @@ from the Cyrus IMAP project.")
(inputs
;; OpenSMTPd bundled (a subset of) libasr and libtls, which we use. See
;; https://www.mail-archive.com/misc@opensmtpd.org/msg05909.html for why.
- (list bdb
+ (list bash-minimal ;sh invoked at run time
+ bdb
+ coreutils ;for cat
+ gzip ;for zcat
libbsd ;https://github.com/OpenSMTPD/OpenSMTPD/issues/1233
libevent
libressl
@@ -3300,30 +3303,36 @@ from the Cyrus IMAP project.")
groff ;for man pages
pkg-config))
(arguments
- `(#:configure-flags
- (list "--localstatedir=/var"
- "--with-libbsd"
- ;; This is the default only if it exists at build time—it doesn't.
- "--with-path-socket=/var/run"
- "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
- "--with-user-smtpd=smtpd"
- "--with-user-queue=smtpq" "--with-group-queue=smtpq"
- "--with-auth-pam"
- "--with-table-db")
- #:phases
- (modify-phases %standard-phases
+ (list
+ #:configure-flags
+ #~(list "--localstatedir=/var"
+ "--with-libbsd"
+ ;; This is the default only if it exists at build time—it
doesn't.
+ "--with-path-socket=/var/run"
+ "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
+ "--with-user-smtpd=smtpd"
+ "--with-user-queue=smtpq" "--with-group-queue=smtpq"
+ "--with-auth-pam"
+ "--with-table-db"
+
+ ;; This is called at run time but defaults to the native zcat in
+ ;; $PATH, breaking cross-compilation.
+ (string-append "ac_cv_path_ZCAT="
+ #$(this-package-input "gzip") "/bin/zcat"))
+ #:phases
+ `(modify-phases %standard-phases
;; Fix some incorrectly hard-coded external tool file names.
(add-after 'unpack 'patch-FHS-file-names
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
;; avoids warning smtpd: couldn't enqueue offline message
;; smtpctl exited abnormally
(substitute* "usr.sbin/smtpd/smtpd.h"
(("/usr/bin/smtpctl") "/run/setuid-programs/smtpctl"))
(substitute* "usr.sbin/smtpd/smtpctl.c"
;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
- (("/bin/cat") (which "cat")))
+ (("/bin/cat" file) (search-input-file inputs file)))
(substitute* "usr.sbin/smtpd/mda_unpriv.c"
- (("/bin/sh") (which "sh")))))
+ (("/bin/sh" file) (search-input-file inputs file)))))
;; OpenSMTPD provides a single smtpctl utility to control both the
;; daemon and the local submission subsystem. To accomodate systems
;; that require historical interfaces such as sendmail, newaliases or
- branch master updated (23536a9871 -> ed4e0b48f1), guix-commits, 2024/08/22
- 02/11: gnu: knot: Update to 3.3.8, guix-commits, 2024/08/22
- 06/11: gnu: nginx: Update to 1.27.1 [fixes CVE-2024-7347]., guix-commits, 2024/08/22
- 05/11: gnu: opensmtpd: Update to 7.5.0p0., guix-commits, 2024/08/22
- 08/11: gnu: opensmtpd: Fix cross-compilation.,
guix-commits <=
- 07/11: gnu: nginx-documentation: Update to 1.27.1-3114-051789a80bcb., guix-commits, 2024/08/22
- 04/11: home: Fix typo in parcimonie configuration., guix-commits, 2024/08/22
- 09/11: services: Migrate opensmtpd to (gnu system privilege)., guix-commits, 2024/08/22
- 03/11: gnu: knot-resolver: Update to 5.7.4., guix-commits, 2024/08/22
- 10/11: services: Refactor opensmtpd-set-gids., guix-commits, 2024/08/22
- 01/11: services: Migrate enlightenment to (gnu system privilege)., guix-commits, 2024/08/22
- 11/11: Replace some more occurrences of ‘setuid-programs’., guix-commits, 2024/08/22