Tomohiro "Tomo-p" KATO před 2 roky
rodič
revize
3bff778c68
1 změnil soubory, kde provedl 34 přidání a 7 odebrání
  1. 34 7
      m/mariadb/mariadb-vl.spec

+ 34 - 7
m/mariadb/mariadb-vl.spec

@@ -26,8 +26,8 @@
 
 %define mariadb_version		10.6.4
 %define mariadb_base_version	10.6
-%define mroonga_version		11.05
-%define groonga_version		11.0.5
+%define mroonga_version		11.06
+%define groonga_version		11.0.6
 %define client_version		18
 
 %define galera_api_version	26.4
@@ -35,7 +35,7 @@
 Name:		mariadb
 Summary:	MariaDB: a very fast and robust SQL database server
 Version:	%{mariadb_version}
-Release:	2%{_dist_release}%{?with_systemd:.systemd}
+Release:	3%{_dist_release}%{?with_systemd:.systemd}
 Group:		servers
 Vendor:		Project Vine
 Distribution:	Vine Linux
@@ -64,7 +64,6 @@ Patch1:		mariadb-ownsetup.patch
 
 # replace mroonga to the newest version.
 Patch1000:	0001-MariaDB-%{mariadb_version}-Mroonga-v%{mroonga_version}-Groonga-v%{groonga_version}.patch
-Patch1001:	mroonga-mariadb-10.6.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 BuildRequires:	bison, cmake, gcc-c++, groff, git
@@ -123,6 +122,17 @@ MariaDB documentation can be found at http://kb.askmonty.org/
 MariaDB bug reports should be submitted through https://mariadb.atlassian.net/
 
 
+%package server-jemalloc
+Summary:	A configuration file to run MariaDB with jemalloc
+Group:		servers
+BuildRequires:	jemalloc
+Requires:	mariadb-server = %{version}-%{release}
+Requires:	jemalloc
+
+%description server-jemalloc
+This package contains a systemd drop-in file to run MariaDB with jemalloc.
+
+
 %package mroonga
 ##Version: %{mroonga_version}
 Summary:	A fast fulltext searchable storage engine for MariaDB.
@@ -256,9 +266,6 @@ into a client application instead of running as a separate process.
 %endif
 %patch1 -p1
 git --git-dir= apply -p1 %{PATCH1000}
-pushd storage/mroonga
-%patch1001 -p1
-popd
 
 cp -f \
 	%{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE14} \
@@ -340,7 +347,18 @@ install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-ch
 install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade
 install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common
 popd
+
+jemalloc_file=`ls %{_libdir}/libjemalloc.so.* | head -n 1`
+if [ -z "$jemalloc_file" -o ! -x "$jemalloc_file" ]; then
+	echo "jemalloc not found."
+	exit 1
+fi
 mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d
+cat <<EOF > %{buildroot}%{_unitdir}/mariadb.service.d/jemalloc.conf
+[Service]
+Environment="LD_PRELOAD=$jemalloc_file"
+EOF
+
 rm -f %{buildroot}%{_sysconfdir}/init.d/*
 rm -f %{buildroot}%{_libexecdir}/rcmysql
 %else
@@ -696,6 +714,11 @@ fi
 %{_bindir}/sst_dump
 %endif
 
+%if %{with systemd}
+%files server-jemalloc
+%{_unitdir}/mariadb.service.d/jemalloc.conf
+%endif
+
 %files mroonga
 %defattr(-, root, root)
 %{!?_licensedir:%global license %%doc}
@@ -834,6 +857,10 @@ fi
 
 
 %changelog
+* Tue Aug 31 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.6.4-3
+- updated patch1000.
+- dropped Patch1001: merged into mroonga upstream.
+
 * Sun Aug 29 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.6.4-2
 - fixed systemd-unit.
 - fixed locations of pidfile and logfile.