From 49b59b7b47f231315498257184d5125007e3c877 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: May 16 2013 09:00:05 +0000 Subject: Spec file formatting --- diff --git a/bacula.spec b/bacula.spec index 75ddfa6..d212726 100644 --- a/bacula.spec +++ b/bacula.spec @@ -1,76 +1,76 @@ %global uid 133 %global username bacula -Name: bacula -Version: 5.2.13 -Release: 10%{?dist} -Summary: Cross platform network backup for Linux, Unix, Mac and Windows +Name: bacula +Version: 5.2.13 +Release: 10%{?dist} +Summary: Cross platform network backup for Linux, Unix, Mac and Windows # See LICENSE for details -License: AGPLv3 with exceptions -Group: System Environment/Daemons -URL: http://www.bacula.org -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) - -Source0: http://www.bacula.org/downloads/Bacula-%{version}/%{name}-%{version}.tar.gz - -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 - -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 - -BuildRequires: desktop-file-utils -BuildRequires: perl -BuildRequires: sed - -BuildRequires: glibc-devel -BuildRequires: libacl-devel -BuildRequires: libstdc++-devel -BuildRequires: libxml2-devel -BuildRequires: libcap-devel -BuildRequires: lzo-devel -BuildRequires: mysql-devel -BuildRequires: ncurses-devel -BuildRequires: openssl-devel -BuildRequires: postgresql-devel -BuildRequires: python-devel -BuildRequires: readline-devel -BuildRequires: sqlite-devel -BuildRequires: zlib-devel +License: AGPLv3 with exceptions +Group: System Environment/Daemons +URL: http://www.bacula.org +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Source0: http://www.bacula.org/downloads/Bacula-%{version}/%{name}-%{version}.tar.gz + +Source2: quickstart_postgresql.txt +Source3: quickstart_mysql.txt +Source4: quickstart_sqlite3.txt +Source5: README.Redhat +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: %{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 +BuildRequires: sed + +BuildRequires: glibc-devel +BuildRequires: libacl-devel +BuildRequires: libstdc++-devel +BuildRequires: libxml2-devel +BuildRequires: libcap-devel +BuildRequires: lzo-devel +BuildRequires: mysql-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: postgresql-devel +BuildRequires: python-devel +BuildRequires: readline-devel +BuildRequires: sqlite-devel +BuildRequires: zlib-devel %if 0%{?fedora} || 0%{?rhel} >= 6 -BuildRequires: qt4-devel >= 4.6.2 +BuildRequires: qt4-devel >= 4.6.2 %endif %if 0%{?fedora} || 0%{?rhel} >= 6 -BuildRequires: tcp_wrappers-devel +BuildRequires: tcp_wrappers-devel %else -BuildRequires: tcp_wrappers +BuildRequires: tcp_wrappers %endif %if 0%{?fedora} || 0%{?rhel} >= 7 -BuildRequires: systemd-units +BuildRequires: systemd-units %endif %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 to find and recover lost or damaged files. - %package libs -Summary: Bacula libraries -Group: System Environment/Daemons -Obsoletes: bacula-sysconfdir <= 2.4 +Summary: Bacula libraries +Group: System Environment/Daemons +Obsoletes: bacula-sysconfdir <= 2.4 %description libs 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 Bacula programs. - %package libs-sql -Summary: Bacula SQL libraries -Group: System Environment/Daemons -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} +Summary: Bacula SQL libraries +Group: System Environment/Daemons +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 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 alternatives system. - %package common -Summary: Common Bacula files -Group: System Environment/Daemons -Obsoletes: bacula-sysconfdir <= 2.4 -Provides: group(%username) = %uid -Provides: user(%username) = %uid -Requires(pre): shadow-utils -Requires(postun): shadow-utils +Summary: Common Bacula files +Group: System Environment/Daemons +Obsoletes: bacula-sysconfdir <= 2.4 +Provides: group(%username) = %uid +Provides: user(%username) = %uid +Requires(pre): shadow-utils +Requires(postun): shadow-utils %description common 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. - %package director -Summary: Bacula Director files -Group: System Environment/Daemons -Requires: bacula-common%{?_isa} = %{version}-%{release} -Requires: logwatch +Summary: Bacula Director files +Group: System Environment/Daemons +Requires: bacula-common%{?_isa} = %{version}-%{release} +Requires: logwatch # Director backends merged into core. -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 +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 %if 0%{?fedora} == 17 -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %endif %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -Requires(post): systemd-sysv -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %endif %if 0%{?rhel} == 5 || 0%{?rhel} == 6 -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -Requires(postun): /sbin/service +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service %endif %description director @@ -174,40 +170,39 @@ based on a client/server architecture. This package contains the director files. - %package storage -Summary: Bacula storage daemon files -Group: System Environment/Daemons -Requires: bacula-common%{?_isa} = %{version}-%{release} -Requires: mt-st +Summary: Bacula storage daemon files +Group: System Environment/Daemons +Requires: bacula-common%{?_isa} = %{version}-%{release} +Requires: mt-st # Storage backends merged into core. -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 +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 %if 0%{?fedora} == 17 -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %endif %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -Requires(post): systemd-sysv -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %endif %if 0%{?rhel} == 5 || 0%{?rhel} == 6 -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -Requires(postun): /sbin/service +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service %endif %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 devices. - %package client -Summary: Bacula backup client -Group: System Environment/Daemons -Requires: bacula-common%{?_isa} = %{version}-%{release} +Summary: Bacula backup client +Group: System Environment/Daemons +Requires: bacula-common%{?_isa} = %{version}-%{release} %if 0%{?fedora} == 17 -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units %endif %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 -Requires(post): systemd-sysv -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd %endif %if 0%{?rhel} == 5 || 0%{?rhel} == 6 -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -Requires(postun): /sbin/service +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service %endif %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 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 - +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 @@ -269,11 +261,10 @@ 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 -Group: System Environment/Daemons +Summary: Bacula bat console +Group: System Environment/Daemons %description console-bat 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. - %package traymonitor -Summary: Bacula system tray monitor -Group: System Environment/Daemons +Summary: Bacula system tray monitor +Group: System Environment/Daemons %description traymonitor 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. %endif - %package devel -Summary: Bacula development files -Group: Development/Libraries +Summary: Bacula development files +Group: Development/Libraries %description devel 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 -Summary: Nagios Plugin - check_bacula -Group: Applications/System +Summary: Nagios Plugin - check_bacula +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 - 5.2.13-10 - Add aarch64 patch (#925072).