Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo: Add an option to label /usr/etc as /etc #3063

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

cgwalters
Copy link
Member

This will be very useful for enabling a "transient /etc" option because we won't have to do hacks relabling in the initramfs, or forcing it on just for composefs.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Oct 2, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
@cgwalters
Copy link
Member Author

coreos/rpm-ostree#4640

@cgwalters
Copy link
Member Author

I think this one is good to go, has a test case now.

src/ostree/ot-builtin-commit.c Outdated Show resolved Hide resolved
case 0:
break;
case 1:
flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit unsure about the epoch approach. Do you envision many more SELinux options that fall in the "clearly right, but needs ratcheting" category?

We could always add epochs later on that just combine the flags if that happens.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right the background for this is that today there's ostree admin init-fs --modern and I actually wanted to change the defaults there to do something else, and then it gets weird because it'd be need to be called like --really-modern or something 😄

You're probably right we wouldn't change things again (and if we did we'd probably arguably want to change the policy defaults).

But still, no harm done in making this a bit more future proof right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But still, no harm done in making this a bit more future proof right?

Just trying to keep out unnecessary complexity (YAGNI and all that). :)
But not strongly against.

case 0:
break;
case 1:
flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But still, no harm done in making this a bit more future proof right?

Just trying to keep out unnecessary complexity (YAGNI and all that). :)
But not strongly against.

src/libostree/ostree-repo-commit.c Outdated Show resolved Hide resolved
@cgwalters cgwalters force-pushed the label-usretc-as-etc branch 2 times, most recently from 7b0ad02 to 198effb Compare October 5, 2023 13:07
This will be very useful for enabling a "transient /etc" option
because we won't have to do hacks relabling in the initramfs, or
forcing it on just for composefs.
@cgwalters cgwalters merged commit 334f53d into ostreedev:main Oct 12, 2023
24 checks passed
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Oct 24, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Oct 24, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Oct 24, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Oct 24, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Oct 24, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
cgwalters added a commit to coreos/rpm-ostree that referenced this pull request Oct 25, 2023
Depends on ostreedev/ostree#3063

This is intended for use with ostreedev/ostree#2868
but is conceptually orthogonal to it; we probably want to try
switching to this by default actually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants