Bug 86517 - mail/courier: Port Update of Courier 0.52.0
Summary: mail/courier: Port Update of Courier 0.52.0
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: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-24 03:20 UTC by Martin Piayda
Modified: 2005-10-13 11:20 UTC (History)
0 users

See Also:


Attachments
courierport (80.54 KB, text/plain)
2005-09-24 03:20 UTC, Martin Piayda
no flags Details
courier.patch (1.91 KB, patch)
2005-10-05 21:43 UTC, Pav Lucistnik
no flags Details | Diff
courier.patch (14.41 KB, patch)
2005-10-11 07:24 UTC, Yarema
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Piayda 2005-09-24 03:20:18 UTC
I have modified the current Makefile of courier 
to install courier 0.52.0 and to reflect a  
possible prefixed installation. The current ebuild
does not install prefixed and fails when compiling
the imap-functions using the courier-auth headers.

I have tested my Makefile with and without an explicit
PREFIX tag, so I can say it works.

How-To-Repeat: 	always
Comment 1 Simon L. B. Nielsen freebsd_committer 2005-09-24 09:15:17 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-ports-bugs

Misfiled ports PR.
Comment 2 ports-bugs 2005-09-24 16:21:08 UTC
This patch would be easier revieved as diff, which would be

diff -urN /usr/ports/mail/courier/Makefile courier/Makefile
--- /usr/ports/mail/courier/Makefile    Sun Jul 17 00:52:34 2005
+++ courier/Makefile    Sat Sep 24 16:51:51 2005
@@ -6,7 +6,7 @@
 #

 PORTNAME=      courier
-PORTVERSION=   0.50.1
+PORTVERSION=   0.52.0
 CATEGORIES=    mail ipv6
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    courier
@@ -73,8 +73,8 @@
 USE_RC_SUBR=   courier.sh
 .endif

-CPPFLAGS+=     -I${LOCALBASE}/include
-LDFLAGS+=      -L${LOCALBASE}/lib
+CPPFLAGS+=     -I${LOCALBASE}/include -I${PREFIX}/include
+LDFLAGS+=      -L${LOCALBASE}/lib -L${PREFIX}/include
 CONFIGURE_ENV= REHASH=${SCRIPTDIR}/c_rehash \
                CPPFLAGS='${CPPFLAGS}' \
                LDFLAGS='${LDFLAGS}'
diff -urN /usr/ports/mail/courier/distinfo courier/distinfo
--- /usr/ports/mail/courier/distinfo    Sun Jul 17 00:52:34 2005
+++ courier/distinfo    Sat Sep 24 16:51:51 2005
@@ -1,2 +1,2 @@
-MD5 (courier-0.50.1.tar.bz2) = 6fb2b188bba8fbf244f2feb80ad99a70
-SIZE (courier-0.50.1.tar.bz2) = 5913551
+MD5 (courier-0.52.0.tar.bz2) = 6046be4fb3392bd0f9da3a71628a14ef
+SIZE (courier-0.52.0.tar.bz2) = 6600449

(unnecessary problem/repo file removed from diff). New courier introduces new 
dependency however, missing here - devel/pcre. I did not test the PREFIX 
part, yet, so without this, my patch for 0.52.0 would be

diff -urN /usr/ports/mail/courier/Makefile courier-0.52.0/Makefile
--- /usr/ports/mail/courier/Makefile    Sun Jul 17 00:52:34 2005
+++ courier-0.52.0/Makefile     Sat Sep 17 17:18:05 2005
@@ -6,7 +6,7 @@
 #

 PORTNAME=      courier
-PORTVERSION=   0.50.1
+PORTVERSION=   0.52.0
 CATEGORIES=    mail ipv6
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    courier
@@ -15,7 +15,8 @@
 COMMENT=       Courier SMTP IMAP POP3 HTTP mail server suite

 BUILD_DEPENDS= courierauthconfig:${PORTSDIR}/security/courier-authlib-base
-LIB_DEPENDS=   fam.0:${PORTSDIR}/devel/fam
+LIB_DEPENDS=   fam.0:${PORTSDIR}/devel/fam \
+               pcre:${PORTSDIR}/devel/pcre
 RUN_DEPENDS=   courierauthconfig:${PORTSDIR}/security/courier-authlib-base \
                ${LOCALBASE}/share/sysconftool/sysconftool:
${PORTSDIR}/devel/sysconftool \
                ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support \
