2 |
%define name smeserver-mysql |
%define name smeserver-mysql |
3 |
Name: %{name} |
Name: %{name} |
4 |
%define version 2.7.0 |
%define version 2.7.0 |
5 |
%define release 8 |
%define release 15 |
6 |
Version: %{version} |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
8 |
License: GPL |
License: GPL |
9 |
Group: Networking/Daemons |
Group: Networking/Daemons |
10 |
Source: %{name}-%{version}.tar.xz |
Source: %{name}-%{version}.tar.xz |
11 |
Patch0: smeserver-mysql-2.7.0-bz11899-sclo.patch |
Patch0: smeserver-mysql-2.7.0-bz11899-sclo.patch |
12 |
|
Patch1: smeserver-mysql-2.7.0-bz11922-mysqlinit.patch |
13 |
|
Patch2: smeserver-mysql-2.7.0-bz11936.patch |
14 |
|
|
15 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
16 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
33 |
%prep |
%prep |
34 |
%setup |
%setup |
35 |
%patch0 -p1 |
%patch0 -p1 |
36 |
|
%patch1 -p1 |
37 |
|
%patch2 -p1 |
38 |
|
|
39 |
%build |
%build |
40 |
for ver in 101 102 103 105 |
for ver in 101 102 103 105 |
122 |
-e "s_!!!SOCKET!!!_${socket}_g" |
-e "s_!!!SOCKET!!!_${socket}_g" |
123 |
|
|
124 |
##metadata |
##metadata |
125 |
mkdir -p root$ver/etc/e-smith/templates.metadata/etc/e-smith/ |
mkdir -p root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql |
126 |
cp -a root/etc/e-smith/templates.metadata/etc/e-smith/sql root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql$ver |
cp -a root/etc/e-smith/templates.metadata/etc/e-smith/sql/init root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql/init$ver |
127 |
|
|
128 |
|
|
129 |
##templates |
##templates |
132 |
sed -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/00_restore_dumped_dbs -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/10mysql_upgrade \ |
sed -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/00_restore_dumped_dbs -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/10mysql_upgrade \ |
133 |
-e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \ |
-e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \ |
134 |
-e "s_/usr/bin/mysql_/opt/rh/rh-mariadb${ver}/root/usr/bin/mysql_g" \ |
-e "s_/usr/bin/mysql_/opt/rh/rh-mariadb${ver}/root/usr/bin/mysql_g" \ |
135 |
-e "s_mariadb.service_rh-mariadb$ver-mariadb.service_" \ |
-e "s_mariadb.service_mariadb$ver-mariadb.service_" \ |
136 |
-e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \ |
-e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \ |
137 |
-e "s_mysqld_rh-mariadb$ver-mariadb_g" \ |
-e "s_mysqld_mariadb$ver-mariadb_g" \ |
138 |
-e "s_| mysql |_| /opt/rh/rh-mariadb${ver}/root/usr/bin/mysql --socket=$socket |_g" \ |
-e "s_| mysql |_| /opt/rh/rh-mariadb${ver}/root/usr/bin/mysql --socket=$socket |_g" \ |
139 |
-e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g" |
-e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g" |
140 |
mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf |
mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf |
192 |
if [ $ver -ge 102 ] |
if [ $ver -ge 102 ] |
193 |
then |
then |
194 |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
195 |
-e "s/_safe//"; |
-e "s/_safe//" \ |
196 |
|
-e "s/^ExecStopPost.*//"; |
197 |
fi |
fi |
198 |
if [ $ver -ge 104 ] |
if [ $ver -ge 104 ] |
199 |
then |
then |
344 |
|
|
345 |
|
|
346 |
%changelog |
%changelog |
347 |
|
* Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-15.sme |
348 |
|
- Fix init for MariaDB 104+ [SME:11991] |
349 |
|
|
350 |
|
* Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-14.sme |
351 |
|
- /usr/libexec/mysql-wait-stop not used after mariadb101 [SME: 11936] |
352 |
|
|
353 |
|
* Sat Apr 09 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-13.sme |
354 |
|
- fix few typos [SME: 11936] |
355 |
|
|
356 |
|
* Sat Apr 02 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-12.sme |
357 |
|
- remove SourcePath from mysql-init service file [SME: 11922] |
358 |
|
|
359 |
|
* Wed Mar 16 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-11.sme |
360 |
|
- fix mariadb*-mysql.init path in service file [SME: 11899] |
361 |
|
|
362 |
|
* Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-10.sme |
363 |
|
- fix sclo metadata path for sql/init templated scripts [SME: 11899] |
364 |
|
|
365 |
* Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme |
* Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme |
366 |
- missing sockets for backup of db [SME: 11899] |
- missing sockets for backup of db [SME: 11899] |
367 |
|
|