#1009012 bacula FTCBFS: uses the build architecture qmake

Package:
src:bacula
Source:
bacula
Submitter:
Helmut Grohne
Date:
2022-05-30 21:21:04 UTC
Severity:
normal
Tags:
#1009012#5
Date:
2022-04-05 11:20:08 UTC
From:
To:
bacula fails to cross build from source, because it attempts to use the
build architecture qmake while Build-Depends requested the host
architecture one. To make matters worse, this is only visible much later
in the build as the qmake failure is swallowed. Such behaviour arguably
runs afoul Debian policy section 4.6 and should likely be considered a
serious policy violation.

In any case, bacula's configure.ac uses AC_PATH_PROG to locate qmake.
Once changing that to AC_PATH_TOOL, the host architecture qmake is being
used and this part magically works. This is what this bug is about. I'm
attaching a patch for your convenience.

Beyond this, bacula uses mysql_config to discover mysql client
libraries. Cross building with mysql_config is not something we can fix.
If bacula is to support cross building, it will need to use pkg-config
(or pkgconf) instead. The relevant code is quite non-trivial and I
couldn't come up with a working version. Would you be interested in
looking into this? The following link describes a way that is
automatically compatible with cross building. The module name is
"mysqlclient". https://autotools.info/pkgconfig/pkg_check_modules.html

So please close this bug when fixing the qmake invocation and
preferably also the policy violation.

Helmut

#1009012#10
Date:
2022-04-15 09:44:50 UTC
From:
To:
On 05.04.22 13:20, Helmut Grohne wrote:

Hello Helmut,

thank you for your time to not only diagnose the problem but also
provide a solution.

As you can see from the GIT repo, I have committed your fix and also
verified it builds correctly.

But unfortunately, I am not that knowledgable about anything autotools,
so I am at a bit of a loss about how the fix the "as the qmake failure
is swallowed" bit. Sorry.

I will submit the change to the upstream BTS, unless you already beat me
to it.

I tried to have a go at it, but got utterly defeated by a) my lacking
knowledge of autotools in general and b) the convoluted mess that
anything autotools related is to me.

I will need to defer this to someone with more insight or upstream.

Grüße,
Sven.

#1009012#15
Date:
2022-05-30 21:18:55 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
bacula, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1009012@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Carsten Leonhardt <leo@debian.org> (supplier of updated bacula package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 30 May 2022 16:41:18 +0200
Source: bacula
Architecture: source
Version: 9.6.7-5
Distribution: unstable
Urgency: medium
Maintainer: Debian Bacula Team <pkg-bacula-devel@lists.alioth.debian.org>
Changed-By: Carsten Leonhardt <leo@debian.org>
Closes: 1009012
Changes:
 bacula (9.6.7-5) unstable; urgency=medium
 .
   [ Debian Janitor ]
   * Remove constraints unnecessary since buster
 .
   [ Sven Hartge ]
   * Change configure.in to use AC_PATH_TOOL to fix FTCBFS (Closes: #1009012)
     Thanks to Helmut Grohne <helmut@subdivi.de> for finding and fixing
     the issue.
 .
   [ Carsten Leonhardt ]
   * Update Standards-Version to 4.6.1, no changes required.
Checksums-Sha1:
 7d8d77e7887179f775f039793a3da724d72545b2 3686 bacula_9.6.7-5.dsc
 8a3d1ff5b9525df8a271660614359322e4c6d74a 101076 bacula_9.6.7-5.debian.tar.xz
Checksums-Sha256:
 124e981761ecc9e38692bb3af9321f3597cbb29fde8867b6a890cb2425832104 3686 bacula_9.6.7-5.dsc
 3c448ecd572add54831741357693e53c228b0f17338112a9bc224ebc9d046ea8 101076 bacula_9.6.7-5.debian.tar.xz
Files:
 f50ef5fbc7599d213d09aebe8f604dfd 3686 admin optional bacula_9.6.7-5.dsc
 1663f992b1fe53fbdde3050f0c30da28 101076 admin optional bacula_9.6.7-5.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEETxO/995XSygF6EUmKrIctfbulV4FAmKVMisPHGxlb0BkZWJp
YW4ub3JnAAoJECqyHLX27pVen6UP/0Oli4HP2+i7mdaqq4D85Abk/1ECtKlG8VRt
9r6vbaxD6GXxGLQa0vB3gEyYvzl+QkEYYaGaCxMac4ItReWWUL3lLbyOaq4FSikt
jpExBwkcMGaw5CWjUQ1o1Z1MBS4DNnLxyTi9UXe+oRjMj+HmJpEn9oGf86dwcYSY
XsOtH1S3JvBV0u7LeLF0w2NlH2tmi+WPKTfkKB/fWyN6pdIVNJkFRw9pZJppIfVk
2zaqUOGmz9LbpAppkN1W/2YRqKR/r8KwfIdBhHbdcXvEHoxAwyeq1Za8MD9O5srY
2eM8hVD4Wg9Hj9VVNHT7e7GCEqUn4Abp5joP/og4FNaRQFDHykpjk5vb6anjQuA7
gJEYPebt5558zisvm7Upbbe8Fyo3xM/prXG4qqiIU2ipULc5sMqp3kqWftFyNaCI
YGLTdjmv3+E+wFmPdgC3wBzbs1c57zFzvwo6udcru5tP1aMwZpIUZ5b14poNzbjz
zQrzKX1X1HJRgp0NCEaTER5BrINaWrY4HD8HAJ2QUJCqXuHYe9rjL5tqLPbYLzF3
wxBXvnGnxXE+NiU0J9Ky5Bq2Ap4xPAJwfTQAYHYmpKM21zMDF5M6tmoJ+r+GKLDJ
KJ47Vo8HoZ3II+d4Js3RR2qWschQ/UpBlIACs7f2n0TVkgpKBTWQOqjlsmeIlpb/
Zun5H3wK
=Bf2T
-----END PGP SIGNATURE-----