diff -urN /usr/ports/mail/courier/distinfo courier-0.52.0/distinfo
--- /usr/ports/mail/courier/distinfo    Sun Jul 17 00:52:34 2005
+++ courier-0.52.0/distinfo     Sat Sep 17 16:13:06 2005
@@ -1,2 +1,2 @@
-MD5 (courier-0.50.1.tar.bz2) = 6fb2b188bba8fbf244f2feb80ad99a70
-SIZE (courier-0.50.1.tar.bz2) = 5913551
+MD5 (courier-0.52.0.tar.bz2) = 6046be4fb3392bd0f9da3a71628a14ef
+SIZE (courier-0.52.0.tar.bz2) = 6600449

As there is already bug fix release 0.52.1, I would suggest

diff -urN /usr/ports/mail/courier/Makefile courier-0.52.1/Makefile
--- /usr/ports/mail/courier/Makefile    Sun Jul 17 00:52:34 2005
+++ courier-0.52.1/Makefile     Sat Sep 24 08:43:50 2005
@@ -6,7 +6,7 @@
 #

 PORTNAME=      courier
-PORTVERSION=   0.50.1
+PORTVERSION=   0.52.1
 CATEGORIES=    mail ipv6
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    courier
@@ -15,7 +15,8 @@
 COMMENT=       Courier SMTP IMAP POP3 HTTP mail server suite

 BUILD_DEPENDS= courierauthconfig:${PORTSDIR}/security/courier-authlib-base
-LIB_DEPENDS=   fam.0:${PORTSDIR}/devel/fam
+LIB_DEPENDS=   fam.0:${PORTSDIR}/devel/fam \
+               pcre:${PORTSDIR}/devel/pcre
 RUN_DEPENDS=   courierauthconfig:${PORTSDIR}/security/courier-authlib-base \
                ${LOCALBASE}/share/sysconftool/sysconftool:
${PORTSDIR}/devel/sysconftool \
                ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support \
diff -urN /usr/ports/mail/courier/distinfo courier-0.52.1/distinfo
--- /usr/ports/mail/courier/distinfo    Sun Jul 17 00:52:34 2005
+++ courier-0.52.1/distinfo     Sat Sep 24 08:48:05 2005
@@ -1,2 +1,2 @@
-MD5 (courier-0.50.1.tar.bz2) = 6fb2b188bba8fbf244f2feb80ad99a70
-SIZE (courier-0.50.1.tar.bz2) = 5913551
+MD5 (courier-0.52.1.tar.bz2) = 98005b9bacd44fa9e1a2b2100907522a
+SIZE (courier-0.52.1.tar.bz2) = 6603812

(again, this is without PREFIX stuff)
Regards,
Milan
Comment 3 Martin Piayda 2005-09-24 17:51:14 UTC
Updating to 0.52.1 and tested in a prefixed environment. It builds well,
uninstalls, reinstalls ...

The md5-diff is certainly not the main thing, so I'm leaving it out
here.

Regards,
Martin Piayda


----- snip -----------

--- courier/Makefile    Sat Sep 24 18:45:16 2005
+++ Makefile    Sat Sep 24 18:45:58 2005
@@ -6,7 +6,7 @@
 #

 PORTNAME=      courier
-PORTVERSION=   0.50.1
+PORTVERSION=   0.52.1
 CATEGORIES=    mail ipv6
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    courier
@@ -17,6 +17,7 @@
 BUILD_DEPENDS= courierauthconfig:
${PORTSDIR}/security/courier-authlib-base
 LIB_DEPENDS=   fam.0:${PORTSDIR}/devel/fam
 RUN_DEPENDS=   courierauthconfig:
${PORTSDIR}/security/courier-authlib-base \
+                pcre:${PORTSDIR}/devel/pcre \
                ${LOCALBASE}/share/sysconftool/sysconftool:
${PORTSDIR}/devel/sysconftool \
                ${LOCALBASE}/etc/mime.types:
${PORTSDIR}/misc/mime-support \
                ${SITE_PERL}/Net/CIDR.pm:
${PORTSDIR}/net-mgmt/p5-Net-CIDR
@@ -73,8 +74,8 @@
 USE_RC_SUBR=   courier.sh
 .endif
-CPPFLAGS+=     -I${LOCALBASE}/include
-LDFLAGS+=      -L${LOCALBASE}/lib
+CPPFLAGS+=     -I${LOCALBASE}/include -I${PREFIX}/include
+LDFLAGS+=      -L${LOCALBASE}/lib -L${PREFIX}/include
 CONFIGURE_ENV= REHASH=${SCRIPTDIR}/c_rehash \
                CPPFLAGS='${CPPFLAGS}' \
                LDFLAGS='${LDFLAGS}'

