]> git.proxmox.com Git - mirror_ovs.git/commitdiff
selinux: add a new target to build the policy
authorAaron Conole <aconole@redhat.com>
Mon, 19 Feb 2018 15:14:22 +0000 (10:14 -0500)
committerAnsis Atteka <aatteka@ovn.org>
Fri, 23 Feb 2018 18:13:29 +0000 (10:13 -0800)
The selinux policy currently builds manually, as a process that either
the user or distribution maintainer undertakes.  That process consists
of:

  1. Convert the intermediary files into their file form through
     'make' statements at the top level.

  2. Change to the selinux directory and issue the selinux "make -f"
     directive.

This commit introduces a new target 'selinux-policy' which builds the
openvswitch-custom policy files.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ansis Atteka <aatteka@ovn.org>
rhel/openvswitch-fedora.spec.in
rhel/openvswitch.spec.in
selinux/automake.mk

index ede62c8442c3f69bd2716aee6594207b9fad2fc6..8a804942b0ec0994ff76a7b521a24079d0f5f57c 100644 (file)
@@ -239,9 +239,7 @@ build-aux/dpdkstrip.py \
        > rhel/usr_lib_systemd_system_ovs-vswitchd.service
 
 make %{?_smp_mflags}
-make selinux/openvswitch-custom.te
-cd selinux
-make -f %{_datadir}/selinux/devel/Makefile
+make selinux-policy
 
 %install
 rm -rf $RPM_BUILD_ROOT
index 104b2732956db250b41f81877c9e8f7565784852..876990698504af34c5abc3c490f2b7a9525327db 100644 (file)
@@ -70,9 +70,7 @@ Tailored Open vSwitch SELinux policy
 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} \
     --libdir=%{_libdir} --enable-ssl --enable-shared
 make %{_smp_mflags}
-make selinux/openvswitch-custom.te
-cd selinux
-make -f %{_datadir}/selinux/devel/Makefile
+make selinux-policy
 
 %install
 rm -rf $RPM_BUILD_ROOT
index e8871aa97601d5d407353484e34ca18fc87e85c5..48853cdc0731a2e68f2d556dbdbe4849b337fb86 100644 (file)
@@ -7,3 +7,8 @@
 
 EXTRA_DIST += \
         selinux/openvswitch-custom.te.in
+
+PHONY: selinux-policy
+
+selinux-policy: selinux/openvswitch-custom.te
+       $(MAKE) -C selinux/ -f /usr/share/selinux/devel/Makefile