adguardhome: update to 0.107.0
authorHiếu Lê <leorize+oss@disroot.org>
Tue, 21 Dec 2021 16:22:57 +0000 (10:22 -0600)
committerHiếu Lê <leorize+oss@disroot.org>
Thu, 23 Dec 2021 04:06:49 +0000 (22:06 -0600)
Full changelog available at: https://github.com/AdguardTeam/AdGuardHome/releases/tag/v0.107.0

packr has been removed from build dependencies, per
https://github.com/AdguardTeam/AdGuardHome/commit/c6888326b034daea9e69de5ee0a8f37aede45892#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261L2

Also added the ability to configure working directory location and moved
the directory to /var. On most setups this should not change anything,
as /var is symlinked to /tmp. The move mostly benefits setups where /var
is configured to be persistent.

The working directory is used by AdGuard to store persistent data like
query logs, filter lists, etc.

Data stored in this directory can get really huge, as such allowing
this directory to be moved elsewhere (ie. an USB drive) is very
beneficial.

Co-authored-by: Dobroslaw Kijowski <dobo90@gmail.com>
Co-authored-by: Jeffery To <jeffery.to@gmail.com>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
net/adguardhome/Makefile
net/adguardhome/files/adguardhome.config [new file with mode: 0644]
net/adguardhome/files/adguardhome.init

index de128e3cfbf040171e0e4a4f5e4bbc75085395f1..b6bbf67d19a0ba312cf35f5b7e6b942d98ecf049 100644 (file)
@@ -6,19 +6,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adguardhome
-PKG_VERSION:=0.106.3
+PKG_VERSION:=0.107.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
-PKG_MIRROR_HASH:=bdf5ad833df90969cd82b9fb6a91846338c738ed01671fc768d867b592102f7c
+PKG_MIRROR_HASH:=7bb70a3cdbde0d4c451454369317e6265832bcf6743c44fae7df7e3f8a37a108
 
 PKG_LICENSE:=GPL-3.0-only
 PKG_LICENSE_FILES:=LICENSE.txt
 PKG_MAINTAINER:=Dobroslaw Kijowski <dobo90@gmail.com>
 
-PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host packr/host
+PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
@@ -46,6 +46,7 @@ endef
 
 define Package/adguardhome/conffiles
 /etc/adguardhome.yaml
+/etc/config/adguardhome
 endef
 
 define Package/adguardhome/description
@@ -56,7 +57,6 @@ define Build/Compile
        ( \
                pushd $(PKG_BUILD_DIR) ; \
                make js-deps js-build ; \
-               packr -z -v -i internal ; \
                popd ; \
                $(call GoPackage/Build/Compile) ; \
        )
@@ -66,6 +66,9 @@ define Package/adguardhome/install
        $(call GoPackage/Package/Install/Bin,$(1))
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome
 endef
 
 $(eval $(call GoBinPackage,adguardhome))
diff --git a/net/adguardhome/files/adguardhome.config b/net/adguardhome/files/adguardhome.config
new file mode 100644 (file)
index 0000000..9f49348
--- /dev/null
@@ -0,0 +1,3 @@
+config adguardhome config
+       # Where to store persistent data by AdGuard Home
+       option workdir /var/adguardhome
index d9854f8bc1c3fa0489f2e13ad138b1d2ba45eff9..b26abbfbf592bd6d011377fadbe60db87f3ce380 100644 (file)
@@ -1,7 +1,6 @@
 #!/bin/sh /etc/rc.common
 
 PROG=/usr/bin/AdGuardHome
-WORK_DIR=/tmp/adguardhome
 
 USE_PROCD=1
 
@@ -11,6 +10,9 @@ START=21
 STOP=89
 
 start_service() {
+  config_load adguardhome
+  config_get WORK_DIR config workdir
+
   [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR"
 
   procd_open_instance