gnu: mail: Make the sendmail package actually output its binary

  • Open
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • Léo Le Bouter
  • Rovanion Luckey
Owner
unassigned
Submitted by
Rovanion Luckey
Severity
normal
R
R
Rovanion Luckey wrote on 27 Mar 2021 18:34
(address . guix-patches@gnu.org)
CAAaf0CCUVMmrADMj9Ow200z=jJuzf=W1jPCgwT78gHEKUonSKA@mail.gmail.com
This is an attempt at getting the sendmail package working. Currently
installing the package does not make the `sendmail` executable appear in
`$PATH`:


Toggle quote (4 lines)
> ?$ guix environment --ad-hoc sendmail
> ?$ sendmail
> bash: sendmail: command not found

This patch fixes that.

Though there are questions that still need to be resolved. While this patch
does fix what it sets out to fix, the solutions aren't neccicerily correct.
It configures a "helpfile" to be put in "$out/usr/share" and the same goes
for its "statistics" file. I have no idea what these does and where they
should go in reality. If someone happens to know, please do tell.
Attachment: file
From db5c0cf1b4686410f365b36d708aceed1742efec Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Sat, 27 Mar 2021 18:28:02 +0100
Subject: [PATCH] gnu: mail: Make the sendmail package actually output its
binary

The binary sendmail was not installed when sendmail was installed. This patch fixes this.
---
gnu/packages/mail.scm | 33 +++++++++++++++++++++++++--------
1 file changed, 25 insertions(+), 8 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index b02f547e03..6fefc15d65 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/share')
+define(`confSTDIR', `~a/share')
+define(`confMBINDIR', `~a/bin')
+define(`confUBINDIR', `~a/bin')
+define(`confSBINDIR', `~a/sbin')
+define(`confEBINDIR', `~a/libexec')
+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")
+ "/etc/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 "/bin"))
+ (mkdir-p (string-append out "/sbin"))
(mkdir-p (string-append out "/etc/mail"))
- (setenv "DESTDIR" out)
(with-directory-excursion "cf/cf"
(invoke "sh" "Build" "install-cf"))
#t))))
--
2.30.0
L
L
Léo Le Bouter wrote on 27 Mar 2021 19:07
c390fc4d7a78fce9c3fb95e3244344cf21f4eea9.camel@zaclys.net
On Sat, 2021-03-27 at 18:34 +0100, Rovanion Luckey wrote:
Toggle quote (12 lines)
> This is an attempt at getting the sendmail package working. Currently
> installing the package does not make the `sendmail` executable appear
> in `$PATH`:
>
>
> > ?$ guix environment --ad-hoc sendmail
> > ?$ sendmail
> > bash: sendmail: command not found
>
> This patch fixes that.
>

Thanks a lot for working on this!

It seems the commit message does not follow the ChangeLog guidelines as
used by GNU Guix, I suggest using this:

Toggle quote (6 lines)
> gnu: sendmail: Fix output's directory structure.
>
> * gnu/packages/mail.scm (sendmail)[arguments]<#:phases>: Properly
> specify output directories in replacement 'configure and 'pre-
> install.

Look at the commit history of GNU Guix for more examples and
inspiration.

Toggle quote (7 lines)
> Though there are questions that still need to be resolved. While this
> patch does fix what it sets out to fix, the solutions aren't
> neccicerily correct. It configures a "helpfile" to be put in
> "$out/usr/share" and the same goes for its "statistics" file. I have
> no idea what these does and where they should go in reality. If
> someone happens to know, please do tell.

If we look at the output of these commands:

With your patch applied:

$ tree $(./pre-inst-env guix build sendmail)
/gnu/store/ygz55p6g8z4kjbp6418w385jzy53324h-sendmail-8.15.2
??? bin
? ??? hoststat -> /gnu/store/ygz55p6g8z4kjbp6418w385jzy53324h-
sendmail-8.15.2/bin/sendmail
? ??? mailq -> /gnu/store/ygz55p6g8z4kjbp6418w385jzy53324h-sendmail-
8.15.2/bin/sendmail
? ??? newaliases -> /gnu/store/ygz55p6g8z4kjbp6418w385jzy53324h-
sendmail-8.15.2/bin/sendmail
? ??? purgestat -> /gnu/store/ygz55p6g8z4kjbp6418w385jzy53324h-
sendmail-8.15.2/bin/sendmail
? ??? sendmail
? ??? vacation
??? etc
? ??? mail
? ??? sendmail.cf
? ??? submit.cf
??? libexec
??? sbin
? ??? editmap
? ??? mailstats
? ??? makemap
? ??? praliases
??? share
??? doc
? ??? sendmail-8.15.2
? ??? LICENSE
??? helpfile
??? statistics

7 directories, 16 files

Without your patch applied:

$ tree $(./pre-inst-env guix build sendmail)
/gnu/store/yn6dlixw6cnbmgjggk640vbv8hidfhi7-sendmail-8.15.2
??? etc
? ??? mail
? ??? helpfile
? ??? sendmail.cf
? ??? statistics
? ??? submit.cf
??? share
? ??? doc
? ??? sendmail-8.15.2
? ??? LICENSE
??? usr
??? bin
? ??? hoststat -> /usr/sbin/sendmail
? ??? mailq -> /usr/sbin/sendmail
? ??? newaliases -> /usr/sbin/sendmail
? ??? purgestat -> /usr/sbin/sendmail
? ??? vacation
??? sbin
??? editmap
??? mailstats
??? makemap
??? praliases
??? sendmail
??? smrsh

8 directories, 16 files

We can see helpfile and statistics file go into etc/mail, then sendmail
goes into sbin, smrsh is missing in sbin.

Léo
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEFIvLi9gL+xax3g6RRaix6GvNEKYFAmBfdHgACgkQRaix6GvN
EKbI4BAAmT46sz+ktFH5OkEI+0M5dqfAtYclqXSE27WfbqjJPedkR77IJu+bguyV
UpxGawDJQ0K8HXthLU6Udl8OKhBaxVvKa6mDCbRP+9oLLa3qunL907HyNiNUCiFH
6wltqmrpEITZLeR5TGsLyHCeciEXmZjS7e5dXus1154sx0HsUTgQsF8KiQPuxGhQ
7zCFivpuhXMQtgnd1MqNg0Ev8/my6zNU1HTMhGD3upgkCGm+GeKzf4yFrp/RsZen
K7KeFV4edhEPwj7lPYl1x9/h4XgSbdFMMwhJKGEYKu3epM8OHGiorLJqHGW7lVNR
lJoQIZ/PO9Cx0r10LE7khmKshnDU74j1ie02V12zqDti+4RoXqRyS12BC2eUuIZ4
/xiIOiYp/kbbXXAxFW66YP2fPPUz/VTVQJnhkwB/dm120BB/AECog6jTHGlHxCDZ
t5/Fd6kkBDR7h2weErMoQBqLaBqsuod9VEs64R5O3DPy7GkIatkRirLWd+YRT5Y3
qQrIzxiyiXrHid5/j3XYOiifGaGA35+SlxA342BNV5iKhHdsc/fpF/+znTrLLmJv
JjTDsG2N8zzZGRhpzdtb9siY4uPezi9HbApjP+9bn9aojzoe9h4Z6XTCFuGwzDZG
3/iWQ1m3162WnAzOvLDk7gta9Mmph2ysMmVkj7KQ/CRI0e36gCo=
=3sGz
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 27 Mar 2021 19:22
(name . Rovanion Luckey)(address . rovanion.luckey@gmail.com)(address . 47435@debbugs.gnu.org)
YF936FoW3/WQG7u3@jasmine.lan
On Sat, Mar 27, 2021 at 06:34:03PM +0100, Rovanion Luckey wrote:
Toggle quote (17 lines)
> This is an attempt at getting the sendmail package working. Currently
> installing the package does not make the `sendmail` executable appear in
> `$PATH`:
>
>
> > ?$ guix environment --ad-hoc sendmail
> > ?$ sendmail
> > bash: sendmail: command not found
>
> This patch fixes that.
>
> Though there are questions that still need to be resolved. While this patch
> does fix what it sets out to fix, the solutions aren't neccicerily correct.
> It configures a "helpfile" to be put in "$out/usr/share" and the same goes
> for its "statistics" file. I have no idea what these does and where they
> should go in reality. If someone happens to know, please do tell.

Thanks for working on this!

Toggle quote (6 lines)
> + (substitute* "cf/cf/Makefile"
> + (("^MAILDIR=.*")
> + (string-append "MAILDIR = "
> + (assoc-ref outputs "out")
> + "/etc/mail\n")))

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?
R
R
Rovanion Luckey wrote on 28 Mar 2021 13:57
(name . Leo Famulari)(address . leo@famulari.name)(address . 47435@debbugs.gnu.org)
CAAaf0CDOnKYAA5WiR8izV=0pnDxKtFF8qbHYhDJBP-8k0ufOYw@mail.gmail.com
Toggle quote (1 lines)
> 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
Toggle quote (4 lines)
> 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.

>

Toggle quote (3 lines)
> 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
Toggle quote (34 lines)
> /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`.
Attachment: file
From 66b04a58ee3e3b5d301a16377afffc600e74c7db Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
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(-)

Toggle diff (67 lines)
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
R
R
Rovanion Luckey wrote on 29 Mar 2021 16:24
(name . Leo Famulari)(address . leo@famulari.name)(address . 47435@debbugs.gnu.org)
CAAaf0CCFHwF=QFTxxzLNN_X=CtZWav8NmQ=U2QW+=UQ6t5keUA@mail.gmail.com
Attached to this email you will find three patches that
1. make the sendmail binary appear in PATH after the sendmail package is
installed,
2. add libmilter to the package collection and
3. updates sendmail and libmilter to 8.16.1.

I ended up putting smrsh back in libexec because that is where all the
other distros put it and seems like a program that should only be used by
sendmail itself.
Attachment: file
From e09b4bf1195fcb8328a3b67f0d2eec254048bb7b Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Mon, 29 Mar 2021 15:56:25 +0200
Subject: [PATCH 2/3] gnu: Add libmilter

* gnu/packages/mail.scm (libmilter): New variable. A Sendmail API library for building mail filters.
---
gnu/packages/mail.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index a1f4147aa5..87615f5527 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2833,6 +2833,29 @@ transfer protocols.")
(license (license:non-copyleft "file://LICENSE"
"See LICENSE in the distribution."))))
+(define-public libmilter
+ (package
+ (inherit sendmail)
+ (name "libmilter")
+ (version "1.0.1")
+ (arguments
+ (substitute-keyword-arguments (package-arguments sendmail)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'build
+ (lambda* _
+ (with-directory-excursion "libmilter"
+ (invoke "sh" "Build"))
+ #t))
+ (delete 'pre-install)
+ (replace 'install
+ (lambda* _
+ (with-directory-excursion "libmilter"
+ (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
+ (invoke "make" "install"))
+ #t))))))
+ (synopsis "Sendmail library for creating mail filters.")))
+
(define-public sieve-connect
(package
(name "sieve-connect")
--
2.30.0
From fb7ea463cbf557e0a8f9952243593a54b6b9bde5 Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Mon, 29 Mar 2021 16:04:41 +0200
Subject: [PATCH 3/3] gnu: sendmail: Update to 8.16.1

* gnu/packages/mail.scm (sendmail): Update to 8.16.1
---
gnu/packages/mail.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 87615f5527..eab4a9d821 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2733,7 +2733,7 @@ powerful user customization features.")
(define-public sendmail
(package
(name "sendmail")
- (version "8.15.2")
+ (version "8.16.1")
(source
(origin
(method url-fetch)
@@ -2742,7 +2742,7 @@ powerful user customization features.")
version ".tar.gz"))
(sha256
(base32
- "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))
+ "1fk49v63w4lrpw4jjzl495vpi02w633vkd9jbwbqcss39gfdb1kq"))
(patches (search-patches "sendmail-libmilter-shared-library.patch"))))
(build-system gnu-build-system)
(arguments
--
2.30.0
L
L
Léo Le Bouter wrote on 30 Mar 2021 04:05
(address . 47435@debbugs.gnu.org)
75974c07f11e9e07061c192fe50c8704e4cb4d1c.camel@zaclys.net
On Mon, 2021-03-29 at 16:24 +0200, Rovanion Luckey wrote:
Toggle quote (13 lines)
> Attached to this email you will find three patches that
> 1. make the sendmail binary appear in PATH after the sendmail package
> is
> installed,
> 2. add libmilter to the package collection and
> 3. updates sendmail and libmilter to 8.16.1.
>
> I ended up putting smrsh back in libexec because that is where all
> the
> other distros put it and seems like a program that should only be
> used by
> sendmail itself.

Thank you for the patches!

Toggle quote (3 lines)
> + (synopsis "Sendmail library for creating mail filters.")))
> +

On the commit message, the convention is that all titles end with a
period, also all statements in the subtext also end with a period, and
that the subtext is wrapped to 80 columns (unless links). Look at other
commit messages for examples.

It seems in your latest patches applied on top of master, the
'sendmail' package does not build:

starting phase `pre-install'
Using M4=/gnu/store/jlm51s1gz6pah5bn7mc1i12kj5xilhck-m4-1.4.18/bin/m4
../../devtools/bin/install.sh -c -o root -g bin -m 0444 sendmail.cf
/gnu/store/6iaqmnb3rgcjdh3jz56x4r1hafalrvmg-sendmail-
8.16.1/etc/mail/sendmail.cf
cp: cannot create regular file
'/gnu/store/6iaqmnb3rgcjdh3jz56x4r1hafalrvmg-sendmail-
8.16.1/etc/mail/sendmail.cf': No such file or directory
make: *** [Makefile:83: install-sendmail-cf] Error 1
command "sh" "Build" "install-cf" failed with status 2
builder for `/gnu/store/7rm2hkxw5sqz34k562wfgwsfvpg0avsk-sendmail-
8.16.1.drv' failed with exit code 1
@ build-failed /gnu/store/7rm2hkxw5sqz34k562wfgwsfvpg0avsk-sendmail-
8.16.1.drv - 1 builder for
`/gnu/store/7rm2hkxw5sqz34k562wfgwsfvpg0avsk-sendmail-8.16.1.drv'
failed with exit code 1
derivation '/gnu/store/7rm2hkxw5sqz34k562wfgwsfvpg0avsk-sendmail-
8.16.1.drv' offloaded to 'www.proxmox-2.schmilblick.org' failed: build
of `/gnu/store/7rm2hkxw5sqz34k562wfgwsfvpg0avsk-sendmail-8.16.1.drv'
failed
build of /gnu/store/7rm2hkxw5sqz34k562wfgwsfvpg0avsk-sendmail-
8.16.1.drv failed

libmilter builds fine however.

I noticed it builds as a static library:

/gnu/store/vdg98ynngj637sdn1xazgafb8af8fv2j-libmilter-
1.0.1/lib/libmilter.so.: ELF 64-bit LSB shared object, x86-64, version
1 (SYSV), statically linked, not stripped

Is there any build flag to disable that? If so, I think we probably
should, for security updates of it's dependencies, but it doesnt look
like it has any, not even the glibc? Maybe it's not so important here.

I also noticed that there was a weird naming for the actual so file, it
ends with a dot '.':

$ tree $(./pre-inst-env guix build libmilter)
/gnu/store/vdg98ynngj637sdn1xazgafb8af8fv2j-libmilter-1.0.1
??? include
? ??? libmilter
? ??? mfapi.h
? ??? mfdef.h
??? lib
? ??? libmilter.a
? ??? libmilter.so -> libmilter.so. <<-- here
? ??? libmilter.so. <<-- also here
??? share
??? doc
??? libmilter-1.0.1
??? LICENSE

6 directories, 6 files

Again it will work anyways I believe, not crucial.

Toggle quote (6 lines)
> +(define-public libmilter
> + (package
> + (inherit sendmail)
> + (name "libmilter")
> + (version "1.0.1")

Where does this version come from? Are you sure about that? Also do
note that changing the version field here in libmilter does not change
the version used in the origin of the inherited package So it's using
the same sources as sendmail exactly, that's what you want?

Toggle quote (20 lines)
> + (arguments
> + (substitute-keyword-arguments (package-arguments sendmail)
> + ((#:phases phases)
> + `(modify-phases ,phases
> + (replace 'build
> + (lambda* _
> + (with-directory-excursion "libmilter"
> + (invoke "sh" "Build"))
> + #t))
> + (delete 'pre-install)
> + (replace 'install
> + (lambda* _
> + (with-directory-excursion "libmilter"
> + (mkdir-p (string-append (assoc-ref %outputs "out")
> "/lib"))
> + (invoke "make" "install"))
> + #t))))))
> + (synopsis "Sendmail library for creating mail filters.")))
> +

I suggest adding a dedicated synopsis and description here, also
synopsises as I see it should not be sentences and not end with a
period, descriptions on the other hand should be full sentences, look
at the other packages for inspiration.

Léo
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEFIvLi9gL+xax3g6RRaix6GvNEKYFAmBih1YACgkQRaix6GvN
EKaYlQ//Xzs3TUfoCzPz1PoEMuPBlY/Qtny9L4sJUKsbQ04z4Tm50YnC6yWjzWZK
MpFUEqm4a41Szwh0wUxLzqRNK1A2AFsWn+2L9UHakzCUKOB/LDqe0TIdYV01sftm
i03BgK3Y+cJkstULhD/Is1YfqWiW1qziP4kfd9pK6Cuyms+/y+EXEt81krX8CE7z
C9VTvDWZlD8sV2fOjQHqJ7jEUMC1Ed1rj8+2J0zLNCC1sbcE9wxzzHS9oVLhtV0g
5ZXH3nHYkSt+6pVzwqBX08t7dSQdR2EdEupLVsc5cpxeMKyV4xy+sBLRxtYroCMX
Gt7mSKlH9bPEYQM/02um/tQBMXKRrzYk+qTswxhwkVo19QRNyQhxQweLi4t+3tjJ
Ukmaqviovosb+7tmV/REPlqDRn/q90xONJUEn5cjfygqd7Te8e6PcEIPlCYrNotA
4MTyPCkJK4Rdjjr6+ZBJHqD4gQ6u10sFcn5d2aMHErJU6IqULjodvpjMiATEHKC5
Ue1vx3WZSZs2zaHXqOWrCMo5ROfPS/vIUho5juSF2YZowVLjiEA6ag286w+vvgYO
NOpo9wra6JQoBAzmVGHJtQTvFeLWIYV6/fTsEx6xT42LQ/LumQnURN5X3pdR1aAJ
NuYQsTjBeAVXFiKO3je8RXvjnsQ0rsAWXV1vPOZg/ehQLi+VKY8=
=79vH
-----END PGP SIGNATURE-----


L
L
Léo Le Bouter wrote on 30 Mar 2021 04:13
(address . 47435@debbugs.gnu.org)
ff851ee96098fe630c58ff6df254cbf2e7fe8e56.camel@zaclys.net
To add on my previous message, also run the linter like below and try
to fix the warnings:

$ ./pre-inst-env guix lint libmilter sendmail
gnu/packages/mail.scm:2871:2: libmilter@1.0.1: 'm4' should probably be
a native input
gnu/packages/mail.scm:2871:2: libmilter@1.0.1: file names of patches
should start with the package name
gnu/packages/mail.scm:2891:14: libmilter@1.0.1: no period allowed at
the end of the synopsis
gnu/packages/mail.scm:2871:2: libmilter@1.0.1: permanent redirect from
gnu/packages/mail.scm:2871:2: libmilter@1.0.1: source not archived on
Software Heritage
gnu/packages/mail.scm:2858:5: sendmail@8.16.1: 'm4' should probably be
a native input
gnu/packages/mail.scm:2860:15: sendmail@8.16.1: permanent redirect from
gnu/packages/mail.scm:2772:5: sendmail@8.16.1: source not archived on
Software Heritage

Thank you!
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEFIvLi9gL+xax3g6RRaix6GvNEKYFAmBiiTgACgkQRaix6GvN
EKb9BRAAkQCgy5Og+q8hhfuaqy13pDPo0XUGW3ReuHrJSwZ02YBveNIjkc/56JRo
+4Z5pxNdtpGuAxGN+8MpLOh6upq3e2zqzAlkqfvOFOCuH19VCx+i9tETO8VYVWXG
2ENvac9+VVi40/2kUf6LzmyK4AWDqQy+PYQb/oNcmyfdZFRS3NKTyFLBnXEmK2Fv
5AVnllq+xDPmlFIO8j113M5oKK9Qrhp3nfmzXtIFexOC9pxD23fSudAkyjjL+4DO
y0KGj0WpsvHief9EqZRFXjfNeiZKQTNdD+rqh49JP6GDHpH3wdRgl0Gf1OO8cmBj
I3A3XGNlK1/qwl99fNPVvaGsZTb3qkUWtfNOFeFCbX3VWsIYqNReXyJSJlchcVK5
AFC+xeO6zqC6+VTBfzx/cVGFdtW9GLRO7aC6lLXKsGupcX86EjHdRu+QoteIr+sc
cXKYFeeAIcV79nyhLdmrVDvGNp7Anlecsvs1OgCrtXiEseHXHI0ROAcXQY6eG4Ql
4TjuLAKcrSADNn81ti7BjigyambG3ddJI1BC5SLaoab3T4ZDQJpP/vrIrpaw3y/0
UMAq2gop/2coNex+un6RMyCfVF1/C+80WhZD7g2lEuPAVyXsz0c9gZGKrQJXrcjb
MsN53d1eM25tqeI9Z68qYzgA+AfNywm2R8DtqgFn0YhyV4zUJJ4=
=yOrG
-----END PGP SIGNATURE-----


R
R
Rovanion Luckey wrote on 9 Apr 2021 21:30
(name . Léo Le Bouter)(address . lle-bout@zaclys.net)
CAAaf0CBwaTSOZGSam=WHuJKwPhXd6zVBOvKMe94RKd43HpBjag@mail.gmail.com
Toggle quote (6 lines)
> On the commit message, the convention is that all titles end with a
> period, also all statements in the subtext also end with a period, and
> that the subtext is wrapped to 80 columns (unless links). Look at other
> commit messages for examples.
>

Should be fixed in the attached patch.


Toggle quote (4 lines)
> It seems in your latest patches applied on top of master, the
> 'sendmail' package does not build.
>

This too.


Toggle quote (11 lines)
> I noticed it builds as a static library:
>
> /gnu/store/vdg98ynngj637sdn1xazgafb8af8fv2j-libmilter-
> 1.0.1/lib/libmilter.so.: ELF 64-bit LSB shared object, x86-64, version
> 1 (SYSV), statically linked, not stripped
>
> Is there any build flag to disable that? If so, I think we probably
> should, for security updates of it's dependencies, but it doesnt look
> like it has any, not even the glibc? Maybe it's not so important here.
>

I thought the patch I pulled in from Debian made it into a shared library.
It brought it from a .a that pymilter would not build against to a .so that
it would build against. This is the first time I build C libraries for
distribution so I have no idea what I'm doing.

I seem to have misplaced my package definition for pymilter when I rebased
on master so I have to confirm again that this libmilter is actually
usable. There was something about the pymilter tests not running IIRC.


Toggle quote (4 lines)
> I also noticed that there was a weird naming for the actual so file, it
> ends with a dot '.':
>

I think something somewhere in the build system wants to add a number after
that dot, but that there was no number available so it just added an empty
string after the dot.

$ tree $(./pre-inst-env guix build libmilter)
Toggle quote (27 lines)
> /gnu/store/vdg98ynngj637sdn1xazgafb8af8fv2j-libmilter-1.0.1
> ??? include
> ? ??? libmilter
> ? ??? mfapi.h
> ? ??? mfdef.h
> ??? lib
> ? ??? libmilter.a
> ? ??? libmilter.so -> libmilter.so. <<-- here
> ? ??? libmilter.so. <<-- also here
> ??? share
> ??? doc
> ??? libmilter-1.0.1
> ??? LICENSE
>
> 6 directories, 6 files
>
> Again it will work anyways I believe, not crucial.
>
> > +(define-public libmilter
> > + (package
> > + (inherit sendmail)
> > + (name "libmilter")
> > + (version "1.0.1")
>
> Where does this version come from?


I think I just took it from Debian for some reason:


Toggle quote (3 lines)
> Are you sure about that?


Hard no on that.


Toggle quote (6 lines)
> Also do
> note that changing the version field here in libmilter does not change
> the version used in the origin of the inherited package So it's using
> the same sources as sendmail exactly, that's what you want?
>

Yeah, that is what I intended. I intended to only change the metadata
attached to the libmilter package in the Guix package repository.



Toggle quote (26 lines)
> > + (arguments
> > + (substitute-keyword-arguments (package-arguments sendmail)
> > + ((#:phases phases)
> > + `(modify-phases ,phases
> > + (replace 'build
> > + (lambda* _
> > + (with-directory-excursion "libmilter"
> > + (invoke "sh" "Build"))
> > + #t))
> > + (delete 'pre-install)
> > + (replace 'install
> > + (lambda* _
> > + (with-directory-excursion "libmilter"
> > + (mkdir-p (string-append (assoc-ref %outputs "out")
> > "/lib"))
> > + (invoke "make" "install"))
> > + #t))))))
> > + (synopsis "Sendmail library for creating mail filters.")))
> > +
>
> I suggest adding a dedicated synopsis and description here, also
> synopsises as I see it should not be sentences and not end with a
> period, descriptions on the other hand should be full sentences, look
> at the other packages for inspiration.


Added a description and removed the period from the synopsis.

I will keep the website as sendmail.org despite the redirect, the patch
will not start with the filename for libmilter. I do not know what to do
about there being no "updater" for sendmail, but then again the last
release was in 2016.
Attachment: file
From 87d1ede0d39dd952f625de63f39df025a4dddbe8 Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Mon, 29 Mar 2021 16:04:41 +0200
Subject: [PATCH 3/3] gnu: sendmail: Update to 8.16.1.

* gnu/packages/mail.scm (sendmail): Update to 8.16.1.
---
gnu/packages/mail.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 0a6e710611..5844c94c90 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2768,7 +2768,7 @@ powerful user customization features.")
(define-public sendmail
(package
(name "sendmail")
- (version "8.15.2")
+ (version "8.16.1")
(source
(origin
(method url-fetch)
@@ -2777,7 +2777,7 @@ powerful user customization features.")
version ".tar.gz"))
(sha256
(base32
- "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))
+ "1fk49v63w4lrpw4jjzl495vpi02w633vkd9jbwbqcss39gfdb1kq"))
(patches (search-patches "sendmail-libmilter-shared-library.patch"))))
(build-system gnu-build-system)
(arguments
--
2.30.0
From 812b45c66d04648444a9df3944de8e1e94d32180 Mon Sep 17 00:00:00 2001
From: Rovanion Luckey <rovanion.luckey@gmail.com>
Date: Mon, 29 Mar 2021 15:56:25 +0200
Subject: [PATCH 2/3] gnu: Add libmilter.

* gnu/packages/mail.scm (libmilter): New variable. A Sendmail API library for
building mail filters.
---
gnu/packages/mail.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 8cb548044e..0a6e710611 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2869,6 +2869,32 @@ transfer protocols.")
(license (license:non-copyleft "file://LICENSE"
"See LICENSE in the distribution."))))
+(define-public libmilter
+ (package
+ (inherit sendmail)
+ (name "libmilter")
+ (version "1.0.1")
+ (arguments
+ (substitute-keyword-arguments (package-arguments sendmail)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'build
+ (lambda* _
+ (with-directory-excursion "libmilter"
+ (invoke "sh" "Build"))
+ #t))
+ (delete 'pre-install)
+ (replace 'install
+ (lambda* _
+ (with-directory-excursion "libmilter"
+ (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
+ (invoke "make" "install"))
+ #t))))))
+ (synopsis "Sendmail library for creating mail filters")
+ (description "The Sendmail Mail Filter API (Milter) is designed to allow
+third-party programs access to mail messages as they are being processed in
+order to filter meta-information(headers) and content.")))
+
(define-public sieve-connect
(package
(name "sieve-connect")
--
2.30.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 47435@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 47435
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch