Skip to content

Commit

Permalink
Merge pull request #560 from bareos/dev/franku/master/droplet-s3-test
Browse files Browse the repository at this point in the history
Build droplet as submodule and use systemtest test
  • Loading branch information
franku committed Jul 21, 2020
2 parents 6a4b129 + 7b17b4a commit 799ea9c
Show file tree
Hide file tree
Showing 107 changed files with 893 additions and 232 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
@@ -0,0 +1,4 @@
[submodule "core/src/droplet"]
path = core/src/droplet
url = https://github.com/bareos/Droplet.git
branch = bareos-master
3 changes: 2 additions & 1 deletion CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

cmake_minimum_required(VERSION 3.0)

Expand Down Expand Up @@ -73,7 +74,7 @@ endif()
if(BUILD_BAREOS_BINARIES)
add_subdirectory(core)
add_subdirectory(webui)
if (NOT client-only)
if(NOT client-only)
add_subdirectory(systemtests)
endif()
endif()
Expand Down
40 changes: 3 additions & 37 deletions core/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

cmake_minimum_required(VERSION 3.0)
project(bareos C CXX)
Expand Down Expand Up @@ -664,9 +665,6 @@ if(${HAVE_GLUSTERFS_API_GLFS_H})
set(HAVE_GLUSTERFS 1)
endif()
set(have_glusterfs ${HAVE_GLUSTERFS_API_GLFS_H})
if(${HAVE_GLUSTERFS})
include_directories(/usr/include/glusterfs)
endif()

if(NOT HAVE_WIN32)
if(${ndmp})
Expand All @@ -681,36 +679,6 @@ if(${lmdb})
endif()

# info what the config files need to be installed PLUGINS ############
set(PLUGINS python-ldap-conf.d)
list(APPEND PLUGINS python-ovirt-conf.d)

if(${HAVE_CEPHFS})
list(APPEND PLUGINS cephfs-conf.d)
endif()
if(${HAVE_CEPH_RADOS})
list(APPEND PLUGINS rados-conf.d)
endif()

if(${HAVE_GLUSTERFS})
list(APPEND PLUGINS gfapi-conf.d)
endif()

# BACKENDS ####
if(build_client_only)
set(BACKENDS "")
else()
set(BACKENDS unix_tape_device.d)
list(APPEND BACKENDS unix_fifo_device.d)
if(${HAVE_CEPHFS})
list(APPEND BACKENDS rados_device.d)
endif()
if(${HAVE_GLUSTERFS})
list(APPEND BACKENDS gfapi_device.d)
endif()
if(${HAVE_DROPLET})
list(APPEND BACKENDS droplet_device.d)
endif()
endif()

set(support_systemd "")
set(batch_insert_db_backends "")
Expand Down Expand Up @@ -864,9 +832,6 @@ message(
message(
" GFAPI(GLUSTERFS) support: ${GFAPI_FOUND} ${GFAPI_LIBRARIES} ${GFAPI_INCLUDE_DIRS} "
)
message(
" DROPLET support: ${DROPLET_FOUND} ${DROPLET_LIBRARIES} ${DROPLET_INCLUDE_DIRS} "
)
message(
" CEPH RADOS support: ${RADOS_FOUND} ${RADOS_LIBRARIES} ${RADOS_INCLUDE_DIRS} "
)
Expand Down Expand Up @@ -907,8 +872,9 @@ message(
" Dynamic cats backends: ${dynamic-cats-backends} ${HAVE_DYNAMIC_CATS_BACKENDS} "
)
message(
" Dynamic storage backends: ${dynamic-storage-backends} ${HAVE_DYNAMIC_SD_BACKENDS} "
" Dynamic storage backends: ${dynamic-storage-backends} ${HAVE_DYNAMIC_SD_BACKENDS} ${BACKENDS} "
)
message(" PLUGINS: ${PLUGINS} ")
message(" Build for Test Coverage : ${coverage} ")

message(" PSCMD: ${PSCMD}")
Expand Down
1 change: 0 additions & 1 deletion core/cmake/BareosFindAllLibraries.cmake
Expand Up @@ -102,7 +102,6 @@ bareosfindlibraryandheaders("cephfs" "cephfs/libcephfs.h" "")
bareosfindlibraryandheaders("pthread" "pthread.h" "")
bareosfindlibraryandheaders("cap" "sys/capability.h" "")
bareosfindlibraryandheaders("gfapi" "glusterfs/api/glfs.h" "")
bareosfindlibraryandheaders("droplet" "droplet.h" "")

bareosfindlibraryandheaders("pam" "security/pam_appl.h" "")

Expand Down
1 change: 1 addition & 0 deletions core/manpages/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

set(MAN1 bconsole.1)

Expand Down
3 changes: 2 additions & 1 deletion core/platforms/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

if(NOT HAVE_WIN32)

Expand Down
1 change: 1 addition & 0 deletions core/platforms/darwin/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

install(
FILES resources/com.bareos.bareos-fd.plist
Expand Down
1 change: 1 addition & 0 deletions core/platforms/debian/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

set(DESTSTARTDIR "${sysconfdir}/init.d/")

Expand Down
3 changes: 2 additions & 1 deletion core/platforms/freebsd/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2018-2019 Bareos GmbH & Co. KG
# Copyright (C) 2018-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

set(DESTSTARTDIR "${sysconfdir}/rc.d/")

Expand Down
16 changes: 2 additions & 14 deletions core/platforms/packaging/bareos.spec
Expand Up @@ -40,7 +40,7 @@ Vendor: The Bareos Team
%define build_qt_monitor 1
%define build_sqlite3 1
%define glusterfs 0
%define droplet 0
%define droplet 1
%define have_git 1
%define ceph 0
%define install_suse_fw 0
Expand Down Expand Up @@ -81,11 +81,6 @@ BuildRequires: libtirpc-devel
%define systemd_support 1
%endif

# SLE 12
# SLE_15: droplet is not available due to SSL build problems
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
%define droplet 1
%endif

%if 0%{?sle_version} >= 120000
%define ceph 1
Expand Down Expand Up @@ -117,13 +112,9 @@ BuildRequires: libtirpc-devel

%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700
%define glusterfs 1
%define droplet 1
%define systemd_support 1
%endif

%if 0%{?rhel_version} == 800
%define droplet 0
%endif

%if 0%{?rhel_version} >= 700 && !0%{?centos_version}
%define ceph 1
Expand All @@ -148,10 +139,6 @@ BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif

%if 0%{?droplet}
BuildRequires: libdroplet-devel
%endif

%if 0%{?glusterfs}
BuildRequires: glusterfs-devel glusterfs-api-devel
%endif
Expand Down Expand Up @@ -1341,6 +1328,7 @@ mkdir -p %{?buildroot}/%{_libdir}/bareos/plugins/vmware_plugin
%defattr(-, root, root)
%{backend_dir}/libbareossd-chunked*.so
%{backend_dir}/libbareossd-droplet*.so
%{library_dir}/libdroplet*.so
%attr(0640, %{director_daemon_user},%{daemon_group}) %{_sysconfdir}/%{name}/bareos-dir.d/storage/S3_Object.conf.example
%attr(0640, %{storage_daemon_user},%{daemon_group}) %{_sysconfdir}/%{name}/bareos-sd.d/device/S3_ObjectStorage.conf.example
%dir %{_sysconfdir}/%{name}/bareos-sd.d/device/droplet/
Expand Down
3 changes: 2 additions & 1 deletion core/platforms/redhat/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

set(DESTSTARTDIR "${sysconfdir}/rc.d/init.d/")

Expand Down
3 changes: 2 additions & 1 deletion core/platforms/solaris/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

set(DESTSTARTDIR "${sysconfdir}/rc.d/init.d/")

Expand Down
3 changes: 2 additions & 1 deletion core/platforms/suse/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

set(FIREWALL_DIR ${sysconfdir}/sysconfig/SuSEfirewall2.d/services/)
set(DESTSTARTDIR ${sysconfdir}/init.d/)
Expand Down
3 changes: 2 additions & 1 deletion core/platforms/systemd/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

message(STATUS "CMAKE_CURRENT_LIST_FILE: " ${CMAKE_CURRENT_LIST_FILE})
message(STATUS "installing systemd files to ${SYSTEMD_UNITDIR}")
Expand Down
7 changes: 4 additions & 3 deletions core/platforms/univention/CMakeLists.txt
Expand Up @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/AppCenter/")

Expand Down Expand Up @@ -57,9 +58,9 @@ install(
)

install(
# This file contains the Bareos repository signature public.
# During the automatic build process, It will be added.
# For manual builds, download the file from
# This file contains the Bareos repository signature public. During the
# automatic build process, It will be added. For manual builds, download the
# file from
# http://download.bareos.org/bareos/release/<RELEASE>/<DISTRIBUTION>/Release.k
# ey
FILES "bareos-release.key"
Expand Down
3 changes: 2 additions & 1 deletion core/scripts/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

install(
FILES bareos btraceback
Expand Down
18 changes: 15 additions & 3 deletions core/src/CMakeLists.txt
Expand Up @@ -16,8 +16,22 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

add_subdirectory(filed)

if(NOT client-only)
# droplet does not build on solaris because of sys/cdefs.h: No such file or
# directory
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/droplet/CMakeLists.txt)
message(
FATAL_ERROR
"Please checkout the libdroplet submodule via \n \"git submodule update --init --recursive\""
)
endif()
add_subdirectory(droplet)
endif()
add_subdirectory(tools)
add_subdirectory(cats)
if(NOT HAVE_WIN32 AND ndmp)
Expand All @@ -26,8 +40,8 @@ if(NOT client-only)
if(VIXDISKLIB_FOUND)
add_subdirectory(vmware)
endif()
add_subdirectory(dird)
add_subdirectory(stored)
add_subdirectory(dird)
endif()

if(RUN_SYSTEMTESTS_ON_INSTALLED_FILES)
Expand All @@ -46,10 +60,8 @@ if(${HAVE_LMDB})
endif()
add_subdirectory(lib)
add_subdirectory(findlib)
add_subdirectory(filed)
add_subdirectory(plugins)
add_subdirectory(fastlz)

if(${traymonitor})
add_subdirectory(qt-tray-monitor)
endif()
11 changes: 6 additions & 5 deletions core/src/cats/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2019 Bareos GmbH & Co. KG
# Copyright (C) 2017-2020 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -16,6 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
message("Entering ${CMAKE_CURRENT_SOURCE_DIR}")

include_directories(${MYSQL_INCLUDE_DIR} ${PostgreSQL_INCLUDE_DIR})

Expand Down Expand Up @@ -45,8 +46,8 @@ set(POSTGRESQL_SRCS postgresql.cc postgresql_batch.cc ${LIBBAREOSCATS_SRCS})
add_library(bareossql SHARED ${LIBBAREOSSQL_SRCS})

set_target_properties(
bareossql PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}" SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareossql PROPERTIES VERSION "${BAREOS_NUMERIC_VERSION}"
SOVERSION "${BAREOS_VERSION_MAJOR}"
)
target_link_libraries(bareossql bareoscats bareos)

Expand All @@ -60,8 +61,8 @@ list(LENGTH db_backends nr_db_backends)
add_library(bareoscats SHARED ${LIBBAREOSCATS_SRCS})
target_link_libraries(bareoscats bareos)
set_target_properties(
bareoscats PROPERTIES VERSION ${BAREOS_NUMERIC_VERSION} SOVERSION
"${BAREOS_VERSION_MAJOR}"
bareoscats PROPERTIES VERSION ${BAREOS_NUMERIC_VERSION}
SOVERSION "${BAREOS_VERSION_MAJOR}"
)
install(TARGETS bareoscats DESTINATION ${libdir})

Expand Down

0 comments on commit 799ea9c

Please sign in to comment.