From 109843b4fdc811c2b480a46da932cdf780c0171e Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 25 Feb 2020 12:13:50 +0100 Subject: [PATCH] Rebase to 10.5.1 - Beta Update to build against PCRE2 --- mariadb.spec | 59 ++++++++++++++++++++++++---------------------------- sources | 2 +- 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 496adde..02445ec 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -11,7 +11,7 @@ # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.4.12 +%global last_tested_version 10.5.1 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -98,13 +98,13 @@ -# MariaDB 10.0 and later requires pcre >= 8.35, otherwise we need to use +# MariaDB 10.0 and later requires pcre >= 10.34, otherwise we need to use # the bundled library, since the package cannot be build with older version %if 0%{?fedora} || 0%{?rhel} > 7 %bcond_without unbundled_pcre %else %bcond_with unbundled_pcre -%global pcre_bundled_version 8.43 +%global pcre_bundled_version 10.34 %endif # Use main python interpretter version @@ -146,7 +146,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.5.0 +Version: 10.5.1 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -199,8 +199,6 @@ Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch Patch15: %{pkgnamepatch}-groonga.patch # Patch16: Workaround for "chown 0" with priviledges dropped to "mysql" user Patch16: %{pkgnamepatch}-auth_pam_tool_dir.patch -# Patch17: Fix of an upstream bug. Fixed in the next (10.5.1) version. -Patch17: %{pkgnamepatch}-10.5.0-libsql_builtins.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -226,9 +224,9 @@ BuildRequires: bison bison-devel # auth_pam.so plugin will be build if pam-devel is installed BuildRequires: pam-devel -# use either new enough version of pcre or provide bundles(pcre) -%{?with_unbundled_pcre:BuildRequires: pcre-devel >= 8.35 pkgconf} -%{!?with_unbundled_pcre:Provides: bundled(pcre) = %{pcre_bundled_version}} +# use either new enough version of pcre2 or provide bundles(pcre2) +%{?with_unbundled_pcre:BuildRequires: pcre2-devel >= 10.34 pkgconf} +%{!?with_unbundled_pcre:Provides: bundled(pcre2) = %{pcre_bundled_version}} # Few utilities needs Perl %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: perl-interpreter @@ -708,7 +706,6 @@ rm -rf libmariadb/unittest #%patch13 -p1 %patch15 -p1 %patch16 -p1 -%patch17 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -740,26 +737,23 @@ sed 's/mariadb-server-galera/%{name}-server-galera/' %{SOURCE72} > selinux/%{nam # Get version of PCRE, that upstream use -pcre_maj=`grep '^m4_define(pcre_major' pcre/configure.ac | sed -r 's/^m4_define\(pcre_major, \[([0-9]+)\]\)/\1/'` -pcre_min=`grep '^m4_define(pcre_minor' pcre/configure.ac | sed -r 's/^m4_define\(pcre_minor, \[([0-9]+)\]\)/\1/'` +pcre_version=`grep -e "ftp.pcre.org/pub/pcre/pcre2" cmake/pcre.cmake | sed -r "s;[^0123456789]*2-([[:digit:]]+\.[[:digit:]]+)\.[^0123456789]*;\1;"` -%if %{without unbundled_pcre} # Check if the PCRE version in macro 'pcre_bundled_version', used in Provides: bundled(...), is the same version as upstream actually bundles -if [ %{pcre_bundled_version} != "$pcre_maj.$pcre_min" ] -then - echo "\n Error: Bundled PCRE version is not correct. \n\tBundled version number:%{pcre_bundled_version} \n\tUpstream version number: $pcre_maj.$pcre_min\n" +%if %{without unbundled_pcre} +if [ %{pcre_bundled_version} != "$pcre_version" ] ; then + echo "\n Error: Bundled PCRE version is not correct. \n\tBundled version number:%{pcre_bundled_version} \n\tUpstream version number: $pcre_version\n" exit 1 fi %else # Check if the PCRE version that upstream use, is the same as the one present in system -pcre_system_version=`pkgconf %{_libdir}/pkgconfig/libpcre.pc --modversion 2>/dev/null ` -if [ "$pcre_system_version" != "$pcre_maj.$pcre_min" ] -then - echo "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number:$pcre_system_version \n\tUpstream version number: $pcre_maj.$pcre_min\n" +pcre_system_version=`pkgconf %{_libdir}/pkgconfig/libpcre2-*.pc --modversion 2>/dev/null | head -n 1` + +if [ "$pcre_system_version" != "$pcre_version" ] ; then + echo "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number:$pcre_system_version \n\tUpstream version number: $pcre_version\n" fi %endif - %if %{without rocksdb} rm -r storage/rocksdb/ %endif @@ -942,17 +936,12 @@ rm scripts/my.cnf # use different config file name for each variant of server (mariadb / mysql) mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf -# Rename sysusers and tmpfiles config files, they should be named after the software they belong to -mv %{buildroot}%{_sysusersdir}/sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf - # remove SysV init script and a symlink to that, we use systemd rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service -# Remove the upstream version -rm %{buildroot}%{_tmpfilesdir}/tmpfiles.conf -# Install downstream version +# Install downstream version of tmpfiles install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf %if 0%{?mysqld_pid_dir:1} echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf @@ -1029,7 +1018,12 @@ rm %{buildroot}%{logrotateddir}/mysql # Remove AppArmor files rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor +# Buildroot does not have symlink /lib64 --> /usr/lib64 +%if %{__isa_bits} == 64 && 0%{?fedora} +mv %{buildroot}/lib64/security %{buildroot}%{_libdir} +%else mv %{buildroot}/lib/security %{buildroot}%{_libdir} +%endif # Disable plugins %if %{with gssapi} @@ -1104,11 +1098,7 @@ rm %{buildroot}%{_mandir}/man1/mysql{access,admin,binlog,check,dump,_find_rows,i rm %{buildroot}%{_mandir}/man1/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,waitpid}.1* %endif -%if %{without tokudb} -# because upstream ships manpages for tokudb even on architectures that tokudb doesn't support -rm %{buildroot}%{_mandir}/man1/tokuftdump.1* -rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* -%else +%if %{with tokudb} %if 0%{?fedora} || 0%{?rhel} > 7 # Move the upstream file to the correct location mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d @@ -1355,6 +1345,8 @@ fi %{_bindir}/myisampack %{_bindir}/my_print_defaults +%{_bindir}/mariadb-conv + %{_bindir}/mysql_{install_db,secure_installation,tzinfo_to_sql} %{_bindir}/mariadb-{install-db,secure-installation,tzinfo-to-sql} %{_bindir}/{mysqld_,mariadbd-}safe @@ -1595,6 +1587,9 @@ fi %endif %changelog +* Thu Apr 09 2020 Michal Schorm - 10.5.1-1 +- Test rebase to 10.5.1 - Beta + * Thu Apr 09 2020 Michal Schorm - 10.5.0-1 - Test rebase to 10.5.0 - Alpha diff --git a/sources b/sources index 96ad160..59c9f1f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.5.0.tar.gz) = ed7226a0e0b8d0aa435691a43f457bf338b484fc2dd893b8490c65bf99915a089e6c91a86687ef2eaa3728d83a91f5c0dfd7b8ddbefec79f9ad4cd7074bda4c5 +SHA512 (mariadb-10.5.1.tar.gz) = eef4986fa0ff70b77d9d083ccbe6738d7bfda4236e3098bf37cd41034732cc8a8150a25be19ffb67849d9b29c5f1126c5b38e10e6a1afd9eb8d6d266b3638fb2