[pkg-gnupg-maint] Bug#949664: libassuan: testsuite failure due to wrong flags being injected

Gianfranco Costamagna locutusofborg at debian.org
Thu Jan 23 11:42:55 GMT 2020


Source: libassuan
Version: 2.5.3-7
Severity: serious
tags: patch

Hello, looks like we have 2 problems:
arm64 test failure because the compiler is not meant to run there (but the package is installable)

amd64 -> w32 test failure because of wrong flags injected (the libgpg-error has this fix, not sure why it hasn't been copied on this package).

The following patch fixes both, and "syncs" the build-windows file with the correspondent libgpg-error one (so melding is easier to do)

(amd64 flags were used for w32 builds due to wrong pkg-config call)

diff -Nru libassuan-2.5.3/debian/changelog libassuan-2.5.3/debian/changelog
--- libassuan-2.5.3/debian/changelog	2019-07-17 17:09:10.000000000 +0200
+++ libassuan-2.5.3/debian/changelog	2019-07-19 10:24:16.000000000 +0200
@@ -1,3 +1,12 @@
+libassuan (2.5.3-7.1) unstable; urgency=medium
+
+  * Fix testsuite flags being incorrectly passed
+    (patch taken from libgpg-error). (LP: #1856056
+    Closes: #-1)
+  * Do not fail new test on arm64
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Fri, 19 Jul 2019 10:24:16 +0200
+
 libassuan (2.5.3-7) unstable; urgency=medium
 
   * export CPPFLAGS_FOR_BUILD as well
diff -Nru libassuan-2.5.3/debian/tests/build-windows libassuan-2.5.3/debian/tests/build-windows
--- libassuan-2.5.3/debian/tests/build-windows	2019-07-16 19:49:54.000000000 +0200
+++ libassuan-2.5.3/debian/tests/build-windows	2019-07-19 10:24:16.000000000 +0200
@@ -2,35 +2,35 @@
 
 set -e
 
-ARCH=$1
+ARCH="$1"
 
 if [ "$ARCH" = x86_64 ]; then
-    GCC=x86_64-w64-mingw32-gcc
     WINE=/usr/lib/wine/wine64
     export WINESERVER=/usr/lib/wine/wineserver64
 elif [ "$ARCH" = i686 ]; then
-    GCC=i686-w64-mingw32-gcc
     WINE=/usr/lib/wine/wine
     export WINESERVER=/usr/lib/wine/wineserver32
 else
     printf >&2 'Unknown Architecture: %s\n' "$ARCH"
     exit 1
 fi
+GCC="${ARCH}-w64-mingw32-gcc"
 
 # get wine initialized, which normally spews logs to stderr
 # (autopkgtest doesn't want stderr)
 "$WINE" hostname 2>&1
 
-export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/lib/pkgconfig
+if [ `dpkg --print-architecture` = 'arm64' ] ; then
+  echo "Don't fail testsuite on arm64, this test always failed there"
+  exit 0
+fi
 
-# see https://dev.gnupg.org/T4624 for why this is needed
-extralibs=(-lws2_32)
+export PKG_CONFIG_PATH="/usr/${ARCH}-w64-mingw32/lib/pkgconfig"
 
-"$GCC" -pedantic -Wall -Werror -o test-run.exe \
-       -static \
-       -Wl,--no-as-needed \
-       debian/tests/simple-build.c \
-       $(pkg-config --static --cflags --libs libassuan) "${extralibs[@]}"
+# see https://dev.gnupg.org/T4624 for why this is needed
+extra_libs=(-lws2_32)
 
+# build a static windows binary around libassuan and run it:
+"$GCC" -pedantic -Wall -Werror -static -o test-run.exe debian/tests/simple-build.c $(pkg-config --cflags --static --libs libassuan) "${extra_libs[@]}"
 "$WINE" ./test-run.exe
-rm -f test-run.exe
+rm -f ./test-run.exe
-------------- next part --------------
diff -Nru libassuan-2.5.3/debian/changelog libassuan-2.5.3/debian/changelog
--- libassuan-2.5.3/debian/changelog	2019-07-17 17:09:10.000000000 +0200
+++ libassuan-2.5.3/debian/changelog	2019-07-19 10:24:16.000000000 +0200
@@ -1,3 +1,12 @@
+libassuan (2.5.3-7.1) unstable; urgency=medium
+
+  * Fix testsuite flags being incorrectly passed
+    (patch taken from libgpg-error). (LP: #1856056
+    Closes: #-1)
+  * Do not fail new test on arm64
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Fri, 19 Jul 2019 10:24:16 +0200
+
 libassuan (2.5.3-7) unstable; urgency=medium
 
   * export CPPFLAGS_FOR_BUILD as well
diff -Nru libassuan-2.5.3/debian/tests/build-windows libassuan-2.5.3/debian/tests/build-windows
--- libassuan-2.5.3/debian/tests/build-windows	2019-07-16 19:49:54.000000000 +0200
+++ libassuan-2.5.3/debian/tests/build-windows	2019-07-19 10:24:16.000000000 +0200
@@ -2,35 +2,35 @@
 
 set -e
 
-ARCH=$1
+ARCH="$1"
 
 if [ "$ARCH" = x86_64 ]; then
-    GCC=x86_64-w64-mingw32-gcc
     WINE=/usr/lib/wine/wine64
     export WINESERVER=/usr/lib/wine/wineserver64
 elif [ "$ARCH" = i686 ]; then
-    GCC=i686-w64-mingw32-gcc
     WINE=/usr/lib/wine/wine
     export WINESERVER=/usr/lib/wine/wineserver32
 else
     printf >&2 'Unknown Architecture: %s\n' "$ARCH"
     exit 1
 fi
+GCC="${ARCH}-w64-mingw32-gcc"
 
 # get wine initialized, which normally spews logs to stderr
 # (autopkgtest doesn't want stderr)
 "$WINE" hostname 2>&1
 
-export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/lib/pkgconfig
+if [ `dpkg --print-architecture` = 'arm64' ] ; then
+  echo "Don't fail testsuite on arm64, this test always failed there"
+  exit 0
+fi
 
-# see https://dev.gnupg.org/T4624 for why this is needed
-extralibs=(-lws2_32)
+export PKG_CONFIG_PATH="/usr/${ARCH}-w64-mingw32/lib/pkgconfig"
 
-"$GCC" -pedantic -Wall -Werror -o test-run.exe \
-       -static \
-       -Wl,--no-as-needed \
-       debian/tests/simple-build.c \
-       $(pkg-config --static --cflags --libs libassuan) "${extralibs[@]}"
+# see https://dev.gnupg.org/T4624 for why this is needed
+extra_libs=(-lws2_32)
 
+# build a static windows binary around libassuan and run it:
+"$GCC" -pedantic -Wall -Werror -static -o test-run.exe debian/tests/simple-build.c $(pkg-config --cflags --static --libs libassuan) "${extra_libs[@]}"
 "$WINE" ./test-run.exe
-rm -f test-run.exe
+rm -f ./test-run.exe


More information about the pkg-gnupg-maint mailing list