From c52328776531a149ec78859c647942d5804be014 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 17 Mar 2020 08:37:32 +0100 Subject: gnu: postfix-minimal: Fix startup warnings. This avoids kind of funny replacements like these of `rm' find -prune -perm -020 => find -prune -pe/gnu/store/zibwkb5xavnv6z3gzknfqjsxb9b0izh0-coreutils-8.31/bin/rm -020 * gnu/packages/mail.scm (postfix-minimal)[phases]: Set PATH rather than substituting individual commands. --- gnu/packages/mail.scm | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index f1427f893a..9409bc46b9 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -41,6 +41,7 @@ ;;; Copyright © 2020 B. Wilson ;;; Copyright © 2020 divoplade ;;; Copyright © 2020 Brant Gardner +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Benoit Joly ;;; Copyright © 2021 Morgan Smith @@ -4980,7 +4981,10 @@ (define-public postfix-minimal "1k2mxx9yx8lif804ff7zjyllizv4najfv3dca912k6j46fbr5b12")))) (build-system gnu-build-system) (arguments - '(#:phases + '(#:modules ((srfi srfi-26) + (guix build utils) + (guix build gnu-build-system)) + #:phases (modify-phases %standard-phases (add-before 'build 'patch-/bin/sh (lambda _ @@ -5009,13 +5013,19 @@ (define-public postfix-minimal (lambda _ (invoke "make" "makefiles" "pie=yes" "dynamicmaps=yes"))) (add-before 'install 'fix-postfix-scripts-path - (lambda _ - (for-each - (lambda (command) - (substitute* '("postfix-install" "conf/post-install" "conf/postfix-script") - (((string-append command " ")) (string-append (which command) " ")))) - '("awk" "chmod" "chown" "chgrp" "cp" "find" "ln" "mkdir" "mv" "rm" "sed" - "sleep" "sort" "touch" "uname")))) + (lambda* (#:key inputs #:allow-other-keys) + (let ((path (string-join + (map (compose (cute string-append <> "/bin") + (cute assoc-ref inputs <>)) + '("bash" "coreutils" "findutils" "gawk" "grep" + "sed")) + ":"))) + (substitute* '("postfix-install" + "conf/post-install" + "conf/postfix-script") + (("^SHELL=/bin/sh") + (string-append "PATH=" path "\n" + "SHELL=" (assoc-ref inputs "bash") "/bin/sh")))))) (add-before 'install 'configure-install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- cgit v1.2.3