%global releasecandidate rc8 Name: boxbackup Version: 0.11 Release: 0.5.%{releasecandidate}%{?dist} Summary: A fast, secure and automatic online backup system # -- # Avoids lots of long file paths %global client_dir parcels/%{name}-%{version}%{releasecandidate}-backup-client-linux-gnu %global server_dir parcels/%{name}-%{version}%{releasecandidate}-backup-server-linux-gnu # -- Group: Applications/Archiving # -- # This is a summary of the information contained in COPYING.txt. Please read it # for more details. # # Box Backup has different portions of its source code licensed differently. # The following fall under the BSD or pure GPLv2+ license: # - lib/* (except lib/backupclient and lib/backupstore) # - test/* (except the test/backup* and test/bbackupd directories) # - infrastructure # - distribution (except distribution/boxbackup) # The following fall under the "Box Backup GPL" licence (verbatim GPL, with # linking exceptions for Microsoft VSS and OpenSSL): # - lib/backupclient and lib/backupstore # - bin/* # - test/backup* and test/bbackupd # - contrib/* # - distribution/boxbackup # # Note that the pure GPLv2+ and "Box Backup GPL" are not fully compatible. We # are using the terms of the BSD license for the dually-licensed files to link # them with the "Box Backup GPL" portions. This renders the binary distribution # *incompatible* with the pure GPLv2 license, however you are free to obtain the # source code and recompile yourself without the linking exceptions if you want # a pure GPLv2 compatible version of Box Backup. # -- License: GPLv2+ with exceptions URL: http://www.boxbackup.org/ Source0: http://www.boxbackup.org/svn/box/packages/%{name}-%{version}%{releasecandidate}.tgz # Override the prepackaged initscripts to make them Fedora compliant Source1: boxbackup-bbackupd.init Source2: boxbackup-bbstored.init # Some additional documentation Source3: boxbackup-client-README.fedora Source4: boxbackup-server-README.fedora Patch0: boxbackup-0.11rc2-testbench-filemode.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Requires for building BuildRequires: autoconf, automake # Required for documentation BuildRequires: libxslt # Code dependencies BuildRequires: libedit-devel # It is highly recommended to use OpenSSL 0.9.7 or newer BuildRequires: openssl-devel >= 0.9.7a BuildRequires: db4-devel Requires: openssl >= 0.9.7a Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts Requires(postun): initscripts %description Box Backup is a completely automatic on-line backup system. Backed up files are stored encrypted on a file-system on a remote server, which does not need to be trusted. The backup server runs as a daemon on the client copying only the changes within files, and old versions and deleted files are retained. It is designed to be easy and cheap to run a server and (optional) RAID is implemented in user-land for ease of use. This package contains the Box Backup client. %package server Summary: Server for the Box Backup online backup system Group: System Environment/Daemons %description server Box Backup is a completely automatic on-line backup system. Backed up files are stored encrypted on a file-system on a remote server, which does not need to be trusted. The backup server runs as a daemon on the client copying only the changes within files, and old versions and deleted files are retained. It is designed to be easy and cheap to run a server and (optional) RAID is implemented in user-land for ease of use. This package contains the Box Backup server. %prep %setup -q -n %{name}-%{version}%{releasecandidate} %patch0 -p1 -b .filemode # Fix permissions chmod 0644 contrib/bbreporter/bbreporter.py chmod 0644 lib/win32/getopt.h # Make non-UTF-8 files UTF-8 iconv -f iso8859-1 -t utf-8 THANKS.txt > THANKS.txt.conv && mv -f THANKS.txt.conv THANKS.txt # Additional documentation install -m 0644 %{SOURCE3} client-README.fedora install -m 0644 %{SOURCE4} server-README.fedora # Start configure test -e configure || ./bootstrap %build %configure # %{?_smp_mflags} not supported yet make V=1 %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{_initrddir} mkdir -m 0750 -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/bbackupd mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/bbstored mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5 mkdir -p $RPM_BUILD_ROOT%{_var}/lib/%{name} # Client touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/bbackupd.conf install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/bbackupd install -m 0755 %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{client_dir}/bbackupctl $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{client_dir}/bbackupd-config $RPM_BUILD_ROOT%{_sbindir} install -m 0644 docs/man/bbackupd.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbackupctl.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbackupquery.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbackupd-config.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbackupd.conf.5.gz $RPM_BUILD_ROOT%{_mandir}/man5/ # Server touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/bbstored.conf touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/raidfile.conf install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/bbstored install -m 0755 %{server_dir}/bbstored $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{server_dir}/bbstored-config $RPM_BUILD_ROOT%{_sbindir} install -m 0755 %{server_dir}/raidfile-config $RPM_BUILD_ROOT%{_sbindir} install -m 0644 docs/man/raidfile-config.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbstored.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbstored-config.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbstored-certs.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/bbstoreaccounts.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/ install -m 0644 docs/man/raidfile.conf.5.gz $RPM_BUILD_ROOT%{_mandir}/man5/ install -m 0644 docs/man/bbstored.conf.5.gz $RPM_BUILD_ROOT%{_mandir}/man5/ %check # Note: these tests require >= 1GB of free disk space and runs local instances, # so it's pretty heavy in terms of system resources, requires that no daemon be # alraedy running, and TCP port 2201 must be open in the firewall. #make test %clean rm -rf $RPM_BUILD_ROOT %pre server getent group boxbackup >/dev/null || groupadd -r boxbackup getent passwd boxbackup >/dev/null || \ useradd -r -g boxbackup -d / -s /sbin/nologin -c "Box Backup Server" boxbackup exit 0 %post /sbin/chkconfig --add bbackupd %post server /sbin/chkconfig --add bbstored # Stop service on removal %preun if [ $1 = 0 ] ; then /sbin/service bbackupd stop >/dev/null 2>&1 /sbin/chkconfig --del bbackupd fi # Restart service on upgrade %postun if [ "$1" -ge "1" ] ; then /sbin/service bbackupd condrestart >/dev/null 2>&1 || : fi # Stop service on removal %preun server if [ $1 = 0 ]; then %{_initrddir}/bbstored stop > /dev/null 2>&1 /sbin/chkconfig --del bbstored fi # Restart service on upgrade %postun server if [ "$1" -ge "1" ] ; then /sbin/service bbackupd condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc CONTACT.txt DOCUMENTATION.txt %doc LINUX.txt THANKS.txt %doc BUGS.txt ExceptionCodes.txt LICENSE-DUAL.txt LICENSE-GPL.txt client-README.fedora %dir %attr(0700,boxbackup,root) %{_sysconfdir}/%{name} %dir %attr(0700,root,root) %{_sysconfdir}/%{name}/bbackupd %dir %attr(0755,root,root) %{_var}/lib/%{name} %{_initrddir}/bbackupd %config(noreplace) %ghost %{_sysconfdir}/%{name}/bbackupd.conf %{_sbindir}/bbackupd %{_sbindir}/bbackupquery %{_sbindir}/bbackupctl %{_sbindir}/bbackupd-config %{_mandir}/*/bbackup*.gz %files server %defattr(-,root,root,-) %doc contrib/bbreporter/LICENSE contrib/bbreporter/bbreporter.py %doc docs/api-notes/ server-README.fedora %dir %attr(0700,boxbackup,root) %{_sysconfdir}/%{name} %dir %attr(0700,boxbackup,root) %{_sysconfdir}/%{name}/bbstored %{_initrddir}/bbstored %config(noreplace) %ghost %{_sysconfdir}/%{name}/bbstored.conf %config(noreplace) %ghost %{_sysconfdir}/%{name}/raidfile.conf %{_sbindir}/bbstored %{_sbindir}/bbstoreaccounts %{_sbindir}/bbstored-certs %{_sbindir}/bbstored-config %{_sbindir}/raidfile-config %{_mandir}/*/bbstore*.gz %{_mandir}/*/raidfile*.gz %changelog * Mon Feb 21 2011 Stewart Adam - 0.11-0.5.rc8 - Use "GPLv2+ with exceptions" instead of "Box Backup GPL" for License tag * Sat Feb 19 2011 Stewart Adam - 0.11-0.4.rc8 - Take ownership of /etc/boxbackup - Fix license tag * Tue Nov 23 2010 Stewart Adam - 0.11-0.3.rc8 - Fix scriptlets to correctly restart server upon upgrade * Sun Nov 21 2010 Stewart Adam - 0.11-0.2.rc8 - Stop using fedora-usermgmt - Fix an error in the instructions in the server package's README.fedora * Sat Nov 13 2010 Stewart Adam - 0.11-0.1.rc8 - Update to 0.11rc8 - Change UID of user to 52, as 50 and 51 have since been taken * Wed Sep 16 2009 Stewart Adam - 0.11-0.1.rc4.20090916svn - Update to latest SVN snapshot (r2559), includes changes from 0.11rc4 * Sat Aug 29 2009 Stewart Adam - 0.11-0.4.rc2.20090829svn - Update to latest SVN snapshot (r2551) - Fix rh_status and rh_status_q in initscripts * Thu Aug 20 2009 Stewart Adam - 0.11-0.3.rc2.20090721svn - Add libedit-devel and libxslt BR - Disable test bench due to frequent failures * Thu Aug 20 2009 Stewart Adam - 0.11-0.2.rc2.20090721svn - Add autoconf, automake BR * Thu Jul 21 2009 Stewart Adam - 0.11-0.1.rc2.20090721svn - Initial Fedora RPM release based on Martin Elbourne's spec