!4 update to 1.2.2
From: @lyn1001 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
d83f925d12
@ -1,25 +0,0 @@
|
|||||||
From a0f5063e8b31df18b397a91095f33d4efe39f58e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Charaoui <jerome@riseup.net>
|
|
||||||
Date: Fri, 13 Jul 2018 10:08:02 -0400
|
|
||||||
Subject: [PATCH] Fix warning about malformed day component in 'when'
|
|
||||||
|
|
||||||
---
|
|
||||||
src/backupninja.in | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/backupninja.in b/src/backupninja.in
|
|
||||||
index 77afbfd..d6a1045 100755
|
|
||||||
--- a/src/backupninja.in
|
|
||||||
+++ b/src/backupninja.in
|
|
||||||
@@ -226,7 +226,7 @@ function isnow() {
|
|
||||||
if [ "$whendayofweek" != "$nowdayofweek" ]; then
|
|
||||||
whendayofweek=${whendayofweek%s}
|
|
||||||
if [ "$whendayofweek" != "$nowdayofweek" ]; then
|
|
||||||
- if [ "$whendayofweek" != "mondays" -a "$whendayofweek" != "tuesdays" -a "$whendayofweek" != "wednesdays" -a "$whendayofweek" != "thursdays" -a "$whendayofweek" != "fridays" -a "$whendayofweek" != "saturdays" -a "$whendayofweek" != "sundays" ]; then
|
|
||||||
+ if [ "$whendayofweek" != "monday" -a "$whendayofweek" != "tuesday" -a "$whendayofweek" != "wednesday" -a "$whendayofweek" != "thursday" -a "$whendayofweek" != "friday" -a "$whendayofweek" != "saturday" -a "$whendayofweek" != "sunday" ]; then
|
|
||||||
warning "The day in the 'when' option in the configuration is malformed. Please read the README for examples."
|
|
||||||
fi
|
|
||||||
if [ "$at" != "at" ]; then
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
From f9529d1d3f3714c707f38b8e44ac72a69af5483b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Charaoui <jerome@riseup.net>
|
|
||||||
Date: Fri, 13 Jul 2018 21:49:06 -0400
|
|
||||||
Subject: [PATCH] Remove zero-padding from nowday and whenday (fixes #9397)
|
|
||||||
|
|
||||||
This fixes cases where the day component of the when parameter resolved
|
|
||||||
to a non-zero padded integer under 10, such as "when = 1st at 01"
|
|
||||||
|
|
||||||
The comparison against the nowday variable failed consistently since
|
|
||||||
the date command format used always returned a zero-padded two digit
|
|
||||||
integer.
|
|
||||||
|
|
||||||
The solution chosen is to avoid generating nowday with zero-padding and
|
|
||||||
remove any zero-padding from whenday parameter using a more thorough
|
|
||||||
sed pattern which now also removes any non-alphanumeric characters from
|
|
||||||
the string.
|
|
||||||
---
|
|
||||||
src/backupninja.in | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/backupninja.in b/src/backupninja.in
|
|
||||||
index d6a1045..6da7237 100755
|
|
||||||
--- a/src/backupninja.in
|
|
||||||
+++ b/src/backupninja.in
|
|
||||||
@@ -186,7 +186,7 @@ function tolower() {
|
|
||||||
|
|
||||||
# simple to integer function
|
|
||||||
function toint() {
|
|
||||||
- echo "$1" | tr -d '[:alpha:]'
|
|
||||||
+ echo "$1" | @SED@ 's/[^0-9]//g;s/^0\+//'
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
@@ -202,7 +202,7 @@ function toint() {
|
|
||||||
# we grab the current time once, since processing
|
|
||||||
# all the configs might take more than an hour.
|
|
||||||
nowtime=`LC_ALL=C date +%H`
|
|
||||||
-nowday=`LC_ALL=C date +%d`
|
|
||||||
+nowday=`LC_ALL=C date +%-d`
|
|
||||||
nowdayofweek=`LC_ALL=C date +%A`
|
|
||||||
nowdayofweek=`tolower "$nowdayofweek"`
|
|
||||||
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From 26521d0975affe45aa944621b6e6f32ee3a8cdde Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Charaoui <jerome@riseup.net>
|
|
||||||
Date: Fri, 13 Jul 2018 10:07:10 -0400
|
|
||||||
Subject: [PATCH] Whitespace fixes
|
|
||||||
|
|
||||||
---
|
|
||||||
src/backupninja.in | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/backupninja.in b/src/backupninja.in
|
|
||||||
index ef8fc2d..77afbfd 100755
|
|
||||||
--- a/src/backupninja.in
|
|
||||||
+++ b/src/backupninja.in
|
|
||||||
@@ -234,13 +234,13 @@ function isnow() {
|
|
||||||
fi
|
|
||||||
if [[ "$whentimeoriginal" != @([0-9][0-9])?(:[0-9][0-9]) ]]; then
|
|
||||||
warning "The time in the 'when' option in the configuration is malformed or does not exist. Please read the README for examples."
|
|
||||||
- fi
|
|
||||||
+ fi
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
elif [ "$whenday" != "$nowday" ]; then
|
|
||||||
if [ "$whenday" -lt 1 -o "$whenday" -gt 31 ]; then
|
|
||||||
- warning "The numeric value of the day in the 'when' option in the configuration does not match a day. Please read the README for examples."
|
|
||||||
+ warning "The numeric value of the day in the 'when' option in the configuration does not match a day. Please read the README for examples."
|
|
||||||
fi
|
|
||||||
if [ -z "$whentime" ]; then
|
|
||||||
warning "The 'when' variable in the configuration file is malformed. You either didn't specify the day or the time. Please read the README for eamples."
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
--- a/handlers/dup.in 2018-06-29 22:12:42.000000000 +0600
|
--- a/handlers/dup.in 2021-01-25 21:50:45.000000000 +0600
|
||||||
+++ b/handlers/dup.in 2018-12-30 04:27:43.251026730 +0600
|
+++ b/handlers/dup.in 2022-05-27 18:19:28.948488094 +0600
|
||||||
@@ -133,7 +133,7 @@
|
@@ -130,7 +130,7 @@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### duplicity version (ignore anything else than 0-9 and ".")
|
### duplicity version (ignore anything else than 0-9 and ".")
|
||||||
@ -1,17 +1,19 @@
|
|||||||
--- a/handlers/dup.in 2018-06-29 22:12:42.000000000 +0600
|
--- a/handlers/dup.in 2021-01-25 21:50:45.000000000 +0600
|
||||||
+++ b/handlers/dup.in 2018-12-30 04:35:26.675079119 +0600
|
+++ b/handlers/dup.in 2022-05-27 18:19:28.948488094 +0600
|
||||||
@@ -53,13 +53,13 @@
|
@@ -66,15 +66,15 @@
|
||||||
if [ -n "$signkey" -a -n "$encryptkey" -a "$signkey" != "$encryptkey" ]; then
|
|
||||||
[ -n "$signpassword" ] || fatal "The signpassword option must be set because signkey is different from encryptkey."
|
[ -n "$signpassword" ] || fatal "The signpassword option must be set because signkey is different from encryptkey."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]; then
|
-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]; then
|
||||||
+if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]]; then
|
+if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "s3+http" ]]; then
|
||||||
[ -n "$awsaccesskeyid" -a -n "$awssecretaccesskey" ] || fatal "AWS access keys must be set for S3 backups."
|
[ -n "$awsaccesskeyid" -a -n "$awssecretaccesskey" ] || fatal "AWS access keys must be set for S3 backups."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "cf+http" ]; then
|
-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "cf+http" ]; then
|
||||||
+if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "cf+http" ]]; then
|
+if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "cf+http" ]]; then
|
||||||
[ -n "$cfusername" -a -n "$cfapikey" ] || fatal "Cloudfiles access keys must be set for S3 backups."
|
[ -n "$cfusername" -a -n "$cfapikey" ] || fatal "Cloudfiles access keys must be set for S3 backups."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "dpbx" ]; then
|
-if [ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "dpbx" ]; then
|
||||||
+if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "dpbx" ]]; then
|
+if [[ "`echo $desturl | @AWK@ -F ':' '{print $1}'`" == "dpbx" ]]; then
|
||||||
[ -n "$dropboxappkey" -a -n "$dropboxappsecret" ] || fatal "Dropbox app ID and secret must be set for Dropbox backups."
|
[ -n "$dropboxappkey" -a -n "$dropboxappsecret" ] || fatal "Dropbox app ID and secret must be set for Dropbox backups."
|
||||||
@ -1,6 +1,6 @@
|
|||||||
--- a/handlers/dup.helper.in 2018-06-29 22:12:42.000000000 +0600
|
--- a/handlers/dup.helper.in 2021-01-25 21:50:45.000000000 +0600
|
||||||
+++ b/handlers/dup.helper.in 2018-12-30 04:27:40.251026730 +0600
|
+++ b/handlers/dup.helper.in 2022-05-27 18:19:28.948488094 +0600
|
||||||
@@ -624,7 +624,7 @@
|
@@ -540,7 +540,7 @@
|
||||||
|
|
||||||
# Global variables whose '*' shall not be expanded
|
# Global variables whose '*' shall not be expanded
|
||||||
set -o noglob
|
set -o noglob
|
||||||
@ -9,9 +9,9 @@
|
|||||||
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"
|
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
|
set +o noglob
|
||||||
|
|
||||||
--- a/handlers/rdiff.helper.in 2018-06-29 22:12:42.000000000 +0600
|
--- a/handlers/rdiff.helper.in 2021-01-25 21:50:45.000000000 +0600
|
||||||
+++ b/handlers/rdiff.helper.in 2018-12-30 04:27:40.251026730 +0600
|
+++ b/handlers/rdiff.helper.in 2022-05-27 18:19:28.948488094 +0600
|
||||||
@@ -243,7 +243,7 @@
|
@@ -190,7 +190,7 @@
|
||||||
if [ "$rdiff_user" = "root" ]; then
|
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?"
|
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
|
if [ $? = 0 ]; then
|
||||||
@ -20,17 +20,17 @@
|
|||||||
result=$?
|
result=$?
|
||||||
echo "Hit return to continue."
|
echo "Hit return to continue."
|
||||||
read
|
read
|
||||||
@@ -437,7 +437,7 @@
|
@@ -355,7 +355,7 @@
|
||||||
|
|
||||||
# Global variables whose '*' shall not be expanded
|
# Global variables whose '*' shall not be expanded
|
||||||
set -o noglob
|
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/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_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_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
|
set +o noglob
|
||||||
--- a/src/ninjahelper.in 2018-06-29 22:12:42.000000000 +0600
|
|
||||||
+++ b/src/ninjahelper.in 2018-12-30 04:27:40.251026730 +0600
|
--- a/src/ninjahelper.in 2021-01-25 21:50:45.000000000 +0600
|
||||||
|
+++ b/src/ninjahelper.in 2022-05-27 18:19:28.948488094 +0600
|
||||||
@@ -27,11 +27,11 @@
|
@@ -27,11 +27,11 @@
|
||||||
##
|
##
|
||||||
require_packages() {
|
require_packages() {
|
||||||
@ -45,7 +45,7 @@
|
|||||||
echo "hit return to continue...."
|
echo "hit return to continue...."
|
||||||
read
|
read
|
||||||
fi
|
fi
|
||||||
@@ -166,7 +166,7 @@
|
@@ -164,7 +164,7 @@
|
||||||
echo -n "(yes/no): "
|
echo -n "(yes/no): "
|
||||||
read install
|
read install
|
||||||
if [ "$install" == "yes" ]; then
|
if [ "$install" == "yes" ]; then
|
||||||
BIN
backupninja-1.2.2.tar.gz
Normal file
BIN
backupninja-1.2.2.tar.gz
Normal file
Binary file not shown.
@ -1,17 +1,15 @@
|
|||||||
Name: backupninja
|
Name: backupninja
|
||||||
Version: 1.1.0
|
Version: 1.2.2
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Lightweight, extensible backup system
|
Summary: Lightweight, extensible backup system
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://0xacab.org/riseuplabs/backupninja
|
URL: https://0xacab.org/liberate/backupninja
|
||||||
Source0: https://0xacab.org/riseuplabs/backupninja/-/archive/backupninja_upstream/%{version}/backupninja-backupninja_upstream-%{version}.tar.gz#/backupninja-%{version}.tar.gz
|
Source0: https://0xacab.org/liberate/backupninja/-/archive/backupninja-%{version}/backupninja-backupninja-%{version}.tar.gz#/backupninja-%{version}.tar.gz
|
||||||
Patch0: backupninja-1.1.0-redhat.patch
|
Patch0: backupninja-1.2.2-openeuler.patch
|
||||||
Patch1: backupninja-duplicity-version.patch
|
Patch1: backupninja-1.2.2-duplicity.patch
|
||||||
Patch2: backupninja-extbackup-fix.patch
|
Patch2: backupninja-1.2.2-extbackup.patch
|
||||||
Patch3: backupninja-1.1.0-whitespaces.patch
|
|
||||||
Patch4: backupninja-1.1.0-dayofweek.patch
|
|
||||||
Patch5: backupninja-1.1.0-padding.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
BuildRequires: autoconf automake make
|
||||||
Requires: cronie gawk logrotate rdiff-backup
|
Requires: cronie gawk logrotate rdiff-backup
|
||||||
%description
|
%description
|
||||||
Backupninja allows you to coordinate system backup by dropping a few simple
|
Backupninja allows you to coordinate system backup by dropping a few simple
|
||||||
@ -25,15 +23,13 @@ or trac repositories, burn CD/DVDs or create ISOs, incremental rsync with
|
|||||||
hard-linking.
|
hard-linking.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n backupninja-backupninja_upstream-%{version}
|
%setup -q -n backupninja-backupninja-%{version}
|
||||||
%patch0 -p1 -b .redhat
|
%patch0 -p1 -b .openeuler
|
||||||
%patch1 -p1 -b .dupver
|
%patch1 -p1 -b .dupver
|
||||||
%patch2 -p1 -b .extbck
|
%patch2 -p1 -b .extbck
|
||||||
%patch3 -p1 -b .wspace
|
|
||||||
%patch4 -p1 -b .dayswk
|
|
||||||
%patch5 -p1 -b .paddng
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
./autogen.sh
|
||||||
%configure --libdir=%{_libexecdir}
|
%configure --libdir=%{_libexecdir}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
@ -42,11 +38,10 @@ make install DESTDIR=%{buildroot}
|
|||||||
mkdir -p -m 0750 %{buildroot}/%{_sysconfdir}/backup.d
|
mkdir -p -m 0750 %{buildroot}/%{_sysconfdir}/backup.d
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{!?_licensedir:%global license %doc}
|
|
||||||
%{_sbindir}/backupninja
|
%{_sbindir}/backupninja
|
||||||
%{_sbindir}/ninjahelper
|
%{_sbindir}/ninjahelper
|
||||||
%{_libexecdir}/backupninja
|
%{_libexecdir}/backupninja
|
||||||
%doc AUTHORS ChangeLog FAQ.md NEWS README.md TODO
|
%doc AUTHORS CHANGELOG.md FAQ.md README.md TODO
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%config(noreplace) %{_sysconfdir}/backupninja.conf
|
%config(noreplace) %{_sysconfdir}/backupninja.conf
|
||||||
%config(noreplace) %{_sysconfdir}/cron.d/backupninja
|
%config(noreplace) %{_sysconfdir}/cron.d/backupninja
|
||||||
@ -57,5 +52,8 @@ mkdir -p -m 0750 %{buildroot}/%{_sysconfdir}/backup.d
|
|||||||
%{_mandir}/man5/*.5*
|
%{_mandir}/man5/*.5*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 12 2023 liyanan <thistleslyn@163.com> - 1.2.2-1
|
||||||
|
- Update to 1.2.2
|
||||||
|
|
||||||
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.1.0-1
|
* Tue Sep 7 2021 zhengyaohui <zhengyaohui1@huawei.com> - 1.1.0-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user