Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
adding bareos-vmware-plugin-compat package
Browse files Browse the repository at this point in the history
This is useful, when upgrading from Bareos <= 16.2.
  • Loading branch information
joergsteffens committed Dec 9, 2017
1 parent 4b93b57 commit 691f58b
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 22 deletions.
26 changes: 13 additions & 13 deletions CMakeLists.txt
@@ -1,6 +1,5 @@


# BAREOS�� - Backup Archiving REcovery Open Sourced
#
# BAREOS - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2017-2017 Bareos GmbH & Co. KG
#
Expand Down Expand Up @@ -30,17 +29,18 @@ add_subdirectory(vmware_plugin)
#add_subdirectory(vmware-vix-disklib)


#
# commented, as it has not been used for inherited directories.
#
# set INSTALL_LIB_DIR automatically to lib or lib64 automatically
# Taken from https://cmake.org/pipermail/cmake/2013-July/055374.html

get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
if ("${LIB64}" STREQUAL "TRUE")
set(LIBSUFFIX 64)
else()
set(LIBSUFFIX "")
endif()
set(INSTALL_LIB_DIR "usr/lib${LIBSUFFIX}" CACHE PATH "Installation directory for libraries")
mark_as_advanced(INSTALL_LIB_DIR)


#get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
#if ("${LIB64}" STREQUAL "TRUE")
# set(LIBSUFFIX 64)
#else()
# set(LIBSUFFIX "")
#endif()
#set(INSTALL_LIB_DIR "lib${LIBSUFFIX}" CACHE PATH "Installation directory for libraries")
#mark_as_advanced(INSTALL_LIB_DIR)

1 change: 1 addition & 0 deletions debian/bareos-vmware-plugin-compat.install
@@ -0,0 +1 @@
/usr/lib/bareos/plugins/vmware_plugin/bareos-fd-vmware.py
5 changes: 3 additions & 2 deletions debian/bareos-vmware-plugin.install
@@ -1,2 +1,3 @@
vmware_plugin/*.py /usr/lib/bareos/plugins/vmware_plugin
vmware_cbt_tool/vmware_cbt_tool.py /usr/sbin
/usr/lib/bareos/plugins/BareosFdPluginVMware.py
/usr/lib/bareos/plugins/bareos-fd-vmware.py
/usr/sbin/vmware_cbt_tool.py
8 changes: 7 additions & 1 deletion debian/control
Expand Up @@ -31,11 +31,17 @@ Description: vStorage APIs for Data Protection Dumper program
#Architecture: any
#Section: libs
#Depends: ${shlibs:Depends}, ${misc:Depends}
#Description: VMware vix disklib distributable libraries
#Description: VMware vix disklib distributable libraries
# The Virtual Disk Development Kit (VDDK) is a collection of C/C++ libraries,
# code samples, utilities, and documentation to help you create and access
# VMware virtual disk storage. The VDDK is useful in conjunction with the
# vSphere API for writing backup and recovery software, or similar applications.
# This package only contains the distributable code to comply with
# https://communities.vmware.com/viewwebdoc.jspa?documentID=DOC-10141

Package: bareos-vmware-plugin-compat
Architecture: any
Depends: bareos-vmware-plugin
Description: Bareos VMware plugin compatibility
Keeps bareos/plugins/vmware_plugin subdirectory, which have been used in Bareos <= 16.2.

6 changes: 5 additions & 1 deletion debian/rules
Expand Up @@ -7,7 +7,11 @@
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_VERBOSE=1

override_dh_auto_configure:
#dh_auto_configure -- -DCMAKE_INSTALL_PREFIX:PATH=/usr
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr

override_dh_shlibdeps:
#dh_shlibdeps --exclude=vmware-vix-disklib -l/usr/lib/vmware-vix-disklib/lib64/
Expand Down
13 changes: 11 additions & 2 deletions packaging/bareos-vmware.spec
Expand Up @@ -63,6 +63,13 @@ is currently supported to the origin VM.
#This package only contains the distributable code to comply with
#https://communities.vmware.com/viewwebdoc.jspa?documentID=DOC-10141

%package -n bareos-vmware-plugin-compat
Summary: Bareos VMware plugin compatibility
Group: Productivity/Archiving/Backup
Requires: bareos-vmware-plugin
%description -n bareos-vmware-plugin-compat
Keeps bareos/plugins/vmware_plugin subdirectory, which have been used in Bareos <= 16.2.



#PreReq:
Expand Down Expand Up @@ -93,7 +100,7 @@ chmod +x %{our_find_requires}
%setup -q -n %{sourcename}

%build
cmake -DCMAKE_INSTALL_PREFIX=/
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr
make

%install
Expand All @@ -115,7 +122,9 @@ make
#%%files -n bareos-vmware-vix-disklib
#/usr/lib/vmware-vix-disklib/lib64


%files -n bareos-vmware-plugin-compat
%defattr(-,root,root)
%{_libdir}/bareos/plugins/vmware_plugin/

%changelog

2 changes: 1 addition & 1 deletion vmware_plugin/BareosFdPluginVMware.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2014-2014 Bareos GmbH & Co. KG
# Copyright (C) 2014-2017 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 Down
24 changes: 23 additions & 1 deletion vmware_plugin/CMakeLists.txt
@@ -1,9 +1,31 @@
get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
if ("${LIB64}" STREQUAL "TRUE")
set(LIBSUFFIX 64)
else()
set(LIBSUFFIX "")
endif()
set(INSTALL_LIB_DIR "lib${LIBSUFFIX}" CACHE PATH "Installation directory for libraries")
mark_as_advanced(INSTALL_LIB_DIR)

INSTALL(FILES
BareosFdPluginVMware.py
bareos-fd-vmware.py
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
DESTINATION "${CMAKE_INSTALL_LIBDIR}/bareos/plugins"
DESTINATION "${INSTALL_LIB_DIR}/bareos/plugins"
)
INSTALL(DIRECTORY
DESTINATION "${INSTALL_LIB_DIR}/bareos/plugins/vmware_plugin/"
)
INSTALL(
# as this command is not handled by "INSTALL DESTINATION",
# the target path must be evaluated manually.
CODE "
execute_process(COMMAND ln -sf \
../bareos-fd-vmware.py \
\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}/bareos/plugins/vmware_plugin/bareos-fd-vmware.py
)
"
)

2 changes: 1 addition & 1 deletion vmware_plugin/bareos-fd-vmware.py
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2014-2014 Bareos GmbH & Co. KG
# Copyright (C) 2014-2017 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 Down

0 comments on commit 691f58b

Please sign in to comment.