#6 Enable policy optimization
Merged 4 years ago by plautrba. Opened 4 years ago by omos.
rpms/ omos/libsemanage optimize-policy  into  master

file modified
+4 -1
@@ -4,7 +4,7 @@ 

  Summary: SELinux binary policy manipulation library 

  Name: libsemanage

  Version: 3.0

- Release: 1%{?dist}

+ Release: 2%{?dist}

  License: LGPLv2+

  Source0: https://github.com/SELinuxProject/selinux/releases/download/20191204/libsemanage-3.0.tar.gz

  # fedora-selinux/selinux: git format-patch -N libsemanage-3.0 -- libsemanage
@@ -156,6 +156,9 @@ 

  %{_libexecdir}/selinux/semanage_migrate_store

  

  %changelog

+ * Wed Jan 22 2020 Ondrej Mosnacek <omosnace@redhat.com> - 3.0-2

+ - Enable policy optimization

+ 

  * Fri Dec  6 2019 Petr Lautrbach <plautrba@redhat.com> - 3.0-1

  - SELinux userspace 3.0 release

  

file modified
+1
@@ -50,6 +50,7 @@ 

  bzip-small=true

  bzip-blocksize=5

  ignoredirs=/root

+ optimize-policy=true

  

  [sefcontext_compile]

  path = /usr/sbin/sefcontext_compile

The new v3.0 SELInux userspace added support for optimizing the binary
policy by pruning redundant rules from it. Enable it on Fedora by
default, since it brings noticeable space savings and only negligibly
increases policy build time.

Just to clarify, that is 8,453,323 vs. 8,803,406 bytes, i.e. about 4% savings (in RPM size).

In terms of size of the binary policy itself (/etc/selinux/targeted/policy/policy.32), it is 7,946,145 vs. 8,603,309 bytes, which is about 7.6% less.

Pull-Request has been merged by plautrba

4 years ago