Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a212a3f0b | ||
|
|
99b6b5389d | ||
|
|
54194594f6 | ||
|
|
669780d050 | ||
|
|
0bb09414fa | ||
|
|
4bf1a6a161 |
5 changed files with 50 additions and 36 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
15
BackupPC-README.fedora
Normal file
15
BackupPC-README.fedora
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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/rsynv 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)
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
%endif
|
||||
|
||||
Name: BackupPC
|
||||
Version: 3.0.0
|
||||
Version: 3.1.0
|
||||
Release: 3%{?dist}
|
||||
Summary: BackupPC - high-performance backup system
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ URL: http://backuppc.sourceforge.net/
|
|||
Source0: http://dl.sourceforge.net/backuppc/%{name}-%{version}.tar.gz
|
||||
Source1: BackupPC.htaccess
|
||||
Source2: BackupPC.logrotate
|
||||
Source3: BackupPC-README.fedora
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ Requires: perl(Archive::Zip)
|
|||
Requires: perl-Time-modules
|
||||
Requires: perl(XML::RSS)
|
||||
Requires: rsync
|
||||
Requires: samba-client
|
||||
Requires(pre): %{_sbindir}/useradd
|
||||
Requires(preun): initscripts, chkconfig
|
||||
Requires(post): initscripts, chkconfig, %{_sbindir}/usermod
|
||||
|
|
@ -60,6 +62,7 @@ pushd doc
|
|||
iconv -f ISO-8859-1 -t UTF-8 BackupPC.pod > BackupPC.pod.utf && mv BackupPC.pod.utf BackupPC.pod
|
||||
iconv -f ISO-8859-1 -t UTF-8 BackupPC.html > BackupPC.html.utf && mv BackupPC.html.utf BackupPC.html
|
||||
popd
|
||||
cp %{SOURCE3} README.fedora
|
||||
|
||||
%if %{useselinux}
|
||||
%{__mkdir} selinux
|
||||
|
|
@ -68,17 +71,17 @@ pushd selinux
|
|||
cat >%{name}.te <<EOF
|
||||
policy_module(%{name},0.0.3)
|
||||
require {
|
||||
type var_log_t;
|
||||
type httpd_t;
|
||||
class sock_file write;
|
||||
type var_log_t;
|
||||
type httpd_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 httpd_sys_content_t;
|
||||
class sock_file getattr;
|
||||
type ssh_exec_t;
|
||||
type ping_exec_t;
|
||||
type sendmail_exec_t;
|
||||
class file getattr;
|
||||
type httpd_sys_content_t;
|
||||
class sock_file getattr;
|
||||
}
|
||||
|
||||
allow httpd_t httpd_sys_content_t:sock_file write;
|
||||
|
|
@ -92,7 +95,7 @@ EOF
|
|||
cat >%{name}.fc <<EOF
|
||||
%{_sysconfdir}/%{name} system_u:object_r:httpd_sys_content_t:s0
|
||||
%{_sysconfdir}/%{name}/pc system_u:object_r:httpd_sys_script_rw_t:s0
|
||||
%{_sysconfdir}/%{name}/config.pl system_u:object_r:httpd_sys_content_t:s0
|
||||
%{_sysconfdir}/%{name}/config.pl system_u:object_r:httpd_sys_content_t:s0
|
||||
%{_sysconfdir}/%{name}/hosts system_u:object_r:httpd_sys_content_t:s0
|
||||
%{_localstatedir}/log/%{name} system_u:object_r:httpd_sys_content_t:s0
|
||||
EOF
|
||||
|
|
@ -146,6 +149,7 @@ sed -i s,$LOGNAME,backuppc,g init.d/linux-backuppc
|
|||
%{__chmod} 755 $RPM_BUILD_ROOT%{_initrddir}/backuppc
|
||||
|
||||
sed -i 's/^\$Conf{XferMethod}\ =.*/$Conf{XferMethod} = "rsync";/' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
|
||||
sed -i 's|^\$Conf{CgiURL}\ =.*|$Conf{CgiURL} = "http://localhost/BackupPC";|' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.pl
|
||||
|
||||
%if %{useselinux}
|
||||
# SElinux
|
||||
|
|
@ -159,7 +163,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
|
||||
%pre
|
||||
%{_sbindir}/useradd -d %{_localstatedir}/lib/%{name} -r -s %{_bindir}/nologin backuppc 2> /dev/null || :
|
||||
%{_sbindir}/useradd -d %{_localstatedir}/lib/%{name} -r -s /sbin/nologin backuppc 2> /dev/null || :
|
||||
|
||||
|
||||
%preun
|
||||
|
|
@ -170,6 +174,7 @@ fi
|
|||
|
||||
%post
|
||||
%if %{useselinux}
|
||||
(
|
||||
# Install/update Selinux policy
|
||||
semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp
|
||||
# files owned by RPM
|
||||
|
|
@ -178,6 +183,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 || :
|
||||
|
|
@ -188,15 +194,17 @@ 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
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc README ChangeLog LICENSE doc/
|
||||
%doc README README.fedora ChangeLog LICENSE doc/
|
||||
|
||||
%dir %attr(-,backuppc,backuppc) %{_localstatedir}/log/%{name}
|
||||
%dir %attr(-,backuppc,backuppc) %{_sysconfdir}/%{name}/
|
||||
|
|
@ -218,7 +226,19 @@ fi
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Sep 21 2007 Johan Cwiklinski <johan AT x-tnd DOT ba> 3.0.0-3
|
||||
* Mon Aug 11 2008 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-3
|
||||
- using /dev/null with SELinux policy to avoid broken pipe errors (bug #432149)
|
||||
|
||||
* Sat Apr 05 2008 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-2
|
||||
- correcting nologin path
|
||||
|
||||
* Thu Nov 29 2007 Johan Cwiklinski <johan AT x-tnd DOT be> 3.1.0-1
|
||||
- New upstream version
|
||||
- Added samba-client as a dependency
|
||||
- Added readme.fedora
|
||||
- Changed CGI admin path in default config file
|
||||
|
||||
* Fri Sep 21 2007 Johan Cwiklinski <johan AT x-tnd DOT be> 3.0.0-3
|
||||
- Fixed SELinux policy module
|
||||
|
||||
* Wed Sep 12 2007 Johan Cwiklinski <johan AT x-tnd DOT be> 3.0.0-2
|
||||
|
|
|
|||
21
Makefile
21
Makefile
|
|
@ -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)
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
dc37728c1dc9225354523f279045f3f3 BackupPC-3.0.0.tar.gz
|
||||
84b4471852ef910768eae9963ef932d2 BackupPC-3.1.0.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue