Spec file formatting

This commit is contained in:
Simone Caronni 2013-05-16 11:00:05 +02:00
parent 6ed9acd8dc
commit 49b59b7b47

View File

@ -1,76 +1,76 @@
%global uid 133 %global uid 133
%global username bacula %global username bacula
Name: bacula Name: bacula
Version: 5.2.13 Version: 5.2.13
Release: 10%{?dist} Release: 10%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details # See LICENSE for details
License: AGPLv3 with exceptions License: AGPLv3 with exceptions
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://www.bacula.org URL: http://www.bacula.org
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://www.bacula.org/downloads/Bacula-%{version}/%{name}-%{version}.tar.gz Source0: http://www.bacula.org/downloads/Bacula-%{version}/%{name}-%{version}.tar.gz
Source2: quickstart_postgresql.txt Source2: quickstart_postgresql.txt
Source3: quickstart_mysql.txt Source3: quickstart_mysql.txt
Source4: quickstart_sqlite3.txt Source4: quickstart_sqlite3.txt
Source5: README.Redhat Source5: README.Redhat
Source6: bacula.logrotate Source6: %{name}.logrotate
Source7: bacula-fd.init Source7: %{name}-fd.init
Source8: bacula-dir.init Source8: %{name}-dir.init
Source9: bacula-sd.init Source9: %{name}-sd.init
Source10: bacula-fd.service Source10: %{name}-fd.service
Source11: bacula-dir.service Source11: %{name}-dir.service
Source12: bacula-sd.service Source12: %{name}-sd.service
Source13: bacula-bat.desktop Source13: %{name}-bat.desktop
Source14: bacula-traymonitor.desktop Source14: %{name}-traymonitor.desktop
Source15: bacula-fd.sysconfig Source15: %{name}-fd.sysconfig
Source16: bacula-dir.sysconfig Source16: %{name}-dir.sysconfig
Source17: bacula-sd.sysconfig Source17: %{name}-sd.sysconfig
Source18: bacula-sd.sysconfig.el5 Source18: %{name}-sd.sysconfig.el5
Patch1: bacula-5.0.2-openssl.patch Patch1: %{name}-5.0.2-openssl.patch
Patch2: bacula-5.2.2-queryfile.patch Patch2: %{name}-5.2.2-queryfile.patch
Patch3: bacula-5.0.3-sqlite-priv.patch Patch3: %{name}-5.0.3-sqlite-priv.patch
Patch4: bacula-5.2.13-bat-build.patch Patch4: %{name}-5.2.13-bat-build.patch
Patch5: bacula-5.2.12-seg-fault.patch Patch5: %{name}-5.2.12-seg-fault.patch
Patch6: bacula-5.2.13-logwatch.patch Patch6: %{name}-5.2.13-logwatch.patch
Patch7: bacula-help-update.patch Patch7: %{name}-help-update.patch
Patch8: bacula-aarch64.patch Patch8: %{name}-aarch64.patch
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: perl BuildRequires: perl
BuildRequires: sed BuildRequires: sed
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libstdc++-devel BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: libcap-devel BuildRequires: libcap-devel
BuildRequires: lzo-devel BuildRequires: lzo-devel
BuildRequires: mysql-devel BuildRequires: mysql-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: postgresql-devel BuildRequires: postgresql-devel
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: sqlite-devel BuildRequires: sqlite-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
%if 0%{?fedora} || 0%{?rhel} >= 6 %if 0%{?fedora} || 0%{?rhel} >= 6
BuildRequires: qt4-devel >= 4.6.2 BuildRequires: qt4-devel >= 4.6.2
%endif %endif
%if 0%{?fedora} || 0%{?rhel} >= 6 %if 0%{?fedora} || 0%{?rhel} >= 6
BuildRequires: tcp_wrappers-devel BuildRequires: tcp_wrappers-devel
%else %else
BuildRequires: tcp_wrappers BuildRequires: tcp_wrappers
%endif %endif
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: systemd-units BuildRequires: systemd-units
%endif %endif
%description %description
@ -80,11 +80,10 @@ 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 use, while offering many advanced storage management features that make it easy
to find and recover lost or damaged files. to find and recover lost or damaged files.
%package libs %package libs
Summary: Bacula libraries Summary: Bacula libraries
Group: System Environment/Daemons Group: System Environment/Daemons
Obsoletes: bacula-sysconfdir <= 2.4 Obsoletes: bacula-sysconfdir <= 2.4
%description libs %description libs
Bacula is a set of programs that allow you to manage the backup, Bacula is a set of programs that allow you to manage the backup,
@ -94,16 +93,15 @@ different computers. It is based on a client/server architecture.
This package contains basic Bacula libraries, which are used by all This package contains basic Bacula libraries, which are used by all
Bacula programs. Bacula programs.
%package libs-sql %package libs-sql
Summary: Bacula SQL libraries Summary: Bacula SQL libraries
Group: System Environment/Daemons Group: System Environment/Daemons
Obsoletes: bacula-libs-mysql <= 5.0.3 Obsoletes: bacula-libs-mysql <= 5.0.3
Obsoletes: bacula-libs-sqlite <= 5.0.3 Obsoletes: bacula-libs-sqlite <= 5.0.3
Obsoletes: bacula-libs-postgresql <= 5.0.3 Obsoletes: bacula-libs-postgresql <= 5.0.3
Provides: bacula-libs-mysql = %{version}-%{release} Provides: bacula-libs-mysql = %{version}-%{release}
Provides: bacula-libs-sqlite = %{version}-%{release} Provides: bacula-libs-sqlite = %{version}-%{release}
Provides: bacula-libs-postgresql = %{version}-%{release} Provides: bacula-libs-postgresql = %{version}-%{release}
%description libs-sql %description libs-sql
Bacula is a set of programs that allow you to manage the backup, recovery, and Bacula is a set of programs that allow you to manage the backup, recovery, and
@ -114,15 +112,14 @@ 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 Storage daemons. You have to select your preferred catalog library through the
alternatives system. alternatives system.
%package common %package common
Summary: Common Bacula files Summary: Common Bacula files
Group: System Environment/Daemons Group: System Environment/Daemons
Obsoletes: bacula-sysconfdir <= 2.4 Obsoletes: bacula-sysconfdir <= 2.4
Provides: group(%username) = %uid Provides: group(%username) = %uid
Provides: user(%username) = %uid Provides: user(%username) = %uid
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(postun): shadow-utils Requires(postun): shadow-utils
%description common %description common
Bacula is a set of programs that allow you to manage the backup, recovery, and Bacula is a set of programs that allow you to manage the backup, recovery, and
@ -131,40 +128,39 @@ based on a client/server architecture.
This package contains files common to all Bacula daemons. This package contains files common to all Bacula daemons.
%package director %package director
Summary: Bacula Director files Summary: Bacula Director files
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: bacula-common%{?_isa} = %{version}-%{release} Requires: bacula-common%{?_isa} = %{version}-%{release}
Requires: logwatch Requires: logwatch
# Director backends merged into core. # Director backends merged into core.
Provides: bacula-director-common = %{version}-%{release} Provides: bacula-director-common = %{version}-%{release}
Obsoletes: bacula-director-common < 5.2.3-5 Obsoletes: bacula-director-common < 5.2.3-5
Provides: bacula-director-mysql = %{version}-%{release} Provides: bacula-director-mysql = %{version}-%{release}
Obsoletes: bacula-director-mysql < 5.2.3-5 Obsoletes: bacula-director-mysql < 5.2.3-5
Provides: bacula-director-sqlite = %{version}-%{release} Provides: bacula-director-sqlite = %{version}-%{release}
Obsoletes: bacula-director-sqlite < 5.2.3-5 Obsoletes: bacula-director-sqlite < 5.2.3-5
Provides: bacula-director-postgresql = %{version}-%{release} Provides: bacula-director-postgresql = %{version}-%{release}
Obsoletes: bacula-director-postgresql < 5.2.3-5 Obsoletes: bacula-director-postgresql < 5.2.3-5
%if 0%{?fedora} == 17 %if 0%{?fedora} == 17
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
%endif %endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
Requires(post): systemd-sysv Requires(post): systemd-sysv
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
%endif %endif
%if 0%{?rhel} == 5 || 0%{?rhel} == 6 %if 0%{?rhel} == 5 || 0%{?rhel} == 6
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service Requires(preun): /sbin/service
Requires(postun): /sbin/service Requires(postun): /sbin/service
%endif %endif
%description director %description director
@ -174,40 +170,39 @@ based on a client/server architecture.
This package contains the director files. This package contains the director files.
%package storage %package storage
Summary: Bacula storage daemon files Summary: Bacula storage daemon files
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: bacula-common%{?_isa} = %{version}-%{release} Requires: bacula-common%{?_isa} = %{version}-%{release}
Requires: mt-st Requires: mt-st
# Storage backends merged into core. # Storage backends merged into core.
Provides: bacula-storage-common = %{version}-%{release} Provides: bacula-storage-common = %{version}-%{release}
Obsoletes: bacula-storage-common < 5.2.2-2 Obsoletes: bacula-storage-common < 5.2.2-2
Provides: bacula-storage-mysql = %{version}-%{release} Provides: bacula-storage-mysql = %{version}-%{release}
Obsoletes: bacula-storage-mysql < 5.2.0 Obsoletes: bacula-storage-mysql < 5.2.0
Provides: bacula-storage-sqlite = %{version}-%{release} Provides: bacula-storage-sqlite = %{version}-%{release}
Obsoletes: bacula-storage-sqlite < 5.2.0 Obsoletes: bacula-storage-sqlite < 5.2.0
Provides: bacula-storage-postgresql = %{version}-%{release} Provides: bacula-storage-postgresql = %{version}-%{release}
Obsoletes: bacula-storage-postgresql < 5.2.0 Obsoletes: bacula-storage-postgresql < 5.2.0
%if 0%{?fedora} == 17 %if 0%{?fedora} == 17
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
%endif %endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
Requires(post): systemd-sysv Requires(post): systemd-sysv
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
%endif %endif
%if 0%{?rhel} == 5 || 0%{?rhel} == 6 %if 0%{?rhel} == 5 || 0%{?rhel} == 6
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service Requires(preun): /sbin/service
Requires(postun): /sbin/service Requires(postun): /sbin/service
%endif %endif
%description storage %description storage
@ -219,30 +214,29 @@ This package contains the storage daemon, the daemon responsible for writing
the data received from the clients onto tape drives or other mass storage the data received from the clients onto tape drives or other mass storage
devices. devices.
%package client %package client
Summary: Bacula backup client Summary: Bacula backup client
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: bacula-common%{?_isa} = %{version}-%{release} Requires: bacula-common%{?_isa} = %{version}-%{release}
%if 0%{?fedora} == 17 %if 0%{?fedora} == 17
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
%endif %endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
Requires(post): systemd-sysv Requires(post): systemd-sysv
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
%endif %endif
%if 0%{?rhel} == 5 || 0%{?rhel} == 6 %if 0%{?rhel} == 5 || 0%{?rhel} == 6
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service Requires(preun): /sbin/service
Requires(postun): /sbin/service Requires(postun): /sbin/service
%endif %endif
%description client %description client
@ -253,13 +247,11 @@ based on a client/server architecture.
This package contains the bacula client, the daemon running on the system to be This package contains the bacula client, the daemon running on the system to be
backed up. backed up.
%package console %package console
Summary: Bacula management console Summary: Bacula management console
Group: System Environment/Daemons Group: System Environment/Daemons
Obsoletes: bacula-console-gnome <= 2.4 Obsoletes: bacula-console-gnome <= 2.4
Obsoletes: bacula-console-wxwidgets <= 5.0.3 Obsoletes: bacula-console-wxwidgets <= 5.0.3
%description console %description console
Bacula is a set of programs that allow you to manage the backup, recovery, and Bacula is a set of programs that allow you to manage the backup, recovery, and
@ -269,11 +261,10 @@ based on a client/server architecture.
This package contains the command-line management console for the bacula backup This package contains the command-line management console for the bacula backup
system. system.
%if 0%{?fedora} || 0%{?rhel} >= 6 %if 0%{?fedora} || 0%{?rhel} >= 6
%package console-bat %package console-bat
Summary: Bacula bat console Summary: Bacula bat console
Group: System Environment/Daemons Group: System Environment/Daemons
%description console-bat %description console-bat
Bacula is a set of programs that allow you to manage the backup, recovery, and Bacula is a set of programs that allow you to manage the backup, recovery, and
@ -282,10 +273,9 @@ based on a client/server architecture.
This package contains the bat version of the bacula management console. This package contains the bat version of the bacula management console.
%package traymonitor %package traymonitor
Summary: Bacula system tray monitor Summary: Bacula system tray monitor
Group: System Environment/Daemons Group: System Environment/Daemons
%description traymonitor %description traymonitor
Bacula is a set of programs that allow you to manage the backup, recovery, and Bacula is a set of programs that allow you to manage the backup, recovery, and
@ -296,10 +286,9 @@ This package contains the Gnome and KDE compatible tray monitor to monitor your
bacula server. bacula server.
%endif %endif
%package devel %package devel
Summary: Bacula development files Summary: Bacula development files
Group: Development/Libraries Group: Development/Libraries
%description devel %description devel
Bacula is a set of programs that allow you to manage the backup, recovery, and Bacula is a set of programs that allow you to manage the backup, recovery, and
@ -310,13 +299,12 @@ This development package contains static libraries and header files.
%package -n nagios-plugins-bacula %package -n nagios-plugins-bacula
Summary: Nagios Plugin - check_bacula Summary: Nagios Plugin - check_bacula
Group: Applications/System Group: Applications/System
%description -n nagios-plugins-bacula %description -n nagios-plugins-bacula
Provides check_bacula support for Nagios. Provides check_bacula support for Nagios.
%prep %prep
%setup -q %setup -q
%patch1 -p2 -b .openssl %patch1 -p2 -b .openssl
@ -332,7 +320,6 @@ cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
# Remove execution permissions from files we're packaging as docs later on # Remove execution permissions from files we're packaging as docs later on
find updatedb -type f | xargs chmod -x find updatedb -type f | xargs chmod -x
%build %build
build() { build() {
export CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses" export CFLAGS="$RPM_OPT_FLAGS -I%{_includedir}/ncurses"
@ -482,20 +469,16 @@ for dir in src src/cats src/console src/dird src/filed src/findlib src/lib src/p
install -p -m 644 $dir/*.h %{buildroot}%{_includedir}/bacula/$dir install -p -m 644 $dir/*.h %{buildroot}%{_includedir}/bacula/$dir
done done
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%post libs %post libs
/sbin/ldconfig /sbin/ldconfig
%postun libs %postun libs
/sbin/ldconfig /sbin/ldconfig
exit 0 exit 0
%post libs-sql %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-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-sqlite3.so 40
@ -514,7 +497,6 @@ else
fi fi
/sbin/ldconfig /sbin/ldconfig
%preun libs-sql %preun libs-sql
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-mysql.so /usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-mysql.so
@ -522,19 +504,16 @@ if [ "$1" = 0 ]; then
/usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-postgresql.so /usr/sbin/alternatives --remove libbaccats.so %{_libdir}/libbaccats-postgresql.so
fi fi
%postun libs-sql %postun libs-sql
/sbin/ldconfig /sbin/ldconfig
exit 0 exit 0
%pre common %pre common
getent group %username >/dev/null || groupadd -g %uid -r %username &>/dev/null || : getent group %username >/dev/null || groupadd -g %uid -r %username &>/dev/null || :
getent passwd %username >/dev/null || useradd -u %uid -r -s /sbin/nologin \ 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 || : -d /var/spool/bacula -M -c 'Bacula Backup System' -g %username %username &>/dev/null || :
exit 0 exit 0
%if 0%{?fedora} == 17 %if 0%{?fedora} == 17
%post client %post client
@ -543,7 +522,6 @@ if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
%preun client %preun client
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
# Package removal, not upgrade # Package removal, not upgrade
@ -551,7 +529,6 @@ if [ $1 -eq 0 ] ; then
/bin/systemctl stop bacula-fd.service > /dev/null 2>&1 || : /bin/systemctl stop bacula-fd.service > /dev/null 2>&1 || :
fi fi
%postun client %postun client
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then if [ $1 -ge 1 ] ; then
@ -559,7 +536,6 @@ if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || : /bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || :
fi fi
%triggerun client -- bacula-client < 5.0.3-10 %triggerun client -- bacula-client < 5.0.3-10
# Save the current service runlevel info # Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply bacula-fd # User must manually run systemd-sysv-convert --apply bacula-fd
@ -570,14 +546,12 @@ fi
/sbin/chkconfig --del bacula-fd >/dev/null 2>&1 || : /sbin/chkconfig --del bacula-fd >/dev/null 2>&1 || :
/bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || : /bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || :
%post director %post director
if [ $1 -eq 1 ] ; then if [ $1 -eq 1 ] ; then
# Initial installation # Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
%preun director %preun director
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
# Package removal, not upgrade # Package removal, not upgrade
@ -585,7 +559,6 @@ if [ $1 -eq 0 ] ; then
/bin/systemctl stop bacula-dir.service > /dev/null 2>&1 || : /bin/systemctl stop bacula-dir.service > /dev/null 2>&1 || :
fi fi
%postun director %postun director
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then if [ $1 -ge 1 ] ; then
@ -593,7 +566,6 @@ if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || : /bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || :
fi fi
%triggerun director -- bacula-director-common < 5.0.3-10 %triggerun director -- bacula-director-common < 5.0.3-10
# Save the current service runlevel info # Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply bacula-dir # User must manually run systemd-sysv-convert --apply bacula-dir
@ -604,14 +576,12 @@ fi
/sbin/chkconfig --del bacula-dir >/dev/null 2>&1 || : /sbin/chkconfig --del bacula-dir >/dev/null 2>&1 || :
/bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || : /bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || :
%post storage %post storage
if [ $1 -eq 1 ] ; then if [ $1 -eq 1 ] ; then
# Initial installation # Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
%preun storage %preun storage
if [ $1 -eq 0 ] ; then if [ $1 -eq 0 ] ; then
# Package removal, not upgrade # Package removal, not upgrade
@ -619,7 +589,6 @@ if [ $1 -eq 0 ] ; then
/bin/systemctl stop bacula-sd.service > /dev/null 2>&1 || : /bin/systemctl stop bacula-sd.service > /dev/null 2>&1 || :
fi fi
%postun storage %postun storage
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then if [ $1 -ge 1 ] ; then
@ -627,7 +596,6 @@ if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart bacula-sd.service >/dev/null 2>&1 || : /bin/systemctl try-restart bacula-sd.service >/dev/null 2>&1 || :
fi fi
%triggerun storage -- bacula-storage-common < 5.0.3-10 %triggerun storage -- bacula-storage-common < 5.0.3-10
# Save the current service runlevel info # Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply bacula-sd # User must manually run systemd-sysv-convert --apply bacula-sd
@ -691,48 +659,40 @@ fi
%post client %post client
/sbin/chkconfig --add bacula-fd /sbin/chkconfig --add bacula-fd
%preun client %preun client
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
/sbin/service bacula-fd stop >/dev/null 2>&1 || : /sbin/service bacula-fd stop >/dev/null 2>&1 || :
/sbin/chkconfig --del bacula-fd /sbin/chkconfig --del bacula-fd
fi fi
%postun client %postun client
if [ "$1" -ge "1" ]; then if [ "$1" -ge "1" ]; then
/sbin/service bacula-fd condrestart >/dev/null 2>&1 || : /sbin/service bacula-fd condrestart >/dev/null 2>&1 || :
fi fi
%post director %post director
/sbin/chkconfig --add bacula-dir /sbin/chkconfig --add bacula-dir
%preun director %preun director
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
/sbin/service bacula-dir stop >/dev/null 2>&1 || : /sbin/service bacula-dir stop >/dev/null 2>&1 || :
/sbin/chkconfig --del bacula-dir /sbin/chkconfig --del bacula-dir
fi fi
%postun director %postun director
if [ "$1" -ge "1" ]; then if [ "$1" -ge "1" ]; then
/sbin/service bacula-dir condrestart >/dev/null 2>&1 || : /sbin/service bacula-dir condrestart >/dev/null 2>&1 || :
fi fi
%post storage %post storage
/sbin/chkconfig --add bacula-sd /sbin/chkconfig --add bacula-sd
%preun storage %preun storage
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
/sbin/service bacula-sd stop >/dev/null 2>&1 || : /sbin/service bacula-sd stop >/dev/null 2>&1 || :
/sbin/chkconfig --del bacula-sd /sbin/chkconfig --del bacula-sd
fi fi
%postun storage %postun storage
if [ "$1" -ge "1" ]; then if [ "$1" -ge "1" ]; then
/sbin/service bacula-sd condrestart >/dev/null 2>&1 || : /sbin/service bacula-sd condrestart >/dev/null 2>&1 || :
@ -906,12 +866,10 @@ fi
%{_libdir}/libbacsql.la %{_libdir}/libbacsql.la
%{_libdir}/libbacsql.so %{_libdir}/libbacsql.so
%files -n nagios-plugins-bacula %files -n nagios-plugins-bacula
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/nagios/plugins/check_bacula %{_libdir}/nagios/plugins/check_bacula
%changelog %changelog
* Thu May 16 2013 Simone Caronni <negativo17@gmail.com> - 5.2.13-10 * Thu May 16 2013 Simone Caronni <negativo17@gmail.com> - 5.2.13-10
- Add aarch64 patch (#925072). - Add aarch64 patch (#925072).