mutt vs db44 // Bug in /usr/ports/Mk/bsd.database.mk ?

Raphael Eiselstein rabe at uugrn.org
Fri Feb 8 22:01:21 UTC 2013


Hi again,

quick-fix / works for me (line breaks!)
----------------------------------------------------------
[root at fbsd9 ~]# diff -u /usr/ports/mail/mutt/Makefile.orig
/usr/ports/mail/mutt/Makefile 
--- /usr/ports/mail/mutt/Makefile.orig  2013-02-08 22:33:28.650075250
+0100
+++ /usr/ports/mail/mutt/Makefile       2013-02-08 22:33:39.249797810
+0100
@@ -527,7 +527,7 @@
 CONFIGURE_ARGS+=       --enable-hcache --without-gdbm --without-bdb
--with-tokyocabinet
 LIB_DEPENDS+=
tokyocabinet.9:${PORTSDIR}/databases/tokyocabinet
 .else
-USE_BDB=               42+
+USE_BDB=               44
 CONFIGURE_ARGS+=       --enable-hcache --without-gdbm --with-bdb
 .endif
 .else
----------------------------------------------------------

will result in 
----------------------------------------------------------
[root at fbsd9 ~]# pkg_info -Rr /usr/ports/packages/All/mutt-1.5.21_1.tbz 
Information for /usr/ports/packages/All/mutt-1.5.21_1.tbz:

Depends on:
Dependency: ispell-3.3.02_5
Dependency: openssl-1.0.1_6
Dependency: mime-support-3.52.2
Dependency: pkgconf-0.8.9
Dependency: sqlite3-3.7.14.1
Dependency: mysql-client-5.5.30
Dependency: db44-4.4.20.4
Dependency: db41-4.1.25_4
Dependency: cyrus-sasl-2.1.26_2
Dependency: libiconv-1.14
Dependency: gettext-0.18.1.1
Dependency: libidn-1.26
----------------------------------------------------------

--> works for me.

On Fri, Feb 08, 2013 at 09:15:03PM +0100, Raphael Eiselstein wrote:
> Depends on:
> Dependency: db42-4.2.52_5         ***
> Dependency: db41-4.1.25_4         ***

> ***     libdb-4.4.so.0 => /usr/local/lib/libdb-4.4.so.0 (0x801ccc000) ***

I took a look on /usr/ports/Mk/bsd.database.mk

##
# USE_BDB               - Add Berkeley DB library dependency.
#                                 If no version is given (by the
#                                 maintainer via the port or
#                                 by the user via defined variable), try
#                                 to find the
#                                 currently installed version.  Fall
#                                 back to default if
#                                 necessary (db41+).

[…]
# For specifying [40, 41, ..]+
_DB_40P=        40 ${_DB_41P}
_DB_41P=        41 ${_DB_42P}
_DB_42P=        42 ${_DB_43P}
_DB_43P=        43 ${_DB_44P}
_DB_44P=        44 ${_DB_46P}
[…]

It seems when USE_BDB=42+ it will probe for 43 but I only have 44
installed here. So USE_BDB=42+ results in 42. 

Setting USE_BDB=44 in the Makefile results in a dependency on 44 which
is similar to the auto-detection of mutt's autoconf and therefore will
result in a correct dependency, as shown in my QA now:
----------------------------------------------------------------------
[root at top3 /jails/shared/qa]# zfs rollback zroot/jails/shared/qa at 20130208_tiny_init
[root at top3 /jails/shared/qa]# jexec 29 su -
root at qa:/root # pkg_info
pkg_info: no packages installed
root at qa:/root # pkg_add /usr/ports/packages/All/mutt-1.5.21_1.tbz 


Copy /usr/local/openssl/openssl.cnf.sample to
/usr/local/openssl/openssl.cnf
and edit it to fit your needs.


*** Added group `cyrus' (id 60)
*** Added user `cyrus' (id 60)


You can use sasldb2 for authentication, to add users use:

        saslpasswd2 -c username

If you want to enable SMTP AUTH with the system Sendmail, read
Sendmail.README

NOTE: This port has been compiled with a default pwcheck_method of
      auxprop.  If you want to authenticate your user by /etc/passwd,
      PAM or LDAP, install ports/security/cyrus-sasl2-saslauthd and
      set sasl_pwcheck_method to saslauthd after installing the
      Cyrus-IMAPd 2.X port.  You should also check the
      /usr/local/lib/sasl2/*.conf files for the correct
      pwcheck_method.


root at qa:/root # ldd /usr/local/bin/mutt
mutt*         mutt_dotlock* muttbug*      
root at qa:/root # ldd /usr/local/bin/mutt
/usr/local/bin/mutt:
        libncursesw.so.8 => /lib/libncursesw.so.8 (0x8008cf000)
        libssl.so.8 => /usr/local/lib/libssl.so.8 (0x800b2a000)
        libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x800d90000)
        libz.so.6 => /lib/libz.so.6 (0x801165000)
        libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x801379000)
        libintl.so.9 => /usr/local/lib/libintl.so.9 (0x801594000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x80179e000)
        libidn.so.17 => /usr/local/lib/libidn.so.17 (0x801a9a000)
        libdb-4.4.so.0 => /usr/local/lib/libdb-4.4.so.0 (0x801ccc000)
        libc.so.7 => /lib/libc.so.7 (0x801fd5000)
        libthr.so.3 => /lib/libthr.so.3 (0x802328000)
----------------------------------------------------------------------

So my workaround works here but I strongly suspect a logical bug in 
/usr/ports/Mk/bsd.database.mk: if db41, db42 and db44 exists and a port
specifies USE_BDB=42+ then it will check for db43 and then will fall
back to db42 which is not incorrect.

But autoconf will detect db44 and will link mutt against db44, but our
port will record a dependency on db42.

Someone who really knows about /usr/ports/Mk/bsd.database.mk should
review this before submitting a PR/bug report. 

Regards
Raphael

-- 
Raphael Eiselstein <rabe at uugrn.org>               http://rabe.uugrn.org/
xmpp:freibyter at gmx.de  | https://www.xing.com/profile/Raphael_Eiselstein   
GnuPG:                E7B2 1D66 3AF2 EDC7 9828  6D7A 9CDA 3E7B 10CA 9F2D
.........|.........|.........|.........|.........|.........|.........|..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130208/c5fc5d70/attachment.sig>


More information about the freebsd-ports mailing list