Package: autopkgtest
Version: 5.22
Severity: normal

autopkgtest fails with restrictive permissions:

+---
| $ (umask 077; autopkgtest ../*_4.0.3-6_amd64.deb  . -- schroot unstable-amd64)
| autopkgtest [20:16:45]: starting date: 2022-07-16
| autopkgtest [20:16:45]: version 5.22
| autopkgtest [20:16:45]: host [...]; command line: /usr/bin/autopkgtest [...] 
. -- schroot unstable-amd64
| autopkgtest [20:16:45]: testbed dpkg architecture: amd64
| Unexpected error:
| Traceback (most recent call last):
|   File "/usr/share/autopkgtest/lib/VirtSubproc.py", line 768, in mainloop
|     command()
|   File "/usr/share/autopkgtest/lib/VirtSubproc.py", line 697, in command
|     r = f(c, ce)
|   File "/usr/share/autopkgtest/lib/VirtSubproc.py", line 635, in cmd_copyup
|     copyupdown(c, ce, True)
|   File "/usr/share/autopkgtest/lib/VirtSubproc.py", line 519, in copyupdown
|     copyupdown_internal(ce[0], c[1:], upp)
|   File "/usr/share/autopkgtest/lib/VirtSubproc.py", line 544, in 
copyupdown_internal
|     copyup_shareddir(sd[0], sd[1], dirsp, downtmp_host)
|   File "/usr/share/autopkgtest/lib/VirtSubproc.py", line 458, in 
copyup_shareddir
|     shutil.copy(tb, host)
|   File "/usr/lib/python3.10/shutil.py", line 417, in copy
|     copyfile(src, dst, follow_symlinks=follow_symlinks)
|   File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
|     with open(src, 'rb') as fsrc:
| PermissionError: [Errno 13] Permission denied: 
'/var/run/schroot/mount/unstable-amd64-efaeee30-3ea3-467d-ad24-d7ba96bb1072/tmp/autopkgtest.pbGOEr/testbed-packages'
| autopkgtest [20:16:45]: ERROR: testbed failure: cannot send to testbed: 
[Errno 32] Broken pipe
+---

The run is successful when I call autopkgtest with the unsafe umask 022.

Slighly unrelated: shouldn't `/usr/bin/autopkgtest-virt-schroot` be in
`/usr/lib/autopkgtest` or `/usr/libexec/autopkgtest`? It doesn't seem
to be a tool that users call interactively from their shell and thus
shouldn't be in PATH.

Ansgar

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'stable-security'), (500, 'stable-debug'), (500, 'testing'), (500, 'stable'), 
(500, 'oldstable'), (300, 'buildd-unstable'), (300, 'unstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.18.0-2-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages autopkgtest depends on:
ii  apt-utils       2.5.1
ii  libdpkg-perl    1.21.9
ii  procps          2:3.3.17-7+b1
ii  python3         3.10.4-1+b1
ii  python3-debian  0.1.46

Versions of packages autopkgtest recommends:
pn  autodep8  <none>

Versions of packages autopkgtest suggests:
pn  fakemachine       <none>
pn  lxc               <none>
pn  lxd               <none>
ii  ovmf              2022.05-2
pn  ovmf-ia32         <none>
pn  qemu-efi-aarch64  <none>
pn  qemu-efi-arm      <none>
pn  qemu-system       <none>
ii  qemu-utils        1:7.0+dfsg-7
ii  schroot           1.6.10-16
pn  vmdb2             <none>

-- no debconf information

Reply via email to