diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..079f560 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/nghttp2-1.7.1.tar.xz diff --git a/.httpd24-nghttp2.metadata b/.httpd24-nghttp2.metadata new file mode 100644 index 0000000..b360ad9 --- /dev/null +++ b/.httpd24-nghttp2.metadata @@ -0,0 +1 @@ +54ffa7c904a4acbdcabc5d00fabd418c448b117a SOURCES/nghttp2-1.7.1.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/nghttp2-1.7.0-httpd24.patch b/SOURCES/nghttp2-1.7.0-httpd24.patch new file mode 100644 index 0000000..009237a --- /dev/null +++ b/SOURCES/nghttp2-1.7.0-httpd24.patch @@ -0,0 +1,13 @@ +diff --git a/lib/Makefile.in b/lib/Makefile.in +index c57e66f..32aee0d 100644 +--- a/lib/Makefile.in ++++ b/lib/Makefile.in +@@ -505,7 +505,7 @@ HFILES = nghttp2_pq.h nghttp2_int.h nghttp2_map.h nghttp2_queue.h \ + nghttp2_http.h + + libnghttp2_la_SOURCES = $(HFILES) $(OBJECTS) +-libnghttp2_la_LDFLAGS = -no-undefined \ ++libnghttp2_la_LDFLAGS = -no-undefined -release httpd24 \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) + + all: all-recursive diff --git a/SPECS/nghttp2.spec b/SPECS/nghttp2.spec new file mode 100644 index 0000000..b74b30d --- /dev/null +++ b/SPECS/nghttp2.spec @@ -0,0 +1,160 @@ +%{?scl:%scl_package nghttp2} +%{!?scl:%global pkg_name %{name}} + +Summary: Meta-package that only requires libnghttp2 +Name: %{?scl_prefix}nghttp2 +Version: 1.7.1 +Release: 1%{?dist} +License: MIT +Group: Applications/Internet +URL: https://nghttp2.org/ +Source0: https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/nghttp2-%{version}.tar.xz +Patch0: nghttp2-1.7.0-httpd24.patch + +BuildRequires: CUnit-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +%{?scl:BuildRequires: %{scl}} + +Requires: %{?scl_prefix}libnghttp2%{?_isa} = %{version}-%{release} + +%description +This package installs no files. It only requires the %{?scl_prefix}libnghttp2 package. + + +%package -n %{?scl_prefix}libnghttp2 +Summary: A library implementing the HTTP/2 protocol +Group: Development/Libraries +%{?scl:Requires: %scl_runtime} + +%description -n %{?scl_prefix}libnghttp2 +libnghttp2 is a library implementing the Hypertext Transfer Protocol +version 2 (HTTP/2) protocol in C. + + +%package -n %{?scl_prefix}libnghttp2-devel +Summary: Files needed for building applications with libnghttp2 +Group: Development/Libraries +Requires: %{?scl_prefix}libnghttp2%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n %{?scl_prefix}libnghttp2-devel +The libnghttp2-devel package includes libraries and header files needed +for building applications with libnghttp2. + + +%prep +%setup -q -n %{pkg_name}-%{version} + +%patch0 -p1 -b .httpd24 + +%build +%{?scl:scl enable %{scl} - << \EOF} + +%configure \ + --disable-python-bindings \ + --disable-static \ + --without-libxml2 \ + --without-spdylay \ + --disable-app \ + --disable-examples + +# avoid using rpath +sed -i libtool \ + -e 's/^runpath_var=.*/runpath_var=/' \ + -e 's/^hardcode_libdir_flag_spec=".*"$/hardcode_libdir_flag_spec=""/' + +make %{?_smp_mflags} V=1 +%{?scl:EOF} + + +%install +%{?scl:scl enable %{scl} - << \EOF} +%make_install + +# not needed on Fedora/RHEL +rm -f "$RPM_BUILD_ROOT%{_libdir}/libnghttp2.la" + +# will be installed via %%doc +rm -f "$RPM_BUILD_ROOT%{_datadir}/doc/nghttp2/README.rst" + +# do not install man pages and helper scripts for tools that are not available +rm -fr "$RPM_BUILD_ROOT%{_datadir}/nghttp2" +rm -fr "$RPM_BUILD_ROOT%{_mandir}/man1" +%{?scl:EOF} + +%post -n %{?scl_prefix}libnghttp2 -p /sbin/ldconfig + +%postun -n %{?scl_prefix}libnghttp2 -p /sbin/ldconfig + + +%check +%{?scl:scl enable %{scl} - << \EOF} +# test the just built library instead of the system one, without using rpath +export "LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:${LD_LIBRARY_PATH}" +make %{?_smp_mflags} check +%{?scl:EOF} + + +%files + +%files -n %{?scl_prefix}libnghttp2 +%{_libdir}/libnghttp2*.so.* +%{!?_licensedir:%global license %%doc} +%license COPYING + +%files -n %{?scl_prefix}libnghttp2-devel +%{_includedir}/nghttp2 +%{_libdir}/pkgconfig/libnghttp2.pc +%{_libdir}/libnghttp2*.so +%doc README.rst + + +%changelog +* Wed Feb 17 2016 Jan Kaluza 1.7.1-1 +- fix CVE-2016-1544 (out of memory due to unlimited incoming HTTP header) + +* Tue Feb 09 2016 Jan Kaluza 1.7.0-3 +- make the package build on RHEL-6 (libnghttp2 only) + +* Mon Feb 08 2016 Jan Kaluza 1.7.0-2 +- enable tests + +* Mon Jan 25 2016 Kamil Dudka 1.7.0-1 +- update to the latest upstream release + +* Fri Dec 25 2015 Kamil Dudka 1.6.0-1 +- update to the latest upstream release (fixes CVE-2015-8659) + +* Thu Nov 26 2015 Kamil Dudka 1.5.0-1 +- update to the latest upstream release + +* Mon Oct 26 2015 Kamil Dudka 1.4.0-1 +- update to the latest upstream release + +* Thu Sep 24 2015 Kamil Dudka 1.3.4-1 +- update to the latest upstream release + +* Wed Sep 23 2015 Kamil Dudka 1.3.3-1 +- update to the latest upstream release + +* Wed Sep 16 2015 Kamil Dudka 1.3.2-1 +- update to the latest upstream release + +* Mon Sep 14 2015 Kamil Dudka 1.3.1-1 +- update to the latest upstream release + +* Mon Aug 31 2015 Kamil Dudka 1.3.0-1 +- update to the latest upstream release + +* Mon Aug 17 2015 Kamil Dudka 1.2.1-1 +- update to the latest upstream release + +* Sun Aug 09 2015 Kamil Dudka 1.2.0-1 +- update to the latest upstream release + +* Wed Jul 15 2015 Kamil Dudka 1.1.1-1 +- update to the latest upstream release + +* Tue Jun 30 2015 Kamil Dudka 1.0.5-1 +- packaged for Fedora (#1237247)