Blame SPECS/mod_proxy_cluster.spec

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