Skip to content

Commit

Permalink
Handle RHEL missing vsomeio packages
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan authored and dougsland committed Jan 25, 2024
1 parent 9885efb commit c6dab9e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.1
0.6.2
27 changes: 27 additions & 0 deletions qm.if
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,30 @@ template(`qm_domain_template',`
vsomeip_use($1_container_domain)
')
')

########################################
## <summary>
## Creates types and rules for a basic
## container runtime process domain.
## </summary>
## <param name="prefix">
## <summary>
## Prefix for the domain.
## </summary>
## </param>
#
interface(`vsomeip_use',`
gen_require(`
type vsomeip_t;
type vsomeip_var_run_t;
type router_vsomeip_var_run_t;
')
# create and use vsomeip sockets:
allow $1 vsomeip_var_run_t:dir { add_name remove_name write };
allow $1 vsomeip_var_run_t:sock_file { create setattr write unlink };

# Talk to routing manager (and back)
allow $1 vsomeip_t:unix_stream_socket connectto;
allow vsomeip_t $1:unix_stream_socket connectto;
allow $1 router_vsomeip_var_run_t:sock_file write;
')
2 changes: 1 addition & 1 deletion qm.te
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
policy_module(qm, 0.6.1)
policy_module(qm, 0.6.2)

qm_domain_template(qm)
9 changes: 0 additions & 9 deletions rpm/qm.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Support for vsomeip is enabled by default, it can be disabled passing `--define "with_vsomeip 0"` option to rpmbuild
%if 0%{!?with_vsomeip:1}
%global with_vsomeip 1
%endif

%global debug_package %{nil}

# Some bits borrowed from the openstack-selinux package
Expand Down Expand Up @@ -69,10 +64,6 @@ BuildRequires: pkgconfig(systemd)
BuildRequires: selinux-policy >= %_selinux_policy_version
BuildRequires: selinux-policy-devel >= %_selinux_policy_version

%if %{with_vsomeip}
BuildRequires: vsomeip3-selinux
%endif

Requires: selinux-policy >= %_selinux_policy_version
Requires(post): selinux-policy-base >= %_selinux_policy_version
Requires(post): selinux-policy-targeted >= %_selinux_policy_version
Expand Down

0 comments on commit c6dab9e

Please sign in to comment.