--- rpms/smeserver-mysql/sme10/smeserver-mysql.spec 2022/03/16 07:29:21 1.20 +++ rpms/smeserver-mysql/sme10/smeserver-mysql.spec 2022/12/11 05:23:03 1.31 @@ -2,13 +2,17 @@ Summary: Koozali SME Server specific mys %define name smeserver-mysql Name: %{name} %define version 2.7.0 -%define release 8 +%define release 17 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Networking/Daemons Source: %{name}-%{version}.tar.xz Patch0: smeserver-mysql-2.7.0-bz11899-sclo.patch +Patch1: smeserver-mysql-2.7.0-bz11922-mysqlinit.patch +Patch2: smeserver-mysql-2.7.0-bz11936.patch +Patch3: smeserver-mysql-2.7.0-bz11953-mysql.init-logging.patch +Patch4: smeserver-mysql-2.7.0-bz12262-skipnetworking.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch @@ -31,6 +35,10 @@ mysql. %prep %setup %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build for ver in 101 102 103 105 @@ -118,8 +126,8 @@ sed -i root$ver/etc/e-smith/events/actio -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 @@ -128,9 +136,9 @@ cp root/etc/e-smith/templates/etc/e-sm sed -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/00_restore_dumped_dbs -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/10mysql_upgrade \ -e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \ -e "s_/usr/bin/mysql_/opt/rh/rh-mariadb${ver}/root/usr/bin/mysql_g" \ - -e "s_mariadb.service_rh-mariadb$ver-mariadb.service_" \ + -e "s_mariadb.service_mariadb$ver-mariadb.service_" \ -e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \ - -e "s_mysqld_rh-mariadb$ver-mariadb_g" \ + -e "s_mysqld_mariadb$ver-mariadb_g" \ -e "s_| mysql |_| /opt/rh/rh-mariadb${ver}/root/usr/bin/mysql --socket=$socket |_g" \ -e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g" mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf @@ -138,10 +146,14 @@ echo " [mariadb-$vers]" > root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-05mariadb echo "basedir=$basedir" > root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-07basedir echo "datadir=$datadir" > root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-08datadir -cp -a root/etc/e-smith/templates/etc/my.cnf/009socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket -sed -i root$ver/etc/e-smith/templates/etc/my.cnf/$ver-09socket \ - -e "s_mariadb_{'mariadb${ver}\-mariadb'}_" \ - -e "s_^socket.*_socket=${socket}_" +#cp -a root/etc/e-smith/templates/etc/my.cnf/009socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket +#sed -i root$ver/etc/e-smith/templates/etc/my.cnf/$ver-09socket \ +# -e "s_mariadb_{'mariadb${ver}\-mariadb'}_" \ +# -e "s_^socket.*_socket=${socket}_" +cp rootscl/etc/e-smith/templates/etc/my.conf/_VER_09socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket +sed -i root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket \ + -e "s_!!!VER!!!_${ver}_g" \ + -e "s_!!!PORT!!!_${port}_g" cp rootscl/etc/e-smith/templates/etc/my.conf/_VER_-10port root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-10port sed -i root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-10port \ -e "s_!!!VER!!!_${ver}_g" \ @@ -188,7 +200,8 @@ sed -i root$ver/usr/lib/systemd/system/m if [ $ver -ge 102 ] then sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \ - -e "s/_safe//"; + -e "s/_safe//" \ + -e "s/^ExecStopPost.*//"; fi if [ $ver -ge 104 ] then @@ -229,6 +242,7 @@ rm -rf $RPM_BUILD_ROOT --file "/sbin/e-smith/systemd/mysql.init" 'attr(0554,root,root)' \ --dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \ --dir "/var/log/mariadb" 'attr(0750,mysql,mysql)' \ + --dir "/var/log/mysql.init" 'attr(0750,root,root)' \ > %{name}-%{version}-filelist echo "%doc COPYING" >> %{name}-%{version}-filelist @@ -339,6 +353,30 @@ Koozali SME Server configuration package %changelog +* Sun Dec 11 2022 Jean-Philippe Pialasse 2.7.0-17.sme +- fix mariadb overriding skip-networking for other versions [SME: 12262] + +* Mon Jul 11 2022 Jean-Philippe Pialasse 2.7.0-16.sme +- use dedicated log file for *mysql.init [SME: 11953] + +* Tue Jun 07 2022 John Crisp 2.7.0-15.sme +- Fix init for MariaDB 104+ [SME:11991] + +* Sun Apr 10 2022 Jean-Philippe Pialasse 2.7.0-14.sme +- /usr/libexec/mysql-wait-stop not used after mariadb101 [SME: 11936] + +* Sat Apr 09 2022 Jean-Philippe Pialasse 2.7.0-13.sme +- fix few typos [SME: 11936] + +* Sat Apr 02 2022 Jean-Philippe Pialasse 2.7.0-12.sme +- remove SourcePath from mysql-init service file [SME: 11922] + +* 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]