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 1 |
%define release 3 |
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 |
12 |
|
|
13 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
14 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
28 |
|
|
29 |
%prep |
%prep |
30 |
%setup |
%setup |
31 |
|
%patch0 -p1 |
32 |
|
|
33 |
%build |
%build |
34 |
for ver in 101 102 103 105 |
for ver in 101 102 103 105 |
164 |
|
|
165 |
## logrotate |
## logrotate |
166 |
mkdir -p root$ver/etc/logrotate.d/ |
mkdir -p root$ver/etc/logrotate.d/ |
167 |
sed rootscl/etc/logrotate.d/mariadb_VER_ -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/logrotate.d/mariadb${ver} |
sed rootscl/etc/logrotate.d/mariadb_VER_ -e "s_!!!VER!!!_${ver}_g" \ |
168 |
#cp -a root/etc/e-smith/templates/etc/logrotate.d/mariadb root$ver/etc/e-smith/templates/etc/logrotate.d/mariadb$ver |
-e "s_!!!SOCKET!!!_${socket}_g" > root$ver/etc/logrotate.d/mariadb${ver} |
|
# TODO sed -i add --socket= and change path |
|
169 |
|
|
170 |
|
|
171 |
#systemd service |
#systemd service |
176 |
cp rootscl/usr/lib/systemd/system/mariadb_VER_-mysql.init.service root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service |
cp rootscl/usr/lib/systemd/system/mariadb_VER_-mysql.init.service root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service |
177 |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service -i root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service \ |
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service -i root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service \ |
178 |
-e "s_!!!VER!!!_${ver}_g" |
-e "s_!!!VER!!!_${ver}_g" |
179 |
|
if [ $ver -ge 102 ] |
180 |
|
then |
181 |
|
sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ |
182 |
|
-e "s/_safe//"; |
183 |
|
fi |
184 |
|
|
185 |
#### TODO check it is similar to rh one and functional ! |
#### TODO check it is similar to rh one and functional ! |
186 |
|
|
187 |
#/usb/bin to ease user |
#/usb/bin to ease user |
188 |
mkdir root$ver/usr/bin |
mkdir root$ver/usr/bin |
189 |
for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog |
for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog |
190 |
do |
do |
191 |
echo "/opt/rh/rh-mariadb${ver}/root/usr/bin/$i --socket=/var/lib/mysql/maradb${ver}.sock \"\$\@\" $i" >root$ver/usr/bin/$i${ver} |
echo "/opt/rh/rh-mariadb${ver}/root/usr/bin/$i --socket=/var/lib/mysql/maradb${ver}.sock \"\$@\"" >root$ver/usr/bin/$i${ver} |
192 |
done |
done |
193 |
|
|
194 |
|
#phpMyAdmin template |
195 |
|
sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_ \ |
196 |
|
-e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} |
197 |
|
|
198 |
done |
done |
199 |
|
|
200 |
################################################### |
################################################### |
222 |
--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)' \ |
223 |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
224 |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
225 |
|
--file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ |
226 |
|
--file "/usr/bin/mysqladmin$ver" 'attr(0554,root,root)' \ |
227 |
|
--file "/usr/bin/mysqlbinlog$ver" 'attr(0554,root,root)' \ |
228 |
|
--file "/usr/bin/mysqldump$ver" 'attr(0554,root,root)' \ |
229 |
|
--file "/usr/bin/mysqlimport$ver" 'attr(0554,root,root)' \ |
230 |
|
--file "/usr/bin/mysqlshow$ver" 'attr(0554,root,root)' \ |
231 |
| grep -vE '/home/e-smith/db/mysql$' \ |
| grep -vE '/home/e-smith/db/mysql$' \ |
232 |
> %{name}-%{version}-filelist-mariadb$ver |
> %{name}-%{version}-filelist-mariadb$ver |
233 |
echo "%doc COPYING" >> %{name}-%{version}-filelist-mariadb$ver |
echo "%doc COPYING" >> %{name}-%{version}-filelist-mariadb$ver |
317 |
|
|
318 |
|
|
319 |
%changelog |
%changelog |
320 |
|
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme |
321 |
|
- missing phpMyAdmin fragments [SME: 11899] |
322 |
|
|
323 |
|
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme |
324 |
|
- fix few sclo issues [SME: 11899] |
325 |
|
missing +x for binaries shortcut |
326 |
|
mariadb105 passwordless root access |
327 |
|
mysqld_safe-scl-helper vs mysqld-scl-helper |
328 |
|
|
329 |
* Fri Mar 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-1.sme |
* Fri Mar 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-1.sme |
330 |
- prepare spec for multiple version support [SME: 11899] |
- prepare spec for multiple version support [SME: 11899] |
331 |
- package renamed from e-smith-mysql to smeserver-mysql [SME: 11897] |
- package renamed from e-smith-mysql to smeserver-mysql [SME: 11897] |
332 |
- remove duplicate logrotate and remove unsused template [SME: 11467] |
- remove duplicate logrotate and remove unsused template [SME: 11467] |
333 |
- move scripts /etc/rc.d/init.d/mysql-init to /sbin/e-smith/systemd [SME: 11898] |
- move scripts /etc/rc.d/init.d/mysql-init to /sbin/e-smith/systemd [SME: 11898] |
334 |
- add rh-mariadb101 support [SME: ] |
- add rh-mariadb101 support [SME: 11901] |
335 |
- add rh-mariadb102 support [SME: ] |
- add rh-mariadb102 support [SME: 11902] |
336 |
- add rh-mariadb103 support [SME: ] |
- add rh-mariadb103 support [SME: 11903] |
337 |
- add rh-mariadb105 support [SME: ] |
- add rh-mariadb105 support [SME: 11904] |
338 |
|
|
339 |
* Tue Aug 17 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 2.6.0-22.sme |
* Tue Aug 17 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 2.6.0-22.sme |
340 |
- Remove template and set default max_allowed_packet=16M |
- Remove template and set default max_allowed_packet=16M |