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 5 |
%define release 10 |
6 |
Version: %{version} |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
8 |
License: GPL |
License: GPL |
13 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
14 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
15 |
Requires: mariadb-server |
Requires: mariadb-server |
16 |
|
# mariadb after 5.5 /in Centos 8 will package mysql_upgrade in mariadb-server-utils |
17 |
|
# Requires: /usr/bin/mysql_upgrade |
18 |
Requires: mariadb |
Requires: mariadb |
19 |
Requires: e-smith-base |
Requires: e-smith-base |
20 |
Requires: e-smith-lib >= 1.15.1-19 |
Requires: e-smith-lib >= 1.15.1-19 |
114 |
-i root$ver/etc/e-smith/events/actions/mariadb${ver}-delete-dumped-tables \ |
-i root$ver/etc/e-smith/events/actions/mariadb${ver}-delete-dumped-tables \ |
115 |
-i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \ |
-i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \ |
116 |
-i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \ |
-i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \ |
117 |
-e "s_!!!VER!!!_${ver}_g" |
-e "s_!!!VER!!!_${ver}_g" \ |
118 |
|
-e "s_!!!SOCKET!!!_${socket}_g" |
119 |
|
|
120 |
##metadata |
##metadata |
121 |
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 |
122 |
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 |
123 |
|
|
124 |
|
|
125 |
##templates |
##templates |
163 |
sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-initialize -i root$ver/sbin/e-smith/systemd/mariadb${ver}-mysql.init \ |
sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-initialize -i root$ver/sbin/e-smith/systemd/mariadb${ver}-mysql.init \ |
164 |
-i root$ver/sbin/e-smith/mariadb${ver}-preload \ |
-i root$ver/sbin/e-smith/mariadb${ver}-preload \ |
165 |
-e "s_!!!VER!!!_${ver}_g" \ |
-e "s_!!!VER!!!_${ver}_g" \ |
166 |
-e "s_!!!SOCKET!!!_$socket _g" |
-e "s_!!!SOCKET!!!_${socket}_g" |
167 |
|
if [ $ver -ge 104 ] |
168 |
|
then |
169 |
|
cp rootscl/sbin/e-smith/systemd/mariadb_VER_-post root$ver/sbin/e-smith/systemd/mariadb${ver}-post |
170 |
|
sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-post -e "s_!!!VER!!!_${ver}_g" -e "s_!!!SOCKET!!!_${socket}_g" |
171 |
|
fi |
172 |
|
|
173 |
|
|
174 |
## logrotate |
## logrotate |
175 |
mkdir -p root$ver/etc/logrotate.d/ |
mkdir -p root$ver/etc/logrotate.d/ |
193 |
if [ $ver -ge 104 ] |
if [ $ver -ge 104 ] |
194 |
then |
then |
195 |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
196 |
-e 's_set.password$_set.password2_' |
-e 's_set.password$_set.password2_' |
197 |
|
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
198 |
|
-e "/^#ExecStartPost=/ i ExecStartPost=\/sbin\/e-smith\/systemd\/mariadb${ver}-post" |
199 |
|
|
200 |
fi |
fi |
201 |
|
|
202 |
#### TODO check it is similar to rh one and functional ! |
#### TODO check it is similar to rh one and functional ! |
203 |
|
|
204 |
#/usb/bin to ease user |
#/usr/bin to ease user |
205 |
mkdir root$ver/usr/bin |
mkdir root$ver/usr/bin |
206 |
for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog |
for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog |
207 |
do |
do |
211 |
#phpMyAdmin template |
#phpMyAdmin template |
212 |
mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/ |
mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/ |
213 |
sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_ \ |
sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_ \ |
214 |
-e "s_!!!SOCKET!!!_$socket _g" \ |
-e "s_!!!SOCKET!!!_${socket}_g" \ |
215 |
-e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} |
-e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} |
216 |
|
|
217 |
done |
done |
239 |
/sbin/e-smith/genfilelist root$ver/ \ |
/sbin/e-smith/genfilelist root$ver/ \ |
240 |
--file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \ |
--file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \ |
241 |
--file "/sbin/e-smith/systemd/mariadb$ver-mysql.init" 'attr(0554,root,root)' \ |
--file "/sbin/e-smith/systemd/mariadb$ver-mysql.init" 'attr(0554,root,root)' \ |
242 |
|
--file "/sbin/e-smith/systemd/mariadb$ver-post" 'attr(0554,root,root)' \ |
243 |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
244 |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
245 |
--file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ |
--file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ |
309 |
Requires: rh-mariadb103 |
Requires: rh-mariadb103 |
310 |
Requires: rh-mariadb103-mariadb |
Requires: rh-mariadb103-mariadb |
311 |
Requires: rh-mariadb103-mariadb-server |
Requires: rh-mariadb103-mariadb-server |
312 |
|
Requires: rh-mariadb103-mariadb-server-utils |
313 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
314 |
|
|
315 |
%description -n smeserver-mariadb103 |
%description -n smeserver-mariadb103 |
325 |
Requires: rh-mariadb105 |
Requires: rh-mariadb105 |
326 |
Requires: rh-mariadb105-mariadb |
Requires: rh-mariadb105-mariadb |
327 |
Requires: rh-mariadb105-mariadb-server |
Requires: rh-mariadb105-mariadb-server |
328 |
|
Requires: rh-mariadb105-mariadb-server-utils |
329 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
330 |
Requires: smeserver-mysql >= 2.7.0-5 |
Requires: smeserver-mysql >= 2.7.0-5 |
331 |
%description -n smeserver-mariadb105 |
%description -n smeserver-mariadb105 |
339 |
|
|
340 |
|
|
341 |
%changelog |
%changelog |
342 |
|
* Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-10.sme |
343 |
|
- fix sclo metadata path for sql/init templated scripts [SME: 11899] |
344 |
|
|
345 |
|
* Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme |
346 |
|
- missing sockets for backup of db [SME: 11899] |
347 |
|
|
348 |
|
* Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-7.sme |
349 |
|
- adding requirement for mariadb-server-utils (105 and 103) [SME: 11899] |
350 |
|
|
351 |
|
* Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme |
352 |
|
- fix password for mariadb 105 [SME: 11899] |
353 |
|
|
354 |
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme |
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme |
355 |
- fix typo in socket, seen with phpmyadmin [SME: 11899] |
- fix typo in socket, seen with phpmyadmin [SME: 11899] |
356 |
- fix permissions for mariadb105 [SME: 11899] |
- fix permissions for mariadb105 [SME: 11899] |