Bug 58631 - <synoppossibly poor default in noattach's Makefile
Summary: <synoppossibly poor default in noattach's Makefile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-28 14:00 UTC by Luigi Rizzo
Modified: 2003-11-15 20:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi Rizzo 2003-10-28 14:00:27 UTC
ports/mail/noattach/Makefile has the following:
.if !defined(SENDMAIL_MILTER_IN_BASE)
BUILD_DEPENDS=  ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
.endif

but at least on RELENG_4 (and possibly also CURRENT)
libmilter.a is already present in /usr/lib as part of the
default installation.
I believe the default should be to assume libmilter.a is
present, and only if explicitly requested the dependence should
be on ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
Comment 1 Kirill Ponomarev freebsd_committer freebsd_triage 2003-10-28 16:19:00 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2003-10-28 21:08:58 UTC
State Changed
From-To: open->feedback


Please use: 
SENDMAIL_MILTER_IN_BASE=yes 

its ecxacly for your needs. 
You can put this in /etc/make.conf 

So far only 4.8 RELEASE and 5.1 RELEASE 
have an recant version of libmilter. 

see 
http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/sendmail/libmilter/ 

This ports links in the latest version of libmilter.a 
I see no reason to change this.
Comment 3 Luigi Rizzo 2003-10-28 23:30:40 UTC
On Tue, Oct 28, 2003 at 10:13:01PM +0100, Dirk Meyer wrote:
A
...
> Please use:
> SENDMAIL_MILTER_IN_BASE=yes

I know this -- I am just saying that the default seems to require
an unnecessary build of mail/sendmail when the Makefile could easily
detect the existence of the required library in the standard places,
and force the dependency only if not available. E.g. something like


-   .if !defined(SENDMAIL_MILTER_IN_BASE)
+   .if !exists(/usr/lib/libmilter.a)
    BUILD_DEPENDS=  ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
    .endif

(actually, it should check for the dynamic version, libmilter.so.2)
and then decide which library to use (if you have it both in /usr/lib
and ${LOCALBASE}) with the order of directories in LD_LIBRARY_PATH

	cheers
	luigi

> its ecxacly for your needs.
> You can put this in /etc/make.conf
> 
> So far only 4.8 RELEASE and 5.1 RELEASE
> have an recant version of libmilter.
> 
> see
> http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/sendmail/libmilter/
> 
> This ports links in the latest version of libmilter.a
> I see no reason to change this.
> 
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=58631
Comment 4 dirk.meyer 2003-10-29 03:44:45 UTC
Luigi Rizzo schrieb:,

> I know this -- I am just saying that the default seems to require
> an unnecessary build of mail/sendmail when the Makefile could easily
> detect the existence of the required library in the standard places,
> and force the dependency only if not available. E.g. something like
> 
> 
> -   .if !defined(SENDMAIL_MILTER_IN_BASE)
> +   .if !exists(/usr/lib/libmilter.a)
>     BUILD_DEPENDS=  ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
>     .endif

This will break all installations for Users not running CURRENT or STABLE.
Even if /usr/lib/libmilter.a does exist it is not the prefered library.
an old "/usr/lib/libmilter.a" might work due the interface is stable.
But it does not contain the buxfixes up to the latest version.
 
> (actually, it should check for the dynamic version, libmilter.so.2)
> and then decide which library to use (if you have it both in /usr/lib
> and ${LOCALBASE}) with the order of directories in LD_LIBRARY_PATH

SENDMAIL_MILTER_IN_BASE=yes  will use the dynamic version it exists.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 5 Luigi Rizzo 2003-10-29 08:16:42 UTC
your logic is that libmilter from the ports is preferable to the
one that exists in the installed system. However this is only
true if the port tree is updated, which is equally 
On Wed, Oct 29, 2003 at 04:44:45AM +0100, Dirk Meyer wrote:
> Luigi Rizzo schrieb:,
> 
> > I know this -- I am just saying that the default seems to require
> > an unnecessary build of mail/sendmail when the Makefile could easily
> > detect the existence of the required library in the standard places,
> > and force the dependency only if not available. E.g. something like
> > 
> > 
> > -   .if !defined(SENDMAIL_MILTER_IN_BASE)
> > +   .if !exists(/usr/lib/libmilter.a)
> >     BUILD_DEPENDS=  ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
> >     .endif
> 
> This will break all installations for Users not running CURRENT or STABLE.

> Even if /usr/lib/libmilter.a does exist it is not the prefered library.
> an old "/usr/lib/libmilter.a" might work due the interface is stable.
> But it does not contain the buxfixes up to the latest version.

If what you are trying to avoid is the use of an existing but stale
libmilter.* then you should _check_ that the existing library
is not good, not just _assume_ that the one in /usr/lib is bad and
the one in ${LOCALBASE}/lib is good.

Both assumptions (well, assumptions in general) are flawed.
Your very same reasoning about a not-updated library applies to the port
as well -- in the above dependency you don't ask for sendmail-X.Y.Z
but just for any sendmail, so it might well be the same one that got
installed when the user fetched the ports tree.
In fact, if you want to deal with users that do not track the
base source tree, why do you assume that they he track the ports tree
instead (risking all sorts of incompatibilities because most ports
do not properly check versions of the installed software) ?

I hope i made my point clear, which is, i believe the makefile does
something unnecessary for "users not running current or stable".
I know you have put in tweaks for those users, i find it weird
that you consider them the "non default" case.

	cheers
	luigi

> > (actually, it should check for the dynamic version, libmilter.so.2)
> > and then decide which library to use (if you have it both in /usr/lib
> > and ${LOCALBASE}) with the order of directories in LD_LIBRARY_PATH
> 
> SENDMAIL_MILTER_IN_BASE=yes  will use the dynamic version it exists.
> 
> kind regards Dirk
> 
> - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
> - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 6 dirk.meyer 2003-10-29 21:07:43 UTC
> your logic is that libmilter from the ports is preferable to the
> one that exists in the installed system. However this is only
> true if the port tree is updated, which is equally 
> On Wed, Oct 29, 2003 at 04:44:45AM +0100, Dirk Meyer wrote:

[...]
Users do use portupgrade/portseasy and others tools.
The need to cvsup to ports tree as whole,
to get the latest version of noattach.

> If what you are trying to avoid is the use of an existing but stale
> libmilter.* then you should _check_ that the existing library
> is not good, not just _assume_ that the one in /usr/lib is bad and
> the one in ${LOCALBASE}/lib is good.

It can be ensured that the version in the ports tree is
greater or eaual the version in the base system.

> In fact, if you want to deal with users that do not track the
> base source tree, why do you assume that they he track the ports tree
> instead

1) track the ports tree is commen use.
2) base source tree is often in sync with a RELEASE.
   e.G. resulting to "5.1-RELEASE-p10"

> (risking all sorts of incompatibilities because most ports
> do not properly check versions of the installed software) ?

Please submit patches if you see room for improvent.

> I hope i made my point clear, which is, i believe the makefile does
> something unnecessary for "users not running current or stable".
> I know you have put in tweaks for those users, i find it weird
> that you consider them the "non default" case.

sorry I can't trace your logic.

- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 7 Dirk Meyer freebsd_committer freebsd_triage 2003-11-15 20:58:53 UTC
State Changed
From-To: feedback->closed

feedback timeout