]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
classes/package_rpm: set bogus locations for passwd/group files
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 26 Jan 2024 13:34:53 +0000 (14:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Jan 2024 08:12:24 +0000 (08:12 +0000)
commitac8ea64bb39a5e56599e078c7e6cd056a2aa4144
treefbe906d40f5a8e7e44a843fee0b1ad2cac132e46
parent10064e364f015ad3c0c8d63511cd9a7da5e22c69
classes/package_rpm: set bogus locations for passwd/group files

Since https://github.com/rpm-software-management/rpm/commit/f3eaeeb7341085e1850e914350cf1f33d538320d
rpm does its own parsing of /etc/passwd and /etc/group instead of relying on getpwnam() and friends.

This has an unfortunate effect of leaking build host uid/gid values for users and groups
into the cpio header inside rpm file (where previously those were always zero).

Installation of rpm packages relies on rpm header to set files ownership, and that
is a different structure that is build from .spec information, so we can avoid host
contamination by setting the paths to something bogus.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/package_rpm.bbclass