features/merged-usr causes a file collision, because upstream creates a symlink: https://github.com/SELinuxProject/selinux/blob/master/policycoreutils/sestatus/Makefile#L22-L25 But, /usr/bin and /usr/sbin point to the same location with features/merged-usr being used: ❯ ls -ld /usr/bin /usr/sbin drwxr-xr-x 1 root root 29164 18. Sep 17:29 /usr/bin/ lrwxrwxrwx 1 root root 3 18. Sep 04:05 /usr/sbin -> bin/ Reproducible: Always Steps to Reproduce: 1. Create a profile such as: ❯ find /var/db/repos/localrepo/{metadata,profiles} -type f -exec head {} + ==> /var/db/repos/localrepo/metadata/layout.conf <== masters = gentoo thin-manifests = true profile-formats = portage-2 ==> /var/db/repos/localrepo/profiles/merged-usr_selinux/eapi <== 8 ==> /var/db/repos/localrepo/profiles/merged-usr_selinux/parent <== gentoo:default/linux/amd64/17.1/selinux gentoo:features/merged-usr ==> /var/db/repos/localrepo/profiles/profiles.desc <== amd64 merged-usr_selinux dev ==> /var/db/repos/localrepo/profiles/repo_name <== localrepo 2. Execute "merge-usr": ❯ env ACCEPT_KEYWORDS="~amd64" emerge -1a sys-apps/merge-usr ❯ merge-usr 3. Select above profile while following the SELinux installation steps: https://wiki.gentoo.org/wiki/SELinux/Installation Actual Results: A file collision: * Package 'sys-apps/policycoreutils-3.4' has internal collisions between * non-identical files (located in separate directories in the * installation image (${D}) corresponding to merged directories in the * target filesystem (${ROOT})): * * /usr/bin/sestatus * /usr/bin/sestatus * /usr/sbin/sestatus * Differences: type, mode * * Package 'sys-apps/policycoreutils-3.4' NOT merged due to internal * collisions between non-identical files. If necessary, refer to your * elog messages for the whole content of the above message. Expected Results: Successful installation
Created attachment 812086 [details] builg.log
Created attachment 812089 [details] emerge --info
Created attachment 812092 [details] build.log Renamed "builg.log" to "build.log"
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=942fc9d97da6e465797296154b66e86687f30f51 commit 942fc9d97da6e465797296154b66e86687f30f51 Author: Kenton Groombridge <concord@gentoo.org> AuthorDate: 2022-09-19 17:14:48 +0000 Commit: Kenton Groombridge <concord@gentoo.org> CommitDate: 2022-09-19 17:20:59 +0000 sys-apps/policycoreutils: fix install on merged-usr Upstream sestatus Makefile installs a compatibility symlink for the sestatus binary. Remove this symlink when USE=merged-usr to fix an internal file collision. Closes: https://bugs.gentoo.org/871501 Signed-off-by: Kenton Groombridge <concord@gentoo.org> sys-apps/policycoreutils/policycoreutils-3.3.ebuild | 7 ++++++- sys-apps/policycoreutils/policycoreutils-3.4.ebuild | 7 ++++++- sys-apps/policycoreutils/policycoreutils-9999.ebuild | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-)