From 3c825c184d0f993da336e050d892540f4675fb04 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 10 Jul 2017 09:12:07 +0200 Subject: [PATCH] Update all patches --- bacula-7.4.0-bat-build.patch | 34 ---------- bacula-7.4.0-sqlite-priv.patch | 9 --- bacula-9.0.0-bat-build.patch | 21 ++++++ ....patch => bacula-9.0.0-non-free-code.patch | 64 +++++++++---------- ...file.patch => bacula-9.0.0-queryfile.patch | 24 +++---- ...ault.patch => bacula-9.0.0-seg-fault.patch | 10 +-- bacula-9.0.0-sqlite-priv.patch | 9 +++ bacula.spec | 14 ++-- 8 files changed, 86 insertions(+), 99 deletions(-) delete mode 100644 bacula-7.4.0-bat-build.patch delete mode 100644 bacula-7.4.0-sqlite-priv.patch create mode 100644 bacula-9.0.0-bat-build.patch rename bacula-7.4.5-non-free-code.patch => bacula-9.0.0-non-free-code.patch (91%) rename bacula-7.4.5-queryfile.patch => bacula-9.0.0-queryfile.patch (60%) rename bacula-7.4.0-seg-fault.patch => bacula-9.0.0-seg-fault.patch (59%) create mode 100644 bacula-9.0.0-sqlite-priv.patch diff --git a/bacula-7.4.0-bat-build.patch b/bacula-7.4.0-bat-build.patch deleted file mode 100644 index 0adbb1b..0000000 --- a/bacula-7.4.0-bat-build.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -Naur bacula-7.4.0.old/src/qt-console/bat.pro.in bacula-7.4.0/src/qt-console/bat.pro.in ---- bacula-7.4.0.old/src/qt-console/bat.pro.in 2016-01-25 21:00:14.022670354 +0100 -+++ bacula-7.4.0/src/qt-console/bat.pro.in 2016-01-25 21:04:26.092297488 +0100 -@@ -6,13 +6,13 @@ - # - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # --CONFIG += qt debug @QWT@ -+CONFIG += qt release @QWT@ - - bins.path = /$(DESTDIR)@sbindir@ - bins.files = bat - confs.path = /$(DESTDIR)@sysconfdir@ - confs.commands = ./install_conf_file --help.path = /$(DESTDIR)@docdir@ -+help.path = /$(DESTDIR)@htmldir@ - help.files = help/*.html images/status.png images/mail-message-new.png - - TEMPLATE = app -diff -Naur bacula-7.4.0.old/src/qt-console/main.cpp bacula-7.4.0/src/qt-console/main.cpp ---- bacula-7.4.0.old/src/qt-console/main.cpp 2016-01-25 21:00:14.023670369 +0100 -+++ bacula-7.4.0/src/qt-console/main.cpp 2016-01-25 21:04:26.093297507 +0100 -@@ -31,9 +31,9 @@ - /* - * We need Qt version 4.8.4 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 - diff --git a/bacula-7.4.0-sqlite-priv.patch b/bacula-7.4.0-sqlite-priv.patch deleted file mode 100644 index 628a4d6..0000000 --- a/bacula-7.4.0-sqlite-priv.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -Naur bacula-7.4.0.old/src/cats/make_sqlite3_tables.in bacula-7.4.0/src/cats/make_sqlite3_tables.in ---- bacula-7.4.0.old/src/cats/make_sqlite3_tables.in 2016-01-25 21:00:13.970669543 +0100 -+++ bacula-7.4.0/src/cats/make_sqlite3_tables.in 2016-01-25 21:03:01.266828351 +0100 -@@ -474,4 +474,5 @@ - END-OF-DATA - - chmod 640 ${db_name}.db -+chown bacula:bacula ${db_name}.db - exit 0 diff --git a/bacula-9.0.0-bat-build.patch b/bacula-9.0.0-bat-build.patch new file mode 100644 index 0000000..d9b6b45 --- /dev/null +++ b/bacula-9.0.0-bat-build.patch @@ -0,0 +1,21 @@ +diff -Naur bacula-9.0.0.old/src/qt-console/bat.pro.in bacula-9.0.0/src/qt-console/bat.pro.in +--- bacula-9.0.0.old/src/qt-console/bat.pro.in 2017-07-10 08:52:38.933834565 +0200 ++++ bacula-9.0.0/src/qt-console/bat.pro.in 2017-07-10 08:59:45.545902183 +0200 +@@ -6,7 +6,7 @@ + # + # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + # +-CONFIG += qt debug @QWT@ ++CONFIG += qt release @QWT@ + + datarootdir = @datarootdir@ + +@@ -14,7 +14,7 @@ + bins.files = bat + confs.path = /$(DESTDIR)@sysconfdir@ + confs.commands = ./install_conf_file +-help.path = /$(DESTDIR)@docdir@ ++help.path = /$(DESTDIR)@htmldir@ + help.files = help/*.html images/status.png images/mail-message-new.png + + TEMPLATE = app diff --git a/bacula-7.4.5-non-free-code.patch b/bacula-9.0.0-non-free-code.patch similarity index 91% rename from bacula-7.4.5-non-free-code.patch rename to bacula-9.0.0-non-free-code.patch index dc99623..402a954 100644 --- a/bacula-7.4.5-non-free-code.patch +++ b/bacula-9.0.0-non-free-code.patch @@ -1,7 +1,7 @@ -diff -Naur bacula-7.4.5.old/src/lib/lib.h bacula-7.4.5/src/lib/lib.h ---- bacula-7.4.5.old/src/lib/lib.h 2017-02-07 15:07:45.000000000 +0100 -+++ bacula-7.4.5/src/lib/lib.h 2017-02-08 14:26:11.069966406 +0100 -@@ -50,7 +50,6 @@ +diff -Naur bacula-9.0.0.old/src/lib/lib.h bacula-9.0.0/src/lib/lib.h +--- bacula-9.0.0.old/src/lib/lib.h 2017-07-10 08:52:38.928834471 +0200 ++++ bacula-9.0.0/src/lib/lib.h 2017-07-10 09:06:14.956314468 +0200 +@@ -53,7 +53,6 @@ #include "fnmatch.h" #endif #include "md5.h" @@ -9,28 +9,28 @@ diff -Naur bacula-7.4.5.old/src/lib/lib.h bacula-7.4.5/src/lib/lib.h #include "tree.h" #include "watchdog.h" #include "btimers.h" -diff -Naur bacula-7.4.5.old/src/lib/Makefile.in bacula-7.4.5/src/lib/Makefile.in ---- bacula-7.4.5.old/src/lib/Makefile.in 2017-02-07 15:07:45.000000000 +0100 -+++ bacula-7.4.5/src/lib/Makefile.in 2017-02-08 14:26:11.070966423 +0100 +diff -Naur bacula-9.0.0.old/src/lib/Makefile.in bacula-9.0.0/src/lib/Makefile.in +--- bacula-9.0.0.old/src/lib/Makefile.in 2017-07-10 08:52:38.928834471 +0200 ++++ bacula-9.0.0/src/lib/Makefile.in 2017-07-10 09:06:49.445973039 +0200 @@ -38,7 +38,7 @@ - fnmatch.h guid_to_name.h htable.h lex.h \ - lib.h md5.h mem_pool.h message.h \ - openssl.h plugins.h protos.h queue.h rblist.h \ -- runscript.h rwlock.h serial.h sellist.h sha1.h \ -+ runscript.h rwlock.h serial.h sellist.h \ - smartall.h status.h tls.h tree.h var.h \ - waitq.h watchdog.h workq.h \ - parse_conf.h ini.h \ -@@ -54,7 +54,7 @@ - guid_to_name.c hmac.c jcr.c lex.c alist.c dlist.c \ - md5.c message.c mem_pool.c openssl.c \ - plugins.c priv.c queue.c bregex.c \ -- runscript.c rwlock.c scan.c sellist.c serial.c sha1.c \ -+ runscript.c rwlock.c scan.c sellist.c serial.c \ - signal.c smartall.c rblist.c tls.c tree.c \ - util.c var.c watchdog.c workq.c btimers.c \ - address_conf.c breg.c htable.c lockmgr.c devlock.c -@@ -176,13 +176,6 @@ + flist.h fnmatch.h guid_to_name.h htable.h lex.h \ + lib.h lz4.h md5.h mem_pool.h message.h \ + openssl.h parse_conf.h plugins.h protos.h queue.h rblist.h \ +- runscript.h rwlock.h serial.h sellist.h sha1.h sha2.h \ ++ runscript.h rwlock.h serial.h sellist.h sha2.h \ + smartall.h status.h tls.h tree.h var.h \ + watchdog.h workq.h ini.h \ + lockmgr.h devlock.h output.h bwlimit.h +@@ -52,7 +52,7 @@ + guid_to_name.c hmac.c jcr.c lex.c lz4.c alist.c dlist.c \ + md5.c message.c mem_pool.c openssl.c \ + plugins.c priv.c queue.c bregex.c \ +- runscript.c rwlock.c scan.c sellist.c serial.c sha1.c sha2.c \ ++ runscript.c rwlock.c scan.c sellist.c serial.c sha2.c \ + signal.c smartall.c rblist.c tls.c tree.c \ + util.c var.c watchdog.c workq.c btimers.c \ + worker.c flist.c \ +@@ -218,13 +218,6 @@ $(RMF) md5.o $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c @@ -44,7 +44,7 @@ diff -Naur bacula-7.4.5.old/src/lib/Makefile.in bacula-7.4.5/src/lib/Makefile.in bsnprintf: Makefile bsnprintf.o $(RMF) bsnprintf.o $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c -@@ -232,7 +225,7 @@ +@@ -274,7 +267,7 @@ clean: libtool-clean @$(RMF) core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3 @@ -53,9 +53,9 @@ diff -Naur bacula-7.4.5.old/src/lib/Makefile.in bacula-7.4.5/src/lib/Makefile.in realclean: clean @$(RMF) tags -diff -Naur bacula-7.4.5.old/src/lib/sha1.c bacula-7.4.5/src/lib/sha1.c ---- bacula-7.4.5.old/src/lib/sha1.c 2017-02-07 15:07:45.000000000 +0100 -+++ bacula-7.4.5/src/lib/sha1.c 1970-01-01 01:00:00.000000000 +0100 +diff -Naur bacula-9.0.0.old/src/lib/sha1.c bacula-9.0.0/src/lib/sha1.c +--- bacula-9.0.0.old/src/lib/sha1.c 2017-07-10 08:52:38.929834490 +0200 ++++ bacula-9.0.0/src/lib/sha1.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,510 +0,0 @@ -/* - * sha1.c @@ -567,9 +567,9 @@ diff -Naur bacula-7.4.5.old/src/lib/sha1.c bacula-7.4.5/src/lib/sha1.c - fclose(fd); -} -#endif -diff -Naur bacula-7.4.5.old/src/lib/sha1.h bacula-7.4.5/src/lib/sha1.h ---- bacula-7.4.5.old/src/lib/sha1.h 2017-02-07 15:07:45.000000000 +0100 -+++ bacula-7.4.5/src/lib/sha1.h 1970-01-01 01:00:00.000000000 +0100 +diff -Naur bacula-9.0.0.old/src/lib/sha1.h bacula-9.0.0/src/lib/sha1.h +--- bacula-9.0.0.old/src/lib/sha1.h 2017-07-10 08:52:38.928834471 +0200 ++++ bacula-9.0.0/src/lib/sha1.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,107 +0,0 @@ -/* - * sha1.h diff --git a/bacula-7.4.5-queryfile.patch b/bacula-9.0.0-queryfile.patch similarity index 60% rename from bacula-7.4.5-queryfile.patch rename to bacula-9.0.0-queryfile.patch index e006873..35d89a3 100644 --- a/bacula-7.4.5-queryfile.patch +++ b/bacula-9.0.0-queryfile.patch @@ -1,6 +1,6 @@ -diff -Naur bacula-7.4.5.old/src/dird/bacula-dir.conf.in bacula-7.4.5/src/dird/bacula-dir.conf.in ---- bacula-7.4.5.old/src/dird/bacula-dir.conf.in 2017-02-07 15:07:45.000000000 +0100 -+++ bacula-7.4.5/src/dird/bacula-dir.conf.in 2017-02-08 14:23:08.468849148 +0100 +diff -Naur bacula-9.0.0.old/src/dird/bacula-dir.conf.in bacula-9.0.0/src/dird/bacula-dir.conf.in +--- bacula-9.0.0.old/src/dird/bacula-dir.conf.in 2017-07-10 08:52:38.930834509 +0200 ++++ bacula-9.0.0/src/dird/bacula-dir.conf.in 2017-07-10 08:53:11.189444548 +0200 @@ -18,7 +18,7 @@ Director { # define myself Name = @basename@-dir @@ -10,15 +10,15 @@ diff -Naur bacula-7.4.5.old/src/dird/bacula-dir.conf.in bacula-7.4.5/src/dird/ba WorkingDirectory = "@working_dir@" PidDirectory = "@piddir@" Maximum Concurrent Jobs = 20 -diff -Naur bacula-7.4.5.old/src/dird/Makefile.in bacula-7.4.5/src/dird/Makefile.in ---- bacula-7.4.5.old/src/dird/Makefile.in 2017-02-07 15:07:45.000000000 +0100 -+++ bacula-7.4.5/src/dird/Makefile.in 2017-02-08 14:23:08.469849165 +0100 -@@ -114,11 +114,11 @@ - @if test "x${dir_group}" != "x"; then \ +diff -Naur bacula-9.0.0.old/src/dird/Makefile.in bacula-9.0.0/src/dird/Makefile.in +--- bacula-9.0.0.old/src/dird/Makefile.in 2017-07-10 08:52:38.930834509 +0200 ++++ bacula-9.0.0/src/dird/Makefile.in 2017-07-10 08:54:24.363828341 +0200 +@@ -124,11 +124,11 @@ + @if test "x${dir_group}" != "x" -a "x${DESTDIR}" = "x" ; then \ chgrp -f ${dir_group} ${DESTDIR}${sysconfdir}/$$destconf ; \ fi -- @if test -f ${DESTDIR}${scriptdir}/query.sql; then \ -+ @if test -f ${DESTDIR}${sysconfdir}/query.sql; then \ +- @if test -f ${DESTDIR}${scriptdir}/query.sql; then \ ++ @if test -f ${DESTDIR}${sysconfdir}/query.sql; then \ echo " ==> Saving existing query.sql to query.sql.old"; \ - $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \ + $(MV) -f ${DESTDIR}${sysconfdir}/query.sql ${DESTDIR}${sysconfdir}/query.sql.old; \ @@ -28,9 +28,9 @@ diff -Naur bacula-7.4.5.old/src/dird/Makefile.in bacula-7.4.5/src/dird/Makefile. @if test -f static-bacula-dir; then \ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-dir $(DESTDIR)$(sbindir)/static-bacula-dir; \ fi -@@ -126,7 +126,7 @@ - +@@ -137,7 +137,7 @@ uninstall: + (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir bdirjson) (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new) - (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql) + (cd $(DESTDIR)$(sysconfdir); $(RMF) query.sql) diff --git a/bacula-7.4.0-seg-fault.patch b/bacula-9.0.0-seg-fault.patch similarity index 59% rename from bacula-7.4.0-seg-fault.patch rename to bacula-9.0.0-seg-fault.patch index fe67175..fcf6920 100644 --- a/bacula-7.4.0-seg-fault.patch +++ b/bacula-9.0.0-seg-fault.patch @@ -1,6 +1,6 @@ -diff -Naur bacula-7.4.0.old/src/lib/message.c bacula-7.4.0/src/lib/message.c ---- bacula-7.4.0.old/src/lib/message.c 2016-01-25 21:00:14.018670291 +0100 -+++ bacula-7.4.0/src/lib/message.c 2016-01-25 21:07:08.088325232 +0100 +diff -Naur bacula-9.0.0.old/src/lib/message.c bacula-9.0.0/src/lib/message.c +--- bacula-9.0.0.old/src/lib/message.c 2017-07-10 08:52:38.928834471 +0200 ++++ bacula-9.0.0/src/lib/message.c 2017-07-10 09:04:34.923403834 +0200 @@ -28,6 +28,7 @@ * */ @@ -9,9 +9,9 @@ diff -Naur bacula-7.4.0.old/src/lib/message.c bacula-7.4.0/src/lib/message.c #include "bacula.h" #include "jcr.h" -@@ -1329,7 +1330,8 @@ +@@ -1367,7 +1368,8 @@ + if (type == M_ABORT) { - assert_msg = bstrdup(buf); char *p = 0; - p[0] = 0; /* generate segmentation violation */ + // p[0] = 0; /* generate segmentation violation */ diff --git a/bacula-9.0.0-sqlite-priv.patch b/bacula-9.0.0-sqlite-priv.patch new file mode 100644 index 0000000..e679b1c --- /dev/null +++ b/bacula-9.0.0-sqlite-priv.patch @@ -0,0 +1,9 @@ +diff -Naur bacula-9.0.0.old/src/cats/make_sqlite3_tables.in bacula-9.0.0/src/cats/make_sqlite3_tables.in +--- bacula-9.0.0.old/src/cats/make_sqlite3_tables.in 2017-07-10 08:52:38.923834376 +0200 ++++ bacula-9.0.0/src/cats/make_sqlite3_tables.in 2017-07-10 08:57:57.447857952 +0200 +@@ -480,4 +480,5 @@ + END-OF-DATA + + chmod 640 ${db_name}.db ++chown bacula:bacula ${db_name}.db + exit 0 diff --git a/bacula.spec b/bacula.spec index 5a10076..492d517 100644 --- a/bacula.spec +++ b/bacula.spec @@ -31,12 +31,12 @@ Source17: %{name}-sd.sysconfig Source19: generic.xpm Patch1: %{name}-7.4.0-openssl.patch -Patch2: %{name}-7.4.5-queryfile.patch -Patch3: %{name}-7.4.0-sqlite-priv.patch -Patch4: %{name}-7.4.0-bat-build.patch -Patch5: %{name}-7.4.0-seg-fault.patch +Patch2: %{name}-9.0.0-queryfile.patch +Patch3: %{name}-9.0.0-sqlite-priv.patch +Patch4: %{name}-9.0.0-bat-build.patch +Patch5: %{name}-9.0.0-seg-fault.patch Patch6: %{name}-5.2.13-logwatch.patch -Patch7: %{name}-7.4.5-non-free-code.patch +Patch7: %{name}-9.0.0-non-free-code.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 @@ -62,7 +62,7 @@ BuildRequires: lzo-devel BuildRequires: mysql-devel BuildRequires: ncurses-devel BuildRequires: postgresql-devel -BuildRequires: qt4-devel >= 4.6.2 +BuildRequires: qt4-devel >= 4.8.4 BuildRequires: readline-devel BuildRequires: sqlite-devel BuildRequires: tcp_wrappers-devel @@ -711,7 +711,7 @@ fi %changelog * Mon Jul 10 2017 Simone Caronni - 9.0.0-1 -- Update to 9.0.0. +- Update to 9.0.0, update all patches. * Wed Apr 05 2017 Simone Caronni - 7.4.7-2 - Remove all RHEL/CentOS 5 compatibility.