dfateyev pushed to backupninja (epel9). "backupninja: redhat specific
fix"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-05-31 23:06:22 UTC
From bdf1b442f9581c09373aaa06bd9912d0e04501eb Mon Sep 17 00:00:00 2001
From: Denis Fateyev <denis(a)fateyev.com>
Date: Nov 22 2014 17:43:32 +0000
Subject: backupninja: redhat specific fix
---
diff --git a/backupninja-1.0.1-redhat.patch b/backupninja-1.0.1-redhat.patch
new file mode 100644
index 0000000..459c701
--- /dev/null
+++ b/backupninja-1.0.1-redhat.patch
@@ -0,0 +1,56 @@
+--- a/handlers/dup.helper.in 2012-06-30 00:35:47.000000000 +0600
++++ b/handlers/dup.helper.in 2014-11-17 00:49:52.172966826 +0600
+@@ -588,7 +588,7 @@
+
+ # Global variables whose '*' shall not be expanded
+ set -o noglob
+- dup_default_includes="/var/spool/cron/crontabs /var/backups /etc /root /home /usr/local/*bin /var/lib/dpkg/status*"
++ dup_default_includes="/var/spool/cron /var/backups /etc /root /home /usr/local/*bin"
+ dup_default_excludes="/home/*/.gnupg /home/*/.local/share/Trash /home/*/.Trash /home/*/.thumbnails /home/*/.beagle /home/*/.aMule /home/*/gtk-gnutella-downloads /var/cache/backupninja/duplicity"
+ set +o noglob
+
+--- a/handlers/rdiff.helper.in 2012-06-30 00:35:47.000000000 +0600
++++ b/handlers/rdiff.helper.in 2014-11-17 00:49:12.383983427 +0600
+@@ -243,7 +243,7 @@
+ if [ "$rdiff_user" = "root" ]; then
+ booleanBox "install rdiff-backup?" "It seems like the remote machine does not have rdiff-backup installed, I can attempt to install rdiff-backup on the remote machine.\n\n\nDo you want me to attempt this now?"
+ if [ $? = 0 ]; then
+- ssh $rdiff_user@$rdiff_host 'apt-get install rdiff-backup'
++ ssh $rdiff_user@$rdiff_host 'yum install rdiff-backup'
+ result=$?
+ echo "Hit return to continue."
+ read
+@@ -414,7 +414,7 @@
+
+ # Global variables whose '*' shall not be expanded
+ set -o noglob
+- rdiff_includes=(/var/spool/cron/crontabs /var/backups /etc /root /home /usr/local/*bin /var/lib/dpkg/status*)
++ rdiff_includes=(/var/spool/cron /var/backups /etc /root /home /usr/local/*bin)
+ rdiff_excludes=(/home/*/.gnupg /home/*/.local/share/Trash /home/*/.Trash /home/*/.thumbnails /home/*/.beagle /home/*/.aMule /home/*/gtk-gnutella-downloads /var/cache/backupninja/duplicity)
+ rdiff_vsincludes=
+ set +o noglob
+--- a/src/ninjahelper.in 2012-06-30 00:35:47.000000000 +0600
++++ b/src/ninjahelper.in 2014-11-17 00:03:26.113218022 +0600
+@@ -27,11 +27,11 @@
+ ##
+ require_packages() {
+ for pkg in "$@"; do
+- installed=`dpkg -s $pkg | grep 'ok installed'`
++ installed=`yum list installed $pkg >/dev/null 2>&1`
+ if [ -z "$installed" ]; then
+ booleanBox "install $pkg?" "This backup action requires package $pkg. Do you want to install it now?"
+ if [ $? = 0 ]; then
+- apt-get install $pkg
++ yum install $pkg
+ echo "hit return to continue...."
+ read
+ fi
+@@ -166,7 +166,7 @@
+ echo -n "(yes/no): "
+ read install
+ if [ "$install" == "yes" ]; then
+- apt-get install dialog
++ yum install dialog
+ break
+ elif [ "$install" == "no" ]; then
+ exit
https://src.fedoraproject.org/rpms/backupninja/c/bdf1b442f9581c09373aaa06...
1Â year, 10Â months
dfateyev pushed to backupninja (epel9). "backupninja: rsync action
fix"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-05-31 23:06:22 UTC
From e3b17729ead8392b8e10bb346e5eff9bdc62bc8f Mon Sep 17 00:00:00 2001
From: Denis Fateyev <denis(a)fateyev.com>
Date: Sep 09 2014 12:03:29 +0000
Subject: backupninja: rsync action fix
---
diff --git a/backupninja-rsync-action.patch b/backupninja-rsync-action.patch
new file mode 100644
index 0000000..33a26d4
--- /dev/null
+++ b/backupninja-rsync-action.patch
@@ -0,0 +1,15 @@
+--- a/handlers/rsync.in
++++ b/handlers/rsync.in
+@@ -1136,9 +1136,10 @@ for SECTION in $include; do
+ set_dest
+
+ info "Syncing $SECTION on $dest_path..."
+- debug $nice $rsync ${rsync_options[@]} $filelist_flag $excludes $batch_option $orig $dest_path
++ command="$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path"
++ debug $nice su -c "$command"
+ set_pipefail
+- $nice su -c "$rsync ${rsync_options[@]} --delete-excluded $filelist_flag $excludes $batch_option $orig $dest_path" | tee -a $log
++ $nice su -c "$command" | tee -a $log
+
+ check_rsync_exit_status $?
+ restore_pipefail
diff --git a/backupninja.spec b/backupninja.spec
index a04d05e..f9a2e7f 100644
--- a/backupninja.spec
+++ b/backupninja.spec
@@ -1,13 +1,14 @@
Name: backupninja
Version: 1.0.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Lightweight, extensible backup system
Group: Applications/System
License: GPLv2
URL: https://labs.riseup.net/code/projects/backupninja
Source0: https://labs.riseup.net/code/attachments/download/275/backupninja-1.0.1.t...
+Patch0: backupninja-rsync-action.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
@@ -36,6 +37,7 @@ hard-linking.
%prep
%setup -q
+%patch0 -p1 -b .rsync
%build
# put all script 'libs' into one dir
@@ -72,6 +74,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Sep 08 2014 Denis Fateyev <denis(a)fateyev.com> - 1.0.1-4
+- Fix rsync action handler
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
https://src.fedoraproject.org/rpms/backupninja/c/e3b17729ead8392b8e10bb34...
1Â year, 10Â months
dfateyev pushed to backupninja (epel9). "backupninja: dup handler
fixes"
by notificationsï¼ fedoraproject.org
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...
1Â year, 10Â months
dfateyev pushed to backupninja (epel9). "backupninja: redhat specific
fix"
by notificationsï¼ fedoraproject.org
Notification time stamped 2022-05-31 23:06:22 UTC
From 0dc63f99265918e6c827e6332be50c065b1d3d29 Mon Sep 17 00:00:00 2001
From: Denis Fateyev <denis(a)fateyev.com>
Date: Nov 22 2014 17:56:38 +0000
Subject: backupninja: redhat specific fix
---
diff --git a/backupninja.spec b/backupninja.spec
index f9a2e7f..89bbc95 100644
--- a/backupninja.spec
+++ b/backupninja.spec
@@ -1,14 +1,16 @@
Name: backupninja
Version: 1.0.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Lightweight, extensible backup system
Group: Applications/System
License: GPLv2
URL: https://labs.riseup.net/code/projects/backupninja
Source0: https://labs.riseup.net/code/attachments/download/275/backupninja-1.0.1.t...
+
Patch0: backupninja-rsync-action.patch
+Patch1: backupninja-1.0.1-redhat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
@@ -38,6 +40,7 @@ hard-linking.
%prep
%setup -q
%patch0 -p1 -b .rsync
+%patch1 -p1 -b .redhat
%build
# put all script 'libs' into one dir
@@ -74,6 +77,9 @@ rm -rf %{buildroot}
%changelog
+* Fri Nov 21 2014 Denis Fateyev <denis(a)fateyev.com> - 1.0.1-5
+- Added patch for RH-system specific
+
* Mon Sep 08 2014 Denis Fateyev <denis(a)fateyev.com> - 1.0.1-4
- Fix rsync action handler
https://src.fedoraproject.org/rpms/backupninja/c/0dc63f99265918e6c827e633...
1Â year, 10Â months