[arch-commits] Commit in backuppc/repos/community-any (32 files)

Sébastien Luttringer seblu at archlinux.org
Thu Jan 12 11:11:04 UTC 2017


    Date: Thursday, January 12, 2017 @ 11:11:03
  Author: seblu
Revision: 206984

archrelease: copy trunk to community-any

Added:
  backuppc/repos/community-any/01-move-socket-into-run.patch
    (from rev 206983, backuppc/trunk/01-move-socket-into-run.patch)
  backuppc/repos/community-any/02-move-socket-into-run.patch
    (from rev 206983, backuppc/trunk/02-move-socket-into-run.patch)
  backuppc/repos/community-any/03-fix-FS#32642.patch
    (from rev 206983, backuppc/trunk/03-fix-FS#32642.patch)
  backuppc/repos/community-any/04-fix-cve-2011-4923.patch
    (from rev 206983, backuppc/trunk/04-fix-cve-2011-4923.patch)
  backuppc/repos/community-any/05-fix-edit-menu-ordering.patch
    (from rev 206983, backuppc/trunk/05-fix-edit-menu-ordering.patch)
  backuppc/repos/community-any/06-fix-defined-on-array.patch
    (from rev 206983, backuppc/trunk/06-fix-defined-on-array.patch)
  backuppc/repos/community-any/07-escape-braces-in-perl-regex.patch
    (from rev 206983, backuppc/trunk/07-escape-braces-in-perl-regex.patch)
  backuppc/repos/community-any/PKGBUILD
    (from rev 206983, backuppc/trunk/PKGBUILD)
  backuppc/repos/community-any/backuppc.httpd
    (from rev 206983, backuppc/trunk/backuppc.httpd)
  backuppc/repos/community-any/backuppc.install
    (from rev 206983, backuppc/trunk/backuppc.install)
  backuppc/repos/community-any/backuppc.profile.csh
    (from rev 206983, backuppc/trunk/backuppc.profile.csh)
  backuppc/repos/community-any/backuppc.profile.sh
    (from rev 206983, backuppc/trunk/backuppc.profile.sh)
  backuppc/repos/community-any/backuppc.service
    (from rev 206983, backuppc/trunk/backuppc.service)
  backuppc/repos/community-any/backuppc.socket
    (from rev 206983, backuppc/trunk/backuppc.socket)
  backuppc/repos/community-any/backuppc.sysusers
    (from rev 206983, backuppc/trunk/backuppc.sysusers)
  backuppc/repos/community-any/backuppc.tmpfiles
    (from rev 206983, backuppc/trunk/backuppc.tmpfiles)
Deleted:
  backuppc/repos/community-any/01-move-socket-into-run.patch
  backuppc/repos/community-any/02-move-socket-into-run.patch
  backuppc/repos/community-any/03-fix-FS#32642.patch
  backuppc/repos/community-any/04-fix-cve-2011-4923.patch
  backuppc/repos/community-any/05-fix-edit-menu-ordering.patch
  backuppc/repos/community-any/06-fix-defined-on-array.patch
  backuppc/repos/community-any/07-escape-braces-in-perl-regex.patch
  backuppc/repos/community-any/PKGBUILD
  backuppc/repos/community-any/backuppc.httpd
  backuppc/repos/community-any/backuppc.install
  backuppc/repos/community-any/backuppc.profile.csh
  backuppc/repos/community-any/backuppc.profile.sh
  backuppc/repos/community-any/backuppc.service
  backuppc/repos/community-any/backuppc.socket
  backuppc/repos/community-any/backuppc.sysusers
  backuppc/repos/community-any/backuppc.tmpfiles

--------------------------------------+
 01-move-socket-into-run.patch        |  110 ++++++++--------
 02-move-socket-into-run.patch        |   86 ++++++------
 03-fix-FS#32642.patch                |   24 +--
 04-fix-cve-2011-4923.patch           |   28 ++--
 05-fix-edit-menu-ordering.patch      |   58 ++++----
 06-fix-defined-on-array.patch        |   56 ++++----
 07-escape-braces-in-perl-regex.patch |   46 +++---
 PKGBUILD                             |  224 ++++++++++++++++-----------------
 backuppc.httpd                       |   42 +++---
 backuppc.install                     |   49 ++-----
 backuppc.profile.csh                 |    2 
 backuppc.profile.sh                  |    6 
 backuppc.service                     |   22 +--
 backuppc.socket                      |   16 +-
 backuppc.sysusers                    |    2 
 backuppc.tmpfiles                    |    2 
 16 files changed, 382 insertions(+), 391 deletions(-)

Deleted: 01-move-socket-into-run.patch
===================================================================
--- 01-move-socket-into-run.patch	2017-01-12 11:09:45 UTC (rev 206983)
+++ 01-move-socket-into-run.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -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/repos/community-any/01-move-socket-into-run.patch (from rev 206983, backuppc/trunk/01-move-socket-into-run.patch)
===================================================================
--- 01-move-socket-into-run.patch	                        (rev 0)
+++ 01-move-socket-into-run.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,55 @@
+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
+

Deleted: 02-move-socket-into-run.patch
===================================================================
--- 02-move-socket-into-run.patch	2017-01-12 11:09:45 UTC (rev 206983)
+++ 02-move-socket-into-run.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -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
-

Copied: backuppc/repos/community-any/02-move-socket-into-run.patch (from rev 206983, backuppc/trunk/02-move-socket-into-run.patch)
===================================================================
--- 02-move-socket-into-run.patch	                        (rev 0)
+++ 02-move-socket-into-run.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,43 @@
+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-01-12 11:09:45 UTC (rev 206983)
+++ 03-fix-FS#32642.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -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);
-     }

Copied: backuppc/repos/community-any/03-fix-FS#32642.patch (from rev 206983, backuppc/trunk/03-fix-FS#32642.patch)
===================================================================
--- 03-fix-FS#32642.patch	                        (rev 0)
+++ 03-fix-FS#32642.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,12 @@
+--- 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-01-12 11:09:45 UTC (rev 206983)
+++ 04-fix-cve-2011-4923.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -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);

Copied: backuppc/repos/community-any/04-fix-cve-2011-4923.patch (from rev 206983, backuppc/trunk/04-fix-cve-2011-4923.patch)
===================================================================
--- 04-fix-cve-2011-4923.patch	                        (rev 0)
+++ 04-fix-cve-2011-4923.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -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: 05-fix-edit-menu-ordering.patch
===================================================================
--- 05-fix-edit-menu-ordering.patch	2017-01-12 11:09:45 UTC (rev 206983)
+++ 05-fix-edit-menu-ordering.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,29 +0,0 @@
-# Copyright © Sébastien Luttringer
-
-# This patch is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This patch is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this patch. If not, see <http://www.gnu.org/licenses/>.
-
-# This patch avoid menu in Host "Edit Config" to swap every load by using
-# alphabetic order.
-
---- a/lib/BackupPC/CGI/EditConfig.pm	2013-04-14 22:43:32.000000000 +0200
-+++ b/lib/BackupPC/CGI/EditConfig.pm	2013-08-02 03:58:38.796000000 +0200
-@@ -492,7 +492,7 @@
-     }
- 
-     my $groupText;
--    foreach my $m ( keys(%ConfigMenu) ) {
-+    foreach my $m ( sort( keys(%ConfigMenu) ) ) {
-         next if ( $menuDisable{$m}{top} );
- 	my $text = eval("qq($Lang->{$ConfigMenu{$m}{text}})");
-         if ( $m eq $menu ) {

Copied: backuppc/repos/community-any/05-fix-edit-menu-ordering.patch (from rev 206983, backuppc/trunk/05-fix-edit-menu-ordering.patch)
===================================================================
--- 05-fix-edit-menu-ordering.patch	                        (rev 0)
+++ 05-fix-edit-menu-ordering.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,29 @@
+# Copyright © Sébastien Luttringer
+
+# This patch is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This patch is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this patch. If not, see <http://www.gnu.org/licenses/>.
+
+# This patch avoid menu in Host "Edit Config" to swap every load by using
+# alphabetic order.
+
+--- a/lib/BackupPC/CGI/EditConfig.pm	2013-04-14 22:43:32.000000000 +0200
++++ b/lib/BackupPC/CGI/EditConfig.pm	2013-08-02 03:58:38.796000000 +0200
+@@ -492,7 +492,7 @@
+     }
+ 
+     my $groupText;
+-    foreach my $m ( keys(%ConfigMenu) ) {
++    foreach my $m ( sort( keys(%ConfigMenu) ) ) {
+         next if ( $menuDisable{$m}{top} );
+ 	my $text = eval("qq($Lang->{$ConfigMenu{$m}{text}})");
+         if ( $m eq $menu ) {

Deleted: 06-fix-defined-on-array.patch
===================================================================
--- 06-fix-defined-on-array.patch	2017-01-12 11:09:45 UTC (rev 206983)
+++ 06-fix-defined-on-array.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,28 +0,0 @@
-# Copyright © Sébastien Luttringer
-
-# This patch is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This patch is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this patch. If not, see <http://www.gnu.org/licenses/>.
-
-# perl 5.22 raise errors when defined is used on arrays
-
---- a/lib/BackupPC/CGI/Browse.pm	2015-06-01 09:05:54.000000000 +0200
-+++ b/lib/BackupPC/CGI/Browse.pm	2015-07-01 14:34:28.480199121 +0200
-@@ -65,7 +65,7 @@
-     #
-     # default to the newest backup
-     #
--    if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
-+    if ( !defined($In{num}) && @Backups && @Backups > 0 ) {
-         $i = @Backups - 1;
-         $num = $Backups[$i]{num};
-     }

Copied: backuppc/repos/community-any/06-fix-defined-on-array.patch (from rev 206983, backuppc/trunk/06-fix-defined-on-array.patch)
===================================================================
--- 06-fix-defined-on-array.patch	                        (rev 0)
+++ 06-fix-defined-on-array.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,28 @@
+# Copyright © Sébastien Luttringer
+
+# This patch is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This patch is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this patch. If not, see <http://www.gnu.org/licenses/>.
+
+# perl 5.22 raise errors when defined is used on arrays
+
+--- a/lib/BackupPC/CGI/Browse.pm	2015-06-01 09:05:54.000000000 +0200
++++ b/lib/BackupPC/CGI/Browse.pm	2015-07-01 14:34:28.480199121 +0200
+@@ -65,7 +65,7 @@
+     #
+     # default to the newest backup
+     #
+-    if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
++    if ( !defined($In{num}) && @Backups && @Backups > 0 ) {
+         $i = @Backups - 1;
+         $num = $Backups[$i]{num};
+     }

Deleted: 07-escape-braces-in-perl-regex.patch
===================================================================
--- 07-escape-braces-in-perl-regex.patch	2017-01-12 11:09:45 UTC (rev 206983)
+++ 07-escape-braces-in-perl-regex.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,23 +0,0 @@
-#Description: Escape braces in Perl regex
-#Author: Marcel Meckel <debian at thermoman.de>
-#Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820110
---- a/lib/BackupPC/Lib.pm	2016-01-06 12:44:15.000000000 +0100
-+++ b/lib/BackupPC/Lib.pm	2016-04-05 16:23:35.706625290 +0200
-@@ -1262,7 +1262,7 @@
-         #
-         # Replace scalar variables first
-         #
--        $arg =~ s[\${(\w+)}(\+?)]{
-+        $arg =~ s[\$\{(\w+)}(\+?)]{
-             exists($vars->{$1}) && ref($vars->{$1}) ne "ARRAY"
-                 ? ($2 eq "+" ? $bpc->shellEscape($vars->{$1}) : $vars->{$1})
-                 : "\${$1}$2"
-@@ -1271,7 +1271,7 @@
-         # Now replicate any array arguments; this just works for just one
-         # array var in each argument.
-         #
--        if ( $arg =~ m[(.*)\${(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
-+        if ( $arg =~ m[(.*)\$\{(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
-             my $pre  = $1;
-             my $var  = $2;
-             my $esc  = $3;

Copied: backuppc/repos/community-any/07-escape-braces-in-perl-regex.patch (from rev 206983, backuppc/trunk/07-escape-braces-in-perl-regex.patch)
===================================================================
--- 07-escape-braces-in-perl-regex.patch	                        (rev 0)
+++ 07-escape-braces-in-perl-regex.patch	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,23 @@
+#Description: Escape braces in Perl regex
+#Author: Marcel Meckel <debian at thermoman.de>
+#Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820110
+--- a/lib/BackupPC/Lib.pm	2016-01-06 12:44:15.000000000 +0100
++++ b/lib/BackupPC/Lib.pm	2016-04-05 16:23:35.706625290 +0200
+@@ -1262,7 +1262,7 @@
+         #
+         # Replace scalar variables first
+         #
+-        $arg =~ s[\${(\w+)}(\+?)]{
++        $arg =~ s[\$\{(\w+)}(\+?)]{
+             exists($vars->{$1}) && ref($vars->{$1}) ne "ARRAY"
+                 ? ($2 eq "+" ? $bpc->shellEscape($vars->{$1}) : $vars->{$1})
+                 : "\${$1}$2"
+@@ -1271,7 +1271,7 @@
+         # Now replicate any array arguments; this just works for just one
+         # array var in each argument.
+         #
+-        if ( $arg =~ m[(.*)\${(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
++        if ( $arg =~ m[(.*)\$\{(\w+)}(\+?)(.*)] && ref($vars->{$2}) eq "ARRAY" ) {
+             my $pre  = $1;
+             my $var  = $2;
+             my $esc  = $3;

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-01-12 11:09:45 UTC (rev 206983)
+++ PKGBUILD	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,112 +0,0 @@
-# $Id$
-# Maintainer: Sébastien Luttringer
-
-pkgname=backuppc
-pkgver=3.3.1
-pkgrel=5
-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"
-        "$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'
-        '05-fix-edit-menu-ordering.patch'
-        '06-fix-defined-on-array.patch'
-        '07-escape-braces-in-perl-regex.patch')
-install=$pkgname.install
-backup=("etc/$pkgname/config.pl"
-        "etc/$pkgname/hosts"
-        "etc/httpd/conf/extra/$pkgname.conf"
-        "etc/$pkgname/$pkgname.users")
-md5sums=('5efdcdd48e9e0d4ef7a706902d1f8b3d'
-         'ffb8827bbefcf5f0cd959d08fdf64fc1'
-         '88344dbc5f8777e04fc8e0d250a2db82'
-         'd90840387358e5dd230cace0b2d6b53a'
-         'bda3ec3f4c75521c6869279eb16af2f8'
-         '67a939aa63740c52d12bbdca72d37891'
-         'ef09e4dae5b4197998f5c3a74e0ec86d'
-         '99e641c4f3ba4fbcc53e046ce7290ad5'
-         'ec087e8b899450e9e7ab18bff77cb1f3'
-         'b468820ed542023e1fec7ce8c88a0c3b'
-         '3917c474a275e262fde246daf59ffe31'
-         'aca8392c5dea60c3cceeb02ebcc63497'
-         '2a568701fd1caf75490987814786fecf'
-         'd48f3032e65a8fc4409454fe04faf9e1'
-         '77bde96156231a3c159cfe1f1fbb1fad')
-
-prepare() {
-  cd BackupPC-$pkgver
-  # apply patch from the source array (should be a pacman feature)
-  local filename
-  for filename in "${source[@]}"; do
-    if [[ "$filename" =~ \.patch$ ]]; then
-      msg2 "Applying patch ${filename##*/}"
-      patch -p1 -N -i "$srcdir/${filename##*/}"
-    fi
-  done
-  :
-}
-
-package() {
-  cd BackupPC-$pkgver
-  perl configure.pl \
-    --batch \
-    --no-set-perms \
-    --uid-ignore \
-    --hostname __HOSTNAME__ \
-    --compress-level 5 \
-    --backuppc-user=backuppc \
-    --dest-dir "$pkgdir" \
-    --fhs \
-    --install-dir /usr/share/$pkgname \
-    --config-dir /etc/$pkgname \
-    --cgi-dir /usr/share/$pkgname/cgi-bin \
-    --html-dir /usr/share/$pkgname/html \
-    --html-dir-url /backuppc \
-    --data-dir /var/lib/$pkgname \
-    --log-dir /var/log/$pkgname
-  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
-  install -D -m 755 $pkgname.profile.sh "$pkgdir/etc/profile.d/$pkgname.sh"
-  install -D -m 755 $pkgname.profile.csh "$pkgdir/etc/profile.d/$pkgname.csh"
-  # install apache http
-  install -D -m 644 $pkgname.httpd "$pkgdir/etc/httpd/conf/extra/$pkgname.conf"
-  install -D -m 640 /dev/null "$pkgdir/etc/$pkgname/$pkgname.users"
-  # set correct permissions
-  cd "$pkgdir"
-  chown 126:126 -R etc/$pkgname
-  chown 126:126 -R var/{log,lib}/$pkgname
-  chmod 755 etc
-  chmod 755 -R var usr/share/$pkgname/{cgi-,}bin
-  chmod 750 var/log/$pkgname etc/$pkgname
-  chmod 750 -R var/lib/$pkgname
-  chmod 640 etc/$pkgname/{config.pl,hosts}
-}
-
-# vim:set ts=2 sw=2 et:

Copied: backuppc/repos/community-any/PKGBUILD (from rev 206983, backuppc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,112 @@
+# $Id$
+# Maintainer: Sébastien Luttringer
+
+pkgname=backuppc
+pkgver=3.3.1
+pkgrel=6
+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"
+        "$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'
+        '05-fix-edit-menu-ordering.patch'
+        '06-fix-defined-on-array.patch'
+        '07-escape-braces-in-perl-regex.patch')
+install=$pkgname.install
+backup=("etc/$pkgname/config.pl"
+        "etc/$pkgname/hosts"
+        "etc/httpd/conf/extra/$pkgname.conf"
+        "etc/$pkgname/$pkgname.users")
+md5sums=('5efdcdd48e9e0d4ef7a706902d1f8b3d'
+         'ffb8827bbefcf5f0cd959d08fdf64fc1'
+         '88344dbc5f8777e04fc8e0d250a2db82'
+         'd90840387358e5dd230cace0b2d6b53a'
+         'bda3ec3f4c75521c6869279eb16af2f8'
+         '67a939aa63740c52d12bbdca72d37891'
+         'ef09e4dae5b4197998f5c3a74e0ec86d'
+         '99e641c4f3ba4fbcc53e046ce7290ad5'
+         'ec087e8b899450e9e7ab18bff77cb1f3'
+         'b468820ed542023e1fec7ce8c88a0c3b'
+         '3917c474a275e262fde246daf59ffe31'
+         'aca8392c5dea60c3cceeb02ebcc63497'
+         '2a568701fd1caf75490987814786fecf'
+         'd48f3032e65a8fc4409454fe04faf9e1'
+         '77bde96156231a3c159cfe1f1fbb1fad')
+
+prepare() {
+  cd BackupPC-$pkgver
+  # apply patch from the source array (should be a pacman feature)
+  local filename
+  for filename in "${source[@]}"; do
+    if [[ "$filename" =~ \.patch$ ]]; then
+      msg2 "Applying patch ${filename##*/}"
+      patch -p1 -N -i "$srcdir/${filename##*/}"
+    fi
+  done
+  :
+}
+
+package() {
+  cd BackupPC-$pkgver
+  perl configure.pl \
+    --batch \
+    --no-set-perms \
+    --uid-ignore \
+    --hostname __HOSTNAME__ \
+    --compress-level 5 \
+    --backuppc-user=backuppc \
+    --dest-dir "$pkgdir" \
+    --fhs \
+    --install-dir /usr/share/$pkgname \
+    --config-dir /etc/$pkgname \
+    --cgi-dir /usr/share/$pkgname/cgi-bin \
+    --html-dir /usr/share/$pkgname/html \
+    --html-dir-url /backuppc \
+    --data-dir /var/lib/$pkgname \
+    --log-dir /var/log/$pkgname
+  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
+  install -D -m 755 $pkgname.profile.sh "$pkgdir/etc/profile.d/$pkgname.sh"
+  install -D -m 755 $pkgname.profile.csh "$pkgdir/etc/profile.d/$pkgname.csh"
+  # install apache http
+  install -D -m 644 $pkgname.httpd "$pkgdir/etc/httpd/conf/extra/$pkgname.conf"
+  install -D -m 640 /dev/null "$pkgdir/etc/$pkgname/$pkgname.users"
+  # set correct permissions
+  cd "$pkgdir"
+  chown 126:126 -R etc/$pkgname
+  chown 126:126 -R var/{log,lib}/$pkgname
+  chmod 755 etc
+  chmod 755 -R var usr/share/$pkgname/{cgi-,}bin
+  chmod 750 var/log/$pkgname etc/$pkgname
+  chmod 750 -R var/lib/$pkgname
+  chmod 640 etc/$pkgname/{config.pl,hosts}
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: backuppc.httpd
===================================================================
--- backuppc.httpd	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.httpd	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,21 +0,0 @@
-<Directory /usr/share/backuppc/cgi-bin>
-  # This section tells apache which machines can access the interface.
-  # You can change the allow line to allow access from your local
-  # network, or comment out this region to allow access from all
-  # machines.
-  Require ip 127.0.0.1
-
-  # You can change the authorization method to LDAP or another method
-  # besides htaccess here if you are so inclined.
-  AuthType Basic
-  AuthUserFile /etc/backuppc/backuppc.users
-  AuthName "BackupPC Community Edition Administrative Interface"
-  require valid-user
-</Directory>
-
-<Directory /usr/share/backuppc/html>
-  Require ip 127.0.0.1
-</Directory>
-
-Alias           /backuppc         /usr/share/backuppc/html
-ScriptAlias     /BackupPC_Admin         /usr/share/backuppc/cgi-bin/BackupPC_Admin

Copied: backuppc/repos/community-any/backuppc.httpd (from rev 206983, backuppc/trunk/backuppc.httpd)
===================================================================
--- backuppc.httpd	                        (rev 0)
+++ backuppc.httpd	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,21 @@
+<Directory /usr/share/backuppc/cgi-bin>
+  # This section tells apache which machines can access the interface.
+  # You can change the allow line to allow access from your local
+  # network, or comment out this region to allow access from all
+  # machines.
+  Require ip 127.0.0.1
+
+  # You can change the authorization method to LDAP or another method
+  # besides htaccess here if you are so inclined.
+  AuthType Basic
+  AuthUserFile /etc/backuppc/backuppc.users
+  AuthName "BackupPC Community Edition Administrative Interface"
+  require valid-user
+</Directory>
+
+<Directory /usr/share/backuppc/html>
+  Require ip 127.0.0.1
+</Directory>
+
+Alias           /backuppc         /usr/share/backuppc/html
+ScriptAlias     /BackupPC_Admin         /usr/share/backuppc/cgi-bin/BackupPC_Admin

Deleted: backuppc.install
===================================================================
--- backuppc.install	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.install	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,29 +0,0 @@
-#/bin/bash
-
-# arg 1:  the new package version
-post_install() {
-  systemd-sysusers backuppc.conf
-  systemd-tmpfiles --create backuppc.conf
-  :
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-post_upgrade() {
-  # change uid of old version
-  if (( $(vercmp $2 3.2.1-8) < 0 )); then
-    if pgrep -u backuppc >/dev/null; then
-      echo '==> backuppc user is running.'
-      echo '==> You must manually change uid and gid of backuppc!'
-      echo '==> e.g: usermod -u 126 -g 126 backuppc'
-    else
-      usermod -u 126 -g 126 backuppc
-      echo '==> backuppc uid/gid have changed. Check your filesystem permissions.'
-    fi
-  fi
-  # ensure /run/backuppc exists
-  systemd-tmpfiles --create backuppc.conf
-  :
-}
-
-# vim:set ts=2 sw=2 ft=sh et:

Copied: backuppc/repos/community-any/backuppc.install (from rev 206983, backuppc/trunk/backuppc.install)
===================================================================
--- backuppc.install	                        (rev 0)
+++ backuppc.install	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,20 @@
+#/bin/bash
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  # change uid of old version
+  if (( $(vercmp $2 3.2.1-8) < 0 )); then
+    if pgrep -u backuppc >/dev/null; then
+      echo '==> backuppc user is running.'
+      echo '==> You must manually change uid and gid of backuppc!'
+      echo '==> e.g: usermod -u 126 -g 126 backuppc'
+    else
+      usermod -u 126 -g 126 backuppc
+      echo '==> backuppc uid/gid have changed. Check your filesystem permissions.'
+    fi
+  fi
+  :
+}
+
+# vim:set ts=2 sw=2 ft=sh et:

Deleted: backuppc.profile.csh
===================================================================
--- backuppc.profile.csh	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.profile.csh	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1 +0,0 @@
-[ -d /usr/share/backuppc/bin ] && setenv PATH ${PATH}:/usr/share/backuppc/bin

Copied: backuppc/repos/community-any/backuppc.profile.csh (from rev 206983, backuppc/trunk/backuppc.profile.csh)
===================================================================
--- backuppc.profile.csh	                        (rev 0)
+++ backuppc.profile.csh	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1 @@
+[ -d /usr/share/backuppc/bin ] && setenv PATH ${PATH}:/usr/share/backuppc/bin

Deleted: backuppc.profile.sh
===================================================================
--- backuppc.profile.sh	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.profile.sh	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,3 +0,0 @@
-[ -d /usr/share/backuppc/bin ] && PATH=$PATH:/usr/share/backuppc/bin
-
-export PATH

Copied: backuppc/repos/community-any/backuppc.profile.sh (from rev 206983, backuppc/trunk/backuppc.profile.sh)
===================================================================
--- backuppc.profile.sh	                        (rev 0)
+++ backuppc.profile.sh	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,3 @@
+[ -d /usr/share/backuppc/bin ] && PATH=$PATH:/usr/share/backuppc/bin
+
+export PATH

Deleted: backuppc.service
===================================================================
--- backuppc.service	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.service	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,11 +0,0 @@
-[Unit]
-Description=BackupPC
-
-[Service]
-User=backuppc
-PIDFile=/run/backuppc/backuppc.pid
-ExecStart=/usr/share/backuppc/bin/BackupPC
-ExecReload=/bin/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target

Copied: backuppc/repos/community-any/backuppc.service (from rev 206983, backuppc/trunk/backuppc.service)
===================================================================
--- backuppc.service	                        (rev 0)
+++ backuppc.service	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,11 @@
+[Unit]
+Description=BackupPC
+
+[Service]
+User=backuppc
+PIDFile=/run/backuppc/backuppc.pid
+ExecStart=/usr/share/backuppc/bin/BackupPC
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

Deleted: backuppc.socket
===================================================================
--- backuppc.socket	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.socket	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1,8 +0,0 @@
-[Unit]
-Description=BackupPC Socket
-
-[Socket]
-ListenStream=/run/backuppc/backuppc.sock
-
-[Install]
-WantedBy=sockets.target

Copied: backuppc/repos/community-any/backuppc.socket (from rev 206983, backuppc/trunk/backuppc.socket)
===================================================================
--- backuppc.socket	                        (rev 0)
+++ backuppc.socket	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1,8 @@
+[Unit]
+Description=BackupPC Socket
+
+[Socket]
+ListenStream=/run/backuppc/backuppc.sock
+
+[Install]
+WantedBy=sockets.target

Deleted: backuppc.sysusers
===================================================================
--- backuppc.sysusers	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.sysusers	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1 +0,0 @@
-u backuppc 126 - /var/lib/backuppc

Copied: backuppc/repos/community-any/backuppc.sysusers (from rev 206983, backuppc/trunk/backuppc.sysusers)
===================================================================
--- backuppc.sysusers	                        (rev 0)
+++ backuppc.sysusers	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1 @@
+u backuppc 126 - /var/lib/backuppc

Deleted: backuppc.tmpfiles
===================================================================
--- backuppc.tmpfiles	2017-01-12 11:09:45 UTC (rev 206983)
+++ backuppc.tmpfiles	2017-01-12 11:11:03 UTC (rev 206984)
@@ -1 +0,0 @@
-d /run/backuppc 0750 backuppc backuppc

Copied: backuppc/repos/community-any/backuppc.tmpfiles (from rev 206983, backuppc/trunk/backuppc.tmpfiles)
===================================================================
--- backuppc.tmpfiles	                        (rev 0)
+++ backuppc.tmpfiles	2017-01-12 11:11:03 UTC (rev 206984)
@@ -0,0 +1 @@
+d /run/backuppc 0750 backuppc backuppc



More information about the arch-commits mailing list