buildah/copier
Matt Heon 8165aae9e8 Do not error on trying to write IMA xattr as rootless
Rootless users cannot set the `security.ima` xattr on files
(presumably for security reasons, they get an EPERM on trying to
do so). We will normally try and preserve that xattr, so when
trying to add a file with an IMA xattr to a build on a Buildah
without this patch, you get an error. With this patch, the error
is downgraded to a warning, as it's better to successfully build
with a missing xattr than blocking all builds which want to
include the offending file.

The urgency on this has become somewhat higher as it seems like
F41/Rawhide are installing rpm-plugin-ima by default, which is
setting IMA xattrs on some files that Podman relies on - for
example, the catatonit binary we use for pid pause images.
Without this patch, building the pause image as rootless will
always fail on a system with rpm-plugin-ima installed.

Fixes: https://github.com/containers/podman/issues/18543

<MH: Cherry picked back to release-1.37, conflicts fixed>

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-09-19 14:47:48 -04:00
..
copier.go copierWithSubprocess(): try to capture stderr on io.ErrClosedPipe 2024-05-20 09:35:48 -04:00
copier_linux_test.go Replace io/ioutil calls with os calls 2022-12-06 14:29:32 -05:00
copier_test.go Remove use of deprecated tar.TypeRegA 2023-06-12 11:25:03 -04:00
copier_unix_test.go copier: add Remove() 2021-04-20 14:09:50 -04:00
hardlink_not_uint64.go copier: remove libimage dependency via util package 2023-09-12 14:08:41 +02:00
hardlink_uint64.go Add netbsd to lists-of-OSes 2024-06-01 22:25:08 -04:00
hardlink_unix.go Spell unix as "!windows" 2024-06-01 22:25:47 -04:00
hardlink_windows.go copier: remove libimage dependency via util package 2023-09-12 14:08:41 +02:00
mknod_int.go Make util and copier build on FreeBSD 2022-06-13 13:36:20 +01:00
mknod_uint64.go Make util and copier build on FreeBSD 2022-06-13 13:36:20 +01:00
syscall_unix.go Fix stutters 2022-09-19 07:11:44 -04:00
syscall_windows.go copier: add GetOptions.NoCrossDevice 2021-04-14 10:19:19 -04:00
xattrs.go Do not error on trying to write IMA xattr as rootless 2024-09-19 14:47:48 -04:00
xattrs_test.go Replace io/ioutil calls with os calls 2022-12-06 14:29:32 -05:00
xattrs_unsupported.go Add the "copier" package 2020-07-20 23:08:57 -04:00