Merge pull request #2805 from kuoruan/libssh2
authorJiri Slachta <jiri.slachta@gmail.com>
Sun, 5 Jun 2016 20:05:30 +0000 (22:05 +0200)
committerJiri Slachta <jiri.slachta@gmail.com>
Sun, 5 Jun 2016 20:05:30 +0000 (22:05 +0200)
libssh2: Bump to v1.7.0

23 files changed:
lang/python-pip/Makefile
lang/python-setuptools/Makefile
lang/python3-pip/Makefile
lang/python3-setuptools/Makefile
net/adblock/Makefile
net/adblock/files/README.md
net/adblock/files/adblock-helper.sh
net/adblock/files/adblock-update.sh
net/adblock/files/adblock.conf
net/adblock/files/adblock.init
net/aria2/Config.in
net/aria2/Makefile
net/znc/Makefile
net/znc/files/znc.init
sound/squeezelite/Makefile
sound/squeezelite/patches/010-select_broadcast_interface.patch
sound/squeezelite/patches/020-no_mpg123.patch
sound/squeezelite/patches/030-fix_musl_compatibilty.patch
sound/squeezelite/patches/040-clear_dynlink_errors.patch
sound/upmpdcli/Makefile
utils/gzip/Makefile [new file with mode: 0644]
utils/lrzsz/Makefile [new file with mode: 0644]
utils/lrzsz/patches/100-install_delete_fix.patch [new file with mode: 0644]

index 79efc45639e8c12253a0d1f5f7aeb99766a34ed6..3be9565160405e5fb94e01087db25a889aefdf08 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pip
-PKG_VERSION:=8.1.1
+PKG_VERSION:=8.1.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
-PKG_MD5SUM:=6b86f11841e89c8241d689956ba99ed7
+PKG_SOURCE_URL:=https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/
+PKG_MD5SUM:=87083c0b9867963b29f7aba3613e8f4a
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/pip-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/python-pip-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
index baeabc17bef5131b18569c6da420c67e4caaeb17..96fc0720e4fdbd164c41456335b1fbf13ed0ac5c 100644 (file)
@@ -8,17 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-setuptools
-PKG_VERSION:=20.7.0
+PKG_VERSION:=22.0.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
-PKG_MD5SUM:=5d12b39bf3e75e80fdce54e44b255615
+PKG_SOURCE_URL:=https://pypi.python.org/packages/90/7a/b64d5804b6d1aebed1892e4df1c21bcb4f8480095ba8004e48999601119d/
+PKG_MD5SUM:=869f3029dcc66a64ba39875e2a2f044a
 
 HOST_BUILD_DEPENDS:=python python/host
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/setuptools-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
+HOST_UNPACK=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
index d5a50302d9722a9d8140f0a57eda134c577dfc7a..b7680b933433a528eae9a559e4df5eb1f13dc806 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-pip
-PKG_VERSION:=8.1.1
+PKG_VERSION:=8.1.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pip-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pip/
-PKG_MD5SUM:=6b86f11841e89c8241d689956ba99ed7
+PKG_SOURCE_URL:=https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/
+PKG_MD5SUM:=87083c0b9867963b29f7aba3613e8f4a
 
 PKG_LICENSE:=MIT
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/pip-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/python3-pip-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
index 0d6352bfa82be42dca35bc5ffb14e49c0ad756a4..f8ff0a7a07f2e41f3ed090b20f6f3ff7522be25d 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-setuptools
-PKG_VERSION:=20.7.0
+PKG_VERSION:=22.0.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=setuptools-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
-PKG_MD5SUM:=5d12b39bf3e75e80fdce54e44b255615
+PKG_SOURCE_URL:=https://pypi.python.org/packages/90/7a/b64d5804b6d1aebed1892e4df1c21bcb4f8480095ba8004e48999601119d/
+PKG_MD5SUM:=869f3029dcc66a64ba39875e2a2f044a
 
 PKG_LICENSE:=PSF
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/python3-setuptools-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/package.mk
 $(call include_mk, python3-package.mk)
