Bug#950533: upgrade fails in a chroot

Michael Biebl biebl at debian.org
Mon Feb 3 10:02:13 GMT 2020


Hi Steve,

thanks for the bug report.

Am 03.02.20 um 09:59 schrieb Steve McIntyre:

> ACL operation on "/var/log/journal" failed: No such file or directory
> ACL operation on "/var/log/journal" failed: No such file or directory
> Failed to re-open '/var/log/journal': No such file or directory
> fchmod() of /var/log/journal failed: No such file or directory
> dpkg: error processing package systemd (--configure):
>  installed systemd package post-installation script subprocess returned error exit status 73
> Errors were encountered while processing:
>  systemd
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> I don't have a /var/log/journal in those chroots.

The error message is misleading. postinst does create a /var/log/journal
directory. From a quick investigation with strace, the following seems
relevant

> getxattr("/proc/self/fd/4", "system.posix_acl_access", 0x7ffc2fdcc8c0, 132) = -1 ENOENT (No such file or directory)
> writev(2, [{iov_base="ACL operation on \"/var/log/journ"..., iov_len=69}, {iov_base="\n", iov_len=1}], 2ACL operation on "/var/log/journal" failed: No such file or directory

Mounting a proc fs inside the chroot does fix the failure for me.

We run systemd-tmpfiles --create --prefix /var/log/journal
after creating the directory to ensure proper permissions and ACLs are
applied. Apparently this requires a mounted proc fs.

https://salsa.debian.org/systemd-team/systemd/blob/debian/master/src/core/chown-recursive.c#L17

A quick fix could be to guard the systemd-tmpfiles call with a

if mountpoint -q /proc ; then
...
fi



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20200203/a45ed860/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list