diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/BackupPC-TopDir_change.patch b/BackupPC-TopDir_change.patch new file mode 100644 index 0000000..7500660 --- /dev/null +++ b/BackupPC-TopDir_change.patch @@ -0,0 +1,21 @@ +diff -up BackupPC-3.1.0/lib/BackupPC/Lib.pm.patch BackupPC-3.1.0/lib/BackupPC/Lib.pm +--- BackupPC-3.1.0/lib/BackupPC/Lib.pm.patch 2009-04-10 17:57:04.000000000 +0200 ++++ BackupPC-3.1.0/lib/BackupPC/Lib.pm 2009-04-10 17:57:57.000000000 +0200 +@@ -152,8 +152,6 @@ sub new + # Clean up %ENV and setup other variables. + # + delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; +- $bpc->{PoolDir} = "$bpc->{TopDir}/pool"; +- $bpc->{CPoolDir} = "$bpc->{TopDir}/cpool"; + if ( defined(my $error = $bpc->ConfigRead()) ) { + print(STDERR $error, "\n"); + return; +@@ -167,6 +165,8 @@ sub new + $paths->{$dir} = $bpc->{$dir} = $bpc->{Conf}{$dir}; + } + $bpc->{storage}->setPaths($paths); ++ $bpc->{PoolDir} = "$bpc->{TopDir}/pool"; ++ $bpc->{CPoolDir} = "$bpc->{TopDir}/cpool"; + + # + # Verify we are running as the correct user diff --git a/BackupPC.spec b/BackupPC.spec index a8b7daf..b3b172d 100644 --- a/BackupPC.spec +++ b/BackupPC.spec @@ -6,8 +6,8 @@ Name: BackupPC Version: 3.1.0 -Release: 2%{?dist} -Summary: BackupPC - high-performance backup system +Release: 4%{?dist} +Summary: High-performance backup system Group: Applications/System License: GPLv2+ @@ -16,6 +16,7 @@ Source0: http://dl.sourceforge.net/backuppc/%{name}-%{version}.tar.gz Source1: BackupPC.htaccess Source2: BackupPC.logrotate Source3: BackupPC-README.fedora +Patch0: BackupPC-TopDir_change.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -56,6 +57,7 @@ and easy to install and maintain. %prep %setup -q +%patch0 -p1 sed -i "s|\"backuppc\"|\"$LOGNAME\"|g" configure.pl iconv -f ISO-8859-1 -t UTF-8 ChangeLog > ChangeLog.utf && mv ChangeLog.utf ChangeLog pushd doc @@ -174,6 +176,7 @@ fi %post %if %{useselinux} +( # Install/update Selinux policy semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp # files owned by RPM @@ -182,6 +185,7 @@ fi restorecon -R %{_sysconfdir}/%{name} restorecon -R %{_localstatedir}/lib/%{name} restorecon -R %{_localstatedir}/log/%{name} +) &>/dev/null %endif chkconfig --add backuppc || : service httpd condrestart > /dev/null 2>&1 || : @@ -192,8 +196,10 @@ service httpd condrestart > /dev/null 2>&1 || : service httpd condrestart > /dev/null 2>&1 || : %if %{useselinux} if [ "$1" -eq "0" ]; then + ( # Remove the SElinux policy. semodule -r %{name} || : + )&>/dev/null fi %endif @@ -222,6 +228,12 @@ fi %endif %changelog +* Fri Apr 10 2009 Johan Cwiklinski 3.1.0-4 +- Fix TopDir change (bug #473944) + +* Mon Aug 11 2008 Johan Cwiklinski 3.1.0-3 +- using /dev/null with SELinux policy to avoid broken pipe errors (bug #432149) + * Sat Apr 05 2008 Johan Cwiklinski 3.1.0-2 - correcting nologin path diff --git a/Makefile b/Makefile deleted file mode 100644 index a107c41..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: BackupPC -# $Id$ -NAME := BackupPC -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON)