Your message dated Mon, 16 Nov 2020 23:03:30 +0000
with message-id <[email protected]>
and subject line Bug#972891: fixed in pam-mysql 0.8.1-4
has caused the Debian Bug report #972891,
regarding pam-mysql FTCBFS: fails finding mysql libraries
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
972891: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972891
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: pam-mysql
Version: 0.8.1-2
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

pam-mysql fails to cross build from source, because it fails finding
mysql libraries. It tries to do so using mysql_config, but mysql_config
does not work during cross compilation at all. Instead, pkg-config
should be used. The attached patch implements pkg-config-based detection
and inserts it after mysql_config, but before searching hard coded
locations. As such any previous detection is retained while supporting
cross compilation via pkg-config. Please consider applying the attached
patch.

Helmut
--- pam-mysql-0.8.1.orig/m4/pam-mysql.m4
+++ pam-mysql-0.8.1/m4/pam-mysql.m4
@@ -163,84 +163,94 @@
   AC_MSG_CHECKING([if] $1 [is a mysql_config script])
 
   _cfg="$1"
-  if test -x "$_cfg" -a -r "$_cfg" -a -f "$_cfg"; then
+  AS_IF([test -x "$_cfg" -a -r "$_cfg" -a -f "$_cfg"],[
     dnl $1 may be a path to mysql_config
     AC_MSG_RESULT([yes])
     AC_DEFINE([HAVE_MYSQL_H], [1], [Define to `1' if you have the <mysql.h> header file.])
     mysql_config="$1"
-  else
+  ],[
     AC_MSG_RESULT([no])
-    mysql_lib_path=
-    mysql_include_path=
-    mysql_lib_name=mysqlclient
-
-    for _pfx in $1; do
-      _cfg="$_pfx/bin/mysql_config"
 
-      AC_MSG_CHECKING([mysql_config availability in $_pfx/bin])
+    PKG_CHECK_MODULES([MYSQLCLIENT],[mysqlclient],[
+      mysql_pkg_config=yes
+      AC_DEFINE([HAVE_MYSQL_H], [1], [Define to `1' if you have the <mysql.h> header file.])
+    ],[
+      mysql_pkg_config=no
+      mysql_lib_path=
+      mysql_include_path=
+      mysql_lib_name=mysqlclient
 
-      if test -x "$_cfg" -a -r "$_cfg" -a -f "$_cfg"; then
-        AC_MSG_RESULT([yes])
-        AC_DEFINE([HAVE_MYSQL_H], [1], [Define to `1' if you have the <mysql.h> header file.])
-        mysql_config="$_cfg"
-        break
-      else
-        AC_MSG_RESULT([no])
-      fi
+      for _pfx in $1; do
+        _cfg="$_pfx/bin/mysql_config"
 
-      for dir in "$_pfx/lib" "$_pfx/lib/mysql"; do
-        AC_MSG_CHECKING([$mysql_lib_name availability in $dir])
-        name="$mysql_lib_name"
+        AC_MSG_CHECKING([mysql_config availability in $_pfx/bin])
 
-        if eval test -e "$dir/$libname_spec$shrext_cmds" -o -e "$dir/$libname_spec.$libext"; then
+        if test -x "$_cfg" -a -r "$_cfg" -a -f "$_cfg"; then
           AC_MSG_RESULT([yes])
-
-          AC_MSG_CHECKING([$dir/$name usability])
-          ac_save_LIBS="$LIBS"
-          LIBS="$LIBS -L$dir"
-          AC_CHECK_LIB([$mysql_lib_name], [mysql_init], [
-            AC_MSG_RESULT([yes])
-            mysql_lib_path="$dir"
-          ], [
-            AC_MSG_RESULT([no])
-          ])
-          LIBS="$ac_save_LIBS"
-
-          if test ! -z "$mysql_lib_path"; then
-            break
-          fi
+          AC_DEFINE([HAVE_MYSQL_H], [1], [Define to `1' if you have the <mysql.h> header file.])
+          mysql_config="$_cfg"
+          break
         else
           AC_MSG_RESULT([no])
         fi
-      done
 
-      for dir in "$_pfx/include" "$_pfx/include/mysql"; do
-        AC_MSG_CHECKING([mysql headers availability in $dir])
-        if test -e "$dir/mysql.h"; then
-          AC_MSG_RESULT([yes])
-          AC_MSG_CHECKING([mysql headers usability])
-          ac_save_CPPFLAGS="$CPPFLAGS"
-          CPPFLAGS="$CPPFLAGS -I$dir"
-          AC_CHECK_HEADER([mysql.h], [
+        for dir in "$_pfx/lib" "$_pfx/lib/mysql"; do
+          AC_MSG_CHECKING([$mysql_lib_name availability in $dir])
+          name="$mysql_lib_name"
+
+          if eval test -e "$dir/$libname_spec$shrext_cmds" -o -e "$dir/$libname_spec.$libext"; then
             AC_MSG_RESULT([yes])
-            AC_DEFINE([HAVE_MYSQL_H], [1], [Define to `1' if you have the <mysql.h> header file.])
-            mysql_include_path="$dir"
-          ], [
+
+            AC_MSG_CHECKING([$dir/$name usability])
+            ac_save_LIBS="$LIBS"
+            LIBS="$LIBS -L$dir"
+            AC_CHECK_LIB([$mysql_lib_name], [mysql_init], [
+              AC_MSG_RESULT([yes])
+              mysql_lib_path="$dir"
+            ], [
+              AC_MSG_RESULT([no])
+            ])
+            LIBS="$ac_save_LIBS"
+
+            if test ! -z "$mysql_lib_path"; then
+              break
+            fi
+          else
             AC_MSG_RESULT([no])
-          ])
-          CPPFLAGS="$ac_save_CPPFLAGS"
+          fi
+        done
 
-          if test ! -z "$mysql_include_path"; then
-            break
+        for dir in "$_pfx/include" "$_pfx/include/mysql"; do
+          AC_MSG_CHECKING([mysql headers availability in $dir])
+          if test -e "$dir/mysql.h"; then
+            AC_MSG_RESULT([yes])
+            AC_MSG_CHECKING([mysql headers usability])
+            ac_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS -I$dir"
+            AC_CHECK_HEADER([mysql.h], [
+              AC_MSG_RESULT([yes])
+              AC_DEFINE([HAVE_MYSQL_H], [1], [Define to `1' if you have the <mysql.h> header file.])
+              mysql_include_path="$dir"
+            ], [
+              AC_MSG_RESULT([no])
+            ])
+            CPPFLAGS="$ac_save_CPPFLAGS"
+
+            if test ! -z "$mysql_include_path"; then
+              break
+            fi
+          else
+            AC_MSG_RESULT([no])
           fi
-        else
-          AC_MSG_RESULT([no])
-        fi
+        done
       done
-    done
-  fi
+    ])
+  ])
 
-  if test -z "$mysql_config"; then
+  if test "$mysql_pkg_config" = yes; then
+    CFLAGS="$CFLAGS $MYSQLCLIENT_CFLAGS"
+    LIBS="$LIBS $MYSQLCLIENT_LIBS"
+  elif test -z "$mysql_config"; then
     if test -z "$mysql_lib_path" -o -z "$mysql_include_path"; then
       AC_MSG_ERROR([Cannot locate mysql client library. Please check your mysql installation.])
     fi

--- End Message ---
--- Begin Message ---
Source: pam-mysql
Source-Version: 0.8.1-4
Done: =?utf-8?q?Ferenc_W=C3=A1gner?= <[email protected]>

We believe that the bug you reported is fixed in the latest version of
pam-mysql, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ferenc Wágner <[email protected]> (supplier of updated pam-mysql 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 [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 16 Nov 2020 23:48:04 +0100
Source: pam-mysql
Architecture: source
Version: 0.8.1-4
Distribution: unstable
Urgency: medium
Maintainer: Ferenc Wágner <[email protected]>
Changed-By: Ferenc Wágner <[email protected]>
Closes: 972891
Changes:
 pam-mysql (0.8.1-4) unstable; urgency=medium
 .
   * [66c1950] New patch: Fix FTCBFS: fails finding mysql libraries.
     Thanks to Helmut Grohne (Closes: #972891)
   * [f67ff9a] New patch: Embed xgethostname 20020413 for Hurd compatibility
   * [651c549] Extend our autopkgtest for all supported crypt algorithms
   * [4f91453] Make the autopkgtest easily rerunnable
   * [706c19c] Our autopkgtest does not need isolation-container
   * [041eb89] New patch: Avoid segfault on unexpected Joomla hash value
   * [51e4c09] Apply patches to re-enable MySQL 3.23 hash support
   * [62ed75e] Bump watch file to version 4
Checksums-Sha1:
 cec39442f63451e63e7bdc0b700befdfe935c7eb 1992 pam-mysql_0.8.1-4.dsc
 e8b338e9116b3453ae81a59c39461160a2f91600 15628 pam-mysql_0.8.1-4.debian.tar.xz
 e625f076fdc0ffb925a97a9db18f4b2fad7181a3 6440 pam-mysql_0.8.1-4_amd64.buildinfo
Checksums-Sha256:
 b00b5aff7518dbf4022cf9055576021108c9322ac5cdcf945e4092f932cfb088 1992 
pam-mysql_0.8.1-4.dsc
 554ff1056730ec54b3db6a55e37d791bfdd5d9e83c6d44b033f4b931c17737cf 15628 
pam-mysql_0.8.1-4.debian.tar.xz
 0035e091c59ecb487a4b66a05b7033888837189fb86e4bff99ac403e8cd2e7d2 6440 
pam-mysql_0.8.1-4_amd64.buildinfo
Files:
 79356a2e67756c5dc836f0c410017ffc 1992 admin optional pam-mysql_0.8.1-4.dsc
 40e5393e1b079e6d8a04405affd03bc8 15628 admin optional 
pam-mysql_0.8.1-4.debian.tar.xz
 412e76809476efb6c9acb909f7502574 6440 admin optional 
pam-mysql_0.8.1-4_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEwddEx0RNIUL7eugtOsj3Fkd+2yMFAl+zAocACgkQOsj3Fkd+
2yNbUA//QhOL/SjWGbt772s4HN7iHNkN42yDEiKc2+utvA1wjzrexF2bqjF9fTp9
HQf/I1ApGT6B0uTPcsvxwVHXNbFivZe8EIasyKsxCEw0CVwyb8cqrWdY5JTl7mvS
TtmnbHdo8I4pu/hDnSSfmsMvt1q66JBcwrQCNUoXdczJumG+UdhISuXFszUCrJ6E
vgmnYjzW473O629/S9gkGuiJkvHe/g3D/P7OOHTkErDHnldAzwI8/CRSZilqDyD4
Ufuo/5Ru/NCvwfM0n67LlMax9W/dOJmw/J+HkoVETMOcJ5UEfczTjdvQDZUjxcXr
zA1+xUQobRP41obwS8kaf5QySYhvCTEBo4Boxn65593JPv8peVIYUiOYbMz26MIJ
ChSl8RDvKJq3kTNyGodj21ueHriB4s9YXsLqA3ZWieo+LQyB42+Bs5AohsmNHpUe
/3ZN+qArn15tmQ21ZpiRe8ZJSVOButNSC3wGbHt7z+QhJ0msUaApGZ70pY5JISQP
3teVfr2ffgskFtrrXrv4GphRZ+tGHSbN8Ilya8TES6fDK06WMXx+QgUijk7o1ZEv
kVIQ+q+SvXpAHDXOd1Xtvl7dBYSlLTiACGt3mFBNoWTvBU9ECG31ZxBHN1SroCz1
0O3Oq9mUDJm7BLEDMp0Fug64esy8eB5pNmSpDRoXM73iEN998OU=
=k07j
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to