Package: gnupg2 Version: 2.2.4-1 Tags: patch gnupg2 sometimes randomly fails to build from source.
The reason is, that the tests are started in parallel, which then generates a system load of ~ 40 on the 4-way hppa machine (probably due to slow atomic operations and slow fork() implementations). That then makes that the waiting in the tests often times out and thus breaks the build. The attached patch disables the parallel tests on hppa and thus fixes the problem. While at it, the patch re-enables "-pie" again on hppa, now since "-pie" works on hppa. Please apply for the next upload, Thanks! Helge
diff -up ./debian/rules.org ./debian/rules --- ./debian/rules.org 2018-01-19 23:36:09.062043770 +0100 +++ ./debian/rules 2018-01-20 10:57:03.899610275 +0100 @@ -14,14 +14,23 @@ include /usr/share/dpkg/architecture.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all -# avoid -pie for gpgv-static on hppa, kfreebsd-amd64, and x32 +# avoid -pie for gpgv-static on kfreebsd-amd64, and x32 # platforms, which cannot support it by default: -ifeq (,$(filter $(DEB_HOST_ARCH), hppa kfreebsd-amd64 x32)) +ifeq (,$(filter $(DEB_HOST_ARCH), kfreebsd-amd64 x32)) GPGV_STATIC_HARDENING = "-pie" else GPGV_STATIC_HARDENING = "" endif +# Avoid parallel tests on hppa architecture. +# Parallel tests generates high load on machine which causes timeouts and thus +# triggers unexpected failures. +ifeq (,$(filter $(DEB_HOST_ARCH), hppa)) +AUTOTEST_FLAGS = "--parallel" +else +AUTOTEST_FLAGS = "--no-parallel" +endif + %: dh $@ --with=autoreconf --builddirectory=build @@ -68,7 +77,7 @@ override_dh_auto_build-indep: override_dh_auto_test: - dh_auto_test --builddirectory=build -- verbose=3 TESTFLAGS=--parallel + dh_auto_test --builddirectory=build -- verbose=3 TESTFLAGS=$(AUTOTEST_FLAGS) override_dh_shlibdeps: # Make ldap a recommends rather than a hard dependency.

