summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorZheng Junjie <z572@z572.online>2025-02-06 22:41:55 +0800
committerZheng Junjie <z572@z572.online>2025-02-15 20:06:43 +0800
commit169ef7616b376c6047dcaa14c7c208504e3b49be (patch)
tree7dc9e185d0e9d39e1029d1871b5fb109c7041c45 /gnu
parent0cd02f5e083abac280f6478cb8fda16a0a02e789 (diff)
gnu: opensmtpd: Set sysconfdir to /etc.
* gnu/packages/mail.scm (opensmtpd)[arguments]<#:configure-flags>: Add --sysconfdir=/etc. <#:phases>: Add fix-smtpd.conf-install-path phase. Reviewed-by: 宋文武 <iyzsong@envs.net> Change-Id: I949b8ec18e36b059cf3f56a109e750af1284b1d2
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/mail.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index bcfdeab326f..3e90b3d0b80 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -57,7 +57,7 @@
57;;; Copyright © 2023 Wilko Meyer <w@wmeyer.eu> 57;;; Copyright © 2023 Wilko Meyer <w@wmeyer.eu>
58;;; Copyright © 2024 Benjamin Slade <slade@lambda-y.net> 58;;; Copyright © 2024 Benjamin Slade <slade@lambda-y.net>
59;;; Copyright © 2024 Jean Simard <woshilapin@tuziwo.info> 59;;; Copyright © 2024 Jean Simard <woshilapin@tuziwo.info>
60;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> 60;;; Copyright © 2024, 2025 Zheng Junjie <873216071@qq.com>
61;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se> 61;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
62;;; Copyright © 2025 Tanguy Le Carrour <tanguy@bioneland.org> 62;;; Copyright © 2025 Tanguy Le Carrour <tanguy@bioneland.org>
63;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com> 63;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
@@ -3322,6 +3322,8 @@ from the Cyrus IMAP project.")
3322 (list 3322 (list
3323 #:configure-flags 3323 #:configure-flags
3324 #~(list "--localstatedir=/var" 3324 #~(list "--localstatedir=/var"
3325 ;; Allow work with /etc/mailname.
3326 "--sysconfdir=/etc"
3325 "--with-libbsd" 3327 "--with-libbsd"
3326 ;; This is the default only if it exists at build time—it doesn't. 3328 ;; This is the default only if it exists at build time—it doesn't.
3327 "--with-path-socket=/var/run" 3329 "--with-path-socket=/var/run"
@@ -3352,6 +3354,15 @@ from the Cyrus IMAP project.")
3352 (("/bin/cat" file) (search-input-file inputs file))) 3354 (("/bin/cat" file) (search-input-file inputs file)))
3353 (substitute* "usr.sbin/smtpd/mda_unpriv.c" 3355 (substitute* "usr.sbin/smtpd/mda_unpriv.c"
3354 (("/bin/sh" file) (search-input-file inputs file))))) 3356 (("/bin/sh" file) (search-input-file inputs file)))))
3357 ;; Avoid install smtpd.conf to /etc.
3358 (add-after 'unpack 'fix-smtpd.conf-install-path
3359 (lambda _
3360 (let ((etc (string-append (assoc-ref %outputs "out")
3361 "/etc")))
3362 (mkdir-p etc)
3363 (substitute* "mk/smtpd/Makefile.am"
3364 (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)/smtpd\\.conf")
3365 (string-append etc "/smtpd.conf"))))))
3355 ;; OpenSMTPD provides a single smtpctl utility to control both the 3366 ;; OpenSMTPD provides a single smtpctl utility to control both the
3356 ;; daemon and the local submission subsystem. To accomodate systems 3367 ;; daemon and the local submission subsystem. To accomodate systems
3357 ;; that require historical interfaces such as sendmail, newaliases or 3368 ;; that require historical interfaces such as sendmail, newaliases or