libnghttp2: new package
PATCH 1/2 libnghttp2: new package
nghttp2 is an implementation of HTTP/2 and its header compression algorithm HPACK in C.
--- package/Config.in | 1 + package/libnghttp2/Config.in | 7 +++++++ package/libnghttp2/libnghttp2.hash | 2 ++ package/libnghttp2/libnghttp2.mk | 22 ++++++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 package/libnghttp2/Config.in create mode 100644 package/libnghttp2/libnghttp2.hash create mode 100644 package/libnghttp2/libnghttp2.mk
package/Config.in +1 -0
@@ -1454,6 +1454,7 @@ menu "Networking" source "package/libnfnetlink/Config.in" source "package/libnftnl/Config.in" source "package/libnice/Config.in" + source "package/libnghttp2/Config.in" source "package/libnl/Config.in" source "package/liboauth/Config.in" source "package/liboping/Config.in"
package/libnghttp2/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBNGHTTP2 + bool "libnghttp2" + help + nghttp2 is an implementation of HTTP/2 and its header + compression algorithm HPACK in C. + + https://nghttp2.org/
package/libnghttp2/libnghttp2.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 f75e8f228217f23aa5eabfbab140e061cda00b7c21e34c891ecfb248d663303f nghttp2-1.32.0.tar.gz
package/libnghttp2/libnghttp2.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# nghttp2 +# +################################################################################ + +LIBNGHTTP2_VERSION = 1.32.0 +LIBNGHTTP2_SOURCE = nghttp2-$(LIBNGHTTP2_VERSION).tar.gz +LIBNGHTTP2_SITE = https://github.com/nghttp2/nghttp2/releases/download/v$(LIBNGHTTP2_VERSION) +LIBNGHTTP2_LICENSE = MIT +LIBNGHTTP2_LICENSE_FILES = COPYING LICENSE +LIBNGHTTP2_INSTALL_STAGING = YES +LIBNGHTTP2_DEPENDENCIES = host-pkgconf +LIBNGHTTP2_CONF_OPTS = --enable-lib-only + +define LIBNGHTTP2_INSTALL_CLEAN_HOOK + $(Q)rm -rf $(TARGET_DIR)/usr/share/nghttp2 +endef + +LIBNGHTTP2_POST_INSTALL_TARGET_HOOKS += LIBNGHTTP2_INSTALL_CLEAN_HOOK + +$(eval $(autotools-package))
Signature · 1 line
2.13.6
PATCH 2/2 libcurl: add libnghttp2 optional dependency
The libnghttp2 package has recently been added to buildroot. When enabled, this adds support for HTTP2 to libcurl.
By default, libcurl configure script will enable HTTP2 if the library is found using pkg-config. Adding this option makes the build consistent.
--- package/libcurl/libcurl.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/libcurl/libcurl.mk +7 -0
@@ -88,6 +88,13 @@ else LIBCURL_CONF_OPTS += --without-brotli endif +ifeq ($(BR2_PACKAGE_LIBNGHTTP2),y) +LIBCURL_DEPENDENCIES += nghttp2 +LIBCURL_CONF_OPTS += --with-nghttp2 +else +LIBCURL_CONF_OPTS += --without-nghttp2 +endif + define LIBCURL_FIX_DOT_PC printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in endef
Signature · 1 line
2.13.6
PATCH 1/2 libnghttp2: new package
In reply to Michaël BurtinHello,
Thanks for this contribution. A few comments/questions below.
Quoted 10 lines · Micha?l Burtin
nghttp2 is an implementation of HTTP/2 and its header compression algorithm HPACK in C.
Signed-off-by Anisse Astier <[email protected]>Signed-off-by Micha?l Burtin <[email protected]>--- package/Config.in | 1 + package/libnghttp2/Config.in | 7 +++++++ package/libnghttp2/libnghttp2.hash | 2 ++ package/libnghttp2/libnghttp2.mk | 22 ++++++++++++++++++++++
Could you add an entry in the DEVELOPERS file for this package ?
package/libnghttp2/Config.in line 2
Quoted 8 lines
package/libnghttp2/Config.in new file +2
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBNGHTTP2 + bool "libnghttp2"
I am not sure about the name and categorization of the package. Indeed the upstream name really is nghttp2, not libnghttp2, and my understanding is that it provides more than a library, it also has a HTTP/2 client, server and proxy.
Buildroot doesn't have a concept of binary packages, only source packages, which can install one or several libraries, one or several programs. So the package name should probably not reflect the fact that it installs a library, but instead simply mimic the upstream name, i.e nghttp2.
The next question is whether it should appear in Libraries->Networking or in Networking applications. I think the former is OK, as we do have a number of other network libraries that also install programs.
So, in other words, I would suggest to name the package nghttp2, but keep it in Libraries->Networking in the menuconfig organization.
Could you adjust the package accordingly ?
package/libnghttp2/Config.in line 7
Quoted 5 lines
package/libnghttp2/Config.in new file +5
-0+ help + nghttp2 is an implementation of HTTP/2 and its header + compression algorithm HPACK in C. + + https://nghttp2.org/
Indentation for the help text is one tab + 2 spaces. This is verified by ./utils/check-package, so this hints that you have not checked your package with check-package :-)
package/libnghttp2/libnghttp2.hash line 2
Quoted 8 lines
package/libnghttp2/libnghttp2.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally calculated +sha256 f75e8f228217f23aa5eabfbab140e061cda00b7c21e34c891ecfb248d663303f nghttp2-1.32.0.tar.gz
We now like to have the hash of the license files here.
Quoted 7 lines
package/libnghttp2/libnghttp2.mk new file +1
-0@@ -0,0 +1,22 @@ +################################################################################
package/libnghttp2/libnghttp2.mk line 11
Quoted 10 lines
package/libnghttp2/libnghttp2.mk new file +10
-0+# +# nghttp2 +# +################################################################################ + +LIBNGHTTP2_VERSION = 1.32.0 +LIBNGHTTP2_SOURCE = nghttp2-$(LIBNGHTTP2_VERSION).tar.gz +LIBNGHTTP2_SITE = https://github.com/nghttp2/nghttp2/releases/download/v$(LIBNGHTTP2_VERSION) +LIBNGHTTP2_LICENSE = MIT +LIBNGHTTP2_LICENSE_FILES = COPYING LICENSE
There is no file named "LICENSE" in the tarball, so I guess you didn't test "make legal-info" with this package enabled.
package/libnghttp2/libnghttp2.mk line 18
Quoted 7 lines
package/libnghttp2/libnghttp2.mk new file +7
-0+LIBNGHTTP2_INSTALL_STAGING = YES +LIBNGHTTP2_DEPENDENCIES = host-pkgconf +LIBNGHTTP2_CONF_OPTS = --enable-lib-only + +define LIBNGHTTP2_INSTALL_CLEAN_HOOK + $(Q)rm -rf $(TARGET_DIR)/usr/share/nghttp2 +endef
Use $(RM) instead of using rm -rf. And also add a small comment indicating that this only removes a Python script that isn't useful for the nghttp2 library.
Could you fix those details and send an updated version?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com