--- rpms/smeserver-mysql/sme10/smeserver-mysql.spec 2022/03/14 05:13:46 1.14 +++ rpms/smeserver-mysql/sme10/smeserver-mysql.spec 2022/03/16 20:02:52 1.23 @@ -2,7 +2,7 @@ Summary: Koozali SME Server specific mys %define name smeserver-mysql Name: %{name} %define version 2.7.0 -%define release 5 +%define release 11 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -13,6 +13,8 @@ Patch0: smeserver-mysql-2.7.0-bz11899-sc BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: mariadb-server +# mariadb after 5.5 /in Centos 8 will package mysql_upgrade in mariadb-server-utils +# Requires: /usr/bin/mysql_upgrade Requires: mariadb Requires: e-smith-base Requires: e-smith-lib >= 1.15.1-19 @@ -112,11 +114,12 @@ sed -i root$ver/etc/e-smith/events/actio -i root$ver/etc/e-smith/events/actions/mariadb${ver}-delete-dumped-tables \ -i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \ -i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \ - -e "s_!!!VER!!!_${ver}_g" + -e "s_!!!VER!!!_${ver}_g" \ + -e "s_!!!SOCKET!!!_${socket}_g" ##metadata -mkdir -p root$ver/etc/e-smith/templates.metadata/etc/e-smith/ -cp -a root/etc/e-smith/templates.metadata/etc/e-smith/sql root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql$ver +mkdir -p root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql +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 ##templates @@ -160,7 +163,13 @@ cp rootscl/sbin/e-smith/mariadb_VER_-pre sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-initialize -i root$ver/sbin/e-smith/systemd/mariadb${ver}-mysql.init \ -i root$ver/sbin/e-smith/mariadb${ver}-preload \ -e "s_!!!VER!!!_${ver}_g" \ - -e "s_!!!SOCKET!!!_$socket _g" + -e "s_!!!SOCKET!!!_${socket}_g" +if [ $ver -ge 104 ] +then + cp rootscl/sbin/e-smith/systemd/mariadb_VER_-post root$ver/sbin/e-smith/systemd/mariadb${ver}-post + sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-post -e "s_!!!VER!!!_${ver}_g" -e "s_!!!SOCKET!!!_${socket}_g" +fi + ## logrotate mkdir -p root$ver/etc/logrotate.d/ @@ -184,12 +193,15 @@ fi if [ $ver -ge 104 ] then sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ - -e 's_set.password$_set.password2_' + -e 's_set.password$_set.password2_' + sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ + -e "/^#ExecStartPost=/ i ExecStartPost=\/sbin\/e-smith\/systemd\/mariadb${ver}-post" + fi #### TODO check it is similar to rh one and functional ! -#/usb/bin to ease user +#/usr/bin to ease user mkdir root$ver/usr/bin for i in mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog do @@ -199,7 +211,7 @@ 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_!!!SOCKET!!!_${socket}_g" \ -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver} done @@ -227,6 +239,7 @@ do /sbin/e-smith/genfilelist root$ver/ \ --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \ --file "/sbin/e-smith/systemd/mariadb$ver-mysql.init" 'attr(0554,root,root)' \ + --file "/sbin/e-smith/systemd/mariadb$ver-post" '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)' \ @@ -296,6 +309,7 @@ Group: Database Requires: rh-mariadb103 Requires: rh-mariadb103-mariadb Requires: rh-mariadb103-mariadb-server +Requires: rh-mariadb103-mariadb-server-utils BuildRequires: e-smith-devtools >= 1.13.1-03 %description -n smeserver-mariadb103 @@ -311,6 +325,7 @@ Group: Database Requires: rh-mariadb105 Requires: rh-mariadb105-mariadb Requires: rh-mariadb105-mariadb-server +Requires: rh-mariadb105-mariadb-server-utils BuildRequires: e-smith-devtools >= 1.13.1-03 Requires: smeserver-mysql >= 2.7.0-5 %description -n smeserver-mariadb105 @@ -324,6 +339,21 @@ Koozali SME Server configuration package %changelog +* Wed Mar 16 2022 Jean-Philippe Pialasse 2.7.0-11.sme +- fix mariadb*-mysql.init path in service file [SME: 11899] + +* Wed Mar 16 2022 Jean-Philipe Pialasse 2.7.0-10.sme +- fix sclo metadata path for sql/init templated scripts [SME: 11899] + +* Wed Mar 16 2022 Jean-Philipe Pialasse 2.7.0-8.sme +- missing sockets for backup of db [SME: 11899] + +* Mon Mar 14 2022 Jean-Philippe Pialasse 2.7.0-7.sme +- adding requirement for mariadb-server-utils (105 and 103) [SME: 11899] + +* Mon Mar 14 2022 Jean-Philippe Pialasse 2.7.0-6.sme +- fix password for mariadb 105 [SME: 11899] + * Sun Mar 13 2022 Jean-Philippe Pialasse 2.7.0-5.sme - fix typo in socket, seen with phpmyadmin [SME: 11899] - fix permissions for mariadb105 [SME: 11899]