Compare commits

..

No commits in common. "rawhide" and "f30" have entirely different histories.

9 changed files with 56 additions and 211 deletions

2
.gitignore vendored
View file

@ -10,5 +10,3 @@ BackupPC-3.1.2.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

View file

@ -1,45 +0,0 @@
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);

View file

@ -1,17 +1,15 @@
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
--- a/configure.pl
+++ b/configure.pl
@@ -949,7 +949,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
- share share/doc share/doc/BackupPC
+ doc
lib lib/BackupPC
lib/BackupPC/CGI
lib/BackupPC/Config
@@ -1085,13 +1085,13 @@ sub DoInstall
print("Making Apache configuration file for suid-perl\n");
InstallFile("httpd/src/BackupPC.conf", "httpd/BackupPC.conf", 0644);
@ -28,16 +26,14 @@ Index: BackupPC-4.4.0/configure.pl
}
#
# 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";
--- a/lib/BackupPC/CGI/View.pm
+++ b/lib/BackupPC/CGI/View.pm
@@ -102,7 +102,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}) ) {
# get the latest LOG file

View file

@ -9,12 +9,11 @@
%global _updatedb_conf /etc/updatedb.conf
Name: BackupPC
Version: 4.4.0
Release: 23%{?dist}
Version: 4.3.1
Release: 3%{?dist}
Summary: High-performance backup system
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
License: GPLv2+
URL: http://backuppc.github.io/backuppc/index.html
Source0: https://github.com/backuppc/backuppc/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: BackupPC.htaccess
@ -25,11 +24,8 @@ Source4: BackupPC_Admin.c
Source5: backuppc.service
Source6: BackupPC.tmpfiles
Source7: README.RHEL
Source8: apache.users
Patch0: BackupPC-4.1.3-docfix.patch
# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2091514
Patch1: https://github.com/backuppc/backuppc/commit/2c9270b9b849b2c86ae6301dd722c97757bc9256.patch
BuildRequires: gcc
BuildRequires: perl-generators
@ -39,18 +35,8 @@ BuildRequires: perl(Compress::Zlib)
BuildRequires: perl(Data::Dumper)
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(Socket)
BuildRequires: perl(strict)
BuildRequires: perl(utf8)
BuildRequires: perl(vars)
BuildRequires: perl(version)
%if 0%{?_with_systemd}
BuildRequires: systemd
@ -61,12 +47,7 @@ Requires: perl(Net::FTP::AutoReconnect)
Requires: perl(Net::FTP::RetrHandle)
Requires: bzip2
%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: webserver
Recommends: httpd
%else
Requires: httpd
%endif
Requires: iputils
Requires: openssh-clients
%if ! 0%{?el6}
@ -74,11 +55,20 @@ Requires: par2cmdline
%endif
Requires: rrdtool
Requires: rsync-bpc >= 3.0.9.6
Requires: perl(Archive::Zip)
Requires: perl(BackupPC::XS) >= 0.53
Requires: perl(CGI)
Requires: perl(Compress::Zlib)
Requires: perl(Digest::MD5)
Requires: perl(Encode)
Requires: perl(File::Listing)
Requires: perl-Time-modules
Requires: perl(version)
Requires: perl(XML::RSS)
Requires: samba-client
Requires: %{_sbindir}/sendmail
Requires(pre): shadow-utils
%if 0%{?_with_systemd}
Requires(post): shadow-utils
%{?systemd_requires}
@ -90,7 +80,6 @@ Requires(postun): initscripts
Requires: policycoreutils
BuildRequires: selinux-policy-devel checkpolicy
BuildRequires: make
Provides: backuppc = %{version}-%{release}
@ -118,24 +107,28 @@ mkdir selinux
pushd selinux
cat >%{name}.te <<EOF
policy_module(%{name},0.0.6)
policy_module(%{name},0.0.5)
require {
type httpd_t, var_lib_t, var_log_t;
class sock_file { write };
type unconfined_service_t;
class unix_stream_socket { connectto };
type ssh_exec_t, ping_exec_t, sendmail_exec_t;
class file { getattr };
type httpd_t;
type var_lib_t;
type var_log_t;
class sock_file write;
type initrc_t;
class unix_stream_socket connectto;
type ssh_exec_t;
type ping_exec_t;
type sendmail_exec_t;
class file getattr;
type var_run_t;
class sock_file { getattr };
class sock_file getattr;
type httpd_log_t;
class file { open };
class dir { read };
class file open;
class dir read;
}
allow httpd_t var_run_t:sock_file write;
allow httpd_t var_lib_t:file write;
allow httpd_t unconfined_service_t:unix_stream_socket connectto;
allow httpd_t initrc_t:unix_stream_socket connectto;
allow httpd_t ping_exec_t:file getattr;
allow httpd_t sendmail_exec_t:file getattr;
allow httpd_t ssh_exec_t:file getattr;
@ -159,11 +152,6 @@ for m in Net/FTP; do
sed -i "\@lib/$m@d" configure.pl
done
# Create a sysusers.d config file
cat >backuppc.sysusers.conf <<EOF
u backuppc - - %{_localstatedir}/lib/%{name} -
EOF
%build
# Build C wrapper
@ -226,14 +214,12 @@ install -p -m 0755 systemd/src/init.d/linux-backuppc %{buildroot}%{_initrddir}/b
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/pc
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
install -p -m 0644 %{SOURCE1} \
%{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}/
# perl-suidperl is no longer avaialable, we use a C wrapper
mkdir -p %{buildroot}%{_datadir}/%{name}/sbin
@ -245,9 +231,9 @@ install -pm 0755 BackupPC_Admin %{buildroot}%{_libexecdir}/%{name}/
mkdir -p %{buildroot}%{_datadir}/selinux/packages/%{name}
install -m 0644 selinux/%{name}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.pp
install -m0644 -D backuppc.sysusers.conf %{buildroot}%{_sysusersdir}/backuppc.conf
%pre
%{_sbindir}/useradd -d %{_localstatedir}/lib/%{name} -r -s /sbin/nologin backuppc 2> /dev/null || :
%preun
%if 0%{?_with_systemd}
@ -309,7 +295,7 @@ fi
%doc README.md README.setup README.RHEL ChangeLog doc/*
%license LICENSE
%dir %attr(-,backuppc,backuppc) %{_localstatedir}/log/%{name}
%dir %attr(-,backuppc,apache) %{_sysconfdir}/%{name}/
%dir %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%config(noreplace) %attr(-,backuppc,apache) %{_sysconfdir}/%{name}/*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
@ -333,98 +319,9 @@ fi
%attr(4750,backuppc,apache) %{_libexecdir}/%{name}/BackupPC_Admin
%attr(-,backuppc,root) %{_localstatedir}/lib/%{name}/
%{_datadir}/selinux/packages/%{name}/%{name}.pp
%{_sysusersdir}/backuppc.conf
%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.
@ -618,6 +515,9 @@ fi
- 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
- 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)
* Fri Jul 09 2010 Mike McGrath <mmcgrath@redhat.com> 3.1.0-14.1

View file

@ -1 +1 @@
D /run/BackupPC 0775 root backuppc -
D /var/run/BackupPC 0775 root backuppc -

View file

@ -5,7 +5,7 @@ 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
usermod -s /bin/bash
or
@ -13,20 +13,18 @@ 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.
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.
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>
htpasswd -c /etc/BackupPC/apache.users username
(Note that the '-c' flag is only necessary to create the file)
Once complete, add that user as an admin in config.pl:

View file

@ -1,2 +0,0 @@
# You will need to create at least one user to be able to login
# htpasswd /etc/BackupPC/apache.users <username>

View file

@ -8,7 +8,7 @@ User=backuppc
Group=backuppc
ExecStart=/usr/share/BackupPC/bin/BackupPC
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/run/BackupPC/BackupPC.pid
PIDFile=/var/run/BackupPC/BackupPC.pid
[Install]
WantedBy=multi-user.target

View file

@ -1 +1 @@
SHA512 (BackupPC-4.4.0.tar.gz) = 0c88447ab000c4a452034d5d8a074cd56801c7b38b0886e686e446c73ecfd0a40f0aa08703f76d16c31b24aec85c10c4ed1815d0cb67be5a1d66e5caeb3de418
SHA512 (BackupPC-4.3.1.tar.gz) = acabc8d79779bfa599192af88938dbdbf7bf12e82564f3c25398cc4bc04207ea21494974bec20779433f0207fd82b17107c538437309950d619ca3a9856e721f