This one time, at band camp, Micha Lenk said:
> Hello Stephen,
> 
> Stephen Gran schrieb:
> > I have supplied /path/to/sendmail to configure, as it's known on Debian
> > systems.  I have also patched clamav-milter.c so that if sendmail's
> > version is undefined previously, it will be defined as the version
> > currently in Debian.
> 
> But I think it's not okay to *assume* sendmail (or something that should
> behave like sendmail) is installed, if you do not provide a build-depend
> on it (whatever 'it' means).

If you are building the milter, you have to assume that sendmail is
installed.  The milter relies on both path and version information
picked up by the configure script.  Since sendmail will most likely not
be installed on buildd machines, I am working around it as best as
possiible.  If sendmail's version string is filled in, it's because
another mailer that supplies the binary /usr/bin/sendmail responded to a
senmail specirfic option with a parseable reply - see below for why this
is wrong.

> >>The attached patch takes the version of the package libmilter-dev as the
> >>version of sendmail. Since libmilter-dev is in clamav's build-deps this
> >>should provide a more reliable way of detecting the sendmail version -
> >>even if it's an ugly hack too. :)
> > 
> >>+dpkg -s libmilter-dev | sed -n '/^Version:/s/-[^-]*$//p'
> 
> Well, that's the content of the additional script which should be called
> to simulate sendmail more *reliable*. It outputs for instance
> 
> Version: 8.13.4
> 
> > [EMAIL PROTECTED]:~/Debian/clamav/0.87/clamav-0.87$ ./configure --help | 
> > grep sendmail
> >   --with-sendmail=PATH    specify location of Sendmail binary (default=auto 
> > find)
> > 
> > So that patch won't work - it will give configure a path to the binary
> > 8.13.5-1, which I'm having trouble imaging exists on most systems :)
> 
> No, trats wrong. My patch gives configure the path to my additional
> script debian/libmilter-version.sh as sendmail binary. Then configure is
> calling this script in order to detect the sendmail version. I tested
> it, it works. And since libmilter-dev is built from the same source like
> sendmail it should always provide the correct version string. :)

Have you looked at the autoconf macro SENDMAIL_BIN that is used by
clamav-milter.c?  You are suggesting we build clamav-milter binaries
that look for sendmail in `pwd`/debian/.  That will not work.  This is
my point.

> As I said above: The configure script grabbs the second word of the
> first line of the output given by the specified sendmail binary.
> 
> But nullmailer, which is installed in my sid-chroot, behaves different
> from sendmail in giving no propper version string (okay, this might be a
> nullmailer-bug too...). It just ignores the unknown options and tries to
> send mail. But since there are no recipients given it outputs:
> 
> No recipients were listed

This is an error message, and should go to stderr, not stdout.  If the
error message went to stderr, the pipe wouldn't get it, and it wouldn't
be evaluated.  This is a bug in nullmailer, apparently.  exim goes to
stdout, as do all the other mailers installed on the buildd's  - I have
no idea what they use, but presumably soemthing similar to nullmailer;
I see much the same error message as you describe.

> Probably because they didn't install nullmailer but a real mailer. Yes,
> from this point of view, you're right: there is no error. But I thought
> Debian tries hardly to aim for quality software, and my patch might
> improve the source package as it will enhance it to build even on
> systems having nullmailer installed as mailer.

clamav will build fine if nullmailer outputs error messages to stderr,
it looks like.  Working around buggy software when necessary is possible,
but as nullmailer is both open source and free, it would be better in this
instance just to fix nullmailer.  Please ask the maintainer or upstream
to use ferr() instead of fout() for error messages such as the above.

Thanks,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to