Blame SPECS/mod_auth_openidc.spec

d242e1
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}}
d242e1
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
d242e1
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %{_sysconfdir}/httpd/conf.d}}
d242e1
d242e1
# Optionally build with hiredis if --with hiredis is passed
d242e1
%{!?_with_hiredis: %{!?_without_hiredis: %global _without_hiredis --without-hiredis}}
d242e1
# It is an error if both or neither required options exist.
d242e1
%{?_with_hiredis: %{?_without_hiredis: %{error: both _with_hiredis and _without_hiredis}}}
d242e1
%{!?_with_hiredis: %{!?_without_hiredis: %{error: neither _with_hiredis nor _without_hiredis}}}
d242e1
d242e1
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
d242e1
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
d242e1
d242e1
%global httpd_pkg_cache_dir /var/cache/httpd/mod_auth_openidc
d242e1
d242e1
Name:		mod_auth_openidc
d242e1
Version:	2.3.7
d21d4d
Release:	4%{?dist}.3
d242e1
Summary:	OpenID Connect auth module for Apache HTTP Server
d242e1
d242e1
Group:		System Environment/Daemons
d242e1
License:	ASL 2.0
d242e1
URL:		https://github.com/zmartzone/mod_auth_openidc
d242e1
Source0:	https://github.com/zmartzone/mod_auth_openidc/releases/download/v%{version}/mod_auth_openidc-%{version}.tar.gz
d242e1
d242e1
Patch1: test-segfault.patch
d21d4d
Patch2: 0002-Backport-of-improve-validation-of-the-post-logout-UR.patch
d21d4d
Patch3: 0003-Backport-of-Fix-open-redirect-starting-with-a-slash.patch
d21d4d
Patch4: 0004-Backport-of-Fix-open-redirect-starting-with-a-slash-.patch
d21d4d
Patch5: 0005-Fix-the-previous-backports.patch
d242e1
d242e1
BuildRequires:  gcc
d242e1
BuildRequires:	httpd-devel
d242e1
BuildRequires:	openssl-devel
d242e1
BuildRequires:	curl-devel
d242e1
BuildRequires:	jansson-devel
d242e1
BuildRequires:	pcre-devel
d242e1
BuildRequires:	autoconf
d242e1
BuildRequires:	automake
d242e1
BuildRequires:	cjose-devel
d242e1
BuildRequires:	jq-devel
d242e1
%{?_with_hiredis:BuildRequires: hiredis-devel}
d242e1
Requires:	httpd-mmn = %{_httpd_mmn}
d242e1
d242e1
%description
d242e1
This module enables an Apache 2.x web server to operate as
d242e1
an OpenID Connect Relying Party and/or OAuth 2.0 Resource Server.
d242e1
d242e1
%prep
d242e1
%setup -q
d242e1
%patch1 -p1
d21d4d
%patch2 -p1
d21d4d
%patch3 -p1
d21d4d
%patch4 -p1
d21d4d
%patch5 -p1
d242e1
d242e1
%build
d242e1
# workaround rpm-buildroot-usage
d242e1
export MODULES_DIR=%{_httpd_moddir}
d242e1
export APXS2_OPTS='-S LIBEXECDIR=${MODULES_DIR}'
d242e1
autoreconf
d242e1
%configure \
d242e1
  --with-jq=/usr/lib64/ \
d242e1
  %{?_with_hiredis} \
d242e1
  %{?_without_hiredis}
d242e1
d242e1
make %{?_smp_mflags}
d242e1
d242e1
%check
d242e1
export MODULES_DIR=%{_httpd_moddir}
d242e1
export APXS2_OPTS='-S LIBEXECDIR=${MODULES_DIR}'
d242e1
make test
d242e1
d242e1
%install
d242e1
mkdir -p $RPM_BUILD_ROOT%{_httpd_moddir}
d242e1
make install MODULES_DIR=$RPM_BUILD_ROOT%{_httpd_moddir}
d242e1
d242e1
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_modconfdir}
d242e1
echo 'LoadModule auth_openidc_module modules/mod_auth_openidc.so' > \
d242e1
	$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-auth_openidc.conf
d242e1
d242e1
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_confdir}
d242e1
install -m 644 auth_openidc.conf $RPM_BUILD_ROOT%{_httpd_confdir}
d242e1
# Adjust httpd cache location in install config file
d242e1
sed -i 's!/var/cache/apache2/!/var/cache/httpd/!' $RPM_BUILD_ROOT%{_httpd_confdir}/auth_openidc.conf
d242e1
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}
d242e1
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/metadata
d242e1
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/cache
d242e1
d242e1
d242e1
%files
d242e1
%if 0%{?rhel} && 0%{?rhel} < 7
d242e1
%doc LICENSE.txt
d242e1
%else
d242e1
%license LICENSE.txt
d242e1
%endif
d242e1
%doc ChangeLog
d242e1
%doc AUTHORS
d242e1
%doc README.md
d242e1
%{_httpd_moddir}/mod_auth_openidc.so
d242e1
%config(noreplace) %{_httpd_modconfdir}/10-auth_openidc.conf
d242e1
%config(noreplace) %{_httpd_confdir}/auth_openidc.conf
d242e1
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}
d242e1
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/metadata
d242e1
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/cache
d242e1
d242e1
%changelog
d21d4d
* Sun May 10 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.3.7-4.3
d21d4d
- Actually apply the previous patch, sigh
d21d4d
- Related: rhbz#1820666 - CVE-2019-14857 mod_auth_openidc:2.3/mod_auth_openidc:
d21d4d
                          Open redirect in logout url when using URLs with
