Notification time stamped 2022-05-31 23:06:22 UTC
From ee1178fb947124e0fe336815e56ad7a7d6c445ab Mon Sep 17 00:00:00 2001
From: Denis Fateyev <denis(a)fateyev.com>
Date: Jul 09 2016 20:52:26 +0000
Subject: backupninja: dup handler fixes
---
diff --git a/backupninja-duplicity-version.patch b/backupninja-duplicity-version.patch
new file mode 100644
index 0000000..9bb7566
--- /dev/null
+++ b/backupninja-duplicity-version.patch
@@ -0,0 +1,17 @@
+--- a/handlers/dup.in 2016-07-08 01:47:13 +0600
++++ b/handlers/dup.in 2016-07-08 01:48:48 +0600
+@@ -109,10 +109,10 @@
+ fi
+
+ ### duplicity version (ignore anything else than 0-9 and ".")
+-duplicity_version="`duplicity --version | @AWK@ '{print $2}' | @SED@
's/[^.[:digit:]]//g'`"
+-duplicity_major="`echo $duplicity_version | @AWK@ -F '.' '{print
$1}'`"
+-duplicity_minor="`echo $duplicity_version | @AWK@ -F '.' '{print
$2}'`"
+-duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print
$3}'`"
++duplicity_version="`duplicity --version | @AWK@ 'END{print $2}' | @SED@
's/[^.[:digit:]]//g'`"
++duplicity_major="`echo \"$duplicity_version\" | @AWK@ -F '.'
'{print $1}'`"
++duplicity_minor="`echo \"$duplicity_version\" | @AWK@ -F '.'
'{print $2}'`"
++duplicity_sub="`echo \"$duplicity_version\" | @AWK@ -F '.'
'{print $3}'`"
+
+ ### ssh/scp/sftp options (duplicity < 0.4.3 is unsupported)
+ ## duplicity >= 0.6.17 : paramiko backend
diff --git a/backupninja-extbackup-fix.patch b/backupninja-extbackup-fix.patch
new file mode 100644
index 0000000..73d75a6
--- /dev/null
+++ b/backupninja-extbackup-fix.patch
@@ -0,0 +1,19 @@
+--- a/handlers/dup.in 2016-07-08 01:47:13 +0600
++++ b/handlers/dup.in 2016-07-08 01:54:02 +0600
+@@ -248,14 +248,14 @@
+ execstr_source=${execstr_source//\\*/\\\\\\*}
+
+ ### If desturl is an S3 URL export the AWS environment variables
+-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" ==
"s3+http" ]; then
++if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" =~
's3+http' ]]; then
+ export AWS_ACCESS_KEY_ID="$awsaccesskeyid"
+ export AWS_SECRET_ACCESS_KEY="$awssecretaccesskey"
+ fi
+
+ ### If desturl is a RackSpace's CloudFiles URL export the relevant
+ ### environment variables
+-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" ==
"cf+http" ]; then
++if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" =~
'cf+http' ]]; then
+ export CLOUDFILES_USERNAME="$cfusername"
+ export CLOUDFILES_APIKEY="$cfapikey"
+ if [ -n "$cfauthurl" ]; then
diff --git a/backupninja.spec b/backupninja.spec
index d506d2d..fa18977 100644
--- a/backupninja.spec
+++ b/backupninja.spec
@@ -1,7 +1,7 @@
Name: backupninja
Version: 1.0.1
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Lightweight, extensible backup system
Group: Applications/System
@@ -11,6 +11,8 @@
Source0:
https://labs.riseup.net/code/attachments/download/275/backupninja-1.0.1
Patch0: backupninja-rsync-action.patch
Patch1: backupninja-1.0.1-redhat.patch
+Patch2: backupninja-duplicity-version.patch
+Patch3: backupninja-extbackup-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
@@ -41,6 +43,8 @@ hard-linking.
%setup -q
%patch0 -p1 -b .rsync
%patch1 -p1 -b .redhat
+%patch2 -p1 -b .dupver
+%patch3 -p1 -b .extbck
%build
# put all script 'libs' into one dir
@@ -62,11 +66,12 @@ rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
+%{!?_licensedir:%global license %doc}
%{_sbindir}/backupninja
%{_sbindir}/ninjahelper
%{_libexecdir}/backupninja
-%doc AUTHORS COPYING ChangeLog FAQ NEWS README TODO
+%doc AUTHORS ChangeLog FAQ NEWS README TODO
+%license COPYING
%config(noreplace) %{_sysconfdir}/backupninja.conf
%config(noreplace) %{_sysconfdir}/cron.d/backupninja
%config(noreplace) %{_sysconfdir}/logrotate.d/backupninja
@@ -77,6 +82,9 @@ rm -rf %{buildroot}
%changelog
+* Fri Jul 08 2016 Denis Fateyev <denis(a)fateyev.com> - 1.0.1-8
+- Fix duplicity path and S3, CloudFiles usage
+
* Wed Feb 03 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.0.1-7
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
https://src.fedoraproject.org/rpms/backupninja/c/ee1178fb947124e0fe336815...