[Box Backup] Fedora Core 2 RPMs
Martin Ebourne
boxbackup@fluffy.co.uk
Mon, 13 Sep 2004 23:03:49 +0100
--=-pO8nwjUYQoDUU79I1u1l
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi,
Enclosed are files to make an RPM of box backup. These have been built
for Fedora Core 2, but the RPM should probably compile and work on any
RPM distribution.
The compiled RPMs are available from here:
http://www.ebourne.me.uk/rpms/boxbackup-0.07-3.src.rpm
http://www.ebourne.me.uk/rpms/boxbackup-client-0.07-3.i386.rpm
http://www.ebourne.me.uk/rpms/boxbackup-server-0.07-3.i386.rpm
http://www.ebourne.me.uk/rpms/boxbackup-client-0.07-3.x86_64.rpm
http://www.ebourne.me.uk/rpms/boxbackup-server-0.07-3.x86_64.rpm
Please note this is not a permanent location, I would appreciate it if
you could host these on the main website.
The new files needed to build the RPM are attached. There are two start
scripts and the spec file. These could probably be added to the tar
distribution. The patch referenced by the spec file is the x86 patch I
sent earlier - it can be removed when committed.
Cheers,
Martin.
--=-pO8nwjUYQoDUU79I1u1l
Content-Disposition: attachment; filename=boxbackup.spec
Content-Type: text/plain; name=boxbackup.spec; charset=UTF-8
Content-Transfer-Encoding: 7bit
%define bb_user_id 171
%define ident %{name}-%{version}
Summary: An automatic on-line backup system for UNIX.
Name: boxbackup
Version: 0.07
Release: 3
License: BSD
Group: Applications/Archiving
URL: http://www.fluffy.co.uk/boxbackup/
Source0: %{ident}.tgz
Source1: bbackupd
Source2: bbstored
Patch0: boxbackup-0.07-x86_64.patch
Requires: openssl >= 0.9.7a
BuildRoot: %{_tmppath}/%{ident}-%{release}-root
BuildRequires: openssl-devel
%description
Box Backup is a completely automatic on-line backup system. Backed up files
are stored encrypted on a filesystem 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 userland for ease of use.
%package client
Summary: An automatic on-line backup system for UNIX.
Group: Applications/Archiving
%description client
Box Backup is a completely automatic on-line backup system. Backed up files
are stored encrypted on a filesystem 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 userland for ease of use.
This package contains the client.
%package server
Summary: An automatic on-line backup system for UNIX.
Group: System Environment/Daemons
%description server
Box Backup is a completely automatic on-line backup system. Backed up files
are stored encrypted on a filesystem 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 userland for ease of use.
This package contains the server.
%prep
%setup -q
%patch0 -p1
%build
./configure
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{ident}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored
mkdir -p $RPM_BUILD_ROOT%{_var}/lib/box
install -m 644 BUGS.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 LINUX.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 VERSION.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 CONTACT.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 DOCUMENTATION.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 ExceptionCodes.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 THANKS.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
install -m 644 TODO.txt $RPM_BUILD_ROOT%{_docdir}/%{ident}
# Client
touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbackupd.conf
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
%define client_dir parcels/%{ident}-backup-client-Linux
install %{client_dir}/bbackupd $RPM_BUILD_ROOT%{_bindir}
install %{client_dir}/bbackupquery $RPM_BUILD_ROOT%{_bindir}
install %{client_dir}/bbackupctl $RPM_BUILD_ROOT%{_bindir}
install %{client_dir}/bbackupd-config $RPM_BUILD_ROOT%{_bindir}
# Server
touch $RPM_BUILD_ROOT%{_sysconfdir}/box/bbstored.conf
touch $RPM_BUILD_ROOT%{_sysconfdir}/box/raidfile.conf
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
%define server_dir parcels/%{ident}-backup-server-Linux
install %{server_dir}/bbstored $RPM_BUILD_ROOT%{_bindir}
install %{server_dir}/bbstoreaccounts $RPM_BUILD_ROOT%{_bindir}
install %{server_dir}/bbstored-certs $RPM_BUILD_ROOT%{_bindir}
install %{server_dir}/bbstored-config $RPM_BUILD_ROOT%{_bindir}
install %{server_dir}/raidfile-config $RPM_BUILD_ROOT%{_bindir}
%pre server
/usr/sbin/useradd -c "Box Backup" -u %{bb_user_id} \
-s /sbin/nologin -r -d %{backup_dir} box 2> /dev/null || :
%post client
/sbin/chkconfig --add bbackupd
if [ ! -f %{_sysconfdir}/box/bbackupd.conf ]; then
echo "You should run the following to configure the client:"
echo "bbackupd-config /etc/box lazy <account-number> <server-host> /var/lib/box <backup-directories>"
echo "Then follow the instructions. Use this to start the client:"
echo "service bbackupd start"
fi
%post server
/sbin/chkconfig --add bbstored
if [ ! -f %{_sysconfdir}/box/bbstored.conf ]; then
echo "You should run the following to configure the server:"
echo "raidfile-config /etc/box 2048 <store-directory> [<raid-directories>]"
echo "bbstored-config /etc/box" `hostname` box
echo "Then follow the instructions. Use this to start the server:"
echo "service bbstored start"
fi
%preun client
if [ $1 = 0 ]; then
/sbin/service bbackupd stop > /dev/null 2>&1
/sbin/chkconfig --del bbackupd
fi
%preun server
if [ $1 = 0 ]; then
/sbin/service bbstored stop > /dev/null 2>&1
/sbin/chkconfig --del bbstored
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files client
%defattr(-,root,root,-)
%dir %attr(700,root,root) %{_sysconfdir}/box/bbackupd
%dir %attr(755,root,root) %{_var}/lib/box
%doc %{_docdir}/%{ident}/*.txt
%config %{_sysconfdir}/rc.d/init.d/bbackupd
%config %ghost %{_sysconfdir}/box/bbackupd.conf
%{_bindir}/bbackupd
%{_bindir}/bbackupquery
%{_bindir}/bbackupctl
%{_bindir}/bbackupd-config
%files server
%defattr(-,root,root,-)
%dir %attr(700,box,root) %{_sysconfdir}/box/bbstored
%config %{_sysconfdir}/rc.d/init.d/bbstored
%config %ghost %{_sysconfdir}/box/bbstored.conf
%config %ghost %{_sysconfdir}/box/raidfile.conf
%{_bindir}/bbstored
%{_bindir}/bbstoreaccounts
%{_bindir}/bbstored-certs
%{_bindir}/bbstored-config
%{_bindir}/raidfile-config
%changelog
* Thu Sep 9 2004 Martin Ebourne <martin@zepler.org> - 0.07-3
- Added x86_64 patch
* Mon Sep 6 2004 Martin Ebourne <martin@zepler.org> - 0.07-1
- Initial build.
--=-pO8nwjUYQoDUU79I1u1l
Content-Disposition: attachment; filename=bbackupd
Content-Type: application/x-shellscript; name=bbackupd
Content-Transfer-Encoding: 7bit
#! /bin/bash
#
# bbackupd Start/Stop the box backup daemon.
#
# chkconfig: 345 93 07
# description: bbackup is the client side deamon for Box Backup, a completely \
# automatic on-line backup system
# processname: bbackupd
# config: /etc/box
# pidfile: /var/run/bbackupd.pid
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
prog="bbackupd"
# Check that configuration exists.
[ -f /etc/box/$prog.conf ] || exit 0
start() {
echo -n $"Starting $prog: "
daemon $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
rhstatus() {
status $prog
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading $prog daemon configuration: "
killproc $prog -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/$prog ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit $?
--=-pO8nwjUYQoDUU79I1u1l
Content-Disposition: attachment; filename=bbstored
Content-Type: application/x-shellscript; name=bbstored
Content-Transfer-Encoding: 7bit
#! /bin/bash
#
# bbstored Start/Stop the box backup daemon.
#
# chkconfig: 345 93 07
# description: bbstore is the server side deamon for Box Backup, a completely \
# automatic on-line backup system
# processname: bbstored
# config: /etc/box
# pidfile: /var/run/bbstored.pid
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
prog="bbstored"
# Check that configuration exists.
[ -f /etc/box/$prog.conf ] || exit 0
start() {
echo -n $"Starting $prog: "
daemon $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
rhstatus() {
status $prog
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading $prog daemon configuration: "
killproc $prog -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/$prog ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit $?
--=-pO8nwjUYQoDUU79I1u1l--