Bug#993915: libguestfs FTBFS on some buildds

2021-09-08 Thread Aurelien Jarno
control: tag -1 + patch

On 2021-09-08 09:32, Adrian Bunk wrote:
> Source: libguestfs
> Version: 1:1.44.1-4
> Severity: serious
> Tags: ftbfs
> 
> https://buildd.debian.org/status/logs.php?pkg=libguestfs=1%3A1.44.1-4
> 
> ...
> unset XDG_RUNTIME_DIR; \
>   if ! test -w /dev/kvm; then \
>   export LIBGUESTFS_BACKEND_SETTINGS=force_tcg; \
>   fi
> make -C /<>/debian/build-4 quickcheck
> make[2]: Entering directory '/<>/debian/build-4'
> ./run test-tool/libguestfs-test-tool
> libguestfs: error: converting path to absolute path: XDG_RUNTIME_DIR: 
> /run/user/2952: realpath: No such file or directory
>  
>  *IMPORTANT NOTICE
>  *
>  * When reporting bugs, include the COMPLETE, UNEDITED
>  * output below in your bug report.
>  *
>  
> /<>/debian/build-4/test-tool/.libs/libguestfs-test-tool: failed 
> parsing environment variables.
> Check earlier messages, and the output of the ‘printenv’ command.
> make[2]: *** [Makefile:3187: quickcheck] Error 1
> 
> 
> 08:46 < bunk> on x86 and arm64, *except* x86-grnet-01
> 08:46 < bunk> 1. Why not on grnet?
> 08:46 < bunk> 2. Is dh compat 13 worth a recommendation to the maintainer?
> 09:17 < aurel32> i guess it's because the buildds at grnet are using 
> pybuildd, which is not affected by the libpam-systemd/schroot bug
> 09:19 < aurel32> and yes debhelper compat 13 might help there, at least 
> present a stable environment
> 
> 
> The dh compat 13 change is
> 
>   The dh_auto_* helpers now reset the environment variables
>   HOME and common XDG_* variable.  Please see description of
>   the environment variables in "ENVIRONMENT" for how this is
>   handled.

Note that the issue has been introduced by the following commit:
https://salsa.debian.org/libvirt-team/libguestfs/-/commit/254b60b64de1346511a2262b5161973f5f01dcaa

Before that commit the unset and make where called in the same subshell,
so XDG_RUNTIME_DIR was correctly unset when calling make.

After that commit, the first part is executed in one subshell and the
make in another subshell, causing the first part to just be a noop.

Therefore a minimal fix is the following:

--- a/debian/rules
+++ b/debian/rules
@@ -130,7 +130,7 @@ ifneq "" "$(findstring 
$(DEB_HOST_ARCH),$(QUICKCHECK_ARCHITECTURES))"
unset XDG_RUNTIME_DIR; \
if ! test -w /dev/kvm; then \
export LIBGUESTFS_BACKEND_SETTINGS=force_tcg; \
-   fi
+   fi ; \
make -C $(CURDIR)/debian/build-$(BUILD_COUNT) quickcheck
 endif

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Bug#993915: libguestfs FTBFS on some buildds

2021-09-08 Thread Adrian Bunk
Source: libguestfs
Version: 1:1.44.1-4
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/logs.php?pkg=libguestfs=1%3A1.44.1-4

...
unset XDG_RUNTIME_DIR; \
if ! test -w /dev/kvm; then \
export LIBGUESTFS_BACKEND_SETTINGS=force_tcg; \
fi
make -C /<>/debian/build-4 quickcheck
make[2]: Entering directory '/<>/debian/build-4'
./run test-tool/libguestfs-test-tool
libguestfs: error: converting path to absolute path: XDG_RUNTIME_DIR: 
/run/user/2952: realpath: No such file or directory
 
 *IMPORTANT NOTICE
 *
 * When reporting bugs, include the COMPLETE, UNEDITED
 * output below in your bug report.
 *
 
/<>/debian/build-4/test-tool/.libs/libguestfs-test-tool: failed 
parsing environment variables.
Check earlier messages, and the output of the ‘printenv’ command.
make[2]: *** [Makefile:3187: quickcheck] Error 1


08:46 < bunk> on x86 and arm64, *except* x86-grnet-01
08:46 < bunk> 1. Why not on grnet?
08:46 < bunk> 2. Is dh compat 13 worth a recommendation to the maintainer?
09:17 < aurel32> i guess it's because the buildds at grnet are using pybuildd, 
which is not affected by the libpam-systemd/schroot bug
09:19 < aurel32> and yes debhelper compat 13 might help there, at least present 
a stable environment


The dh compat 13 change is

  The dh_auto_* helpers now reset the environment variables
  HOME and common XDG_* variable.  Please see description of
  the environment variables in "ENVIRONMENT" for how this is
  handled.