Update SPEC file with latest 9.0.0 changes

This commit is contained in:
Simone Caronni 2017-07-10 11:02:14 +02:00
parent 50b82927fd
commit f89001faae
4 changed files with 77 additions and 25 deletions

View File

@ -19,3 +19,21 @@ diff -Naur bacula-9.0.0.old/src/qt-console/bat.pro.in bacula-9.0.0/src/qt-consol
help.files = help/*.html images/status.png images/mail-message-new.png
TEMPLATE = app
diff -Naur bacula-9.0.0.old/src/qt-console/main.cpp bacula-9.0.0/src/qt-console/main.cpp
--- bacula-9.0.0.old/src/qt-console/main.cpp 2017-07-10 08:52:38.933834565 +0200
+++ bacula-9.0.0/src/qt-console/main.cpp 2017-07-10 09:48:57.479241154 +0200
@@ -29,11 +29,11 @@
#include <QTranslator>
/*
- * We need Qt version 4.8.4 or later to be able to comple correctly
+ * We need Qt version 4.6.2 or later to be able to comple correctly
*/
-#if QT_VERSION < 0x040804
+#if QT_VERSION < 0x040602
#error "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-#error "You need Qt version 4.8.4 or later to build Bat"
+#error "You need Qt version 4.6.2 or later to build Bat"
#error "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
#endif

View File

