[DSE-Dev] Bug#849460: Ship list of module in base module package

cgzones cgzones at googlemail.com
Tue Dec 27 12:53:12 UTC 2016


Package: refpolicy
Version: 2:2.20161023.1-3

Ship a list of modules build into the base module package.
This might help with module management.

---
 debian/rules                          | 1 +
 debian/selinux-policy-default.install | 1 +
 debian/selinux-policy-mls.install     | 1 +
 3 files changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 45e0187..d6fe74b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -122,6 +122,7 @@ install-%-policy: build-%-policy
  mkdir -p $(CURDIR)/debian/tmp/var/lib/selinux/$*
 # Create a list with the modules we are shipping
  (cd $(CURDIR)/debian/tmp/usr/share/selinux/$*; LC_ALL=C ls -1 | cut
-d. -f1 > .modules)
+ (cd $(CURDIR)/debian/tmp/usr/share/selinux/$*; grep -P
'^[a-z0-9_]+\s*=\s*base$$'
$(CURDIR)/debian/build-$*/policy/modules.conf | cut -d= -f1 | awk
'{$$1=$$1};1' | LC_ALL=C sort > .basemodules)
  touch $@

 # The headers are based on the default policy
diff --git a/debian/selinux-policy-default.install
b/debian/selinux-policy-default.install
index b736f14..2d792e9 100644
--- a/debian/selinux-policy-default.install
+++ b/debian/selinux-policy-default.install
@@ -1,4 +1,5 @@
 etc/selinux/default/
+usr/share/selinux/default/.basemodules
 usr/share/selinux/default/.modules
 usr/share/selinux/default/*.pp
 var/lib/selinux/default/
diff --git a/debian/selinux-policy-mls.install
b/debian/selinux-policy-mls.install
index ef57ad0..8c0082c 100644
--- a/debian/selinux-policy-mls.install
+++ b/debian/selinux-policy-mls.install
@@ -1,4 +1,5 @@
 etc/selinux/mls/
+usr/share/selinux/mls/.basemodules
 usr/share/selinux/mls/.modules
 usr/share/selinux/mls/*.pp
 var/lib/selinux/mls/
-- 
2.8.1



More information about the SELinux-devel mailing list