From f83baf221d11781b1e50b492af2353ad7438d351 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Thu, 20 Oct 2022 11:46:09 +0200 Subject: [PATCH] adblock: update 4.1.5-2 * fixed broken/blocked oisd download links (switched to the official github mirror) * made sure that curl error out on http errors as well * removed obsolete compatibility stuff from init script Signed-off-by: Dirk Brenken --- net/adblock/Makefile | 2 +- net/adblock/files/adblock.init | 25 +++++++------------------ net/adblock/files/adblock.sh | 2 +- net/adblock/files/adblock.sources | 6 +++--- 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/net/adblock/Makefile b/net/adblock/Makefile index efd049546f..e6feeee82f 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock PKG_VERSION:=4.1.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/adblock/files/adblock.init b/net/adblock/files/adblock.init index a7ed064226..732c8a6101 100755 --- a/net/adblock/files/adblock.init +++ b/net/adblock/files/adblock.init @@ -8,23 +8,12 @@ START=30 USE_PROCD=1 -if [ -n "$(type -t extra_command)" ]; then - extra_command "suspend" "Suspend adblock processing" - extra_command "resume" "Resume adblock processing" - extra_command "query" " Query active blocklists and backups for a specific domain" - extra_command "report" "[[|||] [] [] []] Print DNS statistics with an optional search parameter" - extra_command "list" "[|||||||||] List/Edit available sources" - extra_command "timer" "[ [] []]|[ ] List/Edit cron update intervals" -else - EXTRA_COMMANDS="status suspend resume query report list timer version" - EXTRA_HELP=" status Service status - suspend Suspend adblock processing - resume Resume adblock processing - query Query active blocklists and backups for a specific domain - report [[|||] [] []] Print DNS statistics with an optional search parameter - list [|||||||||] List/Edit available sources - timer [ [] []]|[ ] List/Edit cron update intervals" -fi +extra_command "suspend" "Suspend adblock processing" +extra_command "resume" "Resume adblock processing" +extra_command "query" " Query active blocklists and backups for a specific domain" +extra_command "report" "[[|||] [] [] []] Print DNS statistics with an optional search parameter" +extra_command "list" "[|||||||||] List/Edit available sources" +extra_command "timer" "[ [] []]|[ ] List/Edit cron update intervals" adb_init="/etc/init.d/adblock" adb_script="/usr/bin/adblock.sh" @@ -34,7 +23,7 @@ if [ -s "${adb_pidfile}" ] && { [ "${action}" = "start" ] || [ "${action}" = "st [ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "report" ] || [ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ] || { [ "${action}" = "list" ] && [ -n "${1}" ]; }; }; then - exit 0 + return 0 fi boot() { diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh index 492edbaa9e..f2a9623785 100755 --- a/net/adblock/files/adblock.sh +++ b/net/adblock/files/adblock.sh @@ -400,7 +400,7 @@ f_fetch() { ;; "curl") [ "${adb_fetchinsecure}" = "1" ] && insecure="--insecure" - adb_fetchparm="${adb_fetchparm:-"${insecure} --connect-timeout 20 --silent --show-error --location -o"}" + adb_fetchparm="${adb_fetchparm:-"${insecure} --connect-timeout 20 --fail --silent --show-error --location -o"}" ;; "uclient-fetch") [ "${adb_fetchinsecure}" = "1" ] && insecure="--no-check-certificate" diff --git a/net/adblock/files/adblock.sources b/net/adblock/files/adblock.sources index 2d69c09d5c..4d908249a4 100644 --- a/net/adblock/files/adblock.sources +++ b/net/adblock/files/adblock.sources @@ -133,21 +133,21 @@ "descurl": "https://github.com/notracking/hosts-blocklists" }, "oisd_basic": { - "url": "https://dblw.oisd.nl/basic/", + "url": "https://raw.githubusercontent.com/sjhgvr/oisd/main/dblw_basic.txt", "rule": "/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", "size": "L", "focus": "general", "descurl": "https://oisd.nl" }, "oisd_nsfw": { - "url": "https://dblw.oisd.nl/nsfw/", + "url": "https://raw.githubusercontent.com/sjhgvr/oisd/main/dblw_nsfw.txt", "rule": "/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", "size": "XL", "focus": "general", "descurl": "https://oisd.nl" }, "oisd_full": { - "url": "https://dblw.oisd.nl", + "url": "https://raw.githubusercontent.com/sjhgvr/oisd/main/dblw_full.txt", "rule": "/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", "size": "XXL", "focus": "general", -- 2.30.2