From c893f42164ba7c596c9f8544a0c50c848ed95f69 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Thu, 31 Dec 2020 22:04:09 +0800 Subject: [PATCH 01/19] Revert "rtl8192du: fix work under openwrt" This reverts commit 549292fcfa0109316524c9a192a3c2321eebaf5d. --- .../patches/020-remove-repeat-flies.patch | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 package/ntlf9t/rtl8192du/patches/020-remove-repeat-flies.patch diff --git a/package/ntlf9t/rtl8192du/patches/020-remove-repeat-flies.patch b/package/ntlf9t/rtl8192du/patches/020-remove-repeat-flies.patch deleted file mode 100644 index 76baf2a24a..0000000000 --- a/package/ntlf9t/rtl8192du/patches/020-remove-repeat-flies.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4 Mon Sep 17 00:00:00 2001 -From: Ben Greear -Date: Fri, 9 Nov 2018 16:21:43 -0800 -Subject: [PATCH] Fix build against openwrt backports tree. - -Like breaks builds elsewhere, can fix it up later. - -Signed-off-by: Ben Greear ---- - include/drv_conf.h | 4 +++- - .../{wireless.h => old_unused_rtl_wireless.h} | 0 - include/{autoconf.h => rtl_autoconf.h} | 0 - 3 files changed, 3 insertions(+), 1 deletions(-) - rename include/linux/{wireless.h => old_unused_rtl_wireless.h} (100%) - rename include/{autoconf.h => rtl_autoconf.h} (100%) - -diff --git a/include/drv_conf.h b/include/drv_conf.h -index 0d20a7e..f0a9f88 100644 ---- a/include/drv_conf.h -+++ b/include/drv_conf.h -@@ -14,7 +14,9 @@ - *****************************************************************************/ - #ifndef __DRV_CONF_H__ - #define __DRV_CONF_H__ --#include "autoconf.h" -+ -+#include -+#include "rtl_autoconf.h" - #include "hal_ic_cfg.h" - - #if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) -diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h -similarity index 100% -rename from include/linux/wireless.h -rename to include/linux/old_unused_rtl_wireless.h -diff --git a/include/autoconf.h b/include/rtl_autoconf.h -similarity index 100% -rename from include/autoconf.h -rename to include/rtl_autoconf.h From 9f853eb850dfa4034c3fb333fffc63721bbd81d2 Mon Sep 17 00:00:00 2001 From: LGA1150 Date: Wed, 2 Jan 2019 01:04:39 +0800 Subject: [PATCH 02/19] base-files: do not generate ULA prefix --- package/base-files/files/bin/config_generate | 1 - 1 file changed, 1 deletion(-) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 748e442a60..3bc09db73e 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -20,7 +20,6 @@ generate_static_network() { uci -q batch <<-EOF delete network.globals set network.globals='globals' - set network.globals.ula_prefix='auto' EOF } From 06cb96007185d6d74f4e45bd2b38e90829f5b9e5 Mon Sep 17 00:00:00 2001 From: Beginner <70857188+Beginner-Go@users.noreply.github.com> Date: Fri, 1 Jan 2021 23:58:58 +0800 Subject: [PATCH 03/19] Xray: Update to v1.2.0 --- package/lean/xray/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lean/xray/Makefile b/package/lean/xray/Makefile index e668d32d04..41f1ff9fab 100644 --- a/package/lean/xray/Makefile +++ b/package/lean/xray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xray -PKG_VERSION:=1.1.5 +PKG_VERSION:=1.2.0 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION) PKG_SOURCE:=xray-core-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/XTLS/xray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=36b6fe0b7908e98d18944f115dabd452812268e5c4c8fe76251120d956cca4a1 +PKG_HASH:=1e32fac7a4c669751087aa6b32d922ea312afcde025866099d56cea936761d51 PKG_LICENSE:=MPL PKG_LICENSE_FILES:=LICENSE From 822dc97470c78beec3080192f80c2adf3c2da510 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 2 Jan 2021 11:49:45 +0800 Subject: [PATCH 04/19] Revert "base-files: do not generate ULA prefix" This reverts commit 9f853eb850dfa4034c3fb333fffc63721bbd81d2. --- package/base-files/files/bin/config_generate | 1 + 1 file changed, 1 insertion(+) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 3bc09db73e..748e442a60 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -20,6 +20,7 @@ generate_static_network() { uci -q batch <<-EOF delete network.globals set network.globals='globals' + set network.globals.ula_prefix='auto' EOF } From 97ae6c31e2145b6386640b4e03153cc8d72570c0 Mon Sep 17 00:00:00 2001 From: Johannes Kimmel Date: Tue, 15 Dec 2020 00:31:52 +0100 Subject: [PATCH 05/19] vxlan: allow for dynamic source ip selection (FS#3426) By setting 'auto', the zero address or the empty string as source address (option ipaddr, option ip6addr), vxlan will choose one dynamically. This helps in setups where a wan ip or prefix changes. This corresponse to setting up an vxlan tunnel with: proto vxlan6: # ip link add vx0 type vxlan id ID local :: ... proto vxlan: # ip link add vx0 type vxlan id ID local 0.0.0.0 ... While it is possible to not specify a source ip at all, the kernel will default to setting up a ipv4 tunnel. The kernel will take any hint from source and peer ips to figure out, what tunnel type to use. To make sure we setup an ipv6 tunnel for proto vxlan6, this workaround is needed. This will not change the behaviour of currently working configurations. However this will allow former broken configurations, namely those not specifying both a source address and tunnel interface, to setup a tunnel interface. Previously those configurations weren't reporting an error and were stueck in a setup loop like in Bug FS#3426. This change lifts the currently very strict behaviour and should fix the following bug: Fixes: FS#3426 Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3426 Signed-off-by: Johannes Kimmel --- package/network/config/vxlan/Makefile | 2 +- package/network/config/vxlan/files/vxlan.sh | 35 +++++++-------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/package/network/config/vxlan/Makefile b/package/network/config/vxlan/Makefile index 47ea50cdf2..286b0181d3 100644 --- a/package/network/config/vxlan/Makefile +++ b/package/network/config/vxlan/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vxlan -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/config/vxlan/files/vxlan.sh b/package/network/config/vxlan/files/vxlan.sh index 5c1c484c47..a087c4a3ce 100755 --- a/package/network/config/vxlan/files/vxlan.sh +++ b/package/network/config/vxlan/files/vxlan.sh @@ -114,18 +114,11 @@ proto_vxlan_setup() { ( proto_add_host_dependency "$cfg" '' "$tunlink" ) - [ -z "$ipaddr" ] && { - local wanif="$tunlink" - if [ -z "$wanif" ] && ! network_find_wan wanif; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - - if ! network_get_ipaddr ipaddr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - } + case "$ipaddr" in + "auto"|"") + ipaddr="0.0.0.0" + ;; + esac vxlan_generic_setup "$cfg" 'vxlan' "$ipaddr" "$peeraddr" } @@ -138,18 +131,12 @@ proto_vxlan6_setup() { ( proto_add_host_dependency "$cfg" '' "$tunlink" ) - [ -z "$ip6addr" ] && { - local wanif="$tunlink" - if [ -z "$wanif" ] && ! network_find_wan6 wanif; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - - if ! network_get_ipaddr6 ip6addr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - exit - fi - } + case "$ip6addr" in + "auto"|"") + # ensure tunnel via ipv6 + ip6addr="::" + ;; + esac vxlan_generic_setup "$cfg" 'vxlan6' "$ip6addr" "$peer6addr" } From edf785406dfcb7473f2541477f81660702984291 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 29 Dec 2020 18:19:08 -1000 Subject: [PATCH 06/19] build/prereq: merge ifndef IB block together Multiple prereq checks are only required within the build system but not for the ImageBuilder. These checks are excluded by using ifndef IB. This commit merges the three ifndef IB blocks together. Signed-off-by: Paul Spooren --- include/prereq-build.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 5045fabdfb..fb11a070a1 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -38,9 +38,7 @@ $(eval $(call TestHostCommand,working-gcc, \ it appears to be broken, \ echo 'int main(int argc, char **argv) { return 0; }' | \ gcc -x c -o $(TMP_DIR)/a.out -)) -endif -ifndef IB $(eval $(call SetupHostCommand,g++, \ Please install the GNU C++ Compiler (g++) 4.8 or later, \ $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \ @@ -53,14 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \ echo 'int main(int argc, char **argv) { return 0; }' | \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out)) -endif -ifndef IB $(eval $(call TestHostCommand,ncurses, \ Please install ncurses. (Missing libncurses.so or ncurses.h), \ echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses)) -endif +endif # IB ifeq ($(HOST_OS),Linux) zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic From 4ed9b20113f38763184115d79906d6a752a836a9 Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Mon, 28 Dec 2020 13:37:27 +0100 Subject: [PATCH 07/19] tools/fakeroot: remove undefined symbol messages glibc started to return errors from dlerror() for dlsym() lookup failures which results in a lot of messages from fakeroot like dlsym(acl_get_fd): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_get_fd dlsym(acl_get_file): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_get_file dlsym(acl_set_fd): staging_dir/host/lib/libfakeroot.so: undefined symbol: acl_set_fd when building OpenWrt using a recent glibc. Use the patch from the upstream Debian package to silence these messages. Link: https://bugs.debian.org/830912 Fixes: FS#3393 Signed-off-by: Sven Wegener --- tools/fakeroot/Makefile | 1 + .../patches/200-hide-dlsym-error.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tools/fakeroot/patches/200-hide-dlsym-error.patch diff --git a/tools/fakeroot/Makefile b/tools/fakeroot/Makefile index 9ab2679626..8c30ee71c3 100644 --- a/tools/fakeroot/Makefile +++ b/tools/fakeroot/Makefile @@ -6,6 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fakeroot PKG_VERSION:=1.24 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=http://deb.debian.org/debian/pool/main/f/fakeroot diff --git a/tools/fakeroot/patches/200-hide-dlsym-error.patch b/tools/fakeroot/patches/200-hide-dlsym-error.patch new file mode 100644 index 0000000000..3fd34c8778 --- /dev/null +++ b/tools/fakeroot/patches/200-hide-dlsym-error.patch @@ -0,0 +1,32 @@ +Description: Hide error from dlsym() + dlsym(), starting in glibc 2.24 actually reports errors. In our case, + we try to get ACL functions which are not in the glibc. This causes + failures in test suites, so hide those messages for non-debugging + purposes for now. It also makes the build logs annoying to read. +Author: Julian Andres Klode +Origin: vendor +Bug-Debian: https://bugs.debian.org/830912 +Forwarded: no +Last-Update: 2016-08-12 + +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -256,10 +256,16 @@ void load_library_symbols(void){ + /* clear dlerror() just in case dlsym() legitimately returns NULL */ + msg = dlerror(); + *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name); ++ + if ( (msg = dlerror()) != NULL){ +- fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); +-/* abort ();*/ ++#ifdef LIBFAKEROOT_DEBUGGING ++ if (fakeroot_debug) { ++ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); ++/* abort ();*/ ++ } ++#endif + } ++ + } + } + From 6b3eae72c3cfa9f9a75b7e71af6552187ce09620 Mon Sep 17 00:00:00 2001 From: Russell Senior Date: Wed, 30 Dec 2020 23:16:22 -0800 Subject: [PATCH 08/19] iproute2: update to 5.10.0 c8faeca5 (ss: mptcp: fix add_addr_accepted stat print, 2020-11-18) 0d78e8ea (tc: pedit: fix memory leak in print_pedit, 2020-12-11) ec1346ac (devlink: fix memory leak in cmd_dev_flash(), 2020-12-11) 309e6027 (man: tc-flower: fix manpage, 2020-12-11) 376367d9 (uapi: merge in change to bpf.h, 2020-12-14) 2e80ae89 (Merge branch 'gcc-10' into main, 2020-12-03) 755b1c58 (tc/mqprio: json-ify output, 2020-12-02) 975c4944 (ip/netns: use flock when setting up /run/netns, 2020-11-27) fb054cb3 (uapi: update devlink.h, 2020-11-29) c95d63e4 (uapi: update devlink.h, 2020-11-29) cae2e929 (f_u32: fix compiler gcc-10 compiler warning, 2020-11-29) c0149839 (misc: fix compiler warning in ifstat and nstat, 2020-11-29) 2319db90 (tc: fix compiler warnings in ip6 pedit, 2020-11-29) 5bdc4e91 (bridge: fix string length warning, 2020-11-29) f8176999 (devlink: fix uninitialized warning, 2020-11-29) 7a49ff9d (bridge: report correct version, 2020-11-15) 8682f588 (tc-mpls: fix manpage example and help message string, 2020-11-02) 7c7a0fe0 (tc-vlan: fix help and error message strings, 2020-11-02) 72f88bd4 (uapi: update kernel headers from 5.10-rc2, 2020-11-08) b90c39be (rdma: fix spelling error in comment, 2020-11-08) c8424b73 (man: fix spelling errors, 2020-11-08) cbf64817 (tc/m_gate: fix spelling errors, 2020-11-08) 14b189f0 (uapi: updates from 5.10-rc1, 2020-11-03) 9fc5bf73 (libnetlink: define __aligned conditionally, 2020-10-26) eb12cc9a (Merge branch 'main' into next, 2020-10-25) f1298d76 (m_mpls: test the 'mac_push' action after 'modify', 2020-10-22) 2b7a7684 (Merge branch 'tipc-encryption' into next, 2020-10-20) 2bf1ba5a (tipc: add option to set rekeying for encryption, 2020-10-16) 5fb36818 (tipc: add option to set master key for encryption, 2020-10-16) b4edd6a8 (Merge branch 'tc-mpls-l2-vpn' into next Guillaume Nault says:, 2020-10-20) 02a261b5 (m_mpls: add mac_push action, 2020-10-19) d61167dd (m_vlan: add pop_eth and push_eth actions, 2020-10-19) 3342688a (devlink: display elapsed time during flash update, 2020-10-14) cb7ce51c (v5.9.0, 2020-10-15) b5a583fb (Merge branch 'main' into next Signed-off-by: David Ahern , 2020-10-11) 78120128 (genl: ctrl: print op -> policy idx mapping, 2020-10-03) 91c54917 (Merge branch 'bridge-igmpv3-mldv2' into next Nikolay Aleksandrov says:, 2020-10-11) 86588450 (bridge: mdb: print protocol when available, 2020-10-08) 2de81d1e (bridge: mdb: print source list when available, 2020-10-08) 1d28c480 (bridge: mdb: print filter mode when available, 2020-10-08) e331677e (bridge: mdb: show igmpv3/mldv2 flags, 2020-10-08) f94e8b07 (bridge: mdb: print fast_leave flag, 2020-10-08) 547b3197 (bridge: mdb: add support for source address, 2020-10-08) f905191a (Update kernel headers, 2020-10-11) 4322b13c (ip xfrm: support setting XFRMA_SET_MARK_MASK attribute in states, 2020-10-02) 8dc1db80 (devlink: Add health reporter test command support, 2020-10-01) 01216471 (devlink: support setting the overwrite mask attribute, 2020-09-30) 34be2d26 (Update kernel headers, 2020-10-07) d2be31d9 (ss: add support for xdp statistics, 2020-09-24) f481515c (Update kernel headers, 2020-09-29) b8663da0 (ip: promote missed packets to the -s row, 2020-09-16) cec67df9 (Merge branch 'devlink-controller-external-info' into next Parav Pandit says:, 2020-09-22) 748cbad3 (devlink: Show controller number of a devlink port, 2020-09-18) 8fadd011 (devlink: Show external port attribute, 2020-09-18) 454429e8 (Update kernel headers, 2020-09-22) ad34d5fa (iproute2: ss: add support to expose various inet sockopts, 2020-08-19) c8eb4b52 (Update kernel headers, 2020-09-08) abee772f (tipc: support 128bit node identity for peer removing, 2020-08-27) 6fd53b2a (iplink: add support for protodown reason, 2020-08-28) af27494d (ip xfrm: support printing XFRMA_SET_MARK_MASK attribute in states, 2020-08-28) 275eed9b (Merge branch 'main' into next, 2020-09-01) cc889b82 (genl: ctrl: support dumping netlink policy, 2020-08-24) d5acae24 (libnetlink: add nl_print_policy() helper, 2020-08-24) 784fa9f6 (libnetlink: add rtattr_for_each_nested() iteration macro, 2020-08-24) OpenWrt patches unchanged. Successfully built for ramips/mt7621 and x86/geode with: CONFIG_PACKAGE_devlink=m CONFIG_PACKAGE_genl=m CONFIG_PACKAGE_ip-bridge=m CONFIG_PACKAGE_ip-full=m CONFIG_PACKAGE_ip-tiny=m CONFIG_PACKAGE_nstat=m CONFIG_PACKAGE_rdma=m CONFIG_PACKAGE_ss=m CONFIG_PACKAGE_tc=m Minimally run-tested ip-tiny on ramips/mt7621 (ubnt-erx). Signed-off-by: Russell Senior --- package/network/utils/iproute2/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 609d885d77..79bfe567a5 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.9.0 +PKG_VERSION:=5.10.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=a25dac94bcdcf2f73316c7f812115ea7a5710580bad892b08a83d00c6b33dacf +PKG_HASH:=a54a34ae309c0406b2d1fb3a46158613ffb83d33fefd5d4a27f0010237ac53e9 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 From 2039f855903e7c3b1213174e3965c1ba1f5cad48 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 29 Dec 2020 14:49:20 -0300 Subject: [PATCH 09/19] wolfssl: Update to v4.6.0-stable This version fixes a large number of bugs, although no security vulnerabilities are listed. Full changelog at: https://www.wolfssl.com/docs/wolfssl-changelog/ or, as part of the version's README.md: https://github.com/wolfSSL/wolfssl/blob/v4.6.0-stable/README.md Due a number of API additions, size increases from 374.7K to 408.8K for arm_cortex_a9_vfpv3-d16. The ABI does not change from previous version. Backported patches were removed; remaining patch was refreshed. Signed-off-by: Eneas U de Queiroz --- package/libs/wolfssl/Makefile | 6 +- .../patches/100-disable-hardening-check.patch | 2 +- .../patches/110-fix-build-on-big-endian.patch | 27 ---- .../200-fix-checkhostname-matching.patch | 123 ------------------ 4 files changed, 4 insertions(+), 154 deletions(-) delete mode 100644 package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch delete mode 100644 package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 6758f7dd08..dcc6aca40c 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=4.5.0-stable -PKG_RELEASE:=5 +PKG_VERSION:=4.6.0-stable +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=7de62300ce14daa0051bfefc7c4d6302f96cabc768b6ae49eda77523b118250c +PKG_HASH:=053aefbb02d0b06b27c5e2df6875b4b587318755b7db9d6aa8d72206b310a848 PKG_FIXUP:=libtool PKG_INSTALL:=1 diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch index 43337ba970..c2793285e7 100644 --- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch +++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch @@ -1,6 +1,6 @@ --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h -@@ -2128,7 +2128,7 @@ extern void uITRON4_free(void *p) ; +@@ -2248,7 +2248,7 @@ extern void uITRON4_free(void *p) ; #endif /* warning for not using harden build options (default with ./configure) */ diff --git a/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch b/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch deleted file mode 100644 index 3838865559..0000000000 --- a/package/libs/wolfssl/patches/110-fix-build-on-big-endian.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b90acc91d0cd276befe7f08f87ba2dc5ee7122ff Mon Sep 17 00:00:00 2001 -From: Tesfa Mael -Date: Wed, 26 Aug 2020 10:13:06 -0700 -Subject: [PATCH] Make ByteReverseWords available for big and little endian - ---- - wolfcrypt/src/misc.c | 2 -- - 1 file changed, 2 deletions(-) - ---- a/wolfcrypt/src/misc.c -+++ b/wolfcrypt/src/misc.c -@@ -120,7 +120,6 @@ WC_STATIC WC_INLINE word32 ByteReverseWo - return rotlFixed(value, 16U); - #endif - } --#if defined(LITTLE_ENDIAN_ORDER) - /* This routine performs a byte swap of words array of a given count. */ - WC_STATIC WC_INLINE void ByteReverseWords(word32* out, const word32* in, - word32 byteCount) -@@ -131,7 +130,6 @@ WC_STATIC WC_INLINE void ByteReverseWord - out[i] = ByteReverseWord32(in[i]); - - } --#endif /* LITTLE_ENDIAN_ORDER */ - - #if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS) - diff --git a/package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch b/package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch deleted file mode 100644 index aaf14e46d9..0000000000 --- a/package/libs/wolfssl/patches/200-fix-checkhostname-matching.patch +++ /dev/null @@ -1,123 +0,0 @@ -From ea5c290d605b2af7b10d6e5ce69aa3534f52385f Mon Sep 17 00:00:00 2001 -From: Eric Blankenhorn -Date: Fri, 17 Jul 2020 08:37:02 -0500 -Subject: [PATCH] Fix CheckHostName matching - ---- - src/internal.c | 18 ++++++++++++------ - src/ssl.c | 5 +++++ - tests/api.c | 30 ++++++++++++++++++++++++++++++ - 3 files changed, 47 insertions(+), 6 deletions(-) - -diff --git a/src/internal.c b/src/internal.c -index dc57df0242..cda815d875 100644 ---- a/src/internal.c -+++ b/src/internal.c -@@ -9346,7 +9346,7 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN) - altName = dCert->altNames; - - if (checkCN != NULL) { -- *checkCN = altName == NULL; -+ *checkCN = (altName == NULL) ? 1 : 0; - } - - while (altName) { -@@ -9415,23 +9415,29 @@ int CheckForAltNames(DecodedCert* dCert, const char* domain, int* checkCN) - int CheckHostName(DecodedCert* dCert, const char *domainName, size_t domainNameLen) - { - int checkCN; -+ int ret = DOMAIN_NAME_MISMATCH; - - /* Assume name is NUL terminated. */ - (void)domainNameLen; - - if (CheckForAltNames(dCert, domainName, &checkCN) != 1) { -- WOLFSSL_MSG("DomainName match on alt names failed too"); -- return DOMAIN_NAME_MISMATCH; -+ WOLFSSL_MSG("DomainName match on alt names failed"); - } -+ else { -+ ret = 0; -+ } -+ - if (checkCN == 1) { - if (MatchDomainName(dCert->subjectCN, dCert->subjectCNLen, -- domainName) == 0) { -+ domainName) == 1) { -+ ret = 0; -+ } -+ else { - WOLFSSL_MSG("DomainName match on common name failed"); -- return DOMAIN_NAME_MISMATCH; - } - } - -- return 0; -+ return ret; - } - - int CheckIPAddr(DecodedCert* dCert, const char* ipasc) -diff --git a/src/ssl.c b/src/ssl.c -index 11bc08a3cb..59ad9bae60 100644 ---- a/src/ssl.c -+++ b/src/ssl.c -@@ -43661,6 +43661,11 @@ int wolfSSL_X509_check_host(WOLFSSL_X509 *x, const char *chk, size_t chklen, - (void)flags; - (void)peername; - -+ if ((x == NULL) || (chk == NULL)) { -+ WOLFSSL_MSG("Invalid parameter"); -+ return WOLFSSL_FAILURE; -+ } -+ - if (flags == WOLFSSL_NO_WILDCARDS) { - WOLFSSL_MSG("X509_CHECK_FLAG_NO_WILDCARDS not yet implemented"); - return WOLFSSL_FAILURE; -diff --git a/tests/api.c b/tests/api.c -index 774a332968..db888952d4 100644 ---- a/tests/api.c -+++ b/tests/api.c -@@ -23875,6 +23875,35 @@ static void test_wolfSSL_X509_issuer_name_hash(void) - #endif - } - -+static void test_wolfSSL_X509_check_host(void) -+{ -+#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && !defined(NO_FILESYSTEM) \ -+ && !defined(NO_SHA) && !defined(NO_RSA) -+ -+ X509* x509; -+ const char altName[] = "example.com"; -+ -+ printf(testingFmt, "wolfSSL_X509_check_host()"); -+ -+ AssertNotNull(x509 = wolfSSL_X509_load_certificate_file(cliCertFile, -+ SSL_FILETYPE_PEM)); -+ -+ AssertIntEQ(X509_check_host(x509, altName, XSTRLEN(altName), 0, NULL), -+ WOLFSSL_SUCCESS); -+ -+ AssertIntEQ(X509_check_host(x509, NULL, 0, 0, NULL), -+ WOLFSSL_FAILURE); -+ -+ X509_free(x509); -+ -+ AssertIntEQ(X509_check_host(NULL, altName, XSTRLEN(altName), 0, NULL), -+ WOLFSSL_FAILURE); -+ -+ printf(resultFmt, passed); -+ -+#endif -+} -+ - static void test_wolfSSL_DES(void) - { - #if defined(OPENSSL_EXTRA) && !defined(NO_DES3) -@@ -36407,6 +36436,7 @@ void ApiTest(void) - test_wolfSSL_X509_INFO(); - test_wolfSSL_X509_subject_name_hash(); - test_wolfSSL_X509_issuer_name_hash(); -+ test_wolfSSL_X509_check_host(); - test_wolfSSL_DES(); - test_wolfSSL_certs(); - test_wolfSSL_ASN1_TIME_print(); From 7fd0554c531bf08e827482898a1845b5d9331e52 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 1 Jan 2021 17:04:34 +0100 Subject: [PATCH 10/19] ppp: Remove already applied patch This patch was already applied upstream and not needed here. Fixes: 06403981e1f2 ("ppp: update to version 2.4.7.git-2019-05-06") Signed-off-by: Hauke Mehrtens --- package/network/services/ppp/Makefile | 2 +- .../ppp/patches/540-save-pppol2tp_fd_str.patch | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index 0ec46a6883..370c9916b9 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/paulusmack/ppp diff --git a/package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch b/package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch deleted file mode 100644 index d6d44afbd0..0000000000 --- a/package/network/services/ppp/patches/540-save-pppol2tp_fd_str.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/pppd/plugins/pppol2tp/pppol2tp.c -+++ b/pppd/plugins/pppol2tp/pppol2tp.c -@@ -152,6 +152,10 @@ static int setdevname_pppol2tp(char **ar - if (pppol2tp_fd_str == NULL) - novm("PPPoL2TP FD"); - -+ pppol2tp_fd_str = strdup(*argv); -+ if (pppol2tp_fd_str == NULL) -+ novm("PPPoL2TP FD"); -+ - /* Setup option defaults. Compression options are disabled! */ - - modem = 0; From 9cf9b2b75334832320cfe3031ea72ceeb35fa7ed Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 29 Dec 2020 17:09:27 -0800 Subject: [PATCH 11/19] trace-cmd: update to 2.9.1 Fixed license information. Adjusted Makefile to new install paths. Backported upstream patch to fix compilation with musl. Replaces local and incomplete patch. Signed-off-by: Rosen Penev --- package/devel/trace-cmd/Makefile | 22 ++-- .../devel/trace-cmd/patches/100-musl.patch | 104 ++++++++++++++++++ .../patches/110-mac80211_tracepoint.patch | 10 +- .../devel/trace-cmd/patches/120-limits.patch | 24 ---- 4 files changed, 121 insertions(+), 39 deletions(-) create mode 100644 package/devel/trace-cmd/patches/100-musl.patch delete mode 100644 package/devel/trace-cmd/patches/120-limits.patch diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile index d1f73ae9bb..e15b04ad23 100644 --- a/package/devel/trace-cmd/Makefile +++ b/package/devel/trace-cmd/Makefile @@ -1,16 +1,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trace-cmd -PKG_VERSION:=v2.6.1 -PKG_RELEASE:=3 +PKG_VERSION:=v2.9.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/ -PKG_HASH:=4eb79001778a77c0ada10265e7f4b5515a3e21a46f0a15c2e8cc614efdf3f5df +PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38 + +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING + PKG_INSTALL:=1 PKG_USE_MIPS16:=0 -PKG_LICENSE:=GPL-2.0 - PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -34,27 +36,27 @@ MAKE_FLAGS += \ NO_AUDIT=1 \ prefix=/usr -PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins +PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins PLUGINS_MAIN := function hrtimer mac80211 sched_switch TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE define Package/trace-cmd/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/ $(CP) \ $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ - $(1)/usr/lib/trace-cmd/plugins + $(1)/usr/lib/traceevent/plugins endef define Package/trace-cmd-extra/install - $(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins + $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins $(CP) \ $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ $$(filter-out $(PLUGINS_MAIN), \ $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ - $(1)/usr/lib/trace-cmd/plugins + $(1)/usr/lib/traceevent/plugins endef $(eval $(call BuildPackage,trace-cmd)) diff --git a/package/devel/trace-cmd/patches/100-musl.patch b/package/devel/trace-cmd/patches/100-musl.patch new file mode 100644 index 0000000000..80b419eb82 --- /dev/null +++ b/package/devel/trace-cmd/patches/100-musl.patch @@ -0,0 +1,104 @@ +From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001 +From: Beniamin Sandu +Date: Mon, 30 Nov 2020 14:27:55 +0200 +Subject: trace-cmd: make it build against musl C library + +* add some missing headers and macros +* set pthread affinity using pthread_setaffinity_np after creating the thread +instead of pthread_attr_setaffinity_np (which seems to not be implemented +in musl) + +Tested using https://musl.cc/x86_64-linux-musl-native.tgz + +Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com + +Reviewed-by: Tzvetomir Stoyanov (VMware) +Signed-off-by: Beniamin Sandu +[ Fixed a whitespace issue ] +Signed-off-by: Steven Rostedt (VMware) +--- + include/trace-cmd/trace-cmd.h | 1 + + lib/trace-cmd/include/trace-cmd-local.h | 1 + + lib/tracefs/tracefs-events.c | 1 + + tracecmd/include/trace-local.h | 1 + + tracecmd/trace-tsync.c | 16 +++++++++++----- + 5 files changed, 20 insertions(+), 5 deletions(-) + +--- a/include/trace-cmd/trace-cmd.h ++++ b/include/trace-cmd/trace-cmd.h +@@ -6,6 +6,7 @@ + #ifndef _TRACE_CMD_H + #define _TRACE_CMD_H + ++#include + #include "traceevent/event-parse.h" + + #define TRACECMD_MAGIC { 23, 8, 68 } +--- a/lib/trace-cmd/include/trace-cmd-local.h ++++ b/lib/trace-cmd/include/trace-cmd-local.h +@@ -26,5 +26,6 @@ void warning(const char *fmt, ...); + #endif + #endif + ++#include + + #endif /* _TRACE_CMD_LOCAL_H */ +--- a/lib/tracefs/tracefs-events.c ++++ b/lib/tracefs/tracefs-events.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "kbuffer.h" + #include "tracefs.h" +--- a/tracecmd/include/trace-local.h ++++ b/tracecmd/include/trace-local.h +@@ -8,6 +8,7 @@ + + #include + #include /* for DIR */ ++#include + + #include "trace-cmd.h" + #include "event-utils.h" +--- a/tracecmd/trace-tsync.c ++++ b/tracecmd/trace-tsync.c +@@ -104,13 +104,16 @@ int tracecmd_host_tsync(struct buffer_in + + pthread_attr_init(&attrib); + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); +- if (!get_first_cpu(&pin_mask, &mask_size)) +- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); + + ret = pthread_create(&instance->tsync_thread, &attrib, + tsync_host_thread, &instance->tsync); +- if (!ret) ++ ++ if (!ret) { ++ if (!get_first_cpu(&pin_mask, &mask_size)) ++ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask); + instance->tsync_thread_running = true; ++ } ++ + if (pin_mask) + CPU_FREE(pin_mask); + pthread_attr_destroy(&attrib); +@@ -243,11 +246,14 @@ unsigned int tracecmd_guest_tsync(char * + pthread_attr_init(&attrib); + tsync->sync_proto = proto; + pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); +- if (!get_first_cpu(&pin_mask, &mask_size)) +- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); + + ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); + ++ if (!ret) { ++ if (!get_first_cpu(&pin_mask, &mask_size)) ++ pthread_setaffinity_np(*thr_id, mask_size, pin_mask); ++ } ++ + if (pin_mask) + CPU_FREE(pin_mask); + pthread_attr_destroy(&attrib); diff --git a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch index e2a68972a3..cffcaa06b5 100644 --- a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch +++ b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch @@ -1,16 +1,16 @@ ---- a/plugin_mac80211.c -+++ b/plugin_mac80211.c -@@ -179,12 +179,15 @@ static int drv_config(struct trace_seq * +--- a/lib/traceevent/plugins/plugin_mac80211.c ++++ b/lib/traceevent/plugins/plugin_mac80211.c +@@ -165,12 +165,15 @@ static int drv_config(struct trace_seq * { 2, "IDLE" }, { 3, "QOS"}, ); -- pevent_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); +- tep_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); - print_enum(s, event, "channel_type", data, - { 0, "noht" }, - { 1, "ht20" }, - { 2, "ht40-" }, - { 3, "ht40+" }); -+ pevent_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); ++ tep_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); + print_enum(s, event, "chan_width", data, + { 0, "20_noht" }, + { 1, "20" }, diff --git a/package/devel/trace-cmd/patches/120-limits.patch b/package/devel/trace-cmd/patches/120-limits.patch deleted file mode 100644 index b9d91cc03e..0000000000 --- a/package/devel/trace-cmd/patches/120-limits.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 293ff6d5bc9d3b8bfbc3c57d20d3d2d00986c168 Mon Sep 17 00:00:00 2001 -From: Alexander Couzens -Date: Sun, 26 Nov 2017 05:22:51 +0100 -Subject: [PATCH] trace-cmd listen: Include limits.h to define PATH_MAX - -PATH_MAX is defined by limits.h. On some system it's also -defined by dirent.h but not on musl. - -Signed-off-by: Alexander Couzens -Signed-off-by: Steven Rostedt (VMware) ---- - trace-listen.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/trace-listen.c -+++ b/trace-listen.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include From 84d6e2884af0739c39d484fa93e7c87ccf1be736 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 30 Dec 2020 20:04:42 +0000 Subject: [PATCH 12/19] kernel-build: fix STRIP_KERNEL_EXPORTS for 64-bit kernels While parsing the nm output, we need to account for the fact that 64-bit kernels have 64-bit wide addresses. While at it, replace the grep | sed combo with a single awk invocation and a stronger regex. Fixes: 2ef0acc5fcda557fa5aaad35d27cb8cf75be96d2 "kernel-build: fix STRIP_KERNEL_EXPORTS for recent kernels" Signed-off-by: Rui Salvaterra --- include/kernel-build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 327157d051..14cfc1754f 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -105,7 +105,7 @@ define BuildKernel xargs $(TARGET_CROSS)nm | \ awk '$$$$1 == "U" { print $$$$2 } ' | \ sort -u > $(KERNEL_BUILD_DIR)/mod_symtab.txt - $(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | grep ' [rR] __ksymtab' | sed -e 's,........ [rR] __ksymtab_,,' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt + $(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | awk '/^[0-9a-f]+ [rR] __ksymtab_/ {print substr($$$$3,11)}' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt grep -Ff $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_include.txt grep -Fvf $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_exclude.txt ( \ From db6df604f7a594bcb80175697618cbf4d370802e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Sun, 8 Nov 2020 16:15:04 +0100 Subject: [PATCH 13/19] base-files: allow reusing of boolean value extraction logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `functions.sh` script has `config_get_bool()` function, which is usable when using UCI config direct access API, but there is no equivalent for the callback API. Introduce `get_bool()` function to allow reusing it from init scripts. Example: ```sh option_cb() { local option="$1" local value="$(get_bool "$2")" ... } ``` Signed-off-by: Oldřich Jedlička --- package/base-files/Makefile | 2 +- package/base-files/files/lib/functions.sh | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 80f73066dd..4085aa185e 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=214 +PKG_RELEASE:=215 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 0f02d67d18..5c4ca58ccd 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -97,15 +97,22 @@ config_get() { esac } +# get_bool [] +get_bool() { + local _tmp="$1" + case "$_tmp" in + 1|on|true|yes|enabled) _tmp=1;; + 0|off|false|no|disabled) _tmp=0;; + *) _tmp="$2";; + esac + echo -n "$_tmp" +} + # config_get_bool