From patchwork Sun Mar 28 11:57:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rovanion Luckey X-Patchwork-Id: 28155 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 71C8B27BC64; Sun, 28 Mar 2021 12:58:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7BE5E27BC63 for ; Sun, 28 Mar 2021 12:58:21 +0100 (BST) Received: from localhost ([::1]:48490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQU3g-000870-KO for patchwork@mira.cbaines.net; Sun, 28 Mar 2021 07:58:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQU3O-00086f-5A for guix-patches@gnu.org; Sun, 28 Mar 2021 07:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQU3N-000223-UJ for guix-patches@gnu.org; Sun, 28 Mar 2021 07:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQU3N-0000IP-TN for guix-patches@gnu.org; Sun, 28 Mar 2021 07:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47435] gnu: mail: Make the sendmail package actually output its binary Resent-From: Rovanion Luckey Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Mar 2021 11:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47435 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Leo Famulari Cc: 47435@debbugs.gnu.org Received: via spool by 47435-submit@debbugs.gnu.org id=B47435.16169326631111 (code B ref 47435); Sun, 28 Mar 2021 11:58:01 +0000 Received: (at 47435) by debbugs.gnu.org; 28 Mar 2021 11:57:43 +0000 Received: from localhost ([127.0.0.1]:45484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQU34-0000Hr-Ra for submit@debbugs.gnu.org; Sun, 28 Mar 2021 07:57:43 -0400 Received: from mail-il1-f169.google.com ([209.85.166.169]:44974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQU32-0000He-8D for 47435@debbugs.gnu.org; Sun, 28 Mar 2021 07:57:41 -0400 Received: by mail-il1-f169.google.com with SMTP id t6so8901361ilp.11 for <47435@debbugs.gnu.org>; Sun, 28 Mar 2021 04:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EZ+peIDAY1vQbXxIv06C4D+7rAxve9QeHeaC3uwnIw0=; b=l2Xh+IP0+gI68f/PsTkmRyJnKvUOKhuSZvmThNOuKx3/D0DVN7iYcppkK889QMwczs EsyNGC7YX5UiV2mUXzvfz6mm5ilIK+EeGvzfy/bxzM1eXLFWJPgs5bi64Ng4I22efQpl Iajzvf1EP+MEVHchzfvmJQ18KW5Cd2EbvhRTVItmXUAz9fQCPZ6uu57Q2qWjFkvWSCn7 lTmsQvI8Tm7gGb+XfR4Vhriv2vQcpptq57lrIDeI5f/C8EiMtKwFH64z1V/MtZ4A+9Wm 54jr8mwRBdlsDV3+R1xoYOOfk/Buc5ODNtp4cvQf3TIV5waBBSN++ikInkJ0ZB80eGc6 UW3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EZ+peIDAY1vQbXxIv06C4D+7rAxve9QeHeaC3uwnIw0=; b=BArnO6isR70kYcQUK4KG3xrXTFq8NhjAKdF3HF2AYb30qhLVFV5D2Lx2bXU7NPVi+L 0OLZqPF7Od9OZty2IhWu0Qv2reIwRoWZXbdbaZ6jAHPDgfQooPyhKzqFIoOflokFyroy iCj20rlNISwWGkk9E6PSLsy7qKlNoi1zgIsVJSnfRA9bY45IIkfsvzapiWA1EZtJEe+j k2eqSd6IkgHQFCcmD4+iaGBMmyCxG8Iz4d5xgcaBm/qPWXdrqDh3etyVME/nwZrojtgx 8KECVasYGNUsjv+V2ezYb1fUiuzlXT5Owg7+ZjH0pa1yGjzNw14mywbWbPO3634t8Utb VE8Q== X-Gm-Message-State: AOAM5307TQoKbQtjN71Dpib8Bntvrv7yPILnoraYgSGrCVSjV0aCsUVG JgnqrUiFvZbkSzvEc63QKDR8aPYxx2ZzVbGCA+si0eGtqpo= X-Google-Smtp-Source: ABdhPJykbNxVvHAYVw/tHK6dZfWtvgimouh+zNi6tB4o+/T3WZ1X0Gnr3wakouYL8i+V+8Yt3S1PAddoQLq6lAW8Zxw= X-Received: by 2002:a05:6e02:214b:: with SMTP id d11mr16786591ilv.135.1616932654388; Sun, 28 Mar 2021 04:57:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rovanion Luckey Date: Sun, 28 Mar 2021 13:57:08 +0200 Message-ID: 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" X-getmail-retrieved-from-mailbox: Patches > We can see helpfile and statistics file go into etc/mail, then sendmailgoes into sbin, smrsh is missing in sbin. Fixed. In addition to Léo Le Bouter's comments, I suggest either omitting or > amending this part. A Maildir is where the user's emails will be kept, > but it cannot be stored in the build output, because that directory will > be immutable after the build is complete. > > What is the default? > `/etc/mail` is the default it seems. I modified the patch to use `$out/var/spool/mail` instead. `/var/spool/mail` is where I would like to put it on a conventional linux distribution. But I don't know if MAILDIR means "where the user's mail will be kept" in this context because when I do that I end up with the following file tree: $ tree /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2 > /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2 > ├── bin > │ ├── hoststat -> > /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail > │ ├── mailq -> > /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail > │ ├── newaliases -> > /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail > │ ├── purgestat -> > /gnu/store/05wxmp6m3pfg5d2jrwbx4rx5p3nxyyvc-sendmail-8.15.2/sbin/sendmail > │ └── vacation > ├── etc > │ └── mail > │ ├── helpfile > │ └── statistics > ├── libexec > │ └── smrsh > ├── sbin > │ ├── editmap > │ ├── mailstats > │ ├── makemap > │ ├── praliases > │ └── sendmail > ├── share > │ └── doc > │ └── sendmail-8.15.2 > │ └── LICENSE > └── var > └── spool > └── mail > ├── sendmail.cf > └── submit.cf > with config files for sendmail in `$out/var/spool/mail`. From 66b04a58ee3e3b5d301a16377afffc600e74c7db Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Sat, 27 Mar 2021 18:28:02 +0100 Subject: [PATCH] gnu: sendmail: Fix output's directory structure. * gnu/packages/mail.scm (sendmail)[arguments]<#:phases>: Properly specify output directories in replacement 'configure and 'pre-> install. --- gnu/packages/mail.scm | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index b02f547e03..ed0e96a6e3 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -2761,23 +2761,41 @@ powerful user customization features.") (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh")))) #t)) (replace 'configure - (lambda _ + (lambda* (#:key outputs #:allow-other-keys) ;; Render harmless any attempts to chown or chgrp (substitute* "devtools/bin/install.sh" (("owner=\\$2") "owner=''") (("group=\\$2") "group=''")) - (with-output-to-file "devtools/Site/site.config.m4" - (lambda () - (format #t " + (let ((out (assoc-ref outputs "out"))) + (with-output-to-file "devtools/Site/site.config.m4" + (lambda () + ;; See 'devtools/M4/UNIX/defines.m4' for the list of + ;; installation directories. + (format #t " define(`confCC', `gcc') define(`confOPTIMIZE', `-g -O2') define(`confLIBS', `-lresolv') define(`confINSTALL', `~a/devtools/bin/install.sh') define(`confDEPEND_TYPE', `CC-M') define(`confINST_DEP', `') -" (getcwd)))) + +define(`confHFDIR', `~a/etc/mail') +define(`confSTDIR', `~a/etc/mail') +define(`confMBINDIR', `~a/sbin') +define(`confUBINDIR', `~a/bin') +define(`confSBINDIR', `~a/sbin') +define(`confEBINDIR', `~a/sbin') +define(`confMANROOT', `~a/share/man')~%" + (getcwd) + out out out out out out out)))) + + (substitute* "cf/cf/Makefile" + (("^MAILDIR=.*") + (string-append "MAILDIR = " + (assoc-ref outputs "out") + "/var/spool/mail\n"))) #t)) (replace 'build (lambda _ @@ -2789,10 +2807,9 @@ define(`confINST_DEP', `') (add-before 'install 'pre-install (lambda _ (let ((out (assoc-ref %outputs "out"))) - (mkdir-p (string-append out "/usr/bin")) - (mkdir-p (string-append out "/usr/sbin")) - (mkdir-p (string-append out "/etc/mail")) - (setenv "DESTDIR" out) + (mkdir-p (string-append out "/bin")) + (mkdir-p (string-append out "/sbin")) + (mkdir-p (string-append out "/var/spool/mail")) (with-directory-excursion "cf/cf" (invoke "sh" "Build" "install-cf")) #t)))) -- 2.30.0