systemd FTBFS on bionic containers due to test-fs-util
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Ubuntu Pro | Status tracked in 18.04 | |||||
18.04 |
In Progress
|
High
|
Heitor Alves de Siqueira | |||
systemd (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
On Ubuntu 18.04 containers, systemd can FTBFS due to test-fs-util failing. When test-fs-util attempts to chmod a symbolic link, this can fail with EOPNOTSUPP depending on multiple factors (kernel versions, syscall support, underlying file system).
To fix and make systemd's behavior consistent, we backport the following chmod() and chown() related patches from upstream:
4dfaa528d451 fs-util: introduce fchmod_opath()
b8da477eaf6c fs-util: introduce fchmod_and_chown()
de321f522829 fs-util: beef up chmod_and_chown() a bit
30ff18d8a2cd fs-util: change chmod_and_chown() to not complain if stat data already matches
2dbb7e94af4f fs-util: rewrite chmod_and_chown()
71ec74d19332 fs-util: no need for fchmod_and_chown() to access /proc/self/fd directly
4b3b5bc71b79 tree-wide: port various places over to use chmod_and_chown()
f63383a31fa4 test-fs-util: don't validate mode of symlinks
This ensures the following:
- systemd will be aware and respect syscall behavior from chmod variants (e.g. fchmod on a symlink with O_PATH)
- systemd's touch_file() will not exhibit different chmod/chown behavior across different filesystems (e.g. ZFS vs ext4)
- systemd won't be hamstringed by libc changing the syscalls depending on what's available in the host kernel (e.g. fchmodat2())
- enforce that symlink permissions are disregarded (as per symlink(
Changed in systemd (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
Since this does not seem to affect any releases newer than 18.04, I've marked this as Fix Released. This does need to be fixed for Ubuntu Pro 18.04, in any case.