GNU bug report logs -
#47435
gnu: mail: Make the sendmail package actually output its binary
Previous Next
To reply to this bug, email your comments to 47435 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Sat, 27 Mar 2021 17:35:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rovanion Luckey <rovanion.luckey <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 27 Mar 2021 17:35:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
[0001-gnu-mail-Make-the-sendmail-package-actually-output-i.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Sat, 27 Mar 2021 18:09:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 47435 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, 2021-03-27 at 18:34 +0100, Rovanion Luckey wrote:
> 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:
> 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.
> 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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Sat, 27 Mar 2021 18:23:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 47435 <at> debbugs.gnu.org (full text, mbox):
On Sat, Mar 27, 2021 at 06:34:03PM +0100, Rovanion Luckey wrote:
> 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!
> + (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.
https://en.wikipedia.org/wiki/Maildir
What is the default?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Sun, 28 Mar 2021 11:58:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 47435 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> 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`.
[Message part 2 (text/html, inline)]
[0001-gnu-sendmail-Fix-output-s-directory-structure.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Mon, 29 Mar 2021 14:26:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 47435 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
[0002-gnu-Add-libmilter.patch (text/x-patch, attachment)]
[0003-gnu-sendmail-Update-to-8.16.1.patch (text/x-patch, attachment)]
[0001-gnu-sendmail-Fix-output-s-directory-structure.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Tue, 30 Mar 2021 02:06:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 47435 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, 2021-03-29 at 16:24 +0200, Rovanion Luckey wrote:
> 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!
> + (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.
> +(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?
> + (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
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Tue, 30 Mar 2021 02:14:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 47435 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> 1.0.1: 'm4' should probably be
a native input
gnu/packages/mail.scm:2871:2: libmilter <at> 1.0.1: file names of patches
should start with the package name
gnu/packages/mail.scm:2891:14: libmilter <at> 1.0.1: no period allowed at
the end of the synopsis
gnu/packages/mail.scm:2871:2: libmilter <at> 1.0.1: permanent redirect from
http://sendmail.org to
https://www.proofpoint.com/us/products/email-protection/open-source-email-solution
gnu/packages/mail.scm:2871:2: libmilter <at> 1.0.1: source not archived on
Software Heritage
gnu/packages/mail.scm:2858:5: sendmail <at> 8.16.1: 'm4' should probably be
a native input
gnu/packages/mail.scm:2860:15: sendmail <at> 8.16.1: permanent redirect from
http://sendmail.org to
https://www.proofpoint.com/us/products/email-protection/open-source-email-solution
gnu/packages/mail.scm:2772:5: sendmail <at> 8.16.1: source not archived on
Software Heritage
Thank you!
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#47435
; Package
guix-patches
.
(Fri, 09 Apr 2021 19:32:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 47435 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> 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.
> It seems in your latest patches applied on top of master, the
> 'sendmail' package does not build.
>
This too.
> 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.
> 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)
> /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:
https://packages.debian.org/experimental/libmilter1.0.1
> Are you sure about that?
Hard no on 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?
>
Yeah, that is what I intended. I intended to only change the metadata
attached to the libmilter package in the Guix package repository.
> > + (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.
[Message part 2 (text/html, inline)]
[0003-gnu-sendmail-Update-to-8.16.1.patch (text/x-patch, attachment)]
[0002-gnu-Add-libmilter.patch (text/x-patch, attachment)]
[0001-gnu-sendmail-Fix-output-s-directory-structure.patch (text/x-patch, attachment)]
This bug report was last modified 4 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.