Repository navigation
Conversation
| if [ -d $INSTTREE/etc ]; then # on CentOS, the dbus service file is in /usr | ||
| rsync -rlv $INSTTREE/etc/ vmcheck/usr/etc/ | ||
| fi | ||
| chcon -t install_exec_t vmcheck/usr/{bin/{rpm-,}ostree,libexec/rpm-ostreed} |
There was a problem hiding this comment.
I think what we really need here is ostree commit --selinux-label.
There was a problem hiding this comment.
Agreed, that makes sense. I opened ostreedev/ostree#1113.
|
WDYT about reworking this to use ostreedev/ostree#1114 ? |
1e42306 to
e839a35
Compare
|
Yup, sounds good. Done above. ⬆️ |
|
bot, retest this please |
The new --selinux-policy added in [0] exposed a subtle issue in the way we handle labeling during commit. The CI system in rpm-ostree hit this when trying to make use of it[1]. Basically, because of the way we use a GVariant to represent xattrs, if a file to be committed already has an SELinux label, the xattr object ends up with *two* label entries. This of course throws off fsck later on, since the checksum will have gone over both entries, even though the on-disk file will only have a single label (in which the second entry wins). I confirmed that the `fsck` added in the installed test fails without the rest of this patch. [0] ostreedev#1114 [1] coreos/rpm-ostree#953
|
Requires ostreedev/ostree#1121. |
The new --selinux-policy added in [0] exposed a subtle issue in the way we handle labeling during commit. The CI system in rpm-ostree hit this when trying to make use of it[1]. Basically, because of the way we use a GVariant to represent xattrs, if a file to be committed already has an SELinux label, the xattr object ends up with *two* label entries. This of course throws off fsck later on, since the checksum will have gone over both entries, even though the on-disk file will only have a single label (in which the second entry wins). I confirmed that the `fsck` added in the installed test fails without the rest of this patch. [0] #1114 [1] coreos/rpm-ostree#953 Closes: #1121 Approved by: cgwalters
We shouldn't need this anymore. Closes: #953 Approved by: cgwalters
Let's make SELinux and atomic-host-tests happy with trees we concoct ourselves by using the new --selinux-policy. (Specifically, we want our sync'ed binaries to have install_exec_t). Closes: #953 Approved by: cgwalters
|
💔 Test failed - status-atomicjenkins |
Hmm... |
|
☔ The latest upstream changes (presumably 7fbf9f3) made this pull request unmergeable. Please resolve the merge conflicts. |
e839a35 to
d193202
Compare
|
Heh, that was a tricky one. Rebased and fixup added! ⬆️ |
I had meant for this to be in the other PR#968. I originally did both `make` and `make install` there, but now it only does `make install`, so let's just rename it to make that more obvious.
We shouldn't need this anymore.
Let's make SELinux and atomic-host-tests happy with trees we concoct ourselves by using the new --selinux-policy. (Specifically, we want our sync'ed binaries to have install_exec_t).
d193202 to
660a387
Compare
| rsync -rlv $INSTTREE/etc/ vmcheck/usr/etc/ | ||
| fi | ||
|
|
||
| # ✀✀✀ BEGIN hack to get --selinux-policy (https://github.com/ostreedev/ostree/pull/1114) ✀✀✀ |
There was a problem hiding this comment.
Maybe only do this if we don't detect --selinux-policy in the target, i.e. if ! ostree commit --help | grep -q -e --selinux-policy?
|
|
||
| ostree refs --delete vmcheck || true | ||
| ostree commit -b vmcheck -s '' --tree=dir=vmcheck --link-checkout-speedup | ||
| ostree commit -b vmcheck --selinux-policy vmcheck -s '' \ |
There was a problem hiding this comment.
Let's say --selinux-policy=vmcheck to be really clear we're pulling the policy from there?
There was a problem hiding this comment.
(And while we're here drop -s '' since it's not required nowadays?)
|
Fixups! ⬆️ |
We shouldn't need this anymore. Closes: #953 Approved by: cgwalters
Let's make SELinux and atomic-host-tests happy with trees we concoct ourselves by using the new --selinux-policy. (Specifically, we want our sync'ed binaries to have install_exec_t). Closes: #953 Approved by: cgwalters
|
☀️ Test successful - status-atomicjenkins |
Let's make SELinux and atomic-host-tests happy with trees we concoct
ourselves with a measured sprinkle of bash brace expansion.