[arch-commits] Commit in backuppc/trunk (10 files)
Sébastien Luttringer
seblu at archlinux.org
Tue Mar 7 00:11:44 UTC 2017
Date: Tuesday, March 7, 2017 @ 00:11:42
Author: seblu
Revision: 215169
upgpkg: backuppc 4.0.0-1
Added:
backuppc/trunk/01-fix-FS#32642.patch
(from rev 215168, backuppc/trunk/03-fix-FS#32642.patch)
backuppc/trunk/02-fix-cve-2011-4923.patch
(from rev 215168, backuppc/trunk/04-fix-cve-2011-4923.patch)
Modified:
backuppc/trunk/PKGBUILD
backuppc/trunk/backuppc.install
backuppc/trunk/backuppc.service
Deleted:
backuppc/trunk/01-move-socket-into-run.patch
backuppc/trunk/02-move-socket-into-run.patch
backuppc/trunk/03-fix-FS#32642.patch
backuppc/trunk/04-fix-cve-2011-4923.patch
backuppc/trunk/backuppc.socket
-------------------------------+
01-fix-FS#32642.patch | 25 ++++++++++++
01-move-socket-into-run.patch | 55 --------------------------
02-fix-cve-2011-4923.patch | 14 ++++++
02-move-socket-into-run.patch | 43 --------------------
03-fix-FS#32642.patch | 12 -----
04-fix-cve-2011-4923.patch | 14 ------
PKGBUILD | 83 ++++++++++++++++++++++++++--------------
backuppc.install | 3 +
backuppc.service | 2
backuppc.socket | 8 ---
10 files changed, 98 insertions(+), 161 deletions(-)
Copied: backuppc/trunk/01-fix-FS#32642.patch (from rev 215168, backuppc/trunk/03-fix-FS#32642.patch)
===================================================================
--- 01-fix-FS#32642.patch (rev 0)
+++ 01-fix-FS#32642.patch 2017-03-07 00:11:42 UTC (rev 215169)
@@ -0,0 +1,25 @@
+From 83d6c1513787c0cd156cb6c2a1c6dd03e8f0b811 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <seblu at seblu.net>
+Date: Mon, 6 Mar 2017 23:11:44 +0100
+Subject: [PATCH] Fix https://bugs.archlinux.org/task/32642
+
+---
+ lib/BackupPC/DirOps.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/BackupPC/DirOps.pm b/lib/BackupPC/DirOps.pm
+index 6d713c1..a490750 100644
+--- a/lib/BackupPC/DirOps.pm
++++ b/lib/BackupPC/DirOps.pm
+@@ -132,7 +132,7 @@ sub dirRead
+ }
+ if ( $IODirentOk ) {
+ @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh));
+- map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
++ map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types
+ } else {
+ @entries = map { { name => $_} } readdir($fh);
+ }
+--
+2.12.0
+
Deleted: 01-move-socket-into-run.patch
===================================================================
--- 01-move-socket-into-run.patch 2017-03-06 22:12:49 UTC (rev 215168)
+++ 01-move-socket-into-run.patch 2017-03-07 00:11:42 UTC (rev 215169)
@@ -1,55 +0,0 @@
-From 1cba5f001533ec6d0a728847bdc4fc57e5fed0a3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <seblu at seblu.net>
-Date: Tue, 16 Apr 2013 22:39:15 +0200
-Subject: [PATCH] Move pid file into /run
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This is not a clean patch but it doesn't targeted to upstream inclusion
-
-Signed-off-by: Sébastien Luttringer <seblu at seblu.net>
----
- bin/BackupPC | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/bin/BackupPC b/bin/BackupPC
-index c6fc7d2..d9f3dbc 100755
---- a/bin/BackupPC
-+++ b/bin/BackupPC
-@@ -363,11 +363,11 @@ sub Main_Initialize
- # Write out our initial status and save our PID
- #
- StatusWrite();
-- unlink("$LogDir/BackupPC.pid");
-- if ( open(PID, ">", "$LogDir/BackupPC.pid") ) {
-+ unlink("/run/backuppc/backuppc.pid");
-+ if ( open(PID, ">", "/run/backuppc/backuppc.pid") ) {
- print(PID $$);
- close(PID);
-- chmod(0444, "$LogDir/BackupPC.pid");
-+ chmod(0444, "/run/backuppc/backuppc.pid");
- }
-
- #
-@@ -1846,7 +1846,7 @@ sub catch_signal
- close(LOG);
- LogFileOpen();
- print(LOG "Fatal error: unhandled signal $SigName\n");
-- unlink("$LogDir/BackupPC.pid");
-+ unlink("/run/backuppc/backuppc.pid");
- confess("Got new signal $SigName... quitting\n");
- } else {
- $SigName = shift;
-@@ -1968,7 +1968,7 @@ sub ServerShutdown
- }
- delete($Info{pid});
- StatusWrite();
-- unlink("$LogDir/BackupPC.pid");
-+ unlink("/run/backuppc/backuppc.pid");
- exit(1);
- }
-
---
-1.8.2.1
-
Copied: backuppc/trunk/02-fix-cve-2011-4923.patch (from rev 215168, backuppc/trunk/04-fix-cve-2011-4923.patch)
===================================================================
--- 02-fix-cve-2011-4923.patch (rev 0)
+++ 02-fix-cve-2011-4923.patch 2017-03-07 00:11:42 UTC (rev 215169)
@@ -0,0 +1,14 @@
+# http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4923
+# http://www.openwall.com/lists/oss-security/2011/10/27/8
+
+--- a/lib/BackupPC/CGI/View.pm
++++ b/lib/BackupPC/CGI/View.pm
+@@ -46,7 +46,7 @@
+ my $compress = 0;
+ my $fh;
+ my $host = $In{host};
+- my $num = $In{num};
++ my $num = ${EscHTML($In{num})};
+ my $type = $In{type};
+ my $linkHosts = 0;
+ my($file, $comment);
Deleted: 02-move-socket-into-run.patch
===================================================================
--- 02-move-socket-into-run.patch 2017-03-06 22:12:49 UTC (rev 215168)
+++ 02-move-socket-into-run.patch 2017-03-07 00:11:42 UTC (rev 215169)
@@ -1,43 +0,0 @@
-From f545d6cd391fb2329068d54e5b5ac90973259cb8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <seblu at seblu.net>
-Date: Tue, 16 Apr 2013 22:50:38 +0200
-Subject: [PATCH] Move socket into /run
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Sébastien Luttringer <seblu at seblu.net>
----
- bin/BackupPC | 2 +-
- lib/BackupPC/Lib.pm | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/bin/BackupPC b/bin/BackupPC
-index c6fc7d2..818f68e 100755
---- a/bin/BackupPC
-+++ b/bin/BackupPC
-@@ -1885,7 +1885,7 @@ sub ServerSocketInit
- print(LOG $bpc->timeStamp, "unix socket() failed: $!\n");
- exit(1);
- }
-- my $sockFile = "$LogDir/BackupPC.sock";
-+ my $sockFile = "/run/backuppc/backuppc.sock";
- unlink($sockFile);
- if ( !bind(SERVER_UNIX, sockaddr_un($sockFile)) ) {
- print(LOG $bpc->timeStamp, "unix bind() failed: $!\n");
-diff --git a/lib/BackupPC/Lib.pm b/lib/BackupPC/Lib.pm
-index b83a90c..8ffb227 100644
---- a/lib/BackupPC/Lib.pm
-+++ b/lib/BackupPC/Lib.pm
-@@ -686,7 +686,7 @@ sub ServerConnect
- #
- # First try the unix-domain socket
- #
-- my $sockFile = "$bpc->{LogDir}/BackupPC.sock";
-+ my $sockFile = "/run/backuppc/backuppc.sock";
- socket(*FH, PF_UNIX, SOCK_STREAM, 0) || return "unix socket: $!";
- if ( !connect(*FH, sockaddr_un($sockFile)) ) {
- my $err = "unix connect: $!";
---
-1.8.2.1
-
Deleted: 03-fix-FS#32642.patch
===================================================================
--- 03-fix-FS#32642.patch 2017-03-06 22:12:49 UTC (rev 215168)
+++ 03-fix-FS#32642.patch 2017-03-07 00:11:42 UTC (rev 215169)
@@ -1,12 +0,0 @@
---- backuppc-3.2.1.orig/lib/BackupPC/Lib.pm
-+++ backuppc-3.2.1/lib/BackupPC/Lib.pm
-@@ -495,7 +495,8 @@
- }
- if ( $IODirentOk ) {
- @entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh));
-- map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
-+ #map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
-+ map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types
- } else {
- @entries = map { { name => $_} } readdir($fh);
- }
Deleted: 04-fix-cve-2011-4923.patch
===================================================================
--- 04-fix-cve-2011-4923.patch 2017-03-06 22:12:49 UTC (rev 215168)
+++ 04-fix-cve-2011-4923.patch 2017-03-07 00:11:42 UTC (rev 215169)
@@ -1,14 +0,0 @@
-# http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-4923
-# http://www.openwall.com/lists/oss-security/2011/10/27/8
-
---- a/lib/BackupPC/CGI/View.pm
-+++ b/lib/BackupPC/CGI/View.pm
-@@ -46,7 +46,7 @@
- my $compress = 0;
- my $fh;
- my $host = $In{host};
-- my $num = $In{num};
-+ my $num = ${EscHTML($In{num})};
- my $type = $In{type};
- my $linkHosts = 0;
- my($file, $comment);
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-03-06 22:12:49 UTC (rev 215168)
+++ PKGBUILD 2017-03-07 00:11:42 UTC (rev 215169)
@@ -2,51 +2,47 @@
# Maintainer: Sébastien Luttringer
pkgname=backuppc
-pkgver=3.3.2
+pkgver=4.0.0
+_xsver=0.51
+_rbpcver=3.0.9.5
pkgrel=1
pkgdesc='Enterprise-grade system for backing up Linux, Windows and MacOS PCs'
url='https://sourceforge.net/projects/backuppc/'
license=('GPL2')
-arch=('any')
-depends=('openssh'
- 'par2cmdline'
- 'perl-archive-zip'
- 'perl-file-listing'
- 'perl-time-modules'
- 'perl-cgi'
- 'perl-xml-rss'
- 'smbclient')
-optdepends=('rsync: used by rsync transfert method'
- 'perl-file-rsyncp: used by rsync transfert method'
- 'perl-io-dirent')
-source=("https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/BackupPC-$pkgver.tar.gz"
+arch=('x86_64' 'i686')
+makedepends=('git')
+depends=('glibc' 'popt' 'par2cmdline' 'perl-archive-zip' 'perl-io-dirent'
+ 'perl-file-listing' 'perl-time-modules' 'perl-cgi' 'perl-xml-rss')
+optdepends=('openssh: ssh transfert support'
+ 'rsync: rsync transfert support'
+ 'smbclient: smb/cifs transfert support'
+ 'rrdtool: graphs of the pool usage ')
+source=("https://github.com/backuppc/backuppc/releases/download/v${pkgver//./_}/BackupPC-$pkgver.tar.gz"
+ "https://github.com/backuppc/backuppc-xs/releases/download/v${_xsver//./_}/BackupPC-XS-${_xsver}.tar.gz"
+ "https://github.com/backuppc/rsync-bpc/releases/download/v${_rbpcver//./_}/rsync-bpc-${_rbpcver}.tar.gz"
"$pkgname.service"
- "$pkgname.socket"
"$pkgname.sysusers"
"$pkgname.tmpfiles"
"$pkgname.profile.sh"
"$pkgname.profile.csh"
"$pkgname.httpd"
- '01-move-socket-into-run.patch'
- '02-move-socket-into-run.patch'
- '03-fix-FS#32642.patch'
- '04-fix-cve-2011-4923.patch')
+ '01-fix-FS#32642.patch'
+ '02-fix-cve-2011-4923.patch')
install=$pkgname.install
backup=("etc/$pkgname/config.pl"
"etc/$pkgname/hosts"
"etc/httpd/conf/extra/$pkgname.conf"
"etc/$pkgname/$pkgname.users")
-md5sums=('7d57515bf3de8dd2b5de7e7c52afc4bd'
- 'ffb8827bbefcf5f0cd959d08fdf64fc1'
- '88344dbc5f8777e04fc8e0d250a2db82'
+md5sums=('47d3c87239ea24e1a544bd101957aa53'
+ 'd657d26dece5d9a6e3da7af3b7d96297'
+ 'b57dd472402d5df83e1234781983c7cc'
+ '9d798d275eb737bcfd035d5277b6b4ce'
'd90840387358e5dd230cace0b2d6b53a'
'bda3ec3f4c75521c6869279eb16af2f8'
'67a939aa63740c52d12bbdca72d37891'
'ef09e4dae5b4197998f5c3a74e0ec86d'
'99e641c4f3ba4fbcc53e046ce7290ad5'
- 'ec087e8b899450e9e7ab18bff77cb1f3'
- 'b468820ed542023e1fec7ce8c88a0c3b'
- '3917c474a275e262fde246daf59ffe31'
+ '05dd3f85ac457fa45c1a1793fc518331'
'aca8392c5dea60c3cceeb02ebcc63497')
prepare() {
@@ -62,8 +58,27 @@
:
}
+build() {
+ msg2 'rsync-bpc'
+ cd "$srcdir"/rsync-bpc-$_rbpcver
+ ./configure --prefix=/usr/share/backuppc
+ make
+}
+
package() {
- cd BackupPC-$pkgver
+ msg2 'rsync-bpc'
+ cd "$srcdir"/rsync-bpc-$_rbpcver
+ make install DESTDIR="$pkgdir"
+
+ msg2 'backuppc-xs'
+ cd "$srcdir"/BackupPC-XS-$_xsver
+ perl Makefile.PL
+ make -j1 # parallel build fail
+ make install DESTDIR="$pkgdir"
+
+ msg2 'backuppc'
+ cd "$srcdir"/BackupPC-$pkgver
+ export PERLLIB="$pkgdir/usr/lib/perl5/site_perl/"
perl configure.pl \
--batch \
--no-set-perms \
@@ -79,11 +94,21 @@
--html-dir /usr/share/$pkgname/html \
--html-dir-url /backuppc \
--data-dir /var/lib/$pkgname \
- --log-dir /var/log/$pkgname
+ --log-dir /var/log/$pkgname \
+ --run-dir /run/$pkgname \
+ --bin-path rsync_bpc=/usr/share/backuppc/bin/rsync_bpc \
+ --bin-path smbclient=/usr/bin/smbclient \
+ --bin-path nmblookup=/usr/bin/nmblookup \
+ --bin-path rsync=/usr/bin/rsync \
+ --bin-path ssh=/usr/bin/ssh \
+ --bin-path sendmail=/usr/bin/sendmail \
+ --bin-path ping=/usr/bin/ping \
+ --bin-path ping6=/usr/bin/ping \
+ --bin-path rrdtool=/usr/bin/rrdtool \
+ --
cd "$srcdir"
# systemd
install -D -m 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
- install -D -m 644 $pkgname.socket "$pkgdir/usr/lib/systemd/system/$pkgname.socket"
install -D -m 644 $pkgname.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -D -m 644 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
# install shell profiles
@@ -101,6 +126,8 @@
chmod 750 var/log/$pkgname etc/$pkgname
chmod 750 -R var/lib/$pkgname
chmod 640 etc/$pkgname/{config.pl,hosts}
+ # no /run
+ rm -r "$pkgdir"/run
}
# vim:set ts=2 sw=2 et:
Modified: backuppc.install
===================================================================
--- backuppc.install 2017-03-06 22:12:49 UTC (rev 215168)
+++ backuppc.install 2017-03-07 00:11:42 UTC (rev 215169)
@@ -14,6 +14,9 @@
echo '==> backuppc uid/gid have changed. Check your filesystem permissions.'
fi
fi
+ if (( $(vercmp $2 4.0.0-1) <= 0 )); then
+ echo '==> Major update. Remember to merge new variables in config.pl!'
+ fi
:
}
Modified: backuppc.service
===================================================================
--- backuppc.service 2017-03-06 22:12:49 UTC (rev 215168)
+++ backuppc.service 2017-03-07 00:11:42 UTC (rev 215169)
@@ -3,7 +3,7 @@
[Service]
User=backuppc
-PIDFile=/run/backuppc/backuppc.pid
+PIDFile=/run/backuppc/BackupPC.pid
ExecStart=/usr/share/backuppc/bin/BackupPC
ExecReload=/bin/kill -HUP $MAINPID
Deleted: backuppc.socket
===================================================================
--- backuppc.socket 2017-03-06 22:12:49 UTC (rev 215168)
+++ backuppc.socket 2017-03-07 00:11:42 UTC (rev 215169)
@@ -1,8 +0,0 @@
-[Unit]
-Description=BackupPC Socket
-
-[Socket]
-ListenStream=/run/backuppc/backuppc.sock
-
-[Install]
-WantedBy=sockets.target
More information about the arch-commits
mailing list