# $Id: smeserver-BackupPC.spec,v 1.10 2022/07/21 15:02:25 jpp Exp $ # Authority: vip-ire # Name: Daniel Berteaud Name: smeserver-BackupPC Version: 0.2 Release: 10%{?dist} Summary: BackupPC integration into SME server Group: Applications/System License: GPL URL: http://backuppc.sourceforge.net/ Source: %{name}-%{version}.tar.xz Patch0: smeserver-BackupPC-0.2.bz10266.updatetktauth.patch Patch1: smeserver-BackupPC-0.2-Add-extra-loadmodules-in-httpd.conf.patch Patch2: smeserver-BackupPC-0.2-Update-createlinks-for-systemd-for-SME10.patch Patch3: smeserver-BackupPC-0.2-Get-httpd-bkpc-task-running.patch Patch4: smeserver-BackupPC-0.2-bz10884-localhostBackupWithoutSSH.patch Patch5: smeserver-BackupPC-0.2-Add-sm2-panel-using-iframe.patch Patch6: smeserver-BackupPC-0.2-bz12000-backup.patch Patch7: smeserver-BackupPC-0.2-bz11875-DefaultType.patch BuildRoot: %{_tmppath}/%{name}-%{version} BuildArch: noarch BuildRequires: e-smith-devtools Requires: mod_auth_tkt Requires: BackupPC >= 4.0.0 Requires: smeserver-remoteuseraccess Requires: openssl #Requires: e-smith-manager >= 2.8.0 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 * Thu Jul 21 2022 Jean-Philippe Pialasse 0.2-10.sme - add configuration to core backup [SME: 12000] - fix deprecated use of DefaultType [SME: 11875] * Fri Oct 01 2021 Brian Read 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 0.2-8.sme - allow localhost SME backup without SSH, but sudo [SME: 10884] * Wed Jan 27 2021 Brian Read 0.2-7.sme - Get-httpd-bkpc-task-running [SME: 11055] * Mon Jan 11 2021 Brian Read 0.2-6.sme - Update createlinks for systemd according to [SME: 10959][SME: 11055] * Fri Nov 27 2020 Brian Read 0.2-5.sme - Add in extra Loadmodules to httpd.conf [SME: 11055] * Tue Oct 27 2020 John Crisp 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 0.2-3.sme - initial build to install BackupPC4fix [SME: 10514] * Wed May 03 2017 Jean-Philipe Pialasse 0.2-2.sme - update TKT auth parameter for SME 9.2 update [SME: 10266] * Tue Nov 12 2013 Daniel B. 0.2-1.sme - Rebuild for SME9 * Mon Nov 29 2010 Daniel B. 0.1-12.sme - Support pbzip2 for archiving - Use nice to reduce the priority of compression * Tue Jun 16 2009 Daniel B. [0.1-11] - Remove double quotes when calling signal-event with ssh [SME: 5302] * Fri May 29 2009 Daniel B. [0.1-10] - Call signal-event with it full path in smeserver-template.pl [SME: 5302] * Tue May 12 2009 Daniel B. [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. [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. [0.1-7] - Fixe permissions on /etc/BackupPC/pc * Mon Mar 23 2009 Daniel B. [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. [0.1-5] - Enhance sudoers templates * Mon Feb 23 2009 Daniel B. [0.1-4] - Fix logrotate issue (send a sigusr1 signal to httpd-bkpc) * Tue Jan 20 2009 Daniel B. [0.1-3] - Update Exclude path for smeserver config example * Thu Dec 11 2008 Daniel B. [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. [0.1-1] - Fix logrotate issue * Thu Aug 14 2008 Daniel B. [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 - [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 - [3.0-0] - rpm package - script BackupPC_SME_remoteBackup to remotly backup the pool (to another UNIX host) %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %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