From patchwork Thu Feb 6 16:02:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 38327 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 023A727BBEB; Thu, 6 Feb 2025 16:03:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, 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 5243127BBE9 for ; Thu, 6 Feb 2025 16:03:46 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tg4Ld-0000E1-MG; Thu, 06 Feb 2025 11:03:25 -0500 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 1tg4LJ-00008x-69 for guix-patches@gnu.org; Thu, 06 Feb 2025 11:03:06 -0500 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 1tg4LG-0000kG-Md for guix-patches@gnu.org; Thu, 06 Feb 2025 11:03:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=OMqXDTk7Rf/4stNRo/FSoYSS2RjBesTiE0OBk6OHW6A=; b=m963nq2UMwsDIXdxKks8xZyt0mlhITnFFh5DdQ2tImjShQAJef0/MyatDRuYllJ76Wvn/z1joQOL8ElzRxRg5HBe9JGrBn+3Cei0JOjr2t7AZ6X3CSnZ33uCmk7cIjYIEVUtaNjEtnFHF2ONofS47Dpj7SLe+swhwBtdY8rvPT4y7SrEUy4dCeLPXMcDRsXZczGUOLtE3zDhoX7SqZf4IxRUR8AxQXVe1fgDCIZFU1CzdEOouuEyG25GKPyDKwYlr3Q2oHclgiWU2Fe0IMGoxZ2fNrUNpsG7gOZSThx94a7Bj3EtxalLKBz6RWYiAoJh6xt0jxnvj8okJaC8TJzQ0A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tg4LG-0005jV-HH for guix-patches@gnu.org; Thu, 06 Feb 2025 11:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76101] [PATCH 2/2] gnu: opensmtpd: Use G-expressions. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Feb 2025 16:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76101 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76101@debbugs.gnu.org Received: via spool by 76101-submit@debbugs.gnu.org id=B76101.173885777022003 (code B ref 76101); Thu, 06 Feb 2025 16:03:02 +0000 Received: (at 76101) by debbugs.gnu.org; 6 Feb 2025 16:02:50 +0000 Received: from localhost ([127.0.0.1]:59143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tg4L4-0005ij-0g for submit@debbugs.gnu.org; Thu, 06 Feb 2025 11:02:50 -0500 Received: from mail.z572.online ([88.99.160.180]:54614) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tg4Kz-0005iF-3u for 76101@debbugs.gnu.org; Thu, 06 Feb 2025 11:02:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=z572.online; s=me; t=1738858072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OMqXDTk7Rf/4stNRo/FSoYSS2RjBesTiE0OBk6OHW6A=; b=YgY7iwdIFrsVlkSAMauR1+oiU/5nsk+IpEmkhjvuQzqmZC1SaUVPxI8B5tULL0QPeWOwpC 8ylK1Go/SCYjIFEZY2LXqRCkQzw+hcBBJA21Rq2Okh8jKUsRl6f8RyQbN7b08pmsCBZOb2 JpM9msxP6t6/1dczX1Zda5+Knt1Tq90= Received: from m.tailaa68d.ts.net (mail1.85362086.com [107.174.64.25]) by mail.z572.online (OpenSMTPD) with ESMTPSA id b71cad61 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <76101@debbugs.gnu.org>; Thu, 6 Feb 2025 16:07:51 +0000 (UTC) From: Zheng Junjie Date: Fri, 7 Feb 2025 00:02:30 +0800 Message-ID: <639f48e12a45baa2d353cb278983384cbe633cbd.1738853511.git.z572@z572.online> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 * gnu/packages/mail.scm (opensmtpd)[arguments]<#:phases>: Use G-expressions. Change-Id: I97dce2865e2b67f0f7cd4f10b0b6cc10a459ceb7 --- gnu/packages/mail.scm | 75 +++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 61b1ec60198..b5a8cbb61b5 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -3336,44 +3336,43 @@ (define-public opensmtpd (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* (#:key inputs #:allow-other-keys) - (substitute* "mk/pathnames" - ;; avoids warning smtpd: couldn't enqueue offline message - ;; smtpctl exited abnormally - (("(-DPATH_SMTPCTL=).*\\\\" all def) - (string-append def "\\\"/run/privileged/bin/smtpctl\\\" \\")) - (("(-DPATH_MAKEMAP=).*\\\\" all def) - (string-append def "\\\"/run/privileged/bin/makemap\\\" \\"))) - (substitute* "usr.sbin/smtpd/smtpctl.c" - ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't. - (("/bin/cat" file) (search-input-file inputs file))) - (substitute* "usr.sbin/smtpd/mda_unpriv.c" - (("/bin/sh" file) (search-input-file inputs file))))) - ;; Avoid install smtpd.conf to /etc. - (add-after 'unpack 'fix-smtpd.conf-install-path - (lambda _ - (let ((etc (string-append (assoc-ref %outputs "out") - "/etc"))) - (mkdir-p etc) - (substitute* "mk/smtpd/Makefile.am" - (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)/smtpd\\.conf") - (string-append etc "/smtpd.conf")))))) - ;; 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 - ;; makemap, smtpctl operates in compatibility mode if called with the - ;; historical name. - (add-after 'install 'install-compability-links - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (sbin (string-append out "/sbin/"))) - (for-each (lambda (command) - (symlink "smtpctl" (string-append sbin command))) - (list "mailq" "makemap" "newaliases" - "send-mail" "sendmail")))))))) + #~(modify-phases %standard-phases + ;; Fix some incorrectly hard-coded external tool file names. + (add-after 'unpack 'patch-FHS-file-names + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "mk/pathnames" + ;; avoids warning smtpd: couldn't enqueue offline message + ;; smtpctl exited abnormally + (("(-DPATH_SMTPCTL=).*\\\\" all def) + (string-append def "\\\"/run/privileged/bin/smtpctl\\\" \\")) + (("(-DPATH_MAKEMAP=).*\\\\" all def) + (string-append def "\\\"/run/privileged/bin/makemap\\\" \\"))) + (substitute* "usr.sbin/smtpd/smtpctl.c" + ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't. + (("/bin/cat" file) (search-input-file inputs file))) + (substitute* "usr.sbin/smtpd/mda_unpriv.c" + (("/bin/sh" file) (search-input-file inputs file))))) + ;; Avoid install smtpd.conf to /etc. + (add-after 'unpack 'fix-smtpd.conf-install-path + (lambda _ + (let ((etc (string-append #$output "/etc"))) + (mkdir-p etc) + (substitute* "mk/smtpd/Makefile.am" + (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)/smtpd\\.conf") + (string-append etc "/smtpd.conf")))))) + ;; 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 + ;; makemap, smtpctl operates in compatibility mode if called with the + ;; historical name. + (add-after 'install 'install-compability-links + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (sbin (string-append out "/sbin/"))) + (for-each (lambda (command) + (symlink "smtpctl" (string-append sbin command))) + (list "mailq" "makemap" "newaliases" + "send-mail" "sendmail")))))))) (synopsis "Lightweight SMTP daemon") (description "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail