Skip to content

Commit

Permalink
selinux: add a new target to build the policy
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ansis Atteka <[email protected]>
  • Loading branch information
apconole authored and Ansis Atteka committed Feb 23, 2018
1 parent eb84ccc commit ee29e9f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 1 addition & 3 deletions rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions rhel/openvswitch.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions selinux/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ee29e9f

Please sign in to comment.