--- rpms/smeserver-mysql/sme10/smeserver-mysql.spec 2022/03/13 02:42:12 1.2 +++ rpms/smeserver-mysql/sme10/smeserver-mysql.spec 2022/03/14 01:15:56 1.8 @@ -2,12 +2,13 @@ Summary: Koozali SME Server specific mys %define name smeserver-mysql Name: %{name} %define version 2.7.0 -%define release 1 +%define release 4 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Networking/Daemons Source: %{name}-%{version}.tar.xz +Patch0: smeserver-mysql-2.7.0-bz11899-sclo.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch @@ -27,6 +28,7 @@ mysql. %prep %setup +%patch0 -p1 %build for ver in 101 102 103 105 @@ -48,7 +50,7 @@ do # default values from /etc/opt/rh/rh-mariadb101/my.cnf.d/mariadb-server.cnf basedir="/opt/rh/rh-mariadb$ver/root/usr" datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql" -socket="/var/lib/mysql/maradb$ver.sock" +socket="/var/lib/mysql/mariadb$ver.sock" logerror="/var//log/mariadb$ver/mariadb.log" #"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log" pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid" @@ -162,9 +164,8 @@ sed -i root$ver/sbin/e-smith/systemd/mar ## logrotate mkdir -p root$ver/etc/logrotate.d/ -sed rootscl/etc/logrotate.d/mariadb_VER_ -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/logrotate.d/mariadb${ver} -#cp -a root/etc/e-smith/templates/etc/logrotate.d/mariadb root$ver/etc/e-smith/templates/etc/logrotate.d/mariadb$ver -# TODO sed -i add --socket= and change path +sed rootscl/etc/logrotate.d/mariadb_VER_ -e "s_!!!VER!!!_${ver}_g" \ + -e "s_!!!SOCKET!!!_${socket}_g" > root$ver/etc/logrotate.d/mariadb${ver} #systemd service @@ -175,14 +176,27 @@ cp rootscl/usr/lib/systemd/system/mariad cp rootscl/usr/lib/systemd/system/mariadb_VER_-mysql.init.service 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 \ -e "s_!!!VER!!!_${ver}_g" +if [ $ver -ge 102 ] +then + sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ + -e "s/_safe//"; +fi + #### TODO check it is similar to rh one and functional ! #/usb/bin to ease user mkdir root$ver/usr/bin for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog do - 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} done + +#phpMyAdmin template +mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/ +sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_ \ + -e "s_!!!SOCKET!!!_$socket _g" \ + -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} + done ################################################### @@ -210,6 +224,12 @@ do --file "/sbin/e-smith/systemd/mariadb$ver-mysql.init" 'attr(0554,root,root)' \ --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \ --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \ + --file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \ + --file "/usr/bin/mysqladmin$ver" 'attr(0554,root,root)' \ + --file "/usr/bin/mysqlbinlog$ver" 'attr(0554,root,root)' \ + --file "/usr/bin/mysqldump$ver" 'attr(0554,root,root)' \ + --file "/usr/bin/mysqlimport$ver" 'attr(0554,root,root)' \ + --file "/usr/bin/mysqlshow$ver" 'attr(0554,root,root)' \ | grep -vE '/home/e-smith/db/mysql$' \ > %{name}-%{version}-filelist-mariadb$ver echo "%doc COPYING" >> %{name}-%{version}-filelist-mariadb$ver @@ -299,6 +319,18 @@ Koozali SME Server configuration package %changelog +* Sun Mar 13 2022 Jean-Philippe Pialasse 2.7.0-4.sme +- fix typo in socket, seen with phpmyadmin [SME: 11899] + +* Sun Mar 13 2022 Jean-Philippe Pialasse 2.7.0-3.sme +- missing phpMyAdmin fragments [SME: 11899] + +* Sun Mar 13 2022 Jean-Philippe Pialasse 2.7.0-2.sme +- fix few sclo issues [SME: 11899] + missing +x for binaries shortcut + mariadb105 passwordless root access + mysqld_safe-scl-helper vs mysqld-scl-helper + * Fri Mar 11 2022 Jean-Philippe Pialasse 2.7.0-1.sme - prepare spec for multiple version support [SME: 11899] - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]