packages: automysqlbackup/automysqlbackup-du.patch (NEW), automysqlbackup/a...
glen
glen at pld-linux.org
Tue Mar 20 11:52:35 CET 2012
Author: glen Date: Tue Mar 20 10:52:35 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- new, based from src.rpm:
http://www.jur-linux.org/rpms/el-updates/6.2/SRPMS/automysqlbackup-3.0-1.07.el6.src.rpm
---- Files affected:
packages/automysqlbackup:
automysqlbackup-du.patch (NONE -> 1.1) (NEW), automysqlbackup-silent.patch (NONE -> 1.1) (NEW), automysqlbackup.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/automysqlbackup/automysqlbackup-du.patch
diff -u /dev/null packages/automysqlbackup/automysqlbackup-du.patch:1.1
--- /dev/null Tue Mar 20 11:52:35 2012
+++ packages/automysqlbackup/automysqlbackup-du.patch Tue Mar 20 11:52:30 2012
@@ -0,0 +1,11 @@
+--- automysqlbackup-v3.0_rc2/automysqlbackup
++++ automysqlbackup-v3.0_rc2/automysqlbackup
+@@ -2039,7 +2039,7 @@ method_backup () {
+ # -> finished information
+ echo "Total disk space used for backup storage..."
+ echo "Size - Location"
+- echo `du -hsH "${CONFIG_backup_dir}"`
++ echo `du -hs --si "${CONFIG_backup_dir}"`
+ echo
+ echo "======================================================================"
+ # <- finished information
================================================================
Index: packages/automysqlbackup/automysqlbackup-silent.patch
diff -u /dev/null packages/automysqlbackup/automysqlbackup-silent.patch:1.1
--- /dev/null Tue Mar 20 11:52:35 2012
+++ packages/automysqlbackup/automysqlbackup-silent.patch Tue Mar 20 11:52:30 2012
@@ -0,0 +1,51 @@
+--- automysqlbackup-v3.0_rc6/automysqlbackup
++++ automysqlbackup-v3.0_rc6/automysqlbackup
+@@ -850,7 +850,6 @@ directory_checks_enable_logging () {
+ [[ "${CONFIG_mysql_dump_dbstatus}" = 'yes' ]] && { checkdirs=( "${checkdirs[@]}" "${CONFIG_backup_dir}/status" ); }
+
+ tmp_permcheck=0
+- printf '# Checking for permissions to write to folders:\n'
+
+
+ # "dirname ${CONFIG_backup_dir}" exists?
+@@ -873,14 +872,9 @@ directory_checks_enable_logging () {
+
+
+ # -> check base folder
+- printf 'base folder %s ... ' "$(dirname "${CONFIG_backup_dir}")"
+ if [[ -d "$(dirname "${CONFIG_backup_dir}")" ]]; then
+
+- printf 'exists ... ok.\n'
+- printf 'backup folder %s ... ' "${CONFIG_backup_dir}"
+-
+ if [[ -d "${CONFIG_backup_dir}" ]]; then
+- printf 'exists ... writable? '
+ if (( $CONFIG_dryrun )); then
+ printf 'dry-running. Skipping. Logging to /tmp\n'
+ log_file="/tmp/${CONFIG_mysql_dump_host}-`date +%N`.log"
+@@ -889,7 +883,6 @@ directory_checks_enable_logging () {
+ tmp_permcheck=1
+ else
+ if chk_folder_writable "${CONFIG_backup_dir}"; then
+- printf 'yes. Proceeding.\n'
+ log_file="${CONFIG_backup_dir}/${CONFIG_mysql_dump_host}-`date +%N`.log"
+ log_errfile="${CONFIG_backup_dir}/ERRORS_${CONFIG_mysql_dump_host}-`date +%N`.log"
+ activateIO "$log_file" "$log_errfile"
+@@ -1643,7 +1636,7 @@ method_backup () {
+ load_default_config
+
+ trap mail_cleanup EXIT SIGHUP SIGINT SIGQUIT SIGTERM
+- if [[ -r "${CONFIG_configfile}" ]]; then source "${CONFIG_configfile}"; echo "Parsed config file \"${CONFIG_configfile}\""; else let "N |= $N_config_file_missing"; fi; echo
++ if [[ -r "${CONFIG_configfile}" ]]; then source "${CONFIG_configfile}"; else let "N |= $N_config_file_missing"; fi
+ if (( $opt_flag_config_file )); then if [[ -r "${opt_config_file}" ]]; then source "${opt_config_file}"; let "N |= $N_arg_conffile_parsed"; else let "N |= $N_arg_conffile_unreadable"; fi; else let "N |= $N_too_many_args"; fi
+
+ (( $CONFIG_dryrun )) && {
+@@ -2209,7 +2202,7 @@ NO_ARGS=0
+ E_OPTERROR=85
+
+ if (( $# == $NO_ARGS )); then # Script invoked with no command-line args?
+- echo "Invoking backup method."; echo; method_backup
++ method_backup
+ fi
+
+ while getopts ":c:blh" Option
================================================================
Index: packages/automysqlbackup/automysqlbackup.spec
diff -u /dev/null packages/automysqlbackup/automysqlbackup.spec:1.1
--- /dev/null Tue Mar 20 11:52:35 2012
+++ packages/automysqlbackup/automysqlbackup.spec Tue Mar 20 11:52:30 2012
@@ -0,0 +1,60 @@
+# $Revision$, $Date$
+%define subver rc6
+%define rel 1
+Summary: Automatic MySQL Backup
+Name: automysqlbackup
+Version: 3.0
+Release: 0.%{subver}.%{rel}
+License: GPL v2+
+Group: Development/Tools
+Source0: http://downloads.sourceforge.net/automysqlbackup/%{name}-v%{version}_%{subver}.tar.gz
+# Source0-md5: 33db887176f8480a9a9c324f5b718b88
+Patch2: %{name}-du.patch
+Patch3: %{name}-silent.patch
+URL: http://sourceforge.net/projects/automysqlbackup/
+BuildRequires: sed >= 4.0
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+AutoMySQLBackup with a basic configuration will create Daily, Weekly
+and Monthly backups of one or more of your MySQL databases from one or
+more of your MySQL servers.
+
+Other Features include:
+- Email notification of backups
+- Backup Compression and Encryption
+- Configurable backup rotation
+- Incremental database backups
+
+%prep
+%setup -q -n %{name}-v%{version}_%{subver}
+%patch2 -p1
+%patch3 -p1
+
+%{__sed} -i -e '1s,#!/usr/bin/env bash,#!/bin/bash,' %{name}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_bindir}}
+cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install -p %{name} $RPM_BUILD_ROOT%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
+%attr(755,root,root) %{_bindir}/%{name}
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2012/03/20 10:52:30 glen
+- new, based from src.rpm:
+ http://www.jur-linux.org/rpms/el-updates/6.2/SRPMS/automysqlbackup-3.0-1.07.el6.src.rpm
================================================================
More information about the pld-cvs-commit
mailing list