Browse Source

updated 2 packages

galera-26.4.8-1

mariadb-10.5.10-1
Tomohiro "Tomo-p" KATO 4 years ago
parent
commit
b9c39ce292
2 changed files with 97 additions and 31 deletions
  1. 84 18
      g/galera/galera-vl.spec
  2. 13 13
      m/mariadb/mariadb-vl.spec

+ 84 - 18
g/galera/galera-vl.spec

@@ -1,7 +1,8 @@
 %bcond_with		systemd
 %bcond_with		python3
+%bcond_without	cmake
 
-%define mariadb_version 10.5.9
+%define mariadb_version 10.5.10
 
 %if %{with python3}
 %global scons scons-3
@@ -11,7 +12,7 @@
 
 Summary:        Synchronous multi-master wsrep provider (replication engine)
 Name:           galera
-Version:        26.4.7
+Version:        26.4.8
 Release:        1%{?_dist_release}%{?with_systemd:.systemd}
 %global         galera_api_version %(echo %{version} | cut -d . -f 1,2)
 Group:          servers
@@ -31,7 +32,12 @@ Source3:        garbd.init
 
 Patch0:         galera-python3.patch
 
-BuildRequires:  libboost-devel libboost-program-options check-devel openssl-devel scons gcc-c++ asio-devel
+BuildRequires:  libboost-devel libboost-program-options check-devel openssl-devel gcc-c++ asio-devel
+%if %{with cmake}
+BuildRequires:  cmake ninja
+%else
+BuildRequires:  scons
+%endif
 %if %{with systemd}
 BuildRequires:  systemd
 %endif
@@ -59,25 +65,74 @@ replication engine see http://www.codership.com.
 
 %prep
 %setup -q
+%if ! %{with cmake}
 %if %{with python3}
 %patch0 -p1
 %endif
+%endif
 
 %build
-CPPFLAGS="%{optflags}"
-CPPFLAGS=`echo $CPPFLAGS| sed -e "s|-Wp,-D_GLIBCXX_ASSERTIONS||g" `
-export CPPFLAGS
-
+%if %{with cmake}
+%global build_ldflags %(echo %{build_ldflags} | sed -e 's/-Wl,--as-needed//')
+%endif
+%{set_build_flags}
+
+# Workaround for version 26.4.7
+export CXXFLAGS="$CXXFLAGS -Wno-error=format-extra-args"
+# ... and for 32 bit arches
+export CXXFLAGS="$CXXFLAGS -Wno-error=format"
+export CFLAGS="$CFLAGS -Wno-error=format-extra-args -Wno-error=format"
+# end of workaroound
+
+%if %{with cmake}
+%cmake \
+  -GNinja \
+  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+  -DCMAKE_SKIP_RPATH:BOOL=ON
+%cmake_build
+%else
 %{scons} %{?_smp_mflags} strict_build_flags=0
+%endif
 
 
 %install
 %if %{with systemd}
-install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/garbd.service
-install -D -m 755 %{SOURCE2} %{buildroot}%{_sbindir}/garbd-wrapper
+install -Dpm644 %{SOURCE1} %{buildroot}%{_unitdir}/garbd.service
+install -Dpm755 %{SOURCE2} %{buildroot}%{_sbindir}/garbd-wrapper
 %else
-install -D -m 644 %{SOURCE3} %{buildroot}%{_initdir}/garbd
+install -Dpm644 %{SOURCE3} %{buildroot}%{_initdir}/garbd
+%endif
+%if %{with cmake}
+%cmake_install
+pushd %{_vpath_builddir}
+
+mkdir -p %{buildroot}%{_libdir}/galera
+mv -f %{buildroot}/usr/lib/libgalera_smm.so %{buildroot}%{_libdir}/galera/
+for f in \
+  galera/src/libgalera_smm_static.so galera/src/libgalera.so \
+  gcs/src/libgcs4garb.so gcs/src/libgcs.so \
+  gcache/src/libgcache.so \
+  gcomm/src/libgcomm.so \
+%ifarch x86_64
+  galerautils/src/libgalerautils_hw_crc32c.so \
 %endif
