From 5c85c1f344c649c7dbd11046b6a412b88e0db5d9 Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Sun, 25 Dec 2022 04:05:03 +0800 Subject: [PATCH 01/10] uboot-kirkwood: build with kirkwood generic subtarget Fix image build fail by using the generic subtarget. Fixes: cada395a ("kirkwood: add generic subtarget") Ref: 40e3f660 ("uboot-fritz4040: build with ipq40xx generic subtarget") Signed-off-by: Kuan-Yi Li [ add commit description ] Signed-off-by: Christian Marangi --- package/boot/uboot-kirkwood/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-kirkwood/Makefile b/package/boot/uboot-kirkwood/Makefile index d9cb10ce13..320d14bfa8 100644 --- a/package/boot/uboot-kirkwood/Makefile +++ b/package/boot/uboot-kirkwood/Makefile @@ -17,6 +17,7 @@ include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET:=kirkwood + BUILD_SUBTARGET:=generic endef define U-Boot/dockstar From 1c35dc26f12fae6aa7e2f3e7cf5481508a0e6c61 Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Sun, 25 Dec 2022 04:06:03 +0800 Subject: [PATCH 02/10] uboot-mxs: build with mxs generic subtarget Fix image build fail by using the generic subtarget. Fixes: 64ef920b ("mxs: add generic subtarget") Ref: 40e3f660 ("uboot-fritz4040: build with ipq40xx generic subtarget") Signed-off-by: Kuan-Yi Li [ add commit description ] Signed-off-by: Christian Marangi --- package/boot/uboot-mxs/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-mxs/Makefile b/package/boot/uboot-mxs/Makefile index 3c908874fa..ae1c027a0a 100644 --- a/package/boot/uboot-mxs/Makefile +++ b/package/boot/uboot-mxs/Makefile @@ -19,6 +19,7 @@ include $(INCLUDE_DIR)/host-build.mk define U-Boot/Default BUILD_TARGET:=mxs + BUILD_SUBTARGET:=generic UBOOT_IMAGE:=u-boot.sb DEFAULT:=y HIDDEN:=1 From 64bfb8b7d64708e3da7d245783ca79de2db6cbff Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Sun, 25 Dec 2022 04:06:14 +0800 Subject: [PATCH 03/10] uboot-zynq: build with zynq generic subtarget Fix image build fail by using the generic subtarget. Fixes: 6d7129ef ("zynq: add generic subtarget") Ref: 40e3f660 ("uboot-fritz4040: build with ipq40xx generic subtarget") Signed-off-by: Kuan-Yi Li [ add commit description ] Signed-off-by: Christian Marangi --- package/boot/uboot-zynq/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile index c605cfaeb2..0f93c4f453 100644 --- a/package/boot/uboot-zynq/Makefile +++ b/package/boot/uboot-zynq/Makefile @@ -18,6 +18,7 @@ include $(INCLUDE_DIR)/host-build.mk define U-Boot/Default BUILD_TARGET:=zynq + BUILD_SUBTARGET:=generic UBOOT_IMAGE:=spl/boot.bin u-boot.img UBOOT_CONFIG:=zynq_$(1) UENV:=default From 808046b2ee9e6cba3d1b4aa8c64c34087b245bfe Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Sun, 25 Dec 2022 04:06:26 +0800 Subject: [PATCH 04/10] uboot-tegra: build with tegra generic subtarget Fix image build fail by using the generic subtarget. Fixes: c028e1b1 ("tegra: add generic subtarget") Ref: 40e3f660 ("uboot-fritz4040: build with ipq40xx generic subtarget") Signed-off-by: Kuan-Yi Li [ add commit description ] Signed-off-by: Christian Marangi --- package/boot/uboot-tegra/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-tegra/Makefile b/package/boot/uboot-tegra/Makefile index 582f7be947..876682fabc 100644 --- a/package/boot/uboot-tegra/Makefile +++ b/package/boot/uboot-tegra/Makefile @@ -18,6 +18,7 @@ include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET := tegra + BUILD_SUBTARGET := generic HIDDEN := y endef From a5f16b4f4fa36dede65c70de1464971052a0dcbd Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Sun, 25 Dec 2022 04:06:38 +0800 Subject: [PATCH 05/10] uboot-omap: build with omap generic subtarget Fix image build fail by using the generic subtarget. Fixes: b2bfea48 ("omap: add generic subtarget") Ref: 40e3f660 ("uboot-fritz4040: build with ipq40xx generic subtarget") Signed-off-by: Kuan-Yi Li [ add commit description ] Signed-off-by: Christian Marangi --- package/boot/uboot-omap/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-omap/Makefile b/package/boot/uboot-omap/Makefile index 4c12eec29d..4ee0bde7ad 100644 --- a/package/boot/uboot-omap/Makefile +++ b/package/boot/uboot-omap/Makefile @@ -18,6 +18,7 @@ include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET:=omap + BUILD_SUBTARGET:=generic UBOOT_IMAGE:=u-boot.img MLO endef From 5c7e4a9d2e25d5ecc33c3c2650e4f954936c9c69 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Mon, 17 Oct 2022 19:28:07 +0100 Subject: [PATCH 06/10] dnsmasq: bump to v2.88 Most relevant feature for openwrt in this release, supports dynamically removing hosts from 'hostsdir' supplied host files. Signed-off-by: Kevin Darbyshire-Bryant --- package/network/services/dnsmasq/Makefile | 4 ++-- .../patches/100-remove-old-runtime-kernel-support.patch | 6 +++--- package/network/services/dnsmasq/patches/200-ubus_dns.patch | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index d4aa298450..65ef9da3a9 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq -PKG_UPSTREAM_VERSION:=2.87 +PKG_UPSTREAM_VERSION:=2.88 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/ -PKG_HASH:=0228c0364a7f2356fd7e7f1549937cbf3099a78d3b2eb1ba5bb0c31e2b89de7a +PKG_HASH:=23544deda10340c053bea6f15a93fed6ea7f5aaa85316bfc671ffa6d22fbc1b3 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch index b1b134a98c..76065375bd 100644 --- a/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch +++ b/package/network/services/dnsmasq/patches/100-remove-old-runtime-kernel-support.patch @@ -26,7 +26,7 @@ Signed-off-by: Kevin Darbyshire-Bryant --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1229,7 +1229,7 @@ extern struct daemon { +@@ -1247,7 +1247,7 @@ extern struct daemon { int inotifyfd; #endif #if defined(HAVE_LINUX_NETWORK) @@ -35,7 +35,7 @@ Signed-off-by: Kevin Darbyshire-Bryant #elif defined(HAVE_BSD_NETWORK) int dhcp_raw_fd, dhcp_icmp_fd, routefd; #endif -@@ -1422,9 +1422,6 @@ int read_write(int fd, unsigned char *pa +@@ -1452,9 +1452,6 @@ int read_write(int fd, unsigned char *pa void close_fds(long max_fd, int spare1, int spare2, int spare3); int wildcard_match(const char* wildcard, const char* match); int wildcard_matchn(const char* wildcard, const char* match, int num); @@ -140,7 +140,7 @@ Signed-off-by: Kevin Darbyshire-Bryant my_syslog(LOG_ERR, _("failed to update ipset %s: %s"), setname, strerror(errno)); --- a/src/util.c +++ b/src/util.c -@@ -833,22 +833,3 @@ int wildcard_matchn(const char* wildcard +@@ -855,22 +855,3 @@ int wildcard_matchn(const char* wildcard return (!num) || (*wildcard == *match); } diff --git a/package/network/services/dnsmasq/patches/200-ubus_dns.patch b/package/network/services/dnsmasq/patches/200-ubus_dns.patch index c4cc1df207..f88763f94a 100644 --- a/package/network/services/dnsmasq/patches/200-ubus_dns.patch +++ b/package/network/services/dnsmasq/patches/200-ubus_dns.patch @@ -1,6 +1,6 @@ --- a/src/dnsmasq.h +++ b/src/dnsmasq.h -@@ -1598,14 +1598,26 @@ void emit_dbus_signal(int action, struct +@@ -1630,14 +1630,26 @@ void emit_dbus_signal(int action, struct /* ubus.c */ #ifdef HAVE_UBUS @@ -151,7 +151,7 @@ if (!ADD_RDLEN(header, p, qlen, rdlen)) return 0; /* bad packet */ } -@@ -568,7 +637,7 @@ int extract_addresses(struct dns_header +@@ -570,7 +639,7 @@ int extract_addresses(struct dns_header cache_start_insert(); /* find_soa is needed for dns_doctor side effects, so don't call it lazily if there are any. */ @@ -269,7 +269,7 @@ struct ubus_context *ubus = (struct ubus_context *)daemon->ubus; --- a/src/dnsmasq.c +++ b/src/dnsmasq.c -@@ -1998,6 +1998,10 @@ static void check_dns_listeners(time_t n +@@ -2003,6 +2003,10 @@ static void check_dns_listeners(time_t n daemon->pipe_to_parent = pipefd[1]; } From ab31547df06430798e6adb853a7faab13eb1754c Mon Sep 17 00:00:00 2001 From: Xuefer H Date: Sat, 24 Dec 2022 20:16:11 +0800 Subject: [PATCH 07/10] libbsd: fix libpath to not use host path libpath.so uses host path in ld script causing other packages fail to cross compile, e.g. perl: "ld: cannot find /usr/lib/libbsd.so.0.11.6: No such file or directory" Fixes: openwrt/packages#19390 Signed-off-by: Xuefer H --- package/libs/libbsd/Makefile | 1 + package/libs/libbsd/patches/001-fix-libpath.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 package/libs/libbsd/patches/001-fix-libpath.patch diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile index 789126cb82..92c7054e3b 100644 --- a/package/libs/libbsd/Makefile +++ b/package/libs/libbsd/Makefile @@ -14,6 +14,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS := libmd +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk diff --git a/package/libs/libbsd/patches/001-fix-libpath.patch b/package/libs/libbsd/patches/001-fix-libpath.patch new file mode 100644 index 0000000000..ca24070249 --- /dev/null +++ b/package/libs/libbsd/patches/001-fix-libpath.patch @@ -0,0 +1,13 @@ +do not use host path to fix cross compiling + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -160,7 +160,7 @@ + (echo '/* GNU ld script'; \ + echo ' * The MD5 functions are provided by the libmd library. */'; \ + cat format.ld; \ +- echo "GROUP($(runtimelibdir)/$$soname AS_NEEDED($(MD5_LIBS)))"; \ ++ echo "GROUP($$soname AS_NEEDED($(MD5_LIBS)))"; \ + )>$(DESTDIR)$(libdir)/libbsd.so + else + if [ "$(libdir)" != "$(runtimelibdir)" ]; then \ From 5db4fbad4f55acf1a1bcc8b9685e2581789226a5 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 17 Jul 2022 13:26:14 +0200 Subject: [PATCH 08/10] rules: drop -Wno-error additional flags from default TARGET_CFLAGS We currently enable -Wno-error=unused-but-set-variable and -Wno-error=unused-result by default on every compile package. While this is (relatively) unharmful, we should follow other project direction and starts enforcing good code quality. For example the linux kernel recently started to enforce Wall by default and clean code is mandatory for inclusion. Drop for good these flags and and make it mandatory to correctly handle return values at least with a warning log if they are not strictly error condition. Signed-off-by: Christian Marangi --- rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.mk b/rules.mk index e17852e021..d53f673d42 100644 --- a/rules.mk +++ b/rules.mk @@ -184,7 +184,7 @@ ifndef DUMP -include $(TOOLCHAIN_DIR)/info.mk export GCC_HONOUR_COPTS:=0 TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-) - TARGET_CFLAGS+= -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result + TARGET_CFLAGS+= -fhonour-copts TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include ifeq ($(CONFIG_USE_MUSL),y) TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include/fortify From 73dca49f355fe10d1d5e629b0df584b03a1849b3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 26 Dec 2022 13:58:47 +0100 Subject: [PATCH 09/10] uhttpd: update to latest Git HEAD 2397755 client: fix incorrectly emitting HTTP 413 for certain content lengths Signed-off-by: Hauke Mehrtens --- package/network/services/uhttpd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index d6a5a27181..55ca3f6818 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2022-08-12 -PKG_SOURCE_VERSION:=e3395cd90bed9b7b9fc319e79528fedcc0d947fe -PKG_MIRROR_HASH:=14e9df9f85c406b8abbb14427e5f678383782500c549d842c0481cd954fc4ea3 +PKG_SOURCE_DATE:=2022-10-31 +PKG_SOURCE_VERSION:=23977554d9694d025eada50a5547e99ee1be7838 +PKG_MIRROR_HASH:=e546fd57d0d0be6a51e2aeb5797febe8c89d2bba61b26c930ecb0616d5f6ace9 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC From fb15cb4ce9559021d463b5cb3816d8a9eeb8f3f9 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 21 Dec 2022 23:32:23 +0100 Subject: [PATCH 10/10] iproute2: Fix build with GCC 12 and glibc 2.36 This fixes the detection of name_to_handle_at() when GCC 12 and glibc 2.36 are used. Signed-off-by: Hauke Mehrtens --- ...-configure-Remove-include-sys-stat.h.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch diff --git a/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch b/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch new file mode 100644 index 0000000000..02bb20297d --- /dev/null +++ b/package/network/utils/iproute2/patches/320-configure-Remove-include-sys-stat.h.patch @@ -0,0 +1,43 @@ +From 3a3a2f6be704c970938eb8dac4eb0118f1c2fb06 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Wed, 21 Dec 2022 23:26:28 +0100 +Subject: [PATCH iproute2 v2] configure: Remove include + +The check_name_to_handle_at() function in the configure script is +including sys/stat.h. This include fails with glibc 2.36 like this: +```` +In file included from /linux-5.15.84/include/uapi/linux/stat.h:5, + from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31, + from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465, + from config.YExfMc/name_to_handle_at_test.c:3: +/linux-5.15.84/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp] + 10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" + | ^~~~~~~ +In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5, + from /linux-5.15.84/include/uapi/linux/types.h:14: +/linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory + 5 | #include + | ^~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +```` + +Just removing the include works, the manpage of name_to_handle_at() says +only fcntl.h is needed. + +Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented") +Tested-by: Heiko Thiery +Signed-off-by: Hauke Mehrtens +--- + configure | 1 - + 1 file changed, 1 deletion(-) + +--- a/configure ++++ b/configure +@@ -215,7 +215,6 @@ check_name_to_handle_at() + cat >$TMPDIR/name_to_handle_at_test.c < +-#include + #include + int main(int argc, char **argv) + {