adblock: update to 1.5.4 3713/head
authorDirk Brenken <dev@brenken.org>
Fri, 28 Oct 2016 16:27:28 +0000 (18:27 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 27 Nov 2016 18:31:08 +0000 (20:31 +0200)
Apply adblock updates 1.5.3-1.5.4

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Original commit messages:

adblock: update 1.5.3
* make wget check more flexible,
  fix for broken wget package installations

adblock: bugfix 1.5.4
* CC/uclient-fetch compatibility fix

net/adblock/Makefile
net/adblock/files/adblock-helper.sh
net/adblock/files/adblock-update.sh

index de591c49b4e6766aa1d340f858988fe12f9f0894..08a11d73a4496e58a977564b18db3e9aec1eef9f 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=1.5.2
+PKG_VERSION:=1.5.4
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 2253075e5abaf2fb6beacf0db2deb87dbeabdec5..8be994108f99b06fc3bba41431bd4fb82d6c394b 100644 (file)
@@ -6,7 +6,7 @@
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-adb_scriptver="1.5.2"
+adb_scriptver="1.5.4"
 adb_mincfgver="2.5"
 adb_hotplugif=""
 adb_lanif="lan"
@@ -232,8 +232,8 @@ f_envcheck()
             if [ "${package_ok}" = "true" ]
             then
                 adb_fetch="$(which uclient-fetch)"
-                fetch_parm="-q --timeout=${adb_fetchttl}"
-                response_parm="--spider"
+                fetch_parm="-q"
+                response_parm=
             fi
         fi
     fi
@@ -242,10 +242,12 @@ f_envcheck()
         f_depend "wget -" "true"
         if [ "${package_ok}" = "true" ]
         then
-            adb_fetch="$(which wget)"
+            adb_fetch="$(which /usr/bin/wget* | head -1)"
             fetch_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=${adb_fetchttl} --connect-timeout=${adb_fetchttl} --read-timeout=${adb_fetchttl}"
             response_parm="--spider --server-response"
-        else
+        fi
+        if [ -z "${adb_fetch}" ]
+        then
             rc=-1
             f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock"
             f_exit
index c7df4ddb1cf2731687e2b25cd59574ea3b8b9900..661081d5cb6e7743ec52c30a8cefff85039635d7 100755 (executable)
@@ -41,6 +41,8 @@ f_envcheck
 
 # main loop for all block list sources
 #
+f_log "use '${adb_fetch}' for list downloads"
+
 for src_name in ${adb_sources}
 do
     # check disabled sources
@@ -83,7 +85,8 @@ do
     if [ "${src_name}" = "blacklist" ]
     then
         url_time="$(date -r "${url}")"
-    else
+    elif [ -n "${response_parm}" ]
+    then
         url_time="$(${adb_fetch} ${fetch_parm} ${response_parm} "${url}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}')"
     fi
     if [ -z "${url_time}" ]