mail/courier build failures on newer FreeBSD versions

Scot Hetzel swhetzel at gmail.com
Mon May 26 15:30:58 UTC 2014


On Mon, May 26, 2014 at 3:05 AM, Milan Obuch <freebsd-ports at dino.sk> wrote:
> On Mon, 26 May 2014 02:45:45 -0500
> Scot Hetzel <swhetzel at gmail.com> wrote:
>
>>  On Mon, May 26, 2014 at 12:04 AM, Milan Obuch
>> <freebsd-ports at dino.sk> wrote:
>> > On Mon, 26 May 2014 03:29:55 +0200
>> > Matthias Andree <matthias.andree at gmx.de> wrote:
>
> [ snip ]
>
>> > OK, I already began work on staging, this was just a small side step
>> > fixing another issue, in my eyes easily acceptable, but when it
>> > needs now be done in other order, fine.
>> >
>> >> Milan, if you could share some of the troubles you're encountering,
>> >> people may be able to help you.
>> >>
>> >
>> > Well, I did 'make check-plist', here is part of its output:
>> >
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/%%MAILOWN%%d
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/esmtpd
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/esmtpd-msa
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/esmtpd-ssl
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/imapd
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/imapd-ssl
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/ldapaddressbook
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/%%CACHEOWN%%3d
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/%%CACHEOWN%%3d-ssl
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/sqwebmaild
>> > Error: Orphaned: %%ETCDIR%%/%%MAILOWN%%/webmlmrc
>> >
>> > It does not take much time to revert, for me, at least in this case,
>> > unnecessary substitution, some times a bit comic, to
>> >
>> > Error: Orphaned: etc/courier/courierd
>> > Error: Orphaned: etc/courier/esmtpd
>> > Error: Orphaned: etc/courier/esmtpd-msa
>> > Error: Orphaned: etc/courier/esmtpd-ssl
>> > Error: Orphaned: etc/courier/imapd
>> > Error: Orphaned: etc/courier/imapd-ssl
>> > Error: Orphaned: etc/courier/ldapaddressbook
>> > Error: Orphaned: etc/courier/pop3d
>> > Error: Orphaned: etc/courier/pop3d-ssl
>> > Error: Orphaned: etc/courier/sqwebmaild
>> > Error: Orphaned: etc/courier/webmlmrc
>> >
>> I looked at the ports Makefile, but didn't see how these files are
>> installed.  Are they being installed by the Courier's source
>> Makefile's?  If they are, you just need to stop it from creating them,
>> as they will be created when pkg installs the port.
>>
>
> They are comming from pkg-plist, see below...
>
When these files are installed into the STAGEDIR, the @exec lines in
the pkg-plist are not executed.  They are only executed when pkg
installs the freshly created courier-0.65.3 package.

I noticed that the post-install target has:

316 @${GREP} '^@exec ' ${TMPPLIST} \
317 | ${SED} -e 's:^@exec ::' -e 's:%D:${PREFIX}:g' \
318 > ${WRKDIR}/.PLIST.exec \
319 && ${SH} ${WRKDIR}/.PLIST.exec

This looks like it might cause the issue, especially if you had changed it to:

316 @${GREP} '^@exec ' ${TMPPLIST} \
317 | ${SED} -e 's:^@exec ::' -e 's:%D:${STAGEDIR}${PREFIX}:g' \
318 > ${WRKDIR}/.PLIST.exec \
319 && ${SH} ${WRKDIR}/.PLIST.exec

You should be able to remove this from the ports Makefile, as pkg will
run the @exec lines when the package is installed.

>> > All these files are configuration files and all are handled this
>> > way:
>> >
>> > @unexec cmp -s %D/etc/courier/courierd %D/etc/courier/courierd.dist
>> > && rm -f %D/etc/courier/courierd 2>/dev/null || true
>> > etc/courier/courierd.dist
>> > @exec [ -f %D/etc/courier/courierd.dist ] &&
>> > %%LOCALBASE%%/share/sysconftool/sysconftool
>> > %D/etc/courier/courierd.dist
>> >
>> > which does create them if they do not exist copying <file>.dist as
>> > template on install and if they are still the same on unistall, they
>> > are deleted. This way user configuration does not get lost across
>> > upgrades, and sysconftool merges new configuration items when they
>> > are introduced.
>> >
>> > This behavior is broken when I add these files into pkg-plist, they
>> > are simply deleted on uninstall and user-made changes in
>> > configuration is lost. How should this issue be solved? I think
>> > there should be a method to tell 'this file should be specially
>> > handled, ignore it, it is not an orphan' for make check-plist...
>> >
>>
>> The new way to specify sample configuration files is to use the
>> @sample keyword in the pkg-plist:
>>
>> @sample etc/courier/courierd.sample
>> @sample etc/courier/esmtpd.sample
>> @sample etc/courier/esmtpd-msa.sample
>> @sample etc/courier/esmtpd-ssl.sample
>> @sample etc/courier/imapd.sample
>> @sample etc/courier/imapd-ssl.sample
>> @sample etc/courier/ldapaddressbook.sample
>> @sample etc/courier/pop3d.sample
>> @sample etc/courier/pop3d-ssl.sample
>> @sample etc/courier/sqwebmaild.sample
>> @sample etc/courier/webmlmrc.sample
>>
>> Note: you would have to change the port to install the files with a
>> .sample suffix, instead of a .dist suffix.
>>
>
> Where can I find this docummented? I read in some mailing list post
> about @sample, found this in Porter's handbook,
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-config.html
> but I would like to see what it actually does... I will try, but
> nevertheless, better description would be thanked for...
>

I had found the info on @sample here:

http://www.freebsd.org/doc/en/books/porters-handbook/plist-keywords.html#plist-keywords-your-own

It is implemented in ${PORTSDIR}/Keywords.

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.


More information about the freebsd-ports mailing list