---- snip --------
Comment 4 Martin Piayda 2005-09-25 20:47:34 UTC
Ok, here's a corrected version, as I found, that most users won't have
courierauthconfig not in path.

Therefore I'm passing it when configuring the package.
The parameter is COURIERAUTHCONFIG and is assembled by the installation
prefix and the relative path to courierauthconfig.
This one, again, is tested. :-)

------- snip --------

--- courier/Makefile    Sat Sep 24 18:45:16 2005
+++ Makefile    Sun Sep 25 21:24:24 2005
@@ -6,7 +6,7 @@
 #

 PORTNAME=      courier
-PORTVERSION=   0.50.1
+PORTVERSION=   0.52.1
 CATEGORIES=    mail ipv6
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    courier
@@ -17,10 +17,12 @@
 BUILD_DEPENDS= courierauthconfig:
${PORTSDIR}/security/courier-authlib-base
 LIB_DEPENDS=   fam.0:${PORTSDIR}/devel/fam
 RUN_DEPENDS=   courierauthconfig:
${PORTSDIR}/security/courier-authlib-base \
+                pcre:${PORTSDIR}/devel/pcre \
                ${LOCALBASE}/share/sysconftool/sysconftool:
${PORTSDIR}/devel/sysconftool \
                ${LOCALBASE}/etc/mime.types:
${PORTSDIR}/misc/mime-support \
                ${SITE_PERL}/Net/CIDR.pm:
${PORTSDIR}/net-mgmt/p5-Net-CIDR

+
 CONFLICTS=     exim-4.* courier-imap-2.* maildrop-1.* \
                postfix-1.* postfix-2.* \
                qmail-1.* qmail-*-1.* \
@@ -73,8 +75,8 @@
 USE_RC_SUBR=   courier.sh
 .endif

-CPPFLAGS+=     -I${LOCALBASE}/include
-LDFLAGS+=      -L${LOCALBASE}/lib
+CPPFLAGS+=     -I${LOCALBASE}/include -I${PREFIX}/include
+LDFLAGS+=      -L${LOCALBASE}/lib -L${PREFIX}/lib
 CONFIGURE_ENV= REHASH=${SCRIPTDIR}/c_rehash \
                CPPFLAGS='${CPPFLAGS}' \
                LDFLAGS='${LDFLAGS}'
@@ -105,7 +107,8 @@
                --with-default-maildrop=${MAILDROPDEFAULT} \
                --with-paranoid-smtpext \
                --enable-workarounds-for-imap-client-bugs \
-               --cache-file=${WRKDIR}/courier.cache
+               --cache-file=${WRKDIR}/courier.cache \
+               COURIERAUTHCONFIG=${PREFIX}/bin/courierauthconfig

 INSTALL_TARGET=        install-strip install-perms

------- snip --------
Comment 5 Pav Lucistnik freebsd_committer 2005-10-02 21:07:35 UTC
State Changed
From-To: open->feedback

The last patch is corrupted (line wrappings), can you resend it properly? 


Comment 6 Pav Lucistnik freebsd_committer 2005-10-02 21:07:35 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Track
Comment 7 Pav Lucistnik freebsd_committer 2005-10-05 21:43:40 UTC
Dear maintainer of FreeBSD port mail/courier, do you approve attached
patch with update to 0.52.1?


-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>
Comment 8 Yarema 2005-10-11 07:24:30 UTC
--On Wednesday, October 05, 2005 22:43:40 +0200 Pav Lucistnik 
<pav@FreeBSD.org> wrote:

> Dear maintainer of FreeBSD port mail/courier, do you approve attached
> patch with update to 0.52.1?
>
> --
> Pav Lucistnik <pav@oook.cz>
>               <pav@FreeBSD.org>

Pav,

I do not approve the patch.  I'm not sure what Martin Piayda 
<martin.piayda@udo.edu>, the originator of PR ports/86517, was trying to 
accomplish, but I don't believe that is correct usage of ${PREFIX}.  I am 
open to discuss what it is he was attempting.

Martin,

