Commit 06c4a94f authored by Eric Bollengier's avatar Eric Bollengier
Browse files

rpms: more work on docker and docker tools

parent 88422292
# Bacula RPM spec file
#
# Copyright (C) 2000-2022 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
#
# Platform Build Configuration
# basic defines for every build
%define _release @RELEASE@
%define _version @VERSION@
%define docker_tar_version @DOCKER_TAR_VERSION@
%define product bacula-docker-tools
%define _packager Davide Franco <davide.franco@baculasystems.com>
%define depkgs_version @DEPKGS_VERSION@
%define _lsm @LSMDATE@
# Installation Directory locations
%define lib_dir /opt/bacula/lib
%define base_package_name bacula
Name: %{base_package_name}-docker-tools
Version: %{_version}
Release: %{_release}
Group: System Environment/Daemons
License: AGPLv3
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
Packager: %{_packager}
Prefix: %{_prefix}
Distribution: Bacula Docker
Summary: Bacula Docker - The Network Backup Solution
Source0: baculatar-docker-%{docker_tar_version}.tar.gz
%description
Bacula - The Network Backup Solution.
Bacula Docker Tools allows you to backup and restore Docker containers volumes
%prep
%install
mkdir -p ${RPM_BUILD_ROOT}%{lib_dir}
cp %{_sourcedir}/baculatar-docker-%{docker_tar_version}.tar.gz ${RPM_BUILD_ROOT}%{lib_dir}
%files
%attr(0644, root, root) %{lib_dir}/baculatar-docker-%{docker_tar_version}.tar.gz
%post
if which docker > /dev/null 2> /dev/null
then
echo "Importing Docker image"
docker load -i %{lib_dir}/bacula-backup-%{k8s_version}.tar.gz
if [ ! $? -eq 0 ] ; then
echo "Unable to install %{lib_dir}/baculatar-docker-%{docker_tar_version}.tar.gz Docker image automatically."
echo "It is required to install the docker image to backup Docker external volumes."
fi
else
echo "Unable to install %{lib_dir}/baculatar-docker-%{docker_tar_version}.tar.gz Docker image automatically."
echo "It is required to install the docker image to backup Docker external volumes."
fi
%postun
%changelog
* Tue Aug 27 2019 Davide Franco <davide.franco@baculasystems.com>
- First version
......@@ -95,14 +95,15 @@ cwd=${PWD}
--with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
--with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
--with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
--with-openssl --disable-build-dir --disable-build-sd
--with-openssl --disable-build-dird --disable-build-stored
make
%install
mkdir -pv $RPM_BUILD_ROOT%{plugin_dir}
make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/plugins/fd/docker all
make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/plugins/fd/ install-docker
d=`mktemp -d`
make DESTDIR=$d -C ../bacula-enterprise-%{_version}/src/plugins/fd install-docker
mv $d/opt $RPM_BUILD_ROOT/
rm -rf $d
%files
%defattr(-,root,root)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment