diff --git a/README.SUSE b/README.SUSE deleted file mode 100644 index 8d7bd45..0000000 --- a/README.SUSE +++ /dev/null @@ -1,57 +0,0 @@ -Notes about MySQL 5.1 package: -============================== - -With MySQL 5.1 package we introduced some changes you may like to know. Most of -them will affect you only if you are upgrading from previous version and you -did some changes to your configuration. - -1) Plugins: -=========== - -One of the new features in MySQL 5.1 is support for plugins. So some of the -storage engines are now shipped like that. You can use following plugins: - - - archive - - blackhole - - federated - - example - -InnoDB is still compiled as internal part of MySQL. If you are upgrading from -version 5.0 or if this is your first installation of MySQL 5.1, all plugins -will be enabled by default and you can disable them manually later (see -http://dev.mysql.com/doc/refman/5.1/en/uninstall-plugin.html). - -With this change you need to remove skip-federated option from your my.cnf file -if you have changed it manually. This option was there by default in previous -versions of MySQL. - -2) File locations: -================== - -There were some changes in files locations. Most of them were made in the -default configuration file so if you are experiencing problems and you have -made some manual adjustments to your /etc/my.cnf, try to merge this file with -/etc/my.cnf.rpmnew. - -File locations changes: - - MySQL socket file and pid file were moved from /var/lib/mysql to more - reasonable location ( /run/mysql ) by default. - - MySQL log files are in /var/log/mysql. - -3) BerkeleyDB: -============== - -MySQL no longer contains BerkeleyDB as storage engine. There is no fix for that -and if you used it before, you have to migrate your data to different storage -engine BEFORE updating. This can be done for example using following command: - - ALTER TABLE foo ENGINE = INNODB; - -4) MySQL Upgrade Log -==================== - -If you missed messages displayed during automatic MySQL database upgrade, you -can find them from now on in - - /var/log/mysql/mysqld-upgrade.log - diff --git a/baselibs.conf b/baselibs.conf deleted file mode 100644 index 6278f3f..0000000 --- a/baselibs.conf +++ /dev/null @@ -1,2 +0,0 @@ -libmysqlclient18 -libmysqlclient_r18 diff --git a/configuration-tweaks.tar.xz b/configuration-tweaks.tar.xz index 8478919..79dfc86 100644 --- a/configuration-tweaks.tar.xz +++ b/configuration-tweaks.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79e339131ce01384337cedcb92a2220d8049d031f1604536c178537ed83476d8 +oid sha256:af9ad6d5a10b18ad04982fa278431552fc30186b2f8ad8a8e8330e75c876608e size 568 diff --git a/mariadb-10.1.25.tar.gz b/mariadb-10.1.25.tar.gz deleted file mode 100644 index bc49c40..0000000 --- a/mariadb-10.1.25.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7205ecaa6f1bc16335ad88faa5c46be52b3ac628a5e795cb942a3f4335b2a0d6 -size 61790542 diff --git a/mariadb-10.2.10.tar.gz b/mariadb-10.2.10.tar.gz new file mode 100644 index 0000000..17d4419 --- /dev/null +++ b/mariadb-10.2.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c7b83c4d2f7501ef9f187d8c97688a24fd3e53dc43bb388f8e1cead61a92fc2 +size 72388999 diff --git a/mariadb-10.2.10.tar.gz.sig b/mariadb-10.2.10.tar.gz.sig new file mode 100644 index 0000000..b1ea4dc --- /dev/null +++ b/mariadb-10.2.10.tar.gz.sig @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iEYEABECAAYFAln3nsIACgkQy8sIKhu5Q9vFRQCg69lFrS73cKNtjYV4j2YCvL2A +5/sAn0+VeicT1OZnfNU/4zvEwzLXlCAD +=bRqj +-----END PGP SIGNATURE----- diff --git a/mariadb.changes b/mariadb.changes index 1e1aaf4..e104386 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,148 @@ +------------------------------------------------------------------- +Wed Nov 29 12:54:23 UTC 2017 - vcizek@suse.com + +- Disable openssl compatibility checking + * the check uses CRYPTO_set_mem_functions() to set debugging + memory allocation function. The setting only succeeds if no allocation + was done before. Our fips self-tests, which are run from the library + constructor, however, do allocate memory, so the subsequent call to + CRYPTO_set_mem_functions causes the compatibility check to fail + * add mariadb-10.2.10-disable_openssl_compatibility_check.patch + +------------------------------------------------------------------- +Tue Oct 31 14:23:22 UTC 2017 - kstreitova@suse.com + +- update to 10.2.10 GA + * release notes and changelogs + https://downloads.mariadb.org/mariadb/+releases/ + * fixes for the following security vulnerabilities + * 10.2.10: CVE-2017-10378, CVE-2017-10268 + * 10.2.8: CVE-2017-3636, CVE-2017-3641, CVE-2017-3653, + CVE-2017-10320, CVE-2017-10365, CVE-2017-10379, + CVE-2017-10384, CVE-2017-10286, CVE-2017-3257 + * 10.2.6: CVE-2017-3308, CVE-2017-3309, CVE-2017-3453, + CVE-2017-3456, CVE-2017-3464 + * 10.2.5: CVE-2017-3313, CVE-2017-3302 + * [bsc#1042632], [bsc#1043328], [bsc#1019948], [fate#323738] +- refresh and rename the following patches: + * mariadb-10.1.4-group.patch to + mariadb-10.2.3-group.patch + * mariadb-10.1.16-systemd-cmake.patch to + mariadb-10.2.8-systemd-cmake.patch + * mariadb-10.1.18-mysql_install_db-mariadb_dirs.patch to + mariadb-10.2.3-mysql_install_db-mariadb_dirs.patch + * mariadb-10.1.12-fortify-and-O.patch to + mariadb-10.2.4-fortify-and-O.patch + * mysql-community-server-5.1.46-logrotate.patch to + mariadb-10.2.4-logrotate.patch +- add mariadb-10.2.10.tar.gz.sig signature and mariadb.keyring files +- start building without client library part, use + mariadb-connector-c for getting libmariadb libraries. Remove + libmysclient* packages +- remove baselibs.conf because we no longer build client libraries + here +- update %{soname} to 19 (libmysqld soname) +- change '=' to '>=' in Requires:mariadb-errormessages for + libmysqld%{soname}. Versioned libraries shouldn't require regular + packages with '='. It also causes problems during update (Problem: + libmysqld18-10.1.25-3.1.x86_64 requires mariadb-errormessages = 10.1.25, + but this requirement cannot be provided). + Also add "Provides: mariadb-errormessages = 10.1.25" for errormessages + subpackage that solves this problem for the current update. +- pack new files, remove mysql specific files +- remove README.SUSE as it was outdated +- package cleaning + * run spec-cleaner + * renumber sources + * reorganize subpackages order and update summaries, descriptions + and groups + * tweak and add some comments to the specfile + * remove warning about mysql-packaging repository that is no longer + used for this package + * remove checks whether we build mysql or mariadb (we build mariadb + only) +- add galera subpackage + * add missing "Requires:" (lsof, net-tools, rsync, socat, + xtrabackup) for proper wsrep scripts functionality + * add mariadb-10.2.9-galera_cnf.patch that enhances galera.cnf + configuration file (add wsrep_on=OFF and set the location + of the wsrep library) + * rename README-wsrep to README.wsrep so it corresponds with the + other README names + * move galera_new_cluster, galera_recovery, + use_galera_new_cluster.conf, wsrep_* scripts to the galera + subpackage +- remove the following macros definitions: + * %{_tmpfilesdir} - it's been defined in systemd macros since + openSUSE 13.2 + * %{preferred} - we no longer need to distinguish between preferred + and not preferred version (we build mariadb only) + * %{with_mandatory_lz4} - mysql specific + * %{build_extras}, %{pretty_name}, %{build_readline}, + %{builtin_plugins} and {libname} - they are no longer needed +- add the following macros + * %{run_testsuite} macro that controls the run of the regression + testsuite + * %{ignore_testsuite_result} macro - when set to 1 it ignores + results from the regression testsuite (debug purposes) + * %{with_mroonga} macro (enable mroonga build for x86_64 archs only) +- rename %{with_jemalloc} to %{with_tokudb} and enable tokudb for + x86_64 architectures for openSUSE and SLE15 [fate#323280]. Don't + enable it for SLE12 (missing jemalloc dependency) +- add the following BuildRequires: + * unixODBC-devel to allow ODBC support for Connect engine [bsc#1039034] + * krb5-devel to build auth_gssapi.so plugin + * libarchive-devel + * use libboost_headers-devel instead of boost-devel for TW. Boost + package has been split up and will migrate to using multibuild. + This results in packages that unnecessarily build require + boost-devel to cause major bottlenecks [bsc#1062583] +- do not use "BuildRequires: lzo-devel" for i586 and arm because + it makes build fail +- add the following Requires: + * hostname - as mariadb_install_db depends on this tool [bsc#1060110] + * libaio-devel for libmysqld-devel because libmysqld depends + on libaio +- tweak build options: + * remove "DWITH_ASAN=OFF" - this option was added because of mysql + and it's no longer needed + * switch from "-DWITH_JEMALLOC=auto" to "-DWITH_JEMALLOC=system" + * use "DCMAKE_SKIP_INSTALL_RPATH" - this allows to link with -rpath + during build and fixes quite a few test suite failures. When + installing the file -rpath is still disabled, so this should + not have any effect on the installed binaries + * add "-DWITH_LIBARCHIVE=ON" and "-DWITH_MARIABACKUP=ON" + * remove -DWITH_BOOST=../boost/ as we use system boost now +- enable OQGRAPH to build (openSUSE only, SLE is missing Judy + requirement) +- disable Cassandra storage engine build as it's no longer actively + being developed (See MDEV-4695) [bsc#1055165] + * Remove "BuildRequires: libthrift-devel" and %{with_cassandra} + macros that are no longer needed now +- disable make test (Connector/C unit tests) as it requires a + running server. These tests are part of mysql-test-run + now (MDEV-12470) +- add suse_skipped_tests.list - the list of the tests that we want + to skip (they fail correctly or the fix is in progress) + * adjust mysql-test-run options to skip tests listed there + [bsc#1041891] +- remove mytop utility that is packaged separately +- remove *.jar files from mysql-test +- remove python scripts remains from tokudb upstream +- remove generating of the MySQL NDB Cluster filelists +- remove removing of manpages for MySQL Carrier Grade Edition +- provide a symlink for the my_safe_process executable that was + moved from its location to bindir +- update filename in /var/adm/update-messages to match + documentation and build-compare pattern +- README is now README.md +- fix "file listed twice" build error + +------------------------------------------------------------------- +Tue Oct 31 10:38:13 UTC 2017 - vcizek@suse.com + +- Also Require: libopenssl-1_0_0-devel from the libmysqlclient-devel package + ------------------------------------------------------------------- Thu Oct 26 05:16:30 UTC 2017 - bwiedemann@suse.com diff --git a/mariadb.keyring b/mariadb.keyring new file mode 100644 index 0000000..3a4de8c --- /dev/null +++ b/mariadb.keyring @@ -0,0 +1,49 @@ +pub 1024D/1BB943DB 2010-02-02 +uid [ unknown] MariaDB Package Signing Key +uid [ unknown] Daniel Bartholomew (Monty Program signing key) +sub 4096g/672557E6 2010-02-02 + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2 + +mQGiBEtohJARBACxvZpWSIMTp/e7BUzSW+WDL7Pl0JDg6v7ZJFGJk9qo+5JXIiis +497Ul0FmVJ6EoyVzfpqe5FyUvqtLCkM6UP5adyvXTHi1KMiYacu2q5yRhDpMKbpM +LkAg23Yyz1yK/d0TsAkerLJ6K1Bh8NIm44Op+qFrDxeYZDIR5Q8WaCdK8wCg/jc8 +p/4XaKq74ghUHEX+35qk63UD/0YEsgHrsRQZ42wKNeO8ZUJKqCVHXYJrCq7DhRhn +U5aYnuK3op0JusPN5fdIGkKwJy24dWRoRfNIIg0WvM8qUNrC2NvhomnZNudsI0Jb +XapRemrIwbvrZToD6ei1awdVqa5fT6XIxV4MSQEwn47qmUNSz/0TkUmB3VZ2EL/j +zfHUA/91ZfAdWCmRemTLWRrzIYYJKyEInZ0qwZVrkyMY8+T7b2/6RGR0f2oV1dOx +cjbd0+N3vKrUkjuzkcVu/oB8wq9UBfuSHwsxYqub4gvIh0/LW+CsWa955sQ/Hj9H +48j3nUHaXqM9uJyMMgMlCdo3rLpnYCJH8w2kFfLHIDksMs1YtLQ9TWFyaWFEQiBQ +YWNrYWdlIFNpZ25pbmcgS2V5IDxwYWNrYWdlLXNpZ25pbmcta2V5QG1hcmlhZGIu +b3JnPohiBBMRAgAiBQJREUepAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK +CRDLywgqG7lD28y4AJ0aByfYvJWqBm5PZjusZiG0vo9SRwCeM0izj/oryMu0fJi3 +kRbTlojzCd20Q0RhbmllbCBCYXJ0aG9sb21ldyAoTW9udHkgUHJvZ3JhbSBzaWdu +aW5nIGtleSkgPGRiYXJ0QGFza21vbnR5Lm9yZz6IYAQTEQIAIAUCS2iEkAIbAwYL +CQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEMvLCCobuUPboDgAoNQVrK4i5LXTgwnW +ke2MxsXCoHDnAJ93j733YuNkV64aHEUwWxNCkkwUkbkEDQRLaIS4EBAApZ0wvxpQ +VlZ6OEFa9SBQ5eclRIOjXjKqkYGkvIx+jUmqCYfOgfPixOGYS5Q2KwHNz4XEOIOA +1kyClAoAAgOEGUxj8CxnbBk10IVo/JBONjdqKYPZ2YNdeIIrKXEmai4i5hK5AfZH +oyqsV5aqxGkGeVUju/coyRJY6La8iL+RBuxiRuUPWymGjtISAR6fSiN8f/kRly/y +9LmMO8JcOpeieqLUFPK6KuzhI4F0nFkHJpZPDNOHHl+GmAZ+SqZxmIrpkGymd36h +TKxW4nlnN6kqc1gMwdn1L/u/D+C/jhMbTTssqiMZeyP9uFmnMB3ls1NV8OxvbxcT +BG0M7g4AlffUQKpUrNhIBoC3R7UbYQ3CTZX1Qp/TBzbfRAgGhdWBQDQEd3/Ll9G4 +QaCs9I+4W68rkAr7e7IylHyfEi9oYQkXFIEeaAhiENmJBpcLpas/yNJoLayqzPsQ ++lRNg3omFntPtZolkMi6orRNixrgXV64m/01YNjmBFTqsp5wOq2j0cmTkbOWqdnl +mGPg2El1ufebJc6YWS1nFm6YRpN/B3QbtAnar1Cb+IHlr0haTOYhQp+XFN+k1brq +s+Sufa8/rz6N5tsm+W5GjHKvHr24FTa02u3H4lIqNlNBkzZZKhzAhxEWiJzwc/f2 +upG5vdplrM/YCU+XTotYPb5ZEXQe2mD/rXMAAwUP/0f1DOJIfnMrh1o/3RKqDq8k +7tlv2GEEv0VEnh8ty4dMb8Dos2M1Oc4Kv9QLB3DXcS4/L4JW5vF0QgSAzq1r5oBT +1zaMcqDS6OUlHrWUi8aDNt5EPQuEGdP2/iTDeAq4r8eCYrHRC7egldyRZrmWNfcZ +N6/G9K+JSjhWfSWWSBRIqb+UxcQNCp6i6tvVSxCfLK1R4P4kA/Z4Co2vywIfVfPh +Hd5nIWNl1yl9O3r04GCNTjzwsv/dhUGDFIVsghgehZuL0Bb7hDuyvZ2ShALumZ5t +7mU/SJ2hOk3klO+2bIJB0gquUkWn/4g1h2Tp9XVWrI1x6GUBxRYkwC4tWajzWeVC +5hcDVAdqYN0H0HVj/CEgrEWlCVv1hJ0JYAsjX8Cj1QuZB1i34fjEkgybMjo3oCU5 +GCSiNmvtTeUpexyY/7iHAdyoZHFT+fQS84VMYKFT4tTYH+5jTa62yfPhn63TYPor +rRyTqG8aJQLnczm0NN5R5mriYJQjr4Pj8PSSwWck/Gt8R5vb+C69+uXINB6OKqhG +6xU0bqnCIxt3OhVS7v0SfHjn0+il/JOc/ev9wm6G5FxmEWOoYwibmaDzHfc9N1HM +RzjTENI7fyJPNFj9IDkpwk4E3ylrkuVl2KEmYDJ9T9ny4UMnQ7Sb6w59UhxMIFtR +TPNpQJWCWXfhWUAo4WfCiEkEGBECAAkFAktohLgCGwwACgkQy8sIKhu5Q9vThgCg +7R7ImT+21phcbxVYBQZjiJVY/2YAnRKPeNKPNIviaUUV7kxMXt949GQX +=zBws +-----END PGP PUBLIC KEY BLOCK----- diff --git a/mariadb.spec b/mariadb.spec index ef21d96..e34cf94 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1,7 +1,7 @@ # # spec file for package mariadb # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,46 +16,52 @@ # -### WARNING!!!! ############################################################## -# This package is developed on http://github.com/openSUSE/mysql-packaging/ -# Do not change anything here in OBS. -############################################################################## -%define pretty_name MariaDB -%define libname mysqlclient -%define soname 18 -%define preferred 1 -%define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb -%define extra_provides mariadb_101 -%define with_mandatory_lz4 0 -%define build_readline 1 -%define build_extras 1 -# _tmpfilesdir is not defined in systemd macros up to openSUSE 13.2 -%{!?_tmpfilesdir: %global _tmpfilesdir %{_libexecdir}/tmpfiles.d } -%if 0%{build_extras} > 0 -%define with_jemalloc 1 -#temporarily disable OQGraph (see MDEV-9479) -#%define with_oqgraph 1 -%define with_oqgraph 0 -%define with_cassandra 1 +# libmysqld soname +%define soname 19 +%define extra_provides mariadb_102 +# Set this to 1 to run regression test suite (it takes a long time) +%define run_testsuite 0 +# Set this to 1 for testing purposes (run all regression tests but ignore +# failures). Set this to 0 for production usage (skip tests in the +# unstable-tests list (contains also suse_skipped_tests.list) and don't +# ignore failures +%define ignore_testsuite_result 0 +# OQGRAPH engine cannot be built for SLE (missing Judy dependency) +%if 0%{?is_opensuse} > 0 +%define with_oqgraph 1 %else -%define with_jemalloc 0 %define with_oqgraph 0 -%define with_cassandra 0 +%endif +# TokuDB engine is available only for x86_64 architecture +# see https://mariadb.com/kb/en/mariadb/tokudb/ +# Don't build for SLE<15 (missing jemalloc dependency) +%define with_tokudb 0 +%if 0%{?is_opensuse} > 0 || 0%{?sle_version} > 120300 +%ifarch x86_64 +%define with_tokudb 1 +%endif +%endif +# Mroonga currently only supports the x86_64 architecture +# see https://mariadb.com/kb/en/mariadb/about-mroonga/ +%ifarch x86_64 +%define with_mroonga 1 +%else +%define with_mroonga 0 %endif Name: mariadb -Version: 10.1.25 +Version: 10.2.10 Release: 0 -Summary: Server part of %{pretty_name} +Summary: Server part of MariaDB License: SUSE-GPL-2.0-with-FLOSS-exception Group: Productivity/Databases/Servers -Url: https://www.mariadb.org +URL: https://www.mariadb.org Source: https://downloads.mariadb.org/f/mariadb-%{version}/source/mariadb-%{version}.tar.gz -Source2: baselibs.conf -Source3: README.debug -Source4: suse-test-run -Source5: mysql.SuSEfirewall2 +Source1: %{name}-%{version}.tar.gz.sig +Source2: %{name}.keyring +Source4: README.debug +Source5: suse-test-run +Source6: mysql.SuSEfirewall2 Source7: README.install -Source8: README.SUSE Source9: mysql-patches.tar.xz Source12: series Source13: configuration-tweaks.tar.xz @@ -64,26 +70,36 @@ Source15: mysql.service Source16: mysql.target Source17: mysql-systemd-helper Source18: mysql@.service +Source50: suse_skipped_tests.list BuildRequires: bison BuildRequires: cmake BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: gcc-c++ +BuildRequires: krb5-devel BuildRequires: libaio-devel +BuildRequires: libarchive-devel BuildRequires: libbz2-devel BuildRequires: libevent-devel BuildRequires: libtool BuildRequires: libxml2-devel -BuildRequires: lzo-devel BuildRequires: ncurses-devel -# Temporarily require OpenSSL 1.0.x until we update to 10.2 which builds fine with OpenSSL 1.1 -%if %{suse_version} < 1330 BuildRequires: openssl-devel -%else -BuildRequires: libopenssl-1_0_0-devel -%endif BuildRequires: pam-devel +# MariaDB requires a specific version of pcre. Provide MariaDB with +# "BuildRequires: pcre-devel" and it automatically decides if the version is +# ok or not. If not, it uses bundled pcre. BuildRequires: pcre-devel +BuildRequires: pkgconfig +BuildRequires: procps +BuildRequires: pwdutils +BuildRequires: sqlite +BuildRequires: tcpd-devel +# Tests requires time and ps and some perl modules +# Keep in sync with Requires of mysql-testsuite +BuildRequires: time +BuildRequires: unixODBC-devel +BuildRequires: zlib-devel BuildRequires: perl(Data::Dumper) BuildRequires: perl(Env) BuildRequires: perl(Exporter) @@ -95,20 +111,14 @@ BuildRequires: perl(Socket) BuildRequires: perl(Sys::Hostname) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) -BuildRequires: pkgconfig -# Tests requires time and ps and some perl modules -# Keep in sync with Requires of mysql-testsuite -BuildRequires: procps -BuildRequires: pwdutils -BuildRequires: sqlite -BuildRequires: tcpd-devel -BuildRequires: time -BuildRequires: zlib-devel -# Do not ever switch away from pkgconfig(libsystemd) BuildRequires; systemd/systemd-devel causes build cycles +# Do not ever switch away from BuildRequires: pkgconfig(libsystemd); BuildRequires systemd/systemd-devel causes build cycles BuildRequires: pkgconfig(libsystemd) -# required by rcmysql +# Required by rcmysql Requires: %{name}-client Requires: %{name}-errormessages = %{version} +# Requires /bin/hostname because otherwise we have a conflict on Leap (bsc#1009905). +# It can be switched back to plain "hostname" when this bug is resolved +Requires: /bin/hostname Requires: perl-base Requires(pre): pwdutils Recommends: logrotate @@ -125,158 +135,145 @@ Obsoletes: %{name}-debug-version < %{version} Provides: %{name}-debug = %{version} Obsoletes: %{name}-debug < %{version} Provides: mysql = %{version} +Obsoletes: mysql < %{version} Provides: mysql-debug = %{version} +Obsoletes: mysql-debug < %{version} Provides: %{extra_provides} = %{version} Obsoletes: %{extra_provides} < %{version} Provides: %{extra_provides}-debug-version = %{version} Obsoletes: %{extra_provides}-debug-version < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build %{?systemd_requires} -%if 0%{with_mandatory_lz4} > 0 -# Dependency introduced in 5.7 mysql -BuildRequires: liblz4-devel +# Do not BuildRequires lzo for i586 and arm +# https://lists.launchpad.net/maria-discuss/msg04639.html +%ifnarch i586 %{arm} +BuildRequires: lzo-devel %endif -# On mariadb we want readline5 (except for SLE12) and on mysql we use libedit from system -%if 0%{build_readline} > 0 && ! (( 0%{?suse_version} == 1315 ) && ( ! 0%{?is_opensuse} )) -BuildRequires: readline5-devel -%else +# We want readline5 for openSUSE and libedit for SLE12 +%if ( 0%{?suse_version} == 1315 ) && ( ! 0%{?is_opensuse} ) BuildRequires: libedit-devel -%endif -%if 0%{with_oqgraph} > 0 || 0%{with_cassandra} > 0 -BuildRequires: boost-devel -%endif -# Build with jemalloc even for mariadb-100 to enable TokuDB there (bnc#970287) -%if 0%{with_jemalloc} > 0 || "%{extra_provides}" == "mariadb_100" -BuildRequires: jemalloc-devel +%else +BuildRequires: readline5-devel %endif %if 0%{with_oqgraph} > 0 BuildRequires: judy-devel +%if 0%{?suse_version} > 1315 +BuildRequires: libboost_headers-devel +%else +BuildRequires: boost-devel %endif -%if 0%{with_cassandra} > 0 -BuildRequires: libthrift-devel %endif -%if 0%{?preferred} > 0 -Obsoletes: mysql < %{version} -Obsoletes: mysql-debug < %{version} +%if 0%{with_tokudb} > 0 +BuildRequires: jemalloc-devel %endif %description -MariaDB is a backward compatible, drop-in replacement branch of the MySQL -Database Server. It includes all major open source storage engines, including -the Maria storage engine. +MariaDB is an open-source, multi-threaded, relational database management +system. It's a backward compatible, drop-in replacement branch of the +MySQL Community Server. This package only contains the server-side programs. -%if 0%{?preferred} > 0 -%package -n libmysqlclient-devel -Summary: %{pretty_name} development header files and libraries -Group: Development/Libraries/C and C++ -Requires: glibc-devel -Requires: libaio-devel -Requires: libmysqlclient%{soname} = %{version} -Requires: libmysqlclient_r%{soname} = %{version} -Requires: lzo-devel -Requires: pkgconfig(libssl) -Requires: zlib-devel -# mysql-devel needs to be provided as some pkgs still depend on it -Provides: mysql-devel = %{version} -Obsoletes: mysql-devel < %{version} - -%description -n libmysqlclient-devel -This package contains the development header files and libraries -necessary to develop client applications for %{pretty_name}. - %package -n libmysqld%{soname} -Summary: %{pretty_name} embedded server development files -Group: Development/Libraries/C and C++ -Requires: %{name}-errormessages = %{version} +Summary: MariaDB embedded server library +Group: System/Libraries +Requires: %{name}-errormessages >= %{version} %description -n libmysqld%{soname} -This package contains the development header files and libraries -for developing applications that embed the %{pretty_name}. +This package contains MariaDB library that allows to run an embedded +MariaDB server inside a client application. %package -n libmysqld-devel -Summary: %{pretty_name} embedded server development files +Summary: MariaDB embedded server development files Group: Development/Libraries/C and C++ -# the headers files are the shared -Requires: libmysqlclient-devel = %{version} +Requires: libaio-devel +# The headers files are the shared +Requires: libmariadb-devel >= 3.0 Requires: libmysqld%{soname} = %{version} Requires: tcpd-devel %description -n libmysqld-devel This package contains the development header files and libraries -for developing applications that embed the %{pretty_name}. -%endif - -%package -n lib%{libname}%{soname} -Summary: Shared Libraries for %{pretty_name} -Group: Development/Libraries/Other - -%description -n lib%{libname}%{soname} -This package contains the shared libraries (.so) which certain -languages and applications need to dynamically load and use %{pretty_name}. - -%package -n lib%{libname}_r%{soname} -Summary: Shared Libraries for %{pretty_name} -Group: Development/Libraries/Other -Requires: lib%{libname}%{soname} - -%description -n lib%{libname}_r%{soname} -This package contains the shared libraries (.so) which certain -languages and applications need to dynamically load and use %{pretty_name}. +for developing applications that embed the MariaDB. %package client -Summary: Client for %{pretty_name} +Summary: Client for MariaDB Group: Productivity/Databases/Clients Requires: %{name}-errormessages = %{version} # Explicit requires to pull in charsets for errormessages -Requires: lib%{libname}%{soname} +Requires: libmariadb3 >= 3.0 Requires(pre): pwdutils Conflicts: otherproviders(mysql-client) Provides: mysql-client = %{version} +Obsoletes: mysql-client < %{version} Provides: %{extra_provides}-client = %{version} Obsoletes: %{extra_provides}-client < %{version} -%if 0%{?preferred} > 0 -Obsoletes: mysql-client < %{version} -%endif %description client -This package contains the standard clients for %{pretty_name}. +This package contains the standard clients for MariaDB. + +%package galera +Summary: The configuration files and scripts for galera replication +Group: Productivity/Databases/Tools +Requires: %{name} = %{version} +# galera-3 is not in openSUSE:Factory now +#Requires: galera-3 >= 25.3.18 +Requires: lsof +Requires: net-tools +Requires: rsync +Requires: socat +Requires: xtrabackup +# We need Conflicts here as galera_new_cluster (and use_galera_new_cluster.conf) +# and galera_recovery scripts were in mariadb package but now they are in galera +# subpackage +Conflicts: mariadb <= 10.1.25 +# wsrep_* scripts were in mariadb-tools subpackage but now they are in galera subpackage +Conflicts: mariadb-tools <= 10.1.25 + +%description galera +This package contains configuration files and scripts that are +needed for running MariaDB Galera Cluster. %package errormessages -Summary: MySQL Community Server development header files and libraries -Group: Development/Libraries/C and C++ +Summary: The error messages files required by server, client and libmysqld +Group: System/Localization +BuildArch: noarch +# Old libmysqld18 requires an exact version of errormessages. This causes problem +# during the update ("libmysqld18-10.1.25-3.1.x86_64 requires mariadb-errormessages +# = 10.1.25, but this requirement cannot be provided"). +# Add the following Provides that solves this update issue. +Provides: mariadb-errormessages = 10.1.25 %description errormessages -This package provides the translated error messages for the standalone -server daemon as well as the embedded server +This package provides translated error messages for the standalone +server daemon, embedded server and client. %package bench -Summary: Benchmarks for %{pretty_name} +Summary: Benchmarks for MariaDB Group: Productivity/Databases/Tools Requires: %{name}-client Requires: perl-DBD-mysql Conflicts: otherproviders(mysql-bench) Provides: mysql-bench = %{version} +Obsoletes: mysql-bench < %{version} Provides: %{extra_provides}-bench = %{version} Obsoletes: %{extra_provides}-bench < %{version} -%if 0%{?preferred} > 0 -Obsoletes: mysql-bench < %{version} -%endif %description bench -This package contains benchmark scripts and data for %{pretty_name}. +This package contains benchmark scripts and data for MariaDB. To run these database benchmarks, start the script "run-all-tests" in -the directory %{_datadir}/sql-bench after starting %{pretty_name}. +the directory %{_datadir}/sql-bench after starting MariaDB. %package test -Summary: Testsuite for %{pretty_name} +Summary: Testsuite for MariaDB Group: Productivity/Databases/Servers Requires: %{name} = %{version} Requires: %{name}-bench = %{version} Requires: %{name}-client = %{version} Requires: %{name}-tools = %{version} +Requires: perl-DBD-mysql +Requires: procps +Requires: time # Tests requires time and ps and some perl modules Requires: perl(Data::Dumper) Requires: perl(Env) @@ -289,24 +286,19 @@ Requires: perl(Socket) Requires: perl(Sys::Hostname) Requires: perl(Test::More) Requires: perl(Time::HiRes) -Requires: perl-DBD-mysql -Requires: procps -Requires: time Conflicts: otherproviders(mysql-test) Provides: mysql-test = %{version} +Obsoletes: mysql-test < %{version} Provides: %{extra_provides}-test = %{version} Obsoletes: %{extra_provides}-test < %{version} -%if 0%{?preferred} > 0 -Obsoletes: mysql-test < %{version} -%endif %description test -This package contains the test scripts and data for %{pretty_name}. +This package contains the test scripts and data for MariaDB. To run the testsuite, run %{_datadir}/mysql-test/suse-test-run. %package tools -Summary: %{pretty_name} tools +Summary: MariaDB tools Group: Productivity/Databases/Servers Requires: perl-DBD-mysql Conflicts: otherproviders(mysql-tools) @@ -314,24 +306,23 @@ Conflicts: otherproviders(mysql-tools) Provides: mysql-client:%{_bindir}/perror Provides: mysql:%{_bindir}/mysqlhotcopy Provides: mysql-tools = %{version} +Obsoletes: mysql-tools < %{version} Provides: %{extra_provides}-tools = %{version} Obsoletes: %{extra_provides}-tools < %{version} -%if 0%{?preferred} > 0 -Obsoletes: mysql-tools < %{version} -%endif %description tools -A set of scripts for administering a %{pretty_name} or developing -applications with %{pretty_name}. +A set of scripts for administering a MariaDB or developing +applications with MariaDB. %prep %setup -q -n mariadb-%{version} -D -a 9 -cp %{_sourcedir}/README.SUSE . cp %{_sourcedir}/suse-test-run . -# apply patches from series + +# Apply patches from series mysql-patches/tools/quilt-setup.sh "%{SOURCE12}" mysql-patches/tools/apply-series.sh "%{SOURCE12}" -# remove unneeded manpages ('make install' basically installs everything under + +# Remove unneeded manpages ('make install' basically installs everything under # man/*) rm -f man/mysqlman.1 # dummy fallback manpage [ \! -f man/CMakeLists.txt ] || sed -i 's|mysqlman.1||' man/CMakeLists.txt @@ -339,83 +330,90 @@ rm -f man/mysql.server.1 # init script, not installed in our rpm [ \! -f man/CMakeLists.txt ] || sed -i 's|mysql.server.1||' man/CMakeLists.txt rm -f man/make_win_*.1 # windows build scripts rm -f man/comp_err.1 # built-time utility -# 5.1 Carrier Grade Edition only / still under development as of 5.1.22 -rm -f man/ndbd_redo_log_reader.1 -# breaks VPATH builds when in sourcedir, is generated in the builddirs + +# Breaks VPATH builds when in sourcedir, is generated in the builddirs rm -f sql/sql_builtin.cc + sed -i 's|@localstatedir@|%{_localstatedir}/log|' support-files/mysql-log-rotate.sh -%if 0%{preferred} < 1 -for i in `grep -Rl mysqlclient .`; do - sed -i 's|mysqlclient|%{libname}|g' $i - sed -i 's|-lib%{libname}-symbols.patch|-libmysqlclient-symbols.patch|g' $i -done -mv scripts/mysqlclient.pc.in scripts/%{libname}.pc.in || continue -%endif + # Broken test that needs sources rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result + # Specify perl path on shebangs for i in `grep -Rl '^#!@PERL@$' .`; do sed -i 's|@PERL@|%{_bindir}/perl|' $i done +# Add our list of tests that fail (correctly or temporarily) to the list of such +# tests created by upstream +cat %{SOURCE50} | tee -a mysql-test/unstable-tests + +# Remove python scripts remains from tokudb upstream (those files are not used anyway) +rm -r storage/tokudb/mysql-test/tokudb/t/*.py + %build EXTRA_FLAGS="-Wno-unused-but-set-variable -fno-strict-aliasing -Wno-unused-parameter" # Mariadb devs seems to fall in love with -Werror option EXTRA_FLAGS="${EXTRA_FLAGS} -Wno-error" export CFLAGS="%{optflags} -DOPENSSL_LOAD_CONF -DPIC -fPIC -DFORCE_INIT_OF_VARS $EXTRA_FLAGS" export CXXFLAGS="$CFLAGS -felide-constructors" -%cmake -DWITH_SSL=system \ - -DWITH_ASAN=OFF \ - -DWITH_LIBWRAP=ON \ - -DENABLED_PROFILING=ON \ - -DENABLE_DEBUG_SYNC=OFF \ - -DWITH_PIC=ON \ - -DWITH_ZLIB=system \ - -DWITH_LIBEVENT=system \ - -DWITH_JEMALLOC=auto \ - -DWITH_READLINE=0 \ - -DWITH_LIBEDIT=0 \ - -DWITH_EDITLINE=system \ - -DINSTALL_LAYOUT=RPM \ - -DWITH_SYSTEMD=ON \ - -DWITH_LZ4=system \ - -DMYSQL_UNIX_ADDR="%{_localstatedir}/run/mysql/mysql.sock" \ - -DINSTALL_UNIX_ADDRDIR="%{_localstatedir}/run/mysql/mysql.sock" \ - -DINSTALL_MYSQLSHAREDIR=share/%{name} \ - -DWITH_COMMENT="openSUSE mariadb rpm" \ - -DWITH_EXTRA_CHARSET=all \ - -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \ - -DWITH_INNOBASE_STORAGE_ENGINE=1 \ - -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ -%if 0%{with_oqgraph} > 0 - -DWITH_OQGRAPH_STORAGE_ENGINE=1 \ +%cmake -DWITH_SSL=system \ + -DWITH_LIBWRAP=ON \ + -DENABLED_PROFILING=ON \ + -DENABLE_DEBUG_SYNC=OFF \ + -DWITH_PIC=ON \ + -DWITH_ZLIB=system \ + -DWITH_LIBEVENT=system \ + -DWITH_JEMALLOC=system \ + -DWITH_READLINE=0 \ + -DWITH_LIBEDIT=0 \ + -DWITH_EDITLINE=system \ + -DINSTALL_LAYOUT=RPM \ + -DWITH_SYSTEMD=ON \ + -DWITH_LZ4=system \ + -DMYSQL_UNIX_ADDR="%{_localstatedir}/run/mysql/mysql.sock" \ + -DINSTALL_UNIX_ADDRDIR="%{_localstatedir}/run/mysql/mysql.sock" \ + -DINSTALL_MYSQLSHAREDIR=share/%{name} \ + -DWITH_COMMENT="openSUSE mariadb rpm" \ + -DWITH_EXTRA_CHARSET=all \ + -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci \ + -DWITH_INNOBASE_STORAGE_ENGINE=1 \ + -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ +%if 0%{with_oqgraph} < 1 + -DWITHOUT_OQGRAPH=ON \ %endif -%if 0%{with_cassandra} > 0 - -DWITH_CASSANDRA_STORAGE_ENGINE=1 \ +%if 0%{with_tokudb} < 1 + -DWITHOUT_TOKUDB=ON \ %endif - -DWITH_XTRADB_STORAGE_ENGINE=1 \ - -DWITH_CSV_STORAGE_ENGINE=1 \ - -DWITH_HANDLERSOCKET_STORAGE_ENGINE=1 \ - -DWITH_INNODB_MEMCACHED=ON \ - -DWITH_EMBEDDED_SERVER=true \ - -DWITH_WSREP=ON \ - -DWITH_INNODB_DISALLOW_WRITES=1 \ - -DWITH_BOOST=../boost/ \ - -DCOMPILATION_COMMENT="openSUSE package" \ - -DDENABLE_DOWNLOADS=false \ - -DINSTALL_PLUGINDIR_RPM="%{_lib}/mysql/plugin" \ - -DINSTALL_LIBDIR_RPM="%{_lib}" \ - -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \ - -DCMAKE_C_FLAGS_RELWITHDEBINFO="$CFLAGS" \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$CXXFLAGS" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DINSTALL_SQLBENCHDIR=share \ - -DCMAKE_C_FLAGS="$CFLAGS" \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ - -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ - -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ - -Wno-dev "$@" .. +%if 0%{with_mroonga} < 1 + -DWITHOUT_MROONGA=ON \ +%endif + -DWITH_XTRADB_STORAGE_ENGINE=1 \ + -DWITH_CSV_STORAGE_ENGINE=1 \ + -DWITH_HANDLERSOCKET_STORAGE_ENGINE=1 \ + -DWITH_INNODB_MEMCACHED=ON \ + -DWITH_EMBEDDED_SERVER=true \ + -DWITH_WSREP=ON \ + -DWITH_INNODB_DISALLOW_WRITES=1 \ + -DWITH_LIBARCHIVE=ON \ + -DWITH_MARIABACKUP=ON \ + -DCOMPILATION_COMMENT="openSUSE package" \ + -DDENABLE_DOWNLOADS=false \ + -DINSTALL_PLUGINDIR_RPM="%{_lib}/mysql/plugin" \ + -DINSTALL_LIBDIR_RPM="%{_lib}" \ + -DINSTALL_SYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO="$CFLAGS" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$CXXFLAGS" \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DINSTALL_SQLBENCHDIR=share \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -pie -Wl,-z,relro,-z,now" \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -Wno-dev "$@" .. make %{?_smp_mflags} nm --numeric-sort sql/mysqld > sql/mysqld.sym @@ -460,6 +458,7 @@ install -d -m 700 %{buildroot}%{_localstatedir}/log/mysql/ # Symbols from build to go into libdir install -m 644 build/sql/mysqld.sym %{buildroot}%{_libdir}/mysql/mysqld.sym + # INFO_SRC binary install -p -m 644 build/Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/ @@ -471,61 +470,74 @@ rm -f %{buildroot}%{_libdir}/mysql/plugin/debug_key_management.so rm -f %{buildroot}%{_libdir}/*.a [ \! -f "%{buildroot}%{_libdir}/"libmysqld.static ] || mv "%{buildroot}%{_libdir}/"libmysqld.static "%{buildroot}%{_libdir}/"libmysqld.a -# Rename mytop to have name prefixed with the implementation -[ \! -f "%{buildroot}%{_bindir}/mytop" ] || mv %{buildroot}%{_bindir}/mytop %{buildroot}%{_bindir}/%{name}_mytop +# Remove mytop utility that is packaged separately +rm %{buildroot}%{_bindir}/mytop # Remove few configure/examples rm -f %{buildroot}%{_datadir}/mysql/{binary-configure,errmsg-utf8.txt,magic,mysql-log-rotate,mysql*.server} rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini +# mysql-test includes my_safe_process executable that should be moved to /usr/bin mv %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process %{buildroot}%{_bindir} +ln -s ../../../../../bin/my_safe_process %{buildroot}%{_datadir}/mysql-test/lib/My/SafeProcess/my_safe_process -# Remove unused services for mariadb_101 -%if "%{extra_provides}" == "mariadb_101" +# Rename the wsrep README so it corresponds with the other README names +cp Docs/README-wsrep Docs/README.wsrep + +# Remove *.jar files from mysql-test +rm -r %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/JdbcMariaDB.jar +rm -r %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/Mongo2.jar +rm -r %{buildroot}%{_datadir}/mysql-test/plugin/connect/connect/std_data/Mongo3.jar + +# Remove unused upstream services rm -f %{buildroot}'%{_unitdir}/mariadb.service' rm -f %{buildroot}'%{_unitdir}/mariadb@.service' rm -f %{buildroot}'%{_unitdir}/mariadb@bootstrap.service.d/use_galera_new_cluster.conf' -%endif -# Generate various filelists -filelist galera_new_cluster galera_recovery innochecksum mariadb-service-convert my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_fix_privilege_tables mysql_ssl_rsa_setup mysql_install_db mysql_secure_installation mysql_upgrade mysqlbug mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mysqlmanager mroonga resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log xtstat tokuft_logprint tokuft_logdump tokuftdump >mysql.files +# Remove client libraries that are now provided in mariadb-connector-c +# Client library and links +rm %{buildroot}%{_libdir}/libmariadb*.so.* +unlink %{buildroot}%{_libdir}/libmysqlclient.so +unlink %{buildroot}%{_libdir}/libmysqlclient_r.so +unlink %{buildroot}%{_libdir}/libmariadb.so +# Client plugins +rm %{buildroot}%{_libdir}/mysql/plugin/{auth_gssapi_client.so,dialog.so,mysql_clear_password.so,sha256_password.so} +# Devel files +rm %{buildroot}%{_bindir}/mysql_config +rm %{buildroot}%{_bindir}/mariadb_config +rm %{buildroot}%{_datadir}/pkgconfig/mariadb.pc +rm %{buildroot}%{_datadir}/aclocal/mysql.m4 +rm %{buildroot}%{_mandir}/man1/mysql_config*.1* +rm -r %{buildroot}%{_includedir}/mysql + +# Generate various filelists (binaries and manpages) +# mariadb.files +filelist mariabackup mbstream innochecksum mariadb-service-convert my_print_defaults myisam_ftdump myisamchk myisamlog myisampack mysql_fix_extensions mysql_install_db mysql_secure_installation mysql_upgrade mysqld mysqld_multi mysqld_safe mysqlbinlog mysqldumpslow mroonga resolve_stack_dump resolveip {m,}aria_chk {m,}aria_dump_log {m,}aria_ftdump {m,}aria_pack {m,}aria_read_log tokuft_logprint tokuft_logdump tokuftdump mysql_ldb sst_dump >mariadb.files + +# mariadb-client.files +filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysql_config_editor mysqld_safe_helper >mariadb-client.files -filelist mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysql_config_editor mysqld_safe_helper >mysql-client.files -# The dialog stuff is mariadb only -if [ "`ls '%{buildroot}'%{_libdir}/mysql/plugin/dialog*.so 2> /dev/null`" ]; then - echo '%%dir %%_libdir/mysql' >> mysql-client.files - echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files - echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files -fi # Mysql has configuration file in _bindir if [ -f scripts/mysqlaccess.conf ] ; then install -m 640 scripts/mysqlaccess.conf %{buildroot}%{_sysconfdir}/mysqlaccess.conf rm -f %{buildroot}%{_bindir}/mysqlaccess.conf - echo '%config(noreplace) %attr(0640, root, mysql) %{_sysconfdir}/mysqlaccess.conf' >> mysql-client.files + echo '%config(noreplace) %attr(0640, root, mysql) %{_sysconfdir}/mysqlaccess.conf' >> mariadb-client.files fi -filelist mysql_config %{_datadir}/pkgconfig/mariadb.pc >libmysqlclient-devel.files +# mariadb-galera.files +filelist galera_new_cluster galera_recovery wsrep_sst_common wsrep_sst_mariabackup wsrep_sst_mysqldump wsrep_sst_rsync wsrep_sst_xtrabackup-v2 wsrep_sst_xtrabackup >mariadb-galera.files -filelist mysqlslap >mysql-bench.files +# mariadb-bench.files +filelist mysqlslap >mariadb-bench.files -filelist mysql_client_test mysql_client_test_embedded mysql_waitpid mysqltest mysqltest_embedded >mysql-test.files +# mariadb-test.files +filelist mysql_client_test mysql_client_test_embedded mysql_waitpid mysqltest mysqltest_embedded >mariadb-test.files -filelist msql2mysql mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysql_zap mysqlaccess mysqlhotcopy perror replace mysql_embedded %{name}_mytop hsclient wsrep_sst_common wsrep_sst_mariabackup wsrep_sst_mysqldump wsrep_sst_rsync wsrep_sst_xtrabackup-v2 wsrep_sst_xtrabackup %{_datadir}/mysql/wsrep_notify >mysql-tools.files - -filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.files - -filelist ndb_mgmd >mysql-ndb-management.files - -filelist ndb_{config,desc,error_reporter,mgm,print_backup_file,print_schema_file,print_sys_file,restore,select_all,select_count,show_tables,size.pl,test_platform,waiter} >mysql-ndb-tools.files - -filelist ndb_{cpcd,delete_all,drop_index,index_stat,print_file,redo_log_reader,drop_table} ndbinfo_select_all memcached >mysql-ndb-extra.files +# mariadb-tools.files +filelist msql2mysql mysql_plugin mysql_convert_table_format mysql_find_rows mysql_setpermission mysql_tzinfo_to_sql mysqlaccess mysqlhotcopy perror replace mysql_embedded >mariadb-tools.files # All configuration files -echo '%{_datadir}/mysql/*.cnf' >> mysql.files -# Mysql-community server has dictionary file in datadir -if [ -f "%{buildroot}%{_datadir}/%{name}"/dictionary.txt ]; then - echo "%{_datadir}/%{name}/dictionary.txt" >> mysql.files -fi +echo '%{_datadir}/mysql/*.cnf' >> mariadb.files # Special errormessages approach echo '%%defattr(-, root, root)' > %{_builddir}/errormessages.files @@ -537,17 +549,18 @@ for f in usr/share/%{name}/*; do done echo %{_datadir}/%{name}/errmsg-utf8.txt >> %{_builddir}/errormessages.files popd >/dev/null -mv %{_builddir}/errormessages.files errormessages.files +mv %{_builddir}/errormessages.files mariadb-errormessages.files -### files not installed by make install +# Files not installed by make install # Some of the documentation we need to have installed -DOCS=(COPYING README EXCEPTIONS-CLIENT %{_sourcedir}/README.debug %{_sourcedir}/README.SUSE plugin/daemon_example/daemon_example.ini) +DOCS=(COPYING README.md EXCEPTIONS-CLIENT %{_sourcedir}/README.debug plugin/daemon_example/daemon_example.ini) DOCDIR=%{buildroot}%{_defaultdocdir}/%{name} install -d -m 755 ${DOCDIR} for i in "${DOCS[@]}"; do install -m 644 "${i}" "${DOCDIR}" || true done -# Default configuration file + +# Install default configuration file install -m 664 %{SOURCE14} %{buildroot}%{_sysconfdir}/my.cnf # Systemd/initscript @@ -569,10 +582,14 @@ EOF # SuSEfirewall service description install -D -m 644 %{_sourcedir}/mysql.SuSEfirewall2 %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mysql -# testsuite +# Testsuite install -d -m 755 '%{buildroot}'%{_datadir}/mysql-test/ install -m 755 suse-test-run '%{buildroot}'%{_datadir}/mysql-test/ -mkdir '%{buildroot}'%{_datadir}/mysql-test/var +mkdir '%{buildroot}'%{_datadir}/mysql-test%{_localstatedir} + +# Install the list of skipped tests to be available for user runs +install -p -m 0644 mysql-test/unstable-tests %{buildroot}%{_datadir}/mysql-test +ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/suse_skipped_tests.list # Final fixes find '%{buildroot}'%{_datadir}/mysql-test -name '*.orig' -delete @@ -582,28 +599,6 @@ for i in `grep -Rl '\r' '%{buildroot}'%{_datadir}/sql-bench`; do dos2unix "$i" done -# Fix libmysqlclient_r.so.18 symlinking to be done against plain .so file -# and thus broken later on. Fixes bnc#906147 -pushd "%{buildroot}%{_libdir}" -rm -f lib%{libname}_r.so* -ln -sf lib%{libname}.so.%{soname}.0.0 lib%{libname}_r.so -ln -sf lib%{libname}.so.%{soname}.0.0 lib%{libname}_r.so.%{soname} -ln -sf lib%{libname}.so.%{soname}.0.0 lib%{libname}_r.so.%{soname}.0.0 -popd - -# If not preffered simply reduce main develpackage to NULL -%if ! 0%{preferred} > 0 -cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do - cd '%{buildroot}' - rm -f ."$tmp" -done -rm -rf '%{buildroot}'/%{_libdir}/libmysqld.* -rm -rf '%{buildroot}'/%{_libdir}/{*.so,*.a} -rm -rf '%{buildroot}'/%{_mandir}/*/mysql_config.1* -rm -rf '%{buildroot}'/%{_includedir} -rm -rf '%{buildroot}'/%{_datadir}/aclocal -%endif - # Compat with old scripts ln -s mysqlcheck '%{buildroot}'%{_bindir}/mysqlrepair ln -s mysqlcheck '%{buildroot}'%{_bindir}/mysqlanalyze @@ -614,6 +609,10 @@ rm -rf '%{buildroot}'%{_sysconfdir}/my.cnf.d install -d -m 755 '%{buildroot}'%{_sysconfdir}/my.cnf.d tar -C '%{buildroot}'%{_sysconfdir}/my.cnf.d -xvf %{SOURCE13} +# Install galera config file and script +install -p -m 644 build/support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +install -p -m 755 build/scripts/galera_new_cluster %{buildroot}%{_bindir}/galera_new_cluster + # Documentation that was copied to wrong folder rm -f '%{buildroot}'%{_datadir}/doc/* 2> /dev/null || true @@ -621,16 +620,17 @@ rm -f '%{buildroot}'%{_datadir}/doc/* 2> /dev/null || true rm -rf '%{buildroot}'%{_datadir}/mysql/{solaris,SELinux} # Create the directory specified in 'secure-file-priv' option -mkdir -p '%{buildroot}'/var/lib/mysql-files +mkdir -p '%{buildroot}'%{_localstatedir}/lib/mysql-files %check cd build -# First run simple ctest unittests -LD_LIBRARY_PATH=$(pwd)/unittest/mytap make test %{?_smp_mflags} +# Run an extensive mysql test suite +# If 0%{ignore_testsuite_result} == 1 then run all tests but ignore failures +# If 0%{ignore_testsuite_result} == 0 then skip tests listed in unstable-tests +# (contains suse_skipped_tests.list) and don't ignore failures -# And then run discustingly HUGE testsuite that might fail here and there -# Basically we run it to have overview to check how it goes +%if 0%{run_testsuite} > 0 cd mysql-test ./mysql-test-run.pl \ --parallel=%{?jobs:%{jobs}} \ @@ -642,10 +642,15 @@ cd mysql-test --mysqld=--binlog-format=mixed \ --force-restart \ --shutdown-timeout=60 \ - --max-test-fail=0 || : + --max-test-fail=0 \ +%if 0%{ignore_testsuite_result} > 0 + || : +%else + --skip-test-list=unstable-tests +%endif +%endif # client does not require server and needs the user too - %pre client getent group mysql >/dev/null || groupadd -r mysql getent passwd mysql >/dev/null || useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ @@ -675,14 +680,14 @@ for i in protected tmp; do rmdir "$datadir"/.$i 2>/dev/null || : done # Remove any messages that could've been in place about the upgrade -rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} +rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-something # During package rename (migration maria->mysql-community-server), # there might be config file move and we get rpmsave that we should keep if [ -f %{_sysconfdir}/my.cnf.rpmsave ]; then mv %{_sysconfdir}/my.cnf{,.rpmnew} mv %{_sysconfdir}/my.cnf{.rpmsave,} - cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF + cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-something << EOF WARNING: %{_sysconfdir}/my.cnf.rpmsave file detected! @@ -693,7 +698,7 @@ Your configuration was left intact and you can see the new configuration in EOF fi -# warn on first run +# Warn on first run datadir="`%{_bindir}/my_print_defaults mysqld mysql_server | sed -n 's|--datadir=||p'`" [ -n "$datadir" ] || datadir="%{_localstatedir}/lib/mysql" if [ -d "$datadir/mysql" ]; then @@ -701,7 +706,7 @@ if [ -d "$datadir/mysql" ]; then fi if [ \! -f "$datadir/mysql_upgrade_info" ]; then if [ $1 -eq 1 ]; then - cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF + cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-something << EOF %(cat %{_sourcedir}/README.install) @@ -711,7 +716,7 @@ else MYSQLVER="`echo %{version} | sed 's|\.[0-9]\+$||'`" if [ -f "$datadir/mysql_upgrade_info" ] && \ [ -z "`grep "^$MYSQLVER" "$datadir/mysql_upgrade_info" 2> /dev/null`" ]; then - cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} << EOF + cat >> %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-something << EOF WARNING: You are upgrading from different stable version of MySQL! @@ -730,27 +735,16 @@ exit 0 %postun %service_del_postun mysql.service # Remove the /var/adm updatemsg that was hand-created and thus not on filelist -rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} +rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-something -%post -n lib%{libname}%{soname} -p /sbin/ldconfig - -%postun -n lib%{libname}%{soname} -p /sbin/ldconfig - -%post -n lib%{libname}_r%{soname} -p /sbin/ldconfig - -%postun -n lib%{libname}_r%{soname} -p /sbin/ldconfig - -%if 0%{preferred} > 0 %post -n libmysqld%{soname} -p /sbin/ldconfig - %postun -n libmysqld%{soname} -p /sbin/ldconfig -%endif -%files -f mysql.files -%defattr(-, root, root) +%files -f mariadb.files %config(noreplace) %attr(0644, root, mysql) %{_sysconfdir}/my.cnf %dir %attr(0755, root, mysql) %{_sysconfdir}/my.cnf.d %config(noreplace) %attr(0644, root, mysql) %{_sysconfdir}/my.cnf.d/* +%exclude %{_sysconfdir}/my.cnf.d/galera.cnf %config %{_sysconfdir}/logrotate.d/%{name} %doc %{_defaultdocdir}/%{name} %dir %{_libexecdir}/mysql @@ -770,16 +764,10 @@ rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} %{_libdir}/mysql/INFO_SRC %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mysql %dir %{_libdir}/mysql/plugin -%{_libdir}/mysql/plugin/[!d]*.so -%ghost %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} -%dir %attr(0750, mysql, mysql) /var/lib/mysql-files -# Pack files for mariadb_101 -%if "%{extra_provides}" == "mariadb_101" -%{_bindir}/galera_new_cluster -%{_bindir}/galera_recovery -%{_bindir}/mariadb-service-convert -%{_bindir}/mariabackup -%{_bindir}/mbstream +%{_libdir}/mysql/plugin/*.so +%exclude %{_libdir}/mysql/plugin/dialog*.so +%ghost %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release}-something +%dir %attr(0750, mysql, mysql) %{_localstatedir}/lib/mysql-files %dir %{_datadir}/mysql/policy %dir %{_datadir}/mysql/policy/apparmor %{_datadir}/mysql/policy/apparmor/README @@ -791,64 +779,42 @@ rm -f %{_localstatedir}/adm/update-messages/%{name}-%{version}-%{release} %dir %{_datadir}/mysql/systemd %{_datadir}/mysql/systemd/mariadb.service %{_datadir}/mysql/systemd/mariadb@.service -%{_datadir}/mysql/systemd/use_galera_new_cluster.conf -%endif - -%files errormessages -f errormessages.files -%defattr(-, root, root) -%{_datadir}/%{name}/*/errmsg.sys - -%files client -f mysql-client.files -%defattr(-, root, root) - -%if 0%{preferred} > 0 -%files -n libmysqlclient-devel -f libmysqlclient-devel.files -%defattr(-, root, root) -%{_includedir}/mysql -%{_libdir}/libmysqlclient.so -%dir %{_datadir}/aclocal -%{_datadir}/aclocal/mysql.m4 +%files -n libmysqld%{soname} +%{_libdir}/libmysqld.so.* %files -n libmysqld-devel -%defattr(-,root,root) %{_libdir}/libmysqld.a %{_libdir}/libmysqld.so -%files -n libmysqld%{soname} -%defattr(-,root,root) -%{_libdir}/libmysqld.so.* -%endif +%files client -f mariadb-client.files +%dir %{_libdir}/mysql +%dir %{_libdir}/mysql/plugin +%{_libdir}/mysql/plugin/dialog_examples.so -%files -n lib%{libname}%{soname} -%defattr(-, root, root) -%{_libdir}/lib%{libname}.so.* +%files galera -f mariadb-galera.files +%doc Docs/README.wsrep +%config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf +%{_datadir}/mysql/systemd/use_galera_new_cluster.conf +%{_datadir}/mysql/wsrep_notify -%files -n lib%{libname}_r%{soname} -%defattr(-, root, root) -# We need .so file here as few apps still rely on it to be present. -# Currently known are Mysql workbench and Libreoffice -%{_libdir}/lib%{libname}_r.so* +%files errormessages -f mariadb-errormessages.files +%{_datadir}/%{name}/*/errmsg.sys -%files bench -f mysql-bench.files -%defattr(-, root, root) +%files bench -f mariadb-bench.files %{_datadir}/sql-bench -%files test -f mysql-test.files -%defattr(-, root, root) +%files test -f mariadb-test.files %{_bindir}/my_safe_process -%if "%{extra_provides}" == "mariadb_101" %{_mandir}/man1/my_safe_process.1* -%endif %{_mandir}/man1/mysql-test-run.pl.1* %{_mandir}/man1/mysql-stress-test.pl.1* %{_datadir}/mysql-test/valgrind.supp %dir %attr(755, root, root)%{_datadir}/mysql-test %{_datadir}/mysql-test/[^v]* -%dir %attr(755, mysql, mysql) %{_datadir}/mysql-test/var +%dir %attr(755, mysql, mysql) %{_datadir}/mysql-test%{_localstatedir} -%files tools -f mysql-tools.files -%defattr(-, root, root) +%files tools -f mariadb-tools.files %{_bindir}/mysqlrepair %{_bindir}/mysqlanalyze %{_bindir}/mysqloptimize diff --git a/mysql-patches.tar.xz b/mysql-patches.tar.xz index 88e71a9..8d2face 100644 --- a/mysql-patches.tar.xz +++ b/mysql-patches.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a96952443fb73f6cb8791280d32abd9fa4cb5f5677562193a54f1b7786471b90 -size 11952 +oid sha256:47ca9c735a6323deff5fc6f38fb2ee0736567ad121659f77b9c4728d9207610c +size 12580 diff --git a/series b/series index d4dbee5..3cddc02 100644 --- a/series +++ b/series @@ -1,12 +1,14 @@ mysql-community-server-5.1.45-multi-configuration.patch -mysql-community-server-5.1.46-logrotate.patch +mariadb-10.2.4-logrotate.patch mariadb-5.5.28-install_db-quiet.patch mariadb-10.1.1-mysqld_multi-features.patch mariadb-5.2.3-cnf.patch mysql-community-server-5.5.6-safe-process-in-bin.patch -mariadb-10.1.4-group.patch +mariadb-10.2.3-group.patch mariadb-10.1.12-deharcode-libdir.patch mariadb-10.0.15-logrotate-su.patch -mariadb-10.1.12-fortify-and-O.patch -mariadb-10.1.16-systemd-cmake.patch -mariadb-10.1.18-mysql_install_db-mariadb_dirs.patch +mariadb-10.2.4-fortify-and-O.patch +mariadb-10.2.8-systemd-cmake.patch +mariadb-10.2.3-mysql_install_db-mariadb_dirs.patch +mariadb-10.2.9-galera_cnf.patch +mariadb-10.2.10-disable_openssl_compatibility_check.patch diff --git a/suse_skipped_tests.list b/suse_skipped_tests.list new file mode 100644 index 0000000..de79425 --- /dev/null +++ b/suse_skipped_tests.list @@ -0,0 +1,32 @@ +#---------------------------------------------------------------- + +# The SSL tests that are failing correctly +main.ssl_7937 : bsc#937835, MDEV-8404 +main.ssl_crl_clients : bsc#937835, MDEV-8404 +main.ssl_cert_verify : bsc#937835, MDEV-8404 +main.ssl_8k_key : bsc#937835, MDEV-8404 + +# Main and perfschema tests +main.userstat : bsc#937836, MDEV-8446 +perfschema.nesting : bsc#937836, MDEV-8446 +perfschema.socket_summary_by_event_name_func : bsc#937836, MDEV-8446 +perfschema.socket_summary_by_instance_func : bsc#937836, MDEV-8446 + +#---------------------------------------------------------------- + +# Needs to be investigated (issues trackers will be added) +plugins.show_all_plugins : +perfschema.cnf_option : +perfschema.privilege_table_io : +rpl.rpl_row_img_blobs : +rpl.rpl_row_img_eng_min : +rpl.rpl_row_img_eng_noblob : +sys_vars.slave_parallel_threads_basic : +rocksdb.shutdown : +rocksdb.deadlock : +roles.acl_statistics : +main.non_blocking_api : +main.join_cache : +main.explain_non_select : +main.mdev-504 : (i586) +sys_vars.innodb_change_buffer_max_size_basic : (i586)