Merge pull request #8414 from ja-pa/libseccomp
authorNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Fri, 15 Mar 2019 15:22:35 +0000 (16:22 +0100)
committerGitHub <noreply@github.com>
Fri, 15 Mar 2019 15:22:35 +0000 (16:22 +0100)
libseccomp: update to version 2.4.0

59 files changed:
lang/php7/Makefile
lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch
lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch
lang/python/click-log/Makefile
lang/python/python-chardet/Makefile
lang/python/python-ply/Makefile
lang/python/python-requests/Makefile
lang/python/python-simplejson/Makefile
lang/python/python/Makefile
lang/python/python/patches/001-enable-zlib.patch
lang/python/python/patches/005-fix-bluetooth-support.patch
lang/python/python/patches/011-fix-ssl-build-use-have-npn.patch
lang/python/python/patches/017_lib2to3_fix_pyc_search.patch
lang/python/python3-bottle/Makefile
lang/python/python3/Makefile
lang/python/python3/patches/001-enable-zlib.patch
lang/python/python3/patches/003-do-not-run-distutils-tests.patch
lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch
lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch
lang/python/python3/patches/014-remove-platform-so-suffix.patch
lang/python/python3/patches/015-abort-on-failed-modules.patch
lang/python/python3/patches/016-adjust-config-paths.patch
lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch [new file with mode: 0644]
lang/python/python3/patches/021-openssl-deprecated.patch [new file with mode: 0644]
libs/czmq/Makefile
libs/dtc/Makefile
libs/dtc/patches/0001-use-cflags-from-build-system.patch [new file with mode: 0644]
libs/measurement-kit/Makefile
libs/measurement-kit/patches/001-remove-ca-download.patch [new file with mode: 0644]
libs/measurement-kit/patches/002-replace-curl-with-wget.patch [new file with mode: 0644]
mail/dovecot/Makefile
multimedia/minidlna/Makefile
multimedia/minidlna/patches/001-dont-build-po-files.patch [new file with mode: 0644]
multimedia/minidlna/patches/002-dont-build-po-files.patch [deleted file]
multimedia/minidlna/patches/002-mark_all_instances_of_magic_container_s_as_const.patch [new file with mode: 0644]
multimedia/minidlna/patches/003-wrap_container_definitions_into_a_structure.patch [new file with mode: 0644]
multimedia/minidlna/patches/004-reduce_duplication_in_sql_c.patch [new file with mode: 0644]
net/seafile-seahub/Makefile
net/shadowsocks-libev/Makefile
net/tgt/Makefile
net/tgt/files/etc/config/tgt [deleted file]
net/tgt/files/etc/init.d/tgt [deleted file]
net/tgt/files/tgt.config [new file with mode: 0644]
net/tgt/files/tgt.init [new file with mode: 0755]
net/tor/Makefile
net/tor/files/tor.init
net/unbound/Makefile
net/unbound/patches/200-openssl-deprecated.patch [deleted file]
net/unbound/patches/300-fix-ssl-err-log.patch [deleted file]
utils/bigclown/bigclown-control-tool/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-gateway/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-gateway/files/config [new file with mode: 0644]
utils/bigclown/bigclown-gateway/files/init [new file with mode: 0755]
utils/bigclown/bigclown-mqtt2influxdb/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-mqtt2influxdb/files/config.yml [new file with mode: 0644]
utils/bigclown/bigclown-mqtt2influxdb/files/init [new file with mode: 0644]
utils/btrfs-progs/Makefile
utils/fish/Makefile

index f096552762c1b6a47b134263a4b0f72fac90cdf6..bdc2ecd7d374e24b04529b10d2c19ccd538767c7 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.2.15
+PKG_VERSION:=7.2.16
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=75e90012faef700dffb29311f3d24fa25f1a5e0f70254a9b8d5c794e25e938ce
+PKG_HASH:=7d91ed3c1447c6358a3d53f84599ef854aca4c3622de7435e2df115bf196e482
 
 PKG_FIXUP:=libtool autoreconf
 PKG_BUILD_PARALLEL:=1
index 97fd734af9c73fadba7d59513589f5fadf4740c4..c9c7ffb44586f2af0b898a695a8513090f46d40d 100644 (file)
@@ -1,3 +1,10 @@
+From: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
+Date: Thu, 7 Mar 2019 19:36:30 +0000
+Subject: Add-support-for-use-of-the-system-timezone-database
+
+# License: MIT
+# http://opensource.org/licenses/MIT
+
 # License: MIT
 # http://opensource.org/licenses/MIT
 
@@ -5,6 +12,8 @@ Add support for use of the system timezone database, rather
 than embedding a copy.  Discussed upstream but was not desired.
 
 History:
+r17: adapt for autotool change in 7.2.16RC1
+r16: adapt for timelib 2017.06 (in 7.2.3RC1)
 r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
 r14: improve check for valid tz file
 r13: adapt for upstream changes to use PHP allocator
@@ -25,10 +34,39 @@ r4: added "System/Localtime" tzname which uses /etc/localtime
 r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
 r2: add filesystem trawl to set up name alias index
 r1: initial revision
+---
+ ext/date/config0.m4     |  13 ++
+ ext/date/lib/parse_tz.c | 536 +++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 546 insertions(+), 3 deletions(-)
 
-diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
---- ./ext/date/lib/parse_tz.c.systzdata        2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/parse_tz.c  2017-08-22 12:16:00.370298079 +0200
+diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
+index e464156..00dae8b 100644
+--- a/ext/date/config0.m4
++++ b/ext/date/config0.m4
+@@ -10,6 +10,19 @@ io.h
+ dnl Check for strtoll, atoll
+ AC_CHECK_FUNCS(strtoll atoll)
++PHP_ARG_WITH(system-tzdata, for use of system timezone data,
++[  --with-system-tzdata[=DIR]      to specify use of system timezone data],
++no, no)
++
++if test "$PHP_SYSTEM_TZDATA" != "no"; then
++   AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
++
++   if test "$PHP_SYSTEM_TZDATA" != "yes"; then
++      AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
++                         [Define for location of system timezone data])
++   fi
++fi
++
+ PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
+ timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
+                  lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
+diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
+index 960e528..501b09e 100644
+--- a/ext/date/lib/parse_tz.c
++++ b/ext/date/lib/parse_tz.c
 @@ -25,8 +25,21 @@
  #include "timelib.h"
  #include "timelib_private.h"
@@ -51,7 +89,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
  
  #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
  # if defined(__LITTLE_ENDIAN__)
-@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig
+@@ -67,6 +80,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
  {
        uint32_t version;
  
@@ -63,7 +101,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
        /* read ID */
        version = (*tzf)[3] - '0';
        *tzf += 4;
-@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
        }
  }
  
@@ -266,7 +304,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +    }
 +
 +    for (l = li[hash]; l; l = l->next) {
-+        if (strcasecmp(l->name, name) == 0)
++        if (timelib_strcasecmp(l->name, name) == 0)
 +            return l;
 +    }
 +
@@ -290,7 +328,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +{
 +        const timelib_tzdb_index_entry *alpha = first, *beta = second;
 +
-+        return strcasecmp(alpha->id, beta->id);
++        return timelib_strcasecmp(alpha->id, beta->id);
 +}
 +
 +
@@ -493,8 +531,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
  {
        int left = 0, right = tzdb->index_size - 1;
- #ifdef HAVE_SETLOCALE
-@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns
+@@ -400,9 +840,48 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
        return 0;
  }
  
@@ -542,8 +580,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +#endif
  }
  
- const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count)
-@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_
+ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
+@@ -414,7 +893,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
  int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
  {
        const unsigned char *tzf;
@@ -575,7 +613,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
  }
  
  static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
+@@ -456,12 +958,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
  timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
  {
        const unsigned char *tzf;
@@ -591,7 +629,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
                tmp = timelib_tzinfo_ctor(timezone);
  
                version = read_preamble(&tzf, tmp, &type);
-@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -484,6 +988,29 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
                        timelib_tzinfo_dtor(tmp);
                        return NULL;
                }
@@ -621,7 +659,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
                if (version == 2 || version == 3) {
                        if (!skip_64bit_preamble(&tzf, tmp)) {
                                /* 64 bit preamble is not in place */
-@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -501,6 +1028,9 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
                } else {
                        set_default_location_and_comments(&tzf, tmp);
                }
@@ -631,23 +669,3 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
        } else {
                *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
                tmp = NULL;
-diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4
---- ./ext/date/lib/timelib.m4.systzdata        2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/timelib.m4  2017-08-22 11:32:29.357799927 +0200
-@@ -81,3 +81,16 @@ io.h
- dnl Check for strtoll, atoll
- AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday)
-+
-+PHP_ARG_WITH(system-tzdata, for use of system timezone data,
-+[  --with-system-tzdata[=DIR]      to specify use of system timezone data],
-+no, no)
-+
-+if test "$PHP_SYSTEM_TZDATA" != "no"; then
-+   AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
-+
-+   if test "$PHP_SYSTEM_TZDATA" != "yes"; then
-+      AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
-+                         [Define for location of system timezone data])
-+   fi
-+fi
index 075a98354ce48d874e217138a95f0abe11cfe85f..bd181b81c532e100d08f6e5d1294a842e7409ba0 100644 (file)
    ])
  
    PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
