bacula/bacula.spec

724 lines
26 KiB
RPMSpec
Raw Normal View History

%global uid 133
2011-12-20 08:23:13 +00:00
%global username bacula
2011-12-19 15:20:41 +00:00
2013-05-16 09:00:05 +00:00
Name: bacula
2021-02-11 13:03:38 +00:00
Version: 11.0.1
Release: 2%{?dist}
2013-05-16 09:00:05 +00:00
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details
2013-05-16 09:00:05 +00:00
License: AGPLv3 with exceptions
URL: http://www.bacula.org
2014-03-30 10:28:51 +00:00
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
2013-05-16 09:00:05 +00:00
Source2: quickstart_postgresql.txt
Source3: quickstart_mysql.txt
Source4: quickstart_sqlite3.txt
Source5: README.Redhat
Source6: %{name}.logrotate
Source10: %{name}-fd.service
Source11: %{name}-dir.service
Source12: %{name}-sd.service
Source15: %{name}-fd.sysconfig
Source16: %{name}-dir.sysconfig
Source17: %{name}-sd.sysconfig
2020-03-05 10:45:51 +00:00
Source19: https://salsa.debian.org/bacula-team/bacula/-/raw/master/debian/additions/bacula-tray-monitor.png#/bacula-tray-monitor.png
2013-05-16 09:00:05 +00:00
2019-05-18 05:57:31 +00:00
Patch1: %{name}-openssl.patch
Patch2: %{name}-queryfile.patch
Patch3: %{name}-sqlite-priv.patch
Patch4: %{name}-bat-build.patch
Patch5: %{name}-seg-fault.patch
Patch6: %{name}-logwatch.patch
Patch7: %{name}-non-free-code.patch
Patch8: %{name}-desktop.patch
Patch9: %{name}-g++-options.patch
2021-01-12 11:38:25 +00:00
Patch10: %{name}-install.patch
Patch11: %{name}-docker-plugin.patch
2018-06-13 19:12:16 +00:00
# Original patch removed by mistake, upstream is not willing to add it again:
# http://www.bacula.org/git/cgit.cgi/bacula/commit/?h=Branch-7.0&id=51b3b98fb77ab3c0decee455cc6c4d2eb3c5303a
# Without this, there is no library providing the correct shared object name
# required by the daemons.
# http://bugs.bacula.org/view.php?id=2084
2021-01-15 14:05:13 +00:00
Patch12: %{name}-autoconf.patch
Patch13: %{name}-build-cdp-plugin.patch
Patch14: %{name}-nagios.patch
2018-06-13 19:12:16 +00:00
2013-05-16 09:00:05 +00:00
BuildRequires: desktop-file-utils
BuildRequires: perl-generators
2013-05-16 09:00:05 +00:00
BuildRequires: sed
2019-01-13 11:40:35 +00:00
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: gcc-c++
2013-05-16 09:00:05 +00:00
BuildRequires: glibc-devel
BuildRequires: libacl-devel
BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel
BuildRequires: libcap-devel
BuildRequires: lzo-devel
BuildRequires: make
2013-05-16 09:00:05 +00:00
BuildRequires: ncurses-devel
2017-12-07 14:47:44 +00:00
BuildRequires: openssl-devel
BuildRequires: qt5-qtbase-devel
2013-05-16 09:00:05 +00:00
BuildRequires: readline-devel
BuildRequires: sqlite-devel
BuildRequires: systemd
BuildRequires: zlib-devel
2007-07-24 20:11:04 +00:00
2019-01-12 14:14:20 +00:00
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: mariadb-connector-c-devel
2019-01-13 14:32:43 +00:00
# https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules
BuildRequires: perl-interpreter
%else
BuildRequires: mysql-devel
2019-01-13 14:32:43 +00:00
BuildRequires: perl
BuildRequires: tcp_wrappers-devel
%endif
%if 0%{?fedora}
2019-01-12 14:14:20 +00:00
BuildRequires: libpq-devel
%else
BuildRequires: postgresql-devel
%endif
2007-07-24 20:11:04 +00:00
%description
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture and is efficient and relatively easy to
use, while offering many advanced storage management features that make it easy
to find and recover lost or damaged files.
2007-07-24 20:11:04 +00:00
%package libs
2013-05-16 09:00:05 +00:00
Summary: Bacula libraries
%description libs
Bacula is a set of programs that allow you to manage the backup,
recovery, and verification of computer data across a network of
different computers. It is based on a client/server architecture.
This package contains basic Bacula libraries, which are used by all
Bacula programs.
%package libs-sql
2013-05-16 09:00:05 +00:00
Summary: Bacula SQL libraries
Obsoletes: bacula-libs-mysql <= 5.0.3
Obsoletes: bacula-libs-sqlite <= 5.0.3
Obsoletes: bacula-libs-postgresql <= 5.0.3
Provides: bacula-libs-mysql = %{version}-%{release}
Provides: bacula-libs-sqlite = %{version}-%{release}
Provides: bacula-libs-postgresql = %{version}-%{release}
%description libs-sql
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2012-07-19 12:08:29 +00:00
This package contains the SQL Bacula libraries, which are used by Director and
Storage daemons. You have to select your preferred catalog library through the
alternatives system.
%package common
2013-05-16 09:00:05 +00:00
Summary: Common Bacula files
Provides: group(%username) = %uid
Provides: user(%username) = %uid
Requires: bacula-libs%{?_isa} = %{version}-%{release}
2013-05-16 09:00:05 +00:00
Requires(pre): shadow-utils
Requires(postun): shadow-utils
%description common
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2011-12-07 10:18:22 +00:00
This package contains files common to all Bacula daemons.
2012-01-03 15:05:22 +00:00
%package director
2013-05-16 09:00:05 +00:00
Summary: Bacula Director files
Requires: bacula-common%{?_isa} = %{version}-%{release}
Requires: bacula-libs%{?_isa} = %{version}-%{release}
Requires: bacula-libs-sql%{?_isa} = %{version}-%{release}
2012-01-03 15:05:22 +00:00
# Director backends merged into core.
2013-05-16 09:00:05 +00:00
Provides: bacula-director-common = %{version}-%{release}
Obsoletes: bacula-director-common < 5.2.3-5
Provides: bacula-director-mysql = %{version}-%{release}
Obsoletes: bacula-director-mysql < 5.2.3-5
Provides: bacula-director-sqlite = %{version}-%{release}
Obsoletes: bacula-director-sqlite < 5.2.3-5
Provides: bacula-director-postgresql = %{version}-%{release}
Obsoletes: bacula-director-postgresql < 5.2.3-5
2013-05-16 09:00:05 +00:00
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2012-01-03 15:05:22 +00:00
%description director
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2012-01-03 15:05:22 +00:00
This package contains the director files.
2007-07-24 20:11:04 +00:00
2015-05-15 08:27:39 +00:00
%package logwatch
Summary: Bacula Director logwatch scripts
BuildArch: noarch
Requires: bacula-director = %{version}-%{release}
2015-05-15 08:27:39 +00:00
Requires: logwatch
%description logwatch
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
This package contains logwatch scripts for Bacula Director.
%package storage
2013-05-16 09:00:05 +00:00
Summary: Bacula storage daemon files
Requires: bacula-common%{?_isa} = %{version}-%{release}
Requires: bacula-libs%{?_isa} = %{version}-%{release}
Requires: bacula-libs-sql%{?_isa} = %{version}-%{release}
2013-05-16 09:00:05 +00:00
Requires: mt-st
Requires: mtx
# Storage backends merged into core.
2013-05-16 09:00:05 +00:00
Provides: bacula-storage-common = %{version}-%{release}
Obsoletes: bacula-storage-common < 5.2.2-2
Provides: bacula-storage-mysql = %{version}-%{release}
Obsoletes: bacula-storage-mysql < 5.2.0
Provides: bacula-storage-sqlite = %{version}-%{release}
Obsoletes: bacula-storage-sqlite < 5.2.0
Provides: bacula-storage-postgresql = %{version}-%{release}
Obsoletes: bacula-storage-postgresql < 5.2.0
2012-10-17 07:22:29 +00:00
2013-05-16 09:00:05 +00:00
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2011-11-30 14:55:59 +00:00
%description storage
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2007-07-24 20:11:04 +00:00
2012-07-19 12:08:29 +00:00
This package contains the storage daemon, the daemon responsible for writing
the data received from the clients onto tape drives or other mass storage
devices.
2007-07-24 20:11:04 +00:00
%package client
2013-05-16 09:00:05 +00:00
Summary: Bacula backup client
Requires: bacula-common%{?_isa} = %{version}-%{release}
Requires: bacula-libs%{?_isa} = %{version}-%{release}
2012-10-17 07:22:29 +00:00
2013-05-16 09:00:05 +00:00
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2007-07-24 20:11:04 +00:00
%description client
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2007-07-24 20:11:04 +00:00
2012-07-19 12:08:29 +00:00
This package contains the bacula client, the daemon running on the system to be
backed up.
2007-07-24 20:11:04 +00:00
%package console
2013-05-16 09:00:05 +00:00
Summary: Bacula management console
Obsoletes: bacula-console-wxwidgets <= 5.0.3
Requires: bacula-libs%{?_isa} = %{version}-%{release}
2007-07-24 20:11:04 +00:00
%description console
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2007-07-24 20:11:04 +00:00
2012-07-19 12:08:29 +00:00
This package contains the command-line management console for the bacula backup
system.
2007-07-24 20:11:04 +00:00
2008-11-17 18:07:33 +00:00
%package console-bat
2013-05-16 09:00:05 +00:00
Summary: Bacula bat console
Requires: bacula-libs%{?_isa} = %{version}-%{release}
Requires: dejavu-lgc-sans-fonts
2008-11-17 18:07:33 +00:00
%description console-bat
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2008-11-17 18:07:33 +00:00
This package contains the bat version of the bacula management console.
2011-12-12 16:18:26 +00:00
2014-03-30 15:01:00 +00:00
%package traymonitor
Summary: Bacula system tray monitor
Requires: bacula-libs%{?_isa} = %{version}-%{release}
Requires: dejavu-lgc-sans-fonts
2011-12-12 16:18:26 +00:00
2014-03-30 15:01:00 +00:00
%description traymonitor
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
2011-12-12 16:18:26 +00:00
2014-03-30 15:01:00 +00:00
This package contains the Gnome and KDE compatible tray monitor to monitor your
bacula server.
2007-07-24 20:11:04 +00:00
%package devel
2013-05-16 09:00:05 +00:00
Summary: Bacula development files
Requires: bacula-libs%{?_isa} = %{version}-%{release}
Requires: bacula-libs-sql%{?_isa} = %{version}-%{release}
%description devel
2012-07-19 12:08:29 +00:00
Bacula is a set of programs that allow you to manage the backup, recovery, and
verification of computer data across a network of different computers. It is
based on a client/server architecture.
This development package contains static libraries and header files.
2014-03-30 15:01:00 +00:00
%package -n nagios-plugins-bacula
Summary: Nagios Plugin - check_bacula
Requires: bacula-libs%{?_isa} = %{version}-%{release}
2014-04-01 15:18:41 +00:00
Requires: nagios-common%{?_isa}
2014-03-30 15:01:00 +00:00
%description -n nagios-plugins-bacula
Provides check_bacula support for Nagios.
2011-11-30 14:55:59 +00:00
%prep
2018-06-13 19:12:16 +00:00
%autosetup -p1
2017-07-11 07:16:04 +00:00
2013-02-21 16:34:40 +00:00
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
2007-07-24 20:11:04 +00:00
2019-01-13 11:40:35 +00:00
# Regenerate configure
pushd autoconf
sed -i -r 's/(hardcode_into_libs)=.*$/\1=no/' libtool/libtool.m4
aclocal -I bacula-macros/ -I gettext-macros/ -I libtool/
popd
autoconf -I autoconf/ -o configure autoconf/configure.in
2007-07-24 20:11:04 +00:00
# Remove execution permissions from files we're packaging as docs later on
find updatedb -type f | xargs chmod -x
%build
2019-04-18 10:38:09 +00:00
export CFLAGS="%{optflags} -I%{_includedir}/ncurses"
export CPPFLAGS="%{optflags} -I%{_includedir}/ncurses"
2018-02-06 14:04:22 +00:00
export PATH="$PATH:%{_qt5_bindir}"
2019-01-13 11:40:35 +00:00
2007-07-24 20:11:04 +00:00
%configure \
2018-06-13 19:12:16 +00:00
--disable-conio \
--disable-rpath \
2019-01-13 11:40:35 +00:00
--disable-s3 \
2018-06-13 19:12:16 +00:00
--docdir=%{_datadir}/bacula \
--enable-bat \
--enable-batch-insert \
--enable-build-dird \
--enable-build-stored \
--enable-includes \
--enable-largefile \
--enable-readline \
--enable-smartalloc \
--sysconfdir=%{_sysconfdir}/bacula \
--with-basename=bacula \
--with-bsrdir=%{_localstatedir}/spool/bacula \
--with-dir-password=@@DIR_PASSWORD@@ \
--with-fd-password=@@FD_PASSWORD@@ \
--with-hostname=localhost \
--with-logdir=%{_localstatedir}/log/bacula \
--with-mon-dir-password=@@MON_DIR_PASSWORD@@ \
--with-mon-fd-password=@@MON_FD_PASSWORD@@ \
--with-mon-sd-password=@@MON_SD_PASSWORD@@ \
--with-mysql \
--with-openssl \
--with-pid-dir=%{_localstatedir}/run \
2021-01-12 11:38:25 +00:00
--with-plugindir=%{_libdir}/%{name} \
2018-06-13 19:12:16 +00:00
--with-postgresql \
--with-scriptdir=%{_libexecdir}/bacula \
--with-sd-password=@@SD_PASSWORD@@ \
--with-smtp-host=localhost \
--with-sqlite3 \
--with-subsys-dir=%{_localstatedir}/lock/subsys \
2019-01-12 14:14:20 +00:00
%if 0%{!?fedora} || 0%{!?rhel} > 7
2018-06-13 19:12:16 +00:00
--with-tcp-wrappers \
%endif
2018-06-13 19:12:16 +00:00
--with-working-dir=%{_localstatedir}/spool/bacula \
--with-x
2007-07-24 20:11:04 +00:00
2011-11-30 14:55:59 +00:00
# Remove RPATH
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
2010-05-19 15:55:24 +00:00
2019-01-13 11:40:35 +00:00
%make_build
2021-01-15 14:05:13 +00:00
%make_build -C src/tools/cdp-client
2019-01-13 11:40:35 +00:00
%make_build -C examples/nagios/check_bacula
2011-12-19 15:20:41 +00:00
2014-03-30 15:01:00 +00:00
pushd src/qt-console/tray-monitor
2018-02-06 14:04:22 +00:00
%{?qmake_qt5}%{!?qmake_qt5:qmake-qt5} tray-monitor.pro
2019-01-13 11:40:35 +00:00
%make_build
2014-03-30 15:01:00 +00:00
popd
# Convert image to png for tray monitor icon
2007-07-24 20:11:04 +00:00
%install
2017-04-05 09:08:07 +00:00
%make_install
2021-01-15 14:05:13 +00:00
%make_install -C src/tools/cdp-client
%make_install -C examples/nagios/check_bacula
2018-06-15 09:03:13 +00:00
# This will be managed through alternatives, as it requires the name to NOT
# change between upgrades, so the versioned library name can not be used.
2012-01-18 16:33:53 +00:00
rm -f %{buildroot}%{_libdir}/libbaccats.so
2007-07-24 20:11:04 +00:00
2011-12-12 16:18:26 +00:00
# Bat
install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bat_icon.png
2017-07-24 13:42:54 +00:00
install -p -m 644 -D scripts/bat.desktop %{buildroot}%{_datadir}/applications/bat.desktop
2018-05-14 11:19:34 +00:00
install -p -m 755 -D src/qt-console/.libs/bat %{buildroot}%{_sbindir}/bat
2020-03-05 12:53:24 +00:00
2014-03-31 07:53:26 +00:00
install -p -m 644 -D manpages/bacula-tray-monitor.1 %{buildroot}%{_mandir}/man1/bacula-tray-monitor.1
2020-03-05 10:45:51 +00:00
install -p -m 644 -D %{SOURCE19} %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.png
2017-07-24 13:42:54 +00:00
install -p -m 644 -D scripts/bacula-tray-monitor.desktop %{buildroot}%{_datadir}/applications/bacula-tray-monitor.desktop
2011-12-12 16:18:26 +00:00
# Logrotate
mkdir -p %{buildroot}%{_localstatedir}/log/bacula
install -p -m 644 -D %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/bacula
2007-07-24 20:11:04 +00:00
# Logwatch
install -p -m 755 -D scripts/logwatch/bacula %{buildroot}%{_sysconfdir}/logwatch/scripts/services/bacula
install -p -m 755 -D scripts/logwatch/applybaculadate %{buildroot}%{_sysconfdir}/logwatch/scripts/shared/applybaculadate
install -p -m 644 -D scripts/logwatch/logfile.bacula.conf %{buildroot}%{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
install -p -m 644 -D scripts/logwatch/services.bacula.conf %{buildroot}%{_sysconfdir}/logwatch/conf/services/bacula.conf
2007-07-24 20:11:04 +00:00
2011-09-08 16:31:35 +00:00
# Systemd unit files
mkdir -p %{buildroot}%{_unitdir}
2013-06-27 07:50:37 +00:00
install -p -m 644 -D %{SOURCE10} %{buildroot}%{_unitdir}/bacula-fd.service
install -p -m 644 -D %{SOURCE11} %{buildroot}%{_unitdir}/bacula-dir.service
install -p -m 644 -D %{SOURCE12} %{buildroot}%{_unitdir}/bacula-sd.service
2010-10-19 15:29:37 +00:00
2011-11-30 14:55:59 +00:00
# Sysconfig
install -p -m 644 -D %{SOURCE15} %{buildroot}%{_sysconfdir}/sysconfig/bacula-fd
install -p -m 644 -D %{SOURCE16} %{buildroot}%{_sysconfdir}/sysconfig/bacula-dir
install -p -m 644 -D %{SOURCE17} %{buildroot}%{_sysconfdir}/sysconfig/bacula-sd
2010-10-19 15:29:37 +00:00
# Spool directory
mkdir -p %{buildroot}%{_localstatedir}/spool/bacula
2007-07-24 20:11:04 +00:00
# Remove stuff we do not need
2012-07-20 06:44:52 +00:00
rm -f %{buildroot}%{_libexecdir}/bacula/{bacula,bacula-ctl-*,startmysql,stopmysql,bconsole,make_catalog_backup}
2011-12-05 18:06:44 +00:00
rm -f %{buildroot}%{_sbindir}/bacula
rm -f %{buildroot}%{_mandir}/man8/bacula.8.gz
2014-03-30 10:28:51 +00:00
rm -f %{buildroot}%{_libdir}/*.la
2015-09-29 09:16:35 +00:00
rm -f %{buildroot}%{_datadir}/bacula/{ChangeLog,INSTALL,LICENSE*,README,ReleaseNotes,VERIFYING,technotes}
2007-07-24 20:11:04 +00:00
# Fix up some perms so rpmlint does not complain too much
chmod 755 %{buildroot}%{_sbindir}/*
2021-01-12 11:38:25 +00:00
chmod 755 %{buildroot}%{_libdir}/%{name}/*
2007-07-24 20:11:04 +00:00
chmod 755 %{buildroot}%{_libexecdir}/bacula/*
chmod 644 %{buildroot}%{_libexecdir}/bacula/btraceback.*
2018-06-13 19:12:16 +00:00
%ldconfig_scriptlets libs
%post libs-sql
/usr/sbin/alternatives --install %{_libdir}/libbaccats.so libbaccats.so %{_libdir}/libbaccats-mysql.so 50
/usr/sbin/alternatives --install %{_libdir}/libbaccats.so libbaccats.so %{_libdir}/libbaccats-sqlite3.so 40
/usr/sbin/alternatives --install %{_libdir}/libbaccats.so libbaccats.so %{_libdir}/libbaccats-postgresql.so 60
2012-06-11 09:15:56 +00:00
# Fix for automatic selection of backends during upgrades
if readlink /etc/alternatives/libbaccats.so | grep --silent mysql || \
2018-06-13 19:12:16 +00:00
readlink /etc/alternatives/bacula-dir | grep --silent mysql || \
readlink /etc/alternatives/bacula-sd | grep --silent mysql; then
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-mysql.so
2012-06-11 09:15:56 +00:00
elif readlink /etc/alternatives/libbaccats.so | grep --silent sqlite || \
2018-06-13 19:12:16 +00:00
readlink /etc/alternatives/bacula-dir | grep --silent sqlite || \
readlink /etc/alternatives/bacula-sd | grep --silent sqlite; then
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-sqlite3.so
2012-06-11 09:15:56 +00:00
else
2018-06-13 19:12:16 +00:00
/usr/sbin/alternatives --set libbaccats.so %{_libdir}/libbaccats-postgresql.so
2012-06-11 09:15:56 +00:00
fi
2018-06-13 19:12:16 +00:00
%{?ldconfig}
2011-11-30 14:55:59 +00:00
%preun libs-sql
2008-09-10 14:31:29 +00:00
if [ "$1" = 0 ]; then
2018-06-13 19:12:16 +00:00
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-mysql.so
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-sqlite3.so
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-postgresql.so
2008-09-10 14:31:29 +00:00
fi
2018-06-13 19:12:16 +00:00
%ldconfig_postun libs-sql
2011-12-19 15:20:41 +00:00
2007-07-24 20:11:04 +00:00
%pre common
2011-12-20 08:23:13 +00:00
getent group %username >/dev/null || groupadd -g %uid -r %username &>/dev/null || :
getent passwd %username >/dev/null || useradd -u %uid -r -s /sbin/nologin \
-d /var/spool/bacula -M -c 'Bacula Backup System' -g %username %username &>/dev/null || :
exit 0
2011-12-19 15:20:41 +00:00
%post client
%systemd_post %{name}-fd.service
%preun client
%systemd_preun %{name}-fd.service
%postun client
%systemd_postun_with_restart %{name}-fd.service
%post director
%systemd_post %{name}-dir.service
%preun director
%systemd_preun %{name}-dir.service
%postun director
%systemd_postun_with_restart %{name}-dir.service
%post storage
%systemd_post %{name}-sd.service
%preun storage
%systemd_preun %{name}-sd.service
%postun storage
%systemd_postun_with_restart %{name}-sd.service
%files libs
2015-02-24 17:30:34 +00:00
%license LICENSE
2015-09-29 09:16:35 +00:00
%doc AUTHORS ChangeLog SUPPORT ReleaseNotes LICENSE-FAQ LICENSE-FOSS
%{_libdir}/libbac-%{version}.so
%{_libdir}/libbaccfg-%{version}.so
%{_libdir}/libbacfind-%{version}.so
%{_libdir}/libbacsd-%{version}.so
%files libs-sql
2018-06-13 19:12:16 +00:00
# On Fedora 28 this gets recreated automatically even if the library is
# deleted in the install section.
2018-06-15 09:03:13 +00:00
# On EPEL 6 this is required until RPM assembly time or an error is given due
# to the missing library.
# So: leave the library in place until the very end and just exclude it.
2018-06-13 20:00:34 +00:00
%exclude %{_libdir}/libbaccats-%{version}.so
2012-01-03 15:05:22 +00:00
%{_libdir}/libbaccats-mysql-%{version}.so
%{_libdir}/libbaccats-mysql.so
%{_libdir}/libbaccats-postgresql-%{version}.so
%{_libdir}/libbaccats-postgresql.so
%{_libdir}/libbaccats-sqlite3-%{version}.so
%{_libdir}/libbaccats-sqlite3.so
%{_libdir}/libbacsql-%{version}.so
2007-07-24 20:11:04 +00:00
%files common
2013-02-22 12:53:40 +00:00
%doc README.Redhat quickstart_*
2007-07-24 20:11:04 +00:00
%config(noreplace) %{_sysconfdir}/logrotate.d/bacula
2014-03-31 07:53:26 +00:00
%dir %{_localstatedir}/log/bacula %attr(750, bacula, bacula)
%dir %{_localstatedir}/spool/bacula %attr(750, bacula, bacula)
2011-11-30 14:55:59 +00:00
%dir %{_libexecdir}/%{name}
2014-03-31 07:53:26 +00:00
%dir %{_sysconfdir}/%{name} %attr(755,root,root)
2011-11-30 14:55:59 +00:00
%{_libexecdir}/%{name}/btraceback.dbx
%{_libexecdir}/%{name}/btraceback.gdb
%{_libexecdir}/%{name}/bacula_config
%{_libexecdir}/%{name}/btraceback.mdb
2013-05-16 09:45:13 +00:00
%{_mandir}/man8/btraceback.8*
2014-03-31 07:53:26 +00:00
%{_sbindir}/btraceback
2007-07-24 20:11:04 +00:00
2012-01-03 15:05:22 +00:00
%files director
%doc updatedb examples/sample-query.sql
2014-03-31 07:53:26 +00:00
%config(noreplace) %{_sysconfdir}/bacula/bacula-dir.conf %attr(640,root,bacula)
%config(noreplace) %{_sysconfdir}/bacula/query.sql %attr(640,root,bacula)
2011-11-30 14:55:59 +00:00
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-dir
%{_libexecdir}/%{name}/baculabackupreport
2011-11-30 14:55:59 +00:00
%{_libexecdir}/%{name}/create_bacula_database
%{_libexecdir}/%{name}/delete_catalog_backup
%{_libexecdir}/%{name}/drop_bacula_database
%{_libexecdir}/%{name}/drop_bacula_tables
%{_libexecdir}/%{name}/grant_bacula_privileges
%{_libexecdir}/%{name}/make_bacula_tables
%{_libexecdir}/%{name}/make_catalog_backup.pl
%{_libexecdir}/%{name}/update_bacula_tables
%{_libexecdir}/%{name}/create_mysql_database
%{_libexecdir}/%{name}/drop_mysql_database
%{_libexecdir}/%{name}/drop_mysql_tables
%{_libexecdir}/%{name}/grant_mysql_privileges
%{_libexecdir}/%{name}/make_mysql_tables
%{_libexecdir}/%{name}/update_mysql_tables
%{_libexecdir}/%{name}/create_sqlite3_database
%{_libexecdir}/%{name}/drop_sqlite3_database
%{_libexecdir}/%{name}/drop_sqlite3_tables
%{_libexecdir}/%{name}/grant_sqlite3_privileges
%{_libexecdir}/%{name}/make_sqlite3_tables
%{_libexecdir}/%{name}/update_sqlite3_tables
%{_libexecdir}/%{name}/create_postgresql_database
%{_libexecdir}/%{name}/drop_postgresql_database
%{_libexecdir}/%{name}/drop_postgresql_tables
%{_libexecdir}/%{name}/grant_postgresql_privileges
%{_libexecdir}/%{name}/make_postgresql_tables
%{_libexecdir}/%{name}/update_postgresql_tables
2014-03-31 07:53:26 +00:00
%{_mandir}/man1/bsmtp.1*
%{_mandir}/man8/bacula-dir.8*
%{_mandir}/man8/bregex.8*
%{_mandir}/man8/bwild.8*
%{_mandir}/man8/dbcheck.8*
%{_sbindir}/bacula-dir
%{_sbindir}/bdirjson
2014-03-31 07:53:26 +00:00
%{_sbindir}/bregex
%{_sbindir}/bsmtp
%{_sbindir}/bwild
%{_sbindir}/dbcheck
%{_unitdir}/bacula-dir.service
2007-07-24 20:11:04 +00:00
2015-05-15 08:27:39 +00:00
%files logwatch
%config(noreplace) %{_sysconfdir}/logwatch/conf/logfiles/bacula.conf
%config(noreplace) %{_sysconfdir}/logwatch/conf/services/bacula.conf
%{_sysconfdir}/logwatch/scripts/services/bacula
%{_sysconfdir}/logwatch/scripts/shared/applybaculadate
%files storage
2014-03-31 07:53:26 +00:00
%config(noreplace) %{_sysconfdir}/bacula/bacula-sd.conf %attr(640,root,root)
2011-11-30 14:55:59 +00:00
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-sd
%{_libexecdir}/%{name}/disk-changer
2019-01-12 14:25:34 +00:00
%{_libexecdir}/%{name}/isworm
%{_libexecdir}/%{name}/mtx-changer
%{_libexecdir}/%{name}/mtx-changer.conf
%{_libexecdir}/%{name}/tapealert
2013-05-16 09:45:13 +00:00
%{_mandir}/man8/bacula-sd.8*
%{_mandir}/man8/bcopy.8*
%{_mandir}/man8/bextract.8*
%{_mandir}/man8/bls.8*
%{_mandir}/man8/bscan.8*
%{_mandir}/man8/btape.8*
2014-03-31 07:53:26 +00:00
%{_sbindir}/bacula-sd
%{_sbindir}/bcopy
%{_sbindir}/bextract
%{_sbindir}/bls
%{_sbindir}/bscan
%{_sbindir}/bsdjson
2014-03-31 07:53:26 +00:00
%{_sbindir}/btape
%{_unitdir}/bacula-sd.service
%files client
2014-03-31 07:53:26 +00:00
%config(noreplace) %{_sysconfdir}/bacula/bacula-fd.conf %attr(640,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-fd
%{_mandir}/man8/bacula-fd.8*
2021-01-12 11:38:25 +00:00
%{_libdir}/%{name}/bpipe-fd.so
2021-01-15 14:05:13 +00:00
%{_libdir}/%{name}/cdp-fd.so
2021-01-12 11:38:25 +00:00
%{_libdir}/%{name}/docker-fd.so
%{_sbindir}/bacula-fd
%{_sbindir}/bfdjson
2021-01-15 14:05:13 +00:00
%{_sbindir}/cdp-client
%{_unitdir}/bacula-fd.service
%files console
2014-03-31 07:53:26 +00:00
%config(noreplace) %{_sysconfdir}/bacula/bconsole.conf %attr(640,root,root)
2013-05-16 09:45:13 +00:00
%{_mandir}/man8/bconsole.8*
2014-03-31 07:53:26 +00:00
%{_sbindir}/bconsole
%{_sbindir}/bbconsjson
%files console-bat
2014-03-31 07:53:26 +00:00
%config(noreplace) %{_sysconfdir}/bacula/bat.conf %attr(640,root,root)
%{_datadir}/applications/bat.desktop
%{_datadir}/bacula/*.html
%{_datadir}/bacula/*.png
%{_datadir}/pixmaps/bat_icon.png
2014-03-31 07:53:26 +00:00
%{_mandir}/man1/bat.1*
%{_sbindir}/bat
2011-12-12 16:18:26 +00:00
2014-03-30 15:01:00 +00:00
%files traymonitor
2020-03-05 10:45:51 +00:00
%config(noreplace) %{_sysconfdir}/bacula/bacula-tray-monitor.conf %attr(640,root,root)
%{_datadir}/applications/bacula-tray-monitor.desktop
2014-03-30 15:01:00 +00:00
%{_datadir}/pixmaps/bacula-tray-monitor.png
2014-03-31 07:53:26 +00:00
%{_mandir}/man1/bacula-tray-monitor.1*
%{_sbindir}/bacula-tray-monitor
%files devel
%{_includedir}/bacula
%{_libdir}/libbac.so
%{_libdir}/libbaccfg.so
%{_libdir}/libbacfind.so
%{_libdir}/libbacsd.so
%{_libdir}/libbacsql.so
2014-03-30 15:01:00 +00:00
%files -n nagios-plugins-bacula
%{_libdir}/nagios/plugins/check_bacula
2007-07-24 20:11:04 +00:00
%changelog
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 11.0.1-2
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-02-11 13:03:38 +00:00
* Thu Feb 11 2021 Simone Caronni <negativo17@gmail.com> - 11.0.1-1
- Update to 11.0.1.
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 11.0.0-5
- rebuild for libpq ABI fix rhbz#1908268
* Thu Jan 28 2021 Simone Caronni <negativo17@gmail.com> - 11.0.0-4
- Remove leftover ImageMagick build requirement.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2021-01-15 14:05:13 +00:00
* Fri Jan 15 2021 Simone Caronni <negativo17@gmail.com> - 11.0.0-2
- Build CDP plugin components.
2021-01-12 11:38:25 +00:00
* Tue Jan 12 2021 Simone Caronni <negativo17@gmail.com> - 11.0.0-1
- Update to 11.0.0.
- Enable Docker plugin.
* Tue Jan 12 2021 Simone Caronni <negativo17@gmail.com> - 9.6.7-1
- Update to 9.6.7.
- Drop support for building on CentOS/RHEL 6 and upgrades from version 2.4.
- Trim changelog.
2020-10-07 13:01:37 +00:00
* Wed Oct 07 2020 Simone Caronni <negativo17@gmail.com> - 9.6.6-1
- Update to 9.6.6.
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.6.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2020-07-24 07:40:06 +00:00
* Fri Jul 24 2020 Simone Caronni <negativo17@gmail.com> - 9.6.5-1
- Update to 9.6.5.
2020-03-20 13:54:09 +00:00
* Tue Mar 17 2020 Simone Caronni <negativo17@gmail.com> - 9.6.3-1
- Update to 9.6.3.
2020-03-05 12:53:24 +00:00
* Thu Mar 05 2020 Simone Caronni <negativo17@gmail.com> - 9.6.2-2
- Fix RHEL/CentOS 6 builds.
2020-02-29 16:56:13 +00:00
* Sat Feb 29 2020 Simone Caronni <negativo17@gmail.com> - 9.6.2-1
- Update to 9.6.2.
2020-02-10 11:52:48 +00:00
* Mon Feb 10 2020 Václav Doležal <vdolezal@redhat.com> - 9.4.4-4
- Fix FTBFS (#1799185)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2019-05-29 20:30:17 +00:00
* Wed May 29 2019 Simone Caronni <negativo17@gmail.com> - 9.4.4-1
- Update to 9.4.4.
2019-05-18 06:29:08 +00:00
* Sat May 18 2019 Simone Caronni <negativo17@gmail.com> - 9.4.3-2
- SPEC file cleanups.
2019-05-15 19:25:12 +00:00
* Wed May 15 2019 Simone Caronni <negativo17@gmail.com> - 9.4.3-1
- Update to 9.4.3.
2019-04-18 10:38:09 +00:00
* Thu Apr 18 2019 Simone Caronni <negativo17@gmail.com> - 9.4.2-1
- Update to 9.4.2.
2019-02-17 08:30:49 +00:00
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 9.4.1-6
- Rebuild for readline 8.0
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2019-01-14 17:56:24 +00:00
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 9.4.1-4
- Rebuilt for libcrypt.so.2 (#1666033)
2019-01-13 14:32:43 +00:00
* Sun Jan 13 2019 Simone Caronni <negativo17@gmail.com> - 9.4.1-3
- Build QT programs with QT 5 on RHEL/CentOS 7. Also, reduce the number of
required QT packages for building.
2019-01-13 11:40:35 +00:00
* Sun Jan 13 2019 Simone Caronni <negativo17@gmail.com> - 9.4.1-2
- Add Debian patch to enable/disable S3 support at configure time.
- Disable S3 as it does not currently build:
http://bugs.bacula.org/view.php?id=2446
- Update RPM macros.
2019-01-12 15:34:43 +00:00
* Sat Jan 12 2019 Simone Caronni <negativo17@gmail.com> - 9.4.1-1
- Update to 9.4.1.
2019-01-12 14:25:34 +00:00
* Sat Jan 12 2019 Simone Caronni <negativo17@gmail.com> - 9.4.0-1
- Update to 9.4.0.
2019-01-12 14:14:20 +00:00
* Sat Jan 12 2019 Simone Caronni <negativo17@gmail.com> - 9.2.1-2
- Make the build succeed also on supported RHEL and Fedora releases.
- Remove Fedora 27 references.