From 4df3132bce8707e8b04f298ce0e3813ef5711cb7 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Thu, 9 Oct 2025 11:35:36 +1100 Subject: [PATCH] initial commit of file from CVS for automysqlbackup on Thu Oct 9 11:35:36 AEDT 2025 --- .gitattributes | 1 + .gitignore | 3 + Makefile | 21 ++++ README.md | 8 +- ...kup-3.0.RC6-bz11970-skip-lock-tables.patch | 19 ++++ automysqlbackup-3.0.RC6.set-backup-dir.patch | 15 +++ automysqlbackup-3.0.RC6.tar.gz | 3 + automysqlbackup.spec | 100 ++++++++++++++++++ contriborbase | 1 + 9 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 automysqlbackup-3.0.RC6-bz11970-skip-lock-tables.patch create mode 100644 automysqlbackup-3.0.RC6.set-backup-dir.patch create mode 100644 automysqlbackup-3.0.RC6.tar.gz create mode 100644 automysqlbackup.spec create mode 100644 contriborbase diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f087b42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1534ba5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +*.log +*spec-20* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3c0292f --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: automysqlbackup +# $Id: Makefile,v 1.1 2020/10/19 04:58:59 brianr Exp $ +NAME := automysqlbackup +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 3397b09..3bf01e4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # automysqlbackup -3rd Party (Maintained by Koozali) git repo for automysqlbackup smecontribs \ No newline at end of file +3rd Party (Maintained by Koozali) git repo for automysqlbackup smecontribs + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
diff --git a/automysqlbackup-3.0.RC6-bz11970-skip-lock-tables.patch b/automysqlbackup-3.0.RC6-bz11970-skip-lock-tables.patch new file mode 100644 index 0000000..b1acbd7 --- /dev/null +++ b/automysqlbackup-3.0.RC6-bz11970-skip-lock-tables.patch @@ -0,0 +1,19 @@ +diff -ruN automysqlbackup-3.0.RC6.old/root/usr/local/bin/automysqlbackup automysqlbackup-3.0.RC6/root/usr/local/bin/automysqlbackup +--- automysqlbackup-3.0.RC6.old/root/usr/local/bin/automysqlbackup 2022-08-11 16:07:59.719945652 +0100 ++++ automysqlbackup-3.0.RC6/root/usr/local/bin/automysqlbackup 2022-08-11 16:09:01.888978867 +0100 +@@ -457,13 +457,13 @@ + # @deps: load_default_config + parse_configuration () { + # OPT string for use with mysqldump ( see man mysqldump ) +- opt=( '--quote-names' '--opt' '--events') ++ opt=( '--quote-names' '--opt' '--events' '--skip_lock_tables' ) + + # OPT string for use with mysql (see man mysql ) + mysql_opt=() + + # OPT string for use with mysqldump fullschema +- opt_fullschema=( '--all-databases' '--routines' '--no-data' ) ++ opt_fullschema=( '--all-databases' '--routines' '--no-data' '--skip_lock_tables' ) + + # OPT string for use with mysqlstatus + opt_dbstatus=( '--status' ) diff --git a/automysqlbackup-3.0.RC6.set-backup-dir.patch b/automysqlbackup-3.0.RC6.set-backup-dir.patch new file mode 100644 index 0000000..7d81484 --- /dev/null +++ b/automysqlbackup-3.0.RC6.set-backup-dir.patch @@ -0,0 +1,15 @@ +diff -ruN automysqlbackup-3.0.RC6.old/root/usr/local/bin/automysqlbackup automysqlbackup-3.0.RC6/root/usr/local/bin/automysqlbackup +--- automysqlbackup-3.0.RC6.old/root/usr/local/bin/automysqlbackup 2018-11-29 11:08:26.140497083 +0100 ++++ automysqlbackup-3.0.RC6/root/usr/local/bin/automysqlbackup 2018-11-29 11:32:05.998926410 +0100 +@@ -24,6 +24,11 @@ + ENCRYPT=$(/sbin/e-smith/config getprop automysqlbackup Encrypt) + DBENCRYPT_PASSWORD=$(/sbin/e-smith/config getprop automysqlbackup Dbencrypt_password) + BACKUP_LOCAL_FILES=$(/sbin/e-smith/config getprop automysqlbackup Backup_local_files) ++ ++if [ -z "$BACKUPDIR" ]; then ++ BACKUPDIR="/root/backup/db"; ++fi ++ + ### + shopt -s extglob + diff --git a/automysqlbackup-3.0.RC6.tar.gz b/automysqlbackup-3.0.RC6.tar.gz new file mode 100644 index 0000000..a74558b --- /dev/null +++ b/automysqlbackup-3.0.RC6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1eb805261a9e3fba043edd9d6512a76a8c174bb09e527f0787602dec0e2198c6 +size 21521 diff --git a/automysqlbackup.spec b/automysqlbackup.spec new file mode 100644 index 0000000..f1559de --- /dev/null +++ b/automysqlbackup.spec @@ -0,0 +1,100 @@ +%define name automysqlbackup +%define version 3.0.RC6 +%define release 8 +%define rpmver 3.0.RC6 + +Summary: automysqlbackup is a script to backup your msql database on sme8 +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: /Web/Application +Source: %{name}-%{version}.tar.gz +URL: http://sourceforge.net/projects/automysqlbackup/ +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArchitectures: noarch +Requires: e-smith-base, e-smith-release >= 10 +BuildRequires: e-smith-devtools + +# This patch is in CVS but was actually added to the script +# and is not required so please ignore it +# automysqlbackup-3.0.RC6.specify-event-options.patch + +Patch1: automysqlbackup-3.0.RC6.set-backup-dir.patch +Patch2: automysqlbackup-3.0.RC6-bz11970-skip-lock-tables.patch + +%description +This RPM is an unofficial addon for the SME Server 9.x. +The target audience is the Linux/E-smith administrator +who wants to backup their mysql databases with an automatic way. +This script is based on automysqlbackup V3.0 + +%changelog +* Thu Oct 09 2025 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Mon Aug 15 2022 John Crisp 3.0-RC6-8 +- Add skip-lock-tables to opts [SME: 11970] +- Bump esmith-release requires to 10 + +* Mon Oct 19 2020 Brian Read 3.0-RC6-7 +- Initial import to SME10 tree [SME: 11042] + +* Thu Nov 29 2018 John Crisp 3.0.RC6-6 +- Set backupdir if key is empty [SME: 10655] +- fix some build issues in spec file + +* Sat Aug 22 2015 Stephane de Labrusse 3.0.RC6-5 +- First release to smecontribs + +* Sun Aug 17 2014 Stephane de Labrusse 3.0.RC6-4 +- added my own patch against the --events warning +--Warning: Skipping the data of table mysql.event. Specify the --events option explicitly. + +* Sun May 18 2014 Stephane de Labrusse 3.0.RC6.3 +- first release for sme9 + +* Sun Oct 27 2013 Stephane de Labrusse 3.0.RC6.3 +- split the contrib in two versions smeserver-automysqlbackup and automysqlbackup + +* Mon Apr 22 2013 Stephane de Labrusse +- [3.0.RC6] version Based on automysqlbackup V3.0 RC6 + +* Mon Apr 08 2013 Stephane de Labrusse +- [0.01] Initial version Based on automysqlbackup V3.0 RC6 + +%prep + +%setup -q -n %{name}-%{version} + +%patch1 -p1 +%patch2 -p1 + + +%build +# add createlinks if required +# perl cratelinks + +%install +/bin/rm -rf $RPM_BUILD_ROOT +(cd root ;/usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) +/bin/rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist + + +%files -f %{name}-%{version}-filelist + +%defattr(-,root,root) + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre + +%post + +%preun + +%postun + diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..9b7fd51 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +contribs10