Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2014 17:01:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 195856] New: bsd.database.mk DEFAULT_MYSQL_VER being clobbered...
Message-ID:  <bug-195856-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195856

            Bug ID: 195856
           Summary: bsd.database.mk DEFAULT_MYSQL_VER being clobbered...
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Infrastructure
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: sean@chittenden.org

Created attachment 150434
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150434&action=edit
bsd.database.mk patch against r374417

When building ports via poudriere, it's possible to specify default versions of
MySQL (or PostgreSQL), however when including default values, we see runtime
dependencies still linking against the system default.  For example, if we
specify 5.6, we have a runtime dependency on MySQL 5.5.

DEFAULT_VERSIONS=       pgsql=9.4 mysql=56p

This happens because _MYSQL_VER is overridden unconditionally based on the
version information found in `${LOCALBASE}/bin/mysql --version`.  Because we
run with an internally modified version of MySQL, we have two options:

1) Patch the MySQL version string
2) Teach ports to honor the default version when specified

We think option #2 is the more correct approach.  The attached patch fixes our
package environment so that runtime dependencies are correct.

```
Index: Mk/bsd.database.mk
===================================================================
--- Mk/bsd.database.mk    (revision 374417)
+++ Mk/bsd.database.mk    (working copy)
@@ -116,6 +116,7 @@
 MYSQL100m_LIBVER=    18

 # Setting/finding MySQL version we want.
+.if !defined(DEFAULT_MYSQL_VER)
 .if exists(${LOCALBASE}/bin/mysql)
 _MYSQL!=    ${LOCALBASE}/bin/mysql --version | ${SED} -e 's/.*Distrib
\([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/'
 _PERCONA!=    ${LOCALBASE}/bin/mysql --version | ${GREP} Percona | wc -l
@@ -129,6 +130,7 @@
 _MYSQL_VER=    ${_MYSQL}
 .endif
 .endif
+.endif

 .if defined(WANT_MYSQL_VER)
 .if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${WANT_MYSQL_VER}
```

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195856-13>