I think what you need to do is assign/override ${LOCALBASE} instead of 
${PREFIX} to get the desired effect without any special patching to this or 
any other ports with which you attempt "a
possible prefixed installation".  The interaction between ${LOCALBASE} || 
${X11BASE} || ${LINUXBASE} and ${PREFIX} is quite subtle.  However it is 
the ${*BASE} variables which are meant to be overridden by users, not 
${PREFIX}.  ${PREFIX} is to be overridden by portmaintainer only and 
usually for ports which do not attempt to follow hier(7) otherwise we have 
handy shortcuts like USE_X_PREFIX or USE_LINUX_PREFIX or even KDE_PREFIX 
etc. etc.  Some ports may install and work with user assigned ${PREFIX}. 
But ALL properly written ports should work with user assigned ${LOCALBASE} 
or ${X11BASE} or ${LINUXBASE}.

As an asside the proper place for setting:
CONFIGURE_ARGS+=COURIERAUTHCONFIG=${PREFIX}/bin/courierauthconfig
would be:
CONFIGURE_ENV+=COURIERAUTHCONFIG=${LOCALBASE}/bin/courierauthconfig
but it should not be necessary if ${LOCALBASE}/bin is in the ${PATH} which 
it should be. If ${PATH} is not set to include ${LOCALBASE}/bin then:
RUN_DEPENDS=courierauthconfig:${PORTSDIR}/security/courier-authlib-base
will also fail.  So I am not including the COURIERAUTHCONFIG setting in my 
patch below.

In any case attached is my update of mail/courier to 0.52.1 sans the 
${PREFIX} bits explained above.  pkg-plist needed to be updated to account 
for:

2005-08-13  Mr. Sam  <mrsam@courier-mta.com>
	* rootcerts/certs.sh: Updated list of trusted root certs.

in the ChangeLog.

Thanks to all who contributed to this update.  And my apologies for being 
so pedantic in my explanations.  I figure if I do not agree with a 
contributed patch I at least owe a decent attempt at explaining myself..

-- 
Yarema
http://yds.CoolRat.org
Comment 9 Martin Piayda 2005-10-11 08:36:09 UTC
On Di, 2005-10-11 at 02:24 -0400, Yarema wrote:

> I do not approve the patch.  I'm not sure what Martin Piayda 
> <martin.piayda@udo.edu>, the originator of PR ports/86517, was trying to 
> accomplish, but I don't believe that is correct usage of ${PREFIX}.  I am 
> open to discuss what it is he was attempting.
> 
> Martin,
> 
> I think what you need to do is assign/override ${LOCALBASE} instead of 
> ${PREFIX} to get the desired effect without any special patching to this or 
> any other ports with which you attempt "a
> possible prefixed installation".  The interaction between ${LOCALBASE} || 
> ${X11BASE} || ${LINUXBASE} and ${PREFIX} is quite subtle.  However it is 
> the ${*BASE} variables which are meant to be overridden by users, not 
> ${PREFIX}.  ${PREFIX} is to be overridden by portmaintainer only and 
> usually for ports which do not attempt to follow hier(7) otherwise we have 
> handy shortcuts like USE_X_PREFIX or USE_LINUX_PREFIX or even KDE_PREFIX 
> etc. etc.  Some ports may install and work with user assigned ${PREFIX}. 
> But ALL properly written ports should work with user assigned ${LOCALBASE} 
> or ${X11BASE} or ${LINUXBASE}.

Hi,

I'll keep my comment short.
Using LOCALBASE results in a redundant installation of the necessary
dependencies into the PREFIXed path altough they might already be
installed. I see no reason for duplicate packages on the target system,
so I used PREFIX which did what I was looking for. That's it.

Regards,
Martin
Comment 10 Yarema 2005-10-11 09:04:11 UTC
--On Tuesday, October 11, 2005 09:36:09 +0200 Martin Piayda 
<martin.piayda@udo.edu> wrote:

> On Di, 2005-10-11 at 02:24 -0400, Yarema wrote:
>
>> Martin,
>>
>> I think what you need to do is assign/override ${LOCALBASE} instead of
>> ${PREFIX} to get the desired effect without any special patching to this
>> or  any other ports with which you attempt "a
>> possible prefixed installation".  The interaction between ${LOCALBASE}
>> ||  ${X11BASE} || ${LINUXBASE} and ${PREFIX} is quite subtle.  However
>> it is  the ${*BASE} variables which are meant to be overridden by users,
>> not  ${PREFIX}.  ${PREFIX} is to be overridden by portmaintainer only
>> and  usually for ports which do not attempt to follow hier(7) otherwise
>> we have  handy shortcuts like USE_X_PREFIX or USE_LINUX_PREFIX or even
>> KDE_PREFIX  etc. etc.  Some ports may install and work with user
>> assigned ${PREFIX}.  But ALL properly written ports should work with
>> user assigned ${LOCALBASE}  or ${X11BASE} or ${LINUXBASE}.
>
> Hi,
>
> I'll keep my comment short.
> Using LOCALBASE results in a redundant installation of the necessary
> dependencies into the PREFIXed path altough they might already be
> installed. I see no reason for duplicate packages on the target system,
> so I used PREFIX which did what I was looking for. That's it.