d21d4d
                          leading slashes [rhel-8.2.0.z]
d21d4d
- Related: rhbz#1820662 - CVE-2019-20479 mod_auth_openidc:2.3/mod_auth_openidc:
d21d4d
                          open redirect issue exists in URLs with slash and
d21d4d
                          backslash [rhel-8.2.0.z]
d21d4d
d21d4d
* Sun May 10 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.3.7-4.2
d21d4d
- Fix the previous backport
d21d4d
- Related: rhbz#1820666 - CVE-2019-14857 mod_auth_openidc:2.3/mod_auth_openidc:
d21d4d
                          Open redirect in logout url when using URLs with
d21d4d
                          leading slashes [rhel-8.2.0.z]
d21d4d
- Related: rhbz#1820662 - CVE-2019-20479 mod_auth_openidc:2.3/mod_auth_openidc:
d21d4d
                          open redirect issue exists in URLs with slash and
d21d4d
                          backslash [rhel-8.2.0.z]
d21d4d
d21d4d
* Sun May 10 2020 Jakub Hrozek <jhrozek@redhat.com> - 2.3.7-4.1
d21d4d
- Resolves: rhbz#1820666 - CVE-2019-14857 mod_auth_openidc:2.3/mod_auth_openidc:
d21d4d
                           Open redirect in logout url when using URLs with
d21d4d
                           leading slashes [rhel-8.2.0.z]
d21d4d
- Resolves: rhbz#1820662 - CVE-2019-20479 mod_auth_openidc:2.3/mod_auth_openidc:
d21d4d
                           open redirect issue exists in URLs with slash and
d21d4d
                           backslash [rhel-8.2.0.z]
d21d4d
d242e1
* Thu Aug 16 2018  <jdennis@redhat.com> - 2.3.7-3
d242e1
- Resolves: rhbz# 1614977 - fix unit test segfault,
d242e1
  the problem was not limited exclusively to s390x, but s390x provoked it.
d242e1
d242e1
* Fri Aug 10 2018  <jdennis@redhat.com> - 2.3.7-2
d242e1
- disable running check on s390x
d242e1
d242e1
* Wed Aug  1 2018  <jdennis@redhat.com> - 2.3.7-1
d242e1
- upgrade to upstream 2.3.7
d242e1
d242e1
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.5-2
d242e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d242e1
d242e1
* Wed May 23 2018 Patrick Uiterwijk <patrick@puiterwijk.org> - 2.3.5-1
d242e1
- Rebase to 2.3.5
d242e1
d242e1
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.10.1-7
d242e1
- Escape macros in %%changelog
d242e1
d242e1
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-6
d242e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d242e1
d242e1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-5
d242e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
d242e1
d242e1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-4
d242e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d242e1
d242e1
* Sat Feb 18 2017 John Dennis <jdennis@redhat.com> - 1.8.10.1-3
d242e1
- Resolves: #1423956 fails to build with openssl 1.1.x
d242e1
  Also rolls up all fixes to jose library before the change over to cjose
d242e1
d242e1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.10.1-2
d242e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d242e1
d242e1
* Tue Jul 12 2016 John Dennis <jdennis@redhat.com> - 1.8.10.1-1
d242e1
- Upgrade to new upstream
d242e1
  See /usr/share/doc/mod_auth_openidc/ChangeLog for details
d242e1
d242e1
* Tue Mar 29 2016 John Dennis <jdennis@redhat.com> - 1.8.8-4
d242e1
- Add %%check to run test
d242e1
d242e1
* Wed Mar 23 2016 John Dennis <jdennis@redhat.com> - 1.8.8-3
d242e1
- Make building with redis support optional (defaults to without)
d242e1
d242e1
* Mon Mar 21 2016 John Dennis <jdennis@redhat.com> - 1.8.8-2
d242e1
- Add missing unpackaged files/directories
d242e1
d242e1
  Add to doc: README.md, DISCLAIMER, AUTHORS
d242e1
  Add to httpd/conf.d: auth_openidc.conf
d242e1
  Add to /var/cache: /var/cache/httpd/mod_auth_openidc/cache
d242e1
                     /var/cache/httpd/mod_auth_openidc/metadata
d242e1
d242e1
* Thu Mar 10 2016 Jan Pazdziora <jpazdziora@redhat.com> 1.8.8-1
d242e1
- Update to 1.8.8 (#1316528)
d242e1
d242e1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.7-2
d242e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d242e1
d242e1
* Sat Jan 09 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.8.7-1
d242e1
- Update to 1.8.7 (#1297080)
d242e1
d242e1
* Sat Nov 07 2015 Jan Pazdziora <jpazdziora@redhat.com> 1.8.6-1
d242e1
- Initial packaging for Fedora 23.