Skip to content

Commit

Permalink
added changes to build glusterfs plugins on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
André Bauer committed Oct 2, 2015
1 parent 600dc53 commit 845c75b
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 4 deletions.
16 changes: 16 additions & 0 deletions autoconf/configure.in
Expand Up @@ -3709,6 +3709,12 @@ LIBS="${saved_LIBS} ${GLUSTER_LIBS}"
CFLAGS="${saved_CFLAGS} ${GLUSTER_INC}"
CPPFLAGS="${saved_CPPFLAGS} ${GLUSTER_INC}"







AC_CHECK_HEADER(api/glfs.h)

AC_MSG_CHECKING(for glfs_init in gfapi library)
Expand All @@ -3732,15 +3738,22 @@ LIBS="${saved_LIBS}"
CFLAGS="${saved_CFLAGS}"
CPPFLAGS="${saved_CPPFLAGS}"

DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN=/dev/null
DEBIAN_CONTROL_STORAGE_GLUSTERFS=/dev/null

if test "x${have_glusterfs}" = "xyes"; then
AC_DEFINE(HAVE_GFAPI, 1, [Define to 1 if you have gfapi lib])
DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN=./debian/control.bareos-filedaemon-glusterfs-plugin
DEBIAN_CONTROL_STORAGE_GLUSTERFS=./debian/control.bareos-storage-glusterfs
else
GLUSTER_LIBS=""
GLUSTER_INC=""
fi

AC_SUBST(GLUSTER_INC)
AC_SUBST(GLUSTER_LIBS)
AC_SUBST_FILE(DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN)
AC_SUBST_FILE(DEBIAN_CONTROL_STORAGE_GLUSTERFS)

dnl
dnl Check for Object storage via libdroplet.
Expand Down Expand Up @@ -4203,6 +4216,7 @@ debian|ubuntu|univention)
debian/bareos-director.postinst \
debian/bareos-director.preinst \
debian/bareos-filedaemon-ceph-plugin.install \
debian/bareos-filedaemon-gluster-plugin.install \
debian/bareos-filedaemon-ldap-python-plugin.install \
debian/bareos-filedaemon-python-plugin.install \
debian/bareos-filedaemon.bareos-fd.init \
Expand All @@ -4211,6 +4225,8 @@ debian|ubuntu|univention)
debian/bareos-filedaemon.preinst \
debian/bareos-storage-ceph.install \
debian/bareos-storage-ceph.postinst \
debian/bareos-storage-glusterfs.install \
debian/bareos-storage-glusterfs.postinst \
debian/bareos-storage-fifo.postinst \
debian/bareos-storage-fifo.install \
debian/bareos-storage-python-plugin.install \
Expand Down
11 changes: 9 additions & 2 deletions configure
Expand Up @@ -985,6 +985,8 @@ ac_subst_files='DEBIAN_CONTROL_BAT
DEBIAN_CONTROL_TRAYMONITOR
DEBIAN_CONTROL_FILEDAEMON_CEPH_PLUGIN
DEBIAN_CONTROL_STORAGE_CEPH
DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN
DEBIAN_CONTROL_STORAGE_GLUSTERFS
DEBIAN_CONTROL_UNIVENTION_BAREOS
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA
MCOMMON
Expand Down Expand Up @@ -31702,7 +31704,6 @@ have_glusterfs=no
# Check whether --with-glusterfs was given.
if test "${with_glusterfs+set}" = set; then :
withval=$with_glusterfs; with_glusterfs_directory=$withval

fi


Expand Down Expand Up @@ -31782,10 +31783,13 @@ LIBS="${saved_LIBS}"
CFLAGS="${saved_CFLAGS}"
CPPFLAGS="${saved_CPPFLAGS}"

DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN=/dev/null
DEBIAN_CONTROL_STORAGE_GLUSTERFS=/dev/null
if test "x${have_glusterfs}" = "xyes"; then

$as_echo "#define HAVE_GFAPI 1" >>confdefs.h

DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN=./debian/control.bareos-filedaemon-glusterfs-plugin
DEBIAN_CONTROL_STORAGE_GLUSTERFS=./debian/control.bareos-storage-glusterfs
else
GLUSTER_LIBS=""
GLUSTER_INC=""
Expand Down Expand Up @@ -32678,6 +32682,7 @@ debian|ubuntu|univention)
debian/bareos-director.postinst \
debian/bareos-director.preinst \
debian/bareos-filedaemon-ceph-plugin.install \
debian/bareos-filedaemon-glusterfs-plugin.install \
debian/bareos-filedaemon-ldap-python-plugin.install \
debian/bareos-filedaemon-python-plugin.install \
debian/bareos-filedaemon.bareos-fd.init \
Expand All @@ -32686,6 +32691,8 @@ debian|ubuntu|univention)
debian/bareos-filedaemon.preinst \
debian/bareos-storage-ceph.install \
debian/bareos-storage-ceph.postinst \
debian/bareos-storage-glusterfs.install \
debian/bareos-storage-glusterfs.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-glusterfs-plugin.install.in
@@ -0,0 +1,2 @@
@plugindir@/gfapi-fd.so
/etc/bareos/bareos-dir.d/plugin-gfapi.conf
2 changes: 2 additions & 0 deletions debian/bareos-storage-glusterfs.install.in
@@ -0,0 +1,2 @@
@backenddir@/libbareossd-gfapi*.so
@confdir@/bareos-sd.d/device-gluster.conf
45 changes: 45 additions & 0 deletions debian/bareos-storage-glusterfs.postinst.in
@@ -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-gluster.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
3 changes: 2 additions & 1 deletion debian/control
Expand Up @@ -34,7 +34,8 @@ Build-Depends: acl-dev,
pkg-config,
po-debconf (>= 0.8.2),
python-dev,
zlib1g-dev
zlib1g-dev,
glusterfs-common
# libfastlz-dev:
# installed in OBS via dsc file,
# not part of Debian/Ubuntu.
Expand Down
9 changes: 9 additions & 0 deletions debian/control.bareos-filedaemon-glusterfs-plugin
@@ -0,0 +1,9 @@
Package: bareos-filedaemon-glusterfs-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 glusterfs plugin for the file daemon.
9 changes: 9 additions & 0 deletions debian/control.bareos-storage-glusterfs
@@ -0,0 +1,9 @@
Package: bareos-storage-glusterfs
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 glusterfs backend for the storage daemon.
7 changes: 6 additions & 1 deletion debian/control.in
Expand Up @@ -34,7 +34,8 @@ Build-Depends: acl-dev,
pkg-config,
po-debconf (>= 0.8.2),
python-dev,
zlib1g-dev
zlib1g-dev,
glusterfs-common
# dh-systemd:
# not available on all platforms
# libfastlz-dev:
Expand Down Expand Up @@ -300,10 +301,14 @@ Description: Backup Archiving Recovery Open Sourced - common tools

@DEBIAN_CONTROL_FILEDAEMON_CEPH_PLUGIN@

@DEBIAN_CONTROL_FILEDAEMON_GLUSTERFS_PLUGIN@

@DEBIAN_CONTROL_FILEDAEMON_PYTHON_PLUGIN@

@DEBIAN_CONTROL_STORAGE_CEPH@

@DEBIAN_CONTROL_STORAGE_GLUSTERFS@

@DEBIAN_CONTROL_STORAGE_PYTHON_PLUGIN@

@DEBIAN_CONTROL_TRAYMONITOR@
Expand Down
1 change: 1 addition & 0 deletions debian/rules
Expand Up @@ -57,6 +57,7 @@ define CONFIGURE_COMMON
--with-sqlite3 \
--with-tcp-wrappers \
--with-openssl \
--with-glusterfs \
--with-dir-user=$(DIRECTOR_DAEMON_USER) \
--with-dir-group=$(DAEMON_GROUP) \
--with-sd-user=$(STORAGE_DAEMON_USER) \
Expand Down

0 comments on commit 845c75b

Please sign in to comment.