--- rpms/smeserver-automysqlbackup/contribs9/smeserver-automysqlbackup.spec 2018/11/27 14:00:37 1.7 +++ rpms/smeserver-automysqlbackup/contribs9/smeserver-automysqlbackup.spec 2019/11/26 17:18:49 1.9 @@ -1,6 +1,6 @@ %define name smeserver-automysqlbackup %define version 3.0.RC6 -%define release 11 +%define release 13 %define rpmver 3.0.RC6 epoch: 2 @@ -22,6 +22,7 @@ Patch0: smeserver-automysqlbackup-Adjust Patch1: smeserver-automysqlbackup-enhanced-templates.patch Patch2: smeserver-automysqlbackup-fix-runmysql.patch Patch3: smeserver-automysqlbackup-update-permission-change.patch +Patch4: smeserver-automysqlbackup-3.0.RC6-bz10806.errorsAndCreateUsers.patch %description This RPM is an unofficial addon for the SME Server 9.x. @@ -32,6 +33,19 @@ This script is based on automysqlbackup %changelog +* Sun Sep 22 2019 Jean-Philipe Pialasse 3.0.RC6-13.sme +- fix multiple cause of error noise and performance [SME: 10806] + * avoid parallel run of all backups, cron template rewritten + * avoid multiple parallel or repeated chmod and chown + * protect from undesired chmod or chown + * consistent use of status for cron and conf templates + * create backup user for mysql, mysql55 and mysql57 (Maria to do) + * update mysql53 use to mysql51 as variable + * migrate fragment to remove Mysql55 Mysql57 Mymaria Mysql53 if Mysql53 exist + * remove default value in db for Mysql55 Mysql57 Mymaria Mysql53 + * default as enabled in fragments for all automysql My* properties +- create default user in dbs [SME: 10808] + * Mon Nov 26 2018 John Crisp 3.0.RC6-11.sme - fix runmysqlscript to allow for change in Backupdir key [SME: 10655] @@ -72,6 +86,7 @@ rm -rf $RPM_BUILD_ROOT %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build perl createlinks @@ -95,29 +110,6 @@ rm -rf $RPM_BUILD_ROOT %pre %post -SMEDB=automysqlbackup -MYSQLUSER=backupuser -# Expland template -/etc/e-smith/events/actions/initialize-default-databases -/sbin/e-smith/expand-template /etc/cron.d/runmysqlbackup - -echo "***********************************************************************" -echo " " -echo "Creating backup user for default mysql53 database" -#create backupuser and give rights -MYSQLPASS=$(/sbin/e-smith/config getprop $SMEDB DbPassword) -mysql -e " GRANT EVENT,SELECT,LOCK TABLES ON *.* TO $MYSQLUSER@'localhost' " -mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) " -mysqladmin flush-privileges -/etc/rc.d/init.d/mysql.init start -echo "done" -echo "*** If you add mysql55/mysql57 you must add a backup user ***" -echo "You can use the password from config show automysqlbackup" -echo "e.g.: " -echo "mysql55 -e \" GRANT EVENT,SELECT,LOCK TABLES ON *.* TO $MYSQLUSER@\'localhost\' \" " -echo "mysql55 -u root -e \"SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( \'$MYSQLPASS\' ) \" " -echo " " -echo "***********************************************************************" #protect the backup folder chmod -R 700 /root/backup/db