# packaging notes: # # XXX Group "Backup Server" is unknown (f22+) # XXX use a dedicated user for burp ? # XXX link against tcpwrappers ? # XXX SElinux stuff ? # XXX remove packaging notes. Name: burp2 Summary: A Network-based backup and restore program Version: 2.2.18 Release: 1%{?dist} Group: Backup Server License: AGPLv3 and BSD and GPLv2+ and LGPLv2+ URL: https://burp.grke.org/ Source0: https://downloads.sourceforge.net/project/burp/burp-%{version}/burp-%{version}.tar.bz2 Source1: burp.init Source2: burp.service %if 0%{?rhel} < 7 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %endif BuildRequires: libtool BuildRequires: librsync-devel BuildRequires: zlib-devel BuildRequires: openssl-devel BuildRequires: ncurses-devel BuildRequires: libacl-devel BuildRequires: uthash-devel BuildRequires: yajl-devel %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 BuildRequires: systemd-units %endif %description Burp is a network backup and restore program, using client and server. It uses librsync in order to save network traffic and to save on the amount of space that is used by each backup. It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing up Windows computers. %package client Summary: burp backup client Group: Backup Server Requires: librsync >= 1.0 Provides: burp = %{version}-%{release} Provides: burp2-client = %{version}-%{release} # burp 1.x (burp-) and 2.x (burp2-*) are both available. # Put conflicts on -client package since -server package relies on it. Conflicts: burp-client # for burp < 1.4.40 (package name changed) Conflicts: burp < 2.0 %description client Burp is a network backup and restore program, using client and server. It uses librsync in order to save network traffic and to save on the amount of space that is used by each backup. It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing up Windows computers. %package doc Summary: Documentation and samples for Burp backup Group: Backup Server # RHEL 5 does not support noarch subpackages %if 0%{?fedora} || 0%{?rhel} >= 6 BuildArch: noarch %endif %description doc Burp is a network backup and restore program, using client and server. It uses librsync in order to save network traffic and to save on the amount of space that is used by each backup. It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing up Windows computers. %package server Summary: burp backup server Group: Backup Server Requires: burp2-client%{?_isa} = %{version}-%{release} Requires: openssl-perl Provides: bedup = %{version}-%{release} Provides: vss_strip = %{version}-%{release} %description server Burp is a network backup and restore program, using client and server. It uses librsync in order to save network traffic and to save on the amount of space that is used by each backup. It also uses VSS (Volume Shadow Copy Service) to make snapshots when backing up Windows computers. %prep %setup -q -n burp-%{version} %build %configure --sysconfdir=%{_sysconfdir}/burp --docdir=%{_defaultdocdir}/%{name}-%{version} make %{?_smp_mflags} %install # "install-all" target: also install config files and scripts make install-all DESTDIR=%{buildroot} # service files (server) %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 mkdir -p %{buildroot}%{_unitdir} install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/ %else mkdir -p %{buildroot}%{_initrddir} install -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/burp %endif # -doc: add server scripts examples %global mydocbuild %{buildroot}%{_defaultdocdir}/%{name}-%{version} mkdir -p %{mydocbuild}/server/scripts cp -p configs/server/cron.example %{mydocbuild}/server/. cp -p configs/server/out_of_date_report_script \ configs/server/offsite-backup \ %{mydocbuild}/server/scripts/. # -doc: add server config examples (excluding -client's ones) mkdir -p %{mydocbuild}/server/config/autoupgrade cp -p configs/server/autoupgrade/*.script %{mydocbuild}/server/config/autoupgrade/. cp -pr %{buildroot}%{_sysconfdir}/burp/. %{mydocbuild}/server/config/. rmdir %{mydocbuild}/server/config/CA-client rm %{mydocbuild}/server/config/burp.conf # -doc: add client scripts and config examples mkdir -p %{mydocbuild}/client cp -p configs/client/cron.example \ configs/client/zfs_script \ %{buildroot}%{_sysconfdir}/burp/burp.conf \ %{mydocbuild}/client/. # -server: do not provide a (test)client rm %{buildroot}%{_sysconfdir}/burp/clientconfdir/testclient %files doc %{_defaultdocdir}/%{name}-%{version}/ %files client %defattr(-,root,root,-) %doc README CHANGELOG DONATIONS TODO CONTRIBUTORS UPGRADING %if 0%{?rhel} <= 6 %doc LICENSE %else %license LICENSE %endif %config(noreplace) %{_sysconfdir}/burp/burp.conf %dir %{_sysconfdir}/burp/CA-client %dir %{_sysconfdir}/burp %{_sbindir}/burp # yes, burp_ca is needed in client package %{_sbindir}/burp_ca %{_mandir}/man8/burp.8* %{_mandir}/man8/burp_ca.8* %files server %{_datadir}/burp %config(noreplace) %{_sysconfdir}/burp/CA.cnf %config(noreplace) %{_sysconfdir}/burp/burp-server.conf %config(noreplace) %{_sysconfdir}/burp/clientconfdir/incexc/example %dir %{_sysconfdir}/burp/clientconfdir/incexc %dir %{_sysconfdir}/burp/clientconfdir %dir %{_localstatedir}/spool/burp %attr(750 root root) %{_bindir}/vss_strip %{_sbindir}/bsigs %{_sbindir}/bedup %{_sbindir}/bsparse %{_mandir}/man8/vss_strip.8* %{_mandir}/man8/bedup.8* %{_mandir}/man8/bsigs.8* %{_mandir}/man8/bsparse.8* %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 %{_unitdir}/burp.service %else %{_initrddir}/burp %endif %post server %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 %systemd_post burp.service %else /sbin/chkconfig --add burp %endif %preun server %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 %systemd_preun burp.service %else if [ $1 = 0 ]; then /sbin/service burp stop > /dev/null 2>&1 /sbin/chkconfig --del burp fi %endif %postun server %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 %systemd_postun_with_restart burp.service %else if [ $1 -eq 2 ]; then /sbin/service burp upgrade || : fi %endif %changelog * Wed Jun 10 2020 Dave Ludlow - 2.2.18-1 - Creation based on https://github.com/yopito/fedora-epel-pkg/tree/latest/burp2/SPECS