Spec file formatting
This commit is contained in:
parent
6ed9acd8dc
commit
49b59b7b47
86
bacula.spec
86
bacula.spec
@ -9,7 +9,7 @@ Summary: Cross platform network backup for Linux, Unix, Mac and W
|
||||
License: AGPLv3 with exceptions
|
||||
Group: System Environment/Daemons
|
||||
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
|
||||
|
||||
@ -17,28 +17,28 @@ Source2: quickstart_postgresql.txt
|
||||
Source3: quickstart_mysql.txt
|
||||
Source4: quickstart_sqlite3.txt
|
||||
Source5: README.Redhat
|
||||
Source6: bacula.logrotate
|
||||
Source7: bacula-fd.init
|
||||
Source8: bacula-dir.init
|
||||
Source9: bacula-sd.init
|
||||
Source10: bacula-fd.service
|
||||
Source11: bacula-dir.service
|
||||
Source12: bacula-sd.service
|
||||
Source13: bacula-bat.desktop
|
||||
Source14: bacula-traymonitor.desktop
|
||||
Source15: bacula-fd.sysconfig
|
||||
Source16: bacula-dir.sysconfig
|
||||
Source17: bacula-sd.sysconfig
|
||||
Source18: bacula-sd.sysconfig.el5
|
||||
Source6: %{name}.logrotate
|
||||
Source7: %{name}-fd.init
|
||||
Source8: %{name}-dir.init
|
||||
Source9: %{name}-sd.init
|
||||
Source10: %{name}-fd.service
|
||||
Source11: %{name}-dir.service
|
||||
Source12: %{name}-sd.service
|
||||
Source13: %{name}-bat.desktop
|
||||
Source14: %{name}-traymonitor.desktop
|
||||
Source15: %{name}-fd.sysconfig
|
||||
Source16: %{name}-dir.sysconfig
|
||||
Source17: %{name}-sd.sysconfig
|
||||
Source18: %{name}-sd.sysconfig.el5
|
||||
|
||||
Patch1: bacula-5.0.2-openssl.patch
|
||||
Patch2: bacula-5.2.2-queryfile.patch
|
||||
Patch3: bacula-5.0.3-sqlite-priv.patch
|
||||
Patch4: bacula-5.2.13-bat-build.patch
|
||||
Patch5: bacula-5.2.12-seg-fault.patch
|
||||
Patch6: bacula-5.2.13-logwatch.patch
|
||||
Patch7: bacula-help-update.patch
|
||||
Patch8: bacula-aarch64.patch
|
||||
Patch1: %{name}-5.0.2-openssl.patch
|
||||
Patch2: %{name}-5.2.2-queryfile.patch
|
||||
Patch3: %{name}-5.0.3-sqlite-priv.patch
|
||||
Patch4: %{name}-5.2.13-bat-build.patch
|
||||
Patch5: %{name}-5.2.12-seg-fault.patch
|
||||
Patch6: %{name}-5.2.13-logwatch.patch
|
||||
Patch7: %{name}-help-update.patch
|
||||
Patch8: %{name}-aarch64.patch
|
||||
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: perl
|
||||
@ -80,7 +80,6 @@ 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.
|
||||
|
||||
|
||||
%package libs
|
||||
Summary: Bacula libraries
|
||||
Group: System Environment/Daemons
|
||||
@ -94,7 +93,6 @@ 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
|
||||
Summary: Bacula SQL libraries
|
||||
Group: System Environment/Daemons
|
||||
@ -114,7 +112,6 @@ 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
|
||||
Summary: Common Bacula files
|
||||
Group: System Environment/Daemons
|
||||
@ -131,7 +128,6 @@ based on a client/server architecture.
|
||||
|
||||
This package contains files common to all Bacula daemons.
|
||||
|
||||
|
||||
%package director
|
||||
Summary: Bacula Director files
|
||||
Group: System Environment/Daemons
|
||||
@ -174,7 +170,6 @@ based on a client/server architecture.
|
||||
|
||||
This package contains the director files.
|
||||
|
||||
|
||||
%package storage
|
||||
Summary: Bacula storage daemon files
|
||||
Group: System Environment/Daemons
|
||||
@ -219,7 +214,6 @@ 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.
|
||||
|
||||
|
||||
%package client
|
||||
Summary: Bacula backup client
|
||||
Group: System Environment/Daemons
|
||||
@ -253,14 +247,12 @@ based on a client/server architecture.
|
||||
This package contains the bacula client, the daemon running on the system to be
|
||||
backed up.
|
||||
|
||||
|
||||
%package console
|
||||
Summary: Bacula management console
|
||||
Group: System Environment/Daemons
|
||||
Obsoletes: bacula-console-gnome <= 2.4
|
||||
Obsoletes: bacula-console-wxwidgets <= 5.0.3
|
||||
|
||||
|
||||
%description console
|
||||
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
|
||||
@ -269,7 +261,6 @@ based on a client/server architecture.
|
||||
This package contains the command-line management console for the bacula backup
|
||||
system.
|
||||
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 6
|
||||
%package console-bat
|
||||
Summary: Bacula bat console
|
||||
@ -282,7 +273,6 @@ based on a client/server architecture.
|
||||
|
||||
This package contains the bat version of the bacula management console.
|
||||
|
||||
|
||||
%package traymonitor
|
||||
Summary: Bacula system tray monitor
|
||||
Group: System Environment/Daemons
|
||||
@ -296,7 +286,6 @@ This package contains the Gnome and KDE compatible tray monitor to monitor your
|
||||
bacula server.
|
||||
%endif
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Bacula development files
|
||||
Group: Development/Libraries
|
||||
@ -316,7 +305,6 @@ Group: Applications/System
|
||||
%description -n nagios-plugins-bacula
|
||||
Provides check_bacula support for Nagios.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%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
|
||||
find updatedb -type f | xargs chmod -x
|
||||
|
||||
|
||||
%build
|
||||
build() {
|
||||
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
|
||||
done
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%post libs
|
||||
/sbin/ldconfig
|
||||
|
||||
|
||||
%postun libs
|
||||
/sbin/ldconfig
|
||||
exit 0
|
||||
|
||||
|
||||
%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
|
||||
@ -514,7 +497,6 @@ else
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
|
||||
|
||||
%preun libs-sql
|
||||
if [ "$1" = 0 ]; then
|
||||
/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
|
||||
fi
|
||||
|
||||
|
||||
%postun libs-sql
|
||||
/sbin/ldconfig
|
||||
exit 0
|
||||
|
||||
|
||||
%pre common
|
||||
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
|
||||
|
||||
|
||||
%if 0%{?fedora} == 17
|
||||
|
||||
%post client
|
||||
@ -543,7 +522,6 @@ if [ $1 -eq 1 ] ; then
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%preun client
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
@ -551,7 +529,6 @@ if [ $1 -eq 0 ] ; then
|
||||
/bin/systemctl stop bacula-fd.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%postun client
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
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 || :
|
||||
fi
|
||||
|
||||
|
||||
%triggerun client -- bacula-client < 5.0.3-10
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply bacula-fd
|
||||
@ -570,14 +546,12 @@ fi
|
||||
/sbin/chkconfig --del bacula-fd >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart bacula-fd.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%post director
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%preun director
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
@ -585,7 +559,6 @@ if [ $1 -eq 0 ] ; then
|
||||
/bin/systemctl stop bacula-dir.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%postun director
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
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 || :
|
||||
fi
|
||||
|
||||
|
||||
%triggerun director -- bacula-director-common < 5.0.3-10
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply bacula-dir
|
||||
@ -604,14 +576,12 @@ fi
|
||||
/sbin/chkconfig --del bacula-dir >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart bacula-dir.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%post storage
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%preun storage
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
@ -619,7 +589,6 @@ if [ $1 -eq 0 ] ; then
|
||||
/bin/systemctl stop bacula-sd.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%postun storage
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
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 || :
|
||||
fi
|
||||
|
||||
|
||||
%triggerun storage -- bacula-storage-common < 5.0.3-10
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply bacula-sd
|
||||
@ -691,48 +659,40 @@ fi
|
||||
%post client
|
||||
/sbin/chkconfig --add bacula-fd
|
||||
|
||||
|
||||
%preun client
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service bacula-fd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-fd
|
||||
fi
|
||||
|
||||
|
||||
%postun client
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service bacula-fd condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%post director
|
||||
/sbin/chkconfig --add bacula-dir
|
||||
|
||||
|
||||
%preun director
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service bacula-dir stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-dir
|
||||
fi
|
||||
|
||||
|
||||
%postun director
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service bacula-dir condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%post storage
|
||||
/sbin/chkconfig --add bacula-sd
|
||||
|
||||
|
||||
%preun storage
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service bacula-sd stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del bacula-sd
|
||||
fi
|
||||
|
||||
|
||||
%postun storage
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service bacula-sd condrestart >/dev/null 2>&1 || :
|
||||
@ -906,12 +866,10 @@ fi
|
||||
%{_libdir}/libbacsql.la
|
||||
%{_libdir}/libbacsql.so
|
||||
|
||||
|
||||
%files -n nagios-plugins-bacula
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/nagios/plugins/check_bacula
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 16 2013 Simone Caronni <negativo17@gmail.com> - 5.2.13-10
|
||||
- Add aarch64 patch (#925072).
|
||||
|
Loading…
Reference in New Issue
Block a user