https-dns-proxy: update to 2023.12.26-1 24715/head
authorStan Grishin <stangri@melmac.ca>
Thu, 1 Aug 2024 23:54:18 +0000 (23:54 +0000)
committerStan Grishin <stangri@melmac.ca>
Fri, 2 Aug 2024 01:10:00 +0000 (01:10 +0000)
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 <stangri@melmac.ca>
net/https-dns-proxy/Makefile
net/https-dns-proxy/README.md [new file with mode: 0644]
net/https-dns-proxy/files/etc/init.d/https-dns-proxy
net/https-dns-proxy/patches/020-src-options.c-add-version.patch [deleted file]

index 4ef6fe6a05e99079bc41a2e22ac99b88bc2736c7..4746516491b307af7c4b1ec5375a245007568a0d 100644 (file)
@@ -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:=804d857efe79437c7f859fb450aca0d6962b4e80b7354060eb399574083438e4
+PKG_SOURCE_VERSION:=8afbba71502ddd5aee91602318875a03e86dfc4e
+PKG_MIRROR_HASH:=4865cf4cdfe77f75656f35f191e349c01cab7c5f43ad2a0a49308796d48006e5
 
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 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 (file)
index 0000000..10c0927
--- /dev/null
@@ -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/).
+
index ff81655d46d37f24c1c4a0c4b513c7a3188bfcbc..0787901772cd1008f6de4ba63fcd977c0dcc4d66 100755 (executable)
@@ -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 (file)
index 100b3b4..0000000
+++ /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
- }