Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501566 - sys-kernel/dracut should not delete selinux module if USE=systemd
Summary: sys-kernel/dracut should not delete selinux module if USE=systemd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-17 10:04 UTC by Alexander Tsoy
Modified: 2014-02-23 17:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2014-02-17 10:04:43 UTC
Why do we remove selinux module if USE=systemd? According to dracut.spec selinux module is always included in fedora/rhel/suse package. And instead securityfs, masterkey and integrity modules are removed:

%if %{defined _unitdir}
# with systemd IMA and selinux modules do not make sense
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
%endif
...
%files
...
%if %{undefined _unitdir}
%{dracutlibdir}/modules.d/96securityfs
%{dracutlibdir}/modules.d/97masterkey
%{dracutlibdir}/modules.d/98integrity
%endif
...
%{dracutlibdir}/modules.d/98selinux
...


So we should change ebuild in the following way:

--- dracut-036.ebuild    2014-02-16 17:00:01.000000000 +0400
+++ dracut-036-r1.ebuild        2014-02-17 13:56:31.975586597 +0400
@@ -167,7 +167,7 @@
 
        if use systemd; then
                # With systemd following modules do not make sense
-               rm_module 96securityfs 98selinux
+               rm_module 96securityfs 97masterkey 98integrity
        else
                # Without systemd following modules do not make sense
                rm_module 00systemd-bootchart
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-02-18 14:31:03 UTC
Because upstream used to remove it in this case, as you can see in outdated comment in spec:

"# with systemd IMA and selinux modules do not make sense"

I have missed upstream change wrt selinux module. Thanks! :-)
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-02-23 17:07:05 UTC
Thanks!

+*dracut-036-r2 (23 Feb 2014)
+
+  23 Feb 2014; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-036-r2.ebuild,
+  +files/036-0007-Added-missing-quotes.patch:
+  Fixed bug #502064 and bug #501566.
+
+  Commit on behalf of Alexander Tsoy <alexander@tsoy.me>.
+