Initial import (fedora#2239790)
This commit is contained in:
parent
7c343f0995
commit
1432f466c0
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/mod_cluster-1.3.19.Final.tar.gz
|
||||
23
mod_proxy_cluster.conf.sample
Normal file
23
mod_proxy_cluster.conf.sample
Normal 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>
|
||||
1
mod_proxy_cluster.fc
Normal file
1
mod_proxy_cluster.fc
Normal file
@ -0,0 +1 @@
|
||||
/var/cache/httpd/mod_proxy_cluster(/.*)? gen_context(system_u:object_r:httpd_cache_t,s0)
|
||||
130
mod_proxy_cluster.spec
Normal file
130
mod_proxy_cluster.spec
Normal file
@ -0,0 +1,130 @@
|
||||
#no jars in this native build, so skip signing
|
||||
%define _jarsign_opts --nocopy
|
||||
|
||||
%global namedreltag .Final
|
||||
%global namedversion %{version}%{?namedreltag}
|
||||
%global selinuxtype targeted
|
||||
%define aplibdir %{_libdir}/httpd/modules/
|
||||
|
||||
%define serial 1
|
||||
|
||||
Name: mod_proxy_cluster
|
||||
Summary: JBoss mod_proxy_cluster for Apache httpd
|
||||
Version: 1.3.19
|
||||
Release: %{serial}%{?dist}
|
||||
License: LGPL-3.0-only
|
||||
URL: https://github.com/modcluster/mod_cluster
|
||||
Source0: https://github.com/modcluster/mod_cluster/archive/%{namedversion}/mod_cluster-%{namedversion}.tar.gz
|
||||
Source1: %{name}.conf.sample
|
||||
Source2: %{name}.te
|
||||
Source3: %{name}.fc
|
||||
|
||||
# 64 bit natives only
|
||||
ExcludeArch: i686 i386
|
||||
|
||||
BuildRequires: httpd-devel
|
||||
BuildRequires: apr-devel
|
||||
BuildRequires: apr-util-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: gcc
|
||||
|
||||
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
|
||||
|
||||
Requires: httpd >= 0:2.4.6
|
||||
Requires: apr
|
||||
Requires: apr-util
|
||||
|
||||
# SELinux subpackage
|
||||
%package selinux
|
||||
Summary: mod_proxy_cluster SELinux policy
|
||||
BuildArch: noarch
|
||||
Requires: selinux-policy-%{selinuxtype}
|
||||
Requires(post): selinux-policy-%{selinuxtype}
|
||||
BuildRequires: selinux-policy-devel
|
||||
%{?selinux_requires}
|
||||
|
||||
%description selinux
|
||||
mod_proxy_cluster SELinux policy module
|
||||
|
||||
%description
|
||||
JBoss mod_proxy_cluster for Apache httpd.
|
||||
|
||||
%prep
|
||||
%autosetup -n mod_cluster-%{namedversion}
|
||||
|
||||
%build
|
||||
pushd native
|
||||
for i in advertise mod_manager mod_proxy_cluster mod_cluster_slotmem
|
||||
do
|
||||
pushd $i
|
||||
set -e
|
||||
sh buildconf
|
||||
export CFLAGS='%{optflags} -fno-strict-aliasing -DMOD_CLUSTER_RELEASE_VERSION="-%{serial}"'
|
||||
%configure --with-apxs=/usr/bin/apxs
|
||||
%make_build
|
||||
popd
|
||||
done
|
||||
popd
|
||||
|
||||
# for SELinux
|
||||
mkdir selinux
|
||||
cp -p %{SOURCE2} selinux/
|
||||
cp -p %{SOURCE3} selinux/
|
||||
|
||||
make -f %{_datadir}/selinux/devel/Makefile %{name}.pp
|
||||
bzip2 -9 %{name}.pp
|
||||
|
||||
%install
|
||||
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
|
||||
|
||||
install -D -m 0644 %{name}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
||||
|
||||
%pre selinux
|
||||
%selinux_relabel_pre -s %{selinuxtype}
|
||||
|
||||
%post selinux
|
||||
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
||||
|
||||
%postun selinux
|
||||
if [ $1 -eq 0 ]; then
|
||||
%selinux_modules_uninstall -s %{selinuxtype} %{name}
|
||||
fi
|
||||
|
||||
%posttrans selinux
|
||||
%selinux_relabel_post -s %{selinuxtype}
|
||||
|
||||
%post
|
||||
# first install
|
||||
if [ $1 -eq 1 ]; then
|
||||
%{_sbindir}/semanage port -a -t http_port_t -p udp 23364 || true
|
||||
%{_sbindir}/semanage port -a -t http_port_t -p tcp 6666 || true
|
||||
fi
|
||||
|
||||
%postun
|
||||
# Delete port labeling when the package is removed
|
||||
if [ $1 -eq 0 ]; then
|
||||
%{_sbindir}/semanage port -d -t http_port_t -p udp 23364 || true
|
||||
%{_sbindir}/semanage port -d -t http_port_t -p tcp 6666 || true
|
||||
fi
|
||||
|
||||
%files
|
||||
%license lgpl.txt
|
||||
%dir %{_localstatedir}/cache/httpd/mod_proxy_cluster
|
||||
%attr(0755,root,root) %{aplibdir}/*
|
||||
%{_sysconfdir}/httpd/conf.d/mod_proxy_cluster.conf.sample
|
||||
|
||||
%files selinux
|
||||
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.*
|
||||
%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Sep 20 2023 Hui Wang <huwang@redhat.com> - 1.3.19-1
|
||||
- First build
|
||||
12
mod_proxy_cluster.te
Normal file
12
mod_proxy_cluster.te
Normal file
@ -0,0 +1,12 @@
|
||||
policy_module(mod_proxy_cluster, 1.0)
|
||||
|
||||
gen_tunable(httpd_mod_proxy_cluster, true)
|
||||
|
||||
require {
|
||||
type httpd_t;
|
||||
type http_port_t;
|
||||
}
|
||||
|
||||
tunable_policy(`httpd_mod_proxy_cluster', `
|
||||
corenet_udp_bind_http_port(httpd_t)
|
||||
')
|
||||
Loading…
Reference in New Issue
Block a user