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 3 |
%define release 6 |
6 |
Version: %{version} |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
8 |
License: GPL |
License: GPL |
50 |
# default values from /etc/opt/rh/rh-mariadb101/my.cnf.d/mariadb-server.cnf |
# default values from /etc/opt/rh/rh-mariadb101/my.cnf.d/mariadb-server.cnf |
51 |
basedir="/opt/rh/rh-mariadb$ver/root/usr" |
basedir="/opt/rh/rh-mariadb$ver/root/usr" |
52 |
datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql" |
datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql" |
53 |
socket="/var/lib/mysql/maradb$ver.sock" |
socket="/var/lib/mysql/mariadb$ver.sock" |
54 |
logerror="/var//log/mariadb$ver/mariadb.log" |
logerror="/var//log/mariadb$ver/mariadb.log" |
55 |
#"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log" |
#"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log" |
56 |
pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid" |
pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid" |
160 |
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 \ |
161 |
-i root$ver/sbin/e-smith/mariadb${ver}-preload \ |
-i root$ver/sbin/e-smith/mariadb${ver}-preload \ |
162 |
-e "s_!!!VER!!!_${ver}_g" \ |
-e "s_!!!VER!!!_${ver}_g" \ |
163 |
-e "s_!!!SOCKET!!!_$socket _g" |
-e "s_!!!SOCKET!!!_${socket}_g" |
164 |
|
if [ $ver -ge 104 ] |
165 |
|
then |
166 |
|
cp rootscl/sbin/e-smith/systemd/mariadb_VER_-post root$ver/sbin/e-smith/systemd/mariadb${ver}-post |
167 |
|
sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-post -e "s_!!!VER!!!_${ver}_g" -e "s_!!!SOCKET!!!_${socket}_g" |
168 |
|
fi |
169 |
|
|
170 |
|
|
171 |
## logrotate |
## logrotate |
172 |
mkdir -p root$ver/etc/logrotate.d/ |
mkdir -p root$ver/etc/logrotate.d/ |
187 |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
188 |
-e "s/_safe//"; |
-e "s/_safe//"; |
189 |
fi |
fi |
190 |
|
if [ $ver -ge 104 ] |
191 |
|
then |
192 |
|
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
193 |
|
-e 's_set.password$_set.password2_' |
194 |
|
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
195 |
|
-e "/^#ExecStartPost=/ i ExecStartPost=\/sbin\/e-smith\/systemd\/mariadb${ver}-post" |
196 |
|
|
197 |
|
fi |
198 |
|
|
199 |
#### TODO check it is similar to rh one and functional ! |
#### TODO check it is similar to rh one and functional ! |
200 |
|
|
201 |
#/usb/bin to ease user |
#/usr/bin to ease user |
202 |
mkdir root$ver/usr/bin |
mkdir root$ver/usr/bin |
203 |
for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog |
for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog |
204 |
do |
do |
205 |
echo "/opt/rh/rh-mariadb${ver}/root/usr/bin/$i --socket=/var/lib/mysql/maradb${ver}.sock \"\$@\"" >root$ver/usr/bin/$i${ver} |
echo "/opt/rh/rh-mariadb${ver}/root/usr/bin/$i --socket=/var/lib/mysql/mariadb${ver}.sock \"\$@\"" >root$ver/usr/bin/$i${ver} |
206 |
done |
done |
207 |
|
|
208 |
#phpMyAdmin template |
#phpMyAdmin template |
209 |
|
mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/ |
210 |
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_ \ |
211 |
-e "s_!!!VER!!!_${ver}_g" > rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} |
-e "s_!!!SOCKET!!!_${socket}_g" \ |
212 |
|
-e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} |
213 |
|
|
214 |
done |
done |
215 |
|
|
236 |
/sbin/e-smith/genfilelist root$ver/ \ |
/sbin/e-smith/genfilelist root$ver/ \ |
237 |
--file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \ |
--file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \ |
238 |
--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)' \ |
239 |
|
--file "/sbin/e-smith/systemd/mariadb$ver-post.init" 'attr(0554,root,root)' \ |
240 |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
241 |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
242 |
--file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ |
--file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ |
322 |
Requires: rh-mariadb105-mariadb |
Requires: rh-mariadb105-mariadb |
323 |
Requires: rh-mariadb105-mariadb-server |
Requires: rh-mariadb105-mariadb-server |
324 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
325 |
|
Requires: smeserver-mysql >= 2.7.0-5 |
326 |
%description -n smeserver-mariadb105 |
%description -n smeserver-mariadb105 |
327 |
Koozali SME Server configuration package for mariadb105 RH SCLo |
Koozali SME Server configuration package for mariadb105 RH SCLo |
328 |
|
|
334 |
|
|
335 |
|
|
336 |
%changelog |
%changelog |
337 |
|
* Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme |
338 |
|
- fix password for mariadb 105 [SME: 11899] |
339 |
|
|
340 |
|
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme |
341 |
|
- fix typo in socket, seen with phpmyadmin [SME: 11899] |
342 |
|
- fix permissions for mariadb105 [SME: 11899] |
343 |
|
create a dedicated set.password for mariadb>103 |
344 |
|
|
345 |
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme |
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme |
346 |
- fix [SME: ] |
- missing phpMyAdmin fragments [SME: 11899] |
347 |
|
|
348 |
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme |
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme |
349 |
- fix few sclo issues [SME: 11899] |
- fix few sclo issues [SME: 11899] |