From 4f4258074b8f753199065fe8752bdaf56993f434 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Thu, 1 Aug 2024 23:54:18 +0000 Subject: [PATCH] https-dns-proxy: update to 2023.12.26-1 Cherry-pick commit has been updated to reflect a different hash required for 23.05 Makefile: * update to latest upstream version * remove PKG_SOURCE_DATE/PKG_SOURCE_RELEASE as they are no longer needed * set TARGET_CFLAGS/TARGET_LDFLAGS * update CMAKE_OPTIONS * add CONFIGURE_ARGS to prepare for building with HTTP/3 * update package URL to upstream repo instead of documentation * update package/description * add README.md with link to documentation init-script: * do not run within image builder * add a line which can be uncommented to remove outdated doh_server entries 020-src-options.c-add-version.patch: * remove it, as it's no longer needed with version set in CMAKE_OPTIONS Signed-off-by: Stan Grishin (cherry picked from commit 9e600ac071514c1e2d2e3b7f9651e755664e31e6) --- net/https-dns-proxy/Makefile | 24 ++++++++++++------- net/https-dns-proxy/README.md | 4 ++++ .../files/etc/init.d/https-dns-proxy | 3 +++ .../020-src-options.c-add-version.patch | 11 --------- 4 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 net/https-dns-proxy/README.md delete mode 100644 net/https-dns-proxy/patches/020-src-options.c-add-version.patch diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile index 3ceb8ddd66..9bb0a32b58 100644 --- a/net/https-dns-proxy/Makefile +++ b/net/https-dns-proxy/Makefile @@ -1,15 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=https-dns-proxy -PKG_VERSION:=2023.11.19 -PKG_RELEASE:=r1 +PKG_VERSION:=2023.12.26 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/ -PKG_SOURCE_DATE:=$(subst(.,-,$(PKG_VERSION))) -PKG_SOURCE_RELEASE:=$(subst(r,,$(PKG_RELEASE))) -PKG_SOURCE_VERSION:=489c57efd46983e688579974a2ab7aeaa7df8d83 -PKG_MIRROR_HASH:=0ef2008a2d328ad28e30e7b4d63fa7f769fc0daf2b8f4caf45f6e530655d3726 +PKG_SOURCE_VERSION:=8afbba71502ddd5aee91602318875a03e86dfc4e +PKG_MIRROR_HASH:=7cd11e969d1100f6057440a620d7f08f7a423d83dc87310e2a61fdda86db7cf6 PKG_MAINTAINER:=Stan Grishin PKG_LICENSE:=MIT @@ -18,13 +16,21 @@ PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -CMAKE_OPTIONS += -DCLANG_TIDY_EXE= -DGIT_VERSION=$(PKG_SOURCE_DATE)-$(PKG_SOURCE_RELEASE) +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += -Wl,--gc-sections +CMAKE_OPTIONS += -DCLANG_TIDY_EXE= -DSW_VERSION=$(PKG_VERSION)-$(PKG_RELEASE) + +CONFIGURE_ARGS += \ + $(if $(CONFIG_LIBCURL_OPENSSL),--with-openssl="$(STAGING_DIR)/usr",--without-openssl) \ + $(if $(CONFIG_LIBCURL_NGHTTP2),--with-nghttp2="$(STAGING_DIR)/usr",--without-nghttp2) \ + $(if $(CONFIG_LIBCURL_NGHTTP3),--with-nghttp3="$(STAGING_DIR)/usr",--without-nghttp3) \ + $(if $(CONFIG_LIBCURL_NGTCP2),--with-ngtcp2="$(STAGING_DIR)/usr",--without-ngtcp2) \ define Package/https-dns-proxy SECTION:=net CATEGORY:=Network TITLE:=DNS Over HTTPS Proxy - URL:=https://docs.openwrt.melmac.net/https-dns-proxy/ + URL:=https://github.com/stangri/https-dns-proxy/ DEPENDS:=+libcares +libcurl +libev +ca-bundle +jsonfilter +resolveip DEPENDS+=+!BUSYBOX_DEFAULT_GREP:grep DEPENDS+=+!BUSYBOX_DEFAULT_SED:sed @@ -33,7 +39,7 @@ endef define Package/https-dns-proxy/description Light-weight DNS-over-HTTPS, non-caching translation proxy for the RFC 8484 DoH standard. -It receives regular (UDP) DNS requests and resolves them via DoH resolver. +It receives regular, unencrypted (UDP) DNS requests and resolves them via DoH resolver. Please see https://docs.openwrt.melmac.net/https-dns-proxy/ for more information. endef diff --git a/net/https-dns-proxy/README.md b/net/https-dns-proxy/README.md new file mode 100644 index 0000000000..10c0927a5f --- /dev/null +++ b/net/https-dns-proxy/README.md @@ -0,0 +1,4 @@ +# README + +Documentation for this project is available at [https://docs.openwrt.melmac.net/https-dns-proxy/](https://docs.openwrt.melmac.net/https-dns-proxy/). + diff --git a/net/https-dns-proxy/files/etc/init.d/https-dns-proxy b/net/https-dns-proxy/files/etc/init.d/https-dns-proxy index ff81655d46..0787901772 100755 --- a/net/https-dns-proxy/files/etc/init.d/https-dns-proxy +++ b/net/https-dns-proxy/files/etc/init.d/https-dns-proxy @@ -9,6 +9,8 @@ STOP=15 # shellcheck disable=SC2034 USE_PROCD=1 +[ -n "${IPKG_INSTROOT}" ] && return 0 + if type extra_command 1>/dev/null 2>&1; then extra_command 'version' 'Show version information' else @@ -357,6 +359,7 @@ dnsmasq_doh_server() { dnsmasq_create_server_backup() { local cfg="$1" i [ -n "$(uci_get 'dhcp' "$cfg")" ] || return 1 +# uci_remove 'dhcp' "$cfg" 'doh_server' # this removes outdated doh_server entries, but causes unnecessary dnsmasq restarts if [ -z "$(uci_get 'dhcp' "$cfg" 'doh_backup_noresolv')" ]; then if [ -z "$(uci_get 'dhcp' "$cfg" 'noresolv')" ]; then uci_set 'dhcp' "$cfg" 'doh_backup_noresolv' '-1' diff --git a/net/https-dns-proxy/patches/020-src-options.c-add-version.patch b/net/https-dns-proxy/patches/020-src-options.c-add-version.patch deleted file mode 100644 index 100b3b499d..0000000000 --- a/net/https-dns-proxy/patches/020-src-options.c-add-version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/options.c -+++ b/src/options.c -@@ -24,7 +24,7 @@ const char * options_sw_version(void) { - #ifdef SW_VERSION - return SW_VERSION; - #else -- return "2023.10.10-atLeast"; // update date sometimes, like 1-2 times a year -+ return "2023.11.19-r1"; // update date sometimes, like 1-2 times a year - #endif - } - -- 2.30.2