Bug 179719 - mail/exim port ignores WITH_MYSQL_VER
Summary: mail/exim port ignores WITH_MYSQL_VER
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: Eygene Ryabinkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 14:40 UTC by Arnaud Houdelette
Modified: 2013-06-23 07:52 UTC (History)
0 users

See Also:


Attachments
file.diff (459 bytes, patch)
2013-06-19 14:40 UTC, Arnaud Houdelette
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud Houdelette 2013-06-19 14:40:00 UTC
When building mail/exim port with MYSQL support enabled in poudriere (or without mysql-client preinstalled), port system tries to install mysql-client.

With current port makefile, the default version is installed instead of one defined in WITH_MYSQL_VER.

I try to build with WITH_MYSQL_VER=55m (mariadb)

Fix: The following patch works for me, and should correct the problem for all :
How-To-Repeat: define WITH_MYSQL_VER=55m in make.conf 
build mail/exim port
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-06-19 14:40:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rea

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Eygene Ryabinkin freebsd_committer freebsd_triage 2013-06-20 19:51:53 UTC
The provided patch will make the port to be non-functional when
WITH_MYSQL_VER isn't defined: you can't test ${V} == "value" when
V is not set.

Please, try the patch from
  http://codelabs.ru/fbsd/ports/exim/4.80.1-fix-WITH_MYSQL_VER.diff
it removes the obsolete logics for setting WANT_MYSQL_VER: currently
bsd.database.mk will do the same thing when only WITH_MYSQL_VER is
set by user; usage of "auto" is dropped, because it is equal to
not using WITH_MYSQL_VER at all.

Thanks for catching this problem!
-- 
Eygene Ryabinkin                                        ,,,^..^,,,
[ Life's unfair - but root password helps!           | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
Comment 3 Eygene Ryabinkin freebsd_committer freebsd_triage 2013-06-20 19:52:36 UTC
State Changed
From-To: open->feedback

Working on fixing the found issue; need some external testing.
Comment 4 Arnaud Houdelette 2013-06-22 00:01:47 UTC
Your patch works ok for me.

But if I understand the patch correctly : if WITH_MYSQL_VER is set to 
some deprectated "auto" value, the port wont be built with mysql support ?
Is this what we want ?


Le 20/06/2013 20:51, Eygene Ryabinkin a écrit :
> The provided patch will make the port to be non-functional when
> WITH_MYSQL_VER isn't defined: you can't test ${V} == "value" when
> V is not set.
>
> Please, try the patch from
>    http://codelabs.ru/fbsd/ports/exim/4.80.1-fix-WITH_MYSQL_VER.diff
> it removes the obsolete logics for setting WANT_MYSQL_VER: currently
> bsd.database.mk will do the same thing when only WITH_MYSQL_VER is
> set by user; usage of "auto" is dropped, because it is equal to
> not using WITH_MYSQL_VER at all.
>
> Thanks for catching this problem!
Comment 5 Eygene Ryabinkin freebsd_committer freebsd_triage 2013-06-22 07:06:25 UTC
Arnaud, good day.

Sat, Jun 22, 2013 at 01:01:47AM +0200, Arnaud Houdelette wrote:
> Your patch works ok for me.


Good, thanks for testing.

> But if I understand the patch correctly : if WITH_MYSQL_VER is set
> to some deprectated "auto" value, the port wont be built with mysql
> support?  Is this what we want?


Yes.  Setting WITH_MYSQL_VER to "auto" seem to be some old way to
do things.  It appeared in
  http://svnweb.freebsd.org/ports/head/mail/exim/Makefile?revision=113825&view=markup
and are annotated in commit log as "WITH_OPENLDAP_VER and
WITH_MYSQL_VER does no longer imply the corresponding WITH_ variable".
I presume that the last "WITH_" is really "WANT_".  Currently the logics
of bsd.database.mk is that if we have WANT_MYSQL_VER, then it is used,
if not, but we have WITH_MYSQL_VER -- it is used and no "auto" keyword
is supported.

So for people who are using the "auto" keyword there will be an error
that will enable them to just undefine WITH_MYSQL_VER: they will got
the currently-default MySQL version, because port defines WITH_MYSQL.

I'll do Tinderbox builds and will commit the fix after their successful
finish.

Thank you!
-- 
Eygene Ryabinkin                                        ,,,^..^,,,
[ Life's unfair - but root password helps!           | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-06-22 21:01:04 UTC
Author: rea
Date: Sat Jun 22 20:00:56 2013
New Revision: 321586
URL: http://svnweb.freebsd.org/changeset/ports/321586

Log:
  mail/exim: fix handling of WITH_MYSQL_VER
  
   - fix introduction of bogus MYSQL_VER option that appeared after
     blind conversion to OPTIONSng in r320120;
  
   - drop support for WITH_MYSQL_VER="auto": this is an obsolete setting
     that currently has the same effect as not defining WITH_MYSQL_VER
     at all;
  
   - don't set WANT_MYSQL_VER based on WITH_MYSQL_VER: setting the
     latter is enough, since we don't insist on any particular MySQL
     version.
  
  PR:		ports/179719
  QA page:	http://codelabs.ru/fbsd/ports/qa/mail/exim/4.80.1_2-p1

Modified:
  head/mail/exim/Makefile

Modified: head/mail/exim/Makefile
==============================================================================
--- head/mail/exim/Makefile	Sat Jun 22 19:59:57 2013	(r321585)
+++ head/mail/exim/Makefile	Sat Jun 22 20:00:56 2013	(r321586)
@@ -286,14 +286,13 @@ SEDLIST+=	-e 's,^(DBMLIB=),\# \1,'
 SEDLIST+=	-e 's,XX_DB_LIBS_XX,${DB_LIBS:S/,/\\,/g},' \
 		-e 's,XX_DB_INCLUDES_XX,${DB_INCLUDES:S/,/\\,/g},'
 
-.if ${PORT_OPTIONS:MMYSQL_VER} && ${WITH_MYSQL_VER:L} != "auto"
-WANT_MYSQL_VER=	${WITH_MYSQL_VER}
-.else
-.undef WITH_MYSQL_VER
-.endif
-
 .if ${PORT_OPTIONS:MMYSQL}
+.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER:L} == "auto"
+IGNORE=		WITH_MYSQL_VER set to "${WITH_MYSQL_VER}" is no longer supported.
+IGNORE+=	Just don't set WITH_MYSQL_VER if you want to use system-default version
+.else
 USE_MYSQL=	yes
+.endif
 SEDLIST+=	-e 's,XX_MYSQL_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib/mysql -lmysqlclient,' \
 		-e 's,XX_MYSQL_INCLUDE_XX,-I${LOCALBASE:S/,/\\,/g}/include/mysql,' \
 		-e 's,^\# (LOOKUP_MYSQL=),\1,'
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Eygene Ryabinkin freebsd_committer freebsd_triage 2013-06-23 07:52:20 UTC
State Changed
From-To: feedback->closed

Fix committed.  Thanks for your work!