From b7ec8d71794d880affbcb8b8925cdcacc0757a4c Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Jan 29 2018 12:22:13 +0000 Subject: Fix tray monitor build on RHEL/CentOS 7 --- diff --git a/bacula-9.0.6-tray-monitor-task.patch b/bacula-9.0.6-tray-monitor-task.patch new file mode 100644 index 0000000..8eaf9c0 --- /dev/null +++ b/bacula-9.0.6-tray-monitor-task.patch @@ -0,0 +1,33 @@ +--- bacula-9.0.6.old/src/qt-console/tray-monitor/task.cpp 2018-01-28 15:19:14.055587280 -0600 ++++ bacula-9.0.6/src/qt-console/tray-monitor/task.cpp 2018-01-28 15:18:55.151599308 -0600 +@@ -992,15 +992,15 @@ + } + + /* cache the file set */ +- res->bs->fsend(".bvfs_update jobid=%s\n", jobs.toUtf8()); ++ res->bs->fsend(".bvfs_update jobid=%s\n", bstrdup(jobs.toUtf8()) ); + while (get_next_line(res)) { + Dmsg2(dbglvl, "<- %d %s\n", res->bs->msglen, curline); + } + + if (pathid == 0) { +- res->bs->fsend(".bvfs_lsdirs jobid=%s path=\"\"\n", jobs.toUtf8()); ++ res->bs->fsend(".bvfs_lsdirs jobid=%s path=\"\"\n", bstrdup(jobs.toUtf8())); + } else { +- res->bs->fsend(".bvfs_lsdirs jobid=%s pathid=%lld\n", jobs.toUtf8(), pathid); ++ res->bs->fsend(".bvfs_lsdirs jobid=%s pathid=%lld\n", bstrdup(jobs.toUtf8()), pathid); + } + + while (get_next_line(res)) { +@@ -1024,9 +1024,9 @@ + + /* then, request files */ + if (pathid == 0) { +- res->bs->fsend(".bvfs_lsfiles jobid=%s path=\"\"\n", jobs.toUtf8()); ++ res->bs->fsend(".bvfs_lsfiles jobid=%s path=\"\"\n", bstrdup(jobs.toUtf8())); + } else { +- res->bs->fsend(".bvfs_lsfiles jobid=%s pathid=%lld\n", jobs.toUtf8(), pathid); ++ res->bs->fsend(".bvfs_lsfiles jobid=%s pathid=%lld\n", bstrdup(jobs.toUtf8()), pathid); + } + + while (get_next_line(res)) { diff --git a/bacula.spec b/bacula.spec index f711ed2..b081924 100644 --- a/bacula.spec +++ b/bacula.spec @@ -3,7 +3,7 @@ Name: bacula Version: 9.0.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Cross platform network backup for Linux, Unix, Mac and Windows # See LICENSE for details License: AGPLv3 with exceptions @@ -37,6 +37,8 @@ Patch6: %{name}-5.2.13-logwatch.patch Patch7: %{name}-9.0.0-non-free-code.patch # desktop-file-install not supported on RHEL 6 Patch8: %{name}-9.0.2-desktop.patch +# http://bugs.bacula.org/view.php?id=2354 +Patch9: %{name}-9.0.6-tray-monitor-task.patch # 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 @@ -320,6 +322,7 @@ Provides check_bacula support for Nagios. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %patch10 -p1 cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} . @@ -727,6 +730,9 @@ fi %{_libdir}/nagios/plugins/check_bacula %changelog +* Mon Jan 29 2018 Simone Caronni - 9.0.6-4 +- Fix tray monitor build on RHEL/CentOS 7. + * Wed Dec 20 2017 Simone Caronni - 9.0.6-3 - Add missing condition for TCP wrappers build.