From 2846cc8a6b9f5262e963f6de0cb2992b1e4497bf Mon Sep 17 00:00:00 2001 From: Martijn Scheepers Date: Wed, 4 Jan 2023 09:27:26 +0100 Subject: [PATCH] update lighttpd server --- board/sdn/h1502r11/linux.config | 1 - ...t-lighttpd-configuration-file-to-ha.patch} | 68 ++++---- package/lighttpd/Config.in | 96 +++++++++--- package/lighttpd/lighttpd.hash | 6 +- package/lighttpd/lighttpd.mk | 148 +++++++++++++----- .../0001-fix-man-page-installation.patch | 66 ++++++++ ...kefile-add-dedicated-install-targets.patch | 71 +++++++++ ...nd-on-assert-h-for-XXH_STATIC_ASSERT.patch | 29 ++++ ...dd-install_libxxhash.includes-target.patch | 39 +++++ package/xxhash/xxhash.hash | 5 +- package/xxhash/xxhash.mk | 32 +++- 11 files changed, 455 insertions(+), 106 deletions(-) rename package/lighttpd/{0001-Fix-default-config-file.patch => 0001-Modify-the-default-lighttpd-configuration-file-to-ha.patch} (55%) create mode 100644 package/xxhash/0001-fix-man-page-installation.patch create mode 100644 package/xxhash/0002-Makefile-add-dedicated-install-targets.patch create mode 100644 package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch create mode 100644 package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch diff --git a/board/sdn/h1502r11/linux.config b/board/sdn/h1502r11/linux.config index e86d8f4b0d..c98de90868 100644 --- a/board/sdn/h1502r11/linux.config +++ b/board/sdn/h1502r11/linux.config @@ -208,5 +208,4 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_FTRACE is not set # CONFIG_RUNTIME_TESTING_MENU is not set -# CONFIG_ARM_UNWIND is not set CONFIG_DEBUG_USER=y diff --git a/package/lighttpd/0001-Fix-default-config-file.patch b/package/lighttpd/0001-Modify-the-default-lighttpd-configuration-file-to-ha.patch similarity index 55% rename from package/lighttpd/0001-Fix-default-config-file.patch rename to package/lighttpd/0001-Modify-the-default-lighttpd-configuration-file-to-ha.patch index ada1589760..1a887655b8 100644 --- a/package/lighttpd/0001-Fix-default-config-file.patch +++ b/package/lighttpd/0001-Modify-the-default-lighttpd-configuration-file-to-ha.patch @@ -1,21 +1,28 @@ -Modify the default lighttpd configuration file to have one a starting conf +From d1de409b0aeb8dffd42673444043caf01437804e Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Mon, 13 Dec 2021 22:07:17 +0100 +Subject: [PATCH] Modify the default lighttpd configuration file to have one a + starting conf * Changed the log path to /var/log and logs filenames * Disable IPv6 * Do not setuid to a user that doesn't exist on the system - * Disable pdf ranges fix for Adobe Reader since it uses regex and we - don't always have pcre support * Change the network backend to writev since linux-sendfile fails on buildroot Signed-off-by: Maxime Ripard Signed-off-by: Simon Dawson [Gustavo: update for 1.4.37] Signed-off-by: Gustavo Zacarias +--- + doc/config/conf.d/access_log.conf | 2 +- + doc/config/lighttpd.conf | 16 ++++++++-------- + 2 files changed, 9 insertions(+), 9 deletions(-) -diff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.37/doc/config/conf.d/access_log.conf ---- lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf 2015-09-01 14:38:48.684673663 -0300 -+++ lighttpd-1.4.37/doc/config/conf.d/access_log.conf 2015-09-01 14:38:53.975855142 -0300 -@@ -9,7 +9,7 @@ +diff --git a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf +index e685d43..92cff4f 100644 +--- a/doc/config/conf.d/access_log.conf ++++ b/doc/config/conf.d/access_log.conf +@@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" ) ## ## Default access log. ## @@ -24,21 +31,22 @@ diff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.3 ## ## The default format produces CLF compatible output. -diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf ---- lighttpd-1.4.37.orig/doc/config/lighttpd.conf 2015-09-01 14:38:48.684673663 -0300 -+++ lighttpd-1.4.37/doc/config/lighttpd.conf 2015-09-01 14:39:40.256442492 -0300 +diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf +index 495d2a1..c3e1446 100644 +--- a/doc/config/lighttpd.conf ++++ b/doc/config/lighttpd.conf @@ -13,8 +13,8 @@ ## if you add a variable here. Add the corresponding variable in the - ## chroot example aswell. + ## chroot example as well. ## -var.log_root = "/var/log/lighttpd" -var.server_root = "/srv/www" +var.log_root = "/var/log" +var.server_root = "/var/www" - var.state_dir = "/var/run" + var.state_dir = "/run" var.home_dir = "/var/lib/lighttpd" var.conf_dir = "/etc/lighttpd" -@@ -90,7 +90,7 @@ +@@ -90,7 +90,7 @@ server.port = 80 ## ## Use IPv6? ## @@ -47,7 +55,7 @@ diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/con ## ## bind to a specific IP -@@ -101,8 +101,8 @@ +@@ -101,8 +101,8 @@ server.use-ipv6 = "enable" ## Run as a different username/groupname. ## This requires root permissions during startup. ## @@ -56,9 +64,9 @@ diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/con +server.username = "www-data" +server.groupname = "www-data" - ## - ## enable core files. -@@ -112,7 +112,7 @@ + ## + ## Enable lighttpd to serve requests on sockets received from systemd +@@ -118,7 +118,7 @@ server.groupname = "lighttpd" ## ## Document root ## @@ -67,7 +75,7 @@ diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/con ## ## The value for the "Server:" response field. -@@ -138,7 +138,7 @@ +@@ -144,7 +144,7 @@ server.pid-file = state_dir + "/lighttpd.pid" ## ## Path to the error log file ## @@ -76,25 +84,15 @@ diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/con ## ## If you want to log to syslog you have to unset the -@@ -188,7 +188,7 @@ - ## sendfile - is recommended for small files. - ## writev - is recommended for sending many large files +@@ -192,7 +192,7 @@ include conf_dir + "/conf.d/debug.conf" + ## and write(). Every modern OS provides its own syscall to help network + ## servers transfer files as fast as possible ## --server.network-backend = "sendfile" +-#server.network-backend = "sendfile" +server.network-backend = "writev" ## ## As lighttpd is a single-threaded server, its main resource limit is -@@ -311,9 +311,9 @@ - ## disable range requests for pdf files - ## workaround for a bug in the Acrobat Reader plugin. - ## --$HTTP["url"] =~ "\.pdf$" { -- server.range-requests = "disable" --} -+# $HTTP["url"] =~ "\.pdf$" { -+# server.range-requests = "disable" -+# } - - ## - ## url handling modules (rewrite, redirect) +-- +2.34.1 + diff --git a/package/lighttpd/Config.in b/package/lighttpd/Config.in index 7d75663629..5d9e624506 100644 --- a/package/lighttpd/Config.in +++ b/package/lighttpd/Config.in @@ -6,6 +6,7 @@ config BR2_PACKAGE_LIGHTTPD bool "lighttpd" depends on BR2_USE_MMU # fork() depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_XXHASH help lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance @@ -16,10 +17,59 @@ config BR2_PACKAGE_LIGHTTPD webserver-software for every server that is suffering load problems. - http://www.lighttpd.net/ + https://www.lighttpd.net/ if BR2_PACKAGE_LIGHTTPD +config BR2_PACKAGE_LIGHTTPD_BROTLI + bool "brotli support" + select BR2_PACKAGE_BROTLI + help + Enable brotli support for lighttpd mod_deflate. + +config BR2_PACKAGE_LIGHTTPD_BZIP2 + bool "bzip2 support" + select BR2_PACKAGE_BZIP2 + help + Enable bzip2 support for lighttpd mod_deflate. + +config BR2_PACKAGE_LIGHTTPD_KRB5 + bool "krb5 support" + select BR2_PACKAGE_LIBKRB5 + help + Enable Kerberos5 support for lighttpd mod_auth. + +config BR2_PACKAGE_LIGHTTPD_LDAP + bool "ldap support" + depends on BR2_USE_WCHAR # openldap + select BR2_PACKAGE_OPENLDAP + help + Enable LDAP support for lighttpd mod_auth mod_vhostdb_ldap. + +comment "ldap support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_LIGHTTPD_LUA + bool "lua support" + depends on BR2_PACKAGE_LUA + help + Enable Lua support. Needed to support mod_magnet + +config BR2_PACKAGE_LIGHTTPD_MAXMINDDB + bool "maxminddb support" + select BR2_PACKAGE_LIBMAXMINDDB + help + Enable MaxMind GeoIP2 support. Needed to support mod_maxminddb + +config BR2_PACKAGE_LIGHTTPD_MYSQL + bool "mysql support" + depends on BR2_PACKAGE_MARIADB + help + Enable mysql support for lighttpd mod_vhostdb_mysql. + +comment "mysql support needs mariadb" + depends on !BR2_PACKAGE_MARIADB + config BR2_PACKAGE_LIGHTTPD_OPENSSL bool "openssl support" select BR2_PACKAGE_OPENSSL @@ -33,24 +83,28 @@ config BR2_PACKAGE_LIGHTTPD_PAM help Enable PAM authentication support for lighttpd. -config BR2_PACKAGE_LIGHTTPD_ZLIB - bool "zlib support" - select BR2_PACKAGE_ZLIB - help - Enable zlib support for lighttpd mod_compress. - -config BR2_PACKAGE_LIGHTTPD_BZIP2 - bool "bzip2 support" - select BR2_PACKAGE_BZIP2 - help - Enable bzip2 support for lighttpd mod_compress. - config BR2_PACKAGE_LIGHTTPD_PCRE bool "pcre support" - select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE2 help Enable PCRE support. Needed to support mod_rewrite +config BR2_PACKAGE_LIGHTTPD_PGSQL + bool "pgsql support" + depends on BR2_USE_MMU # postgresql + depends on BR2_USE_WCHAR # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresql + select BR2_PACKAGE_POSTGRESQL + help + Enable postgres support for lighttpd mod_vhostdb_pgsql. + +comment "pgsql support needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR + +comment "pgsql support can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST + config BR2_PACKAGE_LIGHTTPD_WEBDAV bool "webdav support" select BR2_PACKAGE_LIBXML2 @@ -58,10 +112,16 @@ config BR2_PACKAGE_LIGHTTPD_WEBDAV help Enable webdav support. Needed to support mod_webdav -config BR2_PACKAGE_LIGHTTPD_LUA - bool "lua support" - depends on BR2_PACKAGE_LUA +config BR2_PACKAGE_LIGHTTPD_ZLIB + bool "zlib support" + select BR2_PACKAGE_ZLIB help - Enable Lua support. Needed to support mod_magnet + Enable zlib support for lighttpd mod_deflate. + +config BR2_PACKAGE_LIGHTTPD_ZSTD + bool "zstd support" + select BR2_PACKAGE_ZSTD + help + Enable zstd support for lighttpd mod_deflate. endif diff --git a/package/lighttpd/lighttpd.hash b/package/lighttpd/lighttpd.hash index 7f20bf9dce..8353857ad9 100644 --- a/package/lighttpd/lighttpd.hash +++ b/package/lighttpd/lighttpd.hash @@ -1,4 +1,4 @@ -# From https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.55.sha256sum -sha256 6a0b50e9c9d5cc3d9e48592315c25a2d645858f863e1ccd120507a30ce21e927 lighttpd-1.4.55.tar.xz +# From https://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.67.sha512sum +sha512 acfde71675d1c54b4e805998d1dabaa291437181bdbca0d6a3a069584c4576d7585d2401f57f8691f23aaf6283a95ac61156789a055a2a7236fd305c1f248627 lighttpd-1.4.67.tar.xz # Locally calculated -sha256 5c98cad2fbaf5c5e2562bcbab401a7c557c1bb1bac9914ecc63730925052fb13 COPYING +sha256 5c98cad2fbaf5c5e2562bcbab401a7c557c1bb1bac9914ecc63730925052fb13 COPYING diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk index 7181465c66..d3440040fb 100644 --- a/package/lighttpd/lighttpd.mk +++ b/package/lighttpd/lighttpd.mk @@ -5,71 +5,133 @@ ################################################################################ LIGHTTPD_VERSION_MAJOR = 1.4 -LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).55 +LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).67 LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-$(LIGHTTPD_VERSION_MAJOR).x LIGHTTPD_LICENSE = BSD-3-Clause LIGHTTPD_LICENSE_FILES = COPYING -LIGHTTPD_DEPENDENCIES = host-pkgconf +LIGHTTPD_CPE_ID_VENDOR = lighttpd +LIGHTTPD_DEPENDENCIES = host-pkgconf xxhash LIGHTTPD_CONF_OPTS = \ - --without-wolfssl \ - --libdir=/usr/lib/lighttpd \ - --libexecdir=/usr/lib + -Dwith_dbi=false \ + -Dwith_fam=false \ + -Dwith_gnutls=false \ + -Dwith_libev=false \ + -Dwith_libunwind=false \ + -Dwith_mbedtls=false \ + -Dwith_nettle=false \ + -Dwith_nss=false \ + -Dwith_pcre=false \ + -Dwith_sasl=false \ + -Dwith_wolfssl=false \ + -Dwith_xattr=false \ + -Dwith_xxhash=true \ + -Dbuild_extra_warnings=false \ + -Dbuild_static=false \ + -Dmoduledir=lib/lighttpd -ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y) -LIGHTTPD_DEPENDENCIES += openssl -LIGHTTPD_CONF_OPTS += --with-openssl +ifeq ($(BR2_PACKAGE_LIGHTTPD_BROTLI),y) +LIGHTTPD_DEPENDENCIES += brotli +LIGHTTPD_CONF_OPTS += -Dwith_brotli=true else -LIGHTTPD_CONF_OPTS += --without-openssl -endif - -ifeq ($(BR2_PACKAGE_LIGHTTPD_PAM),y) -LIGHTTPD_DEPENDENCIES += linux-pam -LIGHTTPD_CONF_OPTS += --with-pam -else -LIGHTTPD_CONF_OPTS += --without-pam -endif - -ifeq ($(BR2_PACKAGE_LIGHTTPD_ZLIB),y) -LIGHTTPD_DEPENDENCIES += zlib -LIGHTTPD_CONF_OPTS += --with-zlib -else -LIGHTTPD_CONF_OPTS += --without-zlib +LIGHTTPD_CONF_OPTS += -Dwith_brotli=false endif ifeq ($(BR2_PACKAGE_LIGHTTPD_BZIP2),y) LIGHTTPD_DEPENDENCIES += bzip2 -LIGHTTPD_CONF_OPTS += --with-bzip2 +LIGHTTPD_CONF_OPTS += -Dwith_bzip=true else -LIGHTTPD_CONF_OPTS += --without-bzip2 +LIGHTTPD_CONF_OPTS += -Dwith_bzip=false endif -ifeq ($(BR2_PACKAGE_LIGHTTPD_PCRE),y) -LIGHTTPD_CONF_ENV = PCRECONFIG=$(STAGING_DIR)/usr/bin/pcre-config -LIGHTTPD_DEPENDENCIES += pcre -LIGHTTPD_CONF_OPTS += --with-pcre +ifeq ($(BR2_PACKAGE_LIGHTTPD_KRB5),y) +LIGHTTPD_DEPENDENCIES += libkrb5 +LIGHTTPD_CONF_OPTS += -Dwith_krb5=true else -LIGHTTPD_CONF_OPTS += --without-pcre +LIGHTTPD_CONF_OPTS += -Dwith_krb5=false endif -ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y) -LIGHTTPD_DEPENDENCIES += libxml2 sqlite -LIGHTTPD_CONF_OPTS += --with-webdav-props -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) -LIGHTTPD_CONF_OPTS += --with-webdav-locks -LIGHTTPD_DEPENDENCIES += util-linux +ifeq ($(BR2_PACKAGE_LIGHTTPD_LDAP),y) +LIGHTTPD_DEPENDENCIES += openldap +LIGHTTPD_CONF_OPTS += -Dwith_ldap=true else -LIGHTTPD_CONF_OPTS += --without-webdav-locks -endif -else -LIGHTTPD_CONF_OPTS += --without-webdav-props --without-webdav-locks +LIGHTTPD_CONF_OPTS += -Dwith_ldap=false endif ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y) LIGHTTPD_DEPENDENCIES += lua -LIGHTTPD_CONF_OPTS += --with-lua +LIGHTTPD_CONF_OPTS += -Dwith_lua=true else -LIGHTTPD_CONF_OPTS += --without-lua +LIGHTTPD_CONF_OPTS += -Dwith_lua=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_MAXMINDDB),y) +LIGHTTPD_DEPENDENCIES += libmaxminddb +LIGHTTPD_CONF_OPTS += -Dwith_maxminddb=true +else +LIGHTTPD_CONF_OPTS += -Dwith_maxminddb=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_MYSQL),y) +LIGHTTPD_DEPENDENCIES += mysql +LIGHTTPD_CONF_OPTS += -Dwith_mysql=true +else +LIGHTTPD_CONF_OPTS += -Dwith_mysql=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y) +LIGHTTPD_DEPENDENCIES += openssl +LIGHTTPD_CONF_OPTS += -Dwith_openssl=true +else +LIGHTTPD_CONF_OPTS += -Dwith_openssl=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_PAM),y) +LIGHTTPD_DEPENDENCIES += linux-pam +LIGHTTPD_CONF_OPTS += -Dwith_pam=true +else +LIGHTTPD_CONF_OPTS += -Dwith_pam=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_PCRE),y) +LIGHTTPD_DEPENDENCIES += pcre2 +LIGHTTPD_CONF_OPTS += -Dwith_pcre2=true +else +LIGHTTPD_CONF_OPTS += -Dwith_pcre2=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_PGSQL),y) +LIGHTTPD_DEPENDENCIES += postgresql +LIGHTTPD_CONF_OPTS += -Dwith_pgsql=true +else +LIGHTTPD_CONF_OPTS += -Dwith_pgsql=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y) +LIGHTTPD_DEPENDENCIES += libxml2 sqlite +LIGHTTPD_CONF_OPTS += -Dwith_webdav_props=true +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +LIGHTTPD_CONF_OPTS += -Dwith_webdav_locks=true +LIGHTTPD_DEPENDENCIES += util-linux +else +LIGHTTPD_CONF_OPTS += -Dwith_webdav_locks=false +endif +else +LIGHTTPD_CONF_OPTS += -Dwith_webdav_props=false -Dwith_webdav_locks=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_ZLIB),y) +LIGHTTPD_DEPENDENCIES += zlib +LIGHTTPD_CONF_OPTS += -Dwith_zlib=true +else +LIGHTTPD_CONF_OPTS += -Dwith_zlib=false +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_ZSTD),y) +LIGHTTPD_DEPENDENCIES += zstd +LIGHTTPD_CONF_OPTS += -Dwith_zstd=true +else +LIGHTTPD_CONF_OPTS += -Dwith_zstd=false endif define LIGHTTPD_INSTALL_CONFIG @@ -103,4 +165,4 @@ define LIGHTTPD_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/tmpfiles.d/lighttpd.conf endef -$(eval $(autotools-package)) +$(eval $(meson-package)) diff --git a/package/xxhash/0001-fix-man-page-installation.patch b/package/xxhash/0001-fix-man-page-installation.patch new file mode 100644 index 0000000000..5d2a5a4efa --- /dev/null +++ b/package/xxhash/0001-fix-man-page-installation.patch @@ -0,0 +1,66 @@ +From 836f4e735cf368542f14005e41d2f84ec29dfd60 Mon Sep 17 00:00:00 2001 +From: Yann Collet +Date: Sat, 4 Dec 2021 10:29:49 -0800 +Subject: [PATCH] fix man page installation + +for variant redirectors (`xxh32sum`, `xxh64sum` and `xxh128sum`). +fix #647, reported by @jpalus. + +Also : slightly updated man page text, for clarity and accuracy. + +[Retrieved (and updated to keep only Makefile update) from: +https://github.com/Cyan4973/xxHash/commit/836f4e735cf368542f14005e41d2f84ec29dfd60] +Signed-off-by: Fabrice Fontaine +--- + Makefile | 14 ++++++++------ + cli/xxhsum.1 | 8 ++++---- + cli/xxhsum.1.md | 8 +++++--- + 3 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/Makefile b/Makefile +index 2fbefbc6..63273e16 100644 +--- a/Makefile ++++ b/Makefile +@@ -457,6 +457,7 @@ endif + + INSTALL_PROGRAM ?= $(INSTALL) + INSTALL_DATA ?= $(INSTALL) -m 644 ++INSTALL_DIR ?= $(INSTALL) -d -m 755 + + + # Escape special symbols by putting each character into its separate class +@@ -496,7 +497,7 @@ libxxhash.pc: libxxhash.pc.in + .PHONY: install + install: lib libxxhash.pc xxhsum ## install libraries, CLI, links and man page + @echo Installing libxxhash +- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR) ++ $(Q)$(INSTALL_DIR) $(DESTDIR)$(LIBDIR) + $(Q)$(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR) + $(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR) + $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) +@@ -508,19 +509,20 @@ ifeq ($(DISPATCH),1) + $(Q)$(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR) + endif + @echo Installing pkgconfig +- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ ++ $(Q)$(INSTALL_DIR) $(DESTDIR)$(PKGCONFIGDIR)/ + $(Q)$(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/ + @echo Installing xxhsum +- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/ ++ $(Q)$(INSTALL_DIR) $(DESTDIR)$(BINDIR)/ + $(Q)$(INSTALL_PROGRAM) xxhsum $(DESTDIR)$(BINDIR)/xxhsum + $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh32sum + $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh64sum + $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh128sum + @echo Installing man pages ++ $(Q)$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/ + $(Q)$(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1 +- $(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh32sum.1 +- $(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh64sum.1 +- $(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh128sum.1 ++ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1 ++ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1 ++ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1 + @echo xxhash installation completed + + .PHONY: uninstall diff --git a/package/xxhash/0002-Makefile-add-dedicated-install-targets.patch b/package/xxhash/0002-Makefile-add-dedicated-install-targets.patch new file mode 100644 index 0000000000..17d34a0823 --- /dev/null +++ b/package/xxhash/0002-Makefile-add-dedicated-install-targets.patch @@ -0,0 +1,71 @@ +From 0e7418bce83bb9c236d9cb4535a36a80cd0cc663 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 15 Dec 2021 21:45:14 +0100 +Subject: [PATCH] Makefile: add dedicated install targets + +Add dedicated install targets to allow the user to install only xxhsum, +the static library, the shared library, etc. + +This is especially useful on embedded systems where dynamic library is +not always supported by toolchains + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/Cyan4973/xxHash/commit/db9c199e99f7b4d419647b1ef49c547fc2547516] +--- + Makefile | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 8d4fcd21..5fe72972 100644 +--- a/Makefile ++++ b/Makefile +@@ -505,11 +505,14 @@ libxxhash.pc: libxxhash.pc.in + $< > $@ + + +-.PHONY: install +-install: lib libxxhash.pc xxhsum ## install libraries, CLI, links and man page +- @echo Installing libxxhash ++install_libxxhash.a: libxxhash.a ++ @echo Installing libxxhash.a + $(Q)$(INSTALL_DIR) $(DESTDIR)$(LIBDIR) + $(Q)$(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR) ++ ++install_libxxhash: libxxhash ++ @echo Installing libxxhash ++ $(Q)$(INSTALL_DIR) $(DESTDIR)$(LIBDIR) + $(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR) + $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) + $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) +@@ -519,21 +522,30 @@ install: lib libxxhash.pc xxhsum ## install libraries, CLI, links and man page + ifeq ($(DISPATCH),1) + $(Q)$(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR) + endif ++ ++install_libxxhash.pc: libxxhash.pc + @echo Installing pkgconfig + $(Q)$(INSTALL_DIR) $(DESTDIR)$(PKGCONFIGDIR)/ + $(Q)$(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/ ++ ++install_xxhsum: xxhsum + @echo Installing xxhsum + $(Q)$(INSTALL_DIR) $(DESTDIR)$(BINDIR)/ + $(Q)$(INSTALL_PROGRAM) xxhsum $(DESTDIR)$(BINDIR)/xxhsum + $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh32sum + $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh64sum + $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh128sum ++ ++install_man: + @echo Installing man pages + $(Q)$(INSTALL_DIR) $(DESTDIR)$(MANDIR)/ + $(Q)$(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1 + $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1 + $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1 + $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1 ++ ++.PHONY: install ++install: install_libxxhash.a install_libxxhash install_libxxhash.pc install_xxhsum install_man ## install libraries, CLI, links and man page + @echo xxhash installation completed + + .PHONY: uninstall diff --git a/package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch b/package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch new file mode 100644 index 0000000000..3b65ae1d6c --- /dev/null +++ b/package/xxhash/0003-do-no-longer-depend-on-assert-h-for-XXH_STATIC_ASSERT.patch @@ -0,0 +1,29 @@ +From 6189ecd3d44a693460f86280ccf49d33cb4b18e1 Mon Sep 17 00:00:00 2001 +From: Yann Collet +Date: Sun, 26 Dec 2021 15:15:26 -0800 +Subject: [PATCH] do no longer depend on `` for XXH_STATIC_ASSERT + +since some versions are buggy. + +Use `_Static_assert` instead, which is part of the C11 language. +[Retrieved from: +https://github.com/Cyan4973/xxHash/commit/6189ecd3d44a693460f86280ccf49d33cb4b18e1] +Signed-off-by: Fabrice Fontaine +--- + xxhash.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/xxhash.h b/xxhash.h +index 311a69c7..5dfd5c45 100644 +--- a/xxhash.h ++++ b/xxhash.h +@@ -1749,8 +1749,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) + /* note: use after variable declarations */ + #ifndef XXH_STATIC_ASSERT + # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ +-# include +-# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) ++# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0) + # elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */ + # define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0) + # else diff --git a/package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch b/package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch new file mode 100644 index 0000000000..22c8cdaadf --- /dev/null +++ b/package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch @@ -0,0 +1,39 @@ +From b7c91f761b6d0b79398d0a064d2d6e34de3dfa47 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 27 Dec 2022 23:12:37 +0100 +Subject: [PATCH] Makefile: add install_libxxhash.includes target + +Add install_libxxhash.includes to be able to install headers when +building and installing the static library + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/Cyan4973/xxHash/pull/776] +--- + Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index cfa5779..2276282 100644 +--- a/Makefile ++++ b/Makefile +@@ -557,6 +557,8 @@ install_libxxhash: libxxhash + $(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR) + $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) + $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) ++ ++install_libxxhash.includes: + $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR) # includes + $(Q)$(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR) + $(Q)$(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0 +@@ -586,7 +588,7 @@ install_man: + $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1 + + .PHONY: install +-install: install_libxxhash.a install_libxxhash install_libxxhash.pc install_xxhsum install_man ## install libraries, CLI, links and man page ++install: install_libxxhash.a install_libxxhash install_libxxhash.includes install_libxxhash.pc install_xxhsum install_man ## install libraries, CLI, links and man page + @echo xxhash installation completed + + .PHONY: uninstall +-- +2.35.1 + diff --git a/package/xxhash/xxhash.hash b/package/xxhash/xxhash.hash index 097694364b..2c99236a45 100644 --- a/package/xxhash/xxhash.hash +++ b/package/xxhash/xxhash.hash @@ -1,3 +1,4 @@ # locally computed -sha256 7e93d28e81c3e95ff07674a400001d0cdf23b7842d49b211e5582d00d8e3ac3e xxhash-0.7.2.tar.gz -sha256 94df5da58df6c83bcc2fc0c84aaad71a0b0fe94625060d6cac000121dda37730 LICENSE +sha256 3bb6b7d6f30c591dd65aaaff1c8b7a5b94d81687998ca9400082c739a690436c xxhash-0.8.1.tar.gz +sha256 553d0035773ddd1590045f8fdc3a4c6ead31e36336721aeca8421e88ed1c9f80 LICENSE +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 cli/COPYING diff --git a/package/xxhash/xxhash.mk b/package/xxhash/xxhash.mk index bd51c9bd1b..04bc98690f 100644 --- a/package/xxhash/xxhash.mk +++ b/package/xxhash/xxhash.mk @@ -4,17 +4,41 @@ # ################################################################################ -XXHASH_VERSION = 0.7.2 +XXHASH_VERSION = 0.8.1 XXHASH_SITE = $(call github,Cyan4973,xxHash,v$(XXHASH_VERSION)) XXHASH_LICENSE = BSD-2-Clause (library), GPL-2.0+ (xxhsum) -XXHASH_LICENSE_FILES = LICENSE +XXHASH_LICENSE_FILES = LICENSE cli/COPYING +XXHASH_INSTALL_STAGING = YES + +XXHASH_TARGETS = xxhsum libxxhash.pc +XXHASH_INSTALL_TARGETS = \ + install_libxxhash.includes \ + install_libxxhash.pc \ + install_xxhsum + +ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +XXHASH_TARGETS += libxxhash.a +XXHASH_INSTALL_TARGETS += install_libxxhash.a +endif + +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +XXHASH_TARGETS += libxxhash +XXHASH_INSTALL_TARGETS += install_libxxhash +endif define XXHASH_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) xxhsum + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(XXHASH_TARGETS) +endef + +define XXHASH_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(STAGING_DIR) $(XXHASH_INSTALL_TARGETS) endef define XXHASH_INSTALL_TARGET_CMDS - $(INSTALL) -m 0755 -D $(@D)/xxhsum $(TARGET_DIR)/usr/bin/xxhsum + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) $(XXHASH_INSTALL_TARGETS) endef $(eval $(generic-package))