Package: libhandy Version: 0.0.12-1 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu focal ubuntu-patch
The new version is failing the build autopkgtest https://ci.debian.net/data/autopkgtest/testing/amd64/libh/libhandy/3651396/log.gz The attached patch fixes the issue and update the build test to be closer from what other GNOME components are doing - update the test to be cross-test friendly (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946303 for details/another example of such changes already done in Debian) - convert to use one sh script including the source and compiling in the tmpdir, basically copying the format used by other GNOME Debian packages - add a runtime basic command Cheers,
diff -Nru libhandy-0.0.12/debian/changelog libhandy-0.0.12/debian/changelog --- libhandy-0.0.12/debian/changelog 2019-12-12 09:49:04.000000000 +0100 +++ libhandy-0.0.12/debian/changelog 2019-12-13 15:07:06.000000000 +0100 @@ -1,3 +1,14 @@ +libhandy (0.0.12-2) UNRELEASED; urgency=medium + + * debian/tests: + update the build test to closer from other GNOME ones + and fix some issues/the current test failing + - don't use a deprecated function + - handle cross build autopkgtest environment + - include a runtime test as well + + -- Sebastien Bacher <seb...@ubuntu.com> Fri, 13 Dec 2019 13:17:01 +0100 + libhandy (0.0.12-1) unstable; urgency=medium * New upstream version 0.0.12 diff -Nru libhandy-0.0.12/debian/tests/build-test libhandy-0.0.12/debian/tests/build-test --- libhandy-0.0.12/debian/tests/build-test 2019-04-23 12:40:50.000000000 +0200 +++ libhandy-0.0.12/debian/tests/build-test 2019-12-13 15:09:37.000000000 +0100 @@ -1,9 +1,28 @@ -#!/usr/bin/make -f +#!/bin/sh -CFLAGS=$(shell pkg-config --cflags libhandy-0.0) -LIBS=$(shell pkg-config --libs libhandy-0.0) +if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then + CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" +else + CROSS_COMPILE= +fi -a.out: debian/tests/build-test.c - gcc $(CFLAGS) $< $(LIBS) - @echo "Build test of $< succeeded" - @rm -f a.out +cd "$AUTOPKGTEST_TMP" + +cat <<EOF > handytest.c +#include <gtk/gtk.h> +#define HANDY_USE_UNSTABLE_API +#include <handy.h> + +int +main (int argc, + char **argv) +{ + hdy_init(&argc, &argv); +} +EOF + +${CROSS_COMPILE}gcc -o handytest handytest.c $(${CROSS_COMPILE}pkg-config --cflags --libs libhandy-0.0) +echo "build ok" +[ -x handytest ] +xvfb-run -a -s "-screen 0 1024x768x24" ./handytest +echo "starts ok" diff -Nru libhandy-0.0.12/debian/tests/build-test.c libhandy-0.0.12/debian/tests/build-test.c --- libhandy-0.0.12/debian/tests/build-test.c 2019-10-25 21:01:06.000000000 +0200 +++ libhandy-0.0.12/debian/tests/build-test.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -#include <gtk/gtk.h> -#define HANDY_USE_UNSTABLE_API -#include <handy.h> - -int -main (int argc, - char **argv) -{ - hdy_dialer_new (); -} diff -Nru libhandy-0.0.12/debian/tests/control libhandy-0.0.12/debian/tests/control --- libhandy-0.0.12/debian/tests/control 2019-10-25 21:01:06.000000000 +0200 +++ libhandy-0.0.12/debian/tests/control 2019-12-13 14:59:16.000000000 +0100 @@ -1,5 +1,5 @@ Tests: build-test -Depends: libhandy-0.0-dev, build-essential, pkg-config +Depends: libhandy-0.0-dev, build-essential, pkg-config, xauth, xvfb Restrictions: allow-stderr Tests: python-gi-test