-
Notifications
You must be signed in to change notification settings - Fork 93
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
Use priority 200 for uninstalling the module BZ(1777740) #85
Conversation
03a3486
to
7061ef8
Compare
contrib/container-selinux.spec
Outdated
%relabel_files | ||
fi | ||
%selinux_modules_uninstall -s %{selinuxtype} %{modulename} docker | ||
if %{_sbindir}/selinuxenabled ; then |
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.
Lines from 111 to 114 are already in the rpm macro.
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.
I can't see %relabel_files equivalent in the macro.
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 is %selinux_relabel_pre and %selinux_relabel_post which has improved functionality and different design
contrib/container-selinux.spec
Outdated
@@ -96,7 +96,7 @@ fi | |||
%{_sbindir}/semodule -n -s %{selinuxtype} -r container 2> /dev/null | |||
%{_sbindir}/semodule -n -s %{selinuxtype} -d docker 2> /dev/null | |||
%{_sbindir}/semodule -n -s %{selinuxtype} -d gear 2> /dev/null | |||
%{_sbindir}/semodule -n -X 200 -s %{selinuxtype} -i $MODULES > /dev/null | |||
%selinux_modules_install -s %{selinuxtype} $MODULES | |||
if %{_sbindir}/selinuxenabled ; then |
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.
Load policy process is in macro.
d19de5c
to
85f3e4a
Compare
Change the uninstall command in the %postun section of the specfile to use the %selinux_modules_uninstall macro which uses priority 200. Change the install command in the %post section if the specfile to use the %selinux_modules_install macro. Replace relabel commands with using the %selinux_relabel_pre and %selinux_relabel_post macros. Change formatting so that the lines are vertically aligned in the %postun section.
85f3e4a
to
6ee4ce3
Compare
@zpytela , Do you have also working scratch build? Thanks, |
LGTM |
I have updated container-selinux package in Rawhide to use the selinux macros. |
Change the uninstall command in the %postun section of the specfile
to use the %selinux_modules_uninstall macro which uses priority 200.
Change formatting so that the lines are vertically aligned
in the %postun section.