Skip to content

Commit

Permalink
CEPH packages for Debian based distributions
Browse files Browse the repository at this point in the history
While the CEPH backend packages have been available for a while
for RPM based installations, this patch adds the packages
bareos-filedaemon-ceph-plugin
and
bareos-storage-ceph
for DEB based distributions.

Fixes #507: build bareos-storage-ceph also for Debian/Ubuntu
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Aug 27, 2015
1 parent 061e21f commit 068291d
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 1 deletion.
10 changes: 10 additions & 0 deletions autoconf/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3855,15 +3855,22 @@ LIBS="${saved_LIBS}"
CFLAGS="${saved_CFLAGS}"
CPPFLAGS="${saved_CPPFLAGS}"


DEBIAN_CONTROL_FILEDAEMON_CEPH_PLUGIN=/dev/null
DEBIAN_CONTROL_STORAGE_CEPH=/dev/null
if test "x${have_ceph_rados}" = "xyes"; then
AC_DEFINE(HAVE_RADOS, 1, [Define to 1 if you have rados lib])
DEBIAN_CONTROL_FILEDAEMON_CEPH_PLUGIN=./debian/control.bareos-filedaemon-ceph-plugin
DEBIAN_CONTROL_STORAGE_CEPH=./debian/control.bareos-storage-ceph
else
RADOS_LIBS=""
RADOS_INC=""
fi

AC_SUBST(RADOS_INC)
AC_SUBST(RADOS_LIBS)
AC_SUBST_FILE(DEBIAN_CONTROL_FILEDAEMON_CEPH_PLUGIN)
AC_SUBST_FILE(DEBIAN_CONTROL_STORAGE_CEPH)

dnl
dnl Check for CEPH striping via libradosstriper.
Expand Down Expand Up @@ -4186,12 +4193,15 @@ debian|ubuntu|univention)
debian/bareos-director.install \
debian/bareos-director.postinst \
debian/bareos-director.preinst \
debian/bareos-filedaemon-ceph-plugin.install \
debian/bareos-filedaemon-ldap-python-plugin.install \
debian/bareos-filedaemon-python-plugin.install \
debian/bareos-filedaemon.bareos-fd.init \
debian/bareos-filedaemon.install \
debian/bareos-filedaemon.postinst \
debian/bareos-filedaemon.preinst \
debian/bareos-storage-ceph.install \
debian/bareos-storage-ceph.postinst \
debian/bareos-storage-fifo.postinst \
debian/bareos-storage-fifo.install \
debian/bareos-storage-python-plugin.install \
Expand Down
2 changes: 2 additions & 0 deletions debian/bareos-filedaemon-ceph-plugin.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@plugindir@/cephfs-fd.so
@plugindir@/rados-fd.so
1 change: 0 additions & 1 deletion debian/bareos-filedaemon-python-plugin.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
@plugindir@/BareosFdPluginLocalFileset.py*
@plugindir@/BareosFdWrapper.py*
@plugindir@/bareos_fd_consts.py*
/etc/bareos/bareos-dir.d/plugin-python-ldap.conf
3 changes: 3 additions & 0 deletions debian/bareos-storage-ceph.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@backenddir@/libbareossd-rados*.so
@backenddir@/libbareossd-cephfs*.so
@confdir@/bareos-sd.d/device-ceph-rados.conf
45 changes: 45 additions & 0 deletions debian/bareos-storage-ceph.postinst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh
# postinst script for bareos
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

daemon_user=bareos
daemon_group=bareos

permissions()
{
chown root:${daemon_group} /etc/bareos/bareos-sd.d/device-ceph-rados.conf
}

case "$1" in
configure)
permissions
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
9 changes: 9 additions & 0 deletions debian/control.bareos-filedaemon-ceph-plugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: bareos-filedaemon-ceph-plugin
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-filedaemon (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: Backup Archiving Recovery Open Sourced - storage-python-plugin
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
.
This package provides the CEPH plugins for the file daemon.
9 changes: 9 additions & 0 deletions debian/control.bareos-storage-ceph
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: bareos-storage-ceph
Architecture: any
Pre-Depends: debconf (>= 1.4.30) | debconf-2.0
Depends: bareos-storage (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: Backup Archiving Recovery Open Sourced - storage-python-plugin
Bareos is a set of programs to manage backup, recovery and verification of
data across a network of computers of different kinds.
.
This package provides the CEPH backend for the storage daemon.
4 changes: 4 additions & 0 deletions debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,12 @@ Description: Backup Archiving Recovery Open Sourced - common tools

@DEBIAN_CONTROL_DIRECTOR_PYTHON_PLUGIN@

@DEBIAN_CONTROL_FILEDAEMON_CEPH_PLUGIN@

@DEBIAN_CONTROL_FILEDAEMON_PYTHON_PLUGIN@

@DEBIAN_CONTROL_STORAGE_CEPH@

@DEBIAN_CONTROL_STORAGE_PYTHON_PLUGIN@

@DEBIAN_CONTROL_TRAYMONITOR@
Expand Down
6 changes: 6 additions & 0 deletions platforms/packaging/bareos.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ Maintainer: Joerg Steffens <joerg.steffens@bareos.com>
Homepage: http://www.bareos.org/
Standards-Version: 3.9.4
Build-Depends: acl-dev, autotools-dev, bc, chrpath, debhelper (>= 7.0.50~), dpkg-dev (>= 1.13.19), git-core, libacl1-dev, libcap-dev, libcmocka-dev (>= 1.0.1), libfastlz-dev, libjansson-dev, liblzo2-dev, libqt4-dev, libreadline-dev, libssl-dev, libwrap0-dev, libx11-dev, libsqlite3-dev, libmysqlclient-dev, libpq-dev, lsb-release, mtx, ncurses-dev, openssl, pkg-config, po-debconf (>= 0.8.2), python-dev, zlib1g-dev
# optional (via OBS project config):
# 0%{?debian_version} >= 800 || 0%{?ubuntu_version} >= 1404
# libcephfs-dev
# librados-dev
# 0%{?debian_version} >= 800 || 0%{?ubuntu_version} >= 1504
# dh-systemd
Build-Conflicts: python2.2-dev, python2.3, python2.4, qt3-dev-tools
DEBTRANSFORM-RELEASE: 1
Files:

0 comments on commit 068291d

Please sign in to comment.