---- a/ext/opcache/config.m4
-+++ b/ext/opcache/config.m4
-@@ -232,6 +232,10 @@ int main() {
- flock_type=unknown
- AC_MSG_CHECKING(for struct flock layout)
-+dnl cross-compiling for Linux
-+flock_type=linux
-+AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
-+
- if test "$flock_type" = "unknown"; then
- AC_TRY_RUN([
-   #include <fcntl.h>
index 652bdc56a23f028013cdc116ef8a8624a1497aba..3da043a5d95b50cb4b5e9e96a3e239a1c88f574f 100644 (file)
@@ -23,7 +23,7 @@ define Package/python3-click-log
   SUBMENU:=Python
   URL:=http://github.com/mitsuhiko/click
   TITLE:=python3-click-log
-  DEPENDS:=+PACKAGE_python3-click-log:python3-click
+  DEPENDS:=+python3-click
   VARIANT:=python3
 endef
 
index 24d164ada2a0879c56407d457b4e382753f5499a..bce37b3c2a77d77045607d0bdde7e65065f56742 100644 (file)
@@ -23,7 +23,7 @@ include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
-define Package/python-chardet/Defaults
+define Package/python-chardet/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
index a728e15c8bf73b6ec893c76ed47523a27e5160fc..aacaf15d5d0aa8ab655b070d2a702aaf2a408012 100644 (file)
@@ -44,7 +44,7 @@ endef
 
 define Package/python3-ply
 $(call Package/python-ply/Default)
-  DEPENDS:=+PACKAGE_python3-ply:python3-light
+  DEPENDS:=+python3-light
   VARIANT:=python3
 endef
 
index 926ac8c863949b3fb4ade6f408524cdc9cdb6064..36b7302d60c6638ac38db27158fdd36f3b61643c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-requests
 PKG_VERSION:=2.21.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Apache-2.0
 
 PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
@@ -25,11 +25,11 @@ include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
-define Package/python-requests/Defaults
+define Package/python-requests/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
+  MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
   URL:=http://python-requests.org/
 endef
 
@@ -38,7 +38,7 @@ $(call Package/python-requests/Default)
   TITLE:=HTTP library for Python
   DEPENDS:= \
          +PACKAGE_python-requests:python \
-         +PACKAGE_python-requests:chardet \
+         +PACKAGE_python-requests:python-chardet \
          +PACKAGE_python-requests:python-idna \
          +PACKAGE_python-requests:python-urllib3 \
          +PACKAGE_python-requests:python-certifi
@@ -49,11 +49,11 @@ define Package/python3-requests
 $(call Package/python-requests/Default)
   TITLE:=HTTP library for Python3
   DEPENDS:= \
-         +PACKAGE_python3-requests:python3-light  \
-         +PACKAGE_python3-requests:python3-chardet  \
-         +PACKAGE_python3-requests:python3-idna  \
-         +PACKAGE_python3-requests:python3-urllib3  \
-         +PACKAGE_python3-requests:python3-certifi
+         +python3-light  \
+         +python3-chardet  \
+         +python3-idna  \
+         +python3-urllib3  \
+         +python3-certifi
   VARIANT:=python3
 endef
 
index 3ba4a6764cf6fcfac9bbdfd0cd6536764e90be6b..11a66a117dd8c0ce12f76eae7e6dc71ffd5c3da4 100644 (file)
@@ -34,7 +34,7 @@ endef
 define Package/python-simplejson
 $(call Package/python-simplejson/Default)
   TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
-  DEPENDS:=+PACKAGE_python-simplejson:python-light
+  DEPENDS:=+python-light
   VARIANT:=python
 endef
 
index 36a6cc09f04581e57aaed8c0c6426923d94d734b..1dcba64800a5419fdc13edea6e46f6b8f57afd81 100644 (file)
@@ -20,6 +20,7 @@ PKG_HASH:=f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7
 
 PKG_LICENSE:=PSF
 PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+PKG_CPE_ID:=cpe:/a:python:python
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 
index e85b53c8d970dad829010585888074e86b23acf4..5802e99f64440ab988921bee5b7b35a3a644a284 100644 (file)
@@ -17,4 +17,4 @@ Subject: [PATCH] enable zlib
 +zlib zlibmodule.c -lz
  
  # Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
index 5e6e34b3afff8041352b80a0388a1e0e101725a2..6448f63f029242ee6639618760c9d55cb5d28b81 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -7077,7 +7077,7 @@ sys/param.h sys/poll.h sys/random.h sys/
+@@ -7084,7 +7084,7 @@ sys/param.h sys/poll.h sys/random.h sys/
  sys/termio.h sys/time.h \
  sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
@@ -9,7 +9,7 @@
  do :
    as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -7299,6 +7299,24 @@ fi
+@@ -7306,6 +7306,24 @@ fi
  fi
  
  
@@ -36,7 +36,7 @@
  do :
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1732,10 +1732,17 @@ sys/param.h sys/poll.h sys/random.h sys/
+@@ -1739,10 +1739,17 @@ sys/param.h sys/poll.h sys/random.h sys/
  sys/termio.h sys/time.h \
  sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
index b4981836032c4796fb159e493ae6fba07a7c03af..8a694a714c47f35e1aedd1cce160fed0b65c025e 100644 (file)
@@ -1,8 +1,6 @@
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index a96c419260..c80437eef7 100644
 --- a/Modules/_ssl.c
 +++ b/Modules/_ssl.c
-@@ -1586,7 +1586,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
+@@ -1590,7 +1590,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
      return PyUnicode_FromString(version);
  }
  
@@ -11,7 +9,7 @@ index a96c419260..c80437eef7 100644
  static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) {
      const unsigned char *out;
      unsigned int outlen;
-@@ -2114,7 +2114,7 @@ static PyMethodDef PySSLMethods[] = {
+@@ -2118,7 +2118,7 @@ static PyMethodDef PySSLMethods[] = {
       PySSL_peercert_doc},
      {"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS},
      {"version", (PyCFunction)PySSL_version, METH_NOARGS},
index 5972914bdb9f5914440471414022d3921f41efa2..6a1ef587c479d45c347760a2e763d842a3cb2e47 100644 (file)
@@ -1,8 +1,6 @@
-diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
-index 7841b99..1e0d3b3 100644
 --- a/Lib/lib2to3/refactor.py
 +++ b/Lib/lib2to3/refactor.py
-@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
+@@ -40,6 +40,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
              if remove_prefix:
                  name = name[4:]
              fix_names.append(name[:-3])
index 804a6de031f82b8f23837b5162d51fbfc9712e39..09cd6ee5691b1e070cb87bb083c064c5ac8135ff 100644 (file)
@@ -8,21 +8,25 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-bottle
-PKG_VERSION:=0.12.13
+PKG_VERSION:=0.12.16
 PKG_RELEASE:=1
 
 PKG_LICENSE:=MIT
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:bottlepy:bottle
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 PKG_SOURCE:=bottle-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/bottle
-PKG_HASH:=39b751aee0b167be8dffb63ca81b735bbf1dd0905b3bc42761efedee8f123355
-PKG_BUILD_DIR:=$(BUILD_DIR)/bottle-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PKG_HASH:=9c310da61e7df2b6ac257d8a90811899ccb3a9743e77e947101072a2e3186726
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-bottle-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
 
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
 define Package/python3-bottle
        SECTION:=lang
        CATEGORY:=Languages
@@ -30,6 +34,7 @@ define Package/python3-bottle
        TITLE:=Bottle is a fast, simple and lightweight WSGI micro web-framework for Python
        URL:=https://bottlepy.org
        DEPENDS:=+python3
+       VARIANT:=python3
 endef
 
 define Package/python3-bottle/description
@@ -38,15 +43,6 @@ define Package/python3-bottle/description
  Python Standard Library.
 endef
 
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/python3-bottle/install
-       $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
-       $(CP) $(PKG_BUILD_DIR)/bottle.py $(1)$(PYTHON3_PKG_DIR)
-endef
-
+$(eval $(call Py3Package,python3-bottle))
 $(eval $(call BuildPackage,python3-bottle))
+$(eval $(call BuildPackage,python3-bottle-src))
index 19129e05a5d3c9e32f26cc87f416b4f00e489126..feee2727013a69f69861d3da5a7c71a13dd9e2f2 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -23,6 +23,7 @@ PKG_HASH:=d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb
 
 PKG_LICENSE:=PSF
 PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+PKG_CPE_ID:=cpe:/a:python:python
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 
index 4ea3f54ada9181268c3cff0b84303cfb0cb7da05..287b147d14ec3fb3618fd8ea1587e9b8bfd6dc2e 100644 (file)
@@ -17,4 +17,4 @@ Subject: [PATCH] enable zlib
 +zlib zlibmodule.c -lz
  
  # Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
index bfcd8d62eb82141ead135d1152f5ae72771b807e..e4fabd43e5596452def8b5a7a144ec740f05dade 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1381,6 +1381,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1389,6 +1389,7 @@ libinstall:      build_all $(srcdir)/Modules/
        $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
                $(DESTDIR)$(LIBDEST); \
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@@ -8,7 +8,7 @@
        if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
                $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
                        $(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1416,6 +1417,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1424,6 +1425,7 @@ libinstall:      build_all $(srcdir)/Modules/
                $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
index 57fc9bc38e0c70aa2a41ddbe95f45f7328e3d85f..72d31be9ad3b7e9d4630fdebb3b02e3f0fb3655f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -537,16 +537,9 @@ class PyBuildExt(build_ext):
+@@ -542,16 +542,9 @@ class PyBuildExt(build_ext):
              os.unlink(tmpfile)
  
      def detect_modules(self):
index be5fcb9408f6b5e6a6ecd142cf672c87c39cb5ba..c5d11d232b5008fe1a32e76eb9b09d568c206e34 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -547,8 +547,9 @@ class PyBuildExt(build_ext):
+@@ -552,8 +552,9 @@ class PyBuildExt(build_ext):
          # directly since an inconsistently reproducible issue comes up where
          # the environment variable is not set even though the value were passed
          # into configure and stored in the Makefile (issue found on OS X 10.3).
index a3bdb33455c1b13e00c9326cd473f05ac9b44047..a31f4c7d26fa7ad71caac2f52a82da3458e2f4ee 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -743,6 +743,16 @@ regen-all: regen-opcode regen-opcode-tar
+@@ -751,6 +751,16 @@ regen-all: regen-opcode regen-opcode-tar
  ############################################################################
  # Special rules for object files
  
@@ -17,7 +17,7 @@
  Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(OBJECT_OBJS) \
                $(PYTHON_OBJS) \
-@@ -750,6 +760,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -758,6 +768,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(MODOBJS) \
                $(srcdir)/Modules/getbuildinfo.c
        $(CC) -c $(PY_CORE_CFLAGS) \
index de7badd998811cd3a49b0cfa18909a4d6622121d..b9d3cd1653b1de216a2a2decca16e2de73f1d796 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -14962,7 +14962,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
+@@ -15129,7 +15129,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
  $as_echo "$ABIFLAGS" >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
  $as_echo_n "checking SOABI... " >&6; }
@@ -11,7 +11,7 @@
  
 --- a/configure.ac
 +++ b/configure.ac
-@@ -4665,7 +4665,7 @@ AC_SUBST(SOABI)
+@@ -4719,7 +4719,7 @@ AC_SUBST(SOABI)
  AC_MSG_CHECKING(ABIFLAGS)
  AC_MSG_RESULT($ABIFLAGS)
  AC_MSG_CHECKING(SOABI)
index 9d75794186d7674c7e51e9d136e89e42d245b977..5150b77e882ac3a906b7e24a3e34e9764a6b8fb7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -354,6 +354,7 @@ class PyBuildExt(build_ext):
+@@ -359,6 +359,7 @@ class PyBuildExt(build_ext):
              print("Failed to build these modules:")
              print_three_column(failed)
              print()
index dbd15cda99f69681adc57ed1f7fd2e266751a2d2..3749a1590b24e3da36dab5ff3bba0266c7f13715 100644 (file)
@@ -20,7 +20,7 @@
          abi=sys.abiflags,
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1390,7 +1390,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1398,7 +1398,7 @@ libinstall:      build_all $(srcdir)/Modules/
                        esac; \
                done; \
        done
@@ -29,7 +29,7 @@
                $(DESTDIR)$(LIBDEST); \
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  ifeq (@COMPILE_ALL_TESTS@,yes)
-@@ -1525,7 +1525,7 @@ sharedinstall: sharedmods
+@@ -1543,7 +1543,7 @@ sharedinstall: sharedmods
                --install-scripts=$(BINDIR) \
                --install-platlib=$(DESTSHARED) \
                --root=$(DESTDIR)/
@@ -40,7 +40,7 @@
  # Here are a couple of targets for MacOSX again, to install a full
 --- a/configure
 +++ b/configure
-@@ -14981,7 +14981,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -15148,7 +15148,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
  $as_echo "$LDVERSION" >&6; }
  
  
@@ -51,7 +51,7 @@
    LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
 --- a/configure.ac
 +++ b/configure.ac
-@@ -4682,7 +4682,7 @@ AC_MSG_RESULT($LDVERSION)
+@@ -4736,7 +4736,7 @@ AC_MSG_RESULT($LDVERSION)
  
  dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
  AC_SUBST(PY_ENABLE_SHARED)
diff --git a/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch b/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch
new file mode 100644 (file)
index 0000000..cf33488
--- /dev/null
@@ -0,0 +1,193 @@
+From 991f0176e188227647bf4c993d8da81cf794b3ae Mon Sep 17 00:00:00 2001
+From: Christian Heimes <christian@python.org>
+Date: Sun, 25 Feb 2018 20:03:07 +0100
+Subject: [PATCH] bpo-30008: SSL module: emulate tls methods
+
+OpenSSL 1.1 compatility: emulate version specific TLS methods with
+SSL_CTX_set_min/max_proto_version().
+---
+ .../2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst       |   4 +
+ Modules/_ssl.c                                     | 134 ++++++++++++++++-----
+ 2 files changed, 108 insertions(+), 30 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst
+
+--- /dev/null
++++ b/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst
+@@ -0,0 +1,4 @@
++The ssl module no longer uses function that are deprecated since OpenSSL
++1.1.0. The version specific TLS methods are emulated with TLS_method() plus
++SSL_CTX_set_min/max_proto_version(). Pseudo random numbers are generated
++with RAND_bytes().
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -45,14 +45,6 @@ static PySocketModule_APIObject PySocketModule;
+ #include <sys/poll.h>
+ #endif
+-/* Don't warn about deprecated functions */
+-#ifdef __GNUC__
+-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+-#endif
+-#ifdef __clang__
+-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+-#endif
+-
+ /* Include OpenSSL header files */
+ #include "openssl/rsa.h"
+ #include "openssl/crypto.h"
+@@ -201,6 +193,7 @@ static void _PySSLFixErrno(void) {
+ #ifndef PY_OPENSSL_1_1_API
+ /* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
++#define ASN1_STRING_get0_data ASN1_STRING_data
+ #define TLS_method SSLv23_method
+ #define TLS_client_method SSLv23_client_method
+ #define TLS_server_method SSLv23_server_method
+@@ -1319,8 +1312,9 @@ _get_peer_alt_names (X509 *certificate) {
+                     goto fail;
+                 }
+                 PyTuple_SET_ITEM(t, 0, v);
+-                v = PyUnicode_FromStringAndSize((char *)ASN1_STRING_data(as),
+-                                                ASN1_STRING_length(as));
++                v = PyUnicode_FromStringAndSize(
++                    (char *)ASN1_STRING_get0_data(as),
++                    ASN1_STRING_length(as));
+                 if (v == NULL) {
+                     Py_DECREF(t);
+                     goto fail;
+@@ -2959,38 +2953,118 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
+ #endif
+     PySSL_BEGIN_ALLOW_THREADS
+-    if (proto_version == PY_SSL_VERSION_TLS1)
++    switch (proto_version) {
++#if OPENSSL_VERSION_NUMBER <= 0x10100000L
++    /* OpenSSL < 1.1.0 or not LibreSSL
++    * Use old-style methods for OpenSSL 1.0.2
++    */
++#if defined(SSL2_VERSION) && !defined(OPENSSL_NO_SSL2)
++    case PY_SSL_VERSION_SSL2:
++        ctx = SSL_CTX_new(SSLv2_method());
++        break;
++#endif
++#if defined(SSL3_VERSION) && !defined(OPENSSL_NO_SSL3)
++    case PY_SSL_VERSION_SSL3:
++        ctx = SSL_CTX_new(SSLv3_method());
++        break;
++#endif
++#if defined(TLS1_VERSION) && !defined(OPENSSL_NO_TLS1)
++    case PY_SSL_VERSION_TLS1:
+         ctx = SSL_CTX_new(TLSv1_method());
+-#if HAVE_TLSv1_2
+-    else if (proto_version == PY_SSL_VERSION_TLS1_1)
++        break;
++#endif
++#if defined(TLS1_1_VERSION) && !defined(OPENSSL_NO_TLS1_1)
++    case PY_SSL_VERSION_TLS1_1:
+         ctx = SSL_CTX_new(TLSv1_1_method());
+-    else if (proto_version == PY_SSL_VERSION_TLS1_2)
++        break;
++#endif
++#if defined(TLS1_2_VERSION) && !defined(OPENSSL_NO_TLS1_2)
++    case PY_SSL_VERSION_TLS1_2:
+         ctx = SSL_CTX_new(TLSv1_2_method());
++        break;
+ #endif
+-#ifndef OPENSSL_NO_SSL3
+-    else if (proto_version == PY_SSL_VERSION_SSL3)
+-        ctx = SSL_CTX_new(SSLv3_method());
++#else
++    /* OpenSSL >= 1.1 or LibreSSL
++    * create context with TLS_method for all protocols
++    * no SSLv2_method in OpenSSL 1.1.
++    */
++#if defined(SSL3_VERSION) && !defined(OPENSSL_NO_SSL3)
++    case PY_SSL_VERSION_SSL3:
++        ctx = SSL_CTX_new(TLS_method());
++        if (ctx != NULL) {
++            /* OpenSSL 1.1.0 sets SSL_OP_NO_SSLv3 for TLS_method by default */
++            SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv3);
++            if (!SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION))
++                result = -2;
++            if (!SSL_CTX_set_max_proto_version(ctx, SSL3_VERSION))
++                result = -2;
++        }
++        break;
+ #endif
+-#ifndef OPENSSL_NO_SSL2
+-    else if (proto_version == PY_SSL_VERSION_SSL2)
+-        ctx = SSL_CTX_new(SSLv2_method());
++#if defined(TLS1_VERSION) && !defined(OPENSSL_NO_TLS1)
++    case PY_SSL_VERSION_TLS1:
++        ctx = SSL_CTX_new(TLS_method());
++        if (ctx != NULL) {
++            SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1);
++            if (!SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION))
++                result = -2;
++            if (!SSL_CTX_set_max_proto_version(ctx, TLS1_VERSION))
++                result = -2;
++        }
++        break;
++#endif
++#if defined(TLS1_1_VERSION) && !defined(OPENSSL_NO_TLS1_1)
++    case PY_SSL_VERSION_TLS1_1:
++        ctx = SSL_CTX_new(TLS_method());
++        if (ctx != NULL) {
++            SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_1);
++            if (!SSL_CTX_set_min_proto_version(ctx, TLS1_1_VERSION))
++                result = -2;
++            if (!SSL_CTX_set_max_proto_version(ctx, TLS1_1_VERSION))
++                result = -2;
++        }
++        break;
++#endif
++#if defined(TLS1_2_VERSION) && !defined(OPENSSL_NO_TLS1_2)
++    case PY_SSL_VERSION_TLS1_2:
++        ctx = SSL_CTX_new(TLS_method());
++        if (ctx != NULL) {
++            SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_2);
++            if (!SSL_CTX_set_min_proto_version(ctx, TLS1_2_VERSION))
++                result = -2;
++            if (!SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION))
++                result = -2;
++        }
++        break;
+ #endif
+-    else if (proto_version == PY_SSL_VERSION_TLS) /* SSLv23 */
++#endif /* OpenSSL >= 1.1 */
++    case PY_SSL_VERSION_TLS:
++        /* SSLv23 */
+         ctx = SSL_CTX_new(TLS_method());
+-    else if (proto_version == PY_SSL_VERSION_TLS_CLIENT)
++        break;
++    case PY_SSL_VERSION_TLS_CLIENT:
+         ctx = SSL_CTX_new(TLS_client_method());
+-    else if (proto_version == PY_SSL_VERSION_TLS_SERVER)
++        break;
++    case PY_SSL_VERSION_TLS_SERVER:
+         ctx = SSL_CTX_new(TLS_server_method());
+-    else
+-        proto_version = -1;
++        break;
++    default:
++        result = -1;
++        break;
++    }
+     PySSL_END_ALLOW_THREADS
+-    if (proto_version == -1) {
++    if (result == -1) {
+         PyErr_SetString(PyExc_ValueError,
+                         "invalid protocol version");
+         return NULL;
+     }
+-    if (ctx == NULL) {
++    else if (result == -2) {
++        PyErr_SetString(PyExc_ValueError,
++                        "protocol configuration error");
++        return NULL;
++    }
++    else if (ctx == NULL) {
+         _setSSLError(NULL, 0, __FILE__, __LINE__);
+         return NULL;
+     }
diff --git a/lang/python/python3/patches/021-openssl-deprecated.patch b/lang/python/python3/patches/021-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..c3650ff
--- /dev/null
@@ -0,0 +1,117 @@
+--- a/Modules/_hashopenssl.c
++++ b/Modules/_hashopenssl.c
+@@ -1071,7 +1071,7 @@ PyInit__hashlib(void)
+ {
+     PyObject *m, *openssl_md_meth_names;
+-#ifndef OPENSSL_VERSION_1_1
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+     /* Load all digest algorithms and initialize cpuid */
+     OPENSSL_add_all_algorithms_noconf();
+     ERR_load_crypto_strings();
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -47,6 +47,7 @@ static PySocketModule_APIObject PySocketModule;
+ /* Include OpenSSL header files */
+ #include "openssl/rsa.h"
++#include "openssl/dh.h"
+ #include "openssl/crypto.h"
+ #include "openssl/x509.h"
+ #include "openssl/x509v3.h"
+@@ -128,13 +129,13 @@ static void _PySSLFixErrno(void) {
+ #include "_ssl_data.h"
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+-#  define OPENSSL_VERSION_1_1 1
+-#  define PY_OPENSSL_1_1_API 1
++# define OPENSSL_VERSION_1_1 1
++# define PY_OPENSSL_1_1_API 1
+ #endif
+ /* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
+ #if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
+-#  define PY_OPENSSL_1_1_API 1
++# define PY_OPENSSL_1_1_API 1
+ #endif
+ /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
+@@ -197,6 +198,11 @@ static void _PySSLFixErrno(void) {
+ #define TLS_method SSLv23_method
+ #define TLS_client_method SSLv23_client_method
+ #define TLS_server_method SSLv23_server_method
++#define X509_getm_notBefore X509_get_notBefore
++#define X509_getm_notAfter X509_get_notAfter
++#define OpenSSL_version_num SSLeay
++#define OpenSSL_version SSLeay_version
++#define OPENSSL_VERSION SSLEAY_VERSION
+ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
+ {
+@@ -859,7 +865,7 @@ _ssl_configure_hostname(PySSLSocket *self, const char* server_hostname)
+                 goto error;
+             }
+         } else {
+-            if (!X509_VERIFY_PARAM_set1_ip(param, ASN1_STRING_data(ip),
++            if (!X509_VERIFY_PARAM_set1_ip(param, ASN1_STRING_get0_data(ip),
+                                            ASN1_STRING_length(ip))) {
+                 _setSSLError(NULL, 0, __FILE__, __LINE__);
+                 goto error;
+@@ -1624,7 +1630,7 @@ _decode_certificate(X509 *certificate) {
+     Py_DECREF(sn_obj);
+     (void) BIO_reset(biobuf);
+-    notBefore = X509_get_notBefore(certificate);
++    notBefore = X509_getm_notBefore(certificate);
+     ASN1_TIME_print(biobuf, notBefore);
+     len = BIO_gets(biobuf, buf, sizeof(buf)-1);
+     if (len < 0) {
+@@ -1641,7 +1647,7 @@ _decode_certificate(X509 *certificate) {
+     Py_DECREF(pnotBefore);
+     (void) BIO_reset(biobuf);
+-    notAfter = X509_get_notAfter(certificate);
++    notAfter = X509_getm_notAfter(certificate);
+     ASN1_TIME_print(biobuf, notAfter);
+     len = BIO_gets(biobuf, buf, sizeof(buf)-1);
+     if (len < 0) {
+@@ -3152,7 +3158,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
+        conservative and assume it wasn't fixed until release. We do this check
+        at runtime to avoid problems from the dynamic linker.
+        See #25672 for more on this. */
+-    libver = SSLeay();
++    libver = OpenSSL_version_num();
+     if (!(libver >= 0x10001000UL && libver < 0x1000108fUL) &&
+         !(libver >= 0x10000000UL && libver < 0x100000dfUL)) {
+         SSL_CTX_set_mode(self->ctx, SSL_MODE_RELEASE_BUFFERS);
+@@ -5159,7 +5175,7 @@ PySSL_RAND(int len, int pseudo)
+     if (bytes == NULL)
+         return NULL;
+     if (pseudo) {
+-        ok = RAND_pseudo_bytes((unsigned char*)PyBytes_AS_STRING(bytes), len);
++        ok = RAND_bytes((unsigned char*)PyBytes_AS_STRING(bytes), len);
+         if (ok == 0 || ok == 1)
+             return Py_BuildValue("NO", bytes, ok == 1 ? Py_True : Py_False);
+     }
+@@ -6176,10 +6192,10 @@ PyInit__ssl(void)
+         return NULL;
+     /* OpenSSL version */
+-    /* SSLeay() gives us the version of the library linked against,
++    /* OpenSSL_version_num() gives us the version of the library linked against,
+        which could be different from the headers version.
+     */
+-    libver = SSLeay();
++    libver = OpenSSL_version_num();
+     r = PyLong_FromUnsignedLong(libver);
+     if (r == NULL)
+         return NULL;
+@@ -6199,7 +6205,7 @@ PyInit__ssl(void)
+     r = Py_BuildValue("IIIII", major, minor, fix, patch, status);
+     if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_INFO", r))
+         return NULL;
+-    r = PyUnicode_FromString(SSLeay_version(SSLEAY_VERSION));
++    r = PyUnicode_FromString(OpenSSL_version(OPENSSL_VERSION));
+     if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION", r))
+         return NULL;
index c5f73037c6b2a01b5bb78afd1324e5a5a0532625..8268856c489434756357f5c9a233ec50773cf412 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=czmq
-PKG_VERSION:=4.1.1
+PKG_VERSION:=4.2.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=f00ff419881dc2a05d0686c8467cd89b4882677fc56f31c0e2cc81c134cbb0c0
+PKG_HASH:=cfab29c2b3cc8a845749758a51e1dd5f5160c1ef57e2a41ea96e4c2dcc8feceb
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -29,7 +29,7 @@ define Package/czmq
        SECTION:=libs
        CATEGORY:=Libraries
        TITLE:=CZMQ
-       DEPENDS:=+libzmq +libuuid +libpcre +liblz4
+       DEPENDS:=+libzmq +libuuid +libpcre +libmicrohttpd +liblz4 +libcurl
 endef
 
 define Package/czmq/description
index 39c87c6c7d0a18e533caed3a1ad4ec20321a6c31..a4093e1e51ef313089dac68322629f4664dbebe3 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dtc
-PKG_VERSION:=1.4.7
+PKG_VERSION:=1.5.0
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7
+PKG_HASH:=c672e443c9f7e39f5a7c8e602da6777f9ad55ad70de87de300a43828c8050172
 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=GPL
@@ -74,14 +74,12 @@ define Package/libfdt/install
        $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
 endef
 
-TARGET_CFLAGS += \
-       $(FPIC)
-
 # NO_PYTHON is for disabling pylibfdt
 MAKE_FLAGS += \
        PREFIX= \
        NO_PYTHON=1 \
-       CFLAGS="$(TARGET_CFLAGS)"
+       NO_VALGRIND=1 \
+       NO_YAML=1 \
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/dtc/patches/0001-use-cflags-from-build-system.patch b/libs/dtc/patches/0001-use-cflags-from-build-system.patch
new file mode 100644 (file)
index 0000000..15d47c5
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/Makefile.orig    2019-03-15 03:55:48.407966162 +0000
++++ b/Makefile 2019-03-15 03:56:01.320976021 +0000
+@@ -15,10 +15,10 @@ EXTRAVERSION =
+ LOCAL_VERSION =
+ CONFIG_LOCALVERSION =
+-CPPFLAGS = -I libfdt -I .
++CPPFLAGS += -I libfdt -I .
+ WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+       -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
+-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
++CFLAGS += $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
+ BISON = bison
+ LEX = flex
index 56a5d53e65afa6d4c2823836f3faf55d4130f18e..568979dee0d4dd5116d80666fbcc953643048e6b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=measurement-kit
-PKG_VERSION:=0.9.2
+PKG_VERSION:=0.9.4
 PKG_RELEASE=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=b8e2624ba496c47164f3c15d35bb5e0a6c0f5e03b603e60ed9769156b1c7d82d
+PKG_HASH:=d095c28fa7283c546dcf513b9c60156f5ab7690f33f2de346372cd5328072d36
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
diff --git a/libs/measurement-kit/patches/001-remove-ca-download.patch b/libs/measurement-kit/patches/001-remove-ca-download.patch
new file mode 100644 (file)
index 0000000..b3b9ecc
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -3,7 +3,7 @@
+ set -e
+ export LC_ALL=C  # Stable sorting regardless of the locale
+
+-. script/autogen.d/ca-bundle
++#. script/autogen.d/ca-bundle
+ . script/autogen.d/geoip
+
+ no_geoip=0
+@@ -82,7 +82,7 @@ gen_executables noinst_PROGRAMS example
+ gen_executables ALL_TESTS test libtest_main.la                   >> include.am
+
+ if [ $no_geoip -ne 1 ]; then
+-    autogen_get_ca_bundle
++    #autogen_get_ca_bundle
+     autogen_get_geoip
+ fi
+
diff --git a/libs/measurement-kit/patches/002-replace-curl-with-wget.patch b/libs/measurement-kit/patches/002-replace-curl-with-wget.patch
new file mode 100644 (file)
index 0000000..c7d7112
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/script/autogen.d/geoip
++++ b/script/autogen.d/geoip
+@@ -5,13 +5,13 @@ autogen_get_geoip() {
+     echo "* Fetching geoip databases"
+     base=https://geolite.maxmind.com/download/geoip/database
+     if [ ! -f "country.mmdb" ]; then
+-        curl -fsSLO $base/GeoLite2-Country.tar.gz
++        command -v curl && curl -fsSLO $base/GeoLite2-Country.tar.gz || wget $base/GeoLite2-Country.tar.gz
+         tar -xf GeoLite2-Country.tar.gz
+         mv GeoLite2-Country_20??????/GeoLite2-Country.mmdb country.mmdb
+         rm -rf GeoLite2-Country_20??????
+     fi
+     if [ ! -f "asn.mmdb" ]; then
+-        curl -fsSLO $base/GeoLite2-ASN.tar.gz
++        command -v curl && curl -fsSLO $base/GeoLite2-ASN.tar.gz || wget $base/GeoLite2-ASN.tar.gz
+         tar -xf GeoLite2-ASN.tar.gz
+         mv GeoLite2-ASN_20??????/GeoLite2-ASN.mmdb asn.mmdb
+         rm -rf GeoLite2-ASN_20??????
index 5d7bb771393a28c505a4784417ee0a1eb2112731..1a0896244d4babb02e24aeb6f9a6fce3dfedc665 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.4.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.3.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=b8873e2ce5c33e58963bb7a8d2ff8427c09dbfdd63e13a0b0f4502864043aa07
+PKG_HASH:=bfe112ec6d11f7d6c6f7f0440e3b6e2c840c15cec1e99466b5495765d54aaaff
 PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
index a74ad2e43e2151ba435d1757a6190a89a690c71e..f11375bb4c0e33957210ba4dd82492c644eef07e 100644 (file)
@@ -8,12 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minidlna
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=4
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=@SF/minidlna
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=67388ba23ab0c7033557a32084804f796aa2a796db7bb2b770fb76ac2a742eec
+PKG_SOURCE_URL=git://minidlna.git.sourceforge.net/gitroot/minidlna/minidlna
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2018-04-10
+PKG_SOURCE_VERSION:=799e6cf505ec470b2bf0ae4118143380aa16b837
+PKG_MIRROR_HASH:=67cc817e671de99e5a3f5ed237f89e22470f1de94819bcaba86c0ba821104af5
 
 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
diff --git a/multimedia/minidlna/patches/001-dont-build-po-files.patch b/multimedia/minidlna/patches/001-dont-build-po-files.patch
new file mode 100644 (file)
index 0000000..7d9f6b6
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -17,7 +17,7 @@
+ AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
+-SUBDIRS=po
++SUBDIRS=
+ sbin_PROGRAMS = minidlnad
+ check_PROGRAMS = testupnpdescgen
+--- a/configure.ac
++++ b/configure.ac
+@@ -647,6 +647,8 @@ case "$target_os" in
+ esac
+-AC_OUTPUT([ po/Makefile.in
+-Makefile
+-])
++# AC_OUTPUT([ po/Makefile.in
++# Makefile
++# ])
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
diff --git a/multimedia/minidlna/patches/002-dont-build-po-files.patch b/multimedia/minidlna/patches/002-dont-build-po-files.patch
deleted file mode 100644 (file)
index 3862324..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -17,7 +17,7 @@
- AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
--SUBDIRS=po
-+SUBDIRS=
- sbin_PROGRAMS = minidlnad
- check_PROGRAMS = testupnpdescgen
---- a/configure.ac
-+++ b/configure.ac
-@@ -644,6 +644,8 @@ case "$target_os" in
- esac
--AC_OUTPUT([ po/Makefile.in
--Makefile
--])
-+# AC_OUTPUT([ po/Makefile.in
-+# Makefile
-+# ])
-+AC_CONFIG_FILES([Makefile])
-+AC_OUTPUT
diff --git a/multimedia/minidlna/patches/002-mark_all_instances_of_magic_container_s_as_const.patch b/multimedia/minidlna/patches/002-mark_all_instances_of_magic_container_s_as_const.patch
new file mode 100644 (file)
index 0000000..cb1f2fe
--- /dev/null
@@ -0,0 +1,125 @@
+From d297624e533d6d4274c750e3769749c3d7f121c8 Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sat, 15 Dec 2018 16:34:30 +0100
+Subject: [PATCH] Mark all instances of magic_container_s as const
+
+---
+ containers.c | 38 +++++++++++++++++++-------------------
+ containers.h |  6 +++---
+ scanner.c    |  2 +-
+ upnpsoap.c   |  6 +++---
+ 4 files changed, 26 insertions(+), 26 deletions(-)
+
+--- a/containers.c
++++ b/containers.c
+@@ -25,23 +25,23 @@
+ #define NINETY_DAYS "7776000"
+-const char *music_id = MUSIC_ID;
+-const char *music_all_id = MUSIC_ALL_ID;
+-const char *music_genre_id = MUSIC_GENRE_ID;
+-const char *music_artist_id = MUSIC_ARTIST_ID;
+-const char *music_album_id = MUSIC_ALBUM_ID;
+-const char *music_plist_id = MUSIC_PLIST_ID;
+-const char *music_dir_id = MUSIC_DIR_ID;
+-const char *video_id = VIDEO_ID;
+-const char *video_all_id = VIDEO_ALL_ID;
+-const char *video_dir_id = VIDEO_DIR_ID;
+-const char *image_id = IMAGE_ID;
+-const char *image_all_id = IMAGE_ALL_ID;
+-const char *image_date_id = IMAGE_DATE_ID;
+-const char *image_camera_id = IMAGE_CAMERA_ID;
+-const char *image_dir_id = IMAGE_DIR_ID;
++static const char *music_id = MUSIC_ID;
++static const char *music_all_id = MUSIC_ALL_ID;
++static const char *music_genre_id = MUSIC_GENRE_ID;
++static const char *music_artist_id = MUSIC_ARTIST_ID;
++static const char *music_album_id = MUSIC_ALBUM_ID;
++static const char *music_plist_id = MUSIC_PLIST_ID;
++static const char *music_dir_id = MUSIC_DIR_ID;
++static const char *video_id = VIDEO_ID;
++static const char *video_all_id = VIDEO_ALL_ID;
++static const char *video_dir_id = VIDEO_DIR_ID;
++static const char *image_id = IMAGE_ID;
++static const char *image_all_id = IMAGE_ALL_ID;
++static const char *image_date_id = IMAGE_DATE_ID;
++static const char *image_camera_id = IMAGE_CAMERA_ID;
++static const char *image_dir_id = IMAGE_DIR_ID;
+-struct magic_container_s magic_containers[] =
++const struct magic_container_s magic_containers[] =
+ {
+       /* Alternate root container */
+       { NULL,
+@@ -124,7 +124,7 @@ struct magic_container_s magic_container
+       { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 }
+ };
+-struct magic_container_s *
++const struct magic_container_s *
+ in_magic_container(const char *id, int flags, const char **real_id)
+ {
+       size_t len;
+@@ -154,7 +154,7 @@ in_magic_container(const char *id, int f
+       return NULL;
+ }
+-struct magic_container_s *
++const struct magic_container_s *
+ check_magic_container(const char *id, int flags)
+ {
+       int i;
+--- a/containers.h
++++ b/containers.h
+@@ -30,7 +30,7 @@ struct magic_container_s {
+       int required_flags;
+ };
+-extern struct magic_container_s magic_containers[];
++extern const struct magic_container_s magic_containers[];
+-struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id);
+-struct magic_container_s *check_magic_container(const char *id, int flags);
++const struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id);
++const struct magic_container_s *check_magic_container(const char *id, int flags);
+--- a/scanner.c
++++ b/scanner.c
+@@ -587,7 +587,7 @@ CreateDatabase(void)
+       }
+       for( i=0; magic_containers[i].objectid_match; i++ )
+       {
+-              struct magic_container_s *magic = &magic_containers[i];
++              const struct magic_container_s *magic = &magic_containers[i];
+               if (!magic->name)
+                       continue;
+               if( sql_get_int_field(db, "SELECT 1 from OBJECTS where OBJECT_ID = '%s'", magic->objectid_match) == 0 )
+--- a/upnpsoap.c
++++ b/upnpsoap.c
+@@ -800,7 +800,7 @@ add_res(char *size, char *duration, char
+ }
+ static int
+-get_child_count(const char *object, struct magic_container_s *magic)
++get_child_count(const char *object, const struct magic_container_s *magic)
+ {
+       int ret;
+@@ -1292,7 +1292,7 @@ BrowseContentDirectory(struct upnphttp *
+                       "<Result>"
+                       "&lt;DIDL-Lite"
+                       CONTENT_DIRECTORY_SCHEMAS;
+-      struct magic_container_s *magic;
++      const struct magic_container_s *magic;
+       char *zErrMsg = NULL;
+       char *sql, *ptr;
+       struct Response args;
+@@ -1807,7 +1807,7 @@ SearchContentDirectory(struct upnphttp *
+                       "<Result>"
+                       "&lt;DIDL-Lite"
+                       CONTENT_DIRECTORY_SCHEMAS;
+-      struct magic_container_s *magic;
++      const struct magic_container_s *magic;
+       char *zErrMsg = NULL;
+       char *sql, *ptr;
+       struct Response args;
diff --git a/multimedia/minidlna/patches/003-wrap_container_definitions_into_a_structure.patch b/multimedia/minidlna/patches/003-wrap_container_definitions_into_a_structure.patch
new file mode 100644 (file)
index 0000000..a4fb39b
--- /dev/null
@@ -0,0 +1,118 @@
+From e0065b8343bc963a89556449e00f1d20086cc1f1 Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sat, 15 Dec 2018 16:26:37 +0100
+Subject: [PATCH] Wrap container definitions into a structure
+
+---
+ containers.c | 25 +++++++++++++++++++++++++
+ containers.h |  8 ++++++++
+ scanner.c    | 33 ++++++---------------------------
+ 3 files changed, 39 insertions(+), 27 deletions(-)
+
+--- a/containers.c
++++ b/containers.c
+@@ -23,6 +23,31 @@
+ #include "containers.h"
+ #include "log.h"
++const struct container_s containers[] = {
++              { "0","-1",   "root" },
++              { MUSIC_ID, "0", "Music" },
++              { MUSIC_ALL_ID, MUSIC_ID, "All Music" },
++              { MUSIC_GENRE_ID, MUSIC_ID, "Genre" },
++              { MUSIC_ARTIST_ID, MUSIC_ID, "Artist" },
++              { MUSIC_ALBUM_ID, MUSIC_ID, "Album" },
++              { MUSIC_DIR_ID, MUSIC_ID, "Folders" },
++              { MUSIC_PLIST_ID, MUSIC_ID, "Playlists" },
++
++              { VIDEO_ID, "0", "Video" },
++              { VIDEO_ALL_ID, VIDEO_ID, "All Video" },
++              { VIDEO_DIR_ID, VIDEO_ID, "Folders" },
++
++              { IMAGE_ID, "0", "Pictures" },
++              { IMAGE_ALL_ID, IMAGE_ID, "All Pictures" },
++              { IMAGE_DATE_ID, IMAGE_ID, "Date Taken" },
++              { IMAGE_CAMERA_ID, IMAGE_ID, "Camera" },
++              { IMAGE_DIR_ID, IMAGE_ID, "Folders" },
++
++              { BROWSEDIR_ID, "0", "Browse Folders" },
++
++              { 0, 0, 0 }
++};
++
+ #define NINETY_DAYS "7776000"
+ static const char *music_id = MUSIC_ID;
+--- a/containers.h
++++ b/containers.h
+@@ -16,6 +16,14 @@
+  * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
+  */
++struct container_s {
++      const char *object_id;
++      const char *parent_id;
++      const char *name;
++};
++
++extern const struct container_s containers[];
++
+ struct magic_container_s {
+       const char *name;
+       const char *objectid_match;
+--- a/scanner.c
++++ b/scanner.c
+@@ -529,30 +529,7 @@ insert_file(const char *name, const char
+ int
+ CreateDatabase(void)
+ {
+-      int ret, i;
+-      const char *containers[] = { "0","-1",   "root",
+-                              MUSIC_ID, "0", _("Music"),
+-                          MUSIC_ALL_ID, MUSIC_ID, _("All Music"),
+-                        MUSIC_GENRE_ID, MUSIC_ID, _("Genre"),
+-                       MUSIC_ARTIST_ID, MUSIC_ID, _("Artist"),
+-                        MUSIC_ALBUM_ID, MUSIC_ID, _("Album"),
+-                          MUSIC_DIR_ID, MUSIC_ID, _("Folders"),
+-                        MUSIC_PLIST_ID, MUSIC_ID, _("Playlists"),
+-
+-                              VIDEO_ID, "0", _("Video"),
+-                          VIDEO_ALL_ID, VIDEO_ID, _("All Video"),
+-                          VIDEO_DIR_ID, VIDEO_ID, _("Folders"),
+-
+-                              IMAGE_ID, "0", _("Pictures"),
+-                          IMAGE_ALL_ID, IMAGE_ID, _("All Pictures"),
+-                         IMAGE_DATE_ID, IMAGE_ID, _("Date Taken"),
+-                       IMAGE_CAMERA_ID, IMAGE_ID, _("Camera"),
+-                          IMAGE_DIR_ID, IMAGE_ID, _("Folders"),
+-
+-                          BROWSEDIR_ID, "0", _("Browse Folders"),
+-                      0 };
+-
+-      ret = sql_exec(db, create_objectTable_sqlite);
++      int ret = sql_exec(db, create_objectTable_sqlite);
+       if( ret != SQLITE_OK )
+               goto sql_failed;
+       ret = sql_exec(db, create_detailTable_sqlite);
+@@ -576,16 +553,18 @@ CreateDatabase(void)
+       ret = sql_exec(db, "INSERT into SETTINGS values ('UPDATE_ID', '0')");
+       if( ret != SQLITE_OK )
+               goto sql_failed;
+-      for( i=0; containers[i]; i=i+3 )
++      for( int i=0; containers[i].name; ++i )
+       {
++              const struct container_s *c = &containers[i];
++              const char *name = _(c->name);
+               ret = sql_exec(db, "INSERT into OBJECTS (OBJECT_ID, PARENT_ID, DETAIL_ID, CLASS, NAME)"
+                                  " values "
+                                  "('%s', '%s', %lld, 'container.storageFolder', '%q')",
+-                                 containers[i], containers[i+1], GetFolderMetadata(containers[i+2], NULL, NULL, NULL, 0), containers[i+2]);
++                                 c->object_id, c->parent_id, GetFolderMetadata(name, NULL, NULL, NULL, 0), name);
+               if( ret != SQLITE_OK )
+                       goto sql_failed;
+       }
+-      for( i=0; magic_containers[i].objectid_match; i++ )
++      for( int i=0; magic_containers[i].objectid_match; i++ )
+       {
+               const struct magic_container_s *magic = &magic_containers[i];
+               if (!magic->name)
diff --git a/multimedia/minidlna/patches/004-reduce_duplication_in_sql_c.patch b/multimedia/minidlna/patches/004-reduce_duplication_in_sql_c.patch
new file mode 100644 (file)
index 0000000..c237217
--- /dev/null
@@ -0,0 +1,192 @@
+From be9de8b2e0864b46498496af9ffdc31c0e7b764a Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sun, 16 Dec 2018 14:21:58 +0100
+Subject: [PATCH] Reduce duplication in sql.c
+
+---
+ sql.c | 166 ++++++++++++++++++++--------------------------------------
+ 1 file changed, 58 insertions(+), 108 deletions(-)
+
+--- a/sql.c
++++ b/sql.c
+@@ -65,122 +65,72 @@ sql_get_table(sqlite3 *db, const char *s
+       return ret;
+ }
++#define sql_get_field(type, column_get_fn) \
++              va_list         ap;\
++              int             counter, result;\
++              char            *sql;\
++              type            ret;\
++              sqlite3_stmt    *stmt;\
++              \
++              va_start(ap, fmt);\
++              sql = sqlite3_vmprintf(fmt, ap);\
++              va_end(ap);\
++\
++              /*DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); */ \
++\
++              switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))\
++              {\
++                      case SQLITE_OK:\
++                              break;\
++                      default:\
++                              DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);\
++                              sqlite3_free(sql);\
++                              return -1;\
++              }\
++\
++              for (counter = 0;\
++                   ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;\
++                   counter++) {\
++                      /* While SQLITE_BUSY has a built in timeout,\
++                       * SQLITE_LOCKED does not, so sleep */\
++                      if (result == SQLITE_LOCKED)\
++                              sleep(1);\
++              }\
++\
++              switch (result)\
++              {\
++                      case SQLITE_DONE:\
++                              /* no rows returned */\
++                              ret = 0;\
++                              break;\
++                      case SQLITE_ROW:\
++                              if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)\
++                              {\
++                                      ret = 0;\
++                                      break;\
++                              }\
++                              ret = column_get_fn(stmt, 0);\
++                              break;\
++                      default:\
++                              DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);\
++                              ret = -1;\
++                              break;\
++              }\
++              sqlite3_free(sql);\
++              sqlite3_finalize(stmt);\
++\
++              return ret;
++
+ int
+ sql_get_int_field(sqlite3 *db, const char *fmt, ...)
+ {
+-      va_list         ap;
+-      int             counter, result;
+-      char            *sql;
+-      int             ret;
+-      sqlite3_stmt    *stmt;
+-      
+-      va_start(ap, fmt);
+-      sql = sqlite3_vmprintf(fmt, ap);
+-      va_end(ap);
+-
+-      //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
+-
+-      switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
+-      {
+-              case SQLITE_OK:
+-                      break;
+-              default:
+-                      DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
+-                      sqlite3_free(sql);
+-                      return -1;
+-      }
+-
+-      for (counter = 0;
+-           ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;
+-           counter++) {
+-              /* While SQLITE_BUSY has a built in timeout,
+-               * SQLITE_LOCKED does not, so sleep */
+-              if (result == SQLITE_LOCKED)
+-                      sleep(1);
+-      }
+-
+-      switch (result)
+-      {
+-              case SQLITE_DONE:
+-                      /* no rows returned */
+-                      ret = 0;
+-                      break;
+-              case SQLITE_ROW:
+-                      if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)
+-                      {
+-                              ret = 0;
+-                              break;
+-                      }
+-                      ret = sqlite3_column_int(stmt, 0);
+-                      break;
+-              default:
+-                      DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);
+-                      ret = -1;
+-                      break;
+-      }
+-      sqlite3_free(sql);
+-      sqlite3_finalize(stmt);
+-
+-      return ret;
++      sql_get_field(int, sqlite3_column_int)
+ }
+ int64_t
+ sql_get_int64_field(sqlite3 *db, const char *fmt, ...)
+ {
+-      va_list         ap;
+-      int             counter, result;
+-      char            *sql;
+-      int64_t         ret;
+-      sqlite3_stmt    *stmt;
+-      
+-      va_start(ap, fmt);
+-      sql = sqlite3_vmprintf(fmt, ap);
+-      va_end(ap);
+-
+-      //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
+-
+-      switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
+-      {
+-              case SQLITE_OK:
+-                      break;
+-              default:
+-                      DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
+-                      sqlite3_free(sql);
+-                      return -1;
+-      }
+-
+-      for (counter = 0;
+-           ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;
+-           counter++) {
+-              /* While SQLITE_BUSY has a built in timeout,
+-               * SQLITE_LOCKED does not, so sleep */
+-              if (result == SQLITE_LOCKED)
+-                      sleep(1);
+-      }
+-
+-      switch (result)
+-      {
+-              case SQLITE_DONE:
+-                      /* no rows returned */
+-                      ret = 0;
+-                      break;
+-              case SQLITE_ROW:
+-                      if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)
+-                      {
+-                              ret = 0;
+-                              break;
+-                      }
+-                      ret = sqlite3_column_int64(stmt, 0);
+-                      break;
+-              default:
+-                      DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);
+-                      ret = -1;
+-                      break;
+-      }
+-      sqlite3_free(sql);
+-      sqlite3_finalize(stmt);
+-
+-      return ret;
++      sql_get_field(int64_t, sqlite3_column_int64)
+ }
+ char *
index 8b08d5c7540ae17c1ceeb9a285fe5b589b868946..9278ddd0b4b8e99e0be39e96d34850100d6473c1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-seahub
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Apache-2.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)
 PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
 PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
 
-PKG_BUILD_DEPENDS:=pytz/host
+PKG_BUILD_DEPENDS:=python-pytz/host
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python-package.mk
@@ -28,12 +28,12 @@ define Package/seafile-seahub
     TITLE:=Seafile server - seahub component
     MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://seafile.com/
-    DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \
+    DEPENDS:=+python-simplejson +python +pillow +python-chardet +django +django-appconf \
                +django-compressor +django-constance +django-formtools +django-jsonfield \
                +django-picklefield +django-postoffice +django-restframework \
                +django-simple-captcha +django-statici18n +django-webpack-loader +et_xmlfile \
                +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql \
-               +python-qrcode +python-requests +python-requests-oauthlib +pytz +rcssmin
+               +python-qrcode +python-requests +python-requests-oauthlib +python-pytz +rcssmin
 endef
 
 define Build/Configure
index b1d42d8f350c40d012e1bda6960b330ba5f8d8b9..3214a3cc597829ff6eff63927f326925a23ae2e6 100644 (file)
@@ -13,12 +13,12 @@ include $(TOPDIR)/rules.mk
 # - check if default mode has changed from being tcp_only
 #
 PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=3.2.4
+PKG_VERSION:=3.2.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
-PKG_HASH:=65a67c355df1794dc0ef94d80d2d596fd590b13fdcd0a21bda28859c88924ce5
+PKG_HASH:=02273d571b8bea067eefb203a43c142d052042179904f9050a1f20cb8dc5d242
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
index 8cfee0c04103b2cc170763ec73f9a96de07a206d..3f55bcdadd6cb278129bbca419d3906754b6fc7a 100644 (file)
@@ -1,18 +1,15 @@
-#
-# Copyright (C) 2012-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:=tgt
-PKG_VERSION:=1.0.74
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.75
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=bfc202790d5326d7a18bd3928b4bb204ffb0acf443a5ec5c16a1a0fbc53be99f
+PKG_HASH:=1c719fdccc6ddc8e5de57a6e546aa64f41056a2fb1d710b8b2a22f65e08f5b90
 
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 PKG_LICENSE:=GPL-2.0
@@ -30,10 +27,10 @@ define Package/tgt
 endef
 
 define Package/tgt/description
-Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
-Key goals of the project are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.
-Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20.
-Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine).
+The Linux target framework (tgt) is a user space SCSI target framework
+that supports the iSCSI and iSER transport protocols and that also
+supports multiple methods for accessing block storage. Tgt consists of
+a user-space daemon and user-space tools.
 endef
 
 define Build/Compile
@@ -50,11 +47,10 @@ define Package/tgt/conffiles
 endef
 
 define Package/tgt/install
-       $(INSTALL_DIR) $(1)/
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) ./files/* $(1)/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin
+       $(INSTALL_DATA) ./files/tgt.config $(1)/etc/config/
+       $(INSTALL_BIN) ./files/tgt.init $(1)/etc/init.d/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,tgt))
diff --git a/net/tgt/files/etc/config/tgt b/net/tgt/files/etc/config/tgt
deleted file mode 100644 (file)
index de5239d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-config options 'tgt'
-# iothreads limits number of worker threads per rdwr target, default is 16
-# which seems to be too much for an avarage router
-       option iothreads '2'
-#      option nop_count '3'
-#      option nop_interval '1'
-#      list portal '[::1]'
-#      list portal '127.0.0.1:3261'
-#      list portal '0.0.0.0:3262'
-#      list portal '[::]:3263'
-
-config target 1
-       option name 'iqn.2012-06.org.openwrt:target1'
-#      list allow_name 'iqn.1994-05.org.example:fedcba987654'
-#      list allow_address '192.168.2.128/27'
-
-#config target 2
-#      option name 'iqn.2012-06.org.openwrt:t2'
-
-# all options are set to default, except for the device
-# lun "name" is constructed as TGTID_LUN
-#config lun                        1_1
-#      option 'device' '/dev/sda'
-# type of scsi device. available options: disk, cd, pt (sg passthrough)
-#      option 'type' 'disk'
-# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN)
-#      option 'bstype' 'aio'
-# set sync and/or direct flags when opening device, affect only rdwr
-#      option 'sync' '0'
-#      option 'direct' '0'
-# block size for lun, default is 512
-#      option 'blocksize' 4096
-# override SCSI mode page, see tgtadm man page for details
-#      option 'mode_page' 'string'
-# vendor, product, revision, SCSI ID and SCSI Serial number
-#      option 'vendor_id' 'string'
-#      option 'product_id' 'string'
-#      option 'product_rev' 'string'
-#      option 'scsi_id' 'string'
-#      option 'scsi_sn' 'string'
-# refuse write attempts. applies only to disk type
-#      option 'readonly' '0'
-# Disk devices default to non-removable, cd - to removable
-#      option 'removable' '0'
-#  0 = Classic sense format, 1 = Support descriptor format.
-#      option 'sense_format' '0'
-
-#config lun 2_1
-#      option device /mnt/iscsi.img
-
-#config lun 2_2
-#      option device /dev/sdc
-
-#config account
-#      list target 1
-#      list target 2
-#      option user "username1"
-#      option password "pass1"
-
-#config account
-#      option target 2
-#      option user "user2"
-#      option password "pwd2"
-#      option outgoing 1
diff --git a/net/tgt/files/etc/init.d/tgt b/net/tgt/files/etc/init.d/tgt
deleted file mode 100755 (executable)
index d840e51..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=91
-STOP=10
-
-EXTRA_COMMANDS="show"
-EXTRA_HELP="   show    Show current configuration of tgtd"
-
-NAME=tgt
-PROG=/usr/sbin/tgtd
-USE_PROCD=1
-
-tgtadm="/usr/sbin/tgtadm --lld iscsi"
-logger="logger -p daemon.err -s -t $NAME"
-
-validate_lun_section() {
-       uci_load_validate tgt lun "$1" "$2" \
-               'device:or(file, device)' \
-               'type:or("disk", "cd", "pt"):disk' \
-               'bstype:or("rdwr", "aio", "sg"):rdwr' \
-               'sync:bool:0' \
-               'direct:bool:0' \
-               'blocksize:uinteger' \
-               'mode_page:string' \
-               'product_id:string' \
-               'product_rev:string' \
-               'readonly:bool:0' \
-               'removable:bool' \
-               'scsi_id:string' \
-               'scsi_sn:string' \
-               'sense_format:range(0, 1)' \
-               'vendor_id:string'
-}
-
-handle_lun() {
-       local tgt_lun=$1
-       local my_tgtid=${tgt_lun%_*}
-       local lun=${tgt_lun#*_}
-
-       [ $my_tgtid -eq $tgtid ] || return 0
-
-       [ "$2" = 0 ] || {
-               $logger "Validation failed for LUN $tgt_lun"
-               return 1
-       }
-       [ "$device" ] || {
-               $logger "Device is required for target $tgt_lun"
-               return 1
-       }
-
-       if [ $sync -ne 0 -o $direct -ne 0 ]; then
-               local bsoflags
-               [ $sync -ne 0 ] && bsoflags="sync"
-               [ $direct -ne 0 ] && bsoflags="direct"
-               [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct"
-               bsoflags="--bsoflags $bsoflags"
-       fi
-
-       blocksize=${blocksize+--blocksize=$blocksize}
-       local params='' i
-       for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do
-               eval params=\${$i+$i=\$$i,}\$params
-       done
-
-       local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
-       $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype $bsoflags $blocksize || {
-               $logger "Failed to create lun $tgt_lun"
-               return 1
-       }
-       $_tgtadm --op update --param $params || {
-               $logger "Failed to update lun $tgt_lun"
-               return 1
-       }
-}
-
-validate_account_section () {
-       uci_load_validate tgt account "$1" "$2" \
-               'target:list(uinteger)' \
-               'user:string' \
-               'password:string' \
-               'outgoing:bool:0'
-}
-
-handle_account() {
-       local _tgtadm="$tgtadm --mode account"
-
-       [ "$2" = 0 ] || {
-               $logger "Validation failed for account ${user:-$1}"
-               return 1
-       }
-       [ "$user" ] || {
-               $logger "User is required for account $1. Run 'uci show tgt.$1' and check options"
-               return 1
-       }
-       [ "$target" ] || {
-               $logger "Target is required for account $user"
-               return 1
-       }
-       [ "$password" ] || {
-               $logger "Password is required for account $user"
-               return 1
-       }
-       $_tgtadm --op new --user "$user" --password "$password" || {
-               $logger "Failed to create user $username"
-               return 1
-       }
-}
-
-bind_account_to_target() {
-       local _tgtadm="$tgtadm --mode account"
-
-       [ "$2" = 0 ] || {
-               $logger "Validation failed for account ${user:-$1}"
-               return 1
-       }
-
-       [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing=""
-       local t
-       for t in $target; do
-               [ "$t" -eq "$tgtid" ] && {
-                       $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || {
-                               $logger "Failed to bind user $username to target $tgtid"
-                               return 1
-                       }
-               }
-       done
-       return 0
-}
-
-validate_target_section() {
-       uci_load_validate tgt target "$1" "$2" \
-               'name:string:iqn.2012-06.org.openwrt' \
-               'allow_address:list(string):ALL' \
-               'allow_name:list(string)'
-}
-
-handle_target() {
-       local tgtid=$1
-       local _tgtadm="$tgtadm --mode target"
-
-       [ $tgtid -ge 0 ] || return 1
-       [ "$2" = 0 ] || {
-               $logger "Validation failed for target $tgtid"
-               return 1
-       }
-       $_tgtadm --op new --tid $tgtid --targetname $name || {
-               $logger "Failed to create target $tgtid"
-               return 1
-       }
-       local i
-       for i in $allow_address; do
-               $_tgtadm --op bind --tid $tgtid --initiator-address $i || {
-                       $logger "Failed to set allow $i to connect to target $tgtid"
-                       return 1
-               }
-       done
-       for i in $allow_name; do
-               $_tgtadm --op bind --tid $tgtid --initiator-name $i || {
-                       $logger "Failed to set allow $i to connect to target $tgtid"
-                       return 1
-               }
-       done
-       config_foreach validate_lun_section lun handle_lun || return 1
-       config_foreach validate_account_section account bind_account_to_target || return 1
-}
-
-configure() {
-       config_load $NAME
-       $tgtadm --mode sys --op update --name State -v offline || {
-               $logger "Failed to set system state to Offline"
-               return 1
-       }
-       config_foreach validate_account_section account handle_account || return 1
-       config_foreach validate_target_section target handle_target || return 1
-       $tgtadm --mode sys --op update --name State -v ready || {
-               $logger "Failed to set system state to Ready"
-               return 1
-       }
-       return 0
-}
-
-validate_tgt_section() {
-       uci_load_validate tgt options "$1" "$2" \
-               'iothreads:uinteger' \
-               'portal:list(string)' \
-               'nop_interval:uinteger' \
-               'nop_count:uinteger'
-}
-
-start_tgt_instance() {
-       [ "$2" = 0 ] || {
-               $logger "Validation failed for tgt options"
-               return 1
-       }
-       procd_open_instance
-       procd_set_param command $PROG -f
-       [ "$iothreads" ] && procd_append_param command -t $iothreads
-       [ "$portal$nop_interval$nop_count" ] && {
-               local iscsi="" i
-               for i in nop_interval nop_count; do
-                       eval iscsi=\${$i+$i=\$$i,}\$iscsi
-               done
-               for i in $portal; do
-                       iscsi="portal=$i,$iscsi"
-               done
-               procd_append_param command --iscsi $iscsi
-       }
-       procd_set_param respawn
-       procd_close_instance
-       logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds"
-       ( sleep 5; configure || { stop_service; exit 1; } ) &
-}
-
-start_service() {
-       validate_tgt_section tgt start_tgt_instance
-}
-
-stop_service() {
-       $tgtadm --mode sys --op update --name State -v offline || {
-               $logger "Failed to set system state to Offline"
-               return 1
-       }
-       $tgtadm --mode target --op show \
-               | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \
-               | xargs -r -n1 $tgtadm --mode target --op delete --force --tid
-       $tgtadm --mode sys --op delete
-}
-
-reload_service() {
-       stop_service
-       start_service
-}
-
-service_triggers() {
-       procd_add_reload_trigger "tgt"
-
-       procd_open_validate
-       validate_tgt_section
-       validate_account_section
-       validate_target_section
-       validate_lun_section
-       procd_close_validate
-}
-
-show() {
-       $tgtadm --mode target --op show
-}
diff --git a/net/tgt/files/tgt.config b/net/tgt/files/tgt.config
new file mode 100644 (file)
index 0000000..de5239d
--- /dev/null
@@ -0,0 +1,64 @@
+config options 'tgt'
+# iothreads limits number of worker threads per rdwr target, default is 16
+# which seems to be too much for an avarage router
+       option iothreads '2'
+#      option nop_count '3'
+#      option nop_interval '1'
+#      list portal '[::1]'
+#      list portal '127.0.0.1:3261'
+#      list portal '0.0.0.0:3262'
+#      list portal '[::]:3263'
+
+config target 1
+       option name 'iqn.2012-06.org.openwrt:target1'
+#      list allow_name 'iqn.1994-05.org.example:fedcba987654'
+#      list allow_address '192.168.2.128/27'
+
+#config target 2
+#      option name 'iqn.2012-06.org.openwrt:t2'
+
+# all options are set to default, except for the device
+# lun "name" is constructed as TGTID_LUN
+#config lun                        1_1
+#      option 'device' '/dev/sda'
+# type of scsi device. available options: disk, cd, pt (sg passthrough)
+#      option 'type' 'disk'
+# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN)
+#      option 'bstype' 'aio'
+# set sync and/or direct flags when opening device, affect only rdwr
+#      option 'sync' '0'
+#      option 'direct' '0'
+# block size for lun, default is 512
+#      option 'blocksize' 4096
+# override SCSI mode page, see tgtadm man page for details
+#      option 'mode_page' 'string'
+# vendor, product, revision, SCSI ID and SCSI Serial number
+#      option 'vendor_id' 'string'
+#      option 'product_id' 'string'
+#      option 'product_rev' 'string'
+#      option 'scsi_id' 'string'
+#      option 'scsi_sn' 'string'
+# refuse write attempts. applies only to disk type
+#      option 'readonly' '0'
+# Disk devices default to non-removable, cd - to removable
+#      option 'removable' '0'
+#  0 = Classic sense format, 1 = Support descriptor format.
+#      option 'sense_format' '0'
+
+#config lun 2_1
+#      option device /mnt/iscsi.img
+
+#config lun 2_2
+#      option device /dev/sdc
+
+#config account
+#      list target 1
+#      list target 2
+#      option user "username1"
+#      option password "pass1"
+
+#config account
+#      option target 2
+#      option user "user2"
+#      option password "pwd2"
+#      option outgoing 1
diff --git a/net/tgt/files/tgt.init b/net/tgt/files/tgt.init
new file mode 100755 (executable)
index 0000000..b627d5d
--- /dev/null
@@ -0,0 +1,247 @@
+#!/bin/sh /etc/rc.common
+START=91
+STOP=10
+
+EXTRA_COMMANDS="show"
+EXTRA_HELP="   show    Show current configuration of tgtd"
+
+NAME=tgt
+PROG=/usr/sbin/tgtd
+USE_PROCD=1
+
+tgtadm="/usr/sbin/tgtadm --lld iscsi"
+logger="logger -p daemon.err -s -t $NAME"
+
+validate_lun_section() {
+       uci_load_validate tgt lun "$1" "$2" \
+               'device:or(file, device)' \
+               'type:or("disk", "cd", "pt"):disk' \
+               'bstype:or("rdwr", "aio", "sg"):rdwr' \
+               'sync:bool:0' \
+               'direct:bool:0' \
+               'blocksize:uinteger' \
+               'mode_page:string' \
+               'product_id:string' \
+               'product_rev:string' \
+               'readonly:bool:0' \
+               'removable:bool' \
+               'scsi_id:string' \
+               'scsi_sn:string' \
+               'sense_format:range(0, 1)' \
+               'vendor_id:string'
+}
+
+handle_lun() {
+       local tgt_lun=$1
+       local my_tgtid=${tgt_lun%_*}
+       local lun=${tgt_lun#*_}
+
+       [ $my_tgtid -eq $tgtid ] || return 0
+
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for LUN $tgt_lun"
+               return 1
+       }
+       [ "$device" ] || {
+               $logger "Device is required for target $tgt_lun"
+               return 1
+       }
+
+       if [ $sync -ne 0 -o $direct -ne 0 ]; then
+               local bsoflags
+               [ $sync -ne 0 ] && bsoflags="sync"
+               [ $direct -ne 0 ] && bsoflags="direct"
+               [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct"
+               bsoflags="--bsoflags $bsoflags"
+       fi
+
+       blocksize=${blocksize+--blocksize=$blocksize}
+       local params='' i
+       for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do
+               eval params=\${$i+$i=\$$i,}\$params
+       done
+
+       local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
+       $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype $bsoflags $blocksize || {
+               $logger "Failed to create lun $tgt_lun"
+               return 1
+       }
+       $_tgtadm --op update --param $params || {
+               $logger "Failed to update lun $tgt_lun"
+               return 1
+       }
+}
+
+validate_account_section () {
+       uci_load_validate tgt account "$1" "$2" \
+               'target:list(uinteger)' \
+               'user:string' \
+               'password:string' \
+               'outgoing:bool:0'
+}
+
+handle_account() {
+       local _tgtadm="$tgtadm --mode account"
+
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for account ${user:-$1}"
+               return 1
+       }
+       [ "$user" ] || {
+               $logger "User is required for account $1. Run 'uci show tgt.$1' and check options"
+               return 1
+       }
+       [ "$target" ] || {
+               $logger "Target is required for account $user"
+               return 1
+       }
+       [ "$password" ] || {
+               $logger "Password is required for account $user"
+               return 1
+       }
+       $_tgtadm --op new --user "$user" --password "$password" || {
+               $logger "Failed to create user $username"
+               return 1
+       }
+}
+
+bind_account_to_target() {
+       local _tgtadm="$tgtadm --mode account"
+
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for account ${user:-$1}"
+               return 1
+       }
+
+       [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing=""
+       local t
+       for t in $target; do
+               [ "$t" -eq "$tgtid" ] && {
+                       $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || {
+                               $logger "Failed to bind user $username to target $tgtid"
+                               return 1
+                       }
+               }
+       done
+       return 0
+}
+
+validate_target_section() {
+       uci_load_validate tgt target "$1" "$2" \
+               'name:string:iqn.2012-06.org.openwrt' \
+               'allow_address:list(string):ALL' \
+               'allow_name:list(string)'
+}
+
+handle_target() {
+       local tgtid=$1
+       local _tgtadm="$tgtadm --mode target"
+
+       [ $tgtid -ge 0 ] || return 1
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for target $tgtid"
+               return 1
+       }
+       $_tgtadm --op new --tid $tgtid --targetname $name || {
+               $logger "Failed to create target $tgtid"
+               return 1
+       }
+       local i
+       for i in $allow_address; do
+               $_tgtadm --op bind --tid $tgtid --initiator-address $i || {
+                       $logger "Failed to set allow $i to connect to target $tgtid"
+                       return 1
+               }
+       done
+       for i in $allow_name; do
+               $_tgtadm --op bind --tid $tgtid --initiator-name $i || {
+                       $logger "Failed to set allow $i to connect to target $tgtid"
+                       return 1
+               }
+       done
+       config_foreach validate_lun_section lun handle_lun || return 1
+       config_foreach validate_account_section account bind_account_to_target || return 1
+}
+
+configure() {
+       config_load $NAME
+       $tgtadm --mode sys --op update --name State -v offline || {
+               $logger "Failed to set system state to Offline"
+               return 1
+       }
+       config_foreach validate_account_section account handle_account || return 1
+       config_foreach validate_target_section target handle_target || return 1
+       $tgtadm --mode sys --op update --name State -v ready || {
+               $logger "Failed to set system state to Ready"
+               return 1
+       }
+       return 0
+}
+
+validate_tgt_section() {
+       uci_load_validate tgt options "$1" "$2" \
+               'iothreads:uinteger' \
+               'portal:list(string)' \
+               'nop_interval:uinteger' \
+               'nop_count:uinteger'
+}
+
+start_tgt_instance() {
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for tgt options"
+               return 1
+       }
+       procd_open_instance
+       procd_set_param command $PROG -f
+       [ "$iothreads" ] && procd_append_param command -t $iothreads
+       [ "$portal$nop_interval$nop_count" ] && {
+               local iscsi="" i
+               for i in nop_interval nop_count; do
+                       eval iscsi=\${$i+$i=\$$i,}\$iscsi
+               done
+               for i in $portal; do
+                       iscsi="portal=$i,$iscsi"
+               done
+               procd_append_param command --iscsi $iscsi
+       }
+       procd_set_param respawn
+       procd_close_instance
+       logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds"
+       ( sleep 5; configure || { stop_service; exit 1; } ) &
+}
+
+start_service() {
+       validate_tgt_section tgt start_tgt_instance
+}
+
+stop_service() {
+       $tgtadm --mode sys --op update --name State -v offline || {
+               $logger "Failed to set system state to Offline"
+               return 1
+       }
+       $tgtadm --mode target --op show \
+               | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \
+               | xargs -r -n1 $tgtadm --mode target --op delete --force --tid
+       $tgtadm --mode sys --op delete
+       procd_kill tgt
+}
+
+reload_service() {
+       stop_service
+       start_service
+}
+
+service_triggers() {
+       procd_add_reload_trigger "tgt"
+
+       procd_open_validate
+       validate_tgt_section
+       validate_account_section
+       validate_target_section
+       validate_lun_section
+       procd_close_validate
+}
+
+show() {
+       $tgtadm --mode target --op show
+}
index 30eb0b3b5a213ca639da8d4f3d4431cbb9c937ff..41e7c8d6357c26aaf05df28761475ea9d7c14811 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
 PKG_VERSION:=0.3.5.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
index 6974057d45d83e6901502fb5ec9e064b96a86501..ee0818d9d13afce182f8290b6aeb690d1164ed10 100644 (file)
@@ -7,19 +7,15 @@ STOP=50
 USE_PROCD=1
 
 start_service() {
-       [ -f /var/run/tor.pid ] || {
-               touch /var/run/tor.pid
-               chown tor:tor /var/run/tor.pid
-       }
-       [ -d /var/lib/tor ] || {
-               mkdir -m 0755 -p /var/lib/tor
-               chmod 0700 /var/lib/tor
-               chown tor:tor /var/lib/tor
-       }
-       [ -d /var/log/tor ] || {
-               mkdir -m 0755 -p /var/log/tor
-               chown tor:tor /var/log/tor
-       }
+       touch /var/run/tor.pid
+       chown tor:tor /var/run/tor.pid
+
+       mkdir -m 0700 -p /var/lib/tor
+       chown -R tor:tor /var/lib/tor
+
+       mkdir -m 0755 -p /var/log/tor
+       chown -R tor:tor /var/log/tor
+
        procd_open_instance
        procd_set_param command /usr/sbin/tor --runasdaemon 0
        procd_close_instance
index d21551d7168331b0f0053950305ae87c62f7abbd..030c5ff1ea5077ad6c688bd04be0691a2c21596b 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
-PKG_VERSION:=1.9.0
+PKG_VERSION:=1.9.1
 PKG_RELEASE:=1
 
 PKG_LICENSE:=BSD-3-Clause
@@ -17,7 +17,7 @@ PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_HASH:=415af94b8392bc6b2c52e44ac8f17935cc6ddf2cc81edfb47c5be4ad205ab917
+PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
diff --git a/net/unbound/patches/200-openssl-deprecated.patch b/net/unbound/patches/200-openssl-deprecated.patch
deleted file mode 100644 (file)
index 7fa1ea8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/util/net_help.c
-+++ b/util/net_help.c
-@@ -1049,10 +1049,10 @@ void* outgoing_ssl_fd(void* sslctx, int
- static lock_basic_type *ub_openssl_locks = NULL;
-
- /** callback that gets thread id for openssl */
--static unsigned long
--ub_crypto_id_cb(void)
-+static void
-+ub_crypto_id_cb(CRYPTO_THREADID *id)
- {
--      return (unsigned long)log_thread_get();
-+      CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
- }
-
- static void
-@@ -1078,7 +1078,7 @@ int ub_openssl_lock_init(void)
-       for(i=0; i<CRYPTO_num_locks(); i++) {
-               lock_basic_init(&ub_openssl_locks[i]);
-       }
--      CRYPTO_set_id_callback(&ub_crypto_id_cb);
-+      CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
-       CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
- #endif /* OPENSSL_THREADS */
-       return 1;
-@@ -1090,7 +1090,7 @@ void ub_openssl_lock_delete(void)
-       int i;
-       if(!ub_openssl_locks)
-               return;
--      CRYPTO_set_id_callback(NULL);
-+      CRYPTO_THREADID_set_callback(NULL);
-       CRYPTO_set_locking_callback(NULL);
-       for(i=0; i<CRYPTO_num_locks(); i++) {
-               lock_basic_destroy(&ub_openssl_locks[i]);
diff --git a/net/unbound/patches/300-fix-ssl-err-log.patch b/net/unbound/patches/300-fix-ssl-err-log.patch
deleted file mode 100644 (file)
index f2f0add..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: daemon/remote.c
-===================================================================
---- a/daemon/remote.c  (revision 5105)
-+++ b/daemon/remote.c  (working copy)
-@@ -1987,7 +1987,7 @@
-                               return NULL;
-                       }
-               } else {
--#ifndef HAVE_SSL_SET1_HOST
-+#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
-                       if(auth_name)
-                         log_err("no name verification functionality in "
-                               "ssl library, ignored name for %s", todo);
-Index: iterator/iter_fwd.c
-===================================================================
---- a/iterator/iter_fwd.c      (revision 5105)
-+++ b/iterator/iter_fwd.c      (working copy)
-@@ -239,7 +239,7 @@
-                               s->name, p->str);
-                       return 0;
-               }
--#ifndef HAVE_SSL_SET1_HOST
-+#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
-               if(tls_auth_name)
-                       log_err("no name verification functionality in "
-                               "ssl library, ignored name for %s", p->str);
-Index: iterator/iter_hints.c
-===================================================================
---- a/iterator/iter_hints.c    (revision 5105)
-+++ b/iterator/iter_hints.c    (working copy)
-@@ -252,7 +252,7 @@
-                               s->name, p->str);
-                       return 0;
-               }
--#ifndef HAVE_SSL_SET1_HOST
-+#if ! defined(HAVE_SSL_SET1_HOST) && ! defined(HAVE_X509_VERIFY_PARAM_SET1_HOST)
-               if(auth_name)
-                       log_err("no name verification functionality in "
-                               "ssl library, ignored name for %s", p->str);
diff --git a/utils/bigclown/bigclown-control-tool/Makefile b/utils/bigclown/bigclown-control-tool/Makefile
new file mode 100644 (file)
index 0000000..e9ec484
--- /dev/null
@@ -0,0 +1,36 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-control-tool
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-control-tool/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=c79a76e0940958e4ddcf51e57fadfb127f568b6c1ceb02033c3630bab2dee612
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-control-tool-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  URL:=https://github.com/bigclownlabs/bch-control-tool
+  TITLE:=BigCLown control tool
+  DEPENDS:=+python3-click-log +python3-paho-mqtt +python3-pyserial +python3-yaml +python3-simplejson
+endef
+
+define Build/Compile
+       sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+       $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/utils/bigclown/bigclown-gateway/Makefile b/utils/bigclown/bigclown-gateway/Makefile
new file mode 100644 (file)
index 0000000..55ddefb
--- /dev/null
@@ -0,0 +1,59 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-gateway
+PKG_VERSION:=1.16.2
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-gateway/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=9d3208bf4cffec507d992485104fcbba2b9bc02cf7b290dfe13f98e5916ee1ca
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-gateway-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  URL:=https://github.com/bigclownlabs/bch-gateway
+  TITLE:=BigCLown gateway
+  DEPENDS:= \
+    +kmod-usb-serial-ftdi \
+    +kmod-usb-acm \
+    +python3-click-log \
+    +python3-paho-mqtt \
+    +python3-pyserial \
+    +python3-yaml \
+    +python3-simplejson \
+    +python3-schema \
+    +python3-appdirs
+endef
+
+define Py3Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/config $(1)/etc/config/bigclown-gateway
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-gateway
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/config/bigclown-gateway
+endef
+
+define Build/Compile
+       sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+       $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/utils/bigclown/bigclown-gateway/files/config b/utils/bigclown/bigclown-gateway/files/config
new file mode 100644 (file)
index 0000000..6a60ae4
--- /dev/null
@@ -0,0 +1,10 @@
+
+config gateway 'gateway'
+       option enabled '0'
+       option name 'usb-dongle'
+       option device '/dev/ttyUSB0'
+       option automatic_rename_kit_nodes '1'
+
+config mqtt 'mqtt'
+       option host 'localhost'
+       option port '1883'
diff --git a/utils/bigclown/bigclown-gateway/files/init b/utils/bigclown/bigclown-gateway/files/init
new file mode 100755 (executable)
index 0000000..37ddd0d
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh /etc/rc.common
+
+START=98
+STOP=1
+
+USE_PROCD=1
+
+PROG=/usr/bin/bcg
+CONF=/tmp/etc/bigclown-gateway.conf
+
+append() {
+       local cfg="$1"
+       local uci_name="$2"
+       local out_name="$3"
+       local default="$4"
+       config_get val $cfg $uci_name $default
+       if [ -n "$val" ]; then
+         echo "$out_name $val" >> $CONF
+       fi
+}
+
+start_service() {
+       config_load bigclown-gateway
+
+       local enabled
+       config_get_bool enabled gateway enabled "0"
+       [ "$enabled" = "1" ] || {
+               echo "Bigclown gateway service disabled"
+               exit 1
+       }
+
+       rm -rf $CONF
+       echo "Generating bigclown-gateway config file in $CONF"
+
+       append gateway name 'name:' usb-dongle
+       # TODO add hotplug script and use different default here
+       append gateway device 'device:' /dev/ttyUSB0
+       append gateway automatic_rename_kit_nodes 'automatic_rename_kit_nodes:' 1
+       append gateway base_topic_prefix 'base_topic_prefix:'
+
+       echo "mqtt:" >> $CONF
+       append mqtt host '  host:' localhost
+       append mqtt port '  port:' 1883
+       append mqtt cafile '  cafile:'
+       append mqtt certfile '  certfile:'
+       append mqtt keyfile '  keyfile:'
+
+       procd_open_instance
+       procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+       procd_set_param command "$PROG" -c "$CONF"
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger 'bigclown-gateway'
+}
diff --git a/utils/bigclown/bigclown-mqtt2influxdb/Makefile b/utils/bigclown/bigclown-mqtt2influxdb/Makefile
new file mode 100644 (file)
index 0000000..14a462f
--- /dev/null
@@ -0,0 +1,49 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-mqtt2influxdb
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-mqtt2influxdb/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=5be14132311e85215abbfd732fe6cd652522ea0a343ee8ba7abab3ec7578eb99
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-mqtt2influxdb-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  URL:=https://github.com/bigclownlabs/bch-mqtt2influxdb
+  TITLE:=BigCLown MQTT to Influxdb bridge
+  DEPENDS:=+python3-paho-mqtt +python3-yaml +python3-influxdb +python3-jsonpath-ng +python3-schema
+endef
+
+define Py3Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-mqtt2influxdb
+       $(INSTALL_DATA) ./files/config.yml $(1)/etc/bigclown-mqtt2influxdb.yml
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/bigclown-mqtt2influxdb.yml
+endef
+
+define Build/Compile
+       sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+       $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/utils/bigclown/bigclown-mqtt2influxdb/files/config.yml b/utils/bigclown/bigclown-mqtt2influxdb/files/config.yml
new file mode 100644 (file)
index 0000000..350c85a
--- /dev/null
@@ -0,0 +1,67 @@
+## Example bigclown-mqtt2influxdb configuration
+
+# MQTT configuration
+mqtt:
+  #host: 127.0.0.1
+  #port: 1883
+
+# InfluxDB configuration
+influxdb:
+  #host: 127.0.0.1
+  #port: 8086
+  #database: node
+
+# This is default configuration used to mirror all values produced by default
+# BigClown modules firmware. You might want to add your topics or drop those for
+# modules you don't own.
+points:
+  - measurement: temperature
+    topic: node/+/thermometer/+/temperature
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+      channel: $.topic[3]
+
+  - measurement: relative-humidity
+    topic: node/+/hygrometer/0:4/relative-humidity
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: illuminance
+    topic: node/+/lux-meter/0:0/illuminance
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: pressure
+    topic: node/+/barometer/0:0/pressure
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: co2
+    topic: node/+/co2-meter/-/concentration
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: voltage
+    topic: node/+/battery/+/voltage
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: button
+    topic: node/+/push-button/+/event-count
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+      channel: $.topic[3]
diff --git a/utils/bigclown/bigclown-mqtt2influxdb/files/init b/utils/bigclown/bigclown-mqtt2influxdb/files/init
new file mode 100644 (file)
index 0000000..55a3e66
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=1
+
+USE_PROCD=1
+
+PROG=/usr/bin/mqtt2influxdb
+CONF=/etc/bigclown-mqtt2influxdb.yml
+
+start_service() {
+       procd_open_instance
+       procd_set_param respawn 3600 5 5
+       procd_set_param command "$PROG" -c "$CONF"
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
+}
+
+stop_service() {
+       service_stop "$PROG"
+}
index bb317554bc00746adc09329e2577f2393f3952d8..e674a4abb325a7fd022e885ef7fea4f9dd9c9f16 100644 (file)
@@ -6,15 +6,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.20.1
-PKG_RELEASE:=2
+PKG_VERSION:=4.20.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
-PKG_HASH:=562f5d1ff1d17867c4c2be2768c653b62f1f257c42f9bb3e1a36380c02ec4fcd
+PKG_HASH:=890f8b7e162f2bbfaa5c7b23e8b6f791fd3f325239a0510871fa4b45e4a80e7c
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
 
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_MAINTAINER:=Karel Kočí <karel.koci@nic.cz>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
index e50d108532fc07a1b73454c17d7da2a75469db15..51307c14654fee9ef0a0327923c766b8646acd32 100644 (file)
@@ -5,18 +5,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fish
-PKG_VERSION:=3.0.0
-PKG_RELEASE:=3
+PKG_VERSION:=3.0.2
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/fish-shell/fish-shell/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=a16b0ff31111167ef4f3831ef428bb236bef592b7f49a2867bf42405ee95ff33
-PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>
+PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
+PKG_HASH:=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
+PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
 PKG_LICENSE:=GPL-2.0
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/fish-shell-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk