import mod_jk-1.2.48-22.el9

This commit is contained in:
CentOS Sources 2021-11-03 04:47:23 -04:00 committed by Stepan Oksanichenko
commit 53eb624578
6 changed files with 241 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/tomcat-connectors-1c14fc065bc133887fdde55cab954691b3dc3aac.tar.gz

1
.mod_jk.metadata Normal file
View File

@ -0,0 +1 @@
78c942f3556d9b490c477f4a12c5217204c496ee SOURCES/tomcat-connectors-1c14fc065bc133887fdde55cab954691b3dc3aac.tar.gz

View File

@ -0,0 +1,36 @@
# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf.d/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicates to send SSL KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
# Mount your applications
# JkMount /application/* loadbalancer
# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf.d/uriworkermap.properties
# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
JkShmFile /var/cache/httpd/mod_jk/jk.shm

View File

@ -0,0 +1,5 @@
# Mapping test
/testapp1=worker1
/testapp1/*=worker1
/testapp2=worker2
/testapp2/*=worker2

View File

@ -0,0 +1,11 @@
# An entry that lists all the workers defined
worker.list=worker1,worker2
# Entries that define the host and port associated with these workers
worker.worker1.host=IP_TO_SET_1
worker.worker1.port=AJP_PORT_1
worker.worker1.type=ajp13
worker.worker2.host=IP_TO_SET_2
worker.worker2.port=AJP_PORT_2
worker.worker2.type=ajp13

187
SPECS/mod_jk.spec Normal file
View File

@ -0,0 +1,187 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
%global pkg_name %{name}
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
%bcond_with tools
%{!?aprconf: %{expand: %%define aprconf %{_bindir}/apr-config}}
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
%{!?libtool: %{expand: %%define libtool %{_libdir}/apr-1/build/libtool}}
%define aprincludes %(%{aprconf} --includes 2>/dev/null)
# Update commitid and serial when new sources and release version are available
%global commitid 1c14fc065bc133887fdde55cab954691b3dc3aac
%global serial 22
Name: mod_jk
Epoch: 0
Version: 1.2.48
Release: %{serial}%{?dist}
Summary: Tomcat mod_jk connector for Apache
Group: Internet/WWW/Servers
License: ASL 2.0
URL: http://tomcat.apache.org
Source0: tomcat-connectors-%{commitid}.tar.gz
Source1: %{pkg_name}.conf.sample
Source2: uriworkermap.properties.sample
Source3: workers.properties.sample
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: httpd
BuildRequires: httpd-devel
BuildRequires: apr-devel
BuildRequires: apr-util-devel
# 64 bit only natives on RHEL 9
ExcludeArch: i386 i686
BuildRequires: perl
BuildRequires: java-devel >= 1.6.0
BuildRequires: jpackage-utils >= 0:1.5.38
BuildRequires: libtool
BuildRequires: xalan-j2 >= 2.7.0
Obsoletes: mod_jk-ap24 < 0:1.2.48-21
%description
Tomcat-connectors (mod_jk) is a project that provides web server
connectors for the Apache Tomcat servlet engine.
%package manual
Summary: Tomcat %{pkg_name} connector manual
Group: Internet/WWW/Servers
%description manual
Tomcat %{pkg_name} connector manual.
%if %with tools
%package tools
Group: Internet/Log Analysis
Summary: Analysis and report tools for %{pkg_name}
%description tools
Miscellaneous %{pkg_name} analysis and report tools.
%endif
%prep
%setup -q -n tomcat-connectors-%{commitid}
%{__sed} -i -e 's|^(APXSCPPFLAGS=.*)$|$1 %{aprincludes}|' \
native/common/Makefile.in
%build
# Adding the "-z,now" option in LDFLAGS in order to gain
# full RELRO support
LDFLAGS="$LDFLAGS -Wl,-z,now"
export LDFLAGS
set -e
pushd native
./buildconf.sh
%configure --with-apxs="%{_bindir}/apxs"
export LIBTOOL="`%{_bindir}/apxs -q LIBTOOL 2>/dev/null`"
# Handle old apxs (without -q LIBTOOL), eg Red Hat 8.0 and 9.
if test -z "$LIBTOOL"; then
LIBTOOL="%{libtool}"
fi
make %{?_smp_mflags} \
LIBTOOL="$LIBTOOL" \
EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
EXTRA_CPPFLAGS="%{aprincludes}" \
RHBUILD_CFLAGS="-DJK_RH_BUILD=-%{serial}"
popd
%install
%{!?aprconf: %{expand: %%define aprconf %{_bindir}/apr-config}}
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
%{!?libtool: %{expand: %%define libtool %{_libdir}/apr-1/build/libtool}}
%define aplibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
%define apconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
%define aprincludes %(%{aprconf} --includes 2>/dev/null)
%{__rm} -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
install -p -m 0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
%{__sed} -i -e 's|/usr/local/bin\b|%{_bindir}|' tools/reports/*.pl
command="s|/usr/local/bin\b|%{_bindir}|"
%{__sed} -i -e $command tools/reports/*.pl
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{aplibdir}
%{__install} -p -m 0755 native/apache-2.0/%{pkg_name}.so \
${RPM_BUILD_ROOT}/%{aplibdir}/%{pkg_name}.so
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{_bindir}
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}/%{_var}/run/%{name}
%{__install} -d -m 0700 ${RPM_BUILD_ROOT}/%{_var}/cache/httpd/%{name}
# for tools
%if %with tools
%{__install} -p -m 0755 tools/reports/*.pl ${RPM_BUILD_ROOT}/%{_bindir}
%endif
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files
%{!?apxs: %{expand: %%define apxs %{_bindir}/apxs}}
%define aplibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
%defattr(-,root,root,-)
%doc native/LICENSE native/NOTICE native/README.txt
%{aplibdir}/*
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*
%dir %{_var}/run/%{name}
%attr(0700,apache,apache) %dir %{_var}/cache/httpd/%{name}
%if %with tools
%files tools
%defattr(-,root,root,-)
%doc tools/reports/README.txt
%{_bindir}/*
%endif
%changelog
* Tue Aug 24 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-22
- Specifying exact NVR in Obsoletes to avoid conflict with -ap24 subpackage
- Resolves: #1963135
* Wed Aug 18 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-21
- Moving Obsoletes out of pkg description
- Resolves: #1963135
* Mon Aug 16 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-20
- Cleanup spec file and remove .redhat-N suffix from release
- Remove ap24 subpackage since we only need to build for one version of httpd
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0:1.2.48-19.redhat_1.1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Aug 04 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-19
- Update shm file location in conf
* Mon Aug 02 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-18
- Fix broken test
* Mon Aug 02 2021 Coty Sutherland <csutherl@redhat.com> - 1.2.48-17
- Fix typo in tests.yml filename
* Fri Jul 30 2021 George Zaronikas <gzaronik@redhat.com> - 1.2.48-16
- Resolves: #1963135