Blame SPECS/mod_proxy_cluster.spec

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