Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927311 - app-containers/buildah-1.35.1 fails to build on SELinux
Summary: app-containers/buildah-1.35.1 fails to build on SELinux
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-03-19 21:58 UTC by Kenton Groombridge
Modified: 2024-10-24 19:53 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.gz,366.51 KB, application/gzip)
2024-03-19 21:58 UTC, Kenton Groombridge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenton Groombridge gentoo-dev 2024-03-19 21:58:12 UTC
buildah's Makefile makes an unfortunate assumption about the loaded SELinux policy and tries to relabel the buildah binary with a type that doesn't exist in Gentoo's policy (container_runtime_exec_t vs. podman_exec_t).

It seems setting SELINUXOPT to an empty value successfully tricks the build system to skip its SELinux relabeling step, then Portage will take care of it like normal.
Comment 1 Kenton Groombridge gentoo-dev 2024-03-19 21:58:53 UTC
Created attachment 887957 [details]
build.log
Comment 2 Larry the Git Cow gentoo-dev 2024-10-24 19:53:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4193619d18a9b6302d5285db67f5da2096a20438

commit 4193619d18a9b6302d5285db67f5da2096a20438
Author:     Kenton Groombridge <concord@gentoo.org>
AuthorDate: 2024-10-24 15:16:26 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-10-24 19:52:10 +0000

    app-containers/buildah: fix SELinux relabeling
    
    The Makefile relabels the buildah executable during installation and
    defaults to using container_runtime_exec_t which does not exist in
    Gentoo's SELinux policies. Disable the automatic relabeling during
    install and let portage take care of it to avoid this error.
    
    Closes: https://bugs.gentoo.org/927311
    Signed-off-by: Kenton Groombridge <concord@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/39098
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/buildah/buildah-1.35.3.ebuild | 3 ++-
 app-containers/buildah/buildah-1.35.4.ebuild | 3 ++-
 app-containers/buildah/buildah-1.36.0.ebuild | 3 ++-
 app-containers/buildah/buildah-9999.ebuild   | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)