unbound: pull in adblock-fast generated adb_list
authorStan Grishin <stangri@melmac.ca>
Sun, 21 Apr 2024 13:43:06 +0000 (13:43 +0000)
committerTianling Shen <cnsztl@gmail.com>
Tue, 11 Jun 2024 10:06:39 +0000 (18:06 +0800)
* adblock-fast can generate the compatible adb_list-file, but it's
  only pulled if net/adblock installed, this patch also pulls in the
  adb_list file if net/adblock-fast is installed.
* also bump PKG_RELEASE

Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit d7d1743c834dffeb7e3ea0c9ee16ec587788f0ca)

net/unbound/Makefile
net/unbound/files/unbound.sh

index 830f60607cb803892346c67571807074e89b87b9..06fd877edc4ad3814a73b16b84b19122b0e4cd21 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.19.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound
index b9ff3d4e34e701405575d4870ff078bd63cb3b3a..4ebbacd7b2fbb357e7f3acb60d0ee8b2c6a22851 100644 (file)
@@ -1477,14 +1477,16 @@ unbound_include() {
   fi
 
 
-  if [ -z "$adb_files" ] || [  ! -x /usr/bin/adblock.sh ] \
-  || [ ! -x /etc/init.d/adblock ] ; then
+  if [ -z "$adb_files" ]; then
     adb_enabled=0
 
-  elif /etc/init.d/adblock enabled ; then
+  elif { [ -x /etc/init.d/adblock-fast ] && /etc/init.d/adblock-fast enabled; } \
+  || { [ -x /usr/bin/adblock.sh ] && [ -x /etc/init.d/adblock ] \
+  &&  /etc/init.d/adblock enabled; }; then
     adb_enabled=1
     {
-      # Pull in your selected openwrt/pacakges/net/adblock generated lists
+      # Pull in your selected openwrt/pacakges/net/adblock or
+      # openwrt/pacakges/net/adblock-fast generated lists
       echo "include: $UB_VARDIR/adb_list.*"
       echo
     } >> $UB_TOTAL_CONF