From 22237093e31b8e29b711626f69051aee4e318762 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 24 Sep 2024 18:51:06 +0800 Subject: [PATCH] adguardhome: Update to 0.107.52 --- net/adguardhome/Makefile | 6 +-- net/adguardhome/files/adguardhome.config | 1 + net/adguardhome/files/adguardhome.init | 25 +++++++++-- ...t-github.com-quic-go-quic-go-v0.37.6.patch | 45 ------------------- 4 files changed, 26 insertions(+), 51 deletions(-) delete mode 100644 net/adguardhome/patches/0001-go-get-github.com-quic-go-quic-go-v0.37.6.patch diff --git a/net/adguardhome/Makefile b/net/adguardhome/Makefile index 5ea53f1b..9a20ff5b 100644 --- a/net/adguardhome/Makefile +++ b/net/adguardhome/Makefile @@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adguardhome -PKG_VERSION:=0.107.36 -PKG_RELEASE:=1 +PKG_VERSION:=0.107.52 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome -PKG_MIRROR_HASH:=6f32717df3654432d0c50ee730f0eef3ec806a966508f5cd82899077f1e086c8 +PKG_MIRROR_HASH:=c03ce9dd9cc4e3c4f9a489e7a9a5a0870d367f4152b9039a9740eb7d87f7d64d PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=LICENSE.txt diff --git a/net/adguardhome/files/adguardhome.config b/net/adguardhome/files/adguardhome.config index 9f493487..0c2aeac0 100644 --- a/net/adguardhome/files/adguardhome.config +++ b/net/adguardhome/files/adguardhome.config @@ -1,3 +1,4 @@ config adguardhome config # Where to store persistent data by AdGuard Home option workdir /var/adguardhome + option config /etc/adguardhome.yaml diff --git a/net/adguardhome/files/adguardhome.init b/net/adguardhome/files/adguardhome.init index 802dcdae..ffdae9c4 100644 --- a/net/adguardhome/files/adguardhome.init +++ b/net/adguardhome/files/adguardhome.init @@ -4,20 +4,39 @@ PROG=/usr/bin/AdGuardHome USE_PROCD=1 -# starts just after network starts to avoid some network race conditions -START=25 +# matches dnsmasq +START=19 # stops before networking stops STOP=89 +boot() { + adguardhome_boot=1 + start "$@" +} + start_service() { + if [ -n "$adguardhome_boot" ]; then + # Do not start yet, wait for triggers + return 0 + fi + config_load adguardhome config_get WORK_DIR config workdir + config_get CONFIG_FILE config config "/etc/adguardhome.yaml" [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR" procd_open_instance - procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update + procd_set_param command "$PROG" -c "$CONFIG_FILE" -w "$WORK_DIR" --no-check-update procd_set_param stdout 1 procd_set_param stderr 1 procd_close_instance } + +service_triggers() { + if [ -n "$adguardhome_boot" ]; then + # Wait for interfaces to be up before starting AdGuard Home for real. + # Prevents issues like https://github.com/openwrt/packages/issues/21868. + procd_add_raw_trigger "interface.*.up" 5000 /etc/init.d/adguardhome restart + fi +} diff --git a/net/adguardhome/patches/0001-go-get-github.com-quic-go-quic-go-v0.37.6.patch b/net/adguardhome/patches/0001-go-get-github.com-quic-go-quic-go-v0.37.6.patch deleted file mode 100644 index c158b236..00000000 --- a/net/adguardhome/patches/0001-go-get-github.com-quic-go-quic-go-v0.37.6.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 61c2e12116147fab716221009b3a14fa5792a72d Mon Sep 17 00:00:00 2001 -From: Dobroslaw Kijowski -Date: Mon, 21 Aug 2023 10:22:27 +0200 -Subject: [PATCH] go get github.com/quic-go/quic-go@v0.37.6 - ---- - go.mod | 4 ++-- - go.sum | 4 ++++ - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/go.mod -+++ b/go.mod -@@ -28,7 +28,7 @@ require ( - github.com/mdlayher/raw v0.1.0 - github.com/miekg/dns v1.1.55 - // TODO(a.garipov): Update to ≥ v0.37.0 once we update to Go 1.20. -- github.com/quic-go/quic-go v0.36.2 -+ github.com/quic-go/quic-go v0.37.6 - github.com/stretchr/testify v1.8.4 - github.com/ti-mo/netfilter v0.5.0 - go.etcd.io/bbolt v1.3.7 -@@ -60,7 +60,7 @@ require ( - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/quic-go/qpack v0.4.0 // indirect - github.com/quic-go/qtls-go1-19 v0.3.2 // indirect -- github.com/quic-go/qtls-go1-20 v0.2.2 // indirect -+ github.com/quic-go/qtls-go1-20 v0.3.1 // indirect - github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect ---- a/go.sum -+++ b/go.sum -@@ -108,8 +108,12 @@ github.com/quic-go/qtls-go1-19 v0.3.2 h1 - github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= - github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E= - github.com/quic-go/qtls-go1-20 v0.2.2/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= -+github.com/quic-go/qtls-go1-20 v0.3.1 h1:O4BLOM3hwfVF3AcktIylQXyl7Yi2iBNVy5QsV+ySxbg= -+github.com/quic-go/qtls-go1-20 v0.3.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= - github.com/quic-go/quic-go v0.36.2 h1:ZX/UNQ4gvpCv2RmwdbA6lrRjF6EBm5yZ7TMoT4NQVrA= - github.com/quic-go/quic-go v0.36.2/go.mod h1:zPetvwDlILVxt15n3hr3Gf/I3mDf7LpLKPhR4Ez0AZQ= -+github.com/quic-go/quic-go v0.37.6 h1:2IIUmQzT5YNxAiaPGjs++Z4hGOtIR0q79uS5qE9ccfY= -+github.com/quic-go/quic-go v0.37.6/go.mod h1:YsbH1r4mSHPJcLF4k4zruUkLBqctEMBDR6VPvcYjIsU= - github.com/shirou/gopsutil/v3 v3.21.8 h1:nKct+uP0TV8DjjNiHanKf8SAuub+GNsbrOtM9Nl9biA= - github.com/shirou/gopsutil/v3 v3.21.8/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= - github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=