Merge pull request #2397 from stintel/snmp
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 1 Mar 2016 05:32:51 +0000 (06:32 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 1 Mar 2016 05:32:51 +0000 (06:32 +0100)
net-snmp: reload snmpd on interface events

59 files changed:
lang/perl-cgi/Makefile
libs/alsa-lib/Makefile
libs/alsa-lib/patches/002-remove_cross_compile_guess.patch [deleted file]
libs/alsa-lib/patches/005-fix_include_file_redirect_warnings.patch
libs/glib2/Makefile
libs/glib2/patches/100-fix-gio-linking.patch [deleted file]
libs/gnutls/Config.in
libs/gnutls/Makefile
libs/libv4l/Makefile
libs/libv4l/patches/001-no-shm_open-fix.patch [deleted file]
libs/libv4l/patches/005-test_for_posix_ioctl.patch [deleted file]
libs/libv4l/patches/030-dont-call-getsubopt.patch [new file with mode: 0644]
libs/libv4l/patches/030-musl_compatibility.patch [deleted file]
mail/postfix/Makefile
mail/postfix/files/main.cf.default
mail/postfix/patches/100-fsstat.patch
mail/postfix/patches/200-manpages.patch
mail/postfix/patches/400-cdb.patch
mail/postfix/patches/500-crosscompile.patch
mail/postfix/patches/600-nopostconf.patch
mail/postfix/patches/800-fmt.patch
multimedia/ffmpeg/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.hotplug [new file with mode: 0644]
net/adblock/files/adblock.init
net/adblock/files/www/adblock/adblock.html [deleted file]
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh
net/ddns-scripts/files/services
net/gnunet/Makefile
net/ngircd/Makefile
net/pptpd/Makefile
net/pptpd/files/options.pptpd
net/pptpd/files/pptpd.conf
net/pptpd/files/pptpd.init
net/squid/Makefile
sound/pulseaudio/Makefile
sound/pulseaudio/patches/002-xlocale.patch [deleted file]
sound/shairplay/Makefile
sound/shairplay/patches/001-key_file_dir.patch
sound/shairport-sync/Makefile
utils/alsa-utils/Makefile
utils/cryptodev-linux/Makefile
utils/dump1090/Makefile
utils/dump1090/files/dump1090.config
utils/dump1090/files/dump1090.init
utils/mmc-utils/Makefile
utils/nano/Makefile
utils/pciutils/Makefile
utils/qemu/Makefile [new file with mode: 0644]
utils/qemu/files/qemu-ga.init [new file with mode: 0755]
utils/qemu/files/virtio-ports.hotplug [new file with mode: 0755]
utils/tracertools/Makefile
utils/unrar/Makefile
utils/zip/Makefile

index 9d2eac3309a8887df3d0fa559aa8af477f387f55..5900361fccd1bf692a0a0f62f011ef30d1d8c2a1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-cgi
-PKG_VERSION:=4.25
+PKG_VERSION:=4.26
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
 PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=e047bec455105cdfa413b9c776f95bb9
+PKG_MD5SUM:=bf606eda81c9dc5347c1f3483732b2d2
 
 PKG_LICENSE:=GPL Artistic-2.0
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
index c4d036e218bb5ab36a9b8efe3040815765efc529..a97caf008e0cfd1186cf1561be7aaadc2e39fff4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-lib
-PKG_VERSION:=1.0.29
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://alsa.cybermirror.org/lib/
-PKG_MD5SUM:=de67e0eca72474d6b1121037dafe1024
+PKG_MD5SUM:=69515ca73c3c4a212ef45160dea846c1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Peter Wagner <tripolar@gmx.at>
 
@@ -43,15 +43,12 @@ endef
 
 TARGET_CFLAGS += $(FPIC)
 
-define Build/Configure
-       $(call Build/Configure/Default, \
+CONFIGURE_ARGS+= \
                --disable-python \
                --disable-debug \
                --without-debug \
                $(SOFT_FLOAT_CONFIG_OPTION) \
-               --with-versioned=no \
-       )
-endef
+               --with-versioned=no
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/
diff --git a/libs/alsa-lib/patches/002-remove_cross_compile_guess.patch b/libs/alsa-lib/patches/002-remove_cross_compile_guess.patch
deleted file mode 100644 (file)
index d8f9f12..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,20 +27,6 @@ AC_PREFIX_DEFAULT(/usr)
- dnl Checks for programs.
--dnl try to gues cross-compiler if not set
--if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
--then
--  AC_MSG_CHECKING(for cross-compiler)
--
--  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
--  which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_os}-gcc
--  which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
--
--  AC_MSG_RESULT($CC)
--fi
--          
- CFLAGS="$CFLAGS -D_GNU_SOURCE"
index 8230c02f59d7fed3eef5a9d516d0c4d2f3c946d1..fc6c6f5901b33fdbd2560ac16d8fdf8f79676009 100644 (file)
@@ -82,9 +82,9 @@
  #include <ctype.h>
 -#include <sys/poll.h>
 +#include <poll.h>
- #include <sys/shm.h>
  #include <sys/mman.h>
  #include <limits.h>
+ #include "pcm_local.h"
 --- a/src/pcm/pcm_direct.c
 +++ b/src/pcm/pcm_direct.c
 @@ -30,7 +30,7 @@
  #include <sys/socket.h>
 -#include <sys/poll.h>
 +#include <poll.h>
- #include <sys/shm.h>
  #include <pthread.h>
  #include "pcm_local.h"
 --- a/src/pcm/pcm_shm.c
 +++ b/src/pcm/pcm_shm.c
 @@ -36,7 +36,7 @@
index b1ad841488f427a0bfc2a532180755d4a6547921..583828b933d0b5b9e3590ca9027a063313c2443c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glib2
-PKG_VERSION:=2.44.1
+PKG_VERSION:=2.46.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
-PKG_SOURCE_URL:=@GNOME/glib/2.44
-PKG_MD5SUM:=83efba4722a9674b97437d1d99af79db
+PKG_SOURCE_URL:=@GNOME/glib/2.46
+PKG_MD5SUM:=7f815d6e46df68e070cb421ed7f1139e
 
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PARALLEL:=1
diff --git a/libs/glib2/patches/100-fix-gio-linking.patch b/libs/glib2/patches/100-fix-gio-linking.patch
deleted file mode 100644 (file)
index 3ce57fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/gio/Makefile.am
-+++ b/gio/Makefile.am
-@@ -707,6 +707,7 @@ bin_PROGRAMS = gio-querymodules glib-com
- glib_compile_resources_LDADD = libgio-2.0.la          \
-       $(top_builddir)/gobject/libgobject-2.0.la       \
-+      $(top_builddir)/gmodule/libgmodule-2.0.la       \
-       $(top_builddir)/glib/libglib-2.0.la             \
-       $(NULL)
index 59ca00f8f4cd66e328d1095f5e7105e04e128011..fc3b31758ebedd1905195f4d350e6fe8ab576bf7 100644 (file)
@@ -17,7 +17,6 @@ config GNUTLS_OCSP
 
 config GNUTLS_CRYPTODEV
        bool "enable /dev/crypto support"
-       select PACKAGE_kmod-cryptodev
        default n
 
 config GNUTLS_HEARTBEAT
index 362a90e081441b13cc1c15277cae772944aada6d..663359ded3972804875a4cfaecfcd3a4270901d7 100644 (file)
@@ -93,7 +93,7 @@ endef
 define Package/libgnutls
 $(call Package/gnutls/Default)
   TITLE+= (library)
-  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit
+  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev
 endef
 
 define Package/libgnutls/description
index 841ffa50e6f871f11820dc72c59888bf91d73d07..b6fda69bbcc5f2f3e08d8bf07f1c4d37a08a0f1e 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l-utils
-PKG_VERSION:=1.6.3
+PKG_VERSION:=1.10.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.linuxtv.org/downloads/v4l-utils
-PKG_MD5SUM:=307858616be6374f63bf946307f15a7f
+PKG_MD5SUM:=945a38979138997e805828a4a53e53ec
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -76,7 +76,7 @@ define Package/v4l-utils/description
   This package contains the video4linux utilities.
 endef
 
-TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_CFLAGS += $(FPIC)
 TARGET_LDFLAGS += -largp
 
 CONFIGURE_ARGS+= \
