Re: Bug#1117775: ssh-agent-filter: FTBFS: head: cannot open '/tmp/shunit.yOSH99/tmp/sap_out' for reading: No such file or directory

Timo Weingärtner <[email protected]> Fri, 10 Oct 2025 21:25:10 +0200
Newsgroups gmane.linux.debian.devel.ssh
Message-ID <[email protected]>
control: tags 

Hallo Santiago Vila,

10.10.25 18:28 Santiago Vila:
> Package: src:ssh-agent-filter
> Version: 0.5.2-1
> Severity: serious
> Tags: ftbfs forky sid
> 
> Dear maintainer:
> 
> During a rebuild of all packages in unstable, this package failed to build.
> 
> Below you will find the last part of the build log (probably the most
> relevant part, but not necessarily). If required, the full build log
> is available here:
> 
> https://people.debian.org/~sanvila/build-logs/202510/
> 
> About the archive rebuild: The build was made on virtual machines from AWS,
> using sbuild and a reduced chroot with only build-essential packages.
> 
> If you cannot reproduce the bug please contact me privately, as I
> am willing to provide ssh access to a virtual machine where the bug is
> fully reproducible.
> 
> If this is really a bug in one of the build-depends, please use
> reassign and add an affects on src:ssh-agent-filter, so that this is still
> visible in the BTS web page for this package.
> 
> Thanks.
> 
> ----------------------------------------------------------------------------
> ---- [...]

>    dh_auto_test
> 	make -j2 test
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> PATH="$(pwd):$PATH" ./tests
> ensure_mkdir: mkdir /sbuild-nonexistent/.ssh: No such file or directory
> 
> main: Couldn't prepare agent socket
> 
> Could not open a connection to your authentication agent.
> ---------------------------------------------------------------------------
> -----

That error message seems to be from this code[1] in ssh-agent, which is 
started for the test[2], complaining about a nonexistent home dir.

IIRC there were changes to the default build environment lately, but can't 
find the corresponding announce email. IMO it is correct to require that a 
build does not do random changes to the users home dir, more specific: outside 
of build and temp dirs.

I can't see why ssh-agent would need to have stuff created in the home dir, 
but from a quick look in its code it seems like I can give it a $HOME in a 
temp location as a workaround, but i'm not really sure; I remember some parts 
of openssh-client ignoring $HOME and doing a passwd-lookup instead.

@ssh maintainers: what's your take on this? What's the correct way to invoke 
ssh-agent in a build time test?

I'll look into reproducing and then fixing this as time permits.

I'm reluctant to reassign this bug to src:openssh.


Grüße
Timo

[1] https://sources.debian.org/src/openssh/1:10.1p1-2/misc-agent.c?hl=181#L181
[2] https://sources.debian.org/src/ssh-agent-filter/0.5.2-1/tests?hl=30#L30
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE87+TxUS8xnavTxo5VO6rSJSm4+0FAmjpXZYACgkQVO6rSJSm
4+1ltQ/+MiF53dkMUzOYumv7E0GkotXYAF8D6faLMdC5SXsdeLcOEy5JPVWPggWY
08/Y/m0Q1xUuJFlcPcAVsY6wEKSanB1INNT2s8u39bvr1qwM1vFNpiS0ehK4+1xm
CAdlzfofITVCVKYr3V5Gm8613wwE/Q6ZvcYW8A6t4ht9DCgaHCo8SGbeupZgTgio
6tbFSpOKQViYqv6LtqOf06+P6+vsyvVkuCgYeSXvJAlOvGd1UN+Ktg2XHoCH8EzI
o/+F6c2tNpKnJqBLTz1aJpFAmQUiwfjnk0ZayOnpwY9hJ31BWODQPeUX2FUTGw+S
5yKJqZndcqHuDzkKyejRnbPTmVv0gYuAiH8OckgFMUWyCwM04beR6A/w3WWFldiM
48Mdf8ESPfK+B6YgO1K0/5fgu2/V9CvwWPmFMRFbDK7RuOT7FHbZ83X68/5xWTuk
jYwubiL0OqY8FLwASGiykLkF9d4DFx5KMNJ4f6qrNJAM4tZWY/RGCwW3mlCqDcrl
uI/RkxMvuTMx2eiERbKu/QRhuTfZa7RSVZxitUrQC2jc1eG+jVpDrzkSNWGmidWq
JMPzZQd1uGCReg8vyE1NUVjRJN897NoGR+i0oP84ijDnAD9RbCXOg14UN/Frd53K
mSL+44Pv+Oo7dwYbID19tfx0ye8yNOl6/SVc0SBZ6yeTUGf8TXA=
=/mHA
-----END PGP SIGNATURE-----