commit:     58e3ed850452e08c68d0209c0528ed49b20fe0ee
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 02:19:06 2015 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 02:19:06 2015 +0000
URL:        https://gitweb.gentoo.org/proj/mysql.git/commit/?id=58e3ed85

Initial support for libressl

Needs testing and patches to dev-db/mysql and possibly dev-db/percona-server
before committing to the main tree.

Signed-off-by: Brian Evans <grknight <AT> gentoo.org>

 dev-db/mariadb-galera/metadata.xml |  7 +++++++
 dev-db/mariadb/metadata.xml        |  7 +++++++
 dev-db/mysql-cluster/metadata.xml  |  7 +++++++
 dev-db/mysql/metadata.xml          |  7 +++++++
 dev-db/percona-server/Manifest     |  1 -
 dev-db/percona-server/metadata.xml | 10 +++++++++-
 eclass/mysql-multilib.eclass       | 27 +++++++++++++++++++--------
 7 files changed, 56 insertions(+), 10 deletions(-)

diff --git a/dev-db/mariadb-galera/metadata.xml 
b/dev-db/mariadb-galera/metadata.xml
index e0a0598..6803a9e 100644
--- a/dev-db/mariadb-galera/metadata.xml
+++ b/dev-db/mariadb-galera/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/mariadb-galera[libressl]">
+    <email>hasuf...@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. 
Do not directly assign for anything else.</description>
+  </maintainer>
 <!-- 
 Please note that this list is shared between the following packages:
 dev-db/mysql
@@ -15,8 +19,10 @@ dev-db/mariadb
   <flag name='extraengine'>Add support for alternative storage engines 
(Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for 
allocations.</flag>
   <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
+  <flag name='libressl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/libressl</pkg></flag>
   <flag name='minimal'>Install client programs only, no server</flag>
   <flag name='oqgraph'>Add support for the Open Query GRAPH engine</flag>
+  <flag name='openssl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/openssl</pkg></flag>
   <flag name='profiling'>Add support for statement profiling (requires 
USE=community).</flag>
   <flag name='server'>Build the server program</flag>
   <flag name='sst-rsync'>Add tools needed to support the rsync SST 
method</flag>
@@ -26,5 +32,6 @@ dev-db/mariadb
   <flag name='test'>Install upstream testsuites for end use.</flag>
   <flag name='tokudb'>Add support for TokuDB storage engine</flag>
   <flag name='tools'>Build the command line tools (mysql, mysqldump, 
mysqladmin, etc)</flag>
+  <flag name='yassl'>Enable SSL connections and crypto functions using the 
bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/mariadb/metadata.xml b/dev-db/mariadb/metadata.xml
index 0f1b981..2d8bff7 100644
--- a/dev-db/mariadb/metadata.xml
+++ b/dev-db/mariadb/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/mariadb[libressl]">
+    <email>hasuf...@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. 
Do not directly assign for anything else</description>
+  </maintainer>
 <!-- 
 Please note that this list is shared between the following packages:
 dev-db/mysql
@@ -21,9 +25,11 @@ dev-db/mariadb
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for 
allocations.</flag>
   <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
   <flag name='libevent'>Use libevent for connection handling</flag>
+  <flag name='libressl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/libressl</pkg></flag>
   <flag name='max-idx-128'>Raise the max index per table limit from 64 to 
128</flag>
   <flag name='minimal'>Install client programs only, no server</flag>
   <flag name='mroonga'>Add support for the Mroonga engine for interfacing with 
the Groonga text search</flag>
+  <flag name='openssl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/openssl</pkg></flag>
   <flag name='oqgraph'>Add support for the Open Query GRAPH engine</flag>
   <flag name='pam'>Enable the optional PAM authentication plugin for the 
server</flag>
   <flag name='pbxt'>Add experimental support for PBXT storage engine</flag>
@@ -36,5 +42,6 @@ dev-db/mariadb
   <flag name='tools'>Build the command line tools (mysql, mysqldump, 
mysqladmin, etc)</flag>
   <flag name='test'>Install upstream testsuites for end use.</flag>
   <flag name='tokudb'>Add support for TokuDB storage engine</flag>
+  <flag name='yassl'>Enable SSL connections and crypto functions using the 
bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/mysql-cluster/metadata.xml 
b/dev-db/mysql-cluster/metadata.xml
index 0fd723f..cb0ff88 100644
--- a/dev-db/mysql-cluster/metadata.xml
+++ b/dev-db/mysql-cluster/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/mysql-cluster[libressl]">
+    <email>hasuf...@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. 
Do not directly assign for anything else.</description>
+  </maintainer>
 <use>
   <flag name='cluster'>Add support for NDB clustering</flag>
   <flag name='community'>Enables the community features from upstream.</flag>
@@ -9,10 +13,13 @@
   <flag name='extraengine'>Add support for alternative storage engines 
(Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for 
allocations.</flag>
   <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
+  <flag name='libressl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/libressl</pkg></flag>
+  <flag name='openssl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/openssl</pkg></flag>
   <flag name='max-idx-128'>Raise the max index per table limit from 64 to 
128</flag>
   <flag name='minimal'>Install client programs only, no server</flag>
   <flag name='profiling'>Add support for statement profiling (requires 
USE=community).</flag>
   <flag name="systemtap">Build support for profiling and tracing using 
<pkg>dev-util/systemtap</pkg></flag>
   <flag name='test'>Install upstream testsuites for end use.</flag>
+  <flag name='yassl'>Enable SSL connections and crypto functions using the 
bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index 6631eee..4c89be3 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/mysql[libressl]">
+    <email>hasuf...@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. 
Do not directly assign for anything else.</description>
+  </maintainer>
 <!-- 
 Please note that this list is shared between the following packages:
 dev-db/mysql
@@ -16,6 +20,8 @@ dev-db/mariadb
   <flag name='extraengine'>Add support for alternative storage engines 
(Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for 
allocations.</flag>
   <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
+  <flag name='libressl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/libressl</pkg></flag>
+  <flag name='openssl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/openssl</pkg></flag>
   <flag name='max-idx-128'>Raise the max index per table limit from 64 to 
128</flag>
   <flag name='minimal'>Install client programs only, no server</flag>
   <flag name='pbxt'>Add experimental support for PBXT storage engine</flag>
@@ -26,5 +32,6 @@ dev-db/mariadb
   <flag name='test'>Install upstream testsuites for end use.</flag>
   <flag name='tools'>Build the command line tools (mysql, mysqldump, 
mysqladmin, etc)</flag>
   <flag name='xtradb'>Add experimental support for Percona's InnoDB 
replacement: XtraDB</flag>
+  <flag name='yassl'>Enable SSL connections and crypto functions using the 
bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 6ea11dc..8e2c81f 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -1,3 +1,2 @@
-DIST mysql-extras-20150113-1853Z.tar.bz2 1494439 SHA256 
420553dc8557d0622ad762ee6924900acc74fd4f367fd3840acab03114fada4d SHA512 
b1252d905b71a6f42484eaa796ebcd2f0769affc566e6c277ef3bc0ef9bc446a1c22aac3faa48ef7b9305056a1302b37d7ef86b547c44514528a5956ce61d372
 WHIRLPOOL 
d14f0d88358eb0bbd2c338052ec086ab8260988497ef09da934365ded3c30c7e905ea936a0c9817ccb49d1f6e3408b3f6a438455a2455c65c2f26a9fc6367ff3
 DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 
d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 
3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9
 WHIRLPOOL 
11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22
 DIST percona-server-5.6.26-74.0.tar.gz 54819177 SHA256 
9156038d84bd1190a5b5df963877876584d30bd515ba3ad39e65a532430c1608 SHA512 
1874b5e5d40da3ba6a9ea5bf15b7b851b4c067edf3cbca4139c078536000010acaecb8ee94933f5c4482ea091967a30f042b3bd08bef5e3716cae0be8607410e
 WHIRLPOOL 
fd8d712d3ed1a785ad455d9d83f537303ad9b58d0562cf73adaba71527ab42513e0682b568aced5601b419e738f9d904d09bb37f387feaa42944795461e96b8e

diff --git a/dev-db/percona-server/metadata.xml 
b/dev-db/percona-server/metadata.xml
index 8bb7301..d4b579c 100644
--- a/dev-db/percona-server/metadata.xml
+++ b/dev-db/percona-server/metadata.xml
@@ -2,6 +2,10 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
 <herd>mysql</herd>
+  <maintainer restrict="dev-db/percona-server[libressl]">
+    <email>hasuf...@gentoo.org</email>
+    <description>Libressl issues. Only assign if it's a direct Libressl issue. 
Do not directly assign for anything else.</description>
+  </maintainer>
 <use>
   <flag name='client-libs'>Build the libmysqlclient libraries</flag>
   <flag name='cluster'>Add support for NDB clustering (deprecated)</flag>
@@ -10,11 +14,15 @@
   <flag name='extraengine'>Add support for alternative storage engines 
(Archive, CSV, Blackhole, Federated(X), Partition)</flag>
   <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for 
allocations.</flag>
   <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag>
-  <flag name='minimal'>Install client programs only, no server</flag>
+  <flag name='libressl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/libressl</pkg></flag>
+  <flag name='openssl'>Enable SSL connections and crypto functions using 
<pkg>dev-libs/openssl</pkg></flag>
   <flag name='profiling'>Add support for statement profiling (requires 
USE=community).</flag>
   <flag name='server'>Build the server program</flag>
   <flag name="systemtap">Build support for profiling and tracing using 
<pkg>dev-util/systemtap</pkg></flag>
   <flag name='test'>Install upstream testsuites for end use.</flag>
+  <flag name='tokudb'>Add support for TokuDB storage engine</flag>
+  <flag name='tokudb-backup-plugin'>Builds the TokuDB backup plugin</flag>
   <flag name='tools'>Build the command line tools (mysql, mysqldump, 
mysqladmin, etc)</flag>
+  <flag name='yassl'>Enable SSL connections and crypto functions using the 
bundled yaSSL</flag>
 </use>
 </pkgmetadata>

diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass
index 5f84d88..c967901 100644
--- a/eclass/mysql-multilib.eclass
+++ b/eclass/mysql-multilib.eclass
@@ -192,8 +192,10 @@ fi
 LICENSE="GPL-2"
 SLOT="0/${SUBSLOT:-0}"
 
-IUSE="+community cluster debug embedded extraengine jemalloc latin1
-       +perl profiling selinux ssl systemtap static static-libs tcmalloc test"
+IUSE="+community cluster debug embedded extraengine jemalloc latin1 libressl 
+openssl
+       +perl profiling selinux systemtap static static-libs tcmalloc test 
yassl"
+
+REQUIRED_USE="^^ ( yassl openssl libressl )"
 
 ### Begin readline/libedit
 ### If the world was perfect, we would use external libedit on both to have a 
similar experience
@@ -261,7 +263,7 @@ fi
 
 REQUIRED_USE="
        ${REQUIRED_USE} tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )
-        static? ( !ssl )"
+        static? ( yassl )"
 
 #
 # DEPENDENCIES:
@@ -271,7 +273,8 @@ REQUIRED_USE="
 # These are used for both runtime and compiletime
 # MULTILIB_USEDEP only set for libraries used by the client library
 DEPEND="
-       ssl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+       openssl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] 
)
+       libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
        kernel_linux? (
                sys-process/procps:0=
                dev-libs/libaio:0=
@@ -287,18 +290,21 @@ DEPEND="
 if [[ ${HAS_TOOLS_PATCH} ]] ; then
        DEPEND+="
                client-libs? (
-                       ssl? ( 
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+                       openssl? ( 
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+                       libressl? ( 
dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
                        
>=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
                )
                !client-libs? (
-                       ssl? ( >=dev-libs/openssl-1.0.0:0=[static-libs?] )
+                       openssl? ( >=dev-libs/openssl-1.0.0:0=[static-libs?] )
+                       libressl? ( dev-libs/libressl:0=[static-libs?] )
                        >=sys-libs/zlib-1.2.3:0=[static-libs?]
                )
                tools? ( sys-libs/ncurses:0= ) embedded? ( sys-libs/ncurses:0= )
        "
 else
        DEPEND+="
-               ssl? ( 
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+               openssl? ( 
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+               libressl? ( 
dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
                >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
                sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
        "
@@ -637,11 +643,16 @@ multilib_src_configure() {
                -DENABLED_LOCAL_INFILE=1
                -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock
                -DINSTALL_UNIX_ADDRDIR=${EPREFIX}/var/run/mysqld/mysqld.sock
-               -DWITH_SSL=$(usex ssl system bundled)
                -DWITH_DEFAULT_COMPILER_OPTIONS=0
                -DWITH_DEFAULT_FEATURE_SET=0
        )
 
+       if use openssl || use libressl ; then
+               mycmakeargs+=( -DWITH_SSL=system )
+       else
+               mycmakeargs+=( -DWITH_SSL=bundled )
+       fi
+
        if in_iuse client-libs ; then
                mycmakeargs+=( -DWITHOUT_CLIENTLIBS=$(usex client-libs 0 1) )
        fi

Reply via email to