diff --git a/libs/libv4l/patches/001-no-shm_open-fix.patch b/libs/libv4l/patches/001-no-shm_open-fix.patch
deleted file mode 100644 (file)
index 382f5c7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/lib/libv4lconvert/control/libv4lcontrol.c
-+++ b/lib/libv4lconvert/control/libv4lcontrol.c
-@@ -570,7 +570,7 @@ static void v4lcontrol_get_flags_from_db
- struct v4lcontrol_data *v4lcontrol_create(int fd, void *dev_ops_priv,
-       const struct libv4l_dev_ops *dev_ops, int always_needs_conversion)
- {
--      int shm_fd;
-+      int shm_fd, fdflags;
-       int i, rc, got_usb_info, speed, init = 0;
-       char *s, shm_name[256], pwd_buf[1024];
-       struct v4l2_capability cap;
-@@ -695,33 +695,38 @@ struct v4lcontrol_data *v4lcontrol_creat
-       if (getpwuid_r(geteuid(), &pwd, pwd_buf, sizeof(pwd_buf), &pwd_p) == 0) {
-               if (got_usb_info)
--                      snprintf(shm_name, 256, "/libv4l-%s:%s:%04x:%04x:%s", pwd.pw_name,
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%s:%s:%04x:%04x:%s", pwd.pw_name,
-                                       cap.bus_info, (int)vendor_id, (int)product_id, cap.card);
-               else
--                      snprintf(shm_name, 256, "/libv4l-%s:%s:%s", pwd.pw_name,
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%s:%s:%s", pwd.pw_name,
-                                       cap.bus_info, cap.card);
-       } else {
-               perror("libv4lcontrol: error getting username using uid instead");
-               if (got_usb_info)
--                      snprintf(shm_name, 256, "/libv4l-%lu:%s:%04x:%04x:%s",
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%lu:%s:%04x:%04x:%s",
-                                       (unsigned long)geteuid(), cap.bus_info,
-                                       (int)vendor_id, (int)product_id, cap.card);
-               else
--                      snprintf(shm_name, 256, "/libv4l-%lu:%s:%s", (unsigned long)geteuid(),
-+                      snprintf(shm_name, 256, "/dev/shm/libv4l-%lu:%s:%s", (unsigned long)geteuid(),
-                                       cap.bus_info, cap.card);
-       }
-       /* / is not allowed inside shm names */
--      for (i = 1; shm_name[i]; i++)
-+      for (i = 9; shm_name[i]; i++) /* start after "/dev/shm", i = 9 */
-               if (shm_name[i] == '/')
-                       shm_name[i] = '-';
-       /* Open the shared memory object identified by shm_name */
--      shm_fd = shm_open(shm_name, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE));
-+      shm_fd = open(shm_name, (O_CREAT | O_EXCL | O_RDWR), (S_IREAD | S_IWRITE));
-       if (shm_fd >= 0)
-               init = 1;
-       else
--              shm_fd = shm_open(shm_name, O_RDWR, (S_IREAD | S_IWRITE));
-+              shm_fd = open(shm_name, O_RDWR, (S_IREAD | S_IWRITE));
-+
-+      /* This is all uClibc > 0.9.30 seems to do for shm_open() in librt/shm.c */
-+      fdflags = fcntl(shm_fd, F_GETFD, 0);
-+      if (fdflags >= 0)
-+              fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
-       if (shm_fd >= 0) {
-               /* Set the shared memory size */
diff --git a/libs/libv4l/patches/005-test_for_posix_ioctl.patch b/libs/libv4l/patches/005-test_for_posix_ioctl.patch
deleted file mode 100644 (file)
index e945bbf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -80,6 +80,20 @@ gl_VISIBILITY
- AC_CHECK_HEADERS([sys/klog.h])
- AC_CHECK_FUNCS([klogctl])
-+AC_CACHE_CHECK([for ioctl with POSIX signature],
-+  [gl_cv_func_ioctl_posix_signature],
-+  [AC_COMPILE_IFELSE(
-+     [AC_LANG_PROGRAM(
-+        [[#include <sys/ioctl.h>]],
-+        [[int ioctl (int, int, ...);]])
-+     ],
-+     [gl_cv_func_ioctl_posix_signature=yes],
-+     [gl_cv_func_ioctl_posix_signature=no])
-+  ])
-+if test "x$gl_cv_func_ioctl_posix_signature" = xyes; then
-+  AC_DEFINE([HAVE_POSIX_IOCTL], [1], [Have ioctl with POSIX signature])
-+fi
-+
- # Check host os
- case "$host_os" in
-   linux*)
diff --git a/libs/libv4l/patches/030-dont-call-getsubopt.patch b/libs/libv4l/patches/030-dont-call-getsubopt.patch
new file mode 100644 (file)
index 0000000..5824c70
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+@@ -671,15 +671,18 @@ static bool parse_subset(char *optarg)
+ static bool parse_next_subopt(char **subs, char **value)
+ {
+-      static char *const subopts[] = {
+-          NULL
+-      };
+-      int opt = getsubopt(subs, subopts, value);
++      char *stmp = *subs;
++      *value = NULL;
+-      if (opt < 0 || *value)
++      if (*subs) {
++              *subs = strchr(stmp, ',');
++              if (*subs)
++                      *(*subs)++ = 0;
++              else *subs = stmp + strlen(stmp);
++
++              *value = stmp;
+               return false;
+-      fprintf(stderr, "No value given to suboption <%s>\n",
+-                      subopts[opt]);
++      }
+       return true;
+ }
diff --git a/libs/libv4l/patches/030-musl_compatibility.patch b/libs/libv4l/patches/030-musl_compatibility.patch
deleted file mode 100644 (file)
index 758be2b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
---- a/lib/libv4lconvert/libv4lsyscall-priv.h
-+++ b/lib/libv4lconvert/libv4lsyscall-priv.h
-@@ -35,18 +35,23 @@
-    which is broken on some systems and doesn't include them itself :( */
- #ifdef linux
-+#define __NEED_off_t
- #include <sys/time.h>
- #include <syscall.h>
- #include <linux/types.h>
- #include <linux/ioctl.h>
- /* On 32 bits archs we always use mmap2, on 64 bits archs there is no mmap2 */
- #ifdef __NR_mmap2
-+#undef SYS_mmap2
- #define       SYS_mmap2 __NR_mmap2
- #define       MMAP2_PAGE_SHIFT 12
- #else
- #define       SYS_mmap2 SYS_mmap
- #define       MMAP2_PAGE_SHIFT 0
- #endif
-+#if !(defined(__UCLIBC__) || defined(__GLIBC__))
-+typedef off_t __off_t;
-+#endif
- #endif
- #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
---- a/lib/libv4l1/v4l1compat.c
-+++ b/lib/libv4l1/v4l1compat.c
-@@ -62,7 +62,7 @@ LIBV4L_PUBLIC int open(const char *file,
-       return fd;
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
- {
-       int fd;
-@@ -94,7 +94,11 @@ LIBV4L_PUBLIC int dup(int fd)
-       return v4l1_dup(fd);
- }
-+#ifdef HAVE_POSIX_IOCTL
-+LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
-+#else
- LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
-+#endif
- {
-       void *arg;
-       va_list ap;
-@@ -112,12 +116,12 @@ LIBV4L_PUBLIC ssize_t read(int fd, void
- }
- LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd,
--              __off_t offset)
-+              off_t offset)
- {
-       return v4l1_mmap(start, length, prot, flags, fd, offset);
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
-               __off64_t offset)
- {
---- a/lib/libv4l2/v4l2convert.c
-+++ b/lib/libv4l2/v4l2convert.c
-@@ -86,7 +86,7 @@ LIBV4L_PUBLIC int open(const char *file,
-       return fd;
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
- {
-       int fd;
-@@ -121,7 +121,11 @@ LIBV4L_PUBLIC int dup(int fd)
-       return v4l2_dup(fd);
- }
-+#ifdef HAVE_POSIX_IOCTL
-+LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
-+#else
- LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
-+#endif
- {
-       void *arg;
-       va_list ap;
-@@ -144,7 +148,7 @@ LIBV4L_PUBLIC void *mmap(void *start, si
-       return v4l2_mmap(start, length, prot, flags, fd, offset);
- }
--#ifdef linux
-+#if defined(linux) && (defined(__GLIBC__) || defined(__UCLIBC__))
- LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
-               __off64_t offset)
- {
index 9d25265bdcdb74578150d7443f7413b3ddd68a95..137a45b1c0d04eb3134311c12eda329f05cc0bcb 100644 (file)
@@ -10,8 +10,8 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=postfix
 PKG_RELEASE:=1
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/
-PKG_VERSION:=3.0.3
-PKG_MD5SUM:=61caffae689c11d09b4c972a394ae3b1
+PKG_VERSION:=3.1.0
+PKG_MD5SUM:=b4a506fa74c69c6fb1875c0971268344
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=IPL-1.0
@@ -159,7 +159,7 @@ endef
 #      postconf -d > /tmp/main.cf.new
 # 3. Transfer /tmp/main.cf.new file to the build system
 # 4. Execute the following command:
-#      cat /tmp/main.cf.new | ( echo '# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE'; echo '# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX.'; echo '#'; grep -v ^alias_maps\ = |grep -v ^alias_database\ = |grep -v ^command_directory\ = |grep -v ^config_directory\ = |grep -v ^daemon_directory\ = |grep -v ^data_directory\ = |grep -v ^default_database_type\ = |grep -v ^html_directory\ = |grep -v ^mail_spool_directory\ = |grep -v ^mailq_path\ = |grep -v ^manpage_directory\ = |grep -v ^meta_directory\ = |grep -v ^mydomain\ = |grep -v ^myhostname\ = |grep -v ^mynetworks\ = |grep -v ^mynetworks_style\ = |grep -v ^newaliases_path\ = |grep -v ^queue_directory\ = |grep -v ^readme_directory\ = |grep -v ^sample_directory\ = |grep -v ^sendmail_path\ = |grep -v ^shlib_directory\ = |grep -v ^smtputf8_enable\ = |grep -v ^virtual_maps\ = ) > files/main.cf.default
+#      cat /tmp/main.cf.new | ( echo '# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE'; echo '# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX.'; echo '#'; grep -v ^alias_maps\ = |grep -v ^alias_database\ = |grep -v ^command_directory\ = |grep -v ^config_directory\ = |grep -v ^daemon_directory\ = |grep -v ^data_directory\ = |grep -v ^default_database_type\ = |grep -v ^html_directory\ = |grep -v ^mail_spool_directory\ = |grep -v ^mailq_path\ = |grep -v ^manpage_directory\ = |grep -v ^meta_directory\ = |grep -v ^mydomain\ = |grep -v ^myhostname\ = |grep -v ^mynetworks\ = |grep -v ^mynetworks_style\ = |grep -v ^newaliases_path\ = |grep -v ^queue_directory\ = |grep -v ^readme_directory\ = |grep -v ^sample_directory\ = |grep -v ^sendmail_path\ = |grep -v ^shlib_directory\ = |grep -v ^smtputf8_enable\ = |grep -v ^virtual_maps\ = |grep -v ^process_id\ = ) > files/main.cf.default
 # 5. Done. Now you can rebuild the package with new main.cf.default.
 #
 
index 944f2799d3a3518ab0c0878183d56ddf1b6764f1..9075498a938f315681d6b430dbb43173ecc32870 100644 (file)
@@ -11,6 +11,7 @@ address_verify_map = btree:$data_directory/verify_cache
 address_verify_negative_cache = yes
 address_verify_negative_expire_time = 3d
 address_verify_negative_refresh_time = 3h
+address_verify_pending_request_limit = 5000
 address_verify_poll_count = ${stress?{1}:{3}}
 address_verify_poll_delay = 3s
 address_verify_positive_expire_time = 31d
@@ -92,6 +93,7 @@ default_recipient_limit = 20000
 default_recipient_refill_delay = 5s
 default_recipient_refill_limit = 100
 default_transport = smtp
+default_transport_rate_delay = 0s
 default_verp_delimiters = +=
 defer_code = 450
 defer_service_name = defer
@@ -108,6 +110,7 @@ disable_mime_input_processing = no
 disable_mime_output_conversion = no
 disable_verp_bounces = no
 disable_vrfy_command = no
+dns_ncache_ttl_fix_enable = no
 dnsblog_reply_delay = 0s
 dnsblog_service_name = dnsblog
 dont_remove = 0
@@ -135,6 +138,7 @@ error_recipient_limit = $default_recipient_limit
 error_recipient_refill_delay = $default_recipient_refill_delay
 error_recipient_refill_limit = $default_recipient_refill_limit
 error_service_name = error
+error_transport_rate_delay = $default_transport_rate_delay
 execution_directory_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
 expand_owner_alias = no
 export_environment = TZ MAIL_CONFIG LANG
@@ -205,6 +209,7 @@ lmtp_dns_resolver_options =
 lmtp_dns_support_level =
 lmtp_enforce_tls = no
 lmtp_extra_recipient_limit = $default_extra_recipient_limit
+lmtp_fallback_relay =
 lmtp_generic_maps =
 lmtp_header_checks =
 lmtp_host_lookup = dns
@@ -281,6 +286,7 @@ lmtp_tls_session_cache_timeout = 3600s
 lmtp_tls_trust_anchor_file =
 lmtp_tls_verify_cert_match = hostname
 lmtp_tls_wrappermode = no
+lmtp_transport_rate_delay = $default_transport_rate_delay
 lmtp_use_tls = no
 lmtp_xforward_timeout = 300s
 local_command_shell =
@@ -303,11 +309,12 @@ local_recipient_maps = proxy:unix:passwd.byname $alias_maps
 local_recipient_refill_delay = $default_recipient_refill_delay
 local_recipient_refill_limit = $default_recipient_refill_limit
 local_transport = local:$myhostname
+local_transport_rate_delay = $default_transport_rate_delay
 luser_relay =
 mail_name = Postfix
 mail_owner = postfix
-mail_release_date = 20151010
-mail_version = 3.0.3
+mail_release_date = 20160224
+mail_version = 3.1.0
 mailbox_command =
 mailbox_command_maps =
 mailbox_delivery_lock = fcntl, dotlock
@@ -339,6 +346,7 @@ milter_end_of_header_macros = i
 milter_header_checks =
 milter_helo_macros = {tls_version} {cipher} {cipher_bits} {cert_subject} {cert_issuer}
 milter_macro_daemon_name = $myhostname
+milter_macro_defaults =
 milter_macro_v = $mail_name $mail_version
 milter_mail_macros = i {auth_type} {auth_authen} {auth_author} {mail_addr} {mail_host} {mail_mailer}
 milter_protocol = 6
@@ -360,6 +368,7 @@ nested_header_checks = $header_checks
 non_fqdn_reject_code = 504
 non_smtpd_milters =
 notify_classes = resource, software
+openssl_path = openssl
 owner_request_special = yes
 parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
 permit_mx_backup_networks =
@@ -385,11 +394,12 @@ postscreen_disable_vrfy_command = $disable_vrfy_command
 postscreen_discard_ehlo_keyword_address_maps = $smtpd_discard_ehlo_keyword_address_maps
 postscreen_discard_ehlo_keywords = $smtpd_discard_ehlo_keywords
 postscreen_dnsbl_action = ignore
+postscreen_dnsbl_max_ttl = ${postscreen_dnsbl_ttl?{$postscreen_dnsbl_ttl}:{1}}h
+postscreen_dnsbl_min_ttl = 60s
 postscreen_dnsbl_reply_map =
 postscreen_dnsbl_sites =
 postscreen_dnsbl_threshold = 1
 postscreen_dnsbl_timeout = 10s
-postscreen_dnsbl_ttl = 1h
 postscreen_dnsbl_whitelist_threshold = 0
 postscreen_enforce_tls = $smtpd_enforce_tls
 postscreen_expansion_filter = $smtpd_expansion_filter
@@ -415,7 +425,6 @@ postscreen_use_tls = $smtpd_use_tls
 postscreen_watchdog_timeout = 10s
 postscreen_whitelist_interfaces = static:all
 prepend_delivered_header = command, file, forward
-process_id = 13574
 process_id_directory = pid
 process_name = postconf
 propagate_unmatched_extensions = canonical, virtual
@@ -467,6 +476,7 @@ relay_recipient_maps =
 relay_recipient_refill_delay = $default_recipient_refill_delay
 relay_recipient_refill_limit = $default_recipient_refill_limit
 relay_transport = relay
+relay_transport_rate_delay = $default_transport_rate_delay
 relayhost =
 relocated_maps =
 remote_header_rewrite_domain =
@@ -490,6 +500,7 @@ retry_minimum_delivery_slots = $default_minimum_delivery_slots
 retry_recipient_limit = $default_recipient_limit
 retry_recipient_refill_delay = $default_recipient_refill_delay
 retry_recipient_refill_limit = $default_recipient_refill_limit
+retry_transport_rate_delay = $default_transport_rate_delay
 rewrite_service_name = rewrite
 send_cyrus_sasl_authzid = no
 sender_bcc_maps =
@@ -587,6 +598,7 @@ smtp_tls_CApath =
 smtp_tls_block_early_mail_reply = no
 smtp_tls_cert_file =
 smtp_tls_ciphers = medium
+smtp_tls_dane_insecure_mx_policy = dane
 smtp_tls_dcert_file =
 smtp_tls_dkey_file = $smtp_tls_dcert_file
 smtp_tls_eccert_file =
@@ -613,12 +625,14 @@ smtp_tls_session_cache_timeout = 3600s
 smtp_tls_trust_anchor_file =
 smtp_tls_verify_cert_match = hostname
 smtp_tls_wrappermode = no
+smtp_transport_rate_delay = $default_transport_rate_delay
 smtp_use_tls = no
 smtp_xforward_timeout = 300s
 smtpd_authorized_verp_clients = $authorized_verp_clients
 smtpd_authorized_xclient_hosts =
 smtpd_authorized_xforward_hosts =
 smtpd_banner = $myhostname ESMTP $mail_name
+smtpd_client_auth_rate_limit = 0
 smtpd_client_connection_count_limit = 50
 smtpd_client_connection_rate_limit = 0
 smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks}
@@ -654,6 +668,7 @@ smtpd_per_record_deadline = ${stress?{yes}:{no}}
 smtpd_policy_service_default_action = 451 4.3.5 Server configuration problem
 smtpd_policy_service_max_idle = 300s
 smtpd_policy_service_max_ttl = 1000s
+smtpd_policy_service_policy_context =
 smtpd_policy_service_request_limit = 0
 smtpd_policy_service_retry_delay = 1s
 smtpd_policy_service_timeout = 100s
@@ -741,11 +756,11 @@ tls_dane_trust_anchor_digest_enable = yes
 tls_disable_workarounds =
 tls_eecdh_strong_curve = prime256v1
 tls_eecdh_ultra_curve = secp384r1
-tls_export_cipherlist = aNULL:-aNULL:ALL:+RC4:@STRENGTH
-tls_high_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH
+tls_export_cipherlist = aNULL:-aNULL:HIGH:MEDIUM:LOW:EXPORT:+RC4:@STRENGTH
+tls_high_cipherlist = aNULL:-aNULL:HIGH:@STRENGTH
 tls_legacy_public_key_fingerprints = no
-tls_low_cipherlist = aNULL:-aNULL:ALL:!EXPORT:+RC4:@STRENGTH
-tls_medium_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:+RC4:@STRENGTH
+tls_low_cipherlist = aNULL:-aNULL:HIGH:MEDIUM:LOW:+RC4:@STRENGTH
+tls_medium_cipherlist = aNULL:-aNULL:HIGH:MEDIUM:+RC4:@STRENGTH
 tls_null_cipherlist = eNULL:!aNULL
 tls_preempt_cipherlist = no
 tls_random_bytes = 32
@@ -837,4 +852,5 @@ virtual_recipient_limit = $default_recipient_limit
 virtual_recipient_refill_delay = $default_recipient_refill_delay
 virtual_recipient_refill_limit = $default_recipient_refill_limit
 virtual_transport = virtual
+virtual_transport_rate_delay = $default_transport_rate_delay
 virtual_uid_maps =
index ca43025c14330a34fcf55f18c7723d8e8af2bff1..50581446c88a136d4659f0c90389af4cfb7ea987 100644 (file)
@@ -1,7 +1,7 @@
 diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c
 --- postfix-2.8.1/src/smtpd/smtpd_check.c      2011-01-04 22:03:50.000000000 +0300
 +++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c      2011-03-06 19:35:39.000000000 +0300
-@@ -5277,7 +5277,7 @@ char   *smtpd_check_queue(SMTPD_STATE *s
+@@ -5296,7 +5296,7 @@ char   *smtpd_check_queue(SMTPD_STATE *s
       */
  #define BLOCKS(x)     ((x) / fsbuf.block_size)
  
index 6344e93ba3a5644eb855931c5992dfb9753f7ff6..75d6411003881e31a9b30f21a80fbebe760e0e01 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install
 --- postfix-2.10.2/conf/post-install   2013-06-13 18:07:46.000000000 +0400
 +++ postfix-2.10.2_patched/conf/post-install   2013-11-19 21:17:49.572820573 +0400
-@@ -359,10 +359,10 @@
+@@ -361,10 +361,10 @@
  
  # Sanity checks
  
@@ -16,7 +16,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
  
  case $setgid_group in
   no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-@@ -370,7 +370,7 @@
+@@ -372,7 +372,7 @@
  esac
  
  for path in "$daemon_directory" "$command_directory" "$queue_directory" \
@@ -25,7 +25,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
      "$meta_directory"
  do
     case "$path" in
-@@ -379,7 +379,7 @@
+@@ -381,7 +381,7 @@
     esac
  done
  
@@ -37,7 +37,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
 diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
 --- postfix-2.10.2/postfix-install     2012-05-22 23:40:29.000000000 +0400
 +++ postfix-2.10.2_patched/postfix-install     2013-11-19 21:12:20.694160734 +0400
-@@ -543,13 +543,13 @@
+@@ -554,13 +554,13 @@
       exit 1;;
  esac
  
@@ -58,7 +58,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
  
  for path in "$html_directory" "$readme_directory" "$shlib_directory"
  do
-@@ -562,7 +562,7 @@
+@@ -573,7 +573,7 @@
  done
  
  for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \
@@ -67,7 +67,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
      "$meta_directory"
  do
     case "$path" in
-@@ -758,8 +758,8 @@
+@@ -780,8 +780,8 @@
                compare_or_replace $mode "$owner" "$group" html/$file \
                    $HTML_DIRECTORY/$file || exit 1;;
        '$manpage_directory')
index 8aeaea5e48671175fbf429d1f034ae15e3780220..7abff3b900129b07f840a450476ae350f0983eb0 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h
 --- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400
 +++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400
-@@ -768,9 +768,8 @@
+@@ -769,9 +769,8 @@
  #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
  #define DEF_MAILBOX_LOCK "fcntl, dotlock"     /* RedHat >= 4.x */
  #define HAS_FSYNC
index 7f1a9707efbdfb9a13a0d5bfe69449d507e874d4..076d875df0bb584eb189be59e48f8e45fc3fe970 100644 (file)
@@ -1,6 +1,6 @@
 --- a/makedefs 2016-01-28 12:30:14.444082390 -0500
 +++ b/makedefs 2016-01-28 13:44:02.092006512 -0500
-@@ -193,7 +193,7 @@ error() {
+@@ -198,7 +198,7 @@ error() {
  
  case $# in
   # Officially supported usage.
@@ -9,7 +9,7 @@
      RELEASE=`(uname -r) 2>/dev/null`
      # No ${x%%y} support in Solaris 11 /bin/sh
      RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
-@@ -207,6 +207,15 @@ case $# in
+@@ -212,6 +212,15 @@ case $# in
  esac
  
  case "$SYSTEM.$RELEASE" in
index 6140e23faf62c4bcc8c056221e144360d66b239a..0dce776fae8531172baf9e151fb6ae2f7462ecc9 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install
 --- postfix-2.11.1/postfix-install     2014-10-05 20:43:58.598876904 +0400
 +++ postfix-2.11.1.patched/postfix-install     2014-10-05 20:47:36.076700082 +0400
-@@ -830,23 +830,23 @@
+@@ -852,23 +852,23 @@
      esac
  done
  
index 97a165c3d43cd76d6bfaa48a4edb8ad05ee328d8..334efdd788f16af76adaf39773496602ef4bcd5f 100644 (file)
@@ -1,12 +1,12 @@
 diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install
 --- postfix-2.11.1/conf/post-install   2014-10-05 20:43:58.597876946 +0400
 +++ postfix-2.11.1.patched/conf/post-install   2014-10-11 16:28:01.258874097 +0400
-@@ -319,7 +319,7 @@
+@@ -321,7 +321,7 @@
  case `uname -s` in
  HP-UX*) FMT=cat;;
  SunOS*) FMT=fake_fmt;;
 -     *) FMT=fmt;;
-+     *) FMT="xargs echo";;
++     *) FMT=cat;;
  esac
  
  # If a parameter is not set via the command line or environment,
index d24eeb964ea0f3d00285a31889cb93f5ef5e9ec9..3e4c693c51bed1052ae964782f8b9417000f5585 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
-PKG_VERSION:=2.7.4
+PKG_VERSION:=2.7.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
-PKG_MD5SUM:=dea35a30de724e1851a94680fc209a0d
+PKG_MD5SUM:=578c88242872e58cf0db5f23faa4b2af
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
index e02136cf82614416b419dd8df9104ca96483d4ad..ca3a183ad7785ae3c1c1a7e21683ad4a1831a67d 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=0.70.2
+PKG_VERSION:=0.90.0
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
@@ -25,7 +25,7 @@ endef
 define Package/$(PKG_NAME)/description
 Powerful adblock script to block ad/abuse domains.
 Currently the script supports 15 domain blacklist sites plus manual black- and whitelist overrides.
-Please see README.md in /etc/adblock for further information.
+Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information.
 
 endef
 
@@ -49,6 +49,9 @@ define Package/$(PKG_NAME)/install
        $(INSTALL_BIN) ./files/adblock-update.sh $(1)/usr/bin/
        $(INSTALL_DATA) ./files/adblock-helper.sh $(1)/usr/bin/
 
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
+       $(INSTALL_BIN) ./files/adblock.hotplug $(1)/etc/hotplug.d/iface/99-adblock
+
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/adblock.init $(1)/etc/init.d/adblock
 
@@ -59,7 +62,6 @@ define Package/$(PKG_NAME)/install
        $(INSTALL_CONF) ./files/adblock.conf $(1)/etc/adblock/adblock.conf.default
        $(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock/
        $(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock/
-       $(INSTALL_CONF) ./files/README.md $(1)/etc/adblock/
 
        $(INSTALL_DIR) $(1)/www/adblock
        $(INSTALL_DATA) ./files/www/adblock/* $(1)/www/adblock/
index 425e2f44270b850a5c6d60dc566d4458ad5a8fb0..838d5c0c8f5c8153717f56886c0445880f8b212a 100644 (file)
@@ -25,7 +25,7 @@ When the dns server on your router receives dns requests, you will sort out quer
     * [palevotracker](https://palevotracker.abuse.ch)
     * => daily updates, approx. 15 entries
     * [ruadlist+easylist](https://code.google.com/p/ruadlist)
-    * => weekly updates, approx. 2.000 entries (experimental support, may include false positives!)
+    * => weekly updates, approx. 2.000 entries
     * [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
     * => daily updates, approx. 32.000 entries (a short description of all shallalist categories can be found [online](http://www.shallalist.de/categories.html))
     * [spam404](http://www.spam404.com)
@@ -46,14 +46,13 @@ When the dns server on your router receives dns requests, you will sort out quer
 * adblock source list parsing by fast & flexible regex rulesets
 * additional white- and blacklist support for manual overrides
 * quality checks during & after update of adblock lists to ensure a reliable dnsmasq service
-* wan update check, to wait for an active wan uplink before update
 * basic adblock statistics via iptables packet counters for each chain
 * status & error logging to stdout and syslog
 * use of dynamic uhttpd instance as adblock pixel server
+* use of dynamic iptables ruleset for adblock related redirects/rejects
 * openwrt init system support (start/stop/restart/reload)
-* optional features (disabled by default):
-    * adblock list backup/restore
-    * debug logging to separate file
+* hotplug support, adblock start will be triggered by wan 'ifup' event
+* optional: adblock list backup/restore (disabled by default)
 
 ## Prerequisites
 * [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer 15.05) and with current trunk (Designated Driver > r47025)
@@ -62,31 +61,39 @@ When the dns server on your router receives dns requests, you will sort out quer
     * optional: 'kmod-ipt-nat6' for IPv6 support
 * the above dependencies and requirements will be checked during package installation & script runtime
 
-## Usage
-* install the adblock package (*opkg install adblock*)
+## Installation & Usage
+* install the adblock package (*opkg update & opkg install adblock*)
 * start the adblock service with */etc/init.d/adblock start* and check *logread -e "adblock"* for adblock related information
 * optional: enable/disable your required adblock list sources in */etc/config/adblock* - 'adaway', 'disconnect' and 'yoyo' are enabled by default
 * optional: maintain the adblock service in luci under 'System => Startup'
 
+## LuCI adblock companion package
+For easy management of the various blocklist sources and and the adblock options there is also a nice & efficient LuCI frontend available.  
+Please install the package 'luci-app-adblock'. Then you will find the application in LuCI located under 'Services' menu.  
+Thanks to Hannu Nyman for this great adblock LuCI frontend!  
+
+## CC installation notes
+* currently the adblock package is *not* part of the CC package repository
+* download the latest adblock package *adblock_x.xx.x-1_all.ipk* from a DD snapshot [package directory](https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages)
+* manual transfer the package to your router and install the opkg package as usual
+
 ## Tweaks
 * there is no need to enable all blacklist sites at once, for normal use one to three adblock list sources should be sufficient
-* if you really need to handle all blacklists at once add an usb stick or any other storage device to supersize your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
-* add static, personal domain white- or blacklist entries, one domain per line (wildcards & regex are not allowed!), by default both lists are located in */etc/adblock*
-* enable the backup/restore feature, to restore automatically the latest, stable backup of your adblock lists in case of any processing error
-* enable the logging feature for continuous logfile writing to monitor the adblock runs over a longer period
+* if you really need to handle all blacklists at once add an usb stick or any other storage device to enlarge your temp directory with a swap partition => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
+* add personal domain white- or blacklist entries as an additional blocklist source, one domain per line (wildcards & regex are not allowed!), by default both empty lists are located in */etc/adblock*
+* enable the backup/restore feature, to restore automatically the latest stable backup of your adblock lists in case of any (partial) processing error (i.e. a single blocklist source server is down). Please use an (external) solid partition and *not* your volatile router temp directory for this
 * for a scheduled call of the adblock service via */etc/init.d/adblock start* add an appropriate crontab entry
 
 ## Further adblock config options
 * usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to 'global' adblock config section:
-    * adb\_enabled => main switch to enable/disable adblock service (default: '1' (enabled))
+    * adb\_enabled => main switch to enable/disable adblock service (default: '1', enabled)
     * adb\_cfgver => config version string (do not change!) - adblock checks this entry and automatically applies the current config, if none or an older revision was found.
     * adb\_wanif => name of the logical wan interface (default: 'wan')
     * adb\_lanif => name of the logical lan interface (default: 'lan')
     * adb\_port => port of the adblock uhttpd instance (default: '65535')
     * adb\_nullipv4 => IPv4 blackhole ip address (default: '192.0.2.1')
-    * adb\_nullipv6 => IPv6 blackhole ip address (default '::ffff:c000:0201')
-    * adb\_maxtime => download timeout limit in seconds (default: '60')
-    * adb\_maxloop => startup timeout limit in seconds to wait for an active wan interface (default: '20')
+    * adb\_nullipv6 => IPv6 blackhole ip address (default: '::ffff:c000:0201')
+    * adb\_forcedns => redirect all DNS queries to local dnsmasq resolver (default: '1', enabled)
 
 ## Background
 This adblock package is a dns/dnsmasq based adblock solution for openwrt.  
index 8983a99c9d5b0d07e0a13eb930f892c02549328a..d96ce4ccaea33f7cad02cd15499ca4c93034adf4 100644 (file)
@@ -1,8 +1,6 @@
 #!/bin/sh
-#################################################
-# function library used by adblock-update.sh    #
-# written by Dirk Brenken (openwrt@brenken.org) #
-#################################################
+# function library used by adblock-update.sh
+# written by Dirk Brenken (openwrt@brenken.org)
 
 #####################################
 # f_envload: load adblock environment
@@ -86,13 +84,11 @@ f_envparse()
     adb_port="65535"
     adb_nullipv4="192.0.2.1"
     adb_nullipv6="::ffff:c000:0201"
-    adb_maxtime="60"
-    adb_maxloop="20"
     adb_blacklist="/etc/adblock/adblock.blacklist"
     adb_whitelist="/etc/adblock/adblock.whitelist"
+    adb_forcedns=1
 
-    # function to read/set global options by callback,
-    # prepare list items and build option list for all others
+    # function to read global options by callback
     #
     config_cb()
     {
@@ -107,45 +103,39 @@ f_envparse()
                 eval "${option}=\"${value}\""
             }
         else
-            option_cb()
-            {
-                local option="${1}"
-                local value="${2}"
-                local opt_out="$(printf "${option}" | sed -n '/.*_ITEM[0-9]$/p; /.*_LENGTH$/p; /enabled/p' 2>/dev/null)"
-                if [ -z "${opt_out}" ]
-                then
-                    all_options="${all_options} ${option}"
-                fi
-            }
-            list_cb()
-            {
-                local list="${1}"
-                local value="${2}"
-                if [ "${list}" = "adb_catlist" ]
-                then
-                    adb_cat_shalla="${adb_cat_shalla} ${value}"
-                fi
-            }
+            reset_cb
         fi
     }
 
-    # function to iterate through option list, read/set all options in "enabled" sections
+    # function to iterate through config list, read only options in "enabled" sections
     #
+    adb_cfglist="adb_backupdir adb_src"
+    unset adb_sources
     parse_config()
     {
         local config="${1}"
         config_get switch "${config}" "enabled"
         if [ "${switch}" = "1" ]
         then
-            for option in ${all_options}
+            for option in ${adb_cfglist}
             do
                 config_get value "${config}" "${option}"
                 if [ -n "${value}" ]
                 then
-                    local opt_src="$(printf "${option}" | sed -n '/^adb_src_[a-z0-9]*$/p' 2>/dev/null)"
-                    if [ -n "${opt_src}" ]
+                    if [ "${option}" = "adb_src" ]
                     then
-                        adb_sources="${adb_sources} ${value}"
+                        if [ "${config}" = "shalla" ]
+                        then
+                            categories()
+                            {
+                                local cat="${1}"
+                                adb_cat_shalla="${adb_cat_shalla} ${cat}"
+                            }
+                            eval "adb_arc_shalla=\"${value}\""
+                            config_list_foreach "shalla" "adb_catlist" "categories"
+                        else
+                            adb_sources="${adb_sources} ${value}"
+                        fi
                     else
                         eval "${option}=\"${value}\""
                     fi
@@ -162,9 +152,8 @@ f_envparse()
 
     # set more script defaults (can't be overwritten by adblock config options)
     #
-    adb_cnt=0
-    adb_minspace=20000
-    adb_unique=1
+    adb_count=0
+    adb_minspace=12000
     adb_tmpfile="$(mktemp -tu 2>/dev/null)"
     adb_tmpdir="$(mktemp -p /tmp -d 2>/dev/null)"
     adb_dnsdir="/tmp/dnsmasq.d"
@@ -176,9 +165,7 @@ f_envparse()
     adb_fwdchain_ipv6="forwarding_rule"
     adb_outchain_ipv6="output_rule"
     adb_fetch="/usr/bin/wget"
-    unset adb_srclist
-    unset adb_revsrclist
-    unset adb_errsrclist
+    unset adb_srclist adb_revsrclist adb_errsrclist
 
     # set adblock source ruleset definitions
     #
@@ -203,32 +190,23 @@ f_envparse()
 
     # get logical wan update interfaces (with default route) and their device names
     #
-    while [ $((adb_cnt)) -le $((adb_maxloop)) ]
-    do
-        network_find_wan adb_wanif4 2>/dev/null
-        network_find_wan6 adb_wanif6 2>/dev/null
-        if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ]
-        then
-            network_flush_cache
-        elif [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ]
-        then
-            rc=125
-            f_log "LAN only (${adb_lanif}) network, no valid IPv4/IPv6 wan update interface found" "${rc}"
-            f_exit
-        else
-            network_get_device adb_wandev4 "${adb_wanif4}" 2>/dev/null
-            network_get_device adb_wandev6 "${adb_wanif6}" 2>/dev/null
-            break
-        fi
-        if [ $((adb_cnt)) -ge $((adb_maxloop)) ]
-        then
-            rc=125
-            f_log "no valid IPv4/IPv6 wan update interface found" "${rc}"
-            f_exit
-        fi
-        adb_cnt=$((adb_cnt + 1))
-        sleep 1
-    done
+    network_find_wan adb_wanif4 2>/dev/null
+    network_find_wan6 adb_wanif6 2>/dev/null
+    if [ -z "${adb_wanif4}" ] && [ -z "${adb_wanif6}" ]
+    then
+        rc=125
+        f_log "no valid IPv4/IPv6 wan update interface found" "${rc}"
+        f_exit
+    elif [ "${adb_wanif4}" = "${adb_lanif}" ] || [ "${adb_wanif6}" = "${adb_lanif}" ]
+    then
+        rc=125
+        f_log "LAN only (${adb_lanif}) network, no valid IPv4/IPv6 wan update interface found" "${rc}"
+        f_exit
+    else
+        network_get_device adb_wandev4 "${adb_wanif4}" 2>/dev/null
+        network_get_device adb_wandev6 "${adb_wanif6}" 2>/dev/null
+        break
+    fi
 
     # get lan ip addresses
     #
@@ -240,10 +218,6 @@ f_envparse()
         f_log "no valid IPv4/IPv6 configuration for given logical LAN interface found (${adb_lanif}), please set 'adb_lanif' manually" "${rc}"
         f_exit
     fi
-
-    # read system ntp server names
-    #
-    adb_ntpsrv="$(uci get system.ntp.server 2>/dev/null)"
 }
 
 #################################################
@@ -267,13 +241,13 @@ f_envcheck()
         check="$(printf "${pkg_list}" | grep "^ip6tables -" 2>/dev/null)"
         if [ -z "${check}" ]
         then
-            f_log "package 'ip6tables' not found, IPv6 support wíll be disabled"
+            f_log "package 'ip6tables' not found, IPv6 support will be disabled"
             unset adb_wanif6
         else
             check="$(printf "${pkg_list}" | grep "^kmod-ipt-nat6 -" 2>/dev/null)"
             if [ -z "${check}" ]
             then
-                f_log "package 'kmod-ipt-nat6' not found, IPv6 support wíll be disabled"
+                f_log "package 'kmod-ipt-nat6' not found, IPv6 support will be disabled"
                 unset adb_wanif6
             fi
         fi
@@ -281,26 +255,22 @@ f_envcheck()
 
     # check ca-certificates package and set wget parms accordingly
     #
+    wget_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=5 --connect-timeout=5 --read-timeout=5"
     check="$(printf "${pkg_list}" | grep "^ca-certificates -" 2>/dev/null)"
     if [ -z "${check}" ]
     then
-        wget_parm="--no-config --no-check-certificate --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=5"
-    else
-        wget_parm="--no-config --quiet --tries=1 --no-cache --no-cookies --max-redirect=0 --dns-timeout=5"
+        wget_parm="${wget_parm} --no-check-certificate"
     fi
 
     # check adblock blacklist/whitelist configuration
     #
     if [ ! -r "${adb_blacklist}" ]
     then
-        rc=135
-        f_log "adblock blacklist not found (${adb_blacklist})" "${rc}"
-        f_exit
-    elif [ ! -r "${adb_whitelist}" ]
+        f_log "adblock blacklist not found, source will be disabled"
+    fi
+    if [ ! -r "${adb_whitelist}" ]
     then
-        rc=135
-        f_log "adblock whitelist not found (${adb_whitelist})" "${rc}"
-        f_exit
+        f_log "adblock whitelist not found, source will be disabled"
     fi
 
     # check adblock temp directory
@@ -310,26 +280,30 @@ f_envcheck()
         f_space "${adb_tmpdir}"
         if [ "${space_ok}" = "false" ]
         then
-            rc=140
-            f_log "not enough space in '${adb_tmpdir}', please supersize your temp directory" "${rc}"
-            f_exit
+            if [ $((av_space)) -le 2000 ]
+            then
+                rc=135
+                f_log "not enough free space in '${adb_tmpdir}' (avail. ${av_space} kb)" "${rc}"
+                f_exit
+            else
+                f_log "not enough free space to handle all adblock list sources at once in '${adb_tmpdir}' (avail. ${av_space} kb)"
+            fi
         fi
     else
-        rc=140
+        rc=135
         f_log "temp directory not found" "${rc}"
         f_exit
     fi
 
-    # check total and swap memory
+    # memory check
     #
-    mem_total="$(grep -F "MemTotal" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    mem_free="$(grep -F "MemFree" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    swap_total="$(grep -F "SwapTotal" "/proc/meminfo" 2>/dev/null | grep -o "[0-9]*" 2>/dev/null)"
-    if [ $((mem_total)) -le 64000 ] && [ $((swap_total)) -eq 0 ]
+    mem_total="$(awk '$1 ~ /^MemTotal/ {printf $2}' "/proc/meminfo" 2>/dev/null)"
+    mem_free="$(awk '$1 ~ /^MemFree/ {printf $2}' "/proc/meminfo" 2>/dev/null)"
+    mem_swap="$(awk '$1 ~ /^SwapTotal/ {printf $2}' "/proc/meminfo" 2>/dev/null)"
+    if [ $((mem_total)) -le 64000 ] && [ $((mem_swap)) -eq 0 ]
     then
-        adb_unique=0
-        f_log "not enough memory, overall sort/unique processing will be disabled"
-        f_log "please consider adding an external swap device to supersize your temp directory (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
+        mem_ok="false"
+        f_log "not enough free memory, overall sort processing will be disabled (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
     fi
 
     # check backup configuration
@@ -339,7 +313,7 @@ f_envcheck()
         f_space "${adb_backupdir}"
         if [ "${space_ok}" = "false" ]
         then
-            f_log "not enough space in '${adb_backupdir}', backup/restore will be disabled"
+            f_log "not enough free space in '${adb_backupdir}'(avail. ${av_space} kb), backup/restore will be disabled"
             backup_ok="false"
         else
             f_log "backup/restore will be enabled"
@@ -350,38 +324,18 @@ f_envcheck()
         f_log "backup/restore will be disabled"
     fi
 
-    # check log configuration
-    #
-    adb_logdir="${adb_logfile%/*}"
-    if [ -n "${adb_logdir}" ] && [ -d "${adb_logdir}" ]
-    then
-        f_space "${adb_logdir}"
-        if [ "${space_ok}" = "false" ]
-        then
-            f_log "not enough space in '${adb_logdir}', logging will be disabled"
-            log_ok="false"
-        else
-            f_log "logging will be enabled"
-            log_ok="true"
-        fi
-    else
-        log_ok="false"
-        f_log "logging will be disabled"
-    fi
-
     # check ipv4/iptables configuration
     #
     if [ -n "${adb_wanif4}" ] && [ -n "${adb_wandev4}" ]
     then
         f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-prerouting" "! -i ${adb_wandev4} -p tcp -d ${adb_nullipv4} -m multiport --dports 80,443 -j REDIRECT --to-ports ${adb_port}"
-        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p udp --dport 53 -j REDIRECT"
-        f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p tcp --dport 53 -j REDIRECT"
-        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adb-forward" "! -i ${adb_wandev4} -p udp -d ${adb_nullipv4} -j REJECT --reject-with icmp-port-unreachable"
-        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adb-forward" "! -i ${adb_wandev4} -p tcp -d ${adb_nullipv4} -j REJECT --reject-with tcp-reset"
-        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adb-forward" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-proto-unreachable"
-        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adb-output" "! -i ${adb_wandev4} -p udp -d ${adb_nullipv4} -j REJECT --reject-with icmp-port-unreachable"
-        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adb-output" "! -i ${adb_wandev4} -p tcp -d ${adb_nullipv4} -j REJECT --reject-with tcp-reset"
-        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adb-output" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-proto-unreachable"
+        f_firewall "IPv4" "filter" "A" "${adb_fwdchain_ipv4}" "adb-forward" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
+        f_firewall "IPv4" "filter" "A" "${adb_outchain_ipv4}" "adb-output" "! -i ${adb_wandev4} -d ${adb_nullipv4} -j REJECT --reject-with icmp-host-unreachable"
+        if [ $((adb_forcedns)) -eq 1 ]
+        then
+            f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p udp --dport 53 -j REDIRECT"
+            f_firewall "IPv4" "nat" "A" "${adb_prechain_ipv4}" "adb-dns" "! -i ${adb_wandev4} -p tcp --dport 53 -j REDIRECT"
+        fi
         if [ "${fw_done}" = "true" ]
         then
             f_log "created volatile IPv4 firewall ruleset"
@@ -394,14 +348,13 @@ f_envcheck()
     if [ -n "${adb_wanif6}" ] && [ -n "${adb_wandev6}" ]
     then
         f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-prerouting" "! -i ${adb_wandev6} -p tcp -d ${adb_nullipv6} -m multiport --dports 80,443 -j REDIRECT --to-ports ${adb_port}"
-        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p udp --dport 53 -j REDIRECT"
-        f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p tcp --dport 53 -j REDIRECT"
-        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adb-forward" "! -i ${adb_wandev6} -p udp -d ${adb_nullipv6} -j REJECT --reject-with icmp-port-unreachable"
-        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adb-forward" "! -i ${adb_wandev6} -p tcp -d ${adb_nullipv6} -j REJECT --reject-with tcp-reset"
-        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adb-forward" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp-proto-unreachable"
-        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adb-output" "! -i ${adb_wandev6} -p udp -d ${adb_nullipv6} -j REJECT --reject-with icmp-port-unreachable"
-        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adb-output" "! -i ${adb_wandev6} -p tcp -d ${adb_nullipv6} -j REJECT --reject-with tcp-reset"
-        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adb-output" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp-proto-unreachable"
+        f_firewall "IPv6" "filter" "A" "${adb_fwdchain_ipv6}" "adb-forward" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
+        f_firewall "IPv6" "filter" "A" "${adb_outchain_ipv6}" "adb-output" "! -i ${adb_wandev6} -d ${adb_nullipv6} -j REJECT --reject-with icmp6-addr-unreachable"
+        if [ $((adb_forcedns)) -eq 1 ]
+        then
+            f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p udp --dport 53 -j REDIRECT"
+            f_firewall "IPv6" "nat" "A" "${adb_prechain_ipv6}" "adb-dns" "! -i ${adb_wandev6} -p tcp --dport 53 -j REDIRECT"
+        fi
         if [ "${fw_done}" = "true" ]
         then
             f_log "created volatile IPv6 firewall ruleset"
@@ -416,100 +369,23 @@ f_envcheck()
     then
         if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
         then
-            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/adblock.html" -p "${adb_ipv4}:${adb_port}" -p "[${adb_ipv6}]:${adb_port}">/dev/null 2>&1
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/index.html" -p "${adb_ipv4}:${adb_port}" -p "[${adb_ipv6}]:${adb_port}">/dev/null 2>&1
             rc=${?}
-            if [ $((rc)) -eq 0 ]
-            then
-                f_log "created volatile uhttpd instance (${adb_ipv4}:${adb_port}, [${adb_ipv6}]:${adb_port})"
-            else
-                f_log "failed to initialize volatile uhttpd instance (${adb_ipv4}:${adb_port}, [${adb_ipv6}]:${adb_port})" "${rc}"
-                f_restore
-            fi
         elif [ -n "${adb_wanif4}" ]
         then
-            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/adblock.html" -p "${adb_ipv4}:${adb_port}" >/dev/null 2>&1
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/index.html" -p "${adb_ipv4}:${adb_port}" >/dev/null 2>&1
             rc=${?}
-            if [ $((rc)) -eq 0 ]
-            then
-                f_log "created volatile uhttpd instance (${adb_ipv4}:${adb_port})"
-            else
-                f_log "failed to initialize volatile uhttpd instance (${adb_ipv4}:${adb_port})" "${rc}"
-                f_restore
-            fi
         elif [ -n "${adb_wanif6}" ]
         then
-            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/adblock.html" -p "[${adb_ipv6}]:${adb_port}" >/dev/null 2>&1
+            uhttpd -h "/www/adblock" -k 5 -N 200 -t 0 -T 1 -D -S -E "/index.html" -p "[${adb_ipv6}]:${adb_port}" >/dev/null 2>&1
             rc=${?}
-            if [ $((rc)) -eq 0 ]
-            then
-                f_log "created volatile uhttpd instance ([${adb_ipv6}]:${adb_port})"
-            else
-                f_log "failed to initialize volatile uhttpd instance ([${adb_ipv6}]:${adb_port})" "${rc}"
-                f_restore
-            fi
         fi
-    fi
-
-    # wait for active wan update interface
-    #
-    while [ $((adb_cnt)) -le $((adb_maxloop)) ]
-    do
-        for interface in ${adb_wanif}
-        do
-            network_get_device adb_wandev "${interface}" 2>/dev/null
-            if [ -z "${adb_wandev}" ] || [ ! -d "/sys/class/net/${adb_wandev}" ]
-            then
-                if [ -n "${adb_wandev4}" ]
-                then
-                    adb_wandev="${adb_wandev4}"
-                else
-                    adb_wandev="${adb_wandev6}"
-                fi
-                if [ -z "${adb_wandev}" ] || [ ! -d "/sys/class/net/${adb_wandev}" ]
-                then
-                    rc=145
-                    f_log "no valid network device for given logical WAN interface found, please set 'adb_wanif' manually" "${rc}"
-                    f_restore
-                fi
-            fi
-            if [ -n "${adb_wandev4}" ]
-            then
-                rc="$(/bin/ping -c1 -W1 8.8.8.8 -I ${adb_wandev} >/dev/null 2>&1; printf $?)"
-            else
-                rc="$(/bin/ping -6 -c1 -W1 2001:4860:4860::8888 -I ${adb_wandev} >/dev/null 2>&1; printf $?)"
-            fi
-            if [ $((rc)) -eq 0  ]
-            then
-                f_log "get active wan update interface/device (${adb_wanif}/${adb_wandev})"
-                break 2
-            elif [ $((adb_cnt)) -eq $((adb_maxloop)) ]
-            then
-                rc=145
-                f_log "wan update interface/device not running (${adb_wanif}/${adb_wandev})" "${rc}"
-                f_restore
-            fi
-            adb_cnt=$((adb_cnt + 1))
-            sleep 1
-        done
-    done
-
-    # ntp time sync
-    #
-    if [ -n "${adb_ntpsrv}" ]
-    then
-        unset ntp_pool
-        for srv in ${adb_ntpsrv}
-        do
-            ntp_pool="${ntp_pool} -p ${srv}"
-        done
-        /usr/sbin/ntpd -nq ${ntp_pool} >/dev/null 2>&1
-        rc=${?}
         if [ $((rc)) -eq 0 ]
         then
-            f_log "get ntp time sync"
+            f_log "created volatile uhttpd instance"
         else
-            rc=0
-            f_log "ntp time sync failed"
+            f_log "failed to initialize volatile uhttpd instance" "${rc}"
+            f_restore
         fi
     fi
 
@@ -536,12 +412,13 @@ f_envcheck()
 #
 f_depend()
 {
+    local check
     local package="${1}"
 
     check="$(printf "${pkg_list}" | grep "^${package} -" 2>/dev/null)"
     if [ -z "${check}" ]
     then
-        rc=150
+        rc=140
         f_log "package '${package}' not found" "${rc}"
         f_exit
     fi
@@ -588,8 +465,8 @@ f_firewall()
     fi
 }
 
-###################################################
-# f_log: log messages to stdout, syslog and logfile
+##########################################
+# f_log: log messages to stdout and syslog
 #
 f_log()
 {
@@ -605,7 +482,7 @@ f_log()
         log_parm="-s"
     fi
 
-    # log to different output devices, set log class accordingly
+    # log to different output devices and set log class accordingly
     #
     if [ -n "${log_msg}" ]
     then
@@ -616,10 +493,6 @@ f_log()
             log_msg="${log_msg}${log_rc}"
         fi
         /usr/bin/logger ${log_parm} -t "adblock[${adb_pid}] ${class}" "${log_msg}"
-        if [ "${log_ok}" = "true" ]
-        then
-            printf "%s\n" "$(/bin/date "+%d.%m.%Y %H:%M:%S") adblock[${adb_pid}] ${class}: ${log_msg}" >> "${adb_logfile}"
-        fi
     fi
 }
 
@@ -634,7 +507,7 @@ f_space()
     #
     if [ -d "${mp}" ]
     then
-        av_space="$(df "${mp}" 2>/dev/null | tail -n1 2>/dev/null | awk '{print $4}')"
+        av_space="$(df "${mp}" 2>/dev/null | tail -n1 2>/dev/null | awk '{printf $4}')"
         if [ $((av_space)) -lt $((adb_minspace)) ]
         then
             space_ok="false"
@@ -689,20 +562,19 @@ f_restore()
     if [ -n "${restore_done}" ] || [ -n "${rm_done}" ]
     then
         /etc/init.d/dnsmasq restart >/dev/null 2>&1
-        sleep 2
+        sleep 1
         dns_status="$(ps 2>/dev/null | grep "[d]nsmasq" 2>/dev/null)"
         if [ -n "${dns_status}" ]
         then
             rc=0
+            adb_count="$(head -qn -3 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l)"
             if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
             then
-                adb_count="$(($(head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l) / 2))"
-            else
-                adb_count="$(head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l)"
+                adb_count="$((adb_count / 2))"
             fi
             f_log "adblock lists with overall ${adb_count} domains loaded"
         else
-            rc=160
+            rc=145
             f_log "dnsmasq restart failed, please check 'logread' output" "${rc}"
         fi
     fi
@@ -715,12 +587,12 @@ f_restore()
 #
 f_exit()
 {
-    local ipv4_prerouting
-    local ipv4_forward
-    local ipv4_output
-    local ipv6_prerouting
-    local ipv6_forward
-    local ipv6_output
+    local ipv4_prerouting=0
+    local ipv4_forward=0
+    local ipv4_output=0
+    local ipv6_prerouting=0
+    local ipv6_forward=0
+    local ipv6_output=0
     local iptv4="/usr/sbin/iptables"
     local iptv6="/usr/sbin/ip6tables"
 
@@ -741,34 +613,20 @@ f_exit()
     then
         if [ -n "${adb_wanif4}" ]
         then
-            ipv4_prerouting="$(${iptv4} -t nat -vnL | awk '$11 ~ /^adb-prerouting$/ {sum += $1} END {print sum}')"
-            ipv4_forward="$(${iptv4} -vnL | awk '$11 ~ /^adb-forward$/ {sum += $1} END {print sum}')"
-            ipv4_output="$(${iptv4} -vnL | awk '$11 ~ /^adb-output$/ {sum += $1} END {print sum}')"
+            ipv4_prerouting="$(${iptv4} -t nat -vnL | awk '$11 ~ /^adb-prerouting$/ {sum += $1} END {printf sum}')"
+            ipv4_forward="$(${iptv4} -vnL | awk '$11 ~ /^adb-forward$/ {sum += $1} END {printf sum}')"
+            ipv4_output="$(${iptv4} -vnL | awk '$11 ~ /^adb-output$/ {sum += $1} END {printf sum}')"
         fi
         if [ -n "${adb_wanif6}" ]
         then
-            ipv6_prerouting="$(${iptv6} -t nat -vnL | awk '$11 ~ /^adb-prerouting$/ {sum += $1} END {print sum}')"
-            ipv6_forward="$(${iptv6} -vnL | awk '$11 ~ /^adb-forward$/ {sum += $1} END {print sum}')"
-            ipv6_output="$(${iptv6} -vnL | awk '$11 ~ /^adb-output$/ {sum += $1} END {print sum}')"
-        fi
-        if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
-        then
-            f_log "adblock firewall statistics (IPv4/IPv6):"
-            f_log "${ipv4_prerouting}/${ipv6_prerouting} packets redirected in PREROUTING chain"
-            f_log "${ipv4_forward}/${ipv6_forward} packets rejected in FORWARD chain"
-            f_log "${ipv4_output}/${ipv6_output} packets rejected in OUTPUT chain"
-        elif [ -n "${adb_wanif4}" ]
-        then
-            f_log "adblock firewall statistics (IPv4):"
-            f_log "${ipv4_prerouting} packets redirected in PREROUTING chain"
-            f_log "${ipv4_forward} packets rejected in FORWARD chain"
-            f_log "${ipv4_output} packets rejected in OUTPUT chain"
-        elif [ -n "${adb_wanif6}" ]
-        then
-            f_log "${ipv6_prerouting} packets redirected in PREROUTING chain"
-            f_log "${ipv6_forward} packets rejected in FORWARD chain"
-            f_log "${ipv6_output} packets rejected in OUTPUT chain"
+            ipv6_prerouting="$(${iptv6} -t nat -vnL | awk '$10 ~ /^adb-prerouting$/ {sum += $1} END {printf sum}')"
+            ipv6_forward="$(${iptv6} -vnL | awk '$10 ~ /^adb-forward$/ {sum += $1} END {printf sum}')"
+            ipv6_output="$(${iptv6} -vnL | awk '$10 ~ /^adb-output$/ {sum += $1} END {printf sum}')"
         fi
+        f_log "adblock firewall statistics (IPv4/IPv6):"
+        f_log "${ipv4_prerouting}/${ipv6_prerouting} packets redirected in PREROUTING chain"
+        f_log "${ipv4_forward}/${ipv6_forward} packets rejected in FORWARD chain"
+        f_log "${ipv4_output}/${ipv6_output} packets rejected in OUTPUT chain"
         f_log "domain adblock processing finished successfully (${adb_scriptver}, ${openwrt_version}, $(/bin/date "+%d.%m.%Y %H:%M:%S"))"
     elif [ $((rc)) -gt 0 ]
     then
index 82e56f9589e34aa6942b5b207e8a4f0ef3ac88c9..32a48b7d382110a64f349f41c7490b1896bacb79 100755 (executable)
@@ -1,30 +1,12 @@
 #!/bin/sh
-#######################################################
-# ad/abuse domain blocking script for dnsmasq/openwrt #
-# written by Dirk Brenken (openwrt@brenken.org)       #
-#######################################################
-
-# LICENSE
-# ========
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# ad/abuse domain blocking script for dnsmasq/openwrt
+# written by Dirk Brenken (openwrt@brenken.org)
+
+# This is free software, licensed under the GNU General Public License v3.
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-###############
-# environment #
-###############
-
-# set the C locale, characters are single bytes, the charset is ASCII
-# speeds up things like sort, grep etc.
+# set the C locale
 #
 LC_ALL=C
 
@@ -45,7 +27,7 @@ fi
 # get current directory, script- and openwrt version
 #
 adb_scriptdir="${0%/*}"
-adb_scriptver="0.70.2"
+adb_scriptver="0.90.0"
 openwrt_version="$(cat /etc/openwrt_version 2>/dev/null)"
 
 # source in adblock function library
@@ -59,13 +41,9 @@ else
     exit ${rc}
 fi
 
-################
-# main program #
-################
-
 # call trap function on error signals (HUP, INT, QUIT, BUS, SEGV, TERM)
 #
-trap "rc=253; f_log 'error signal received/trapped' '${rc}'; f_exit" 1 2 3 10 11 15
+trap "rc=250; f_log 'error signal received/trapped' '${rc}'; f_exit" 1 2 3 10 11 15
 
 # load environment
 #
@@ -93,15 +71,13 @@ then
     shalla_file="${adb_tmpdir}/shallalist.txt"
     src_name="shalla"
     adb_dnsfile="${adb_dnsdir}/${adb_dnsprefix}.${src_name}"
-    list_time="$(grep -F "# last modified: " "${adb_dnsfile}" 2>/dev/null)"
-    list_time="${list_time/*: /}"
+    list_time="$(awk '$0 ~ /^# last modified/ {printf substr($0,18)}' "${adb_dnsfile}" 2>/dev/null)"
     f_log "=> (pre-)processing adblock source '${src_name}'"
 
     # only process shallalist archive with updated timestamp,
     # extract and merge only domains of selected shallalist categories
     #
-    shalla_time="$(${adb_fetch} ${wget_parm} --timeout=5 --server-response --spider "${adb_arc_shalla}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
-    shalla_time="${shalla_time/*: /}"
+    shalla_time="$(${adb_fetch} ${wget_parm} --server-response --spider "${adb_arc_shalla}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}' 2>/dev/null)"
     if [ -z "${shalla_time}" ]
     then
         shalla_time="$(date)"
@@ -109,7 +85,7 @@ then
     fi
     if [ -z "${list_time}" ] || [ "${list_time}" != "${shalla_time}" ]
     then
-        ${adb_fetch} ${wget_parm} --timeout="${adb_maxtime}" --output-document="${shalla_archive}" "${adb_arc_shalla}" 2>/dev/null
+        ${adb_fetch} ${wget_parm} --output-document="${shalla_archive}" "${adb_arc_shalla}" 2>/dev/null
         rc=${?}
         if [ $((rc)) -eq 0 ]
         then
@@ -162,8 +138,7 @@ do
     url="${src/\&ruleset=*/}"
     src_name="${src/*\&ruleset=rset_/}"
     adb_dnsfile="${adb_dnsdir}/${adb_dnsprefix}.${src_name}"
-    list_time="$(grep -F "# last modified: " "${adb_dnsfile}" 2>/dev/null)"
-    list_time="${list_time/*: /}"
+    list_time="$(awk '$0 ~ /^# last modified/ {printf substr($0,18)}' "${adb_dnsfile}" 2>/dev/null)"
     f_log "=> processing adblock source '${src_name}'"
 
     # prepare find statement with active adblock list sources
@@ -184,8 +159,7 @@ do
     then
         url_time="${shalla_time}"
     else
-        url_time="$(${adb_fetch} ${wget_parm} --timeout=5 --server-response --spider "${url}" 2>&1 | grep -F "Last-Modified: " 2>/dev/null | tr -d '\r' 2>/dev/null)"
-        url_time="${url_time/*: /}"
+        url_time="$(${adb_fetch} ${wget_parm} --server-response --spider "${url}" 2>&1 | awk '$0 ~ /Last-Modified/ {printf substr($0,18)}' 2>/dev/null)"
     fi
     if [ -z "${url_time}" ]
     then
@@ -203,7 +177,7 @@ do
             tmp_domains="$(cat "${shalla_file}" 2>/dev/null)"
             rc=${?}
         else
-            tmp_domains="$(${adb_fetch} ${wget_parm} --timeout="${adb_maxtime}" --output-document=- "${url}" 2>/dev/null)"
+            tmp_domains="$(${adb_fetch} ${wget_parm} --output-document=- "${url}" 2>/dev/null)"
             rc=${?}
         fi
     else
@@ -262,19 +236,11 @@ do
             adb_revsrclist="${adb_revsrclist} -o -name ${adb_dnsprefix}.${src_name}"
         fi
 
-        # write preliminary adblock list footer
+        # write preliminary footer
         #
         if [ $((rc)) -eq 0 ]
         then
-            if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
-            then
-                count="$(($(wc -l < "${adb_dnsdir}/${adb_dnsprefix}.${src_name}") / 2))"
-            else
-                count="$(wc -l < "${adb_dnsdir}/${adb_dnsprefix}.${src_name}")"
-            fi
-            printf "%s\n" "#------------------------------------------------------------------" >> "${adb_dnsfile}"
-            printf "%s\n" "# ${0##*/} (${adb_scriptver}) - ${count} ad/abuse domains blocked" >> "${adb_dnsfile}"
-            printf "%s\n" "# source: ${url}" >> "${adb_dnsfile}"
+            printf "%s\n" "#---------------------------------------------" >> "${adb_dnsfile}"
             printf "%s\n" "# last modified: ${url_time}" >> "${adb_dnsfile}"
             f_log "   domain merging finished"
         else
@@ -356,44 +322,35 @@ then
     fi
 fi
 
-# make separate adblock lists unique
+# make separate adblock lists entries unique
 #
-if [ $((adb_unique)) -eq 1 ]
+if [ "${mem_ok}" != "false" ]
 then
     if [ -n "${adb_revsrclist}" ]
     then
         f_log "remove duplicates in separate adblock lists"
 
-        # generate a temporary, unique overall list
+        # generate a temporary unique overall list
         #
-        head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | sort -u 2>/dev/null > "${adb_dnsdir}/tmp.overall"
+        head -qn -2 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | sort -u 2>/dev/null > "${adb_dnsdir}/tmp.overall"
 
         # loop through all separate lists, ordered by size (ascending)
         #
         for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null)
         do
-            # check separate lists vs. overall list,
-            # rewrite only duplicate entries back to separate lists
+            # check original separate list vs. temporary overall list,
+            # rewrite only duplicate entries back to temporary separate list
             #
             list="${list/*./}"
             sort "${adb_dnsdir}/tmp.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" 2>/dev/null | uniq -d 2>/dev/null > "${adb_dnsdir}/tmp.${list}"
 
-            # remove these entries from overall list,
-            # rewrite only unique entries back to overall list
+            # rewrite only unique entries back to temporary overall list
             #
             tmp_unique="$(sort "${adb_dnsdir}/tmp.overall" "${adb_dnsdir}/tmp.${list}" 2>/dev/null | uniq -u 2>/dev/null)"
             printf "%s\n" "${tmp_unique}" > "${adb_dnsdir}/tmp.overall"
 
-            # write final adblocklist footer
+            # write unique result back to original separate list (with list footer)
             #
-            if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
-            then
-                count="$(($(wc -l < "${adb_dnsdir}/tmp.${list}") / 2))"
-            else
-                count="$(wc -l < "${adb_dnsdir}/tmp.${list}")"
-            fi
-            printf "%s\n" "#------------------------------------------------------------------" >> "${adb_dnsdir}/tmp.${list}"
-            printf "%s\n" "# ${0##*/} (${adb_scriptver}) - ${count} ad/abuse domains blocked" >> "${adb_dnsdir}/tmp.${list}"
             tail -qn -2 "${adb_dnsdir}/$adb_dnsprefix.${list}" 2>/dev/null >> "${adb_dnsdir}/tmp.${list}"
             mv -f "${adb_dnsdir}/tmp.${list}" "${adb_dnsdir}/${adb_dnsprefix}.${list}" >/dev/null 2>&1
         done
@@ -401,28 +358,33 @@ then
     fi
 fi
 
-# get overall count
+# set separate list count & get overall count
 #
-if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
-then
-    adb_count="$(($(head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l) / 2))"
-else
-    adb_count="$(head -qn -4 "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null | wc -l)"
-fi
+for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."* 2>/dev/null)
+do
+    list="${list/*./}"
+    count="$(head -qn -2 "${adb_dnsdir}/${adb_dnsprefix}.${list}" | wc -l)"
+    if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
+    then
+        count=$((count / 2))
+    fi
+    printf "%s\n" "# ${0##*/} (${adb_scriptver}) - ${count} ad/abuse domains blocked" >> "${adb_dnsdir}/${adb_dnsprefix}.${list}"
+    adb_count=$((adb_count + count))
+done
 
 # restart dnsmasq with newly generated or deleted adblock lists,
 # check dnsmasq startup afterwards
 #
-if [ -n "${adb_revsrclist}" ] || [ -n "${rm_done}" ]
+if [ -n "${adb_revsrclist}" ] || [ -n "${rm_done}" ] || [ -n "${restore_done}" ]
 then
     /etc/init.d/dnsmasq restart >/dev/null 2>&1
-    sleep 2
+    sleep 1
     dns_status="$(ps 2>/dev/null | grep "[d]nsmasq" 2>/dev/null)"
     if [ -n "${dns_status}" ]
     then
         f_log "adblock lists with overall ${adb_count} domains loaded"
     else
-        rc=105
+        rc=100
         f_log "dnsmasq restart failed, please check 'logread' output" "${rc}"
         f_restore
     fi
index 5681d4c346c7d1fe5cf2765745749f7f1bcf4872..09d8cfa442abda79d084c282a0df4817fcdf3261 100644 (file)
@@ -1,59 +1,66 @@
 # adblock configuration, for further information
-# see '/etc/adblock/README.md'
+# see 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'
 
 config adblock 'global'
        option adb_enabled '1'
-       option adb_cfgver '0.70'
+       option adb_cfgver '0.90'
        option adb_blacklist '/etc/adblock/adblock.blacklist'
        option adb_whitelist '/etc/adblock/adblock.whitelist'
+       option adb_forcedns '1'
 
 config service 'backup'
        option enabled '0'
-       option adb_backupdir '/tmp'
-
-config service 'debuglog'
-       option enabled '0'
-       option adb_logfile '/tmp/adb_debug.log'
+       option adb_backupdir '/mnt'
 
 config source 'adaway'
        option enabled '1'
-       option adb_src_adaway 'https://adaway.org/hosts.txt&ruleset=rset_adaway'
+       option adb_src 'https://adaway.org/hosts.txt&ruleset=rset_adaway'
+       option adb_srcdesc 'focus on mobile ads, infrequent updates, approx. 400 entries'
 
 config source 'disconnect'
        option enabled '1'
-       option adb_src_disconnect 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect'
+       option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt&ruleset=rset_disconnect'
+       option adb_srcdesc 'mozilla driven content blocklist, numerous updates on the same day, approx. 6.500 entries'
 
 config source 'dshield'
        option enabled '0'
-       option adb_src_dshield 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield'
+       option adb_src 'http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=rset_dshield'
+       option adb_srcdesc 'broad blocklist for suspicious domains, daily updates, approx. 4.500 entries'
 
 config source 'feodo'
        option enabled '0'
-       option adb_src_feodo 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo'
+       option adb_src 'https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=rset_feodo'
+       option adb_srcdesc 'focus on feodo botnet domains, daily updates, approx. 0-10 entries'
 
 config source 'malware'
        option enabled '0'
-       option adb_src_malware 'https://mirror.cedia.org.ec/malwaredomains/justdomains&ruleset=rset_malware'
+       option adb_src 'https://mirror.cedia.org.ec/malwaredomains/justdomains&ruleset=rset_malware'
+       option adb_srcdesc 'broad blocklist for malware domains, daily updates, approx. 16.000 entries'
 
 config source 'malwarelist'
        option enabled '0'
-       option adb_src_malwarelist 'http://www.malwaredomainlist.com/hostslist/hosts.txt&ruleset=rset_malwarelist'
+       option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt&ruleset=rset_malwarelist'
+       option adb_srcdesc 'generic blocklist for malware domains, daily updates, approx. 1.500 entries'
 
 config source 'openphish'
        option enabled '0'
-       option adb_src_openphish 'https://openphish.com/feed.txt&ruleset=rset_openphish'
+       option adb_src 'https://openphish.com/feed.txt&ruleset=rset_openphish'
+       option adb_srcdesc 'focus on phishing domains, numerous updates on the same day, approx. 1.800 entries'
 
 config source 'palevo'
        option enabled '0'
-       option adb_src_palevo 'https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo'
+       option adb_src 'https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=rset_palevo'
+       option adb_srcdesc 'focus on palevo worm domains, daily updates, approx. 15 entries'
 
 config source 'ruadlist'
        option enabled '0'
-       option adb_src_ruadlist 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt&ruleset=rset_ruadlist'
+       option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt&ruleset=rset_ruadlist'
+       option adb_srcdesc 'focus on russian ad related domains plus generic easylist additions, weekly updates, approx. 2.000 entries'
 
 config source 'shalla'
        option enabled '0'
-       option adb_arc_shalla 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
+       option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
+       option adb_srcdesc 'broad blocklist subdivided in different categories (adv, costtraps, spyware, tracker and warez enabled by default), daily updates, approx. 32.000 entries'
        list adb_catlist 'adv'
        list adb_catlist 'costtraps'
        list adb_catlist 'spyware'
@@ -62,20 +69,25 @@ config source 'shalla'
 
 config source 'spam404'
        option enabled '0'
-       option adb_src_spam404 'http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404'
+       option adb_src 'http://spam404bl.com/spam404scamlist.txt&ruleset=rset_spam404'
+       option adb_srcdesc 'generic blocklist for suspicious domains, infrequent updates, approx. 5.000 entries'
 
 config source 'whocares'
        option enabled '0'
-       option adb_src_whocares 'http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares'
+       option adb_src 'http://someonewhocares.org/hosts/hosts&ruleset=rset_whocares'
+       option adb_srcdesc 'broad blocklist for suspicious domains, weekly updates, approx. 12.000 entries'
 
 config source 'winhelp'
        option enabled '0'
-       option adb_src_winhelp 'http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp'
+       option adb_src 'http://winhelp2002.mvps.org/hosts.txt&ruleset=rset_winhelp'
+       option adb_srcdesc 'broad blocklist for suspicious domains, infrequent updates, approx. 15.000 entries'
 
 config source 'yoyo'
        option enabled '1'
-       option adb_src_yoyo 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo'
+       option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=rset_yoyo'
+       option adb_srcdesc 'focus on ad related domains, weekly updates, approx. 2.500 entries'
 
 config source 'zeus'
        option enabled '0'
-       option adb_src_zeus 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus'
+       option adb_src 'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=rset_zeus'
+       option adb_srcdesc 'focus on zeus botnet domains, daily updates, approx. 440 entries'
diff --git a/net/adblock/files/adblock.hotplug b/net/adblock/files/adblock.hotplug
new file mode 100644 (file)
index 0000000..0aa6196
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+
+adb_pid="${$}"
+adb_pidfile="/var/run/adblock.pid"
+adb_logger="/usr/bin/logger"
+
+if [ -f "${adb_pidfile}" ] || [ "${ACTION}" != "ifup" ]
+then
+    exit 0
+fi
+
+. /lib/functions/network.sh
+network_find_wan adb_wanif4
+network_find_wan6 adb_wanif6
+
+if [ "${INTERFACE}" = "${adb_wanif4}" ] || [ "${INTERFACE}" = "${adb_wanif6}" ]
+then
+    /etc/init.d/adblock start
+    "${adb_logger}" -t "adblock[${adb_pid}] info " "adblock service started due to '${ACTION}' of '${INTERFACE}' interface"
+fi
index 96e56443701eb1dcc969dbd4f12aa1a6cf30e1a3..5352d0e16df1aa51f9f33ebdbf01162f7355db04 100755 (executable)
@@ -23,6 +23,11 @@ then
     exit 255
 fi
 
+boot()
+{
+    return 0
+}
+
 start()
 {
     eval "${adb_script}" ${bg_parm}
@@ -31,6 +36,7 @@ start()
 
 restart()
 {
+    stop
     start
 }
 
diff --git a/net/adblock/files/www/adblock/adblock.html b/net/adblock/files/www/adblock/adblock.html
deleted file mode 100644 (file)
index 29cdf58..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-    <head><meta charset="utf-8"></head>
-    <body>
-        <img src="/adblock.png" border="0" alt=""></img>
-    </body>
-</html>
index b72c55957c593cc597faeff05ba5b39389c9da52..33544bdfc36c5766c4df24e6576666d63361590a 100755 (executable)
@@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts
 PKG_VERSION:=2.6.2
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
index ca605dfbe1d0823daac3fb23d6344f1198253e63..438ba21d3f437606f8f9d51c661e97e834cba07a 100755 (executable)
@@ -721,9 +721,10 @@ do_transfer() {
                # force network/ip not supported
                [ -n "$__BINDIP" ] && \
                        write_log 14 "uclient-fetch: FORCE binding to specific address not supported"
-               # force ip version not supported
-               [ $force_ipversion -eq 1 ] && \
-                       write_log 14 "uclient-fetch: Force connecting to IPv4 or IPv6 addresses not supported"
+               # force ip version to use
+               if [ $force_ipversion -eq 1 ]; then
+                       [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6"       # force IPv4/IPv6
+               fi
                # https possibly not supported
                [ $use_https -eq 1 -a ! -f /lib/libustream-ssl.so ] && \
                        write_log 14 "uclient-fetch: no HTTPS support! Additional install one of ustream-ssl packages"
index 71f9d3a10e44fffff8cfe0c07125e70371f156ea..e961efd96ec13fb65518e7c896a3d705b17f40c4 100644 (file)
@@ -37,9 +37,7 @@
 "changeip.com"         "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]"
 "zoneedit.com"         "http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]"
 "free.editdns.net"     "http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]"
-
-# freedns.afraid.org is weird, you just need an update code, for which we use the password variable
-"freedns.afraid.org"   "http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]"
+"freedns.afraid.org"  "http://[USERNAME]:[PASSWORD]@freedns.afraid.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
 
 # DNS Max and resellers' update urls
 "dnsmax.com"   "http://update.dnsmax.com/update/?username=[USERNAME]&password=[PASSWORD]&resellerid=1&clientname=openwrt&clientversion=8.09&protocolversion=2.0&updatehostname=[DOMAIN]&ip=[IP]"
 
 # zzzz.io Free Dynamic DNS
 "zzzz.io"      "https://zzzz.io/api/v1/update/[DOMAIN]/?token=[PASSWORD]&ip=[IP]"      "Updated|No change"
+
+# dynu.com
+"dynu.com"  "http://api.dynu.com/nic/update?hostname=[DOMAIN]&myip=[IP]&username=[USERNAME]&password=[PASSWORD]"
index cfb1949c3288c6bb1dbfe8e48dfaa6ad258ed0c0..45e99361d9aefe2e77148df87c368864ce034bc8 100644 (file)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=36713
+PKG_SOURCE_VERSION:=36918
 PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_RELEASE:=2
 
 # ToDo:
 #  - break-out {peer,name,data}store for each backend
@@ -39,7 +39,7 @@ CONFIGURE_ARGS+= \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \
        $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
-       $(if $(CONFIG_PACKAGE_$(PKG_NAME)-experiments),--enable-experimental,--disable-experimental) \
+       --enable-experimental \
        --with-extractor=$(STAGING_DIR)/usr \
        --with-gnutls=$(STAGING_DIR)/usr \
        --with-libgnurl=$(STAGING_DIR)/usr \
@@ -198,12 +198,15 @@ PLUGIN_transport-http_server:=transport_http_server transport_https_server
 PLUGIN_transport-wlan:=transport_wlan
 LIBEXEC_transport-wlan:=helper-transport-wlan
 
-DEPENDS_experiments:=+libglpk +gnunet-sqlite
-BIN_experiments:=multicast rps
-LIB_experiments:=consensus dv env multicast psyc psycstore psycutil rps secretsharing social
-PLUGIN_experiments:=ats_mlp ats_ril namecache_flat namestore_flat psycstore_sqlite transport_dv
-LIBEXEC_experiments:=service-consensus service-dv service-evil-consensus service-multicast service-psyc service-psycstore service-rps service-secretsharing service-social
-CONF_experiments:=consensus dv multicast psyc psycstore rps secretsharing social
+DEPENDS_experiments:=+libglpk
+PLUGIN_experiments:=ats_mlp ats_ril
+LIBEXEC_experiments:=service-dht-whanau service-dht-xvine
+
+# BIN_dv:=dv
+LIB_dv:=dv
+PLUGIN_dv:=transport_dv
+LIBEXEC_dv:=service-dv
+CONF_dv:=dv
 
 DEPENDS_fs:=+gnunet-datastore +libextractor
 BIN_fs:=auto-share directory download download-manager.scm fs publish unindex search
@@ -227,14 +230,35 @@ PLUGIN_datastore:=datastore_heap
 LIBEXEC_datastore:=daemon-latency-logger service-datastore
 CONF_datastore:=datastore
 
+DEPENDS_flat:=+gnunet-gns
+PLUGIN_flat:=namecache_flat namestore_flat
+
 DEPENDS_mysql:=+gnunet-gns +gnunet-datastore +libmysqlclient
 LIB_mysql:=mysql
 PLUGIN_mysql:=datastore_mysql
 
 DEPENDS_pgsql:=+gnunet-gns +gnunet-datastore +libpq
-LIB_pgsql:=postgres
+LIB_pgsql:=postgres pq
 PLUGIN_pgsql:=datacache_postgres datastore_postgres namecache_postgres namestore_postgres
 
+DEPENDS_rest:=+gnunet-gns +jansson
+LIB_rest:=rest
+PLUGIN_rest:=rest_gns rest_identity rest_namestore
+LIBEXEC_rest:=rest-server
+CONF_rest:=rest
+
+BIN_rps:=rps
+LIB_rps:=rps
+LIBEXEC_rps:=service-rps
+CONF_rps:=rps
+
+DEPENDS_social:=+gnunet-sqlite
+BIN_social:=multicast
+LIB_social:=consensus multicast psyc psycstore psycutil secretsharing social
+PLUGIN_social:=psycstore_sqlite
+LIBEXEC_social:=service-consensus service-evil-consensus service-multicast service-psyc service-psycstore service-secretsharing service-social
+CONF_social:=consensus multicast psyc psycstore secretsharing social
+
 DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +libsqlite3
 PLUGIN_sqlite:=datacache_sqlite datastore_sqlite namecache_sqlite namestore_sqlite peerstore_sqlite
 
@@ -253,16 +277,21 @@ CONF_vpn:=exit pt vpn
 
 $(eval $(call BuildPackage,gnunet))
 $(eval $(call BuildComponent,conversation,conversation component,))
+$(eval $(call BuildComponent,datastore,data storage components,))
+$(eval $(call BuildComponent,dv,distance-vector routing component,))
 $(eval $(call BuildComponent,experiments,experimental components,))
+$(eval $(call BuildComponent,flat,flat storage backends,))
 $(eval $(call BuildComponent,fs,file-sharing components,))
 $(eval $(call BuildComponent,gns,name resolution components,y))
-$(eval $(call BuildComponent,datastore,storage components,))
+$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
+$(eval $(call BuildComponent,pgsql,PostgreSQL storage backends,))
+$(eval $(call BuildComponent,rest,REST interface,))
+$(eval $(call BuildComponent,rps,RPS routing component,))
+$(eval $(call BuildComponent,social,social components,))
+$(eval $(call BuildComponent,sqlite,libsqlite3 storage backends,y))
 $(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
 $(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
 $(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,))
 $(eval $(call BuildComponent,transport-wlan,WLAN transport,))
 $(eval $(call BuildComponent,utils,administration utililties,))
 $(eval $(call BuildComponent,vpn,vpn components,y))
-$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
-$(eval $(call BuildComponent,pgsql,PostgreSQL backends,))
-$(eval $(call BuildComponent,sqlite,libsqlite3 backends,y))
index a431cd9900b86d1fcb3f6368333577203b968c9c..3778609caf7ac5b1983df7ccbddf5757dd3aa206 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ngircd
-PKG_VERSION:=22.1
+PKG_VERSION:=23
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Claudio Leite <leitec@staticky.com>
 PKG_LICENSE:=GPL-2.0
@@ -18,7 +18,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
         http://ngircd.barton.de/pub/ngircd/ \
         ftp://ftp.berlios.de/pub/ngircd/
-PKG_MD5SUM:=586c4fef1fbb77dcbe723e9136ec08eb
+PKG_MD5SUM:=a58e0075fea60176fa7df092ca7e2c6a
 
 PKG_INSTALL:=1
 
index d17d1962e4ffcaa55fd4adf6a6169221ede3c8d4..f188cc07668592159f9cfe060033c73324bfa5e8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptpd
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/poptop
index f73eeea2375e18ceb091553d190161bb0c45c78d..7f825941f3e7bafa70c1e844878a9c1d986c9590 100644 (file)
@@ -11,7 +11,6 @@ nobsdcomp
 nodeflate
 #noproxyarp
 #nomppc
-mppe required,no40,no56,stateless
 require-mschap-v2
 refuse-chap
 refuse-mschap
index 354745f592f8995bfcd66e0a0bb494a9f7de56be..398ae9d36f1b865d4ba5cd80f5d7aec919b28547 100644 (file)
@@ -1,5 +1,4 @@
 #debug
-option /etc/ppp/options.pptpd
 speed 115200
 stimeout 10
 #localip & remoteip are not needed, ip management is done by pppd
index d1c50fd6faec62518c492346c2543f44ae8033bb..0d18aa1276f3c74fa64934ab283769891c549947 100644 (file)
@@ -7,6 +7,7 @@ USE_PROCD=1
 BIN=/usr/sbin/pptpd
 CONFIG=/var/etc/pptpd.conf
 CHAP_SECRETS=/var/etc/chap-secrets
+OPTIONS_PPTP=/var/etc/options.pptpd
 
 validate_login_section() {
        uci_validate_section pptpd login "${1}" \
@@ -18,7 +19,9 @@ validate_pptpd_section() {
        uci_validate_section pptpd service "${1}" \
                'enabled:uinteger' \
                'localip:string' \
-               'remoteip:string'
+               'remoteip:string' \
+               'mppe:list(string):required no40 no56 stateless' \
+               'logwtmp:uinteger'
 }
 
 setup_login() {
@@ -34,6 +37,8 @@ setup_login() {
 }
 
 setup_config() {
+       local enabled localip remoteip mppe
+
        validate_pptpd_section "${1}" || {
                echo "validation failed"
                return 1
@@ -43,9 +48,13 @@ setup_config() {
 
        mkdir -p /var/etc
        cp /etc/pptpd.conf $CONFIG
+       cp /etc/ppp/options.pptpd $OPTIONS_PPTP
 
        [ -n "$localip" ] && echo "localip  $localip" >> $CONFIG
        [ -n "$remoteip" ] && echo "remoteip  $remoteip" >> $CONFIG
+       [ "$logwtmp" -eq 1 ] && echo "logwtmp" >> $CONFIG
+
+       echo "mppe $(echo $mppe | sed -e 's/\s/,/g')" >> $OPTIONS_PPTP
 
        return 0
 }
@@ -58,6 +67,6 @@ start_service() {
        ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
 
        procd_open_instance
-       procd_set_param command $BIN -c $CONFIG
+       procd_set_param command $BIN -c $CONFIG -o $OPTIONS_PPTP
        procd_close_instance
 }
index 9796b46e7c5cd41e9359e6a6d2a5b6fce2526e31..dcf138aaee8d5c7183134994bf073e9b17ec231f 100644 (file)
@@ -21,9 +21,6 @@ PKG_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
-# uses libcom_err.la
-PKG_BUILD_DEP:=libext2fs
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/squid/Default
@@ -88,6 +85,7 @@ CONFIGURE_ARGS += \
        --disable-auth-basic \
        --disable-arch-native \
        --with-krb5-config=no \
+       --without-mit-krb5 \
        --without-libcap \
        --without-netfilter-conntrack
 
index 62836b3a09f31049e328952765dc00761163d967..909d7902c7c4f13dcb279d7fc739e651480baace 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2014 OpenWrt.org
+# Copyright (C) 2011-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pulseaudio
-PKG_VERSION:=7.1
+PKG_VERSION:=8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/
-PKG_MD5SUM:=9d0a9817b632cac8e3f3834d7eb1c99d
+PKG_MD5SUM:=8678442ba0bb4b4c33ac6f62542962df
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=GPL LICENSE
 
diff --git a/sound/pulseaudio/patches/002-xlocale.patch b/sound/pulseaudio/patches/002-xlocale.patch
deleted file mode 100644 (file)
index ef3ee91..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/pulsecore/core-util.c b/pulsecore/core-util.c
-index ba31221..824368a 100644
---- a/src/pulsecore/core-util.c
-+++ b/src/pulsecore/core-util.c
-@@ -54,7 +54,6 @@
- #ifdef HAVE_STRTOD_L
- #include <locale.h>
--#include <xlocale.h>
- #endif
- #ifdef HAVE_SCHED_H
index 81ba7b6984a859b19ced34fbfbb979d8d9bfc339..191647c51e17a54aabc82153f880654b9247a3ab 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014-2015 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairplay
-PKG_VERSION:=2015-09-29
+PKG_VERSION:=2016-01-01
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/juhovh/shairplay.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=498bc5bcdd305e04721f94a04b9f26a7da72673f
+PKG_SOURCE_VERSION:=ce80e005908f41d0e6fde1c4a21e9cb8ee54007b
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
index 3c5e3a595557fc24173b0e9c3ee465c2dd528c64..af9bd8448c06e5e90b15fdca9d553f87147ea599 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/shairplay.c
 +++ b/src/shairplay.c
-@@ -346,7 +346,7 @@ main(int argc, char *argv[])
+@@ -350,7 +350,7 @@ main(int argc, char *argv[])
        raop_cbs.audio_destroy = audio_destroy;
        raop_cbs.audio_set_volume = audio_set_volume;
  
index 8f60ec0e540c9c1ddff1d53c84f148d1eeac822b..a5fea30e83c29aa62355e635e68b08c2723b93b5 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,8 +9,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairport-sync
-PKG_VERSION:=2.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.8.0
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git
@@ -35,20 +35,21 @@ define Package/shairport-sync/default
   CATEGORY:=Sound
   TITLE:=AirPlay compatible audio player
   DEPENDS:=@AUDIO_SUPPORT +libpthread +alsa-lib +libconfig +libdaemon +libpopt
+  PROVIDES:=shairport-sync
   URL:=http://github.com/mikebrady/shairport-sync
 endef
 
 define Package/shairport-sync-openssl
   $(Package/shairport-sync/default)
   TITLE+= (openssl)
-  DEPENDS+= +PACKAGE_shairport-sync-openssl:libopenssl +libavahi-client +libsoxr
+  DEPENDS+= +libopenssl +libavahi-client +libsoxr
   VARIANT:=openssl
 endef
 
 define Package/shairport-sync-polarssl
   $(Package/shairport-sync/default)
   TITLE+= (polarssl)
-  DEPENDS+= +PACKAGE_shairport-sync-polarssl:libpolarssl +libavahi-client +libsoxr
+  DEPENDS+= +libpolarssl +libavahi-client +libsoxr
   VARIANT:=polarssl
   DEFAULT_VARIANT:=1
 endef
index 44ff097bf9906f8d007c57f3659a9d6f74de4aa3..5e8d2bc2af1a9a28aba02bef6976de4a0b194ee7 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-utils
-PKG_VERSION:=1.0.29
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
                http://alsa.cybermirror.org/utils/
-PKG_MD5SUM:=6b289bf874c4c9a63f4b3973093dd404
+PKG_MD5SUM:=b9d6102fbbd0b68040bb77023ed30c0c
 PKG_INSTALL:=1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
@@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/alsa-utils
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+alsa-lib +libncurses +libpthread
+  DEPENDS:=+alsa-lib +libncursesw +libpthread
   TITLE:=ALSA (Advanced Linux Sound Architecture) utilities
   URL:=http://www.alsa-project.org/
 endef
@@ -44,16 +44,12 @@ define Package/alsa-utils-tests
   DEPENDS:=+alsa-lib +libpthread
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
+CONFIGURE_ARGS+= \
                --disable-rpath \
                --disable-alsatest \
+               --disable-bat \
                --disable-xmlto \
-               , \
-               ac_cv_prog_ncurses5_config=no \
-               ac_cv_prog_ncursesw5_config=no \
-       )
-endef
+               --with-curses=ncursesw
 
 define Package/alsa-utils/install
        $(INSTALL_DIR) $(1)/usr/{s,}bin
index a304472d20be8ecddf776786f66f6d4afaf10075..4f187c84c648a38f7ef46f8e02f2186759529d17 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=cryptodev-linux
 PKG_VERSION:=1.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.gna.org/cryptodev-linux/
@@ -31,7 +31,7 @@ define KernelPackage/cryptodev
   URL:=http://cryptodev-linux.org/
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
-  DEPENDS:=+kmod-crypto-core +kmod-crypto-authenc +kmod-crypto-hash
+  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
   FILES:= \
                $(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD))
index adf8d19ea1cf8ceaf6d645f1e7b9c44ef137fc64..4f174ae3d475923ff50836d63c4650b34e850453 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013-2015 OpenWrt.org
+# Copyright (C) 2013-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dump1090
-PKG_VERSION:=2015-11-22
+PKG_VERSION:=2016-02-25
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/mutability/dump1090.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=497f88fe1c597652aca23c1035ddb55a9f6c274d
+PKG_SOURCE_VERSION:=214bc0e587fa70b7206c094e10e62c88bf387322
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
@@ -53,7 +53,8 @@ define Package/view1090/description
 endef
 
 MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS)"
+       CFLAGS="$(TARGET_CFLAGS)" \
+       UNAME=Linux
 
 define Package/dump1090/install
        $(INSTALL_DIR) $(1)/etc/init.d
index b9c433eea0995a9532789fc26d04e87a7e64e8e2..5854cb456973337d0e3556ee5f25b54c2382ba80 100644 (file)
@@ -11,7 +11,6 @@ config dump1090 main
        option raw '0'
        option net '1'
        option modeac '0'
-       option net_beast '0'
        option net_only '0'
        option net_bind_address ''
        option net_http_port '8080'
@@ -20,7 +19,6 @@ config dump1090 main
        option net_sbs_port ''
        option net_bi_port ''
        option net_bo_port ''
-       option net_fatsv_port ''
        option net_ro_size ''
        option net_ro_interval ''
        option net_heartbeat ''
@@ -34,13 +32,13 @@ config dump1090 main
        option no_fix '0'
        option no_crc_check '0'
        option phase_enhance '0'
-       option aggressive '0'
        option mlat '0'
        option stats '0'
        option stats_range '0'
        option stats_every ''
        option onlyaddr '0'
        option metric '0'
+       option hae '0'
        option snip ''
        option debug ''
        option ppm ''
index 23519dbc2f8f46bb32dd0f0689824fc6e1b306ea..fead29edb1573ad3571cbdb7700cb21db86cbaa0 100644 (file)
@@ -49,7 +49,6 @@ start_instance() {
        append_bool "$cfg" raw "--raw"
        append_bool "$cfg" net "--net"
        append_bool "$cfg" modeac "--modeac"
-       append_bool "$cfg" net_beast "--net-beast"
        append_bool "$cfg" net_only "--net-only"
        append_arg "$cfg" net_bind_address "--net-bind-address"
        append_arg "$cfg" net_http_port "--net-http-port"
@@ -58,7 +57,6 @@ start_instance() {
        append_arg "$cfg" net_sbs_port "--net-sbs-port"
        append_arg "$cfg" net_bi_port "--net-bi-port"
        append_arg "$cfg" net_bo_port "--net-bo-port"
-       append_arg "$cfg" net_fatsv_port "net-fatsv-port"
        append_arg "$cfg" net_ro_size "--net-ro-size"
        append_arg "$cfg" net_ro_interval "--net-ro-interval"
        append_arg "$cfg" net_heartbeat "--net-heartbeat"
@@ -72,13 +70,13 @@ start_instance() {
        append_bool "$cfg" no_fix "--no-fix"
        append_bool "$cfg" no_crc_check "--no-crc-check"
        append_bool "$cfg" phase_enhance "--phase-enhance"
-       append_bool "$cfg" aggressive "--aggressive"
        append_bool "$cfg" mlat "--mlat"
        append_bool "$cfg" stats "--stats"
        append_bool "$cfg" stats_range "--stats-range"
        append_arg "$cfg" stats_every "--stats-every"
        append_bool "$cfg" onlyaddr "--onlyaddr"
        append_bool "$cfg" metric "--metric"
+       append_bool "$cfg" hae "--hae"
        append_arg "$cfg" snip "--snip"
        append_arg "$cfg" debug "--debug"
        append_arg "$cfg" ppm "--ppm"
index 00a0531eca4d427d02a316157a50960ab50d2cb8..145e7408f8c108abfa8593f185cc593faf72084b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mmc-utils
-PKG_VERSION=2015-05-01-$(PKG_SOURCE_VERSION)
+PKG_VERSION=2016-02-23-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
-PKG_SOURCE_VERSION:=d0b46442b50794217e53b2455c1344c548d9d088
+PKG_SOURCE_VERSION:=4af1749d23503c25f692a60f23d295d16ddcfb61
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
 
index 8ae5c3cb6a5f1f59a8aa40638a1a7d8d43101e5a..c65d133d9dce119467821a534d433cfab71d7e34 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.5.3
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.nano-editor.org/dist/v2.5
-PKG_MD5SUM:=751ed96457017572bab15be18cb873ba
+PKG_MD5SUM:=a04d77611422ab4b6a7b489650c7a793
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
index 3cfc1252b89b6bb13b77260c7ba7fc9ff73443bd..b46244b80acf69b5eec9d9db008c14e2b86aad6d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
-PKG_VERSION:=3.4.0
+PKG_VERSION:=3.4.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
-PKG_MD5SUM:=46674cdbf2f72e4cfef75fea1b1ec5c8
+PKG_MD5SUM:=e901d17fcc6850747f43efde4de3452b
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile
new file mode 100644 (file)
index 0000000..a7806d1
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 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:=qemu
+PKG_VERSION:=2.4.1
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
+PKG_SOURCE_MD5SUM:=a895e93ec1dafc34bc64ed676f0d55a6
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/qemu-ga
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=QEMU Guest Agent
+  URL:=http://www.qemu.org
+  DEPENDS:=+glib2 +libpthread +libstdcpp +librt
+endef
+
+define Package/qemu-ga/description
+This package contains the QEMU Guest Agent daemon
+endef
+
+# QEMU configure script does not recognize these options
+CONFIGURE_ARGS:=$(filter-out   \
+       --target=%              \
+       --host=%                \
+       --build=%               \
+       --program-prefix=%      \
+       --program-suffix=%      \
+       --exec-prefix=%         \
+       --disable-nls           \
+       , $(CONFIGURE_ARGS))
+
+# Building qemu-ga alone does not require zlib
+CONFIGURE_ARGS+=                       \
+       --cross-prefix=$(TARGET_CROSS)  \
+       --host-cc=$(HOSTCC)             \
+       --target-list=''                \
+       --disable-zlib-test             \
+       --enable-guest-agent
+
+define Package/qemu-ga/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/qemu-ga $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports
+       $(INSTALL_BIN) ./files/virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/qemu-ga
+endef
+
+$(eval $(call BuildPackage,qemu-ga))
diff --git a/utils/qemu/files/qemu-ga.init b/utils/qemu/files/qemu-ga.init
new file mode 100755 (executable)
index 0000000..86c2b7e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2016 OpenWrt.org
+
+START=99
+USE_PROCD=1
+
+BIN=/usr/bin/qemu-ga
+
+start_service() {
+       procd_open_instance
+       procd_set_param command $BIN
+       procd_set_param respawn
+       procd_set_param stderr 1
+       procd_close_instance
+}
diff --git a/utils/qemu/files/virtio-ports.hotplug b/utils/qemu/files/virtio-ports.hotplug
new file mode 100755 (executable)
index 0000000..35919a5
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright (C) 2016 OpenWrt.org
+
+[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0
+
+syspath="/sys/$DEVPATH"
+name="$(cat "$syspath/name" 2>/dev/null)"
+[ -n "$name" ] || exit 0
+
+case "$ACTION" in
+       "add")
+               mkdir -p /dev/virtio-ports
+               ln -s "/dev/$DEVNAME" "/dev/virtio-ports/$name"
+               /etc/init.d/qemu-ga start
+               ;;
+       "del")
+               rm -f "/dev/virtio-ports/$name"
+               ;;
+esac
index f7b29a6db3b81df9e51511c5b54a05b14ad3e4ba..fd139700f638501620e2e7faa3ac8bbc072ead67 100644 (file)
@@ -16,7 +16,7 @@ PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/dangowrt/tracertools.git
-PKG_SOURCE_VERSION:=0428aa8585c915e64ce7cdb7c6f88cf2f5987b5f
+PKG_SOURCE_VERSION:=253e73fd379714239b51d5b0fd719b7c2d65f379
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
index 713ca8ead109f471a28416211d65cea484d5f86b..1b526746bc1c7671cbb89f12dca8f321abccb5b1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unrar
-PKG_VERSION:=5.3.8
+PKG_VERSION:=5.3.11
 PKG_RELEASE:=1
 
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.rarlab.com/rar
-PKG_MD5SUM:=9aa9643e817187519e358be292185f6f
+PKG_MD5SUM:=4a29cc1b47ced82db11e06090a95ed51
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=UnRAR
index dcbc7037c150924c087703a7e89648dba7327170..e1ed0687dee5c2bf3cec20c8885a9b431db54a95 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=zip
 PKG_REV:=30
 PKG_VERSION:=3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=@SF/infozip
@@ -48,8 +48,7 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \
                prefix="$(PKG_INSTALL_DIR)/usr" \
                CFLAGS="$(TARGET_CFLAGS)" \
-               CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \
-               LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \
+               CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX $(TARGET_LDFLAGS)" \
                IZ_BZIP2="no" \
                install
 endef