Skip site navigation (1)Skip section navigation (2)

ports/138469: [ PATCH ] databases/mysql51-{server|client} bad dependency

From:Dan Lukes <dan@obluda.cz>
Date:Wed, 2 Sep 2009 04:53:03 +0200 (CEST)
Subject:[ PATCH ] databases/mysql51-{server|client} bad dependency
Send-pr version:3.113

Number:138469
Category:ports
Synopsis:[ PATCH ] databases/mysql51-{server|client} bad dependency
Severity:serious
Priority:high
Responsible:ale@FreeBSD.org
State:feedback
Class:sw-bug
Arrival-Date:Wed Sep 02 03:00:17 UTC 2009
Closed-Date:
Last-Modified:Fri Oct 16 10:14:55 UTC 2009
Originator:Dan Lukes
Release:FreeBSD 7.2-STABLE i386

Organization:
Obludarium
 
Environment:
System: FreeBSD 7.2-STABLE
but exact OS version is not relevant

databases/mysql51-server/Makefile,v 1.252 2009/08/28 08:23:35
Description:
Please note - althougth such PR is dedicated to databases/mysql51-{server|client}
the MySQL 5.4 and MySQL 6.0 may be affected as well

--------- A -------------

The configure script try to detect ncurses/termcap libraries

On the virgin installation of FreeBSD the system's libncurses is used.

Unfortunatelly, when devel/ncurses present then it's
autodetected by configure. The mysql is linked against port's libncursesw
and libtinfow

Such dependency is not recorded. It cause problem when devel/ncurses
removed later or when installed elsewhere from package.

--------- B -------------
The port doesn't honor global option NOPORTDOCS

--------- C -------------
Starting from v5.1 when WITH_OPENSSL used, the port is compiled and
linked with YASSL instead of OpenSSL.
MySQL 5.9 and older is linked against OpenSSL when WITH_OPENSSL used

OpenSSL based client can't connect to YASSL based server and vice-versa

Changed behavior make problem in mixed 5.0/5.1 environment
(especially MASTER v5.0 with one or more SLAVE v5.1)
How-To-Repeat:
--------- A -------------
Install devel/ncurses
Compile & install databases/mysql51-client
Uninstall devel/ncurses

Try to run 'mysql' (missing libncursesw.so.5.7)

--------- B -------------
Compile & install with -DNOPORTDOCS

Documentation still compilled & installed

--------- C -------------
Compile databases/mysql50-server and databases/mysql51-server
Both compilation -DWITH_OPENSSL

Install MySQL 5.0 on two machines, configure MASTER-SLAVE replication
using SSL. When you have working environment upgrade the MASTER to 5.1
SLAVE can no longer connect to MASTER because YASSL/ssl and OPENSSL/ssl
are not fully interoperable
Fix:
--------- A -------------
As the system libraries are sufficient, we can skip the
auto-configure logic and force use of base-system libraries:
--with-named-curses-libs=-ltermcap
--------- B -------------
Use --without-doc when necesarry
--------- C -------------
Restore the pre-5.1 behavior, please: WITH_OPENSSL compile against
OpenSSL. Use WITH_YASSL when YASSL requested.

Download patch-MYSQL
--- databases/mysql51-server/Makefile.orig       2009-08-28 10:23:35.000000000 +0200
+++ databases/mysql51-server/Makefile    2009-09-02 04:08:56.000000000 +0200
@@ -30,6 +30,7 @@
                 --with-libwrap \
                 --with-low-memory \
                 --with-comment='FreeBSD port: ${PKGNAME}' \
+                --with-named-curses-libs=-ltermcap \
                 --enable-thread-safe-client
 .ifdef USE_MYSQL
@@ -42,7 +43,13 @@
 .if defined(WITH_XCHARSET) && ${WITH_XCHARSET} != ""
 CONFIGURE_ARGS+=--with-extra-charsets=${WITH_XCHARSET}
 .endif
+.if defined(NOPORTDOCS)
+CONFIGURE_ARGS+=--without-doc
+.endif
 .if defined(WITH_OPENSSL)
+USE_OPENSSL=    yes
+CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE}
+.elif defined(WITH_YASSL)
 CONFIGURE_ARGS+=--with-ssl=bundled
 .endif
 .if defined(WITH_FAST_MUTEXES)


Release-Note:
 
Audit-Trail:
State Changed
From-To:open->feedback
By:ale
When:Fri Sep 4 13:47:22 UTC 2009
Why:Even in base system it should be compiled against libncursew.
Please propose a better patch.

Reply via E-mail
From:Dan Lukes <dan@obluda.cz>
Date:Mon, 07 Sep 2009 12:14:06 +0200
I missed there is /lib/libncursesw.so.7 also

Unfortunately, I don't know how to affect preferences when both
/lib/libncursesw.so.7 and /usr/local/lib/libncursesw.so.5.7 exists

I can remove the detection from 'configure' replacing it with fixed
values, but it help with libtinfow only, not with libncursesw ...

Critical is linking time, not the configure time. I don't know how to
force gcc with -lncursesw to link library from specific directory only.
It's not possible to remove /usr/local/lib from -L path because we need
other libraries from them.

I'm sorry ...

Dan


Responsible Changed
From-To:freebsd-ports-bugs->ale
By:linimon
When:Fri Oct 16 10:14:31 UTC 2009
Why:Over to maintainer.

Unformatted:
 
Submit Followup | Raw PR | Find another PR