Skip to content

Commit

Permalink
vmware plugin: rename python-fd-vmware-plugin-test -> pyplug-fd-vmware
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jun 30, 2020
1 parent 6dafbaf commit 07f2a14
Show file tree
Hide file tree
Showing 34 changed files with 36 additions and 32 deletions.
55 changes: 31 additions & 24 deletions core/platforms/packaging/bareos.spec
Expand Up @@ -294,6 +294,21 @@ BuildRequires: lsb-release
%endif


# dependency tricks for vixdisklib
# Note: __requires_exclude only works for dists with rpm version >= 4.9
# SLES12 has suse_version 1315, SLES11 has 1110
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora_version} >= 16 || 0%{?suse_version} >= 1110
%global __requires_exclude ^.*libvixDiskLib.*$
%else
%define _use_internal_dependency_generator 0
%define our_find_requires %{_builddir}/%{name}-%{version}/find_requires
%endif






Summary: Backup Archiving REcovery Open Sourced - metapackage
Requires: %{name}-director = %{version}
Requires: %{name}-storage = %{version}
Expand Down Expand Up @@ -607,33 +622,10 @@ Requires: bareos-vmware-plugin
%description -n bareos-vmware-plugin-compat
Keeps bareos/plugins/vmware_plugin subdirectory, which have been used in Bareos <= 16.2.

# Note: __requires_exclude only works for dists with rpm version >= 4.9
# SLES12 has suse_version 1315, SLES11 has 1110
%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora_version} >= 16 || 0%{?suse_version} >= 1110
%global __requires_exclude ^.*libvixDiskLib.*$
%else
%define _use_internal_dependency_generator 0
%define our_find_requires %{_builddir}/%{name}-%{version}/find_requires
%endif

# exclude libvixDiskLib from autogenerated requires on older dists:
%if ! ( 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora_version} >= 16 || 0%{?suse_version} >= 1210 )
cat <<EOF >%{our_find_requires}
#!/bin/sh
exec %{__find_requires} | /bin/egrep -v '^.*libvixDiskLib.*$'
exit 0
EOF
chmod +x %{our_find_requires}
%define __find_requires %{our_find_requires}
%endif

# VMware Plugin END
%endif





%description director-python-plugin
%{dscr}

Expand Down Expand Up @@ -1002,6 +994,11 @@ for F in \
%{_sysconfdir}/init.d/bareos-dir \
%{_sysconfdir}/init.d/bareos-sd \
%{_sysconfdir}/init.d/bareos-fd \
%endif
%if !0%{?vmware}
%{_sbindir}/bareos_vadp_dumper \
%{_sbindir}/bareos_vadp_dumper_wrapper.sh \
%{_sbindir}/vmware_cbt_tool.py \
%endif
%{script_dir}/bareos_config \
%{script_dir}/btraceback.dbx \
Expand Down Expand Up @@ -1043,6 +1040,15 @@ rm -f %{buildroot}/%{script_dir}/bareos-glusterfind-wrapper
rm %{buildroot}%{_mandir}/man1/bareos-tray-monitor.*
%endif

# remove vmware plugin files when vmware is not built
%if !0%{?vmware}
rm -f %{buildroot}%{plugin_dir}/BareosFdPluginVMware.py*
rm -f %{buildroot}%{plugin_dir}/bareos-fd-vmware.py*
%endif




# install systemd service files
%if 0%{?systemd_support}
install -d -m 755 %{buildroot}%{_unitdir}
Expand Down Expand Up @@ -1088,8 +1094,9 @@ mkdir -p %{?buildroot}/%{_libdir}/bareos/plugins/vmware_plugin
%files -n bareos-vmware-plugin
%defattr(-,root,root)
%dir %{_libdir}/bareos/
%{_libdir}/bareos/plugins/
%{_sbindir}/vmware_cbt_tool.py
%{plugin_dir}/BareosFdPluginVMware.py*
%{plugin_dir}/bareos-fd-vmware.py*
%doc src/vmware/LICENSE src/vmware/README.md

%files -n bareos-vmware-plugin-compat
Expand Down
11 changes: 4 additions & 7 deletions systemtests/CMakeLists.txt
Expand Up @@ -189,7 +189,7 @@ macro(handle_python_plugin_modules test_name)
)

endif()
if(${test_name} STREQUAL python-fd-vmware-plugin-test)
if(${test_name} STREQUAL pyplug-fd-vmware)
list(APPEND FD_PYMODULES_TO_LINK_TO_SRC bareos-fd-vmware.py
BareosFdPluginVMware.py
)
Expand Down Expand Up @@ -398,7 +398,6 @@ set(ALL_BINARIES_BEING_USED_BY_SYSTEMTESTS
bareos-fd
bareos-sd
bareos-dbcopy
bareos_vadp_dumper
bcopy
btape
bextract
Expand Down Expand Up @@ -743,12 +742,10 @@ else()
endif()

if(TARGET python-fd AND enable_vmware_test)
list(APPEND SYSTEM_TESTS "python-fd-vmware-plugin-test")
list(APPEND SYSTEM_TESTS "pyplug-fd-vmware")
else()
message(
STATUS "disabling python-fd-vmware-plugin-test as vmware_server was not set"
)
list(APPEND SYSTEM_TESTS_DISABLED "python-fd-vmware-plugin-test")
message(STATUS "disabling pyplug-fd-vmware as vmware_server was not set")
list(APPEND SYSTEM_TESTS_DISABLED "pyplug-fd-vmware")
endif()

if(TARGET python-fd AND XTRABACKUP)
Expand Down
Expand Up @@ -20,7 +20,7 @@ JobName=backup-bareos-fd
"${rscripts}"/setup


ln -sf ../sbin/bareos_vadp_dumper-python-fd-vmware-plugin-test bin/bareos_vadp_dumper_wrapper.sh
ln -sf ../sbin/bareos_vadp_dumper-$TestName bin/bareos_vadp_dumper_wrapper.sh
export PATH=${current_test_directory}/bin:$PATH
./reset_cbt.sh

Expand Down

0 comments on commit 07f2a14

Please sign in to comment.