+  galerautils/src/libgalerautilsxx.so galerautils/src/libgalerautils.so
+do
+  install -Dpm755 $f %{buildroot}%{_libdir}/galera/
+done
+popd
+mkdir -p %{buildroot}%{_sbindir}
+mv -f %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/
+mv -f %{buildroot}%{_datadir}/* %{buildroot}/usr/doc/
+mv -f %{buildroot}/usr/man %{buildroot}%{_mandir}
+rm -rf rpmdoc
+mv -f %{buildroot}/usr/doc ./rpmdoc
+install -D -m 644 garb/files/garb.cnf %{buildroot}%{_sysconfdir}/sysconfig/garb
+mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
+cat <<EOF > %{buildroot}%{_sysconfdir}/ld.so.conf.d/galera.conf
+%{_libdir}/galera
+EOF
+%else
 install -D -m 755 garb/garbd %{buildroot}%{_sbindir}/garbd
 install -D -m 755 libgalera_smm.so %{buildroot}%{_libdir}/galera/libgalera_smm.so
 install -D -m 644 garb/files/garb.cnf %{buildroot}%{_sysconfdir}/sysconfig/garb
@@ -85,10 +140,17 @@ install -D -m 644 COPYING %{buildroot}%{_docdir}/galera/COPYING
 install -D -m 644 asio/LICENSE_1_0.txt %{buildroot}%{_docdir}/galera/LICENSE.asio
 install -D -m 644 scripts/packages/README %{buildroot}%{_docdir}/galera/README
 install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/README-MySQL
+%endif
+
+
+%if %{with cmake}
+%check
+export LD_LIBRARY_PATH=%{buildroot}%{_libdir}/galera
+%ctest
+%endif
 
 
 %post
-/sbin/ldconfig
 %if %{with systemd}
 %systemd_post garbd.service
 %else
@@ -106,31 +168,35 @@ fi
 %endif
 
 %postun
-/sbin/ldconfig
 %if %{with systemd}
 %systemd_postun_with_restart garbd.service
 %endif
 
 
 %files
-%license %{_docdir}/galera/COPYING
-%license %{_docdir}/galera/LICENSE.asio
-%doc %{_docdir}/galera/README
-%doc %{_docdir}/galera/README-MySQL
+%license rpmdoc/COPYING
+%license rpmdoc/LICENSE.asio
+%doc rpmdoc/AUTHORS rpmdoc/README rpmdoc/garb*
 %config(noreplace,missingok) %{_sysconfdir}/sysconfig/garb
-%dir %{_docdir}/galera
+%{_sysconfdir}/ld.so.conf.d/galera.conf
 %dir %{_libdir}/galera
+%{_libdir}/galera/*
 %{_sbindir}/garbd
+%{_mandir}/man8/*
 %if %{with systemd}
 %{_sbindir}/garbd-wrapper
 %{_unitdir}/garbd.service
 %else
 %{_initdir}/garbd
 %endif
-%{_libdir}/galera/libgalera_smm.so
 
 
 %changelog
+* Sat May 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.8-1
+- new upstream release.
+- dropped ldconfig scriptlets.
+- switched buildsystem to cmake and ninja.
+
 * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.7-1
 - new upstream release.
 

+ 13 - 13
m/mariadb/mariadb-vl.spec

@@ -15,10 +15,10 @@
 
 %define _unpackaged_files_terminate_build 1
 
-%define mariadb_version		10.5.9
+%define mariadb_version		10.5.10
 %define mariadb_base_version	10.5
-%define mroonga_version		11.00
-%define groonga_version		11.0.0
+%define mroonga_version		11.01
+%define groonga_version		11.0.1
 %define client_version		18
 
 %define galera_api_version	26.4
@@ -54,9 +54,6 @@ Patch0:		mariadb-scripts.patch
 # replace mroonga to the newest version.
 Patch1000:	0001-MariaDB-%{mariadb_version}-Mroonga-v%{mroonga_version}-Groonga-v%{groonga_version}.patch
 
-# https://github.com/mroonga/mroonga/issues/392
-Patch1001:	mariadb-10.5.9_mroonga-11.00-fix-FTBFS.patch
-
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 BuildRequires:	bison, cmake, gcc-c++, groff, git
 BuildRequires:	libaio-devel, libboost-devel, libevent-devel, libxml2-devel
@@ -270,10 +267,6 @@ cp -f \
 	%{SOURCE15} %{SOURCE16} %{SOURCE18} \
 	scripts/
 
-pushd storage/mroonga
-%patch1001 -p1
-popd
-
 
 %build
 # Be strict about variables, bail at earliest opportunity, etc.
@@ -571,7 +564,7 @@ fi
 %files server
 %defattr(-,root,root)
 %{!?_licensedir:%global license %%doc}
-%license COPYING* EXCEPTIONS-CLIENT
+%license COPYING*
 
 %doc CREDITS README.md doc/*
 %doc support-files/rpm/*.cnf
@@ -680,7 +673,7 @@ fi
 %exclude %{_libdir}/mysql/plugin/ha_connect.so
 %exclude %{_libdir}/mysql/plugin/ha_mroonga.so
 %exclude %{_datadir}/mysql/mroonga
-%exclude %{_datadir}/mysql/systemd/use_galera_new_cluster.conf
+#exclude %{_datadir}/mysql/systemd/use_galera_new_cluster.conf
 %dir %{_sysconfdir}/my.cnf.d
 %config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset
 %config(noreplace) %{_sysconfdir}/my.cnf.d/server.cnf
@@ -751,7 +744,7 @@ fi
 %files client
 %defattr(-, root, root)
 %{!?_licensedir:%global license %%doc}
-%license COPYING* EXCEPTIONS-CLIENT
+%license COPYING*
 
 %config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf
 %{_bindir}/mariadb
@@ -862,13 +855,20 @@ fi
 
 
 %changelog
+* Sat May 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.5.10-1
+- new upstream release.
+- updated patch1000.
+- dropped Patch1001: fixed in upstream.
+
 * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.5.9-1
 - new upstream release.
+- updated patch1000.
 - dropped Patch2000: fixed in upstream.
 - added Patch1001 to fix FTBFS.
 
 * Thu Nov 12 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.5.8-1
 - new upstream release.
+- updated patch1000.
 - added Patch2000 to fix failure on starting mariadbd.
 
 * Wed Nov 04 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.5.7-1