Martin,

Still, I don't think ${PREFIX} is meant to work the way you are trying to 
use it.  Try setting your overrides in Makefile.local or create a 
Makefile.diff which you can apply to the port to do what you want.  I use 
both of these methods for many ports I install where I feel like tweaking 
the port install to suit my needs.  In most cases it's not general enough 
to submit as a patch to the port maintainer.  In your case, I think I 
understand what you're trying to do, but I do not believe ${PREFIX} was 
meant to be used that way.  As for overridding ${LOCALBASE} -- that's meant 
to be done in /etc/make.conf where you could set it to something like 
/opt/local .. adjust your path accordingly and have all you ports and 
dependencies live there.  It isn't just mail/courier which doesn't 
accommodate what you're attempting.. most ports with any sort of 
interdependencies will break the exact same way.

Out of curiosity, what is it that you're trying to do?

Regards,
-- 
Yarema
http://yds.CoolRat.org
Comment 11 Martin Piayda 2005-10-11 09:20:37 UTC
On Di, 2005-10-11 at 04:04 -0400, Yarema wrote:
> --On Tuesday, October 11, 2005 09:36:09 +0200 Martin Piayda 
> <martin.piayda@udo.edu> wrote:
> 
> > On Di, 2005-10-11 at 02:24 -0400, Yarema wrote:

> Martin,
> 
> Still, I don't think ${PREFIX} is meant to work the way you are trying to 
> use it.  Try setting your overrides in Makefile.local or create a 
> Makefile.diff which you can apply to the port to do what you want.  I use 
> both of these methods for many ports I install where I feel like tweaking 
> the port install to suit my needs.  In most cases it's not general enough 
> to submit as a patch to the port maintainer.  In your case, I think I 
> understand what you're trying to do, but I do not believe ${PREFIX} was 
> meant to be used that way.  As for overridding ${LOCALBASE} -- that's meant 
> to be done in /etc/make.conf where you could set it to something like 
> /opt/local .. adjust your path accordingly and have all you ports and 
> dependencies live there.  It isn't just mail/courier which doesn't 
> accommodate what you're attempting.. most ports with any sort of 
> interdependencies will break the exact same way.
> 
> Out of curiosity, what is it that you're trying to do?

What you're trying to suggest is to keep a local repository for
Makefiles in order to make them PREFIXable. This is not what I've read
in the manual of the Freebsd's ports! Ports shall be installable via the
``make PREFIX=$CUSTOMPATH'' command either in the LOCALBASE defined by
make.conf or by an explicit PREFIX, which most certainly overrides
LOCALBASE. Setting LOCALBASE in make.conf will result in a global target
for ports and in a way to install ports, that cannot be dynamically
installed into custom paths, just like /usr/local/bla/blub/myport. This
works with most ports, but not with courier. This is not about tweaking
but about making the port be installed quite flexible into either the
path defined in make.conf and into a path defined at the commandlike
given to the Makefile itself. That's it and I tested this way and it
works.
Nothing will break, nor will nothing lose it's functionality. I don't
understand your point here, sorry.
Comment 12 ports-bugs 2005-10-11 09:30:18 UTC
On Tuesday 11 October 2005 08:24, Yarema wrote:
> --On Wednesday, October 05, 2005 22:43:40 +0200 Pav Lucistnik
>
> <pav@FreeBSD.org> wrote:
> > Dear maintainer of FreeBSD port mail/courier, do you approve attached
> > patch with update to 0.52.1?
> >
> > --
> > Pav Lucistnik <pav@oook.cz>
> >               <pav@FreeBSD.org>
>
> Pav,
>
> I do not approve the patch.  I'm not sure what Martin Piayda
> <martin.piayda@udo.edu>, the originator of PR ports/86517, was trying to
> accomplish, but I don't believe that is correct usage of ${PREFIX}.  I am
> open to discuss what it is he was attempting.
>

Patch applied, build succesfull. Looks like running too.
Milan
Comment 13 Pav Lucistnik freebsd_committer 2005-10-11 10:05:16 UTC
State Changed
From-To: feedback->closed

Maintainer's version of patch committed.