Package: poppler Version: 20.09.0-2 Severity: minor Tags: patch User: [email protected] Usertags: origin-ubuntu focal ubuntu-patch
Dear maintainers, In Ubuntu, we are in the process of moving the i386 architecture to a compatibility-only layer on amd64, and therefore we are also moving our autopkgtest infrastructure to test i386 binaries in a cross-environment. This requires changes to some tests so that they are cross-aware and can do the right thing. The poppler tests currently fail in this environment, because they are build tests that do not invoke the toolchain in a cross-aware manner. I've verified that the attached patch lets the tests successfully build (and run) i386 tests on an amd64 host. Note that upstream autopkgtest doesn't currently set DEB_HOST_ARCH so thisis a complete no-op in Debian for the moment. Support for cross-testing in autopkgtest is currently awaiting review at https://salsa.debian.org/ci-team/autopkgtest/merge_requests/69 and once landed, will still have no effect unless autopkgtest is invoked with a '-a' option. So this change should be safe to land in your package despite this not being upstream in autopkgtest. Thanks for considering,
diff -Nru poppler-20.09.0/debian/changelog poppler-20.09.0/debian/changelog --- poppler-20.09.0/debian/changelog 2020-09-03 21:12:14.000000000 +0200 +++ poppler-20.09.0/debian/changelog 2020-09-07 14:08:23.000000000 +0200 @@ -1,3 +1,10 @@ +poppler (20.09.0-3) UNRELEASED; urgency=medium + + * debian/tests: + - Make autopkgtests cross-test-friendly. + + -- Sebastien Bacher <[email protected]> Mon, 07 Sep 2020 14:08:23 +0200 + poppler (20.09.0-2) unstable; urgency=medium * Add new optional symbols generated by the new toolchain. diff -Nru poppler-20.09.0/debian/tests/control poppler-20.09.0/debian/tests/control --- poppler-20.09.0/debian/tests/control 2020-09-03 21:12:14.000000000 +0200 +++ poppler-20.09.0/debian/tests/control 2020-09-07 14:08:13.000000000 +0200 @@ -1,8 +1,8 @@ Tests: cpp -Depends: build-essential, pkg-config, libpoppler-cpp-dev, cups-filters +Depends: build-essential, pkg-config, libpoppler-cpp-dev, cups-filters:native Tests: glib -Depends: build-essential, pkg-config, libpoppler-glib-dev, cups-filters +Depends: build-essential, pkg-config, libpoppler-glib-dev, cups-filters:native Tests: qt5 -Depends: build-essential, pkg-config, libpoppler-qt5-dev, cups-filters +Depends: build-essential, pkg-config, libpoppler-qt5-dev, cups-filters:native diff -Nru poppler-20.09.0/debian/tests/cpp poppler-20.09.0/debian/tests/cpp --- poppler-20.09.0/debian/tests/cpp 2020-09-03 21:12:14.000000000 +0200 +++ poppler-20.09.0/debian/tests/cpp 2020-09-07 14:08:13.000000000 +0200 @@ -2,6 +2,13 @@ set -e SRCDIR=$(dirname $(realpath $0)) -cd $AUTOPKGTEST_TMP -g++ -Wall -Werror -pedantic -Wno-long-long -o poppler-cpp-test $SRCDIR/test-cpp.cpp `pkg-config --cflags --libs poppler-cpp` + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + +cd $ADTTMP +${CROSS_COMPILE}g++ -Wall -Werror -pedantic -Wno-long-long -o poppler-cpp-test $SRCDIR/test-cpp.cpp `${CROSS_COMPILE}pkg-config --cflags --libs poppler-cpp` ./poppler-cpp-test "/usr/share/cups/data/default-testpage.pdf" diff -Nru poppler-20.09.0/debian/tests/glib poppler-20.09.0/debian/tests/glib --- poppler-20.09.0/debian/tests/glib 2020-09-03 21:12:14.000000000 +0200 +++ poppler-20.09.0/debian/tests/glib 2020-09-07 14:08:13.000000000 +0200 @@ -2,8 +2,13 @@ set -e SRCDIR=$(dirname $(realpath $0)) -cd $AUTOPKGTEST_TMP -gcc -Wall -Werror -std=c99 -o poppler-glib-test $SRCDIR/test-glib.c `pkg-config --cflags --libs poppler-glib` -./poppler-glib-test "file:///usr/share/cups/data/default-testpage.pdf" -gcc -Wall -Werror -std=c99 -o poppler-glib-test $SRCDIR/test-glib.c -DTEST_GIO `pkg-config --cflags --libs poppler-glib gio-2.0` + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + +cd $ADTTMP +${CROSS_COMPILE}gcc -Wall -Werror -std=c99 -o poppler-glib-test $SRCDIR/test-glib.c `${CROSS_COMPILE}pkg-config --cflags --libs poppler-glib` ./poppler-glib-test "file:///usr/share/cups/data/default-testpage.pdf" diff -Nru poppler-20.09.0/debian/tests/qt5 poppler-20.09.0/debian/tests/qt5 --- poppler-20.09.0/debian/tests/qt5 2020-09-03 21:12:14.000000000 +0200 +++ poppler-20.09.0/debian/tests/qt5 2020-09-07 14:08:13.000000000 +0200 @@ -2,6 +2,13 @@ set -e SRCDIR=$(dirname $(realpath $0)) -cd $AUTOPKGTEST_TMP -g++ -Wall -Werror -pedantic -Wno-long-long -fPIC -std=c++11 -o poppler-qt5-test $SRCDIR/test-qt5.cpp `pkg-config --cflags --libs poppler-qt5 Qt5Core` + +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi + +cd $ADTTMP +${CROSS_COMPILE}g++ -Wall -Werror -pedantic -Wno-long-long -fPIC -std=c++11 -o poppler-qt5-test $SRCDIR/test-qt5.cpp `${CROSS_COMPILE}pkg-config --cflags --libs poppler-qt5 Qt5Core` ./poppler-qt5-test "/usr/share/cups/data/default-testpage.pdf"

