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 2 |
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 |
done |
done |
194 |
|
|
217 |
--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)' \ |
218 |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
--dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ |
219 |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
--dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ |
220 |
|
--file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ |
221 |
|
--file "/usr/bin/mysqladmin$ver" 'attr(0554,root,root)' \ |
222 |
|
--file "/usr/bin/mysqlbinlog$ver" 'attr(0554,root,root)' \ |
223 |
|
--file "/usr/bin/mysqldump$ver" 'attr(0554,root,root)' \ |
224 |
|
--file "/usr/bin/mysqlimport$ver" 'attr(0554,root,root)' \ |
225 |
|
--file "/usr/bin/mysqlshow$ver" 'attr(0554,root,root)' \ |
226 |
| grep -vE '/home/e-smith/db/mysql$' \ |
| grep -vE '/home/e-smith/db/mysql$' \ |
227 |
> %{name}-%{version}-filelist-mariadb$ver |
> %{name}-%{version}-filelist-mariadb$ver |
228 |
echo "%doc COPYING" >> %{name}-%{version}-filelist-mariadb$ver |
echo "%doc COPYING" >> %{name}-%{version}-filelist-mariadb$ver |
312 |
|
|
313 |
|
|
314 |
%changelog |
%changelog |
315 |
|
* Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme |
316 |
|
- fix few sclo issues [SME: 11899] |
317 |
|
missing +x for binaries shortcut |
318 |
|
mariadb105 passwordless root access |
319 |
|
mysqld_safe-scl-helper vs mysqld-scl-helper |
320 |
|
|
321 |
* 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 |
322 |
- prepare spec for multiple version support [SME: 11899] |
- prepare spec for multiple version support [SME: 11899] |
323 |
- package renamed from e-smith-mysql to smeserver-mysql [SME: 11897] |
- package renamed from e-smith-mysql to smeserver-mysql [SME: 11897] |