Summary: osgi-runner-selinux - The OSGi service packaging of clazzes.org Name: osgi-runner-selinux Packager: Christoph Lechleitner BuildRequires: tar wget BuildRequires: selinux-policy selinux-policy-devel git BuildArch: noarch Version: 3.1.1 Release: 6 License: APL2/clazzes.org Group: Applications/Internet Source: osgi-runner-selinux-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-buildroot ###XBCS-PBA-Category: osgi-runner ###XBCS-PBA-Generation: 3 ###XBCS-PBA-Distributions: centos84 ###XBCS-PBA-Repository: rpm.clazzes.org Requires: osgi-runner-server %{?selinux_requires} %define __jar_repack 0 # https://fedoraproject.org/wiki/PackagingDrafts/SELinux_Independent_Policy %global selinuxtype targeted %global moduletype contrib %global modulename osgirunner %description SELinux policy for osgi-runner in CentOS/RHEL 8.4 (and hopefully beyond) %prep %setup -q %install #OSGI_HOME=/usr/share/osgi-runner #OSGI_ETC=/etc/osgi-runner rm -rf $RPM_BUILD_ROOT #mkdir -p $RPM_BUILD_ROOT make -C selinux -f %{_datadir}/selinux/devel/Makefile %{modulename}.pp bzip2 -9 selinux/%{modulename}.pp install -d %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} install -m 0644 selinux/%{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} %clean rm -rf $RPM_BUILD_ROOT #rm -rf downloads %pre %selinux_relabel_pre -s %{selinuxtype} %post %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 # http listening port, which should be changed from 8081 to 8089 anyway semanage port --list |egrep " 8081(,|$)" || semanage port -a -t osgirunner_port_t -p tcp 8081 || /bin/true # sshd listening port semanage port --list |egrep "^osgirunner_port_t" |egrep " 8101(,|$)" || semanage port -a -t osgirunner_port_t -p tcp 8101 || /bin/true %postun if [ $1 -eq 0 ]; then %selinux_modules_uninstall -s %{selinuxtype} %{modulename} fi %posttrans %selinux_relabel_post -s %{selinuxtype} %files %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 %ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} %changelog