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

Use priority 200 for uninstalling the module BZ(1777740) #85

Merged
merged 1 commit into from Nov 29, 2019

Conversation

zpytela
Copy link
Contributor

@zpytela zpytela commented Nov 28, 2019

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.

@zpytela zpytela force-pushed the fb-spec-macros branch 2 times, most recently from 03a3486 to 7061ef8 Compare November 28, 2019 13:21
%relabel_files
fi
%selinux_modules_uninstall -s %{selinuxtype} %{modulename} docker
if %{_sbindir}/selinuxenabled ; then
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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

@@ -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
Copy link
Member

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.

@zpytela zpytela force-pushed the fb-spec-macros branch 3 times, most recently from d19de5c to 85f3e4a Compare November 28, 2019 16:38
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.
@wrabcak
Copy link
Member

wrabcak commented Nov 28, 2019

@zpytela , Do you have also working scratch build?

Thanks,
Lukas.

@rhatdan
Copy link
Member

rhatdan commented Nov 29, 2019

LGTM
This internel spec file is not the one being used in Fedora or RHEL, We need to change these in Kohi and Bodhi.

@rhatdan rhatdan merged commit 0b25a4a into containers:master Nov 29, 2019
@rhatdan
Copy link
Member

rhatdan commented Nov 29, 2019

I have updated container-selinux package in Rawhide to use the selinux macros.

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

3 participants