index 3bc057cd866f5e82de82f3c7a6512251b9644606..21fe36b46f57ef35ab45ac6732f2853f7c47af2f 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=1.1.15
+PKG_VERSION:=1.1.17
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 7bdc729a38fc864b3399d0ccdf950eb24274fe77..adb3eb912e0aa1887de606d091a55129332fce8d 100644 (file)
@@ -39,7 +39,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
     * => weekly updates, approx. 12.000 entries
     * [winhelp](http://winhelp2002.mvps.org)
     * => infrequent updates, approx. 15.000 entries
-    * [winspy](https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hosts/windows10_spy.txt)
+    * [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
     * => infrequent updates, approx. 120 entries
     * [yoyo](http://pgl.yoyo.org/adservers)
     * => weekly updates, approx. 2.500 entries (enabled by default)
@@ -102,9 +102,10 @@ A lot of people already use adblocker plugins within their desktop browsers, but
 * **list updates:** for a scheduled call of the adblock service add an appropriate crontab entry (see example below)
 * **new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
 * **AP mode:** in AP mode adblock uses automatically the local router ip as nullip address. To make sure that your LuCI interface will be still accessible, please change the local uhttpd instance to ports <> 80/443 (see example below)
+* **Restricted mode:** to disable flash writes with adblock status information to the adblock config file (used by LuCI frontend), please set 'adb\_restricted' to '1'
 * **adblock toggle:** to quickly switch adblocking 'on' or 'off', simply use _/etc/init.d/adblock toggle_
-* **outdated configuration:** if adblock detects an outdated config file, please copy the current version from '/etc/adblock/adblock.conf.default' to '/etc/config/adblock', make your individual changes and finally restart the adblock service
-* **debugging:** for script debugging please change the 'DEBUG' variable in the header of _/usr/bin/adblock-update.sh_ from '0' to '1' and start this script directly (without any parameters)
+* **configuration update:** to update an outdated adblock config file with the current default version, please run _/etc/init.d/adblock cfgup_, make your individual changes and start the adblock service again
+* **debugging:** for script debugging please set the 'adb\_debug' variable in the header of _/etc/init.d/adblock_ to '1'
 * **disable active dns probing in windows:** to prevent a possible yellow exclamation mark on your internet connection icon (which wrongly means connected, but no internet), please change the following registry key/value from "1" to "0" _HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing_
 
 ## Further adblock config options
@@ -115,8 +116,9 @@ A lot of people already use adblocker plugins within their desktop browsers, but
     * adb\_nullport => port of the adblock uhttpd instance (default: '65535')
     * adb\_nullipv4 => IPv4 blackhole ip address (default: '192.0.2.1', in AP mode: local router ip)
     * adb\_nullipv6 => IPv6 blackhole ip address (default: '::ffff:c000:0201', in AP mode: local router ip)
-    * adb\_forcedns => redirect all DNS queries to local dnsmasq resolver (default: '1', enabled)
+    * adb\_forcedns => redirect all local DNS queries to the local dnsmasq resolver (default: '1', enabled)
     * adb\_fetchttl => set the timeout for list downloads (default: '5' seconds)
+    * adb\_restricted => disable updates of the adblock config file (no flash writes) during runtime (default: '0', disabled)
 
 ## Examples
 
index 15773efbef09acce0e4f4ba604973d211d63ee19..f447c99f8c6f51ca065d8e73a8d38acef8ae9000 100644 (file)
@@ -12,8 +12,8 @@ f_envload()
     then
         . "/lib/functions.sh"
     else
-        rc=110
-        f_log "system function library not found" "${rc}"
+        rc=-1
+        f_log "system function library not found, please check your installation"
         f_exit
     fi
 
@@ -23,8 +23,8 @@ f_envload()
     then
         . "/lib/functions/network.sh"
     else
-        rc=115
-        f_log "system network library not found" "${rc}"
+        rc=-1
+        f_log "system network library not found, please check your installation"
         f_exit
     fi
 
@@ -39,6 +39,7 @@ f_envload()
     adb_whitelist_rset="\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}"
     adb_forcedns=1
     adb_fetchttl=5
+    adb_restricted=0
 
     # function to parse global section by callback
     #
@@ -95,8 +96,8 @@ f_envload()
     pkg_list="$(opkg list-installed)"
     if [ -z "${pkg_list}" ]
     then
-        rc=120
-        f_log "empty package list" "${rc}"
+        rc=-1
+        f_log "empty package list, please check your installation"
         f_exit
     fi
 
@@ -114,10 +115,11 @@ f_envload()
     adb_dnsdir="/tmp/dnsmasq.d"
     adb_dnshidedir="${adb_dnsdir}/.adb_hidden"
     adb_dnsprefix="adb_list"
-    adb_uci="$(which uci)"
     adb_iptv4="$(which iptables)"
     adb_iptv6="$(which ip6tables)"
     adb_fetch="$(which wget)"
+    adb_uci="$(which uci)"
+    adb_date="$(which date)"
     unset adb_srclist adb_revsrclist adb_errsrclist
 
     # check 'enabled' & 'version' config options
@@ -125,7 +127,7 @@ f_envload()
     if [ -z "${adb_enabled}" ] || [ -z "${adb_cfgver}" ] || [ "${adb_cfgver%%.*}" != "${adb_mincfgver%%.*}" ]
     then
         rc=-1
-        f_log "outdated adblock config (${adb_mincfgver} vs. ${adb_cfgver}), please use latest version from '/etc/adblock/adblock.conf.default'"
+        f_log "outdated adblock config (${adb_mincfgver} vs. ${adb_cfgver}), please run '/etc/init.d/adblock cfgup' to update your configuration"
         f_exit
     elif [ "${adb_cfgver#*.}" != "${adb_mincfgver#*.}" ]
     then
@@ -140,8 +142,8 @@ f_envload()
 
     # check running dnsmasq instance
     #
-    rc="$(ps | grep -q "[d]nsmasq"; printf ${?})"
-    if [ $((rc)) -ne 0 ]
+    check="$(pgrep -f "dnsmasq")"
+    if [ -z "${check}" ]
     then
         rc=-1
         f_log "please enable the local dnsmasq instance to use adblock"
@@ -167,6 +169,9 @@ f_envload()
         rc=-1
         f_log "no valid IPv4/IPv6 configuration found (${adb_lanif}), please set 'adb_lanif' manually"
         f_exit
+    else
+        network_get_device adb_landev4 "${adb_lanif}"
+        network_get_device adb_landev6 "${adb_lanif}"
     fi
 
     # check logical update interfaces (with default route)
@@ -184,8 +189,8 @@ f_envload()
     then
         adb_nullipv4="${adb_ipv4}"
         adb_nullipv6="${adb_ipv6}"
-        if [ "$(uci get uhttpd.main.listen_http | grep -Fo "80")" = "80" ] ||
-           [ "$(uci get uhttpd.main.listen_https | grep -Fo "443")" = "443" ]
+        if [ "$(${adb_uci} get uhttpd.main.listen_http | grep -Fo "80")" = "80" ] ||
+           [ "$(${adb_uci} get uhttpd.main.listen_https | grep -Fo "443")" = "443" ]
         then
             rc=-1
             f_log "AP mode detected, set local LuCI instance to ports <> 80/443"
@@ -207,16 +212,28 @@ f_envcheck()
 {
     local check
 
+    # log partially outdated config
+    #
     if [ "${outdate_ok}" = "true" ]
     then
-        f_log "partially outdated adblock config (${adb_mincfgver} vs. ${adb_cfgver}), please use latest version from '/etc/adblock/adblock.conf.default'"
+        f_log "partially outdated adblock config (${adb_mincfgver} vs. ${adb_cfgver}), please run '/etc/init.d/adblock cfgup' to update your configuration"
     fi
 
+    # log ap mode
+    #
     if [ "${apmode_ok}" = "true" ]
     then
         f_log "AP mode enabled"
     fi
 
+    # set & log restricted mode
+    #
+    if [ $((adb_restricted)) -eq 1 ]
+    then
+        adb_uci="$(which true)"
+        f_log "Restricted mode enabled"
+    fi
+
     # check general package dependencies
     #
     f_depend "busybox"
@@ -272,7 +289,7 @@ f_envcheck()
         then
             if [ $((av_space)) -le 2000 ]
             then
-                rc=125
+                rc=105
                 f_log "not enough free space in '${adb_tmpdir}' (avail. ${av_space} kb)" "${rc}"
                 f_exit
             else
@@ -280,7 +297,7 @@ f_envcheck()
             fi
         fi
     else
-        rc=130
+        rc=110
         f_log "temp directory not found" "${rc}"
         f_exit
     fi
@@ -337,10 +354,10 @@ f_envcheck()
         f_firewall "IPv4" "filter" "A" "forwarding_rule" "adb-fwd" "-d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
         f_firewall "IPv4" "filter" "A" "output_rule" "adb-out" "-p tcp -d ${adb_nullipv4} -j REJECT --reject-with tcp-reset"
         f_firewall "IPv4" "filter" "A" "output_rule" "adb-out" "-d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
-        if [ $((adb_forcedns)) -eq 1 ]
+        if [ $((adb_forcedns)) -eq 1 ] && [ -n "${adb_landev4}" ]
         then
-            f_firewall "IPv4" "nat" "A" "prerouting_rule" "adb-dns" "-p udp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53"
-            f_firewall "IPv4" "nat" "A" "prerouting_rule" "adb-dns" "-p tcp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53"
+            f_firewall "IPv4" "nat" "A" "prerouting_rule" "adb-dns" "-i ${adb_landev4} -p udp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53"
+            f_firewall "IPv4" "nat" "A" "prerouting_rule" "adb-dns" "-i ${adb_landev4} -p tcp --dport 53 -j DNAT --to-destination ${adb_ipv4}:53"
         fi
         if [ "${fw_done}" = "true" ]
         then
@@ -358,10 +375,10 @@ f_envcheck()
         f_firewall "IPv6" "filter" "A" "forwarding_rule" "adb-fwd" "-d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
         f_firewall "IPv6" "filter" "A" "output_rule" "adb-out" "-p tcp -d ${adb_nullipv6} -j REJECT --reject-with tcp-reset"
         f_firewall "IPv6" "filter" "A" "output_rule" "adb-out" "-d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
-        if [ $((adb_forcedns)) -eq 1 ]
+        if [ $((adb_forcedns)) -eq 1 ] && [ -n "${adb_landev6}" ]
         then
-            f_firewall "IPv6" "nat" "A" "PREROUTING" "adb-dns" "-p udp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53"
-            f_firewall "IPv6" "nat" "A" "PREROUTING" "adb-dns" "-p tcp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53"
+            f_firewall "IPv6" "nat" "A" "PREROUTING" "adb-dns" "-i ${adb_landev6} -p udp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53"
+            f_firewall "IPv6" "nat" "A" "PREROUTING" "adb-dns" "-i ${adb_landev6} -p tcp --dport 53 -j DNAT --to-destination [${adb_ipv6}]:53"
         fi
         if [ "${fw_done}" = "true" ]
         then
@@ -372,8 +389,8 @@ f_envcheck()
 
     # check volatile adblock uhttpd instance configuration
     #
-    rc="$(ps | grep -q "[u]httpd.*\-h /www/adblock"; printf ${?})"
-    if [ $((rc)) -ne 0 ]
+    check="$(pgrep -f "uhttpd -h /www/adblock")"
+    if [ -z "${check}" ]
     then
         if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
         then
@@ -418,7 +435,7 @@ f_depend()
     check="$(printf "${pkg_list}" | grep "^${package} -")"
     if [ -z "${check}" ]
     then
-        rc=135
+        rc=115
         f_log "package '${package}' not found" "${rc}"
         f_exit
     fi
@@ -600,14 +617,14 @@ f_restore()
     then
         /etc/init.d/dnsmasq restart
         sleep 1
-        rc="$(ps | grep -q "[d]nsmasq"; printf ${?})"
-        if [ $((rc)) -eq 0 ]
+        check="$(pgrep -f "dnsmasq")"
+        if [ -n "${check}" ]
         then
             rc=0
             f_cntconfig
             f_log "adblock lists with overall ${adb_count} domains loaded"
         else
-            rc=140
+            rc=120
             f_log "dnsmasq restart failed, please check 'logread' output" "${rc}"
         fi
     fi
@@ -620,6 +637,7 @@ f_exit()
 {
     local ipv4_adblock=0
     local ipv6_adblock=0
+    local lastrun="$(${adb_date} "+%d.%m.%Y %H:%M:%S")"
 
     # delete temporary files & directories
     #
@@ -651,14 +669,14 @@ f_exit()
             "${adb_uci}" -q commit "adblock"
         fi
         f_log "firewall statistics (IPv4/IPv6): ${ipv4_adblock}/${ipv6_adblock} ad related packets blocked"
-        f_log "domain adblock processing finished successfully (${adb_scriptver}, ${adb_sysver}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+        f_log "domain adblock processing finished successfully (${adb_scriptver}, ${adb_sysver}, ${lastrun})"
     elif [ $((rc)) -gt 0 ]
     then
         if [ -n "$(${adb_uci} -q changes adblock)" ]
         then
             "${adb_uci}" -q revert "adblock"
         fi
-        f_log "domain adblock processing failed (${adb_scriptver}, ${adb_sysver}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
+        f_log "domain adblock processing failed (${adb_scriptver}, ${adb_sysver}, ${lastrun})"
     else
         rc=0
     fi
index 222e41247bed745dafc517e0460f9095f169d42c..6421e47c6f75eca1be094e8ed60b2840f58a2f8d 100755 (executable)
 #
 LC_ALL=C
 
-# script debug switch (disabled by default)
-# set 'DEBUG=1' to enable script debugging
-#
-DEBUG=0
-if [ $((DEBUG)) -eq 0 ]
-then
-    exec 2>/dev/null
-fi
-
 # set pid & logger
 #
 adb_pid="${$}"
@@ -37,8 +28,8 @@ fi
 # get current directory and set script/config version
 #
 adb_scriptdir="${0%/*}"
-adb_scriptver="1.1.15"
-adb_mincfgver="2.0"
+adb_scriptver="1.1.17"
+adb_mincfgver="2.1"
 
 # source in adblock function library
 #
@@ -303,8 +294,8 @@ then
     "${adb_uci}" -q set "adblock.global.adb_dnstoggle=on"
     /etc/init.d/dnsmasq restart
     sleep 1
-    rc="$(ps | grep -q "[d]nsmasq"; printf ${?})"
-    if [ $((rc)) -eq 0 ]
+    check="$(pgrep -f "dnsmasq")"
+    if [ -n "${check}" ]
     then
         f_log "adblock lists with overall ${adb_count} domains loaded"
     else
index c3a0845961533f35096680520d1ac2af6012a73d..be656d677890c82a8cd3c3cb2896de8e21cac85e 100644 (file)
@@ -3,11 +3,10 @@
 
 config adblock 'global'
        option adb_enabled '1'
-       option adb_cfgver '2.0'
+       option adb_cfgver '2.1'
        option adb_whitelist '/etc/adblock/adblock.whitelist'
        option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}'
        option adb_forcedns '1'
-       option adb_dnstoggle 'on'
 
 config service 'backup'
        option enabled '0'
@@ -116,7 +115,7 @@ config source 'whocares'
 
 config source 'winspy'
        option enabled '0'
-       option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hosts/windows10_spy.txt'
+       option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/win10/spy.txt'
        option adb_src_rset '\$0 ~/^0\.0\.0\.0[ \t]+([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$2)}'
        option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 120 entries'
 
index edd29a1101f605046eb24127b629fbef43899b17..7c63213e73f4ba2d09960441eae86810251a3c0e 100755 (executable)
@@ -2,17 +2,24 @@
 #
 
 START=99
-EXTRA_COMMANDS="toggle"
-EXTRA_HELP="        toggle  Toggle adblocking 'on' or 'off'"
+EXTRA_COMMANDS="toggle cfgup"
+EXTRA_HELP="   toggle  Toggle adblocking 'on' or 'off'
+       cfgup   Update the adblock configuration file"
 
-exec 2>/dev/null
+PATH="/usr/sbin:/usr/bin:/sbin:/bin"
+
+adb_debug=0
+if [ $((adb_debug)) -eq 0 ]
+then
+    exec 2>/dev/null
+fi
 adb_pid="${$}"
 adb_script="/usr/bin/adblock-update.sh"
 adb_dnsdir="/tmp/dnsmasq.d"
 adb_dnshidedir="${adb_dnsdir}/.adb_hidden"
 adb_dnsprefix="adb_list"
 adb_pidfile="/var/run/adblock.pid"
-adb_logger="$(which logger)"
+adb_log="$(which logger)"
 adb_uci="$(which uci)"
 
 if [ -t 1 ]
@@ -26,11 +33,11 @@ fi
 
 if [ -r "${adb_pidfile}" ]
 then
-    "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile})" 2>&1
+    "${adb_log}" ${log_parm} -t "adblock[${adb_pid}] error" "adblock service already running ($(cat ${adb_pidfile}))" 2>&1
     exit 255
 fi
 
-remove_config()
+rm_config()
 {
     local value opt section="${1}" options="adb_src_timestamp adb_src_count"
     for opt in ${options}
@@ -62,32 +69,17 @@ reload()
     start
 }
 
-toggle()
+stop()
 {
-if [ -d "${adb_dnshidedir}" ]
-then
-    list_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)"
-    list_dnshide="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)"
-    if [ -n "${list_dns}" ]
+    if [ -n "$(${adb_uci} -q get "adblock.global.adb_overall_count")" ]
     then
-        mv -f "${adb_dnsdir}/${adb_dnsprefix}"* "${adb_dnshidedir}"
-        "${adb_uci}" -q set "adblock.global.adb_dnstoggle=off"
-        "${adb_uci}" -q commit "adblock"
-        /etc/init.d/dnsmasq restart
-        "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] info " "toggle for adblocking switched 'off'" 2>&1
-    elif [ -n "${list_dnshide}" ]
-    then
-        mv -f "${adb_dnshidedir}/${adb_dnsprefix}"* "${adb_dnsdir}"
-        "${adb_uci}" -q set "adblock.global.adb_dnstoggle=on"
+        . "/lib/functions.sh"
+        config_load adblock
+        config_foreach rm_config source
+        "${adb_uci}" -q delete "adblock.global.adb_dnstoggle"
+        "${adb_uci}" -q delete "adblock.global.adb_overall_count"
         "${adb_uci}" -q commit "adblock"
-        /etc/init.d/dnsmasq restart
-        "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] info " "toggle for adblocking switched 'on'" 2>&1
     fi
-fi
-}
-
-stop()
-{
     if [ -d "${adb_dnshidedir}" ]
     then
         find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -exec mv -f "{}" "${adb_dnsdir}" \;
@@ -96,26 +88,60 @@ stop()
     rc=${?}
     if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
     then
-        . "/lib/functions.sh"
-        config_load adblock
-        config_foreach remove_config source
-        "${adb_uci}" -q set "adblock.global.adb_dnstoggle=on"
-        "${adb_uci}" -q delete "adblock.global.adb_overall_count"
-        "${adb_uci}" -q commit "adblock"
         rm -rf "${adb_dnshidedir}"
         /etc/init.d/dnsmasq restart
         /etc/init.d/firewall restart
     fi
-
-    uhttpd_pid="$(ps | grep "[u]httpd.*\-h /www/adblock" | awk '{print $1}')"
+    uhttpd_pid="$(pgrep -f "uhttpd -h /www/adblock")"
     if [ -n "${uhttpd_pid}" ]
     then
         kill -9 "${uhttpd_pid}"
     fi
-
     if [ -n "${rm_done}" ] || [ -n "${uhttpd_pid}" ]
     then
-        "${adb_logger}" ${log_parm} -t "adblock[${adb_pid}] info " "all adblock related services stopped" 2>&1
+        "${adb_log}" ${log_parm} -t "adblock[${adb_pid}] info " "all adblock related services stopped" 2>&1
+    fi
+    return 0
+}
+
+toggle()
+{
+    if [ "$(${adb_uci} -q get "adblock.global.adb_restricted")" = "1" ]
+    then
+        adb_uci="$(which true)"
+    fi
+    if [ -d "${adb_dnshidedir}" ]
+    then
+        list_dns="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)"
+        list_dnshide="$(find "${adb_dnshidedir}" -maxdepth 1 -type f -name "${adb_dnsprefix}*" -print)"
+        if [ -n "${list_dns}" ]
+        then
+            mv -f "${adb_dnsdir}/${adb_dnsprefix}"* "${adb_dnshidedir}"
+            "${adb_uci}" -q set "adblock.global.adb_dnstoggle=off"
+            "${adb_uci}" -q commit "adblock"
+            /etc/init.d/dnsmasq restart
+            "${adb_log}" ${log_parm} -t "adblock[${adb_pid}] info " "toggle for adblocking switched 'off'" 2>&1
+        elif [ -n "${list_dnshide}" ]
+        then
+            mv -f "${adb_dnshidedir}/${adb_dnsprefix}"* "${adb_dnsdir}"
+            "${adb_uci}" -q set "adblock.global.adb_dnstoggle=on"
+            "${adb_uci}" -q commit "adblock"
+            /etc/init.d/dnsmasq restart
+            "${adb_log}" ${log_parm} -t "adblock[${adb_pid}] info " "toggle for adblocking switched 'on'" 2>&1
+        fi
     fi
     return 0
 }
+
+cfgup()
+{
+    stop
+    cp -pf "/etc/adblock/adblock.conf.default" "/etc/config/adblock"
+    rc=$?
+    if [ $((rc)) -eq 0 ]
+    then
+        "${adb_log}" ${log_parm} -t "adblock[${adb_pid}] info " "default adblock configuration applied, please check the settings in '/etc/config/adblock'" 2>&1
+    else
+        "${adb_log}" ${log_parm} -t "adblock[${adb_pid}] info " "default adblock configuration not found, please re-install the package via 'opkg install adblock --force-maintainer'" 2>&1
+    fi
+}
index 0700188c4c982d1386d5552354981515f2b4e155..b0d7309d33c00320aeda1d65ff94a688426282e6 100644 (file)
@@ -23,7 +23,11 @@ config ARIA2_BITTORRENT
 
 config ARIA2_METALINK
        bool "Enable metalink support"
-       default N
+       default n
+
+config ARIA2_SFTP
+        bool "Enable sftp support"
+        default n
 
 choice
        prompt "XML library"
index 192ee5e3c495e9821ff3c147b74e2c0850f4631a..c8f4cef0c0ef3d9bfbf734b687e72f5208d7c932 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=aria2
 PKG_VERSION:=1.23.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
@@ -25,6 +25,7 @@ PKG_CONFIG_DEPENDS := \
   ARIA2_GNUTLS \
   ARIA2_BITTORRENT \
   ARIA2_METALINK \
+  ARIA2_SFTP \
   ARIA2_EXPAT \
   ARIA2_LIBXML2
 
@@ -39,8 +40,8 @@ define Package/aria2
   CATEGORY:=Network
   SUBMENU:=File Transfer
   TITLE:=lightweight download utility
-  URL:=http://aria2.sourceforge.net/
-  DEPENDS:=+zlib +ARIA2_LIBXML2:libxml2 +ARIA2_EXPAT:libexpat +libstdcpp +ARIA2_OPENSSL:libopenssl +ARIA2_GNUTLS:libgnutls
+  URL:=https://aria2.github.io/
+  DEPENDS:=+zlib +ARIA2_SFTP:libssh2 +ARIA2_LIBXML2:libxml2 +ARIA2_EXPAT:libexpat +libstdcpp +ARIA2_OPENSSL:libopenssl +ARIA2_GNUTLS:libgnutls
 endef
 
 define Package/aria2/description
@@ -55,12 +56,14 @@ CONFIGURE_ARGS += \
        $(if $(CONFIG_ARIA2_GNUTLS),--with,--without)-gnutls \
        $(if $(CONFIG_ARIA2_BITTORRENT),--enable,--disable)-bittorrent \
        $(if $(CONFIG_ARIA2_METALINK),--enable,--disable)-metalink \
+       $(if $(CONFIG_ARIA2_SFTP),--with,--without)-libssh2 \
        $(if $(CONFIG_ARIA2_LIBXML2),--with,--without)-libxml2 \
        $(if $(CONFIG_ARIA2_EXPAT),--with,--without)-libexpat \
        --without-libnettle \
        --without-libgmp \
        --without-libgcrypt \
        --without-libcares \
+       --without-libuv \
        --without-sqlite3 \
        --with-libz
 
index 97c354b89ea5e44cc5319f007d0e993db741df2f..b32665b47e50cc6c5a6ff3c42a33a7b639fe6414 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.6.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://znc.in/releases \
                http://znc.in/releases/archive
-PKG_MD5SUM:=89f6696ed366661f7432ece343fd19d0
+PKG_MD5SUM:=0dad0307e2faea26b9e304e308f7ec63
 
 PKG_MAINTAINER:=Jonas Gorski <jogo@openwrt.org>
 PKG_LICENSE:=Apache-2.0
index 2ee5a1e588eccf3ee06b4857474103e64ca26ef8..91f3ecaa7eb00e7df22a76505f4d693ab24846fa 100644 (file)
@@ -12,6 +12,7 @@ DISABLED=
 
 RUNAS_USER=
 RUNAS_GROUP=
+RUNAS_SHELL=
 
 add_param() {
        echo "$1 = $2" >> $ZNC_CONFIG
@@ -60,6 +61,7 @@ znc_global() {
 
        config_get RUNAS_USER "$znc" runas_user
        config_get RUNAS_GROUP "$znc" runas_group
+       config_get RUNAS_SHELL "$znc" runas_shell
 
        if [ "${znc_config_path}" ]
        then
@@ -168,7 +170,7 @@ start() {
                config_foreach add_listener listener
                config_foreach add_user user
 
-               chown -hR ${RUNAS_USER:-nobody}:${RUNAS_GROUP:-nogroup} /tmp/etc/znc
+               chown -hR ${RUNAS_USER:-nobody}:${RUNAS_GROUP:-nogroup} ${ZNC_CONFIG_PATH}
        fi
 
        if [ "$EXTERNAL_CONFIG" -eq 1 -a "$RUNAS_USER"  ]
@@ -176,7 +178,8 @@ start() {
                local SU=$(which su)
                if [ "$SU" ]
                then
-                       $SU -c "/usr/bin/znc -d$ZNC_CONFIG_PATH >/dev/null &" $RUNAS_USER
+                       chown -hR ${RUNAS_USER:-nobody}:${RUNAS_GROUP:-nogroup} ${ZNC_CONFIG_PATH}
+                       $SU ${RUNAS_SHELL:+s $RUNAS_SHELL} -c "/usr/bin/znc -d$ZNC_CONFIG_PATH >/dev/null &" $RUNAS_USER
                else
                        logger -s -t ZNC -p daemon.err "Could not run ZNC as user $RUNAS_USER: su not found."
                        exit 1
index 086bea8682eab2ceee414fad22871022a596210a..6c1b489720fec841bb643421bf3d9d19affdb2df 100644 (file)
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squeezelite
-PKG_VERSION:=1.8
-PKG_RELEASE=2
+PKG_VERSION:=1.8.4-743
+PKG_RELEASE=1
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=LICENSE.txt
 PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net>
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://code.google.com/p/squeezelite/
+PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=8b8dfe6918ebe45ade5f3d9b68d453d7b8128d99
+PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
@@ -32,7 +32,7 @@ define Package/squeezelite/default
     CATEGORY:=Sound
     TITLE:=Headless squeezebox emulator
     PROVIDES:=squeezelite
-    URL:=https://code.google.com/p/squeezelite/
+    URL:=https://github.com/ralph-irving/squeezelite
     DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr
     MENU:=1
 endef
index 17d083e72e71439a523c3833a9ffeaf36c73107b..465f61a000322743e23a334d9c3cd1e3c9a7a44a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/main.c
 +++ b/main.c
-@@ -69,6 +69,7 @@ static void usage(const char *argv0) {
+@@ -78,6 +78,7 @@ static void usage(const char *argv0) {
  #if IR
                   "  -i [<filename>]\tEnable lirc remote control support (lirc config file ~/.lircrc used if filename not specified)\n"
  #endif
@@ -8,8 +8,8 @@
                   "  -m <mac addr>\t\tSet mac address, format: ab:cd:ef:12:34:56\n"
                   "  -M <modelname>\tSet the squeezelite player model name sent to the server (default: " MODEL_NAME_STRING ")\n"
                   "  -n <name>\t\tSet the player name\n"
-@@ -197,6 +198,8 @@ int main(int argc, char **argv) {
-       char *modelname = NULL;
+@@ -233,6 +234,8 @@ int main(int argc, char **argv) {
+       extern bool pcm_check_header;
        char *logfile = NULL;
        u8_t mac[6];
 +      char *iface = NULL;
        unsigned stream_buf_size = STREAMBUF_SIZE;
        unsigned output_buf_size = 0; // set later
        unsigned rates[MAX_SUPPORTED_SAMPLERATES] = { 0 };
-@@ -233,6 +236,7 @@ int main(int argc, char **argv) {
-       log_level log_ir     = lWARN;
- #endif
+@@ -271,6 +274,7 @@ int main(int argc, char **argv) {
+       int maxSampleRate = 0;
  
 +      memset(mac, 0, sizeof(mac));
        char *optarg = NULL;
        int optind = 1;
        int i;
-@@ -240,8 +244,6 @@ int main(int argc, char **argv) {
+@@ -278,8 +282,6 @@ int main(int argc, char **argv) {
  #define MAXCMDLINE 512
        char cmdline[MAXCMDLINE] = "";
  
@@ -34,7 +34,7 @@
        for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) {
                strcat(cmdline, argv[i]);
                strcat(cmdline, " ");
-@@ -249,7 +251,7 @@ int main(int argc, char **argv) {
+@@ -287,7 +289,7 @@ int main(int argc, char **argv) {
  
        while (optind < argc && strlen(argv[optind]) >= 2 && argv[optind][0] == '-') {
                char *opt = argv[optind] + 1;
@@ -43,7 +43,7 @@
  #if ALSA
                                   "UV"
  #endif
-@@ -334,6 +336,9 @@ int main(int argc, char **argv) {
+@@ -382,6 +384,9 @@ int main(int argc, char **argv) {
                case 'f':
                        logfile = optarg;
                        break;
@@ -53,7 +53,7 @@
                case 'm':
                        {
                                int byte = 0;
-@@ -556,6 +561,11 @@ int main(int argc, char **argv) {
+@@ -667,6 +672,11 @@ int main(int argc, char **argv) {
        winsock_init();
  #endif
  
        stream_init(log_stream, stream_buf_size);
  
        if (!strcmp(output_device, "-")) {
-@@ -599,7 +609,7 @@ int main(int argc, char **argv) {
+@@ -710,7 +720,7 @@ int main(int argc, char **argv) {
                exit(1);
        }
  
--      slimproto(log_slimproto, server, mac, name, namefile, modelname);
-+      slimproto(log_slimproto, server, bcast_addr, mac, name, namefile, modelname);
+-      slimproto(log_slimproto, server, mac, name, namefile, modelname, maxSampleRate);
++      slimproto(log_slimproto, server, bcast_addr, mac, name, namefile, modelname, maxSampleRate);
  
        decode_close();
        stream_close();
 --- a/squeezelite.h
 +++ b/squeezelite.h
-@@ -374,7 +374,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
+@@ -403,7 +403,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
  
  char *next_param(char *src, char c);
  u32_t gettime_ms(void);
  void set_nonblock(sockfd s);
  int connect_timeout(sockfd sock, const struct sockaddr *addr, socklen_t addrlen, int timeout);
  void server_addr(char *server, in_addr_t *ip_ptr, unsigned *port_ptr);
-@@ -426,7 +426,7 @@ void buf_init(struct buffer *buf, size_t
+@@ -459,7 +459,7 @@ void buf_init(struct buffer *buf, size_t
  void buf_destroy(struct buffer *buf);
  
  // slimproto.c
--void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname);
-+void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t *mac, const char *name, const char *namefile, const char *modelname);
+-void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate);
++void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate);
  void slimproto_stop(void);
  void wake_controller(void);
  
 --- a/slimproto.c
 +++ b/slimproto.c
-@@ -107,7 +107,7 @@ void send_packet(u8_t *packet, size_t le
+@@ -119,7 +119,7 @@ void send_packet(u8_t *packet, size_t le
        }
  }
  
        const char *base_cap = "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION;
        struct HELO_packet pkt;
  
-@@ -730,7 +730,7 @@ void wake_controller(void) {
+@@ -782,7 +782,7 @@ void wake_controller(void) {
        wake_signal(wake_e);
  }
  
        struct sockaddr_in d;
        struct sockaddr_in s;
        char *buf;
-@@ -746,7 +746,7 @@ in_addr_t discover_server(void) {
+@@ -798,7 +798,7 @@ in_addr_t discover_server(void) {
        memset(&d, 0, sizeof(d));
        d.sin_family = AF_INET;
        d.sin_port = htons(PORT);
  
        pollinfo.fd = disc_sock;
        pollinfo.events = POLLIN;
-@@ -777,7 +777,7 @@ in_addr_t discover_server(void) {
+@@ -829,7 +829,7 @@ in_addr_t discover_server(void) {
  #define FIXED_CAP_LEN 256
  #define VAR_CAP_LEN   128
  
--void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname) {
-+void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t *mac, const char *name, const char *namefile, const char *modelname) {
+-void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate) {
++void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate) {
        struct sockaddr_in serv_addr;
        static char fixed_cap[FIXED_CAP_LEN], var_cap[VAR_CAP_LEN] = "";
        bool reconnect = false;
-@@ -795,7 +795,7 @@ void slimproto(log_level level, char *se
+@@ -849,7 +849,7 @@ void slimproto(log_level level, char *se
        }
  
        if (!slimproto_ip) {
        }
  
        if (!slimproto_port) {
-@@ -870,7 +870,7 @@ void slimproto(log_level level, char *se
+@@ -924,7 +924,7 @@ void slimproto(log_level level, char *se
  
                        // rediscover server if it was not set at startup
                        if (!server && ++failed_connect > 5) {
                } else {
 --- a/utils.c
 +++ b/utils.c
-@@ -21,11 +21,11 @@
+@@ -22,11 +22,11 @@
  #include "squeezelite.h"
  
  #if LINUX || OSX || FREEBSD
  #include <net/if_dl.h>
  #include <net/if_types.h>
  #endif
-@@ -33,15 +33,11 @@
+@@ -44,15 +44,11 @@
  #if WIN
  #include <iphlpapi.h>
  #endif
  // logging functions
  const char *logtime(void) {
        static char buf[100];
-@@ -99,67 +95,101 @@ u32_t gettime_ms(void) {
+@@ -114,58 +110,101 @@ u32_t gettime_ms(void) {
  #endif
  }
  
 -// mac address
--#if LINUX
+-#if LINUX && !defined(SUN)
 -// search first 4 interfaces returned by IFCONF
 -void get_mac(u8_t mac[]) {
+-      char *utmac;
 -      struct ifconf ifc;
 -      struct ifreq *ifr, *ifend;
 -      struct ifreq ifreq;
 -      struct ifreq ifs[4];
--
--      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
--
--      int s = socket(AF_INET, SOCK_DGRAM, 0);
--
--      ifc.ifc_len = sizeof(ifs);
--      ifc.ifc_req = ifs;
--
--      if (ioctl(s, SIOCGIFCONF, &ifc) == 0) {
--              ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));
--
--              for (ifr = ifc.ifc_req; ifr < ifend; ifr++) {
--                      if (ifr->ifr_addr.sa_family == AF_INET) {
--
--                              strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
--                              if (ioctl (s, SIOCGIFHWADDR, &ifreq) == 0) {
--                                      memcpy(mac, ifreq.ifr_hwaddr.sa_data, 6);
--                                      if (mac[0]+mac[1]+mac[2] != 0) {
--                                              break;
--                                      }
 +// Get broadcast address for interface (given or first available)
 +// Return MAC address if none given
 +#if LINUX || OSX || FREEBSD
-+
+-      utmac = getenv("UTMAC");
+-      if (utmac)
+-      {
+-              if ( strlen(utmac) == 17 )
+-              {
+-                      if (sscanf(utmac,"%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
+-                              &mac[0],&mac[1],&mac[2],&mac[3],&mac[4],&mac[5]) == 6)
+-                      {
+-                              return;
+-                      }
+-              }
 +in_addr_t get_iface_info(log_level level, char *iface, u8_t *mac) {
 +      struct ifaddrs *addrs, *ifa;
 +      struct sockaddr *sdl;
 +        {
 +                if( strlen(iface) > sizeof(ifname) )
 +                        return -1;
-+
 +                strncpy(ifname, iface, sizeof(ifname));
 +                have_ifname = 1;
-+      }
-+
+       }
+-      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
 +      if (getifaddrs(&addrs) == 0) {
 +              //iterate to find corresponding ethernet address
 +              for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
 +                      {
 +                              continue;
 +                      }
-+
+-      int s = socket(AF_INET, SOCK_DGRAM, 0);
 +                      if (!have_ifname)
 +                      {
 +                              // We have found a valid interface name. Keep it.
 +                              {
 +                                      // This is not the interface we're looking for.
 +                                      continue;
-                               }
-                       }
--              }
--      }
++                              }
++                      }
  
--      close(s);
--}
--#endif
+-      ifc.ifc_len = sizeof(ifs);
+-      ifc.ifc_req = ifs;
  
--#if OSX || FREEBSD
--void get_mac(u8_t mac[]) {
--      struct ifaddrs *addrs, *ptr;
--      const struct sockaddr_dl *dlAddr;
--      const unsigned char *base;
--      
--      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
--      
--      if (getifaddrs(&addrs) == 0) {
--              ptr = addrs;
--              while (ptr) {
--                      if (ptr->ifa_addr->sa_family == AF_LINK && ((const struct sockaddr_dl *) ptr->ifa_addr)->sdl_type == IFT_ETHER) {
--                              dlAddr = (const struct sockaddr_dl *)ptr->ifa_addr;
--                              base = (const unsigned char*) &dlAddr->sdl_data[dlAddr->sdl_nlen];
--                              memcpy(mac, base, min(dlAddr->sdl_alen, 6));
+-      if (ioctl(s, SIOCGIFCONF, &ifc) == 0) {
+-              ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));
 +                      // Check address family.
 +                      if ((ifa->ifa_addr->sa_family == AF_INET) &&
 +                          (((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0))
 +                      {
 +                              // Get broadcast address and MAC address
 +                              bcast_addr = ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr;
-                               break;
-                       }
--                      ptr = ptr->ifa_next;
++                              break;
++                      }
 +                      else
 +                      {
 +                              // Address is not IPv4
 +                                      have_ifname = 0;
 +                      }
 +
-               }
-+
++              }
+-              for (ifr = ifc.ifc_req; ifr < ifend; ifr++) {
+-                      if (ifr->ifr_addr.sa_family == AF_INET) {
+-
+-                              strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
+-                              if (ioctl (s, SIOCGIFHWADDR, &ifreq) == 0) {
+-                                      memcpy(mac, ifreq.ifr_hwaddr.sa_data, 6);
+-                                      if (mac[0]+mac[1]+mac[2] != 0) {
+-                                              break;
+-                                      }
 +              // Find MAC address matching interface
 +              if (!have_mac && (bcast_addr != 0)) {
 +                      for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
 +                                      ptr = (unsigned char *)sdl->sa_data;
 +                                      memcpy(mac, ptr + 10, 6);
 +                                      have_mac = 1;
-+                              }
-+                      }
-+              }
+                               }
+                       }
+               }
 +
-               freeifaddrs(addrs);
++              freeifaddrs(addrs);
        }
-+
+-      close(s);
 +      LOG_INFO("Interface: %s, broadcast: %08X, macaddr = %02x:%02x:%02x:%02x:%02x:%02x",
 +               ifname, bcast_addr, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 +
  #endif
  
 +
+ #if SUN
+ void get_mac(u8_t mac[]) {
+       struct  arpreq          parpreq;
+@@ -232,30 +271,6 @@ void get_mac(u8_t mac[]) {
+ }
+ #endif
+-#if OSX || FREEBSD
+-void get_mac(u8_t mac[]) {
+-      struct ifaddrs *addrs, *ptr;
+-      const struct sockaddr_dl *dlAddr;
+-      const unsigned char *base;
+-      
+-      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
+-      
+-      if (getifaddrs(&addrs) == 0) {
+-              ptr = addrs;
+-              while (ptr) {
+-                      if (ptr->ifa_addr->sa_family == AF_LINK && ((const struct sockaddr_dl *) ptr->ifa_addr)->sdl_type == IFT_ETHER) {
+-                              dlAddr = (const struct sockaddr_dl *)ptr->ifa_addr;
+-                              base = (const unsigned char*) &dlAddr->sdl_data[dlAddr->sdl_nlen];
+-                              memcpy(mac, base, min(dlAddr->sdl_alen, 6));
+-                              break;
+-                      }
+-                      ptr = ptr->ifa_next;
+-              }
+-              freeifaddrs(addrs);
+-      }
+-}
+-#endif
+-
  #if WIN
  #pragma comment(lib, "IPHLPAPI.lib")
  void get_mac(u8_t mac[]) {
index c3eb5d05cbb6f11c41ae17f6ef534f2e9772e7ab..bc0547ab046c674bfda3105e56e1be95ee6aee70 100644 (file)
@@ -20,7 +20,7 @@
  LINKALL_IR       = -llirc_client
 --- a/decode.c
 +++ b/decode.c
-@@ -146,8 +146,8 @@ void decode_init(log_level level, const
+@@ -147,8 +147,8 @@ void decode_init(log_level level, const
        // try mad then mpg for mp3 unless command line option passed
        if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) &&
                (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mad")))    codecs[i] = register_mad();
@@ -33,7 +33,7 @@
  
 --- a/main.c
 +++ b/main.c
-@@ -35,7 +35,8 @@
+@@ -39,7 +39,8 @@
  #else
  #define CODECS_DSD  ""
  #endif
@@ -45,7 +45,7 @@
  
 --- a/squeezelite.h
 +++ b/squeezelite.h
-@@ -140,7 +140,7 @@
+@@ -155,7 +155,7 @@
  #if LINUX
  #define LIBFLAC "libFLAC.so.8"
  #define LIBMAD  "libmad.so.0"
@@ -54,7 +54,7 @@
  #define LIBVORBIS "libvorbisfile.so.3"
  #define LIBTREMOR "libvorbisidec.so.1"
  #define LIBFAAD "libfaad.so.2"
-@@ -154,7 +154,7 @@
+@@ -169,7 +169,7 @@
  #if OSX
  #define LIBFLAC "libFLAC.8.dylib"
  #define LIBMAD  "libmad.0.dylib"
@@ -63,7 +63,7 @@
  #define LIBVORBIS "libvorbisfile.3.dylib"
  #define LIBTREMOR "libvorbisidec.1.dylib"
  #define LIBFAAD "libfaad.2.dylib"
-@@ -167,7 +167,7 @@
+@@ -182,7 +182,7 @@
  #if WIN
  #define LIBFLAC "libFLAC.dll"
  #define LIBMAD  "libmad-0.dll"
@@ -72,7 +72,7 @@
  #define LIBVORBIS "libvorbisfile.dll"
  #define LIBTREMOR "libvorbisidec.dll"
  #define LIBFAAD "libfaad2.dll"
-@@ -180,7 +180,7 @@
+@@ -195,7 +195,7 @@
  #if FREEBSD
  #define LIBFLAC "libFLAC.so.11"
  #define LIBMAD  "libmad.so.2"
index 86e526015c048c371f3c1067dc2083ab2beb2f3e..24f00e01bdc2694609a16fec0fc72b77ce97a9e9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/output_alsa.c
 +++ b/output_alsa.c
-@@ -862,8 +862,11 @@ void output_init_alsa(log_level level, c
+@@ -911,8 +911,11 @@ void output_init_alsa(log_level level, c
                LOG_INFO("memory locked");
        }
  
index 157157242d9b36c7c0bd3bc21a234a523a8d11d9..b534a2b5fc90ccd5aab9353079de1ccf7e81a255 100644 (file)
@@ -1,6 +1,6 @@
 --- a/faad.c
 +++ b/faad.c
-@@ -593,6 +593,8 @@ static bool load_faad() {
+@@ -594,6 +594,8 @@ static bool load_faad() {
                return false;
        }
  
@@ -11,7 +11,7 @@
        a->NeAACDecOpen = dlsym(handle, "NeAACDecOpen");
 --- a/ffmpeg.c
 +++ b/ffmpeg.c
-@@ -590,6 +590,8 @@ static bool load_ff() {
+@@ -620,6 +620,8 @@ static bool load_ff() {
                return false;
        }
  
@@ -33,7 +33,7 @@
        f->FLAC__stream_decoder_new = dlsym(handle, "FLAC__stream_decoder_new");
 --- a/ir.c
 +++ b/ir.c
-@@ -167,10 +167,10 @@ static void *ir_thread() {
+@@ -168,10 +168,10 @@ static void *ir_thread() {
                        UNLOCK_I;
                        wake_controller();
                }
@@ -46,7 +46,7 @@
        return 0;
  }
  
-@@ -184,6 +184,8 @@ static bool load_lirc() {
+@@ -185,6 +185,8 @@ static bool load_lirc() {
                return false;
        }
  
@@ -57,7 +57,7 @@
        i->lirc_readconfig = dlsym(handle, "lirc_readconfig");
 --- a/mad.c
 +++ b/mad.c
-@@ -364,7 +364,9 @@ static bool load_mad() {
+@@ -365,7 +365,9 @@ static bool load_mad() {
                LOG_INFO("dlerror: %s", dlerror());
                return false;
        }
@@ -70,7 +70,7 @@
        m->mad_synth_init = dlsym(handle, "mad_synth_init");
 --- a/mpg.c
 +++ b/mpg.c
-@@ -221,7 +221,9 @@ static bool load_mpg() {
+@@ -222,7 +222,9 @@ static bool load_mpg() {
                LOG_INFO("dlerror: %s", dlerror());
                return false;
        }
@@ -83,7 +83,7 @@
        m->mpg123_rates = dlsym(handle, "mpg123_rates");
 --- a/resample.c
 +++ b/resample.c
-@@ -250,6 +250,8 @@ static bool load_soxr(void) {
+@@ -251,6 +251,8 @@ static bool load_soxr(void) {
                return false;
        }
  
@@ -94,7 +94,7 @@
        r->soxr_create = dlsym(handle, "soxr_create");
 --- a/vorbis.c
 +++ b/vorbis.c
-@@ -286,6 +286,8 @@ static bool load_vorbis() {
+@@ -287,6 +287,8 @@ static bool load_vorbis() {
                }
        }
  
index f737fb4e13538b1f7f13bc89051108d194dd40b2..27bbee8594d44d50a6e8456c1b966b9eb65add06 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=upmpdcli
 PKG_VERSION:=1.1.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads
@@ -55,7 +55,7 @@ ifneq ($(CONFIG_PACKAGE_UPMPDCLI_SC_WEB_INTERFACE),y)
        $(RM) -rf $(PKG_INSTALL_DIR)/usr/share/upmpdcli/web
 endif
        $(CP) $(PKG_INSTALL_DIR)/usr/share/upmpdcli $(1)/usr/share/
-       $(INSTALL_DATA) ./files/upmpdcli.png $(1)/usr/share/upmpdcli/
+       $(INSTALL_DATA) ./files/upmpdcli.png $(1)/usr/share/upmpdcli/icon.png
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/upmpdcli.init $(1)/etc/init.d/upmpdcli
 endef
diff --git a/utils/gzip/Makefile b/utils/gzip/Makefile
new file mode 100644 (file)
index 0000000..d1236f2
--- /dev/null
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gzip
+PKG_VERSION:=1.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/gzip
+PKG_MD5SUM:=c4abae2ddd5c6f39c6f8169693cc7ac0
+PKG_LICENSE:=GPL-3.0+
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gzip
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=gzip (GNU zip) is a compression utility.
+  URL:=https://www.gnu.org/software/gzip/
+  MAINTAINER:=Christian Beier <dontmind@freeshell.org>
+endef
+
+define Package/gzip/description
+       gzip (GNU zip) is a compression utility designed to be a \
+       replacement for compress.
+endef
+
+CONFIGURE_VARS += \
+       gl_cv_func_getopt_gnu=yes \
+       ac_cv_search_clock_gettime=no
+
+define Package/gzip/install
+       $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
+endef
+
+define Package/gzip/postinst
+#!/bin/sh
+for app in gunzip gzip zcat; do
+  ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
+done
+endef
+
+define Package/gzip/postrm
+#!/bin/sh
+for app in gunzip gzip zcat; do
+  ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
+  $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
+done
+exit 0
+endef
+
+$(eval $(call BuildPackage,gzip))
+
diff --git a/utils/lrzsz/Makefile b/utils/lrzsz/Makefile
new file mode 100644 (file)
index 0000000..5074a1d
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lrzsz
+PKG_VERSION:=0.12.20
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://ohse.de/uwe/releases/
+PKG_MD5SUM:=b5ce6a74abc9b9eb2af94dffdfd372a4
+
+PKG_MAINTAINER:=Hsing-Wang Liao <kuoruan@gmail.com>
+PKG_LICENSE:=GPL-2.0+
+PKG_LICENSE_FILES:=COPYING
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/lrzsz
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=X, Y and Z-modem protocols
+  URL:=https://ohse.de/uwe/software/lrzsz.html
+endef
+
+define Package/lrzsz/description
+       Transfer files in your login sessions.
+       Very leightweight and straight forward.
+       You just need a terminal client that can do
+       either X, Y or Z-modem file transfers.
+endef
+
+define Package/lrzsz/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lrz $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsz $(1)/usr/bin/
+       (cd $(1)/usr/bin; \
+               ln -fs lrz lrx; \
+               ln -fs lrz lrb; \
+               ln -fs lrz rz; \
+               ln -fs lrz rx; \
+               ln -fs lrz rb; \
+               ln -fs lsz lsx; \
+               ln -fs lsz lsb; \
+               ln -fs lsz sz; \
+               ln -fs lsz sx; \
+               ln -fs lsz sb; \
+       );
+endef
+
+$(eval $(call BuildPackage,lrzsz))
diff --git a/utils/lrzsz/patches/100-install_delete_fix.patch b/utils/lrzsz/patches/100-install_delete_fix.patch
new file mode 100644 (file)
index 0000000..3b19443
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -372,13 +372,13 @@
+       rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'`
+       ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
+               $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'` 
+-      rm -f $(bindir)/`echo lsx | sed -e '$(transform)'`
++      rm -f $(DESTDIR)/$(bindir)/`echo lsx | sed -e '$(transform)'`
+       ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
+               $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'` 
+-      rm -f $(bindir)/`echo lrb | sed -e '$(transform)'`
++      rm -f $(DESTDIR)/$(bindir)/`echo lrb | sed -e '$(transform)'`
+       ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
+               $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'` 
+-      rm -f $(bindir)/`echo lrx | sed -e '$(transform)'`
++      rm -f $(DESTDIR)/$(bindir)/`echo lrx | sed -e '$(transform)'`
+       ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
+               $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'` 
+ #     rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'`