@ -22,3 +22,25 @@ diff -Naur bacula-7.4.0.old/src/lib/tls.c bacula-7.4.0/src/lib/tls.c
const X509V3_EXT_METHOD *method;
#else
X509V3_EXT_METHOD *method;
diff -Naur bacula-9.0.0.old/src/lib/tls.c bacula-9.0.0/src/lib/tls.c
--- bacula-9.0.0.old/src/lib/tls.c 2017-07-10 08:52:38.929834490 +0200
+++ bacula-9.0.0/src/lib/tls.c 2017-07-10 10:52:34.032273634 +0200
@@ -45,9 +45,6 @@
#ifdef HAVE_OPENSSL /* How about OpenSSL? */
-/* No anonymous ciphers, no <128 bit ciphers, no export ciphers, no MD5 ciphers */
-#define TLS_DEFAULT_CIPHERS "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
-
/* TLS Context Structure */
struct TLS_Context {
SSL_CTX *openssl;
@@ -207,7 +204,7 @@
SSL_CTX_set_options(ctx->openssl, SSL_OP_SINGLE_DH_USE);
}
- if (SSL_CTX_set_cipher_list(ctx->openssl, TLS_DEFAULT_CIPHERS) != 1) {
+ if (SSL_CTX_set_cipher_list(ctx->openssl, "PROFILE=SYSTEM") != 1) {
Jmsg0(NULL, M_ERROR, 0,
_("Error setting cipher list, no valid ciphers available\n"));
goto err;

View File

@ -1,12 +0,0 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Bacula Bat Console
GenericName=Backup Management Console
Comment=Control your Bacula Server
Exec=/usr/sbin/bat -c /etc/bacula/bat.conf
Icon=bat
Terminal=false
Type=Application
Categories=System;Application;Utility

View File

@ -1,6 +1,9 @@
%global uid 133
%global username bacula
# Temporarily disable tray-monitor due to missing files in the source
#global _with_tray_monitor 1
Name: bacula
Version: 9.0.0
Release: 1%{?dist}
@ -22,7 +25,6 @@ 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
@ -30,7 +32,7 @@ Source17: %{name}-sd.sysconfig
# Image taken from http://www.bacula.org/git/cgit.cgi/bacula/plain/bacula/src/tray-monitor/generic.xpm
Source19: generic.xpm
Patch1: %{name}-7.4.0-openssl.patch
Patch1: %{name}-9.0.0-openssl.patch
Patch2: %{name}-9.0.0-queryfile.patch
Patch3: %{name}-9.0.0-sqlite-priv.patch
Patch4: %{name}-9.0.0-bat-build.patch
@ -62,7 +64,7 @@ BuildRequires: lzo-devel
BuildRequires: mysql-devel
BuildRequires: ncurses-devel
BuildRequires: postgresql-devel
BuildRequires: qt4-devel >= 4.8.4
BuildRequires: qt4-devel >= 4.6.2
BuildRequires: readline-devel
BuildRequires: sqlite-devel
BuildRequires: tcp_wrappers-devel
@ -185,6 +187,7 @@ Requires: bacula-common%{?_isa} = %{version}-%{release}
Requires: bacula-libs%{?_isa} = %{version}-%{release}
Requires: bacula-libs-sql%{?_isa} = %{version}-%{release}
Requires: mt-st
Requires: mtx
# Storage backends merged into core.
Provides: bacula-storage-common = %{version}-%{release}
Obsoletes: bacula-storage-common < 5.2.2-2
@ -269,6 +272,7 @@ based on a client/server architecture.
This package contains the bat version of the bacula management console.
%{?_with_tray_monitor:
%package traymonitor
Summary: Bacula system tray monitor
Requires: bacula-libs%{?_isa} = %{version}-%{release}
@ -281,6 +285,7 @@ based on a client/server architecture.
This package contains the Gnome and KDE compatible tray monitor to monitor your
bacula server.
}
%package devel
Summary: Bacula development files
@ -364,13 +369,16 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
make -C examples/nagios/check_bacula
%{?_with_tray_monitor:
pushd src/qt-console/tray-monitor
%{?qmake_qt4}%{!?qmake_qt4:qmake-qt4} tray-monitor.pro
make %{?_smp_mflags}
cp -f .libs/bacula-tray-monitor .
popd
# Convert image to png for tray monitor icon
convert %{SOURCE19} bacula-tray-monitor.png
}
%install
%make_install
@ -383,15 +391,21 @@ rm -f %{buildroot}%{_libdir}/libbaccats.so
rm -f %{buildroot}%{_libdir}/libbaccats-%{version}.so
# Bat
install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bat.png
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE13}
install -p -m 644 -D src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bat_icon.png
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
--remove-key=Encoding \
--set-key=Categories --set-value="Utility" \
scripts/bat.desktop
%{?_with_tray_monitor:
# QT Tray monitor
install -p -m 755 -D src/qt-console/tray-monitor/bacula-tray-monitor %{buildroot}%{_sbindir}/bacula-tray-monitor
install -p -m 644 -D src/qt-console/tray-monitor/tray-monitor.conf %{buildroot}%{_sysconfdir}/bacula/tray-monitor.conf
install -p -m 644 -D manpages/bacula-tray-monitor.1 %{buildroot}%{_mandir}/man1/bacula-tray-monitor.1
install -p -m 644 -D bacula-tray-monitor.png %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.png
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE14}
}
# Logrotate
mkdir -p %{buildroot}%{_localstatedir}/log/bacula
@ -437,11 +451,9 @@ chmod 755 %{buildroot}%{_libdir}/bacula/*
chmod 755 %{buildroot}%{_libexecdir}/bacula/*
chmod 644 %{buildroot}%{_libexecdir}/bacula/btraceback.*
%post libs
/sbin/ldconfig
%post libs -p /sbin/ldconfig
%postun libs
/sbin/ldconfig
%postun libs -p /sbin/ldconfig
exit 0
%post libs-sql
@ -563,6 +575,7 @@ fi
%{_libdir}/libbac-%{version}.so
%{_libdir}/libbaccfg-%{version}.so
%{_libdir}/libbacfind-%{version}.so
%{_libdir}/libbacsd-%{version}.so
%files libs-sql
%{_libdir}/libbaccats-mysql-%{version}.so
@ -592,6 +605,7 @@ fi
%config(noreplace) %{_sysconfdir}/bacula/bacula-dir.conf %attr(640,root,bacula)
%config(noreplace) %{_sysconfdir}/bacula/query.sql %attr(640,root,bacula)
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-dir
%{_libexecdir}/%{name}/baculabackupreport
%{_libexecdir}/%{name}/create_bacula_database
%{_libexecdir}/%{name}/delete_catalog_backup
%{_libexecdir}/%{name}/drop_bacula_database
@ -624,6 +638,7 @@ fi
%{_mandir}/man8/bwild.8*
%{_mandir}/man8/dbcheck.8*
%{_sbindir}/bacula-dir
%{_sbindir}/bdirjson
%{_sbindir}/bregex
%{_sbindir}/bsmtp
%{_sbindir}/bwild
@ -644,9 +659,9 @@ fi
%config(noreplace) %{_sysconfdir}/bacula/bacula-sd.conf %attr(640,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-sd
%{_libexecdir}/%{name}/disk-changer
%{_libexecdir}/%{name}/dvd-handler
%{_libexecdir}/%{name}/mtx-changer
%{_libexecdir}/%{name}/mtx-changer.conf
%{_libexecdir}/%{name}/tapealert
%{_mandir}/man8/bacula-sd.8*
%{_mandir}/man8/bcopy.8*
%{_mandir}/man8/bextract.8*
@ -658,6 +673,7 @@ fi
%{_sbindir}/bextract
%{_sbindir}/bls
%{_sbindir}/bscan
%{_sbindir}/bsdjson
%{_sbindir}/btape
%if 0%{?fedora} || 0%{?rhel} >= 7
%{_unitdir}/bacula-sd.service
@ -665,13 +681,13 @@ fi
%{_initrddir}/bacula-sd
%endif
%files client
%config(noreplace) %{_sysconfdir}/bacula/bacula-fd.conf %attr(640,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/bacula-fd
%{_mandir}/man8/bacula-fd.8*
%{_libdir}/bacula/bpipe-fd.so
%{_sbindir}/bacula-fd
%{_sbindir}/bfdjson
%if 0%{?fedora} || 0%{?rhel} >= 7
%{_unitdir}/bacula-fd.service
%else
@ -682,28 +698,32 @@ fi
%config(noreplace) %{_sysconfdir}/bacula/bconsole.conf %attr(640,root,root)
%{_mandir}/man8/bconsole.8*
%{_sbindir}/bconsole
%{_sbindir}/bbconsjson
%files console-bat
%config(noreplace) %{_sysconfdir}/bacula/bat.conf %attr(640,root,root)
%{_datadir}/applications/bacula-bat.desktop
%{_datadir}/applications/bat.desktop
%{_datadir}/bacula/*.html
%{_datadir}/bacula/*.png
%{_datadir}/pixmaps/bat.png
%{_datadir}/pixmaps/bat_icon.png
%{_mandir}/man1/bat.1*
%{_sbindir}/bat
%{?_with_tray_monitor:
%files traymonitor
%config(noreplace) %{_sysconfdir}/bacula/tray-monitor.conf %attr(640,root,root)
%{_datadir}/applications/bacula-traymonitor.desktop
%{_datadir}/pixmaps/bacula-tray-monitor.png
%{_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
%files -n nagios-plugins-bacula
@ -712,6 +732,10 @@ fi
%changelog
* Mon Jul 10 2017 Simone Caronni <negativo17@gmail.com> - 9.0.0-1
- Update to 9.0.0, update all patches.
- Add new utitilies.
- Use source files for desktop and icon of bat.
- Temporarily disable tray-monitor build due to missing files in the source.
- Add fixes for rpmlint.
* Wed Apr 05 2017 Simone Caronni <negativo17@gmail.com> - 7.4.7-2
- Remove all RHEL/CentOS 5 compatibility.