Bug 138469

Summary: [ PATCH ] databases/mysql51-{server|client} bad dependency
Product: Ports & Packages Reporter: Dan Lukes <dan>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me CC: ale
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-MYSQL none

Description Dan Lukes 2009-09-02 04:00:17 UTC
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)

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. 

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
Comment 1 Alex Dupre freebsd_committer freebsd_triage 2009-09-04 14:47:22 UTC
State Changed
From-To: open->feedback

Even in base system it should be compiled against libncursew. 
Please propose a better patch.
Comment 2 Dan Lukes 2009-09-07 11:14:06 UTC
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
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2009-10-16 11:14:31 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer.
Comment 4 Dan Lukes 2010-09-08 06:22:40 UTC
This PR is in "waiting for feedback". But feedback has been supplied 
already - 10 months ago. Please change the state to something more 
appropriate. Thank you.

Dan
Comment 5 Alex Dupre freebsd_committer freebsd_triage 2011-02-08 10:43:36 UTC
State Changed
From-To: feedback->closed

WONTFIX: rare case and mysql5.5 will be default soon (not affected).