]> TLD Linux GIT Repositories - packages/bacula.git/commitdiff
- updated to 13.0.3, partial PLD merge to keep spec in sync
authorMarcin Krol <hawk@tld-linux.org>
Tue, 18 Jul 2023 14:06:13 +0000 (16:06 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 18 Jul 2023 14:06:13 +0000 (16:06 +0200)
bacula-libtool.patch
bacula.spec
libs3-curl.patch [new file with mode: 0644]
make_catalog_backup-setup-home.patch
x32.patch [new file with mode: 0644]

index 74c1a092259affb4cfc41eea8860bbfb1f3635bd..b5f4ff259c81ca7e57d7646921ce837b6d0ded7e 100644 (file)
@@ -1,7 +1,7 @@
-diff -ur bacula-7.2.0.orig/autoconf/configure.in bacula-7.2.0/autoconf/configure.in
---- bacula-7.2.0.orig/autoconf/configure.in    2015-10-26 09:16:01.000000000 +0000
-+++ bacula-7.2.0/autoconf/configure.in 2015-10-26 09:16:46.903083332 +0000
-@@ -16,7 +16,7 @@
+diff -urNp -x '*.orig' bacula-13.0.3.org/autoconf/configure.in bacula-13.0.3/autoconf/configure.in
+--- bacula-13.0.3.org/autoconf/configure.in    2023-07-17 10:50:33.378003560 +0200
++++ bacula-13.0.3/autoconf/configure.in        2023-07-17 10:50:33.571006302 +0200
+@@ -16,7 +16,7 @@ TOP_DIR=`pwd`
  cd ${BUILD_DIR}
  AC_SUBST(BUILD_DIR)
  AC_SUBST(TOP_DIR)
@@ -9,4 +9,4 @@ diff -ur bacula-7.2.0.orig/autoconf/configure.in bacula-7.2.0/autoconf/configure
 +AC_CONFIG_AUX_DIR(autoconf)
  AC_CONFIG_HEADERS(src/config.h:autoconf/config.h.in)
  
- dnl search for true and false programs.
+ dnl minimal Win32 stuff for "make clean"
index 92bfd3fa55699c78d80d7a519da2513738d4854d..cffb6ea7e4631a10cc8146f43a7dd5b82912c569 100644 (file)
@@ -1,28 +1,35 @@
-# TODO:
+## TODO:
+#      - fix libtoolize
+#      - update desktop files, think about su-wrappers for console (with .desktop files)
 #      - fix log file permissions
 #
 # Conditional build:
-%bcond_without bat                     # bat Qt4 GUI
+%bcond_without qt                      # BAT / qt-console Qt5 GUI
 %bcond_without mysql                   # use MySQL
 %bcond_without pgsql                   # use PostgreSQL
 %bcond_without sqlite3                 # use SQLite3
-%bcond_without nagios          # build nagios plugin
+%bcond_without nagios                  # build nagios plugin
+%bcond_with    s3                      # Amazon S3 cloud backend
 %bcond_with    sqlite3_sync_off        # makes SQLite3 backend much faster, but less reliable
 
 %if %{without sqlite3}
 %undefine       with_sqlite3_sync_off
 %endif
 
-%define        qtver   4.6.2
+# Bacula requires this specific, custom version
+%define                libs3_version   20200523
+
 Summary:       Bacula - The Network Backup Solution
 Summary(pl.UTF-8):     Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
 Name:          bacula
-Version:       13.0.2
+Version:       13.0.3
 Release:       1
 License:       AGPL v3
 Group:         Networking/Utilities
 Source0:       http://downloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
-# Source0-md5: 6823bd785c59ff0d25d8cdff3751ca58
+# Source0-md5: e686d4f1864c8c3e5c4ccb48a50db9a7
+Source1:       https://www.bacula.org/downloads/libs3-%{libs3_version}.tar.gz
+# Source1-md5: ca97bc4133a21981139181ec8571f202
 Source10:      %{name}-dir.init
 Source11:      %{name}-fd.init
 Source12:      %{name}-sd.init
@@ -36,31 +43,37 @@ Patch2:             %{name}-conf.patch
 Patch3:                %{name}-desktop.patch
 Patch4:                make_catalog_backup-setup-home.patch
 Patch5:                %{name}-libtool.patch
+Patch6:                %{name}-no_lockmgr.patch
+Patch7:                x32.patch
+Patch8:                libs3-curl.patch
 URL:           http://www.bacula.org/
 BuildRequires: acl-devel
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.61
 BuildRequires: automake
-BuildRequires: gettext-devel
+%{?with_s3:BuildRequires:      curl-devel}
+BuildRequires: gettext-tools
 BuildRequires: libcap-devel
 BuildRequires: libtool >= 2:2.2
 BuildRequires: libwrap-devel
+%{?with_s3:BuildRequires:      libxml2-devel}
 BuildRequires: ncurses-devel
 BuildRequires: openssl-devel
 BuildRequires: pkgconfig
-BuildRequires: python-devel
-BuildRequires: python-modules
-%if %{with bat}
-BuildRequires: QtCore-devel
-BuildRequires: QtGui-devel
-BuildRequires: qt4-build >= %{qtver}
-BuildRequires: qt4-qmake >= %{qtver}
+BuildRequires: python3
+BuildRequires: python3-modules
+%if %{with qt}
+BuildRequires: Qt5Core-devel
+BuildRequires: Qt5Gui-devel
+BuildRequires: Qt5Widgets-devel
+BuildRequires: qt5-build
+BuildRequires: qt5-qmake
 %endif
 %{?with_mysql:BuildRequires:   mysql-devel}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: readline-devel
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.644
 BuildRequires: sed >= 4.0
 %{?with_sqlite3:BuildRequires: sqlite3-devel}
 BuildRequires: which
@@ -71,6 +84,9 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _localstatedir  /var/lib/%{name}
 %define                nagiosplugindir %{_libdir}/nagios/plugins
 
+# db packages contain duplicates
+%define                _duplicate_files_terminate_build        0
+
 # from 'the worst' to 'the best'
 %define        databases %{?with_sqlite3:sqlite3} %{?with_mysql:mysql} %{?with_pgsql:postgresql}
 
@@ -148,7 +164,7 @@ Summary(pl.UTF-8):  Usługi Bacula Director i Catalog
 Group:         Networking/Utilities
 Requires(post):        sed >= 4.0
 Requires:      %{name}-common = %{version}-%{release}
-Requires:      bacula(db) = %{version}-%{release}
+Requires:      bacula-db = %{version}-%{release}
 Obsoletes:     bacula-updatedb
 
 %description dir
@@ -200,49 +216,42 @@ Bacula Console to program umożliwiający administratorowi lub
 użytkownikowi komunikowanie się z programem Bacula Director. To jest
 interfejs czysto tekstowy.
 
-%package console-wx
-Summary:       Bacula wxWidgets Console
-Summary(pl.UTF-8):     Konsola Baculi oparta na wxWidgets
+%package console-qt
+Summary:       bat – The Bacula Administration Tool
+Summary(pl.UTF-8):     bat – narzędzie administratora Baculi
 Group:         Networking/Utilities
 Requires(post):        sed >= 4.0
 Requires:      %{name}-common = %{version}-%{release}
+Requires:      Qt5Core
 
-%description console-wx
+%description console-qt
 Bacula - It comes by night and sucks the vital essence from your
 computers.
 
-Bacula Console is the program that allows the administrator or user to
-communicate with the Bacula Director. This is the wxWidgets GUI
-interface.
+bat is short for Bacula Administration Tool. It is a GUI form of
+bconsole, but with many additional features.
 
-%description console-wx -l pl.UTF-8
+%description console-qt -l pl.UTF-8
 Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
 
-Bacula Console to program umożliwiający administratorowi lub
-użytkownikowi komunikowanie się z programem Bacula Director. To jest
-interfejs graficzny oparty na wxWidgets.
+bat, czyli Bacula Administration Tool, jest graficznym odpowiednikiem
+bconsole, z wieloma dodatkowymi funkcjami.
 
-%package console-qt4
-Summary:       Bacula Qt4 Console
-Summary(pl.UTF-8):     Konsola Baculi oparta na Qt4
+%package tray-monitor
+Summary:       Bacula Tray Monitor
 Group:         Networking/Utilities
 Requires(post):        sed >= 4.0
 Requires:      %{name}-common = %{version}-%{release}
-Requires:      QtCore >= %{qtver}
 
-%description console-qt4
+%description tray-monitor
 Bacula - It comes by night and sucks the vital essence from your
 computers.
 
-Bacula Console is the program that allows the administrator or user to
-communicate with the Bacula Director. This is the Qt4 GUI interface.
-
-%description console-qt4 -l pl.UTF-8
-Bacula - przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
-
-Bacula Console to program umożliwiający administratorowi lub
-użytkownikowi komunikowanie się z programem Bacula Director. To jest
-interfejs graficzny oparty na Qt4.
+The Monitor program is typically an icon in the system tray. However,
+once the icon is expanded into a full window, the administrator or
+user can obtain status information about the Director or the backup
+status on the local workstation or any other Bacula daemon that is
+configured.
 
 %package fd
 Summary:       Bacula File services (Client)
@@ -285,6 +294,7 @@ Summary(pl.UTF-8):  Usługi Bacula Storage
 Group:         Networking/Utilities
 Requires(post):        sed >= 4.0
 Requires:      %{name}-common = %{version}-%{release}
+Suggests:      mtx
 Conflicts:     dvd+rw-tools <= 5.21.4.10.8-1
 
 %description sd
@@ -315,8 +325,8 @@ Summary(pl.UTF-8):  Sterownik bazy PostgreSQL dla Baculi
 Group:         Networking/Utilities
 Requires(post):        /sbin/ldconfig
 Requires:      %{name}-common = %{version}-%{release}
-Provides:      bacula(db) = %{version}-%{release}
-Obsoletes:     bacula(db)
+Provides:      bacula-db = %{version}-%{release}
+Obsoletes:     bacula-db
 
 %description db-postgresql
 PostgreSQL database driver for Bacula.
@@ -330,8 +340,8 @@ Summary(pl.UTF-8):  Sterownik bazy MySQL dla Baculi
 Group:         Networking/Utilities
 Requires(post):        /sbin/ldconfig
 Requires:      %{name}-common = %{version}-%{release}
-Provides:      bacula(db) = %{version}-%{release}
-Obsoletes:     bacula(db)
+Provides:      bacula-db = %{version}-%{release}
+Obsoletes:     bacula-db
 
 %description db-mysql
 MySQL database driver for Bacula.
@@ -345,8 +355,8 @@ Summary(pl.UTF-8):  Sterownik bazy SQLite dla Baculi
 Group:         Networking/Utilities
 Requires(post):        /sbin/ldconfig
 Requires:      %{name}-common = %{version}-%{release}
-Provides:      bacula(db) = %{version}-%{release}
-Obsoletes:     bacula(db)
+Provides:      bacula-db = %{version}-%{release}
+Obsoletes:     bacula-db
 
 %description db-sqlite3
 SQLite database driver for Bacula.
@@ -362,17 +372,26 @@ Requires: nagios-common
 %description -n nagios-plugin-check_bacula
 Nagios plugin to check bacula.
 
-# provided by various db libraries as a symlink
 %define        _noautoreq      libbaccats-%{version}.so
+# provided by various db libraries as a symlink
 
 %prep
-%setup -q
+%setup -q -a 1
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%ifarch x32
+%patch7 -p1
+%endif
+%if %{with s3}
+cd libs3-%{libs3_version}
+%patch8 -p1
+cd ..
+%endif
 
 sed -i -e 's#bindir=.*#bindir=%{_bindir}#g' \
        src/cats/create_* src/cats/delete_* src/cats/drop_* \
@@ -382,20 +401,28 @@ sed -i -e 's/@basename@/--hostname--/' src/*/*.conf.in
 
 %build
 cd autoconf
-%{__aclocal} -I bacula-macros -I gettext-macros
-%{__libtoolize}
-mv autoconf/* .
-rmdir autoconf
+%{__aclocal} -I bacula-macros -I gettext-macros -I libtool
+## $BUILD_DIR not seen by libtoolize, export it
+#BUILD_DIR=.. %%{__libtoolize}
 cd ..
 %{__autoconf} --prepend-include=$(pwd)/autoconf autoconf/configure.in > configure
 
+%if %{with s3}
+cd libs3-%{libs3_version}
+CFLAGS="%{rpmcflags} -Wno-stringop-overflow" make VERBOSE=1 build/lib/libs3.a
+ln -s ../inc build/include
+cd ..
+%endif
+
 CPPFLAGS="-I/usr/include/ncurses -I%{_includedir}/readline"
+CXXFLAGS="%{rpmcxxflags} -Wno-narrowing"
+CFLAGS="%{rpmcflags} -Wno-narrowing"
 
-WXCONFIG=%{_bindir}/wx-gtk2-unicode-config \
-QMAKE=%{_bindir}/qt4-qmake \
+BUILD_DIR=$(pwd) \
+QMAKE=%{_bindir}/qmake-qt5 \
 %configure \
        --with-scriptdir=%{_libexecdir}/%{name} \
-       %{?with_bat:--enable-bat} \
+       %{?with_qt:--enable-bat} \
        --disable-conio \
        --enable-smartalloc \
        --with-readline \
@@ -407,12 +434,13 @@ QMAKE=%{_bindir}/qt4-qmake \
        --with-logdir=/var/log/bacula \
        --with-pid-dir=/var/run \
        --with-subsys-dir=/var/lock/subsys \
-       --with-systemd=/lib/systemd/system \
        --enable-batch-insert \
        %{?with_pgsql:--with-postgresql} \
        %{?with_mysql:--with-mysql} \
        %{?with_sqlite3:--with-sqlite3} \
        %{?with_sqlite3_sync_off:--enable-extra-sqlite3-init="pragma synchronous=0;"} \
+       %{!?with_s3:--without-s3} \
+       %{?with_s3:--with-s3=$PWD/libs3-%{libs3_version}/build} \
        --with-dir-password="#FAKE-dir-password#" \
        --with-fd-password="#FAKE-fd-password#" \
        --with-sd-password="#FAKE-sd-password#" \
@@ -421,15 +449,19 @@ QMAKE=%{_bindir}/qt4-qmake \
        --with-mon-sd-password="#FAKE-mon-sd-password#" \
        --with-openssl
 
-%if %{with bat}
+%if %{with qt}
 cd src/qt-console
-qmake-qt4 bat.pro
+qmake-qt5 bat.pro
 cd ../..
 %endif
 
-%{__make} 2>&1 | tee log
+%{__make} \
+       %{?with_s3:S3_LIBS="$PWD/libs3-%{libs3_version}/build/lib/libs3.a $(pkg-config --libs libcurl libxml-2.0)"} \
+       2>&1 | tee log
 # check for build errors
 grep "Error in" log && exit 1
+# without this build fails with RPM_EC=1 on rpm.org RPM
+echo "OK"
 
 %if %{with nagios}
 # nagios plugin
@@ -438,20 +470,29 @@ grep "Error in" log && exit 1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig}
-install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_mandir},%{_bindir},/var/log/bacula}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,pam.d,sysconfig} \
+               $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
+               $RPM_BUILD_ROOT{%{_mandir},%{_bindir},/var/log{,/archive}/bacula}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__make} -C src/stored install-aligned \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%if %{with s3}
+%{__make} -C src/stored install-cloud \
+       DESTDIR=$RPM_BUILD_ROOT
+%endif
+
 # create copies of make_catalog_backup for specific databases; zeore default one (will be ghost)
 for database in %{databases}; do
        sed -e "s#default_db_type=.*#default_db_type=${database}#g" \
-               $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup \
-               > $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
-               chmod 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/make_${database}_catalog_backup
+               $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup \
+               > $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_${database}_catalog_backup
+               chmod 755 $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_${database}_catalog_backup
 done
-:> $RPM_BUILD_ROOT%{_libdir}/%{name}/make_catalog_backup
+:> $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup
 
 # we use db dependant (at compile time) shell script only
 rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/make_catalog_backup.pl
@@ -468,7 +509,7 @@ cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/bacula-dir
 cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/bacula-fd
 cp -a %{SOURCE16} $RPM_BUILD_ROOT/etc/sysconfig/bacula-sd
 
-%if %{with bat}
+%if %{with qt}
 # qmake somewhy does not always create install_bins target. install our own the bin
 rm -f $RPM_BUILD_ROOT%{_sbindir}/bat
 libtool --silent --mode=install install src/qt-console/bat $RPM_BUILD_ROOT%{_bindir}
@@ -478,6 +519,12 @@ cp -a scripts/bat.desktop $RPM_BUILD_ROOT%{_desktopdir}
 
 touch $RPM_BUILD_ROOT/var/log/bacula/log
 
+# install the updatedb scripts for older versions that last full release
+# 2.0 -> 3.0 : 10_to_11
+# 5.0 -> 5.2 : 12_to_14
+install -p updatedb/update_*_tables_10_to_11 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+install -p updatedb/update_*_tables_11_to_12 $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+
 # place for site passwords
 touch $RPM_BUILD_ROOT%{_sysconfdir}/{dir-password,fd-password,sd-password}
 touch $RPM_BUILD_ROOT%{_sysconfdir}/{mon-dir-password,mon-fd-password,mon-sd-password}
@@ -486,7 +533,6 @@ mv $RPM_BUILD_ROOT%{_libexecdir}/%{name}/mtx-changer.conf $RPM_BUILD_ROOT%{_sysc
 
 # some file changes
 rm -f $RPM_BUILD_ROOT%{_libexecdir}/%{name}/{gconsole,startmysql,stopmysql,bacula,bconsole,fd}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/.pw.sed
 
 rm $RPM_BUILD_ROOT%{_docdir}/bacula/ChangeLog
 rm $RPM_BUILD_ROOT%{_docdir}/bacula/INSTALL
@@ -507,7 +553,11 @@ mv $RPM_BUILD_ROOT%{_sbindir}/{,bacula-}dbcheck
 mv $RPM_BUILD_ROOT%{_mandir}/man8/{,bacula-}dbcheck.8.gz
 
 # no -devel files packaged, so this is also useless
-rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,sql}.{so,la}
+rm $RPM_BUILD_ROOT%{_libdir}/libbac{,cfg,find,sql,cats,sd}.{so,la}
+rm $RPM_BUILD_ROOT%{_libdir}/bacula-sd-*-driver.so
+%{?with_mysql:rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-mysql.{la,so}}
+%{?with_pgsql:rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-postgresql.{la,so}}
+%{?with_sqlite3:rm $RPM_BUILD_ROOT%{_libdir}/libbaccats-sqlite3.{la,so}}
 
 %if %{with nagios}
 install -d $RPM_BUILD_ROOT%{nagiosplugindir}
@@ -604,13 +654,13 @@ fi
 %post console
 %update_configs
 
-%post console-wx
-%update_configs
-
 %triggerpostun common -- %{name}-common < 5.0.1-2
 find %{_sysconfdir}/bat.conf* -perm /007 -print0 2>/dev/null | xargs -0 -r chmod 600 || :
 
-%post console-qt4
+%post console-qt
+%update_configs
+
+%post tray-monitor
 %update_configs
 
 %define db_post() \
@@ -649,8 +699,8 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %attr(755,root,root) %{_sbindir}/btraceback
 %attr(755,root,root) %{_libdir}/libbac-13*.so
 %attr(755,root,root) %{_libdir}/libbaccfg-13*.so
-%attr(755,root,root) %{_libdir}/libbacfind-13*.so
 %attr(755,root,root) %{_libdir}/libbacsd-13*.so
+%attr(755,root,root) %{_libdir}/libbacfind-13*.so
 %attr(755,root,root) %{_libdir}/libbacsql-13*.so
 %{_mandir}/man8/bacula.8*
 %{_mandir}/man1/bsmtp.1*
@@ -659,17 +709,16 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %{_libexecdir}/%{name}/btraceback.dbx
 %{_libexecdir}/%{name}/btraceback.gdb
 %{_libexecdir}/%{name}/bacula_config
-%attr(755,root,root) %{_libexecdir}/%{name}/baculabackupreport
 %attr(770,root,bacula) %dir %{_localstatedir}
 %attr(750,bacula,logs) %dir /var/log/bacula
 %attr(640,bacula,logs) %ghost /var/log/bacula/log
+%attr(750,bacula,logs) %dir /var/log/archive/bacula
 
 %files dir
 %defattr(644,root,root,755)
 %doc ChangeLog ReleaseNotes LICENSE
 #%doc examples %{name}-docs-%{version}/manual/{*.pdf,bacula}
 %attr(640,root,bacula) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula-dir.conf
-%ghost %{_sysconfdir}/.pw.sed
 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/bacula-dir
 %attr(754,root,root) /etc/rc.d/init.d/bacula-dir
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bacula-dir
@@ -685,6 +734,7 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %{_libexecdir}/%{name}/query.sql
 %attr(755,root,root) %{_libexecdir}/%{name}/delete_catalog_backup
 
+%if %{with pgsql}
 %files db-postgresql
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libexecdir}/%{name}/create_postgresql_database
@@ -704,7 +754,9 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %ghost %{_libexecdir}/%{name}/make_bacula_tables
 %ghost %{_libexecdir}/%{name}/update_bacula_tables
 %ghost %{_libexecdir}/%{name}/make_catalog_backup
+%endif
 
+%if %{with mysql}
 %files db-mysql
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libexecdir}/%{name}/create_mysql_database
@@ -724,7 +776,9 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %ghost %{_libexecdir}/%{name}/make_bacula_tables
 %ghost %{_libexecdir}/%{name}/update_bacula_tables
 %ghost %{_libexecdir}/%{name}/make_catalog_backup
+%endif
 
+%if %{with sqlite3}
 %files db-sqlite3
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libexecdir}/%{name}/create_sqlite3_database
@@ -744,6 +798,7 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %ghost %{_libexecdir}/%{name}/make_bacula_tables
 %ghost %{_libexecdir}/%{name}/update_bacula_tables
 %ghost %{_libexecdir}/%{name}/make_catalog_backup
+%endif
 
 %files fd
 %defattr(644,root,root,755)
@@ -770,10 +825,17 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %attr(755,root,root) %{_sbindir}/bscan
 %attr(755,root,root) %{_sbindir}/bsdjson
 %attr(755,root,root) %{_sbindir}/btape
+%attr(755,root,root) %{_libexecdir}/%{name}/baculabackupreport
+%attr(755,root,root) %{_libexecdir}/%{name}/bacula-tray-monitor.desktop
 %attr(755,root,root) %{_libexecdir}/%{name}/disk-changer
 %attr(755,root,root) %{_libexecdir}/%{name}/isworm
 %attr(755,root,root) %{_libexecdir}/%{name}/mtx-changer
 %attr(755,root,root) %{_libexecdir}/%{name}/tapealert
+%attr(755,root,root) %{_libdir}/bacula-sd-aligned-driver-13.*.so
+%if %{with s3}
+%attr(755,root,root) %{_libdir}/bacula-sd-cloud-driver-13.*.so
+%endif
+
 %{_mandir}/man8/bacula-sd.8*
 %{_mandir}/man8/bcopy.8*
 %{_mandir}/man8/bextract.8*
@@ -789,8 +851,8 @@ ln -sf libbaccats-%{1}-%{version}.so %{_libdir}/libbaccats-%{version}.so || : \
 %attr(755,root,root) %{_sbindir}/bbconsjson
 %{_mandir}/man8/bconsole.8*
 
-%if %{with bat}
-%files console-qt4
+%if %{with qt}
+%files console-qt
 %defattr(644,root,root,755)
 %doc LICENSE
 %{_pixmapsdir}/%{name}.png
diff --git a/libs3-curl.patch b/libs3-curl.patch
new file mode 100644 (file)
index 0000000..8c4d425
--- /dev/null
@@ -0,0 +1,15 @@
+diff -ur libs3-20200523/src/request.c libs3-20200523/src/request.c
+--- libs3-20200523/src/request.c       2020-05-23 16:23:54.000000000 +0000
++++ libs3-20200523/src/request.c       2022-04-03 11:36:49.802020806 +0000
+@@ -1744,11 +1744,6 @@
+ #if LIBCURL_VERSION_NUM >= 0x073E00 /* 7.62.0 */
+     case CURLE_PEER_FAILED_VERIFICATION:
+ #else
+-    #if LIBCURL_VERSION_NUM >= 0x071101 /* 7.17.1 */
+-        case CURLE_PEER_FAILED_VERIFICATION:
+-    #else
+-        case CURLE_SSL_PEER_CERTIFICATE:
+-    #endif
+     case CURLE_SSL_CACERT:
+ #endif
+         return S3StatusServerFailedVerification;
index e5e63d1541dc4f50d369fcc68be9da0d296d2104..ef50dd26742e465ebdf86cc6755bb684a64c66f3 100644 (file)
@@ -1,6 +1,6 @@
-diff -ur bacula-7.2.0.orig/src/cats/make_catalog_backup.in bacula-7.2.0/src/cats/make_catalog_backup.in
---- bacula-7.2.0.orig/src/cats/make_catalog_backup.in  2015-08-13 13:52:24.000000000 +0000
-+++ bacula-7.2.0/src/cats/make_catalog_backup.in       2015-10-26 07:24:30.002083332 +0000
+diff -urNp -x '*.orig' bacula-13.0.3.org/src/cats/make_catalog_backup.in bacula-13.0.3/src/cats/make_catalog_backup.in
+--- bacula-13.0.3.org/src/cats/make_catalog_backup.in  2023-05-02 11:50:49.000000000 +0200
++++ bacula-13.0.3/src/cats/make_catalog_backup.in      2023-07-17 10:50:16.131758558 +0200
 @@ -16,12 +16,15 @@
  #     line arguments and the environment using ps.  Please consult your
  #     MySQL or PostgreSQL manual for secure methods of specifying the
@@ -15,5 +15,5 @@ diff -ur bacula-7.2.0.orig/src/cats/make_catalog_backup.in bacula-7.2.0/src/cats
 +HOME=@working_dir@
 +
  default_db_type=@DEFAULT_DB_TYPE@
+ user=${2:-@db_user@}
  
- #
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..1383aa5
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,529 @@
+diff -ur bacula-11.0.6.orig/autoconf/bacula-macros/db.m4 bacula-11.0.6/autoconf/bacula-macros/db.m4
+--- bacula-11.0.6.orig/autoconf/bacula-macros/db.m4    2022-04-03 11:32:50.796476244 +0000
++++ bacula-11.0.6/autoconf/bacula-macros/db.m4 2022-04-03 11:33:40.061588489 +0000
+@@ -12,24 +12,24 @@
+      if test "$withval" = "yes"; then
+         if test -f /usr/local/include/dbi/dbi.h; then
+            DBI_INCDIR=/usr/local/dbi/include
+-           if test -d /usr/local/lib64; then
+-              DBI_LIBDIR=/usr/local/lib64
++           if test -d /usr/local/libx32; then
++              DBI_LIBDIR=/usr/local/libx32
+            else
+               DBI_LIBDIR=/usr/local/lib
+            fi
+            DBI_BINDIR=/usr/local/bin
+         elif test -f /usr/include/dbi/dbi.h; then
+            DBI_INCDIR=/usr/include
+-           if test -d /usr/lib64; then
+-              DBI_LIBDIR=/usr/lib64
++           if test -d /usr/libx32; then
++              DBI_LIBDIR=/usr/libx32
+            else
+               DBI_LIBDIR=/usr/lib
+            fi
+            DBI_BINDIR=/usr/bin
+         elif test -f $prefix/include/dbi/dbi.h; then
+            DBI_INCDIR=$prefix/include
+-           if test -d $prefix/lib64; then
+-              DBI_LIBDIR=$prefix/lib64
++           if test -d $prefix/libx32; then
++              DBI_LIBDIR=$prefix/libx32
+            else
+               DBI_LIBDIR=$prefix/lib
+            fi
+@@ -40,30 +40,30 @@
+         fi
+         if test -d /usr/local/lib/dbd; then
+            DRIVERDIR=/usr/local/lib/dbd
+-           if test -d /usr/local/lib64/dbd; then
+-              DRIVERDIR=/usr/local/lib64/dbd
++           if test -d /usr/local/libx32/dbd; then
++              DRIVERDIR=/usr/local/libx32/dbd
+            else
+               DRIVERDIR=/usr/local/lib/dbd
+            fi
+         elif test -d /usr/lib/dbd; then
+            DRIVERDIR=/usr/lib/dbd
+-           if test -d /usr/lib64/dbd; then
+-              DRIVERDIR=/usr/lib64/dbd
++           if test -d /usr/libx32/dbd; then
++              DRIVERDIR=/usr/libx32/dbd
+            else
+               DRIVERDIR=/usr/lib/dbd
+            fi
+         elif test -d $prefix/lib/dbd; then
+-           if test -d $prefix/lib64/dbd; then
+-              DRIVERDIR=$prefix/lib64/dbd
++           if test -d $prefix/libx32/dbd; then
++              DRIVERDIR=$prefix/libx32/dbd
+            else
+               DRIVERDIR=$prefix/lib/dbd
+            fi
+-        elif test -d /usr/local/lib64/dbd; then
+-           DRIVERDIR=/usr/local/lib64/dbd
+-        elif test -d /usr/lib64/dbd; then
+-           DRIVERDIR=/usr/lib64/dbd
+-        elif test -d $prefix/lib64/dbd; then
+-           DRIVERDIR=$prefix/lib64/dbd
++        elif test -d /usr/local/libx32/dbd; then
++           DRIVERDIR=/usr/local/libx32/dbd
++        elif test -d /usr/libx32/dbd; then
++           DRIVERDIR=/usr/libx32/dbd
++        elif test -d $prefix/libx32/dbd; then
++           DRIVERDIR=$prefix/libx32/dbd
+         else
+            AC_MSG_RESULT(no)
+            AC_MSG_ERROR(Unable to find DBD drivers in standard locations)
+@@ -75,8 +75,8 @@
+            DBI_BINDIR=$withval
+         elif test -f $withval/include/dbi/dbi.h; then
+            DBI_INCDIR=$withval/include
+-           if test -d $withval/lib64; then
+-              DBI_LIBDIR=$withval/lib64
++           if test -d $withval/libx32; then
++              DBI_LIBDIR=$withval/libx32
+            else
+               DBI_LIBDIR=$withval/lib
+            fi
+@@ -88,13 +88,13 @@
+         if test -d $withval/dbd; then
+            DRIVERDIR=$withval/dbd
+         elif test -d $withval/lib/; then
+-           if test -d $withval/lib64/dbd; then
+-              DRIVERDIR=$withval/lib64/dbd
++           if test -d $withval/libx32/dbd; then
++              DRIVERDIR=$withval/libx32/dbd
+            else
+               DRIVERDIR=$withval/lib/dbd
+            fi
+-        elif test -d $withval/lib64/dbd; then
+-           DRIVERDIR=$withval/lib64/dbd
++        elif test -d $withval/libx32/dbd; then
++           DRIVERDIR=$withval/libx32/dbd
+         else
+            AC_MSG_RESULT(no)
+            AC_MSG_ERROR(Invalid DBD driver directory $withval - unable to find DBD drivers under $withval)
+@@ -171,17 +171,17 @@
+            db_prog="mysql"
+            if test -f /usr/local/mysql/bin/mysql; then
+               MYSQL_BINDIR=/usr/local/mysql/bin
+-              if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
+-                 -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
++              if test -f /usr/local/mysql/libx32/mysql/libmysqlclient_r.a \
++                 -o -f /usr/local/mysql/libx32/mysql/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/local/mysql/libx32/mysql
+               else
+                  MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+               fi
+            elif test -f /usr/bin/mysql; then
+               MYSQL_BINDIR=/usr/bin
+-              if test -f /usr/lib64/mysql/libmysqlclient_r.a \
+-                  -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
+-                  MYSQL_LIBDIR=/usr/lib64/mysql
++              if test -f /usr/libx32/mysql/libmysqlclient_r.a \
++                  -o -f /usr/libx32/mysql/libmysqlclient_r.so; then
++                  MYSQL_LIBDIR=/usr/libx32/mysql
+               elif test -f /usr/lib/mysql/libmysqlclient_r.a \
+                   -o -f /usr/lib/mysql/libmysqlclient_r.so; then
+                   MYSQL_LIBDIR=/usr/lib/mysql
+@@ -190,9 +190,9 @@
+               fi
+            elif test -f /usr/local/bin/mysql; then
+               MYSQL_BINDIR=/usr/local/bin
+-              if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
+-                  -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
+-                  MYSQL_LIBDIR=/usr/local/lib64/mysql
++              if test -f /usr/local/libx32/mysql/libmysqlclient_r.a \
++                  -o -f /usr/local/libx32/mysql/libmysqlclient_r.so; then
++                  MYSQL_LIBDIR=/usr/local/libx32/mysql
+               elif test -f /usr/local/lib/mysql/libmysqlclient_r.a \
+                   -o -f /usr/local/lib/mysql/libmysqlclient_r.so; then
+                   MYSQL_LIBDIR=/usr/local/lib/mysql
+@@ -201,12 +201,12 @@
+               fi
+            elif test -f $withval/bin/mysql; then
+               MYSQL_BINDIR=$withval/bin
+-              if test -f $withval/lib64/mysql/libmysqlclient_r.a \
+-                  -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
+-                  MYSQL_LIBDIR=$withval/lib64/mysql
+-              elif test -f $withval/lib64/libmysqlclient_r.a \
+-                  -o -f $withval/lib64/libmysqlclient_r.so; then
+-                  MYSQL_LIBDIR=$withval/lib64
++              if test -f $withval/libx32/mysql/libmysqlclient_r.a \
++                  -o -f $withval/libx32/mysql/libmysqlclient_r.so; then
++                  MYSQL_LIBDIR=$withval/libx32/mysql
++              elif test -f $withval/libx32/libmysqlclient_r.a \
++                  -o -f $withval/libx32/libmysqlclient_r.so; then
++                  MYSQL_LIBDIR=$withval/libx32
+               elif test -f $withval/lib/libmysqlclient_r.a \
+                   -o -f $withval/lib/libmysqlclient_r.so; then
+                   MYSQL_LIBDIR=$withval/lib/
+@@ -243,26 +243,26 @@
+               POSTGRESQL_LIBDIR=`"$PG_CONFIG" --libdir`
+            elif test -f /usr/local/bin/psql; then
+               POSTGRESQL_BINDIR=/usr/local/bin
+-              if test -d /usr/local/lib64; then
+-                 POSTGRESQL_LIBDIR=/usr/local/lib64
++              if test -d /usr/local/libx32; then
++                 POSTGRESQL_LIBDIR=/usr/local/libx32
+               else
+                  POSTGRESQL_LIBDIR=/usr/local/lib
+               fi
+            elif test -f /usr/bin/psql; then
+               POSTGRESQL_BINDIR=/usr/local/bin
+-              if test -d /usr/lib64/postgresql; then
+-                 POSTGRESQL_LIBDIR=/usr/lib64/postgresql
++              if test -d /usr/libx32/postgresql; then
++                 POSTGRESQL_LIBDIR=/usr/libx32/postgresql
+               elif test -d /usr/lib/postgresql; then
+                  POSTGRESQL_LIBDIR=/usr/lib/postgresql
+-              elif test -d /usr/lib64; then
+-                 POSTGRESQL_LIBDIR=/usr/lib64
++              elif test -d /usr/libx32; then
++                 POSTGRESQL_LIBDIR=/usr/libx32
+               else
+                  POSTGRESQL_LIBDIR=/usr/lib
+               fi
+            elif test -f $withval/bin/psql; then
+               POSTGRESQL_BINDIR=$withval/bin
+-              if test -d $withval/lib64; then
+-                 POSTGRESQL_LIBDIR=$withval/lib64
++              if test -d $withval/libx32; then
++                 POSTGRESQL_LIBDIR=$withval/libx32
+               else
+                  POSTGRESQL_LIBDIR=$withval/lib
+               fi
+@@ -280,22 +280,22 @@
+            db_prog="sqlite3"
+            if test -f /usr/local/bin/sqlite3; then
+               SQLITE_BINDIR=/usr/local/bin
+-              if test -d /usr/local/lib64; then
+-                 SQLITE_LIBDIR=/usr/local/lib64
++              if test -d /usr/local/libx32; then
++                 SQLITE_LIBDIR=/usr/local/libx32
+               else
+                  SQLITE_LIBDIR=/usr/local/lib
+               fi
+            elif test -f /usr/bin/sqlite3; then
+               SQLITE_BINDIR=/usr/bin
+-              if test -d /usr/lib64; then
+-                 SQLITE_LIBDIR=/usr/lib64
++              if test -d /usr/libx32; then
++                 SQLITE_LIBDIR=/usr/libx32
+               else
+                  SQLITE_LIBDIR=/usr/lib
+               fi
+            elif test -f $withval/bin/sqlite3; then
+               SQLITE_BINDIR=$withval/bin
+-              if test -d $withval/lib64; then
+-                 SQLITE_LIBDIR=$withval/lib64
++              if test -d $withval/libx32; then
++                 SQLITE_LIBDIR=$withval/libx32
+               else
+                  SQLITE_LIBDIR=$withval/lib
+               fi
+@@ -362,21 +362,21 @@
+         if test "x${MYSQL_LIBDIR}" = x -o "x${MYSQL_INCDIR}" = x ; then
+            if test -f /usr/local/mysql/include/mysql/mysql.h; then
+               MYSQL_INCDIR=/usr/local/mysql/include/mysql
+-              if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
+-                      -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
++              if test -f /usr/local/mysql/libx32/mysql/libmysqlclient_r.a \
++                      -o -f /usr/local/mysql/libx32/mysql/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/local/mysql/libx32/mysql
+               else
+                  MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+               fi
+               MYSQL_BINDIR=/usr/local/mysql/bin
+            elif test -f /usr/include/mysql/mysql.h; then
+               MYSQL_INCDIR=/usr/include/mysql
+-              if test -f /usr/lib64/mysql/libmysqlclient_r.a \
+-                      -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/lib64/mysql
+-              elif test -f /usr/lib64/libmysqlclient_r.a \
+-                        -o -f /usr/lib64/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/lib64
++              if test -f /usr/libx32/mysql/libmysqlclient_r.a \
++                      -o -f /usr/libx32/mysql/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/libx32/mysql
++              elif test -f /usr/libx32/libmysqlclient_r.a \
++                        -o -f /usr/libx32/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/libx32
+               elif test -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.a \
+                         -o -f /usr/lib/x86_64-linux-gnu/libmysqlclient_r.so; then
+                  MYSQL_LIBDIR=/usr/lib/x86_64-linux-gnu
+@@ -389,27 +389,27 @@
+               MYSQL_BINDIR=/usr/bin
+            elif test -f /usr/include/mysql.h; then
+               MYSQL_INCDIR=/usr/include
+-              if test -f /usr/lib64/libmysqlclient_r.a \
+-                      -o -f /usr/lib64/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/lib64
++              if test -f /usr/libx32/libmysqlclient_r.a \
++                      -o -f /usr/libx32/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/libx32
+               else
+                  MYSQL_LIBDIR=/usr/lib
+               fi
+               MYSQL_BINDIR=/usr/bin
+            elif test -f /usr/local/include/mysql/mysql.h; then
+               MYSQL_INCDIR=/usr/local/include/mysql
+-              if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
+-                      -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/local/lib64/mysql
++              if test -f /usr/local/libx32/mysql/libmysqlclient_r.a \
++                      -o -f /usr/local/libx32/mysql/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/local/libx32/mysql
+               else
+                  MYSQL_LIBDIR=/usr/local/lib/mysql
+               fi
+               MYSQL_BINDIR=/usr/local/bin
+            elif test -f /usr/local/include/mysql.h; then
+               MYSQL_INCDIR=/usr/local/include
+-              if test -f /usr/local/lib64/libmysqlclient_r.a \
+-                      -o -f /usr/local/lib64/libmysqlclient_r.so; then
+-                 MYSQL_LIBDIR=/usr/local/lib64
++              if test -f /usr/local/libx32/libmysqlclient_r.a \
++                      -o -f /usr/local/libx32/libmysqlclient_r.so; then
++                 MYSQL_LIBDIR=/usr/local/libx32
+               else
+                  MYSQL_LIBDIR=/usr/local/lib
+               fi
+@@ -422,12 +422,12 @@
+      else
+         if test -f $withval/include/mysql/mysql.h; then
+            MYSQL_INCDIR=$withval/include/mysql
+-           if test -f $withval/lib64/mysql/libmysqlclient_r.a \
+-                -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
+-              MYSQL_LIBDIR=$withval/lib64/mysql
+-           elif test -f $withval/lib64/libmysqlclient_r.a \
+-                -o -f $withval/lib64/libmysqlclient_r.so; then
+-              MYSQL_LIBDIR=$withval/lib64
++           if test -f $withval/libx32/mysql/libmysqlclient_r.a \
++                -o -f $withval/libx32/mysql/libmysqlclient_r.so; then
++              MYSQL_LIBDIR=$withval/libx32/mysql
++           elif test -f $withval/libx32/libmysqlclient_r.a \
++                -o -f $withval/libx32/libmysqlclient_r.so; then
++              MYSQL_LIBDIR=$withval/libx32
+            elif test -f $withval/lib/libmysqlclient_r.a \
+                 -o -f $withval/lib/libmysqlclient_r.so; then
+               MYSQL_LIBDIR=$withval/lib
+@@ -437,9 +437,9 @@
+            MYSQL_BINDIR=$withval/bin
+         elif test -f $withval/include/mysql.h; then
+            MYSQL_INCDIR=$withval/include
+-           if test -f $withval/lib64/libmysqlclient_r.a \
+-                -o -f $withval/lib64/libmysqlclient_r.so; then
+-              MYSQL_LIBDIR=$withval/lib64
++           if test -f $withval/libx32/libmysqlclient_r.a \
++                -o -f $withval/libx32/libmysqlclient_r.so; then
++              MYSQL_LIBDIR=$withval/libx32
+            else
+               MYSQL_LIBDIR=$withval/lib
+            fi
+@@ -559,40 +559,40 @@
+         if test "$withval" = "yes"; then
+                 if test -f /usr/local/mysql/include/mysql/mysql.h; then
+                         MYSQL_INCDIR=/usr/local/mysql/include/mysql
+-                        if test -d /usr/local/mysql/lib64/mysql; then
+-                                MYSQL_LIBDIR=/usr/local/mysql/lib64/mysql
++                        if test -d /usr/local/mysql/libx32/mysql; then
++                                MYSQL_LIBDIR=/usr/local/mysql/libx32/mysql
+                         else
+                                 MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+                         fi
+                         MYSQL_BINDIR=/usr/local/mysql/bin
+                 elif test -f /usr/include/mysql/mysql.h; then
+                         MYSQL_INCDIR=/usr/include/mysql
+-                        if test -d /usr/lib64/mysql; then
+-                                MYSQL_LIBDIR=/usr/lib64/mysql
++                        if test -d /usr/libx32/mysql; then
++                                MYSQL_LIBDIR=/usr/libx32/mysql
+                         else
+                                 MYSQL_LIBDIR=/usr/lib/mysql
+                         fi
+                         MYSQL_BINDIR=/usr/bin
+                 elif test -f /usr/include/mysql.h; then
+                         MYSQL_INCDIR=/usr/include
+-                        if test -d /usr/lib64; then
+-                                MYSQL_LIBDIR=/usr/lib64
++                        if test -d /usr/libx32; then
++                                MYSQL_LIBDIR=/usr/libx32
+                         else
+                                 MYSQL_LIBDIR=/usr/lib
+                         fi
+                         MYSQL_BINDIR=/usr/bin
+                 elif test -f /usr/local/include/mysql/mysql.h; then
+                         MYSQL_INCDIR=/usr/local/include/mysql
+-                        if test -d /usr/local/lib64/mysql; then
+-                                MYSQL_LIBDIR=/usr/local/lib64/mysql
++                        if test -d /usr/local/libx32/mysql; then
++                                MYSQL_LIBDIR=/usr/local/libx32/mysql
+                         else
+                                 MYSQL_LIBDIR=/usr/local/lib/mysql
+                         fi
+                         MYSQL_BINDIR=/usr/local/bin
+                 elif test -f /usr/local/include/mysql.h; then
+                         MYSQL_INCDIR=/usr/local/include
+-                        if test -d /usr/local/lib64; then
+-                                MYSQL_LIBDIR=/usr/local/lib64
++                        if test -d /usr/local/libx32; then
++                                MYSQL_LIBDIR=/usr/local/libx32
+                         else
+                                 MYSQL_LIBDIR=/usr/local/lib
+                         fi
+@@ -604,16 +604,16 @@
+         else
+                 if test -f $withval/include/mysql/mysql.h; then
+                         MYSQL_INCDIR=$withval/include/mysql
+-                        if test -d $withval/lib64/mysql; then
+-                                MYSQL_LIBDIR=$withval/lib64/mysql
++                        if test -d $withval/libx32/mysql; then
++                                MYSQL_LIBDIR=$withval/libx32/mysql
+                         else
+                                 MYSQL_LIBDIR=$withval/lib/mysql
+                         fi
+                         MYSQL_BINDIR=$withval/bin
+                 elif test -f $withval/include/mysql.h; then
+                         MYSQL_INCDIR=$withval/include
+-                        if test -d $withval/lib64; then
+-                                MYSQL_LIBDIR=$withval/lib64
++                        if test -d $withval/libx32; then
++                                MYSQL_LIBDIR=$withval/libx32
+                         else
+                                 MYSQL_LIBDIR=$withval/lib
+                         fi
+@@ -755,8 +755,8 @@
+      if test "$withval" = "yes"; then
+         if test -f /usr/local/include/sqlite3.h; then
+            SQLITE_INCDIR=/usr/local/include
+-           if test -d /usr/local/lib64; then
+-              SQLITE_LIBDIR=/usr/local/lib64
++           if test -d /usr/local/libx32; then
++              SQLITE_LIBDIR=/usr/local/libx32
+            else
+               SQLITE_LIBDIR=/usr/local/lib
+            fi
+@@ -765,16 +765,16 @@
+            SQLITE_INCDIR=/usr/include
+            if test -n $multiarch -a -d /usr/lib/$multiarch; then
+               SQLITE_LIBDIR=/usr/lib/$multiarch
+-           elif test -d /usr/lib64; then
+-              SQLITE_LIBDIR=/usr/lib64
++           elif test -d /usr/libx32; then
++              SQLITE_LIBDIR=/usr/libx32
+            else
+               SQLITE_LIBDIR=/usr/lib
+            fi
+            SQLITE_BINDIR=/usr/bin
+         elif test -f $prefix/include/sqlite3.h; then
+            SQLITE_INCDIR=$prefix/include
+-           if test -d $prefix/lib64; then
+-              SQLITE_LIBDIR=$prefix/lib64
++           if test -d $prefix/libx32; then
++              SQLITE_LIBDIR=$prefix/libx32
+            else
+               SQLITE_LIBDIR=$prefix/lib
+            fi
+@@ -790,8 +790,8 @@
+            SQLITE_BINDIR=$withval
+         elif test -f $withval/include/sqlite3.h; then
+            SQLITE_INCDIR=$withval/include
+-           if test -d $withval/lib64; then
+-              SQLITE_LIBDIR=$withval/lib64
++           if test -d $withval/libx32; then
++              SQLITE_LIBDIR=$withval/libx32
+            else
+               SQLITE_LIBDIR=$withval/lib
+            fi
+@@ -872,32 +872,32 @@
+               POSTGRESQL_BINDIR=`"$PG_CONFIG" --bindir`
+           elif test -f /usr/local/include/libpq-fe.h; then
+               POSTGRESQL_INCDIR=/usr/local/include
+-              if test -d /usr/local/lib64; then
+-                 POSTGRESQL_LIBDIR=/usr/local/lib64
++              if test -d /usr/local/libx32; then
++                 POSTGRESQL_LIBDIR=/usr/local/libx32
+               else
+                  POSTGRESQL_LIBDIR=/usr/local/lib
+               fi
+               POSTGRESQL_BINDIR=/usr/local/bin
+           elif test -f /usr/include/libpq-fe.h; then
+               POSTGRESQL_INCDIR=/usr/include
+-              if test -d /usr/lib64; then
+-                 POSTGRESQL_LIBDIR=/usr/lib64
++              if test -d /usr/libx32; then
++                 POSTGRESQL_LIBDIR=/usr/libx32
+               else
+                  POSTGRESQL_LIBDIR=/usr/lib
+               fi
+               POSTGRESQL_BINDIR=/usr/bin
+           elif test -f /usr/include/pgsql/libpq-fe.h; then
+               POSTGRESQL_INCDIR=/usr/include/pgsql
+-              if test -d /usr/lib64/pgsql; then
+-                 POSTGRESQL_LIBDIR=/usr/lib64/pgsql
++              if test -d /usr/libx32/pgsql; then
++                 POSTGRESQL_LIBDIR=/usr/libx32/pgsql
+               else
+                  POSTGRESQL_LIBDIR=/usr/lib/pgsql
+               fi
+               POSTGRESQL_BINDIR=/usr/bin
+           elif test -f /usr/include/postgresql/libpq-fe.h; then
+               POSTGRESQL_INCDIR=/usr/include/postgresql
+-              if test -d /usr/lib64/postgresql; then
+-                 POSTGRESQL_LIBDIR=/usr/lib64/postgresql
++              if test -d /usr/libx32/postgresql; then
++                 POSTGRESQL_LIBDIR=/usr/libx32/postgresql
+               else
+                  POSTGRESQL_LIBDIR=/usr/lib/postgresql
+               fi
+@@ -912,8 +912,8 @@
+           POSTGRESQL_BINDIR=$withval/bin
+       elif test -f $withval/include/postgresql/libpq-fe.h; then
+           POSTGRESQL_INCDIR=$withval/include/postgresql
+-          if test -d $withval/lib64; then
+-              POSTGRESQL_LIBDIR=$withval/lib64
++          if test -d $withval/libx32; then
++              POSTGRESQL_LIBDIR=$withval/libx32
+           else
+               POSTGRESQL_LIBDIR=$withval/lib
+           fi
+diff -ur bacula-11.0.6.orig/autoconf/configure.in bacula-11.0.6/autoconf/configure.in
+--- bacula-11.0.6.orig/autoconf/configure.in   2022-04-03 11:32:50.796476244 +0000
++++ bacula-11.0.6/autoconf/configure.in        2022-04-03 11:33:40.062588492 +0000
+@@ -301,7 +301,7 @@
+        os_processor=`uname -p 2>/dev/null`
+        case ${os_processor} in
+        x86_64)
+-          libdir=/usr/lib64
++          libdir=/usr/libx32
+           ;;
+        *)
+           libdir=/usr/lib
+@@ -2669,9 +2669,9 @@
+    for dir in ${with_afsdir}/lib \
+             ${with_afsdir}/lib/afs \
+             ${with_afsdir}/lib/openafs \
+-            ${with_afsdir}/lib64 \
+-            ${with_afsdir}/lib64/afs \
+-            ${with_afsdir}/lib64/openafs
++            ${with_afsdir}/libx32 \
++            ${with_afsdir}/libx32/afs \
++            ${with_afsdir}/libx32/openafs
+    do
+       for arch_type in .a .so
+       do
+@@ -2839,8 +2839,8 @@
+        dnl
+        dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
+        dnl
+-          if test -d /usr/lib64/; then
+-             FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
++          if test -d /usr/libx32/; then
++             FDLIBS="-L/usr/libx32 -lacl $FDLIBS"
+           else
+              FDLIBS="-L/usr/lib -lacl $FDLIBS"
+           fi