--- rpms/e-smith-mysql/sme10/e-smith-mysql.spec 2016/04/11 20:32:10 1.7 +++ rpms/e-smith-mysql/sme10/e-smith-mysql.spec 2020/12/10 04:25:50 1.20 @@ -1,10 +1,10 @@ -# $Id: e-smith-mysql.spec,v 1.6 2016/04/11 19:12:05 vip-ire Exp $ +# $Id: e-smith-mysql.spec,v 1.19 2020/12/08 20:01:25 jpp Exp $ Summary: e-smith specific mysql configuration and templates. %define name e-smith-mysql Name: %{name} %define version 2.6.0 -%define release 6 +%define release 16 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -12,6 +12,14 @@ Group: Networking/Daemons Source: %{name}-%{version}.tar.xz Patch0: e-smith-mysql-2.6.0-mariadb1.patch Patch1: e-smith-mysql-2.6.0-mysqld2mariadb.patch +Patch2: e-smith-mysql-2.6.0-use_default_innodb_settings.patch +Patch3: e-smith-mysql-2.6.0-mariadb_forgotten_var.patch +Patch4: e-smith-mysql-2.6.0.bz9671.RemoveDummyMysqlDatabase.patch +Patch5: e-smith-mysql-2.6.0.bz9688.skipredirect.patch +Patch6: e-smith-mysql-2.6.0-bz11145-updateevent.patch +Patch7: e-smith-mysql-2.6.0-bz11021-mariadb2systemd.patch +Patch8: e-smith-mysql-2.6.0-bz11120-mysql.init2systemd.patch + BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: mariadb-server @@ -22,6 +30,42 @@ BuildRequires: e-smith-devtools >= 1.13. AutoReqProv: no %changelog +* Wed Dec 09 2020 Jean-Philipe Pialasse 2.6.0-16.sme +- fix issue with 10mysql_upgrade crashing mariadb [SME: 11120] + also removed noise from spec file + +* Mon Dec 07 2020 Jean-Philipe Pialasse 2.6.0-15.sme +- e-smith-update event [SME: 11145] +- mariadb systemd integration [SME: 11021] + move set.password and template + create /usr/lib/systemd/system/mariadb.service.d/sme.conf + create /sbin/e-smith/systemd/mariadb-initialize + chmod + cleanup and remove old /var/service/mariadb +- mysql.init systemd integration [SME: 11120] + create mysql_init.service + + +* Sun Jul 24 2016 Jean-Philipe Pialasse 2.6.0-13.sme +- systemd skip redirect [SME: 9688] + +* Sat Jul 23 2016 stephane de Labrusse 2.6.0-12.sme +- Corrected a typo in e-smith-mysql-2.6.0.bz9671.RemoveDummyMysqlDatabase.patch +- [SME: 9671] + +* Thu Jul 21 2016 Jean-Philipe Pialasse 2.6.0-11.sme +- fix broken link /etc/init.d/supervise/mariadb [SME: 9686] + +* Mon Jul 18 2016 stephane de Labrusse 2.6.0-10.sme +- Remove Dummy database from backup and restoration [SME: 9671] +- Added e-smith-mysql-2.6.0.bz9671.RemoveDummyMysqlDatabase.patch + +* Mon Jul 18 2016 Jean-Philipe Pialasse 2.6.0-8.sme +- fix forgotten mysqld variables in various scripts [SME: 9438] +- e-smith-mysql-2.6.0-mariadb_forgotten_var.patch + +* Mon Apr 11 2016 Daniel Berteaud 2.6.0-7.sme +- Use default InnoDB settings [SME: 9439] + * Mon Apr 11 2016 Daniel Berteaud 2.6.0-6.sme - Rename mysqld to mariadb [SME: 9438] @@ -733,7 +777,10 @@ mysql. %setup %patch0 -p1 %patch1 -p1 - +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 # mysqld renamed to mariadb [SME: 9438] # TODO: remove on next tarball creation rm -f root/service/mysqld @@ -744,6 +791,19 @@ rm -f root/etc/rc.d/init.d/supervise/mys rm -f root/etc/rc.d/rc7.d/S50mysqld mkdir -p root/var/log/mariadb.run +%patch6 -p1 +# move mariadb to systemd +%patch7 -p1 +rm -rf root/etc/e-smith/templates.metadata/var/service +rm -rf root/etc/e-smith/templates/var/service/mariadb +rm -rf root/var/service +rm -rf root/service +rm -rf root/etc/rc.d/init.d/supervise +rm -rf root/var/log + +# move mysql.init +%patch8 -p1 +rm -rf root/etc/rc.d/rc7.d %build perl createlinks @@ -752,12 +812,7 @@ perl createlinks rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ - --file /var/service/mariadb/run 'attr(0755,root,root)' \ - --file /var/service/mariadb/control/t 'attr(0750,root,root)' \ - --file /var/service/mariadb/control/d 'attr(0750,root,root)' \ - --file /var/service/mariadb/control/i 'attr(0750,root,root)' \ - --file /var/service/mariadb/control/q 'attr(0750,root,root)' \ - --file /var/service/mariadb/log/run 'attr(0755,root,root)' \ + --file /sbin/e-smith/systemd/mariadb-initialize 'attr(0554,root,root)' \ --dir '/var/log/mariadb.run' 'attr(2750,smelog,smelog)' \ --dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \ > %{name}-%{version}-filelist @@ -766,6 +821,14 @@ echo "%doc COPYING" >> %{name}- %clean rm -rf $RPM_BUILD_ROOT +%pre +if [ $1 -gt 1 ] ; then + if [ -e /var/service/mariadb/run ] ; then + /usr/bin/sv d mariadb + /usr/bin/sv d mariadb/log + fi +fi + %post %postun