adblock: update to 1.5.4

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
This commit is contained in:
Dirk Brenken 2016-10-28 18:27:28 +02:00 committed by Hannu Nyman
parent 277cefd168
commit 1a64129034
3 changed files with 12 additions and 7 deletions

View file

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=adblock PKG_NAME:=adblock
PKG_VERSION:=1.5.2 PKG_VERSION:=1.5.4
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+ PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View file

@ -6,7 +6,7 @@
# #
LC_ALL=C LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin" PATH="/usr/sbin:/usr/bin:/sbin:/bin"
adb_scriptver="1.5.2" adb_scriptver="1.5.4"
adb_mincfgver="2.5" adb_mincfgver="2.5"
adb_hotplugif="" adb_hotplugif=""
adb_lanif="lan" adb_lanif="lan"
@ -232,8 +232,8 @@ f_envcheck()
if [ "${package_ok}" = "true" ] if [ "${package_ok}" = "true" ]
then then
adb_fetch="$(which uclient-fetch)" adb_fetch="$(which uclient-fetch)"
fetch_parm="-q --timeout=${adb_fetchttl}" fetch_parm="-q"
response_parm="--spider" response_parm=
fi fi
fi fi
fi fi
@ -242,10 +242,12 @@ f_envcheck()
f_depend "wget -" "true" f_depend "wget -" "true"
if [ "${package_ok}" = "true" ] if [ "${package_ok}" = "true" ]
then 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}" 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" response_parm="--spider --server-response"
else fi
if [ -z "${adb_fetch}" ]
then
rc=-1 rc=-1
f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock" f_log "please install 'uclient-fetch' or 'wget' with ssl support to use adblock"
f_exit f_exit

View file

@ -41,6 +41,8 @@ f_envcheck
# main loop for all block list sources # main loop for all block list sources
# #
f_log "use '${adb_fetch}' for list downloads"
for src_name in ${adb_sources} for src_name in ${adb_sources}
do do
# check disabled sources # check disabled sources
@ -83,7 +85,8 @@ do
if [ "${src_name}" = "blacklist" ] if [ "${src_name}" = "blacklist" ]
then then
url_time="$(date -r "${url}")" 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)}')" url_time="$(${adb_fetch} ${fetch_parm} ${response_parm} "${url}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}')"
fi fi
if [ -z "${url_time}" ] if [ -z "${url_time}" ]