-
Notifications
You must be signed in to change notification settings - Fork 29
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
qm.spec: Fix packaing for other selinux policies #731
Conversation
Reviewer's Guide by SourceryThis pull request modifies the rpm spec file to correctly install the selinux module for qm, even when the active selinux policy is not 'targeted'. It achieves this by installing the module to the active selinux policy and updating the package dependencies. Sequence diagram for SELinux module installationsequenceDiagram
participant RPM Package Manager
participant SELinux Policy
RPM Package Manager->>SELinux Policy: Installs qm module to active policy
activate SELinux Policy
SELinux Policy-->>RPM Package Manager: Acknowledges installation
deactivate SELinux Policy
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @alexlarsson - I've reviewed your changes - here's some feedback:
Overall Comments:
- It might be good to add a comment explaining why we are sourcing the selinux config file in the post scripts.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
The current package hardcodes that post-install it will install the module to the "targeted" policy (but the macro only does this is it is also the active policy). This means if the active policy is something else, such as "automotive", then the qm module is not installed at all, and qm doesn't work. We fix this by always installing the module to the active selinux policy. This is how e.g. container-selinux does it. In addition we remove the hard post-require on selinux-policy-target and replace it with selinux-policy-any, which all selinux policy packages provide. We also add a recommendataion of selinux-policy-targeted, so most people get it. This is also what container-selinux does. Signed-off-by: Alexander Larsson <[email protected]>
390734c
to
70e6647
Compare
Relates to: containers/qm#731 Change the bluechi-selinux module to be installed to the targeted policy (which is hardcoded), simply install it to the active SELinux policy. Signed-off-by: Michael Engel <[email protected]>
Relates to: containers/qm#731 Change the bluechi-selinux module to be installed to the targeted policy (which is hardcoded), simply install it to the active SELinux policy. Signed-off-by: Michael Engel <[email protected]>
Relates to: containers/qm#731 Change the bluechi-selinux module to be installed to the targeted policy (which is hardcoded), simply install it to the active SELinux policy. Signed-off-by: Michael Engel <[email protected]>
Relates to: containers/qm#731 Change the bluechi-selinux module to be installed to the targeted policy (which is hardcoded), simply install it to the active SELinux policy. Signed-off-by: Michael Engel <[email protected]>
The current package hardcodes that post-install it will install the module to the "targeted" policy (but the macro only does this is it is also the active policy). This means if the active policy is something else, such as "automotive", then the qm module is not installed at all, and qm doesn't work.
We fix this by always installing the module to the active selinux policy. This is how e.g. container-selinux does it.
In addition we remove the hard post-require on selinux-policy-target and replace it with selinux-policy-any, which all selinux policy packages provide. We also add a recommendataion of selinux-policy-targeted, so most people get it. This is also what container-selinux does.
Fixes #730
Summary by Sourcery
Fixes an issue where the qm module was not installed when the active SELinux policy was not 'targeted' by ensuring the module is installed to the active SELinux policy. Also updates the package dependencies to use
selinux-policy-any
instead ofselinux-policy-targeted
.Bug Fixes:
Build:
selinux-policy-target
withselinux-policy-any
, which all SELinux policy packages provide.selinux-policy-targeted
to ensure most users get it.