import mod_proxy_cluster-1.3.14-23.el9

This commit is contained in:
CentOS Sources 2021-11-02 13:33:24 -04:00 committed by Stepan Oksanichenko
commit b9797e5e0c
6 changed files with 179 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/mod_cluster-547fccb264f57ecdd5f7818ea2d8f9cfac28c4ed.tar.gz

View File

@ -0,0 +1 @@
117f9c7140f82d8facbbc45c3b9ad8f0c1157b0f SOURCES/mod_cluster-547fccb264f57ecdd5f7818ea2d8f9cfac28c4ed.tar.gz

View File

@ -0,0 +1,23 @@
# mod_proxy_balancer should be disabled when mod_cluster is used
LoadModule proxy_cluster_module /usr/lib64/httpd/modules/mod_proxy_cluster.so
LoadModule cluster_slotmem_module /usr/lib64/httpd/modules/mod_cluster_slotmem.so
LoadModule manager_module /usr/lib64/httpd/modules/mod_manager.so
LoadModule advertise_module /usr/lib64/httpd/modules/mod_advertise.so
MemManagerFile /var/cache/httpd/mod_proxy_cluster
<IfModule manager_module>
Listen 6666
<VirtualHost *:6666>
DirectoryIndex disabled
<Directory />
Require ip 127.0.0.1
</Directory>
ServerAdvertise on
EnableMCPMReceive
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
</Location>
</VirtualHost>
</IfModule>

View File

@ -0,0 +1 @@
/var/cache/httpd/mod_proxy_cluster(/.*)? gen_context(system_u:object_r:httpd_cache_t,s0)

View File

@ -0,0 +1,11 @@
policy_module(mod_proxy_cluster, 1.0)
gen_tunable(httpd_mod_proxy_cluster, true)
require {
type httpd_t;
}
tunable_policy(`httpd_mod_proxy_cluster', `
corenet_udp_bind_http_port(httpd_t)
')

View File

@ -0,0 +1,142 @@
#no jars in this native build, so skip signing
%define _jarsign_opts --nocopy
# Update commitid and serial when new sources and release info is available
%global commitid 547fccb264f57ecdd5f7818ea2d8f9cfac28c4ed
%global serial 23
Name: mod_proxy_cluster
Summary: JBoss mod_proxy_cluster for Apache httpd
Version: 1.3.14
Release: %{serial}%{?dist}
Epoch: 0
License: LGPLv3
Group: Applications/System
URL: http://www.jboss.org/
Source0: mod_cluster-%{commitid}.tar.gz
Source1: %{name}.conf.sample
Source2: %{name}.te
Source3: %{name}.fc
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# 64 bit natives only on RHEL 9
ExcludeArch: i686 i386
BuildRequires: httpd-devel
BuildRequires: apr-devel
BuildRequires: apr-util-devel
BuildRequires: autoconf
BuildRequires: gcc
BuildRequires: selinux-policy-devel
Requires(post): policycoreutils-python-utils, python3-policycoreutils
Requires(postun): policycoreutils-python-utils, python3-policycoreutils
Requires: httpd >= 0:2.4.6
Requires: apr
Requires: apr-util
%description
JBoss mod_proxy_cluster for Apache httpd.
%prep
%setup -q -n mod_cluster-%{commitid}
%build
%{!?apxs: %{expand: %%define apxs %{_sbindir}/apxs}}
%define aplibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
pushd native
for i in advertise mod_manager mod_proxy_cluster mod_cluster_slotmem
do
pushd $i
set -e
sh buildconf
./configure --with-apxs=/usr/bin/apxs
make CFLAGS="%{optflags} -fno-strict-aliasing -DMOD_CLUSTER_RELEASE_VERSION=\\\"-%{serial}\\\""
popd
done
popd
%install
%define aplibdir /usr/lib64/httpd/modules/
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
install -d -m 755 $RPM_BUILD_ROOT/%{aplibdir}/
cp -p native/*/*.so ${RPM_BUILD_ROOT}/%{aplibdir}/
install -d -m 755 $RPM_BUILD_ROOT/%{_localstatedir}/cache/httpd/mod_proxy_cluster
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
install -p -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mod_proxy_cluster.conf.sample
# for SELinux
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
mkdir selinux
pushd selinux
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
make -f %{_datadir}/selinux/devel/Makefile
install -p -m 644 -D %{name}.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/mod_proxy_cluster.pp
popd
%clean
rm -Rf $RPM_BUILD_ROOT
%post
if [ $1 -eq 1 ] ; then
%{_sbindir}/semodule -i %{_datadir}/selinux/packages/%{name}/mod_proxy_cluster.pp 2>/dev/null || :
%{_sbindir}/semanage port -a -t http_port_t -p udp 23364 >/dev/null 2>&1 || :
%{_sbindir}/semanage port -a -t http_port_t -p tcp 6666 >/dev/null 2>&1 || :
/sbin/restorecon -R /var/cache/httpd/mod_proxy_cluster >/dev/null 2>&1 || :
fi
%preun
if [ $1 -eq 0 ] ; then
%{_sbindir}/semanage port -d -t http_port_t -p udp 23364 2>&1 || :
%{_sbindir}/semanage port -d -t http_port_t -p tcp 6666 2>&1 || :
%{_sbindir}/semodule -r mod_proxy_cluster >/dev/null 2>&1 || :
/sbin/restorecon -R /var/cache/httpd/mod_proxy_cluster >/dev/null 2>&1 || :
fi
%files
%{!?apxs: %{expand: %%define apxs /usr/bin/apxs}}
%define aplibdir /usr/lib64/httpd/modules/
%defattr(0644,root,root,0755)
%doc lgpl.txt
%dir %{_localstatedir}/cache/httpd/mod_proxy_cluster
%attr(0755,root,root) %{aplibdir}/*
%{_sysconfdir}/httpd/conf.d/mod_proxy_cluster.conf.sample
# for SELinux
%dir %{_datadir}/selinux/packages/%{name}
%{_datadir}/selinux/packages/%{name}/mod_proxy_cluster.pp
%changelog
* Fri Aug 26 2021 George Zaronikas <gzaronik@redhat.com> - 1.3.14-23
- Adding policycoreutils-python-utils
- Related: rhbz#1964892
* Wed Aug 18 2021 George Zaronikas <gzaronik@redhat.com> - 1.3.14-22
- Fixing selinux policy
- Related: rhbz#1964892
* Wed Aug 18 2021 George Zaronikas <gzaronik@redhat.com> - 1.3.14-21
- Correcting conf name in gating tests.
- Related: rhbz#1964892
* Mon Aug 16 2021 Coty Sutherland <csutherl@redhat.com> - 1.3.14-20
- Cleanup spec file
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0:1.3.14-19.Final_redhat_2.1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Aug 02 2021 Coty Sutherland <csutherl@redhat.com> - 1.3.14-19.Final
- Fix broken test
* Mon Aug 02 2021 Coty Sutherland <csutherl@redhat.com> - 1.3.14-18.Final
- Fix typo in tests.yml filename
* Fri Jul 30 2021 George Zaronikas <gzaronik@redhat.com> - 1.3.14-17.Final
- Resolves: #1964892