Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
init: optionally load the system SELinux policy #400
base: master
Are you sure you want to change the base?
init: optionally load the system SELinux policy #400
Changes from 11 commits
69d80f4
0a5f876
c465b81
6063686
57b94a2
6910b6d
67c3d8b
55b82d8
15e2f6e
ca63b57
159ffac
0e959a7
a40f43a
7d88201
157a78a
01640d8
a8ecd7d
10c8198
e4b5b3e
02b93a8
66be73d
e06e054
4bf712a
eadc90c
86a9f0c
8737eef
f093426
e40b38e
a6af309
25eb167
d90b013
1f2f7cf
ab15586
90b789b
c0cef53
2a6af9d
ef2c41f
8f1ac95
64ec986
266cc8c
cec70a6
4774421
38fdef4
b7ef63a
7d5ac36
c502a07
6f3f5cd
4a5d7c1
350fed8
376c1cc
5d143f4
cc8bcb7
653ecf4
46ac998
1a79e2f
46331bf
26c1855
c2cf2f9
f360aff
9260c20
0f114a6
c5b6aae
6be8175
a3062d7
3b674b3
7e52501
ed2a166
7a843a0
622790e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As was mentioned:
Now it is:
That is not specifying the default, it's just a statement of availability.
Also "avilable" has a typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option was changed to
--disable-selinux-policy
, you need to update the documentation to match.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a simple
[libselinux]
instead of a variable, because we don't many dependencies right now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no harm having a variable if it makes things clearer - putting
[libselinux]
here makes it seem like the library is always a dependency. Does this actually work correctly if libselinux isn't found? (I guess it does because the CI build passed). Anyway I guess it can stay as is it now is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually. Build output shows:
... why is libselinux considered a "run-time dependency"? Is it because of this? Then I think it needs to be changed back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libselinux is a "run-time dependency" in the sense that it is being searched for in order to use it when compiling installable executables.
It would be a
if it was searched for using
dependency('libselinux', native: true)
and its purpose was during a cross-compile to compile native executables that required libselinux and could be used as e.g. code generator programs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependencies can be looked up only optionally, in this case:
it will only be looked up when the "support-selinux={enabled|disabled|auto}" build option permits it. (In the enabled case, the configuration will fatally error out when libselinux is not found -- it is required, so you cannot proceed without it. The default is "auto" and the CI build doesn't have a selinux system so it configures without selinux. In the "disabled" case, even if libselinux is installed and available, meson ignores it because you disabled support and will return "Dependency libselinux skipped: feature support-selinux disabled".) The return value can be checked to see if it was indeed found -- and either way, you can use it anywhere a dependency is a valid parameter type.
So it is always safe to pass it even if it isn't used, greatly reducing the amount of control flow necessary for converting build configuration intents into compilation commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eli-schwartz
I think maybe I understand what you are saying, but it seems very much at odds with what I would normally think of as a run-time vs build-time dependency. To me a dependency that is used when compiling the final executable(s), or at any stage in the lead-up to that, is a build-time dependency; i.e. a build-time dependency is something that is required when the application is built, and a run-time dependency is required when the application is run.
Anyway, I guess that means this is fine as is, and that the "run-time" message is correct as far as meson is concerned - thanks for clarifying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit of weird wording -- I certainly didn't choose it lol. :)
I went and looked up where it was introduced in the git history -- @Ericson2314 introduced it in mesonbuild/meson@07777e1 as part of a refactor that shouldn't actually have affected this at all and I do not know why! Before that commit, it would list "Dependency libselinux found: NO" except in a cross build, when it would say "Cross dependency libselinux found: NO".