Commit 52b5d53f authored by Eric Bollengier's avatar Eric Bollengier
Browse files

rpms: Add kubernetes spec file

parent a5444435
# Bacula RPM spec file
# Copyright (C) 2000-2022 Kern Sibbald
# License: BSD 2-Clause; see file LICENSE-FOSS
%define _release @RELEASE@
%define _version @VERSION@
%define _lsm @LSMDATE@
%define _packager Davide Franco <>
%define manpage_ext gz
# Don't strip binaries
%define __os_install_post %{nil}
%define __debug_install_post %{nil}
%define debug_package %{nil}
%define base_package_name bacula
%define rhel7 0
%{?build_rhel7:%define rhel7 1}
%{?build_el7:%define rhel7 1}
# Installation Directory locations
%define _prefix /opt/bacula
%define _sbindir /opt/bacula/bin
%define _bindir /opt/bacula/bin
%define _subsysdir /opt/bacula/working
%define sqlite_bindir /opt/bacula/sqlite
%define _mandir /usr/share/man
%define sysconf_dir /opt/bacula/etc
%define script_dir /opt/bacula/scripts
%define working_dir /opt/bacula/working
%define pid_dir /opt/bacula/working
%define plugin_dir /opt/bacula/plugins
%define lib_dir /opt/bacula/lib
Summary: Bacula Kubernetes Plugin - The Network Backup Solution
Name: %{base_package_name}-kubernetes-plugin
Version: %{_version}
Release: %{_release}
Group: System Environment/Daemons
License: AGPLv3
BuildRoot: %{_tmppath}/%{name}-root
Vendor: The Bacula Team
Packager: %{_packager}
Prefix: %{_prefix}
Distribution: Bacula Kubernetes Plugin
Requires: %{base_package_name}-libs = %{_version}, bacula-fd
%if %{rhel7}
BuildRequires: python3-devel, python36-Cython, Cython
# define the basic package description
%define blurb Bacula Enterprise - The Network Backup Solution.
%define blurb2 The Kubernetes Plugin enables to backup Kubernetes cluster.
%define blurb3 This package provides the Bacula Enterprise Kubernetes Plugin.
%setup -T -D -n bacula-%{_version} -b 0
cd ../bacula-%{_version}
./configure \
--prefix=%{_prefix} \
--sbindir=%{_sbindir} \
--sysconfdir=%{sysconf_dir} \
--mandir=%{_mandir} \
--with-scriptdir=%{scripts_dir} \
--with-working-dir=%{working_dir} \
--with-plugindir=%{plugin_dir} \
--with-pid-dir=%{pid_dir} \
--with-subsys-dir=%{_subsysdir} \
--libdir=%{lib_dir} \
--enable-smartalloc \
--disable-bat \
--enable-client-only --disable-build-dir --disable-build-sd \
--with-dir-user=%{director_daemon_user} \
--with-dir-group=%{daemon_group} \
--with-sd-user=%{storage_daemon_user} \
--with-sd-group=%{storage_daemon_group} \
--with-fd-user=%{file_daemon_user} \
--with-fd-group=%{daemon_group} \
--with-basename="XXX_HOSTNAME_XXX" \
--with-hostname="XXX_HOSTNAME_XXX" \
mkdir -p $RPM_BUILD_ROOT%{plugin_dir}
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/plugins/fd install-kubernetes
make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/plugins/fd/kubernetes-backend install-kubernetes
if [ ! -f %{sysconf_dir}/bacula-backup.key -a ! -f %{sysconf_dir}/bacula-backup.cert ]; then
openssl req -new -newkey rsa:4096 -days 1000 -nodes -x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/" \
-keyout %{sysconf_dir}/bacula-backup.key -out %{sysconf_dir}/bacula-backup.cert
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
* Thu Oct 10 2019 Eric Bollengier <>
- First version
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