264 lines
11 KiB
RPMSpec
264 lines
11 KiB
RPMSpec
# $Id: smeserver-BackupPC.spec,v 1.16 2023/02/11 09:01:47 terryfage Exp $
|
|
# Authority: vip-ire
|
|
# Name: Daniel Berteaud
|
|
|
|
Name: smeserver-BackupPC
|
|
Version: 0.2
|
|
Release: 17%{?dist}
|
|
Summary: BackupPC integration into SME server
|
|
|
|
Group: Applications/System
|
|
License: GPL
|
|
URL: http://backuppc.sourceforge.net/
|
|
Source: %{name}-%{version}.tar.xz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: smeserver-devtools
|
|
|
|
Requires: mod_auth_tkt
|
|
Requires: BackupPC >= 4.0.0
|
|
Requires: smeserver-remoteuseraccess
|
|
Requires: openssl
|
|
#Requires: e-smith-manager >= 2.8.0
|
|
Requires: smeserver-apache >= 2.6.0-19
|
|
AutoReqProv: no
|
|
|
|
#Conflicts: smeserver-backuppc.fws
|
|
Obsoletes: smeserver-backuppc.fws
|
|
|
|
|
|
%description
|
|
BackupPC is a high-performance, enterprise-grade system for backing up Linux
|
|
and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable
|
|
and easy to install and maintain.
|
|
This package contains specific configuration for SME server
|
|
|
|
#----------------------------------------------------
|
|
|
|
#%package -n smeserver-BackupPC4
|
|
#Summary: BackupPC 4 integration into SME server
|
|
#Group: Email
|
|
#Requires: BackupPC4
|
|
#Conflicts: smeserver-BackupPC
|
|
|
|
#%description -n smeserver-BackupPC4
|
|
#BackupPC is a high-performance, enterprise-grade system for backing up Linux
|
|
#and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable
|
|
#and easy to install and maintain.
|
|
#This package contains specific configuration for SME server
|
|
|
|
#----------------------------------------------------
|
|
|
|
%changelog
|
|
* Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley <trevor@batley.id.au> 0.2-17.sme
|
|
- Fix e-smith references in smeserver-BackupPC [SME: 12732]
|
|
|
|
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.2-16.sme
|
|
- Roll up patches and move to git repo [SME: 12338]
|
|
|
|
* Sat Sep 07 2024 BogusDateBot
|
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
|
by assuming the date is correct and changing the weekday.
|
|
|
|
* Sat Feb 11 2023 Zsolt Vasarhelyi <vasarhelyizsolt@hotmail.com> 0.2-15.sme
|
|
- expand-updatedb-conf patch [SME: 10513]
|
|
|
|
* Fri Feb 10 2023 Zsolt Vasarhelyi <vasarhelyizsolt@hotmail.com> 0.2-14.sme
|
|
- $Conf{TopDir} not in locate configuration's PRUNEPATHS [SME: 10513]
|
|
|
|
* Sun Jul 31 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.2-13.sme
|
|
- update to httpd 2.4 syntax [SME: 12036]
|
|
including Requires, and bkpc-conf
|
|
|
|
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 0.2-12.sme
|
|
- Re-build and link to latest devtools [SME: 11997]
|
|
|
|
* Mon Jul 25 2022 Zsolt Vasarhelyi <vasarhelyizsolt@hotmail.com> 0.2-11.sme
|
|
- update to httpd 2.4 syntax [SME: 12036]
|
|
|
|
* Thu Jul 21 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.2-10.sme
|
|
- add configuration to core backup [SME: 12000]
|
|
- Re-build and link to latest devtools deprecated use of DefaultType [SME: 11875]
|
|
|
|
* Fri Oct 01 2021 Brian Read <brianr@bjsystems.co.uk> 0.2-9.sme
|
|
- Add in code for SM2 panel using iframe - note: Authentication not sorted [SME: 11701]
|
|
|
|
* Fri Apr 02 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.2-8.sme
|
|
- allow localhost SME backup without SSH, but sudo [SME: 10884]
|
|
|
|
* Wed Jan 27 2021 Brian Read <brianr@bjsystems.co.uk> 0.2-7.sme
|
|
- Get-httpd-bkpc-task-running [SME: 11055]
|
|
|
|
* Mon Jan 11 2021 Brian Read <brianr@bjsystems.co.uk> 0.2-6.sme
|
|
- Update createlinks for systemd according to [SME: 10959][SME: 11055]
|
|
|
|
* Fri Nov 27 2020 Brian Read <brianr@bjsystems.co.uk> 0.2-5.sme
|
|
- Add in extra Loadmodules to httpd.conf [SME: 11055]
|
|
|
|
* Tue Oct 27 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-4.sme
|
|
- Initial build for SME v10 [SME:11055]
|
|
- Hard work done by Brian Read
|
|
- Remove v3 option and revert to just smeserver-BackupPC
|
|
|
|
* Mon Nov 25 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.2-3.sme
|
|
- initial build to install BackupPC4fix [SME: 10514]
|
|
|
|
* Wed May 03 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.2-2.sme
|
|
- update TKT auth parameter for SME 9.2 update [SME: 10266]
|
|
|
|
* Tue Nov 12 2013 Daniel B. <daniel@firewall-services.com> 0.2-1.sme
|
|
- Rebuild for SME9
|
|
|
|
* Mon Nov 29 2010 Daniel B. <daniel@firewall-services.com> 0.1-12.sme
|
|
- Support pbzip2 for archiving
|
|
- Use nice to reduce the priority of compression
|
|
|
|
* Tue Jun 16 2009 Daniel B. <daniel@firewall-services.com> [0.1-11]
|
|
- Remove double quotes when calling signal-event with ssh [SME: 5302]
|
|
|
|
* Fri May 29 2009 Daniel B. <daniel@firewall-services.com> [0.1-10]
|
|
- Call signal-event with it full path in smeserver-template.pl [SME: 5302]
|
|
|
|
* Tue May 12 2009 Daniel B. <daniel@firewall-services.com> [0.1-9]
|
|
- Add optionnal encryption of archives generated with BackupPC_SME_localArchive
|
|
BackupPC_SME_usbArchive and BackupPC_SME_remoteArchive using openssl
|
|
- Generate a key and save it in /etc/BackupPC/archive.key
|
|
- Fixe permission restriction on /etc/BackupPC/*
|
|
|
|
* Thu May 07 2009 Daniel B. <daniel@firewall-services.com> [0.1-8]
|
|
- Link backuppc-checkupgrade script in post-upgrade event
|
|
so the contrib is correctly configured without running backuppc-update
|
|
event [SME: 5221]
|
|
|
|
* Tue May 05 2009 Daniel B. <daniel@firewall-services.com> [0.1-7]
|
|
- Fixe permissions on /etc/BackupPC/pc
|
|
|
|
* Mon Mar 23 2009 Daniel B. <daniel@firewall-services.com> [0.1-6]
|
|
- modify default httpd conf (cleanup) to use the new paths
|
|
- Add quotes in share names for *Archive.conf files
|
|
- Enhance provided template
|
|
|
|
* Wed Mar 18 2009 Daniel B. <daniel@firewall-services.com> [0.1-5]
|
|
- Enhance sudoers templates
|
|
|
|
* Mon Feb 23 2009 Daniel B. <daniel@firewall-services.com> [0.1-4]
|
|
- Fix logrotate issue (send a sigusr1 signal to httpd-bkpc)
|
|
|
|
* Tue Jan 20 2009 Daniel B. <daniel@firewall-services.com> [0.1-3]
|
|
- Update Exclude path for smeserver config example
|
|
|
|
* Thu Dec 11 2008 Daniel B. <daniel@firewall-services.com> [0.1-2]
|
|
- Revert config and logs paths to their default location
|
|
- Expand-templates during bootrape-console-save instead of post-upgrade
|
|
- Remove sudoers templates.metadata to prevent conflict, added smeserver-remoteuseraccess
|
|
as a dependency
|
|
|
|
* Thu Nov 13 2008 Daniel B. <daniel@firewall-services.com> [0.1-1]
|
|
- Fix logrotate issue
|
|
|
|
* Thu Aug 14 2008 Daniel B. <daniel@firewall-services.com> [0.1-0]
|
|
- Adapted to work with 3.1.0
|
|
- Split smeserver specific stuff in a separate srpm
|
|
- Remove pre-compiled binaries from the srpm (par2cmdline must be downloaded separatly if needed)
|
|
- A dedicated httpd instance is used (running under backuppc user). This increase security as
|
|
user www no longer has access to backuppc data.
|
|
- Authentication is integrated with the server-manager (no need to login two times now)
|
|
- Added some config example (with backups disabled). These can be used as templates for other hosts
|
|
- Some corrections in backup export scripts (*copyPool scipts still need to be re-written
|
|
to be more reliable, maybe with dump/restore, or dd, and with built-in support for LVM snapshots)
|
|
|
|
* Thu May 10 2007 Daniel Berteaud <daniel@firewall-services.com>
|
|
- [3.0-1]
|
|
- corrected default config for localhost (excluding by default /opt/backuppc and /selinux)
|
|
- improvement of the rpm scriplets
|
|
- start and stop script linked to e-smith-service
|
|
- scripts for offline backups
|
|
- par2 included
|
|
|
|
* Tue Jan 30 2007 Daniel Berteaud <daniel@firewall-services.com>
|
|
- [3.0-0]
|
|
- rpm package
|
|
- script BackupPC_SME_remoteBackup to remotly backup the pool (to another UNIX host)
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
%build
|
|
perl createlinks
|
|
|
|
%install
|
|
|
|
%{__mkdir} -p $RPM_BUILD_ROOT/var/service/httpd-bkpc/supervise
|
|
%{__mkdir} -p $RPM_BUILD_ROOT/var/service/httpd-bkpc/log/supervise
|
|
%{__mkdir} -p $RPM_BUILD_ROOT/var/log/httpd-bkpc
|
|
|
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
|
|
/bin/rm -f %{name}-%{version}-filelist
|
|
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_pre-backup" "attr(0755,root,root) %config(noreplace)" \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_usbArchive" "attr(0755,root,root)" \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_usbCopyPool" "attr(0755,root,root)" \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_localArchive" "attr(0755,root,root)" \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_localCopyPool" "attr(0755,root,root)" \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_remoteArchive" "attr(0755,root,root)" \
|
|
--file "/usr/share/BackupPC/bin/BackupPC_SME_remoteCopyPool" "attr(0755,root,root)" \
|
|
--file "/etc/BackupPC/pc/localserver-template.pl2" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/pc/smeserver-template.pl2" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/pc/windows-template.pl" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/usbArchive.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/usbCopyPool.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/localArchive.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/localCopyPool.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/remoteArchive.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--file "/etc/BackupPC/remoteCopyPool.conf" "attr(640,backuppc,backuppc) %config(noreplace)" \
|
|
--dir "/etc/BackupPC/pc" "attr(750,backuppc,backuppc)" \
|
|
--dir "/var/service/httpd-bkpc" "attr(01755,root,root)" \
|
|
--file "/var/service/httpd-bkpc/run" "attr(0700,root,root)" \
|
|
--dir "/var/service/httpd-bkpc/supervise" "attr(0700,root,root)" \
|
|
--dir "/var/service/httpd-bkpc/log" "attr(0755,root,root)" \
|
|
--file "/var/service/httpd-bkpc/log/run" "attr(0755,root,root)" \
|
|
--dir "/var/service/httpd-bkpc/log/supervise" "attr(0700,root,root)" \
|
|
--dir "/var/log/httpd-bkpc" "attr(0750,smelog,smelog)" \
|
|
--ignoredir "/root/var/" \
|
|
--ignoredir "/usr/share/BackupPC" \
|
|
--ignoredir "/usr/share/BackupPC/lib" \
|
|
--ignoredir "/usr/share/BackupPC/lib/BackupPC" \
|
|
--ignoredir "/etc/BackupPC" \
|
|
--ignoredir "/etc/httpd" \
|
|
> %{name}-%{version}-filelist
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files -f %{name}-%{version}-filelist
|
|
%defattr(-,root,root,-)
|
|
|
|
#%files -n smeserver-BackupPC4 -f %{name}-%{version}-filelist
|
|
#%defattr(-,root,root,-)
|
|
|
|
|
|
%pre
|
|
#%{_sbindir}/useradd -c "BackupPC User" -m -d /home/e-smith/files/users/backuppc -r -s /sbin/nologin backuppc >& /dev/null || :
|
|
%{_sbindir}/usermod -m -d /var/lib/BackupPC backuppc >& /dev/null || :
|
|
|
|
%post
|
|
systemctl enable backuppc
|
|
systemctl start backuppc
|
|
|
|
%preun
|
|
|
|
# Disable services, and stop them
|
|
if [ $1 = 0 ]; then # Uninstall only, not upgrade
|
|
db configuration setprop backuppc status disabled >& /dev/null || :
|
|
db configuration setprop httpd-bkpc status disabled >& /dev/null || :
|
|
service backuppc stop >& /dev/null || :
|
|
fi
|
|
|
|
true
|