Compare commits
61 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7f5ecc282 | ||
|
|
6e70bbdca3 | ||
|
|
33097a061f | ||
|
|
8621a37579 | ||
| 8419cc70b8 | |||
|
|
edbec1d7f2 | ||
|
|
6abe186d5b | ||
|
|
b03f2170da | ||
|
|
edbff7c7b1 | ||
|
|
41bc11d5f4 | ||
|
|
d257177f62 | ||
|
|
3839f77cdb | ||
|
|
4e955ebfa2 | ||
|
|
025d9faadb | ||
|
|
43fac9c218 | ||
|
|
fe45fbc0f8 | ||
|
|
afef48ff47 | ||
|
|
20e0cabd4b | ||
|
|
0e930ee80f | ||
|
|
156586b036 | ||
| c0368369de | |||
|
|
c3e6e7525e | ||
|
|
ce09e637c8 | ||
|
|
8ecf3398eb | ||
|
|
71e1101463 | ||
|
|
4190d34fe2 | ||
|
|
84f13cfba5 | ||
|
|
0fd33e52c0 | ||
|
|
8b08ce47fa | ||
|
|
05fc0b3af7 | ||
|
|
de902f4a5f | ||
|
|
886b144c01 | ||
|
|
4a778563c8 | ||
|
|
79a36d960a | ||
|
|
b8a09119d9 | ||
|
|
3266827f88 | ||
|
|
ff2b495762 | ||
|
|
1bafcacc6f | ||
|
|
0518db57b1 | ||
|
|
95a8aba408 | ||
|
|
a6a783b7df | ||
|
|
0d452fee1c | ||
|
|
ba734567b4 | ||
|
|
45c52b7a20 | ||
|
|
c9b2794567 | ||
|
|
ddb6f910d0 | ||
|
|
92450a5c29 | ||
|
|
0d10f0c368 | ||
|
|
64461b0c6f | ||
|
|
3f0c5b110a | ||
|
|
30e2a22b78 | ||
|
|
e06bd5db04 | ||
|
|
0775d2d775 | ||
|
|
9814010ebe | ||
|
|
fbea894e34 | ||
|
|
339fcd70b8 | ||
|
|
d51543eef9 | ||
|
|
eb44428796 | ||
|
|
78ee0b17c7 | ||
|
|
6901d6f37f | ||
|
|
6917caa911 |
17 changed files with 494 additions and 371 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
|
@ -1,3 +1,14 @@
|
||||||
BackupPC-3.1.2.tar.gz
|
BackupPC-3.1.2.tar.gz
|
||||||
/BackupPC-3.3.0.tar.gz
|
/BackupPC-3.3.0.tar.gz
|
||||||
/BackupPC-3.3.1.tar.gz
|
/BackupPC-3.3.1.tar.gz
|
||||||
|
/BackupPC-4.1.1.tar.gz
|
||||||
|
/BackupPC-4.1.2.tar.gz
|
||||||
|
/BackupPC-4.1.3.tar.gz
|
||||||
|
/BackupPC-4.1.4.tar.gz
|
||||||
|
/BackupPC-4.1.5.tar.gz
|
||||||
|
/BackupPC-4.2.0.tar.gz
|
||||||
|
/BackupPC-4.2.1.tar.gz
|
||||||
|
/BackupPC-4.3.0.tar.gz
|
||||||
|
/BackupPC-4.3.1.tar.gz
|
||||||
|
/BackupPC-4.3.2.tar.gz
|
||||||
|
/BackupPC-4.4.0.tar.gz
|
||||||
|
|
|
||||||
45
2c9270b9b849b2c86ae6301dd722c97757bc9256.patch
Normal file
45
2c9270b9b849b2c86ae6301dd722c97757bc9256.patch
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
From 2c9270b9b849b2c86ae6301dd722c97757bc9256 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Craig Barratt <19445341+craigbarratt@users.noreply.github.com>
|
||||||
|
Date: Fri, 15 Apr 2022 11:45:57 -0700
|
||||||
|
Subject: [PATCH] remove erroneous 2nd argument to Data::Dumper; see #466
|
||||||
|
|
||||||
|
---
|
||||||
|
configure.pl | 2 +-
|
||||||
|
lib/BackupPC/Storage/Text.pm | 4 ++--
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.pl b/configure.pl
|
||||||
|
index 6826ebcd..d5deef58 100755
|
||||||
|
--- a/configure.pl
|
||||||
|
+++ b/configure.pl
|
||||||
|
@@ -668,7 +668,7 @@
|
||||||
|
if ( defined($Conf{CgiUserConfigEdit}{$p}) );
|
||||||
|
}
|
||||||
|
$Conf{CgiUserConfigEdit} = $new;
|
||||||
|
- my $d = Data::Dumper->new([$new], [*value]);
|
||||||
|
+ my $d = Data::Dumper->new([$new]);
|
||||||
|
$d->Indent(1);
|
||||||
|
$d->Terse(1);
|
||||||
|
$d->Sortkeys(1);
|
||||||
|
diff --git a/lib/BackupPC/Storage/Text.pm b/lib/BackupPC/Storage/Text.pm
|
||||||
|
index e9df664f..09fcb246 100644
|
||||||
|
--- a/lib/BackupPC/Storage/Text.pm
|
||||||
|
+++ b/lib/BackupPC/Storage/Text.pm
|
||||||
|
@@ -422,7 +422,7 @@ sub ConfigFileMerge
|
||||||
|
my $var = $1;
|
||||||
|
$skipExpr = "\$fakeVar = $2\n";
|
||||||
|
if ( exists($newConf->{$var}) ) {
|
||||||
|
- my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
|
||||||
|
+ my $d = Data::Dumper->new([$newConf->{$var}]);
|
||||||
|
$d->Indent(1);
|
||||||
|
$d->Terse(1);
|
||||||
|
$d->Sortkeys(1);
|
||||||
|
@@ -454,7 +454,7 @@ sub ConfigFileMerge
|
||||||
|
#
|
||||||
|
foreach my $var ( sort(keys(%$newConf)) ) {
|
||||||
|
next if ( $done->{$var} );
|
||||||
|
- my $d = Data::Dumper->new([$newConf->{$var}], [*value]);
|
||||||
|
+ my $d = Data::Dumper->new([$newConf->{$var}]);
|
||||||
|
$d->Indent(1);
|
||||||
|
$d->Terse(1);
|
||||||
|
$d->Sortkeys(1);
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
diff -Naur BackupPC-3.2.1-pristine/init.d/src/linux-backuppc BackupPC-3.2.1/init.d/src/linux-backuppc
|
|
||||||
--- BackupPC-3.2.1-pristine/init.d/src/linux-backuppc 2011-04-24 21:31:55.000000000 -0600
|
|
||||||
+++ BackupPC-3.2.1/init.d/src/linux-backuppc 2011-07-07 21:36:41.363281386 -0600
|
|
||||||
@@ -20,6 +20,25 @@
|
|
||||||
|
|
||||||
RETVAL=0
|
|
||||||
|
|
||||||
+topDirCheck()
|
|
||||||
+{
|
|
||||||
+ updatedb=/etc/updatedb.conf
|
|
||||||
+ topdir=$(perl <<_EOF_
|
|
||||||
+ require '__CONFDIR__/config.pl';
|
|
||||||
+ print \$Conf{TopDir};
|
|
||||||
+_EOF_
|
|
||||||
+)
|
|
||||||
+ if [ -r $updatedb ]; then
|
|
||||||
+ grep ^PRUNEPATHS $updatedb | grep ${topdir%%/} > /dev/null
|
|
||||||
+ if [ $? -eq 1 ]; then
|
|
||||||
+ logger -t BackupPC -s "WARNING: Your BackupPC \$Conf{TopDir} is not listed in the locate"
|
|
||||||
+ logger -t BackupPC -s "database configuration's PRUNEPATHS. This may cause all of your"
|
|
||||||
+ logger -t BackupPC -s "backed up files to be indexed!"
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
start() {
|
|
||||||
#
|
|
||||||
# You can set the SMB share password here is you wish. Otherwise
|
|
||||||
@@ -38,6 +57,7 @@
|
|
||||||
echo
|
|
||||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/backuppc || \
|
|
||||||
RETVAL=1
|
|
||||||
+ topDirCheck
|
|
||||||
return $RETVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
diff -Naur BackupPC-3.2.1-pristine/bin/BackupPC BackupPC-3.2.1/bin/BackupPC
|
|
||||||
--- BackupPC-3.2.1-pristine/bin/BackupPC 2011-04-24 21:31:54.000000000 -0600
|
|
||||||
+++ BackupPC-3.2.1/bin/BackupPC 2011-07-08 21:14:46.609762024 -0600
|
|
||||||
@@ -363,11 +363,11 @@
|
|
||||||
# Write out our initial status and save our PID
|
|
||||||
#
|
|
||||||
StatusWrite();
|
|
||||||
- unlink("$LogDir/BackupPC.pid");
|
|
||||||
- if ( open(PID, ">", "$LogDir/BackupPC.pid") ) {
|
|
||||||
+ unlink("/var/run/BackupPC/BackupPC.pid");
|
|
||||||
+ if ( open(PID, ">", "/var/run/BackupPC/BackupPC.pid") ) {
|
|
||||||
print(PID $$);
|
|
||||||
close(PID);
|
|
||||||
- chmod(0444, "$LogDir/BackupPC.pid");
|
|
||||||
+ chmod(0444, "/var/run/BackupPC/BackupPC.pid");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
@@ -1846,7 +1846,7 @@
|
|
||||||
close(LOG);
|
|
||||||
LogFileOpen();
|
|
||||||
print(LOG "Fatal error: unhandled signal $SigName\n");
|
|
||||||
- unlink("$LogDir/BackupPC.pid");
|
|
||||||
+ unlink("/var/run/BackupPC/BackupPC.pid");
|
|
||||||
confess("Got new signal $SigName... quitting\n");
|
|
||||||
} else {
|
|
||||||
$SigName = shift;
|
|
||||||
@@ -1968,7 +1968,7 @@
|
|
||||||
}
|
|
||||||
delete($Info{pid});
|
|
||||||
StatusWrite();
|
|
||||||
- unlink("$LogDir/BackupPC.pid");
|
|
||||||
+ unlink("/var/run/BackupPC/BackupPC.pid");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
diff -Naur BackupPC-3.2.1-pristine/bin/BackupPC BackupPC-3.2.1/bin/BackupPC
|
|
||||||
--- BackupPC-3.2.1-pristine/bin/BackupPC 2011-04-24 21:31:54.000000000 -0600
|
|
||||||
+++ BackupPC-3.2.1/bin/BackupPC 2011-07-07 22:25:55.287651463 -0600
|
|
||||||
@@ -1885,7 +1885,7 @@
|
|
||||||
print(LOG $bpc->timeStamp, "unix socket() failed: $!\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
- my $sockFile = "$LogDir/BackupPC.sock";
|
|
||||||
+ my $sockFile = "/var/run/BackupPC/BackupPC.sock";
|
|
||||||
unlink($sockFile);
|
|
||||||
if ( !bind(SERVER_UNIX, sockaddr_un($sockFile)) ) {
|
|
||||||
print(LOG $bpc->timeStamp, "unix bind() failed: $!\n");
|
|
||||||
diff -Naur BackupPC-3.2.1-pristine/lib/BackupPC/Lib.pm BackupPC-3.2.1/lib/BackupPC/Lib.pm
|
|
||||||
--- BackupPC-3.2.1-pristine/lib/BackupPC/Lib.pm 2011-04-24 21:31:55.000000000 -0600
|
|
||||||
+++ BackupPC-3.2.1/lib/BackupPC/Lib.pm 2011-07-07 22:26:46.744614593 -0600
|
|
||||||
@@ -686,7 +686,7 @@
|
|
||||||
#
|
|
||||||
# First try the unix-domain socket
|
|
||||||
#
|
|
||||||
- my $sockFile = "$bpc->{LogDir}/BackupPC.sock";
|
|
||||||
+ my $sockFile = "/var/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,24 +0,0 @@
|
||||||
diff -Naur BackupPC-3.3.0-pristine/lib/BackupPC/CGI/Lib.pm BackupPC-3.3.0/lib/BackupPC/CGI/Lib.pm
|
|
||||||
--- BackupPC-3.3.0-pristine/lib/BackupPC/CGI/Lib.pm 2013-04-14 14:43:32.000000000 -0600
|
|
||||||
+++ BackupPC-3.3.0/lib/BackupPC/CGI/Lib.pm 2014-02-21 22:42:25.844412429 -0700
|
|
||||||
@@ -144,7 +144,7 @@
|
|
||||||
# Verify we are running as the correct user
|
|
||||||
#
|
|
||||||
if ( $Conf{BackupPCUserVerify}
|
|
||||||
- && $> != (my $uid = (getpwnam($Conf{BackupPCUser}))[2]) ) {
|
|
||||||
+ && $> != (my $uid = (getpwnam($Conf{BackupPCUser}))) ) {
|
|
||||||
ErrorExit(eval("qq{$Lang->{Wrong_user__my_userid_is___}}"), <<EOF);
|
|
||||||
This script needs to run as the user specified in \$Conf{BackupPCUser},
|
|
||||||
which is set to $Conf{BackupPCUser}.
|
|
||||||
diff -Naur BackupPC-3.3.0-pristine/lib/BackupPC/Lib.pm BackupPC-3.3.0/lib/BackupPC/Lib.pm
|
|
||||||
--- BackupPC-3.3.0-pristine/lib/BackupPC/Lib.pm 2013-04-14 14:43:32.000000000 -0600
|
|
||||||
+++ BackupPC-3.3.0/lib/BackupPC/Lib.pm 2014-02-21 22:39:24.037478780 -0700
|
|
||||||
@@ -160,7 +160,7 @@
|
|
||||||
#
|
|
||||||
if ( !$noUserCheck
|
|
||||||
&& $bpc->{Conf}{BackupPCUserVerify}
|
|
||||||
- && $> != (my $uid = (getpwnam($bpc->{Conf}{BackupPCUser}))[2]) ) {
|
|
||||||
+ && $> != (my $uid = (getpwnam($bpc->{Conf}{BackupPCUser}))) ) {
|
|
||||||
print(STDERR "$0: Wrong user: my userid is $>, instead of $uid"
|
|
||||||
. " ($bpc->{Conf}{BackupPCUser})\n");
|
|
||||||
print(STDERR "Please su $bpc->{Conf}{BackupPCUser} first\n");
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
--- BackupPC-3.3.1/lib/BackupPC/CGI/Browse.pm.orig 2016-07-15 10:32:24.007070271 +0200
|
|
||||||
+++ BackupPC-3.3.1/lib/BackupPC/CGI/Browse.pm 2016-07-15 10:33:00.920213213 +0200
|
|
||||||
@@ -65,7 +65,7 @@
|
|
||||||
#
|
|
||||||
# default to the newest backup
|
|
||||||
#
|
|
||||||
- if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
|
|
||||||
+ if ( !defined($In{num}) && @Backups > 0 ) {
|
|
||||||
$i = @Backups - 1;
|
|
||||||
$num = $Backups[$i]{num};
|
|
||||||
}
|
|
||||||
43
BackupPC-4.1.3-docfix.patch
Normal file
43
BackupPC-4.1.3-docfix.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
Index: BackupPC-4.4.0/configure.pl
|
||||||
|
===================================================================
|
||||||
|
--- BackupPC-4.4.0.orig/configure.pl
|
||||||
|
+++ BackupPC-4.4.0/configure.pl
|
||||||
|
@@ -946,7 +946,7 @@ sub DoInstall
|
||||||
|
# Create install directories
|
||||||
|
#
|
||||||
|
foreach my $dir ( qw(bin
|
||||||
|
- share share/doc share/doc/BackupPC
|
||||||
|
+ doc
|
||||||
|
lib lib/BackupPC
|
||||||
|
lib/BackupPC/CGI
|
||||||
|
lib/BackupPC/Config
|
||||||
|
@@ -1074,13 +1074,13 @@ sub DoInstall
|
||||||
|
print("Making Apache configuration file for suid-perl\n");
|
||||||
|
InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644);
|
||||||
|
|
||||||
|
- print("Installing docs in $DestDir$Conf{InstallDir}/share/doc/BackupPC\n");
|
||||||
|
+ print("Installing docs in $DestDir$Conf{InstallDir}/doc\n");
|
||||||
|
foreach my $doc ( qw(BackupPC.pod BackupPC.html) ) {
|
||||||
|
- InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/share/doc/BackupPC/$doc", 0444);
|
||||||
|
+ InstallFile("doc/$doc", "$DestDir$Conf{InstallDir}/doc/$doc", 0444);
|
||||||
|
#
|
||||||
|
# clean up files from old directory
|
||||||
|
#
|
||||||
|
- unlink("$DestDir$Conf{InstallDir}/doc/$doc") if ( -f "$DestDir$Conf{InstallDir}/doc/$doc" );
|
||||||
|
+ #unlink("$DestDir$Conf{InstallDir}/doc/$doc") if ( -f "$DestDir$Conf{InstallDir}/doc/$doc" );
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# clean up old directory (ok if it quietly fails if there are other files in that directory)
|
||||||
|
Index: BackupPC-4.4.0/lib/BackupPC/CGI/View.pm
|
||||||
|
===================================================================
|
||||||
|
--- BackupPC-4.4.0.orig/lib/BackupPC/CGI/View.pm
|
||||||
|
+++ BackupPC-4.4.0/lib/BackupPC/CGI/View.pm
|
||||||
|
@@ -104,7 +104,7 @@ sub action
|
||||||
|
$file = $bpc->ConfDir() . "/hosts";
|
||||||
|
$linkHosts = 1;
|
||||||
|
} elsif ( $type eq "docs" ) {
|
||||||
|
- $file = $bpc->InstallDir() . "/share/doc/BackupPC/BackupPC.html";
|
||||||
|
+ $file = $bpc->InstallDir() . "/doc/BackupPC.html";
|
||||||
|
} elsif ( $host ne "" ) {
|
||||||
|
if ( !defined($In{num}) ) {
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
BackupPC's README file for Fedora
|
|
||||||
|
|
||||||
## BackupPC's user
|
|
||||||
For security reasons, backuppc user cannot log in. If you want to start manual
|
|
||||||
backup (ie for debugging), you'll need to set it a shell :
|
|
||||||
usermod -s /bin/bash
|
|
||||||
|
|
||||||
Do not forget to create an SSH key (ssk-keygen) and copy it to remote computers
|
|
||||||
if you plan to use tar/rsync over SSH backup method.
|
|
||||||
|
|
||||||
## BackupPC's web interface
|
|
||||||
The CGI web interface is located at :
|
|
||||||
http://localhost/BackupPC
|
|
||||||
|
|
||||||
You will need to create users in /etc/BackupPC/apache.users :
|
|
||||||
htpasswd -c /etc/BackupPC/apache.users username
|
|
||||||
(Note that the '-c' flag is only necessary to create the file)
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<Directory /usr/share/BackupPC/>
|
<DirectoryMatch /usr/(share|libexec)/BackupPC/>
|
||||||
# BackupPC requires valid authentication in order for the web interface to
|
# BackupPC requires valid authentication in order for the web interface to
|
||||||
# function properly. One can view the web interface without authentication
|
# function properly. One can view the web interface without authentication
|
||||||
# though all functionality is disabled.
|
# though all functionality is disabled.
|
||||||
|
|
@ -28,10 +28,9 @@ AuthName "BackupPC"
|
||||||
require valid-user
|
require valid-user
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
</DirectoryMatch>
|
||||||
</Directory>
|
|
||||||
|
|
||||||
|
|
||||||
Alias /BackupPC/images /usr/share/BackupPC/html/
|
Alias /BackupPC/images /usr/share/BackupPC/html/
|
||||||
ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin
|
ScriptAlias /BackupPC /usr/libexec/BackupPC/BackupPC_Admin
|
||||||
ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin
|
ScriptAlias /backuppc /usr/libexec/BackupPC/BackupPC_Admin
|
||||||
|
|
|
||||||
548
BackupPC.spec
548
BackupPC.spec
|
|
@ -1,11 +1,6 @@
|
||||||
# enable -PIE build
|
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 5
|
# tmpfiles.d & systemd not supported in RHEL < 7
|
||||||
%global _without_selinux 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# tmpfiles.d & systemd support in all supported Fedora now, but not RHEL < 7
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
%global _with_tmpfilesd 1
|
%global _with_tmpfilesd 1
|
||||||
%global _with_systemd 1
|
%global _with_systemd 1
|
||||||
|
|
@ -14,155 +9,133 @@
|
||||||
%global _updatedb_conf /etc/updatedb.conf
|
%global _updatedb_conf /etc/updatedb.conf
|
||||||
|
|
||||||
Name: BackupPC
|
Name: BackupPC
|
||||||
Version: 3.3.1
|
Version: 4.4.0
|
||||||
Release: 5%{?dist}
|
Release: 23%{?dist}
|
||||||
Summary: High-performance backup system
|
Summary: High-performance backup system
|
||||||
Group: Applications/System
|
|
||||||
License: GPLv2+
|
|
||||||
URL: http://backuppc.sourceforge.net/
|
|
||||||
|
|
||||||
Source0: http://downloads.sourceforge.net/backuppc/%{name}-%{version}.tar.gz
|
# Automatically converted from old format: GPLv2+ - review is highly recommended.
|
||||||
Patch0: BackupPC-3.2.1-locatedb.patch
|
License: GPL-2.0-or-later
|
||||||
Patch1: BackupPC-3.2.1-rundir.patch
|
URL: http://backuppc.github.io/backuppc/index.html
|
||||||
Patch2: BackupPC-3.2.1-piddir.patch
|
Source0: https://github.com/backuppc/backuppc/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch3: BackupPC-3.3.0-fix-shadow-access.patch
|
|
||||||
Patch4: BackupPC-3.3.1-perl_defined_at_deprecation.patch
|
|
||||||
Source1: BackupPC.htaccess
|
Source1: BackupPC.htaccess
|
||||||
Source2: BackupPC.logrotate
|
Source2: BackupPC.logrotate
|
||||||
Source3: BackupPC-README.fedora
|
Source3: README.setup
|
||||||
#A C wrapper to use since perl-suidperl is no longer provided
|
#A C wrapper to use since perl-suidperl is no longer provided
|
||||||
Source4: BackupPC_Admin.c
|
Source4: BackupPC_Admin.c
|
||||||
Source5: backuppc.service
|
Source5: backuppc.service
|
||||||
Source6: BackupPC.tmpfiles
|
Source6: BackupPC.tmpfiles
|
||||||
Source7: README.RHEL
|
Source7: README.RHEL
|
||||||
|
Source8: apache.users
|
||||||
|
|
||||||
BuildRequires: %{_bindir}/smbclient, %{_bindir}/nmblookup
|
Patch0: BackupPC-4.1.3-docfix.patch
|
||||||
BuildRequires: rsync
|
# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2091514
|
||||||
BuildRequires: coreutils
|
Patch1: https://github.com/backuppc/backuppc/commit/2c9270b9b849b2c86ae6301dd722c97757bc9256.patch
|
||||||
BuildRequires: tar
|
|
||||||
BuildRequires: openssh-clients
|
BuildRequires: gcc
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
|
BuildRequires: perl(BackupPC::XS) >= 0.53
|
||||||
|
BuildRequires: perl(CGI)
|
||||||
BuildRequires: perl(Compress::Zlib)
|
BuildRequires: perl(Compress::Zlib)
|
||||||
BuildRequires: perl(Data::Dumper)
|
BuildRequires: perl(Data::Dumper)
|
||||||
BuildRequires: perl(Digest::MD5)
|
BuildRequires: perl(Digest::MD5)
|
||||||
|
BuildRequires: perl(Encode)
|
||||||
|
BuildRequires: perl(File::Copy)
|
||||||
|
BuildRequires: perl(File::Listing)
|
||||||
|
BuildRequires: perl(File::Path)
|
||||||
|
BuildRequires: perl(File::Spec)
|
||||||
|
BuildRequires: perl(Getopt::Long)
|
||||||
|
BuildRequires: perl(Getopt::Std)
|
||||||
|
BuildRequires: perl(lib)
|
||||||
BuildRequires: perl(Pod::Usage)
|
BuildRequires: perl(Pod::Usage)
|
||||||
|
BuildRequires: perl(Socket)
|
||||||
|
BuildRequires: perl(strict)
|
||||||
|
BuildRequires: perl(utf8)
|
||||||
|
BuildRequires: perl(vars)
|
||||||
|
BuildRequires: perl(version)
|
||||||
%if 0%{?_with_systemd}
|
%if 0%{?_with_systemd}
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Unbundled libraries
|
# Unbundled libraries
|
||||||
Requires: perl(Net::FTP::AutoReconnect), perl(Net::FTP::RetrHandle)
|
Requires: perl(Net::FTP::AutoReconnect)
|
||||||
|
Requires: perl(Net::FTP::RetrHandle)
|
||||||
|
|
||||||
Requires: httpd
|
Requires: bzip2
|
||||||
Requires: perl(File::RsyncP), perl(Compress::Zlib), perl(Archive::Zip)
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
Requires: perl-Time-modules, perl(XML::RSS), perl(Digest::MD5)
|
Requires: webserver
|
||||||
Requires: rsync
|
Recommends: httpd
|
||||||
# This is a file dependency so EL5 can use samba or samba-client or
|
|
||||||
# samba3x-client
|
|
||||||
Requires: %{_bindir}/smbclient, %{_bindir}/nmblookup
|
|
||||||
|
|
||||||
Requires(pre): %{_sbindir}/useradd
|
|
||||||
%if 0%{?_with_systemd}
|
|
||||||
Requires(preun): systemd-units
|
|
||||||
Requires(post): systemd-units, %{_sbindir}/usermod
|
|
||||||
Requires(postun): systemd-units
|
|
||||||
%else
|
%else
|
||||||
Requires(preun): initscripts, chkconfig
|
Requires: httpd
|
||||||
Requires(post): initscripts, chkconfig, %{_sbindir}/usermod
|
%endif
|
||||||
|
Requires: iputils
|
||||||
|
Requires: openssh-clients
|
||||||
|
%if ! 0%{?el6}
|
||||||
|
Requires: par2cmdline
|
||||||
|
%endif
|
||||||
|
Requires: rrdtool
|
||||||
|
Requires: rsync-bpc >= 3.0.9.6
|
||||||
|
Requires: perl(BackupPC::XS) >= 0.53
|
||||||
|
Requires: perl-Time-modules
|
||||||
|
Requires: samba-client
|
||||||
|
Requires: %{_sbindir}/sendmail
|
||||||
|
|
||||||
|
%if 0%{?_with_systemd}
|
||||||
|
Requires(post): shadow-utils
|
||||||
|
%{?systemd_requires}
|
||||||
|
%else
|
||||||
|
Requires(preun): initscripts chkconfig
|
||||||
|
Requires(post): initscripts chkconfig shadow-utils
|
||||||
Requires(postun): initscripts
|
Requires(postun): initscripts
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! 0%{?_without_selinux}
|
|
||||||
Requires: policycoreutils
|
Requires: policycoreutils
|
||||||
BuildRequires: selinux-policy-devel, checkpolicy
|
BuildRequires: selinux-policy-devel checkpolicy
|
||||||
%endif
|
BuildRequires: make
|
||||||
Provides: backuppc = %{version}
|
Provides: backuppc = %{version}-%{release}
|
||||||
|
|
||||||
# BuildRoot required for RHEL5
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
BackupPC is a high-performance, enterprise-grade system for backing up Linux
|
BackupPC is a high-performance, enterprise-grade system for backing up Linux
|
||||||
and WinXX and Mac OS X PCs and laptops to a server's disk. BackupPC is highly
|
and WinXX and Mac OS X PCs and laptops to a server's disk. BackupPC is highly
|
||||||
configurable and easy to install and maintain.
|
configurable and easy to install and maintain.
|
||||||
|
|
||||||
|
NOTE: Proper configuration is required after install, see README.setup for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
%setup -q
|
for f in ChangeLog; do
|
||||||
|
|
||||||
%patch0 -p1 -b .locatedb
|
|
||||||
%patch1 -p1 -b .rundir
|
|
||||||
%patch2 -p1 -b .piddir
|
|
||||||
%patch3 -p1 -b .shadow-access
|
|
||||||
%patch4 -p1 -b .oldperl
|
|
||||||
|
|
||||||
sed -i "s|\"backuppc\"|\"$LOGNAME\"|g" configure.pl
|
|
||||||
for f in ChangeLog doc/BackupPC.pod doc/BackupPC.html; do
|
|
||||||
iconv -f ISO-8859-1 -t UTF-8 $f > $f.utf && mv $f.utf $f
|
iconv -f ISO-8859-1 -t UTF-8 $f > $f.utf && mv $f.utf $f
|
||||||
done
|
done
|
||||||
|
|
||||||
#incorrect FSF address
|
cp %{SOURCE3} .
|
||||||
sed -i 's|59 Temple Place, Suite 330, Boston, MA *02111-1307 USA|51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA|' \
|
cp %{SOURCE7} .
|
||||||
lib/BackupPC/CGI/Queue.pm \
|
cp %{SOURCE4} .
|
||||||
bin/BackupPC_archive \
|
|
||||||
lib/BackupPC/CGI/StartServer.pm \
|
|
||||||
lib/BackupPC/CGI/HostInfo.pm \
|
|
||||||
lib/BackupPC/CGI/Archive.pm \
|
|
||||||
lib/BackupPC/CGI/LOGlist.pm \
|
|
||||||
lib/BackupPC/FileZIO.pm \
|
|
||||||
lib/BackupPC/CGI/GeneralInfo.pm \
|
|
||||||
lib/BackupPC/CGI/Browse.pm \
|
|
||||||
lib/BackupPC/CGI/RSS.pm \
|
|
||||||
lib/BackupPC/CGI/Restore.pm \
|
|
||||||
lib/BackupPC/CGI/RestoreFile.pm \
|
|
||||||
bin/BackupPC_restore \
|
|
||||||
lib/BackupPC/CGI/DirHistory.pm \
|
|
||||||
lib/BackupPC/Xfer/Archive.pm \
|
|
||||||
lib/BackupPC/Config/Meta.pm \
|
|
||||||
lib/BackupPC/CGI/ArchiveInfo.pm \
|
|
||||||
lib/BackupPC/CGI/ReloadServer.pm \
|
|
||||||
lib/BackupPC/CGI/View.pm \
|
|
||||||
bin/BackupPC_tarExtract \
|
|
||||||
lib/BackupPC/CGI/EmailSummary.pm \
|
|
||||||
lib/BackupPC/Xfer/RsyncFileIO.pm \
|
|
||||||
lib/BackupPC/CGI/RestoreInfo.pm \
|
|
||||||
lib/BackupPC/CGI/StartStopBackup.pm \
|
|
||||||
lib/BackupPC/CGI/StopServer.pm \
|
|
||||||
lib/BackupPC/CGI/AdminOptions.pm \
|
|
||||||
lib/BackupPC/CGI/Summary.pm \
|
|
||||||
lib/BackupPC/CGI/EditConfig.pm
|
|
||||||
|
|
||||||
chmod a-x LICENSE README
|
|
||||||
|
|
||||||
cp %{SOURCE3} README.fedora
|
|
||||||
cp %{SOURCE7} README.RHEL
|
|
||||||
cp %{SOURCE4} BackupPC_Admin.c
|
|
||||||
|
|
||||||
%if ! 0%{?_without_selinux}
|
|
||||||
mkdir selinux
|
mkdir selinux
|
||||||
pushd selinux
|
pushd selinux
|
||||||
|
|
||||||
cat >%{name}.te <<EOF
|
cat >%{name}.te <<EOF
|
||||||
policy_module(%{name},0.0.5)
|
policy_module(%{name},0.0.6)
|
||||||
require {
|
require {
|
||||||
type var_log_t;
|
type httpd_t, var_lib_t, var_log_t;
|
||||||
type httpd_t;
|
class sock_file { write };
|
||||||
class sock_file write;
|
type unconfined_service_t;
|
||||||
type initrc_t;
|
class unix_stream_socket { connectto };
|
||||||
class unix_stream_socket connectto;
|
type ssh_exec_t, ping_exec_t, sendmail_exec_t;
|
||||||
type ssh_exec_t;
|
class file { getattr };
|
||||||
type ping_exec_t;
|
|
||||||
type sendmail_exec_t;
|
|
||||||
class file getattr;
|
|
||||||
type var_run_t;
|
type var_run_t;
|
||||||
class sock_file getattr;
|
class sock_file { getattr };
|
||||||
type httpd_log_t;
|
type httpd_log_t;
|
||||||
class file open;
|
class file { open };
|
||||||
class dir read;
|
class dir { read };
|
||||||
}
|
}
|
||||||
|
|
||||||
allow httpd_t var_run_t:sock_file write;
|
allow httpd_t var_run_t:sock_file write;
|
||||||
allow httpd_t initrc_t:unix_stream_socket connectto;
|
allow httpd_t var_lib_t:file write;
|
||||||
|
allow httpd_t unconfined_service_t:unix_stream_socket connectto;
|
||||||
allow httpd_t ping_exec_t:file getattr;
|
allow httpd_t ping_exec_t:file getattr;
|
||||||
allow httpd_t sendmail_exec_t:file getattr;
|
allow httpd_t sendmail_exec_t:file getattr;
|
||||||
allow httpd_t ssh_exec_t:file getattr;
|
allow httpd_t ssh_exec_t:file getattr;
|
||||||
|
|
@ -173,113 +146,121 @@ EOF
|
||||||
|
|
||||||
cat >%{name}.fc <<EOF
|
cat >%{name}.fc <<EOF
|
||||||
%{_sysconfdir}/%{name}(/.*)? gen_context(system_u:object_r:httpd_sys_script_rw_t,s0)
|
%{_sysconfdir}/%{name}(/.*)? gen_context(system_u:object_r:httpd_sys_script_rw_t,s0)
|
||||||
|
%{_sysconfdir}/%{name}/LOCK gen_context(system_u:object_r:httpd_lock_t,s0)
|
||||||
%{_localstatedir}/run/%{name}(/.*)? gen_context(system_u:object_r:var_run_t,s0)
|
%{_localstatedir}/run/%{name}(/.*)? gen_context(system_u:object_r:var_run_t,s0)
|
||||||
|
%{_localstatedir}/lib/%{name}(/.*)? gen_context(system_u:object_r:httpd_var_lib_t,s0)
|
||||||
%{_localstatedir}/log/%{name}(/.*)? gen_context(system_u:object_r:httpd_log_t,s0)
|
%{_localstatedir}/log/%{name}(/.*)? gen_context(system_u:object_r:httpd_log_t,s0)
|
||||||
EOF
|
EOF
|
||||||
popd
|
popd
|
||||||
%endif
|
|
||||||
|
|
||||||
# attempt to unbundle as much as possible
|
# attempt to unbundle as much as possible
|
||||||
for m in Net/FTP; do
|
for m in Net/FTP; do
|
||||||
rm -rf lib/$m
|
rm -rf lib/$m
|
||||||
pwd; ls -l
|
|
||||||
sed -i "\@lib/$m@d" configure.pl
|
sed -i "\@lib/$m@d" configure.pl
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Create a sysusers.d config file
|
||||||
|
cat >backuppc.sysusers.conf <<EOF
|
||||||
|
u backuppc - - %{_localstatedir}/lib/%{name} -
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gcc -o BackupPC_Admin BackupPC_Admin.c $RPM_OPT_FLAGS
|
# Build C wrapper
|
||||||
%if ! 0%{?_without_selinux}
|
gcc -o BackupPC_Admin BackupPC_Admin.c %{optflags}
|
||||||
# SElinux
|
|
||||||
pushd selinux
|
# SElinux
|
||||||
make -f %{_datadir}/selinux/devel/Makefile
|
pushd selinux
|
||||||
popd
|
make -f %{_datadir}/selinux/devel/Makefile
|
||||||
%endif
|
popd
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%{__perl} configure.pl \
|
||||||
perl configure.pl \
|
|
||||||
--batch \
|
--batch \
|
||||||
--dest-dir $RPM_BUILD_ROOT \
|
--backuppc-user=backuppc \
|
||||||
|
--dest-dir %{buildroot} \
|
||||||
--config-dir %{_sysconfdir}/%{name}/ \
|
--config-dir %{_sysconfdir}/%{name}/ \
|
||||||
--cgi-dir %{_datadir}/%{name}/sbin/ \
|
--config-override CgiURL=\"http://localhost/%{name}\" \
|
||||||
|
--config-override ClientNameAlias=undef \
|
||||||
|
--config-override NmbLookupPath=\"%{_bindir}/nmblookup\" \
|
||||||
|
--config-override ParPath=\"%{_bindir}/par2\" \
|
||||||
|
--config-override PingPath=\"%{_bindir}/ping\" \
|
||||||
|
--config-override Ping6Path=\"%{_sbindir}/ping6\" \
|
||||||
|
--config-override RrdToolPath=\"%{_bindir}/rrdtool\" \
|
||||||
|
--config-override RsyncBackupPCPath=\"%{_bindir}/rsync_bpc\" \
|
||||||
|
--config-override RsyncClientPath=\"%{_bindir}/rsync\" \
|
||||||
|
--config-override SendmailPath=\"%{_sbindir}/sendmail\" \
|
||||||
|
--config-override SmbClientPath=\"%{_bindir}/smbclient\" \
|
||||||
|
--config-override SshPath=\"%{_bindir}/ssh\" \
|
||||||
|
--config-override TarClientPath=\"%{_bindir}/gtar\" \
|
||||||
|
--config-override XferMethod=\"rsync\" \
|
||||||
|
--cgi-dir %{_libexecdir}/%{name} \
|
||||||
--data-dir %{_localstatedir}/lib/%{name}/ \
|
--data-dir %{_localstatedir}/lib/%{name}/ \
|
||||||
|
--hostname localhost \
|
||||||
--html-dir %{_datadir}/%{name}/html/ \
|
--html-dir %{_datadir}/%{name}/html/ \
|
||||||
--html-dir-url /%{name}/images \
|
--html-dir-url /%{name}/images \
|
||||||
--log-dir %{_localstatedir}/log/%{name} \
|
|
||||||
--install-dir %{_datadir}/%{name} \
|
--install-dir %{_datadir}/%{name} \
|
||||||
--hostname localhost \
|
--log-dir %{_localstatedir}/log/%{name} \
|
||||||
|
--no-set-perms \
|
||||||
--uid-ignore
|
--uid-ignore
|
||||||
|
|
||||||
for f in `find $RPM_BUILD_ROOT`
|
# Make bin files executable
|
||||||
do
|
chmod +x %{buildroot}%{_datadir}/%{name}/bin/*
|
||||||
if [ -f $f ]
|
|
||||||
then
|
|
||||||
sed -i s,$LOGNAME,backuppc,g $f
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
sed -i s,$LOGNAME,backuppc,g init.d/linux-backuppc
|
|
||||||
|
|
||||||
%if 0%{?_with_tmpfilesd}
|
%if 0%{?_with_tmpfilesd}
|
||||||
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d
|
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||||
install -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/%{name}.conf
|
install -p -m 0644 %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||||
|
%else
|
||||||
|
mkdir -p %{buildroot}%{_localstatedir}/run/%{name}
|
||||||
%endif
|
%endif
|
||||||
install -d $RPM_BUILD_ROOT/%{_localstatedir}/run/%{name}
|
|
||||||
|
|
||||||
%if 0%{?_with_systemd}
|
%if 0%{?_with_systemd}
|
||||||
install -d $RPM_BUILD_ROOT/%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT/%{_unitdir}/
|
install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/
|
||||||
%else
|
%else
|
||||||
install -d $RPM_BUILD_ROOT/%{_initrddir}
|
mkdir -p %{buildroot}%{_initrddir}
|
||||||
install -p -m 0755 init.d/linux-backuppc $RPM_BUILD_ROOT%{_initrddir}/backuppc
|
install -p -m 0755 systemd/src/init.d/linux-backuppc %{buildroot}%{_initrddir}/backuppc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/
|
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
|
||||||
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
|
||||||
install -d $RPM_BUILD_ROOT/%{_localstatedir}/log/%{name}
|
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/pc
|
||||||
|
|
||||||
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
install -p -m 0644 %{SOURCE1} \
|
||||||
install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/%{name}
|
%{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||||
|
install -p -m 0644 %{SOURCE2} \
|
||||||
|
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
install -p -m 0644 %{SOURCE8} \
|
||||||
|
%{buildroot}%{_sysconfdir}/%{name}/
|
||||||
|
|
||||||
chmod 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/bin/*
|
# perl-suidperl is no longer avaialable, we use a C wrapper
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/%{name}/sbin
|
||||||
|
mv %{buildroot}%{_libexecdir}/%{name}/BackupPC_Admin \
|
||||||
|
%{buildroot}%{_datadir}/%{name}/sbin/BackupPC_Admin
|
||||||
|
install -pm 0755 BackupPC_Admin %{buildroot}%{_libexecdir}/%{name}/
|
||||||
|
|
||||||
sed -i 's/^\$Conf{XferMethod}\ =.*/$Conf{XferMethod} = "rsync";/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
|
# SElinux
|
||||||
sed -i 's|^\$Conf{CgiURL}\ =.*|$Conf{CgiURL} = "http://localhost/%{name}";|' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
|
mkdir -p %{buildroot}%{_datadir}/selinux/packages/%{name}
|
||||||
sed -i 's|ClientNameAlias => 1,|ClientNameAlias => 0,|' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
|
install -m 0644 selinux/%{name}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.pp
|
||||||
|
|
||||||
#perl-suidperl is no longer avaialable, we use a C wrapper
|
install -m0644 -D backuppc.sysusers.conf %{buildroot}%{_sysusersdir}/backuppc.conf
|
||||||
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/BackupPC_Admin $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/BackupPC_Admin.pl
|
|
||||||
install -p BackupPC_Admin $RPM_BUILD_ROOT%{_datadir}/%{name}/sbin/
|
|
||||||
|
|
||||||
%if ! 0%{?_without_selinux}
|
|
||||||
# SElinux
|
|
||||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
|
|
||||||
%{__install} -m644 selinux/%{name}.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/%{name}.pp
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
|
|
||||||
%pre
|
|
||||||
%{_sbindir}/useradd -d %{_localstatedir}/lib/%{name} -r -s /sbin/nologin backuppc 2> /dev/null || :
|
|
||||||
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if 0%{?_with_systemd}
|
||||||
|
%systemd_preun backuppc.service
|
||||||
|
%else
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
%if 0%{?_with_systemd}
|
|
||||||
/bin/systemctl --no-reload disable backuppc.service > /dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop backuppc.service > /dev/null 2>&1 || :
|
|
||||||
%else
|
|
||||||
service backuppc stop > /dev/null 2>&1 || :
|
service backuppc stop > /dev/null 2>&1 || :
|
||||||
chkconfig --del backuppc || :
|
chkconfig --del backuppc || :
|
||||||
%endif
|
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if ! 0%{?_without_selinux}
|
|
||||||
(
|
(
|
||||||
# Install/update Selinux policy
|
# Install/update Selinux policy
|
||||||
semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp
|
semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp
|
||||||
|
|
@ -287,19 +268,16 @@ fi
|
||||||
restorecon -R %{_sysconfdir}/%{name}
|
restorecon -R %{_sysconfdir}/%{name}
|
||||||
restorecon -R %{_localstatedir}/log/%{name}
|
restorecon -R %{_localstatedir}/log/%{name}
|
||||||
) &>/dev/null
|
) &>/dev/null
|
||||||
%endif
|
|
||||||
|
|
||||||
|
%if 0%{?_with_systemd}
|
||||||
|
%systemd_post backuppc.service
|
||||||
|
%else
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
# initial installation
|
# initial installation
|
||||||
%if 0%{?_with_systemd}
|
|
||||||
/bin/systemctl daemon-reload > /dev/null 2>&1 || :
|
|
||||||
%else
|
|
||||||
chkconfig --add backuppc || :
|
chkconfig --add backuppc || :
|
||||||
service httpd condrestart > /dev/null 2>&1 || :
|
|
||||||
%endif
|
|
||||||
%{_sbindir}/usermod -a -G backuppc apache || :
|
|
||||||
fi
|
fi
|
||||||
|
%{_sbindir}/usermod -a -G backuppc apache || :
|
||||||
|
%endif
|
||||||
|
|
||||||
# add BackupPC backup directories to PRUNEPATHS in locate database
|
# add BackupPC backup directories to PRUNEPATHS in locate database
|
||||||
if [ -w %{_updatedb_conf} ]; then
|
if [ -w %{_updatedb_conf} ]; then
|
||||||
|
|
@ -316,45 +294,35 @@ service httpd condrestart > /dev/null 2>&1 || :
|
||||||
|
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
# uninstall
|
# uninstall
|
||||||
%if ! 0%{?_without_selinux}
|
|
||||||
# Remove the SElinux policy.
|
# Remove the SElinux policy.
|
||||||
semodule -r %{name} &> /dev/null || :
|
semodule -r %{name} &> /dev/null || :
|
||||||
%endif
|
|
||||||
|
|
||||||
# remove BackupPC backup directories from PRUNEPATHS in locate database
|
# remove BackupPC backup directories from PRUNEPATHS in locate database
|
||||||
if [ -w %{_updatedb_conf} ]; then
|
if [ -w %{_updatedb_conf} ]; then
|
||||||
sed -i '\@PRUNEPATHS@s@[ ]*'%{_localstatedir}/lib/%{name}'@@' %{_updatedb_conf} || :
|
sed -i '\@PRUNEPATHS@s@[ ]*'%{_localstatedir}/lib/%{name}'@@' %{_updatedb_conf} || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $1 -eq 1 ]; then
|
%systemd_postun_with_restart backuppc.service
|
||||||
# package upgrade, not uninstall
|
|
||||||
%if 0%{?_with_systemd}
|
|
||||||
/bin/systemctl try-restart backuppc.service > /dev/null 2>&1 || :
|
|
||||||
%endif
|
|
||||||
# at least one command required
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%doc README.md README.setup README.RHEL ChangeLog doc/*
|
||||||
%doc README README.fedora README.RHEL ChangeLog LICENSE doc/
|
%license LICENSE
|
||||||
|
|
||||||
%dir %attr(-,backuppc,backuppc) %{_localstatedir}/log/%{name}
|
%dir %attr(-,backuppc,backuppc) %{_localstatedir}/log/%{name}
|
||||||
%dir %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/
|
%dir %attr(-,backuppc,apache) %{_sysconfdir}/%{name}/
|
||||||
|
|
||||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||||
%config(noreplace) %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/*
|
%config(noreplace) %attr(-,backuppc,apache) %{_sysconfdir}/%{name}/*
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
%dir %{_datadir}/%{name}
|
||||||
%dir %{_datadir}/%{name}
|
|
||||||
%dir %{_datadir}/%{name}/sbin
|
%dir %{_datadir}/%{name}/sbin
|
||||||
%{_datadir}/%{name}/[^s]*
|
%{_datadir}/%{name}/[^s]*
|
||||||
|
%attr(750,backuppc,apache) %{_datadir}/%{name}/sbin/BackupPC_Admin
|
||||||
|
|
||||||
%if 0%{?_with_tmpfilesd}
|
%if 0%{?_with_tmpfilesd}
|
||||||
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
|
%else
|
||||||
|
%dir %attr(0775,root,backuppc) %{_localstatedir}/run/%{name}
|
||||||
%endif
|
%endif
|
||||||
%dir %attr(0775,backuppc,backuppc) %{_localstatedir}/run/%{name}
|
|
||||||
|
|
||||||
%if 0%{?_with_systemd}
|
%if 0%{?_with_systemd}
|
||||||
%{_unitdir}/backuppc.service
|
%{_unitdir}/backuppc.service
|
||||||
|
|
@ -362,15 +330,186 @@ fi
|
||||||
%attr(0755,root,root) %{_initrddir}/backuppc
|
%attr(0755,root,root) %{_initrddir}/backuppc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%attr(4750,backuppc,apache) %{_datadir}/%{name}/sbin/BackupPC_Admin
|
%attr(4750,backuppc,apache) %{_libexecdir}/%{name}/BackupPC_Admin
|
||||||
%attr(750,backuppc,apache) %{_datadir}/%{name}/sbin/BackupPC_Admin.pl
|
|
||||||
%attr(-,backuppc,root) %{_localstatedir}/lib/%{name}/
|
%attr(-,backuppc,root) %{_localstatedir}/lib/%{name}/
|
||||||
|
|
||||||
%if ! 0%{?_without_selinux}
|
|
||||||
%{_datadir}/selinux/packages/%{name}/%{name}.pp
|
%{_datadir}/selinux/packages/%{name}/%{name}.pp
|
||||||
%endif
|
%{_sysusersdir}/backuppc.conf
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-23
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-22
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-21
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-20
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.0-19
|
||||||
|
- Add sysusers.d config file to allow rpm to create users/groups automatically
|
||||||
|
|
||||||
|
* Mon Jan 20 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-18
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-17
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 25 2024 Miroslav Suchý <msuchy@redhat.com> - 4.4.0-16
|
||||||
|
- convert license to SPDX
|
||||||
|
|
||||||
|
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Mar 25 2024 Orion Poplawski <orion@nwra.com> - 4.4.0-14
|
||||||
|
- Create and own /etc/BackupPC/pc
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Aug 23 2022 Richard Shaw <hobbes1069@gmail.com> - 4.4.0-8
|
||||||
|
- Add patch to fix #2091514 where saving a configuration change in the web UI
|
||||||
|
would replace {} with () in the config file.
|
||||||
|
|
||||||
|
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.4.0-4
|
||||||
|
- Rebuilt for updated systemd-rpm-macros
|
||||||
|
See https://pagure.io/fesco/issue/2583.
|
||||||
|
|
||||||
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jun 21 2020 Richard Shaw <hobbes1069@gmail.com> - 4.4.0-1
|
||||||
|
- Update to 4.4.0.
|
||||||
|
|
||||||
|
* Wed Mar 25 2020 Jitka Plesnikova <jplesnik@redhat.com> - 4.3.2-3
|
||||||
|
- Add perl dependencies needed for build
|
||||||
|
- Remove duplicities from run-requires
|
||||||
|
|
||||||
|
* Thu Mar 12 2020 Richard Shaw <hobbes1069@gmail.com> - 4.3.2-2
|
||||||
|
- Add patch to allow prevention of backups being deleted.
|
||||||
|
- Add apache.users config file to control permissions and update related SETUP
|
||||||
|
documentation.
|
||||||
|
- Fix PID file to be created in /run instead of /var/run.
|
||||||
|
|
||||||
|
* Tue Feb 18 2020 Richard Shaw <hobbes1069@gmail.com> - 4.3.2-1
|
||||||
|
- Update to 4.3.2.
|
||||||
|
- Update SELinux permissions, fixes RHBZ#1791369.
|
||||||
|
|
||||||
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Oct 12 2019 Richard Shaw <hobbes1069@gmail.com> - 4.3.1-3
|
||||||
|
- Add selinux context for /var/lib/BackupPC to stop AVCs with LOCK files.
|
||||||
|
|
||||||
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jul 14 2019 Richard Shaw <hobbes1069@gmail.com> - 4.3.1-1
|
||||||
|
- Update to 4.3.1.
|
||||||
|
|
||||||
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Nov 26 2018 Richard Shaw <hobbes1069@gmail.com> - 4.3.0-1
|
||||||
|
- Update to 4.3.0.
|
||||||
|
|
||||||
|
* Mon Nov 05 2018 Orion Poplawski <orion@nwra.com> - 4.2.1-4
|
||||||
|
- Add reload support to systemd service file
|
||||||
|
|
||||||
|
* Thu Oct 11 2018 Richard Shaw <hobbes1069@gmail.com> - 4.2.1-3
|
||||||
|
- Revert accidental change to log dir permissions.
|
||||||
|
- Don't package /run dir when using tmpfiles.
|
||||||
|
|
||||||
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon May 07 2018 Richard Shaw <hobbes1069@gmail.com> - 4.2.1-1
|
||||||
|
- Update to 4.2.1.
|
||||||
|
|
||||||
|
* Mon Apr 9 2018 Richard Shaw <hobbes1069@gmail.com> - 4.2.0-1
|
||||||
|
- Update to 4.2.0.
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Dec 4 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.5-1
|
||||||
|
- Update to latest upstream release.
|
||||||
|
|
||||||
|
* Sat Nov 25 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.4-1
|
||||||
|
- Update to latest upstream release.
|
||||||
|
|
||||||
|
* Thu Nov 09 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.3-4.1
|
||||||
|
- Add patch to set lib location correctly in BackupPC_zipCreate.pl
|
||||||
|
|
||||||
|
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 4 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.3-2
|
||||||
|
- Change requirement from the sendmail package to the sendmail binary
|
||||||
|
which is also provided by the default MTA, postfix.
|
||||||
|
|
||||||
|
* Sun Jun 4 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.3-1
|
||||||
|
- Update to latest upstream release.
|
||||||
|
|
||||||
|
* Sun May 28 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.2-2
|
||||||
|
- Change permissions on config files to be in the apache group.
|
||||||
|
- Update systemd service file to start httpd automatically.
|
||||||
|
|
||||||
|
* Tue May 2 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.2-1
|
||||||
|
- Update to latest upstream release, 4.1.2.
|
||||||
|
|
||||||
|
* Thu Mar 30 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.1-1
|
||||||
|
- Update to latest upstream release, 4.1.1.
|
||||||
|
|
||||||
|
* Sat Mar 25 2017 Richard Shaw <hobbes1069@gmail.com> - 4.1.0-1
|
||||||
|
- Update to latest upstream release, 4.1.0.
|
||||||
|
|
||||||
|
* Thu Mar 9 2017 Richard Shaw <hobbes1069@gmail.com> - 4.0.0-1
|
||||||
|
- Update to latest upstream release, 4.0.0.
|
||||||
|
|
||||||
|
* Wed Mar 1 2017 Ville Skyttä <ville.skytta@iki.fi> - 3.3.1-9
|
||||||
|
- Move tmpfiles.d config to %%{_tmpfilesdir}
|
||||||
|
- Install LICENSE as %%license
|
||||||
|
|
||||||
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Dec 22 2016 Benjamin Lefoul <lef@fedoraproject.org> - 3.3.1-7
|
||||||
|
- Perl unescaped braces (BZ 1259481)
|
||||||
|
|
||||||
|
* Tue Oct 18 2016 Benjamin Lefoul <lef@fedoraproject.org> - 3.3.1-6
|
||||||
|
- Some IPv6 support (BZ 1385630)
|
||||||
|
|
||||||
* Fri Jul 15 2016 Benjamin Lefoul <lef@fedoraproject.org> - 3.3.1-5
|
* Fri Jul 15 2016 Benjamin Lefoul <lef@fedoraproject.org> - 3.3.1-5
|
||||||
- Deprecation of defined(@array) in perl
|
- Deprecation of defined(@array) in perl
|
||||||
|
|
||||||
|
|
@ -479,9 +618,6 @@ fi
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
* Mon Aug 02 2010 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-16
|
* Mon Aug 02 2010 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-16
|
||||||
- Debugingo with no sources (fix bug #620257)
|
|
||||||
|
|
||||||
* Sat Jul 31 2010 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-15
|
|
||||||
- perl-suidperl is no longer available (fix bug #611009)
|
- perl-suidperl is no longer available (fix bug #611009)
|
||||||
|
|
||||||
* Fri Jul 09 2010 Mike McGrath <mmcgrath@redhat.com> 3.1.0-14.1
|
* Fri Jul 09 2010 Mike McGrath <mmcgrath@redhat.com> 3.1.0-14.1
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
D /var/run/BackupPC 0775 root backuppc -
|
D /run/BackupPC 0775 root backuppc -
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifndef REAL_PATH
|
#include <stdio.h>
|
||||||
#define REAL_PATH "/usr/share/BackupPC/sbin/BackupPC_Admin.pl"
|
#include <errno.h>
|
||||||
#endif
|
|
||||||
int main(ac, av)
|
int main( int argc, char ** argv, char ** envp )
|
||||||
char **av;
|
|
||||||
{
|
{
|
||||||
execv(REAL_PATH, av);
|
if( setgid(getegid()) ) perror( "setgid" );
|
||||||
return 0;
|
if( setuid(geteuid()) ) perror( "setuid" );
|
||||||
|
execv( "/usr/share/BackupPC/sbin/BackupPC_Admin", argv );
|
||||||
|
perror( argv[0] );
|
||||||
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
README.setup
Normal file
33
README.setup
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
BackupPC's README file for Fedora & EPEL
|
||||||
|
|
||||||
|
## BackupPC's user
|
||||||
|
For security reasons, backuppc user cannot log in. If you want to start manual
|
||||||
|
backup (ie for debugging), you'll need to set it a shell :
|
||||||
|
|
||||||
|
Permanent:
|
||||||
|
usermod -s /bin/bash backuppc
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
Temporary:
|
||||||
|
su -s /bin/bash -l backuppc
|
||||||
|
|
||||||
|
|
||||||
|
Do not forget to create an SSH key (ssk-keygen) as the backuppc user and copy
|
||||||
|
it to remote computers if you plan to use tar/rsync over SSH backup method.
|
||||||
|
|
||||||
|
The easiest way to do this (after logging in as the backuppc user) is to use ssh-copy-id
|
||||||
|
|
||||||
|
ssh-copy-id <user>@<host>
|
||||||
|
|
||||||
|
|
||||||
|
## BackupPC's web interface
|
||||||
|
The CGI web interface is located at :
|
||||||
|
http://localhost/BackupPC
|
||||||
|
|
||||||
|
You will need to create users in /etc/BackupPC/apache.users :
|
||||||
|
htpasswd /etc/BackupPC/apache.users <username>
|
||||||
|
|
||||||
|
Once complete, add that user as an admin in config.pl:
|
||||||
|
|
||||||
|
$Conf{BackupPCUser} = '<username>'
|
||||||
2
apache.users
Normal file
2
apache.users
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# You will need to create at least one user to be able to login
|
||||||
|
# htpasswd /etc/BackupPC/apache.users <username>
|
||||||
|
|
@ -3,11 +3,12 @@ Description= BackupPC server
|
||||||
After=syslog.target local-fs.target remote-fs.target
|
After=syslog.target local-fs.target remote-fs.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=simple
|
||||||
User=backuppc
|
User=backuppc
|
||||||
Group=backuppc
|
Group=backuppc
|
||||||
ExecStart=/usr/share/BackupPC/bin/BackupPC -d
|
ExecStart=/usr/share/BackupPC/bin/BackupPC
|
||||||
RemainAfterExit=yes
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
PIDFile=/run/BackupPC/BackupPC.pid
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
5efdcdd48e9e0d4ef7a706902d1f8b3d BackupPC-3.3.1.tar.gz
|
SHA512 (BackupPC-4.4.0.tar.gz) = 0c88447ab000c4a452034d5d8a074cd56801c7b38b0886e686e446c73ecfd0a40f0aa08703f76d16c31b24aec85c10c4ed1815d0cb67be5a1d66e5caeb3de418
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue