Blame SPECS/nghttp2.spec

4f1857
%{?scl:%scl_package nghttp2}
4f1857
%{!?scl:%global pkg_name %{name}}
4f1857
4f1857
Summary: Meta-package that only requires libnghttp2
4f1857
Name: %{?scl_prefix}nghttp2
4f1857
Version: 1.7.1
ccb6b8
Release: 8%{?dist}
4f1857
License: MIT
4f1857
Group: Applications/Internet
4f1857
URL: https://nghttp2.org/
4f1857
Source0: https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/nghttp2-%{version}.tar.xz
4f1857
Patch0: nghttp2-1.7.0-httpd24.patch
e996a2
Patch1: nghttp2-1.7.1-CVE-2019-9511-and-CVE-2019-9513.patch
4f1857
4f1857
BuildRequires: CUnit-devel
4f1857
BuildRequires: openssl-devel
4f1857
BuildRequires: zlib-devel
9bb28b
%{?scl:BuildRequires: %{scl}-runtime}
4f1857
4f1857
Requires: %{?scl_prefix}libnghttp2%{?_isa} = %{version}-%{release}
4f1857
4f1857
%description
4f1857
This package installs no files.  It only requires the %{?scl_prefix}libnghttp2 package.
4f1857
4f1857
4f1857
%package -n %{?scl_prefix}libnghttp2
4f1857
Summary: A library implementing the HTTP/2 protocol
4f1857
Group: Development/Libraries
4f1857
%{?scl:Requires: %scl_runtime}
4f1857
4f1857
%description -n %{?scl_prefix}libnghttp2
4f1857
libnghttp2 is a library implementing the Hypertext Transfer Protocol
4f1857
version 2 (HTTP/2) protocol in C.
4f1857
4f1857
4f1857
%package -n %{?scl_prefix}libnghttp2-devel
4f1857
Summary: Files needed for building applications with libnghttp2
4f1857
Group: Development/Libraries
4f1857
Requires: %{?scl_prefix}libnghttp2%{?_isa} = %{version}-%{release}
4f1857
Requires: pkgconfig
4f1857
4f1857
%description -n %{?scl_prefix}libnghttp2-devel
4f1857
The libnghttp2-devel package includes libraries and header files needed
4f1857
for building applications with libnghttp2.
4f1857
4f1857
4f1857
%prep
4f1857
%setup -q -n %{pkg_name}-%{version}
4f1857
4f1857
%patch0 -p1 -b .httpd24
e996a2
%patch1 -p1 -b .CVE-2019-9511-and-CVE-2019-9513
4f1857
4f1857
%build
4f1857
%{?scl:scl enable %{scl} - << \EOF}
4f1857
4f1857
%configure                                  \
4f1857
    --disable-python-bindings               \
4f1857
    --disable-static                        \
4f1857
    --without-libxml2                       \
4f1857
    --without-spdylay                       \
4f1857
    --disable-app                           \
4f1857
    --disable-examples
4f1857
4f1857
# avoid using rpath
4f1857
sed -i libtool                              \
4f1857
    -e 's/^runpath_var=.*/runpath_var=/'    \
4f1857
    -e 's/^hardcode_libdir_flag_spec=".*"$/hardcode_libdir_flag_spec=""/'
4f1857
4f1857
make %{?_smp_mflags} V=1
4f1857
%{?scl:EOF}
4f1857
4f1857
4f1857
%install
4f1857
%{?scl:scl enable %{scl} - << \EOF}
4f1857
%make_install
4f1857
4f1857
# not needed on Fedora/RHEL
4f1857
rm -f "$RPM_BUILD_ROOT%{_libdir}/libnghttp2.la"
4f1857
4f1857
# will be installed via %%doc
4f1857
rm -f "$RPM_BUILD_ROOT%{_datadir}/doc/nghttp2/README.rst"
4f1857
4f1857
# do not install man pages and helper scripts for tools that are not available
4f1857
rm -fr "$RPM_BUILD_ROOT%{_datadir}/nghttp2"
4f1857
rm -fr "$RPM_BUILD_ROOT%{_mandir}/man1"
c2628b
c2628b
mv %{buildroot}%{_libdir}/pkgconfig/libnghttp2.pc %{buildroot}%{_libdir}/pkgconfig/%{scl_prefix}libnghttp2.pc
4f1857
%{?scl:EOF}
4f1857
4f1857
%post -n %{?scl_prefix}libnghttp2 -p /sbin/ldconfig
4f1857
4f1857
%postun -n %{?scl_prefix}libnghttp2 -p /sbin/ldconfig
4f1857
4f1857
4f1857
%check
4f1857
%{?scl:scl enable %{scl} - << \EOF}
4f1857
# test the just built library instead of the system one, without using rpath
4f1857
export "LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:${LD_LIBRARY_PATH}"
4f1857
make %{?_smp_mflags} check
4f1857
%{?scl:EOF}
4f1857
4f1857
4f1857
%files
4f1857
4f1857
%files -n %{?scl_prefix}libnghttp2
4f1857
%{_libdir}/libnghttp2*.so.*
4f1857
%{!?_licensedir:%global license %%doc}
4f1857
%license COPYING
4f1857
4f1857
%files -n %{?scl_prefix}libnghttp2-devel
4f1857
%{_includedir}/nghttp2
c2628b
%{_libdir}/pkgconfig/%{scl_prefix}libnghttp2.pc
4f1857
%{_libdir}/libnghttp2*.so
4f1857
%doc README.rst
4f1857
4f1857
4f1857
%changelog
ccb6b8
* Tue Aug 27 2019 Lubos Uhliarik <luhliari@redhat.com> - 1.7.1-8
ccb6b8
- Resolves: #1745692 - CVE-2019-9513 httpd24-nghttp2: HTTP/2: flood using
ccb6b8
  PRIORITY frames resulting in excessive resource consumption
ccb6b8
- Resolves: # 1744825 - CVE-2019-9511 httpd24-nghttp2: HTTP/2: large 
ccb6b8
  amount of data request leads to denial of service 
e996a2
c2628b
* Thu Sep 13 2018 Luboš Uhliarik <luhliari@redhat.com> - 1.7.1-7
c2628b
- Resolves: #1540167 - provides without httpd24 pre/in-fix
c2628b
9bb28b
* Wed May 24 2017 Luboš Uhliarik <luhliari@redhat.com> - 1.7.1-6
9bb28b
- rebuild
9bb28b
4f1857
* Wed Feb 17 2016 Jan Kaluza <jkaluza@redhat.com> 1.7.1-1
4f1857
- fix CVE-2016-1544 (out of memory due to unlimited incoming HTTP header)
4f1857
4f1857
* Tue Feb 09 2016 Jan Kaluza <jkaluza@redhat.com> 1.7.0-3
4f1857
- make the package build on RHEL-6 (libnghttp2 only)
4f1857
4f1857
* Mon Feb 08 2016 Jan Kaluza <jkaluza@redhat.com> 1.7.0-2
4f1857
- enable tests
4f1857
4f1857
* Mon Jan 25 2016 Kamil Dudka <kdudka@redhat.com> 1.7.0-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Fri Dec 25 2015 Kamil Dudka <kdudka@redhat.com> 1.6.0-1
4f1857
- update to the latest upstream release (fixes CVE-2015-8659)
4f1857
4f1857
* Thu Nov 26 2015 Kamil Dudka <kdudka@redhat.com> 1.5.0-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Mon Oct 26 2015 Kamil Dudka <kdudka@redhat.com> 1.4.0-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Thu Sep 24 2015 Kamil Dudka <kdudka@redhat.com> 1.3.4-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Wed Sep 23 2015 Kamil Dudka <kdudka@redhat.com> 1.3.3-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Wed Sep 16 2015 Kamil Dudka <kdudka@redhat.com> 1.3.2-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Mon Sep 14 2015 Kamil Dudka <kdudka@redhat.com> 1.3.1-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Mon Aug 31 2015 Kamil Dudka <kdudka@redhat.com> 1.3.0-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Mon Aug 17 2015 Kamil Dudka <kdudka@redhat.com> 1.2.1-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Sun Aug 09 2015 Kamil Dudka <kdudka@redhat.com> 1.2.0-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Wed Jul 15 2015 Kamil Dudka <kdudka@redhat.com> 1.1.1-1
4f1857
- update to the latest upstream release
4f1857
4f1857
* Tue Jun 30 2015 Kamil Dudka <kdudka@redhat.com> 1.0.5-1
4f1857
- packaged for Fedora (#1237247)