sys-apps/policycoreutils: update correct SELinux store#1502
Conversation
The policycoreutils ebuild calls `semodule` in postinst to update SELinux stores. It does not, however, tells `semodule` the correct ROOT to use, so builds that go into `/build/[arch]-usr` end up updating the SDK's store. Fixes libsemanage.semanage_commit_sandbox: Error while renaming /var/lib/selinux/targeted/active to /var/lib/selinux/targeted/previous. (Invalid cross-device link) observed when using the SDK Container to build the OS image. It now also updates the correct store, which it previously did not.
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
e83a107 to
d0123d5
Compare
|
Rebased on latest main (for the containerd-1.5.8 tarball checksum fix). |
krnowak
left a comment
There was a problem hiding this comment.
Looks good (if it fixes your issue and CI is fine).
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
|
Added a bugfix changelog file. |
|
CI run successful, will merge and cherry-pick for flatcar-3033, flatcar-3066, and flatcar-3087. |
sys-apps/policycoreutils: update correct SELinux store by t-lo
sys-apps/policycoreutils: update correct SELinux store by t-lo
sys-apps/policycoreutils: update correct SELinux store by t-lo
The policycoreutils ebuild calls 'semodule' in postinst to update
SELinux stores. It does not, however, tells semodule the correct ROOT
to use, so installing policycoreutils in a crossdev environment will
actually update the *host's* store.
This patch adds '-S "${ROOT:-/}"' to the 'semodule' call so the correct
environment is updated.
First seen + fixed in Flatcar Container Linux:
flatcar-archive/coreos-overlay#1502
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
The policycoreutils ebuild calls 'semodule' in postinst to update
SELinux stores. It does not, however, tells semodule the correct ROOT
to use, so installing policycoreutils in a crossdev environment will
actually update the *host's* store.
This patch adds '-S "${ROOT:-/}"' to the 'semodule' call so the correct
environment is updated.
First seen + fixed in Flatcar Container Linux:
flatcar-archive/coreos-overlay#1502
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
Closes: #23332
Signed-off-by: Sam James <sam@gentoo.org>
The used changelog entry format in #1502 is not really useful for the release notes. This paragraph is good for the PR description or a commit message, but here should be a bullet point for the release notes. Replace the paragraph by a release notes bullet point.
| @@ -0,0 +1,10 @@ | |||
| The policycoreutils ebuild calls semodule in postinst to update SELinux stores. | |||
There was a problem hiding this comment.
This changelog entry format is not really useful for the release notes. This paragraph is good for the PR description or a commit message, but here should be a bullet point for the release notes, e.g., - SDK: Fixed build error popping up in the new SDK Container because policycoreutils used the wrong ROOT to update the SELinux store ([PR#1502](https://github.com/flatcar-linux/coreos-overlay/pull/1502))
I'll file a PR for that here: #1537
The used changelog entry format in #1502 is not really useful for the release notes. This paragraph is good for the PR description or a commit message, but here should be a bullet point for the release notes. Replace the paragraph by a release notes bullet point.
The used changelog entry format in #1502 is not really useful for the release notes. This paragraph is good for the PR description or a commit message, but here should be a bullet point for the release notes. Replace the paragraph by a release notes bullet point.
The used changelog entry format in flatcar-archive/coreos-overlay#1502 is not really useful for the release notes. This paragraph is good for the PR description or a commit message, but here should be a bullet point for the release notes. Replace the paragraph by a release notes bullet point.
The policycoreutils ebuild calls
semodulein postinst to update SELinux stores.It does not, however, tells
semodulethe correct ROOT to use, so builds that go into/build/[arch]-usrend up updating the SDK's store.Fixes
libsemanage.semanage_commit_sandbox: Error while renaming /var/lib/selinux/targeted/active to /var/lib/selinux/targeted/previous. (Invalid cross-device link)
observed when using the SDK Container to build the OS image.
It now also updates the correct store, which it previously did not.
We should consider cherry-picking this patch to flatcar-3033, flatcar-3066, and flatcar-3087.
CI (running): http://jenkins.infra.kinvolk.io:8080/job/os/job/manifest/4397/cldsv/