From e45c211c5a1851ec1c8206b0d2a9cb94cf7ea44c Mon Sep 17 00:00:00 2001 From: SuLingGG <1215009714@QQ.COM> Date: Mon, 30 Aug 2021 10:53:25 +0800 Subject: [PATCH 1/5] scripts/download.pl: update openwrt.cc mirror url [updated url] Signed-off-by: Tianling Shen (cherry picked from commit 009c17217107834cdf5ccc336e791ef0b33eada1) --- scripts/download.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download.pl b/scripts/download.pl index 019273cea3..0001002eba 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -286,7 +286,7 @@ foreach my $mirror (@ARGV) { push @mirrors, "https://mirror01.download.immortalwrt.eu.org"; push @mirrors, "https://mirror02.download.immortalwrt.eu.org"; -push @mirrors, "https://openwrt.cc/dl/immortalwrt/openwrt-18.06"; +push @mirrors, "https://openwrt.cc/dl/immortalwrt/immortalwrt"; push @mirrors, 'https://sources.cdn.openwrt.org'; push @mirrors, 'https://sources.openwrt.org'; push @mirrors, 'https://mirror2.openwrt.org/sources'; From 857c7722b2aa54957e15fb377e2d959cf73413e4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 24 Nov 2020 01:49:17 -0800 Subject: [PATCH 2/5] libjson-c: remove old math patch Remove old math patch meant for old GCC versions. It's not needed for GCC and causes issues with clang. Add CMake patch to identify clang properly and apply the proper flags. Fixes the following warnings/errors: json_pointer.c:230:7: warning: implicit declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration] rc = vasprintf(&path_copy, path_fmt, args); ^ json_pointer.c:317:7: warning: implicit declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration] rc = vasprintf(&path_copy, path_fmt, args); ^ /usr/include/bits/mathcalls.h:177:23: error: cannot redeclare builtin function '__builtin_isinf' __MATHDECL_ALIAS (int,isinf,, (_Mdouble_ __value), isinf) ^ /usr/include/bits/mathcalls.h:177:23: note: '__builtin_isinf' is a builtin with type 'int ()' /usr/include/bits/mathcalls.h:213:23: error: cannot redeclare builtin function '__builtin_isnan' __MATHDECL_ALIAS (int,isnan,, (_Mdouble_ __value), isnan) The clang patch is an upstream backport. Signed-off-by: Rosen Penev --- package/libs/libjson-c/patches/000-libm.patch | 45 ------------------- .../libs/libjson-c/patches/010-clang.patch | 11 +++++ 2 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 package/libs/libjson-c/patches/000-libm.patch create mode 100644 package/libs/libjson-c/patches/010-clang.patch diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch deleted file mode 100644 index c6ff5f4766..0000000000 --- a/package/libs/libjson-c/patches/000-libm.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/math_compat.h -+++ b/math_compat.h -@@ -6,38 +6,9 @@ - * @brief Do not use, json-c internal, may be changed or removed at any time. - */ - --/* Define isnan, isinf, infinity and nan on Windows/MSVC */ -- --#ifndef HAVE_DECL_ISNAN --#ifdef HAVE_DECL__ISNAN --#include --#define isnan(x) _isnan(x) --#else --/* On platforms like AIX and "IBM i" we need to provide our own isnan */ --#define isnan(x) ((x) != (x)) --#endif --#endif -- --#ifndef HAVE_DECL_ISINF --#ifdef HAVE_DECL__FINITE --#include --#define isinf(x) (!_finite(x)) --#else --#include --/* On platforms like AIX and "IBM i" we need to provide our own isinf */ --#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX) --#endif --#endif -- --#ifndef HAVE_DECL_INFINITY --#include --#define INFINITY (DBL_MAX + DBL_MAX) --#define HAVE_DECL_INFINITY --#endif -- --#ifndef HAVE_DECL_NAN --#define NAN (INFINITY - INFINITY) --#define HAVE_DECL_NAN --#endif -+#undef isnan -+#define isnan(x) __builtin_isnan(x) -+#undef isinf -+#define isinf(x) __builtin_isinf(x) - - #endif diff --git a/package/libs/libjson-c/patches/010-clang.patch b/package/libs/libjson-c/patches/010-clang.patch new file mode 100644 index 0000000000..9ef73f1a82 --- /dev/null +++ b/package/libs/libjson-c/patches/010-clang.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -265,7 +265,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_D + configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h) + message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h") + +-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") ++if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") + if ("${DISABLE_WERROR}" STREQUAL "OFF") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") From 90cae6b267c3de92c0c126226514ef69550bf66e Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 12 Aug 2021 10:57:07 -0300 Subject: [PATCH 3/5] ethtool: fix recursive dependency Change the CONFLICTS definition from the alternative package (ethtool-full) to the main one. The CONFLICTS line creates a dependency to the conflicting package. Right now, the dependency would be created in the PACKAGE_ethtool-full symbol: config PACKAGE_ethtool-full depends on m || (PACKAGE_ethtool != y) When the main package is selected by airmon-ng, it selects PACKAGE_ethtool, *depending* on the value of PACKAGE_ethtool-full: config PACKAGE_airmon-ng select PACKAGE_ethtool if PACKAGE_ethtool-full --- package/network/utils/ethtool/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index 16b3c4e46f..9889677a16 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool PKG_VERSION:=5.13 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -31,6 +31,7 @@ define Package/ethtool TITLE:=Display or change ethernet card settings URL:=http://www.kernel.org/pub/software/network/ethtool/ VARIANT:=tiny + CONFLICTS:=ethtool-full endef define Package/ethtool-full @@ -39,6 +40,7 @@ define Package/ethtool-full VARIANT:=full PROVIDES:=ethtool DEPENDS:=+libmnl + CONFLICTS:= endef define Package/ethtool/description From af6e91644cd3198d94981e34b78c2302c410e399 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 1 Sep 2021 15:34:15 +0200 Subject: [PATCH 4/5] firewall4: update to latest Git HEAD cf835ce treewide: convert deprecated syntax c9a3bf5 tests: adapt to latest ucode Signed-off-by: Jo-Philipp Wich --- package/network/config/firewall4/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile index bfe10cfb8f..ccf5740466 100644 --- a/package/network/config/firewall4/Makefile +++ b/package/network/config/firewall4/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git -PKG_SOURCE_DATE:=2021-03-31 -PKG_SOURCE_VERSION:=29fba840201287b9265888adba6298779b750af5 -PKG_MIRROR_HASH:=1d26a611aeecdf37f09e4cdee6b192e5da087abf6e0fc7a9ca97a80e58d14222 +PKG_SOURCE_DATE:=2021-09-01 +PKG_SOURCE_VERSION:=cf835cecc8a449b2d2019f1ef4f085e535d5c1c1 +PKG_MIRROR_HASH:=5798b76846107dde69a2a1ff3467f735b9a91a74106fbd6299d8a26eff70b9c2 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC From aa44c7c83f49e9537612ed9edca1dd35cf5c897a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 11 Jul 2021 20:37:45 +0200 Subject: [PATCH 5/5] ucode: update to latest Git HEAD Signed-off-by: Jo-Philipp Wich --- package/utils/ucode/Makefile | 47 +++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile index 7c8907a716..26281af730 100644 --- a/package/utils/ucode/Makefile +++ b/package/utils/ucode/Makefile @@ -12,15 +12,19 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/jow-/ucode.git -PKG_SOURCE_DATE:=2021-03-31 -PKG_SOURCE_VERSION:=973cc6c865dcf6075c493125313058b650b08234 -PKG_MIRROR_HASH:=fb4d3e231c79a9122743f0ced7fd4fdcf81903de5c721d3c18d5779e44d50bdf +PKG_SOURCE_DATE:=2021-07-30 +PKG_SOURCE_VERSION:=929c8627cf077c3e348fb12b02553d4a444c5e48 +PKG_MIRROR_HASH:= PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC +PKG_ABI_VERSION:=20210730 + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk +CMAKE_OPTIONS += -DSOVERSION=$(PKG_ABI_VERSION) + define Package/ucode/default SECTION:=utils CATEGORY:=Utilities @@ -29,7 +33,7 @@ endef define Package/ucode $(Package/ucode/default) - DEPENDS:=+libjson-c + DEPENDS:=+libucode endef define Package/ucode/description @@ -38,6 +42,18 @@ define Package/ucode/description endef +define Package/libucode + $(Package/ucode/default) + TITLE+= - runtime library + ABI_VERSION:=$(PKG_ABI_VERSION) + DEPENDS:=+libjson-c +endef + +define Package/libucode/description + The libucode package provides the shared runtime library for the ucode interpreter. +endef + + define Package/ucode-mod-fs $(Package/ucode/default) TITLE+= (filesystem module) @@ -83,33 +99,46 @@ define Package/ucode-mod-uci/description endef +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode + $(CP) $(PKG_INSTALL_DIR)/usr/include/ucode/*.h $(1)/usr/include/ucode/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so* $(1)/usr/lib/ +endef + + define Package/ucode/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ucode $(1)/usr/bin/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucode $(1)/usr/bin/ucode +endef + +define Package/libucode/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so.* $(1)/usr/lib/ endef define Package/ucode-mod-fs/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/fs.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-math/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/math.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-ubus/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/ubus.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/ubus.so $(1)/usr/lib/ucode/ endef define Package/ucode-mod-uci/install $(INSTALL_DIR) $(1)/usr/lib/ucode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/uci.so $(1)/usr/lib/ucode/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/ endef $(eval $(call BuildPackage,ucode)) +$(eval $(call BuildPackage,libucode)) $(eval $(call BuildPackage,ucode-mod-fs)) $(eval $(call BuildPackage,ucode-mod-math)) $(eval $(call BuildPackage,ucode-mod-ubus))