Merge pull request #1813 from MikePetullo/grilo-plugins
authorSteven Barth <steven@midlink.org>
Sat, 3 Oct 2015 08:42:40 +0000 (10:42 +0200)
committerSteven Barth <steven@midlink.org>
Sat, 3 Oct 2015 08:42:40 +0000 (10:42 +0200)
grilo-plugins: add new package

43 files changed:
lang/python/files/python-package.mk
libs/file/Makefile
libs/libcoap/Makefile [new file with mode: 0644]
net/aircrack-ng/Makefile
net/cgi-io/Makefile [new file with mode: 0644]
net/cgi-io/src/CMakeLists.txt [new file with mode: 0644]
net/cgi-io/src/main.c [new file with mode: 0644]
net/cgi-io/src/multipart_parser.c [new file with mode: 0644]
net/cgi-io/src/multipart_parser.h [new file with mode: 0644]
net/e2guardian/Makefile
net/openvswitch/Makefile
net/openvswitch/patches/0005-add-wait-any-define-in-test-ovn.patch [deleted file]
net/openvswitch/patches/0005-datapath-Add-net-ip6_checksum.h-to-stt.c.patch [new file with mode: 0644]
net/openvswitch/patches/0006-force-kernel-4-1.patch [new file with mode: 0644]
net/openvswitch/patches/0007-add-netns-compat.patch [new file with mode: 0644]
net/openvswitch/patches/0008-add-back-old-gfp-this-node-define.patch [new file with mode: 0644]
net/openvswitch/patches/0010-patch-nf_ip_hook-4.1.patch [new file with mode: 0644]
net/openvswitch/patches/0011-fix-vxlan-xmit-skb-4.1.patch [new file with mode: 0644]
net/openvswitch/patches/0012-fix-vport-lisp-4.1.patch [new file with mode: 0644]
net/squid/Makefile
net/u2pnpd/Makefile [new file with mode: 0644]
net/u2pnpd/files/u2pnpd.config [new file with mode: 0644]
net/u2pnpd/files/u2pnpd.defaults [new file with mode: 0644]
net/u2pnpd/files/u2pnpd.init [new file with mode: 0644]
net/xl2tpd/Makefile
sound/shairplay/Makefile
sound/shairplay/patches/003-fix_big-endian.patch
utils/collectd/Makefile
utils/collectd/patches/500-upstream-parallel-build-fix.patch [new file with mode: 0644]
utils/dbus/Makefile
utils/dump1090/Config.in [deleted file]
utils/dump1090/Makefile
utils/dump1090/files/dump1090.config
utils/dump1090/files/dump1090.init
utils/dump1090/patches/100-html_dir.patch [deleted file]
utils/lxc/Makefile
utils/lxc/patches/016-uninitialized-ret-in-monitor.patch [deleted file]
utils/lxc/patches/035-fix-undefined-lfd.patch [new file with mode: 0644]
utils/open-plc-utils/Makefile
utils/pciutils/Makefile
utils/pciutils/patches/105-fix-host.patch [new file with mode: 0644]
utils/spi-tools/Makefile [new file with mode: 0644]
utils/zoneinfo/Makefile

index 5ab35195dd6c2ec6ce4a3c66fbab19cb196db0b6..b4be3a8ee98569b86656561c098a752ee7feb3af 100644 (file)
@@ -103,6 +103,7 @@ define Build/Compile/PyMod
                cd $(PKG_BUILD_DIR)/$(strip $(1)); \
                CC="$(TARGET_CC)" \
                CCSHARED="$(TARGET_CC) $(FPIC)" \
+               CXX="$(TARGET_CXX)" \
                LD="$(TARGET_CC)" \
                LDSHARED="$(TARGET_CC) -shared" \
                CFLAGS="$(TARGET_CFLAGS)" \
index 39bf0bdd7dfc8fb46c044ceb9245b18bfd585e01..90ab6f4cc60b319aa9c62440dd799fd19aae14b2 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=file
-PKG_VERSION:=5.20
+PKG_VERSION:=5.25
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
-PKG_MD5SUM:=5d5e13eb3e0e13839da869a31790faf2
+PKG_MD5SUM:=e6a972d4e10d9e76407a432f4a63cd4c
 
 PKG_LICENSE:=BSD-2c
 PKG_LICENSE_FILES:=COPYING
@@ -83,6 +83,9 @@ define Package/file/install
        $(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
        $(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
+
+       # For some reason both "magic" and "magic.mgc" MUST exist
+       ln -sf magic $(1)/usr/share/misc/magic.mgc
 endef
 
 define Package/libmagic/install
diff --git a/libs/libcoap/Makefile b/libs/libcoap/Makefile
new file mode 100644 (file)
index 0000000..41d5535
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2015 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:=libcoap
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/obgm/libcoap
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+PKG_SOURCE_VERSION:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
+
+PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
+PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
+PKG_LICENSE_FILE:=COPYING LICENSE.GPL LICENSE.BSD
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcoap
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=CoAP (RFC 7252) library
+  URL:=http://libcoap.net/
+endef
+
+define Package/libcoap/description
+  Constrained Application Protocol (RFC 7252) library
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+       --disable-examples \
+       --disable-documentation
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/libcoap/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcoap))
index 960ef856fdc56f853f9c1b4372c6394496a0af17..fed4ab22ae159d8f6b20877a0847a514e83ca9b0 100644 (file)
@@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/aircrack-ng
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpcap +libpthread +libopenssl +libnl +wireless-tools +ethtool
+  DEPENDS:=+libpcap +libpthread +libopenssl +libnl-core +libnl-genl +wireless-tools +ethtool
   TITLE:=WLAN tools for breaking 802.11 WEP/WPA keys
   URL:=http://www.aircrack-ng.org/
   MAINTAINER:=Rick Farina <zerochaos@gentoo.org>
diff --git a/net/cgi-io/Makefile b/net/cgi-io/Makefile
new file mode 100644 (file)
index 0000000..c36231a
--- /dev/null
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2015 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:=cgi-io
+PKG_RELEASE:=1
+
+PKG_LICENSE:=GPL-2.0+
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/cgi-io
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  DEPENDS:=+libubox +libubus
+  TITLE:=CGI utility for handling up/downloading of files
+endef
+
+define Package/cgi-io/description
+  This package contains an cgi utility that is useful for up/downloading files
+endef
+
+define Build/Prepare
+       mkdir -p $(PKG_BUILD_DIR)
+       $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+
+define Package/cgi-io/install
+       $(INSTALL_DIR) $(1)/usr/libexec $(1)/www/cgi-bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi-io $(1)/usr/libexec
+       $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-upload 
+       $(LN) ../../usr/libexec/cgi-io $(1)/www/cgi-bin/cgi-download 
+endef
+
+$(eval $(call BuildPackage,cgi-io))
diff --git a/net/cgi-io/src/CMakeLists.txt b/net/cgi-io/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8a4ca19
--- /dev/null
@@ -0,0 +1,19 @@
+cmake_minimum_required(VERSION 2.6)
+
+PROJECT(cgi-io C)
+
+INCLUDE(CheckFunctionExists)
+
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
+
+IF(APPLE)
+  INCLUDE_DIRECTORIES(/opt/local/include)
+  LINK_DIRECTORIES(/opt/local/lib)
+ENDIF()
+
+ADD_EXECUTABLE(cgi-io main.c multipart_parser.c)
+TARGET_LINK_LIBRARIES(cgi-io ubox ubus)
+
+INSTALL(TARGETS cgi-io RUNTIME DESTINATION sbin)
diff --git a/net/cgi-io/src/main.c b/net/cgi-io/src/main.c
new file mode 100644 (file)
index 0000000..985831c
--- /dev/null
@@ -0,0 +1,644 @@
+/*
+ * cgi-io - LuCI non-RPC helper
+ *
+ *   Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <libubus.h>
+#include <libubox/blobmsg.h>
+
+#include "multipart_parser.h"
+
+
+enum part {
+       PART_UNKNOWN,
+       PART_SESSIONID,
+       PART_FILENAME,
+       PART_FILEMODE,
+       PART_FILEDATA
+};
+
+const char *parts[] = {
+       "(bug)",
+       "sessionid",
+       "filename",
+       "filemode",
+       "filedata",
+};
+
+struct state
+{
+       bool is_content_disposition;
+       enum part parttype;
+       char *sessionid;
+       char *filename;
+       bool filedata;
+       int filemode;
+       int filefd;
+       int tempfd;
+};
+
+enum {
+       SES_ACCESS,
+       __SES_MAX,
+};
+
+static const struct blobmsg_policy ses_policy[__SES_MAX] = {
+       [SES_ACCESS] = { .name = "access", .type = BLOBMSG_TYPE_BOOL },
+};
+
+
+static struct state st;
+
+static void
+session_access_cb(struct ubus_request *req, int type, struct blob_attr *msg)
+{
+       struct blob_attr *tb[__SES_MAX];
+       bool *allow = (bool *)req->priv;
+
+       if (!msg)
+               return;
+
+       blobmsg_parse(ses_policy, __SES_MAX, tb, blob_data(msg), blob_len(msg));
+
+       if (tb[SES_ACCESS])
+               *allow = blobmsg_get_bool(tb[SES_ACCESS]);
+}
+
+static bool
+session_access(const char *sid, const char *obj, const char *func)
+{
+       uint32_t id;
+       bool allow = false;
+       struct ubus_context *ctx;
+       static struct blob_buf req;
+
+       ctx = ubus_connect(NULL);
+
+       if (!ctx || ubus_lookup_id(ctx, "session", &id))
+               goto out;
+
+       blob_buf_init(&req, 0);
+       blobmsg_add_string(&req, "ubus_rpc_session", sid);
+       blobmsg_add_string(&req, "scope", "cgi-io");
+       blobmsg_add_string(&req, "object", obj);
+       blobmsg_add_string(&req, "function", func);
+
+       ubus_invoke(ctx, id, "access", req.head, session_access_cb, &allow, 500);
+
+out:
+       if (ctx)
+               ubus_free(ctx);
+
+       return allow;
+}
+
+static char *
+md5sum(const char *file)
+{
+       pid_t pid;
+       int fds[2];
+       static char md5[33];
+
+       if (pipe(fds))
+               return NULL;
+
+       switch ((pid = fork()))
+       {
+       case -1:
+               return NULL;
+
+       case 0:
+               uloop_done();
+
+               dup2(fds[1], 1);
+
+               close(0);
+               close(2);
+               close(fds[0]);
+               close(fds[1]);
+
+               if (execl("/bin/busybox", "/bin/busybox", "md5sum", file, NULL));
+                       return NULL;
+
+               break;
+
+       default:
+               memset(md5, 0, sizeof(md5));
+               read(fds[0], md5, 32);
+               waitpid(pid, NULL, 0);
+               close(fds[0]);
+               close(fds[1]);
+       }
+
+       return md5;
+}
+
+static char *
+datadup(const void *in, size_t len)
+{
+       char *out = malloc(len + 1);
+
+       if (!out)
+               return NULL;
+
+       memcpy(out, in, len);
+
+       *(out + len) = 0;
+
+       return out;
+}
+
+static bool
+urldecode(char *buf)
+{
+       char *c, *p;
+
+       if (!buf || !*buf)
+               return true;
+
+#define hex(x) \
+       (((x) <= '9') ? ((x) - '0') : \
+               (((x) <= 'F') ? ((x) - 'A' + 10) : \
+                       ((x) - 'a' + 10)))
+
+       for (c = p = buf; *p; c++)
+       {
+               if (*p == '%')
+               {
+                       if (!isxdigit(*(p + 1)) || !isxdigit(*(p + 2)))
+                               return false;
+
+                       *c = (char)(16 * hex(*(p + 1)) + hex(*(p + 2)));
+
+                       p += 3;
+               }
+               else if (*p == '+')
+               {
+                       *c = ' ';
+                       p++;
+               }
+               else
+               {
+                       *c = *p++;
+               }
+       }
+
+       *c = 0;
+
+       return true;
+}
+
+static bool
+postdecode(char **fields, int n_fields)
+{
+       char *p;
+       const char *var;
+       static char buf[1024];
+       int i, len, field, found = 0;
+
+       var = getenv("CONTENT_TYPE");
+
+       if (!var || strncmp(var, "application/x-www-form-urlencoded", 33))
+               return false;
+
+       memset(buf, 0, sizeof(buf));
+
+       if ((len = read(0, buf, sizeof(buf) - 1)) > 0)
+       {
+               for (p = buf, i = 0; i <= len; i++)
+               {
+                       if (buf[i] == '=')
+                       {
+                               buf[i] = 0;
+
+                               for (field = 0; field < (n_fields * 2); field += 2)
+                               {
+                                       if (!strcmp(p, fields[field]))
+                                       {
+                                               fields[field + 1] = buf + i + 1;
+                                               found++;
+                                       }
+                               }
+                       }
+                       else if (buf[i] == '&' || buf[i] == '\0')
+                       {
+                               buf[i] = 0;
+
+                               if (found >= n_fields)
+                                       break;
+
+                               p = buf + i + 1;
+                       }
+               }
+       }
+
+       for (field = 0; field < (n_fields * 2); field += 2)
+               if (!urldecode(fields[field + 1]))
+                       return false;
+
+       return (found >= n_fields);
+}
+
+static int
+response(bool success, const char *message)
+{
+       char *md5;
+       struct stat s;
+
+       printf("Status: 200 OK\r\n");
+       printf("Content-Type: text/plain\r\n\r\n{\n");
+
+       if (success)
+       {
+               if (!stat(st.filename, &s) && (md5 = md5sum(st.filename)) != NULL)
+                       printf("\t\"size\": %u,\n\t\"checksum\": \"%s\"\n",
+                                  (unsigned int)s.st_size, md5);
+       }
+       else
+       {
+               if (message)
+                       printf("\t\"message\": \"%s\",\n", message);
+
+               printf("\t\"failure\": [ %u, \"%s\" ]\n", errno, strerror(errno));
+
+               if (st.filefd > -1)
+                       unlink(st.filename);
+       }
+
+       printf("}\n");
+
+       return -1;
+}
+
+static int
+failure(int e, const char *message)
+{
+       printf("Status: 500 Internal Server failure\r\n");
+       printf("Content-Type: text/plain\r\n\r\n");
+       printf("%s", message);
+
+       if (e)
+               printf(": %s", strerror(e));
+
+       return -1;
+}
+
+static int
+filecopy(void)
+{
+       int len;
+       char buf[4096];
+
+       if (!st.filedata)
+       {
+               close(st.tempfd);
+               errno = EINVAL;
+               return response(false, "No file data received");
+       }
+
+       if (lseek(st.tempfd, 0, SEEK_SET) < 0)
+       {
+               close(st.tempfd);
+               return response(false, "Failed to rewind temp file");
+       }
+
+       st.filefd = open(st.filename, O_CREAT | O_TRUNC | O_WRONLY, 0600);
+
+       if (st.filefd < 0)
+       {
+               close(st.tempfd);
+               return response(false, "Failed to open target file");
+       }
+
+       while ((len = read(st.tempfd, buf, sizeof(buf))) > 0)
+       {
+               if (write(st.filefd, buf, len) != len)
+               {
+                       close(st.tempfd);
+                       close(st.filefd);
+                       return response(false, "I/O failure while writing target file");
+               }
+       }
+
+       close(st.tempfd);
+       close(st.filefd);
+
+       if (chmod(st.filename, st.filemode))
+               return response(false, "Failed to chmod target file");
+
+       return 0;
+}
+
+static int
+header_field(multipart_parser *p, const char *data, size_t len)
+{
+       st.is_content_disposition = !strncasecmp(data, "Content-Disposition", len);
+       return 0;
+}
+
+static int
+header_value(multipart_parser *p, const char *data, size_t len)
+{
+       int i, j;
+
+       if (!st.is_content_disposition)
+               return 0;
+
+       if (len < 10 || strncasecmp(data, "form-data", 9))
+               return 0;
+
+       for (data += 9, len -= 9; *data == ' ' || *data == ';'; data++, len--);
+
+       if (len < 8 || strncasecmp(data, "name=\"", 6))
+               return 0;
+
+       for (data += 6, len -= 6, i = 0; i <= len; i++)
+       {
+               if (*(data + i) != '"')
+                       continue;
+
+               for (j = 1; j < sizeof(parts) / sizeof(parts[0]); j++)
+                       if (!strncmp(data, parts[j], i))
+                               st.parttype = j;
+
+               break;
+       }
+
+       return 0;
+}
+
+static int
+data_begin_cb(multipart_parser *p)
+{
+       char tmpname[24] = "/tmp/luci-upload.XXXXXX";
+
+       if (st.parttype == PART_FILEDATA)
+       {
+               if (!st.sessionid)
+                       return response(false, "File data without session");
+
+               if (!st.filename)
+                       return response(false, "File data without name");
+
+               st.tempfd = mkstemp(tmpname);
+
+               if (st.tempfd < 0)
+                       return response(false, "Failed to create temporary file");
+
+               unlink(tmpname);
+       }
+
+       return 0;
+}
+
+static int
+data_cb(multipart_parser *p, const char *data, size_t len)
+{
+       switch (st.parttype)
+       {
+       case PART_SESSIONID:
+               st.sessionid = datadup(data, len);
+               break;
+
+       case PART_FILENAME:
+               st.filename = datadup(data, len);
+               break;
+
+       case PART_FILEMODE:
+               st.filemode = strtoul(data, NULL, 8);
+               break;
+
+       case PART_FILEDATA:
+               if (write(st.tempfd, data, len) != len)
+               {
+                       close(st.tempfd);
+                       return response(false, "I/O failure while writing temporary file");
+               }
+
+               if (!st.filedata)
+                       st.filedata = !!len;
+
+               break;
+
+       default:
+               break;
+       }
+
+       return 0;
+}
+
+static int
+data_end_cb(multipart_parser *p)
+{
+       if (st.parttype == PART_SESSIONID)
+       {
+               if (!session_access(st.sessionid, "upload", "write"))
+               {
+                       errno = EPERM;
+                       return response(false, "Upload permission denied");
+               }
+       }
+       else if (st.parttype == PART_FILEDATA)
+       {
+               if (st.tempfd < 0)
+                       return response(false, "Internal program failure");
+
+#if 0
+               /* prepare directory */
+               for (ptr = st.filename; *ptr; ptr++)
+               {
+                       if (*ptr == '/')
+                       {
+                               *ptr = 0;
+
+                               if (mkdir(st.filename, 0755))
+                               {
+                                       unlink(st.tmpname);
+                                       return response(false, "Failed to create destination directory");
+                               }
+
+                               *ptr = '/';
+                       }
+               }
+#endif
+
+               if (filecopy())
+                       return -1;
+
+               return response(true, NULL);
+       }
+
+       st.parttype = PART_UNKNOWN;
+       return 0;
+}
+
+static multipart_parser *
+init_parser(void)
+{
+       char *boundary;
+       const char *var;
+
+       multipart_parser *p;
+       static multipart_parser_settings s = {
+               .on_part_data        = data_cb,
+               .on_headers_complete = data_begin_cb,
+               .on_part_data_end    = data_end_cb,
+               .on_header_field     = header_field,
+               .on_header_value     = header_value
+       };
+
+       var = getenv("CONTENT_TYPE");
+
+       if (!var || strncmp(var, "multipart/form-data;", 20))
+               return NULL;
+
+       for (var += 20; *var && *var != '='; var++);
+
+       if (*var++ != '=')
+               return NULL;
+
+       boundary = malloc(strlen(var) + 3);
+
+       if (!boundary)
+               return NULL;
+
+       strcpy(boundary, "--");
+       strcpy(boundary + 2, var);
+
+       st.tempfd = -1;
+       st.filefd = -1;
+       st.filemode = 0600;
+
+       p = multipart_parser_init(boundary, &s);
+
+       free(boundary);
+
+       return p;
+}
+
+static int
+main_upload(int argc, char *argv[])
+{
+       int rem, len;
+       char buf[4096];
+       multipart_parser *p;
+
+       p = init_parser();
+
+       if (!p)
+       {
+               errno = EINVAL;
+               return response(false, "Invalid request");
+       }
+
+       while ((len = read(0, buf, sizeof(buf))) > 0)
+       {
+               rem = multipart_parser_execute(p, buf, len);
+
+               if (rem < len)
+                       break;
+       }
+
+       multipart_parser_free(p);
+
+       /* read remaining post data */
+       while ((len = read(0, buf, sizeof(buf))) > 0);
+
+       return 0;
+}
+
+static int
+main_backup(int argc, char **argv)
+{
+       pid_t pid;
+       time_t now;
+       int len;
+       int fds[2];
+       char buf[4096];
+       char datestr[16] = { 0 };
+       char hostname[64] = { 0 };
+       char *fields[] = { "sessionid", NULL };
+
+       if (!postdecode(fields, 1) || !session_access(fields[1], "backup", "read"))
+               return failure(0, "Backup permission denied");
+
+       if (pipe(fds))
+               return failure(errno, "Failed to spawn pipe");
+
+       switch ((pid = fork()))
+       {
+       case -1:
+               return failure(errno, "Failed to fork process");
+
+       case 0:
+               dup2(fds[1], 1);
+
+               close(0);
+               close(2);
+               close(fds[0]);
+               close(fds[1]);
+
+               chdir("/");
+
+               execl("/sbin/sysupgrade", "/sbin/sysupgrade",
+                     "--create-backup", "-", NULL);
+
+               return -1;
+
+       default:
+               now = time(NULL);
+               strftime(datestr, sizeof(datestr) - 1, "%Y-%m-%d", localtime(&now));
+
+               if (gethostname(hostname, sizeof(hostname) - 1))
+                       sprintf(hostname, "OpenWrt");
+
+               printf("Status: 200 OK\r\n");
+               printf("Content-Type: application/x-targz\r\n");
+               printf("Content-Disposition: attachment; "
+                      "filename=\"backup-%s-%s.tar.gz\"\r\n\r\n", hostname, datestr);
+
+               while ((len = read(fds[0], buf, sizeof(buf))) > 0)
+                       fwrite(buf, len, 1, stdout);
+
+               waitpid(pid, NULL, 0);
+
+               close(fds[0]);
+               close(fds[1]);
+
+               return 0;
+       }
+}
+
+int main(int argc, char **argv)
+{
+       if (strstr(argv[0], "cgi-upload"))
+               return main_upload(argc, argv);
+       else if (strstr(argv[0], "cgi-backup"))
+               return main_backup(argc, argv);
+
+       return -1;
+}
diff --git a/net/cgi-io/src/multipart_parser.c b/net/cgi-io/src/multipart_parser.c
new file mode 100644 (file)
index 0000000..ee82c82
--- /dev/null
@@ -0,0 +1,309 @@
+/* Based on node-formidable by Felix Geisendörfer
+ * Igor Afonov - afonov@gmail.com - 2012
+ * MIT License - http://www.opensource.org/licenses/mit-license.php
+ */
+
+#include "multipart_parser.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <string.h>
+
+static void multipart_log(const char * format, ...)
+{
+#ifdef DEBUG_MULTIPART
+    va_list args;
+    va_start(args, format);
+
+    fprintf(stderr, "[HTTP_MULTIPART_PARSER] %s:%d: ", __FILE__, __LINE__);
+    vfprintf(stderr, format, args);
+    fprintf(stderr, "\n");
+#endif
+}
+
+#define NOTIFY_CB(FOR)                                                 \
+do {                                                                   \
+  if (p->settings->on_##FOR) {                                         \
+    if (p->settings->on_##FOR(p) != 0) {                               \
+      return i;                                                        \
+    }                                                                  \
+  }                                                                    \
+} while (0)
+
+#define EMIT_DATA_CB(FOR, ptr, len)                                    \
+do {                                                                   \
+  if (p->settings->on_##FOR) {                                         \
+    if (p->settings->on_##FOR(p, ptr, len) != 0) {                     \
+      return i;                                                        \
+    }                                                                  \
+  }                                                                    \
+} while (0)
+
+
+#define LF 10
+#define CR 13
+
+struct multipart_parser {
+  void * data;
+
+  size_t index;
+  size_t boundary_length;
+
+  unsigned char state;
+
+  const multipart_parser_settings* settings;
+
+  char* lookbehind;
+  char multipart_boundary[1];
+};
+
+enum state {
+  s_uninitialized = 1,
+  s_start,
+  s_start_boundary,
+  s_header_field_start,
+  s_header_field,
+  s_headers_almost_done,
+  s_header_value_start,
+  s_header_value,
+  s_header_value_almost_done,
+  s_part_data_start,
+  s_part_data,
+  s_part_data_almost_boundary,
+  s_part_data_boundary,
+  s_part_data_almost_end,
+  s_part_data_end,
+  s_part_data_final_hyphen,
+  s_end
+};
+
+multipart_parser* multipart_parser_init
+    (const char *boundary, const multipart_parser_settings* settings) {
+
+  multipart_parser* p = malloc(sizeof(multipart_parser) +
+                               strlen(boundary) +
+                               strlen(boundary) + 9);
+
+  strcpy(p->multipart_boundary, boundary);
+  p->boundary_length = strlen(boundary);
+
+  p->lookbehind = (p->multipart_boundary + p->boundary_length + 1);
+
+  p->index = 0;
+  p->state = s_start;
+  p->settings = settings;
+
+  return p;
+}
+
+void multipart_parser_free(multipart_parser* p) {
+  free(p);
+}
+
+void multipart_parser_set_data(multipart_parser *p, void *data) {
+    p->data = data;
+}
+
+void *multipart_parser_get_data(multipart_parser *p) {
+    return p->data;
+}
+
+size_t multipart_parser_execute(multipart_parser* p, const char *buf, size_t len) {
+  size_t i = 0;
+  size_t mark = 0;
+  char c, cl;
+  int is_last = 0;
+
+  while(i < len) {
+    c = buf[i];
+    is_last = (i == (len - 1));
+    switch (p->state) {
+      case s_start:
+        multipart_log("s_start");
+        p->index = 0;
+        p->state = s_start_boundary;
+
+      /* fallthrough */
+      case s_start_boundary:
+        multipart_log("s_start_boundary");
+        if (p->index == p->boundary_length) {
+          if (c != CR) {
+            return i;
+          }
+          p->index++;
+          break;
+        } else if (p->index == (p->boundary_length + 1)) {
+          if (c != LF) {
+            return i;
+          }
+          p->index = 0;
+          NOTIFY_CB(part_data_begin);
+          p->state = s_header_field_start;
+          break;
+        }
+        if (c != p->multipart_boundary[p->index]) {
+          return i;
+        }
+        p->index++;
+        break;
+
+      case s_header_field_start:
+        multipart_log("s_header_field_start");
+        mark = i;
+        p->state = s_header_field;
+
+      /* fallthrough */
+      case s_header_field:
+        multipart_log("s_header_field");
+        if (c == CR) {
+          p->state = s_headers_almost_done;
+          break;
+        }
+
+        if (c == '-') {
+          break;
+        }
+
+        if (c == ':') {
+          EMIT_DATA_CB(header_field, buf + mark, i - mark);
+          p->state = s_header_value_start;
+          break;
+        }
+
+        cl = tolower(c);
+        if (cl < 'a' || cl > 'z') {
+          multipart_log("invalid character in header name");
+          return i;
+        }
+        if (is_last)
+            EMIT_DATA_CB(header_field, buf + mark, (i - mark) + 1);
+        break;
+
+      case s_headers_almost_done:
+        multipart_log("s_headers_almost_done");
+        if (c != LF) {
+          return i;
+        }
+
+        p->state = s_part_data_start;
+        break;
+
+      case s_header_value_start:
+        multipart_log("s_header_value_start");
+        if (c == ' ') {
+          break;
+        }
+
+        mark = i;
+        p->state = s_header_value;
+
+      /* fallthrough */
+      case s_header_value:
+        multipart_log("s_header_value");
+        if (c == CR) {
+          EMIT_DATA_CB(header_value, buf + mark, i - mark);
+          p->state = s_header_value_almost_done;
+        }
+        if (is_last)
+            EMIT_DATA_CB(header_value, buf + mark, (i - mark) + 1);
+        break;
+
+      case s_header_value_almost_done:
+        multipart_log("s_header_value_almost_done");
+        if (c != LF) {
+          return i;
+        }
+        p->state = s_header_field_start;
+        break;
+
+      case s_part_data_start:
+        multipart_log("s_part_data_start");
+        NOTIFY_CB(headers_complete);
+        mark = i;
+        p->state = s_part_data;
+
+      /* fallthrough */
+      case s_part_data:
+        multipart_log("s_part_data");
+        if (c == CR) {
+            EMIT_DATA_CB(part_data, buf + mark, i - mark);
+            mark = i;
+            p->state = s_part_data_almost_boundary;
+            p->lookbehind[0] = CR;
+            break;
+        }
+        if (is_last)
+            EMIT_DATA_CB(part_data, buf + mark, (i - mark) + 1);
+        break;
+
+      case s_part_data_almost_boundary:
+        multipart_log("s_part_data_almost_boundary");
+        if (c == LF) {
+            p->state = s_part_data_boundary;
+            p->lookbehind[1] = LF;
+            p->index = 0;
+            break;
+        }
+        EMIT_DATA_CB(part_data, p->lookbehind, 1);
+        p->state = s_part_data;
+        mark = i --;
+        break;
+
+      case s_part_data_boundary:
+        multipart_log("s_part_data_boundary");
+        if (p->multipart_boundary[p->index] != c) {
+          EMIT_DATA_CB(part_data, p->lookbehind, 2 + p->index);
+          p->state = s_part_data;
+          mark = i --;
+          break;
+        }
+        p->lookbehind[2 + p->index] = c;
+        if ((++ p->index) == p->boundary_length) {
+            NOTIFY_CB(part_data_end);
+            p->state = s_part_data_almost_end;
+        }
+        break;
+
+      case s_part_data_almost_end:
+        multipart_log("s_part_data_almost_end");
+        if (c == '-') {
+            p->state = s_part_data_final_hyphen;
+            break;
+        }
+        if (c == CR) {
+            p->state = s_part_data_end;
+            break;
+        }
+        return i;
+
+      case s_part_data_final_hyphen:
+        multipart_log("s_part_data_final_hyphen");
+        if (c == '-') {
+            NOTIFY_CB(body_end);
+            p->state = s_end;
+            break;
+        }
+        return i;
+
+      case s_part_data_end:
+        multipart_log("s_part_data_end");
+        if (c == LF) {
+            p->state = s_header_field_start;
+            NOTIFY_CB(part_data_begin);
+            break;
+        }
+        return i;
+
+      case s_end:
+        multipart_log("s_end: %02X", (int) c);
+        break;
+
+      default:
+        multipart_log("Multipart parser unrecoverable error");
+        return 0;
+    }
+    ++ i;
+  }
+
+  return len;
+}
diff --git a/net/cgi-io/src/multipart_parser.h b/net/cgi-io/src/multipart_parser.h
new file mode 100644 (file)
index 0000000..87e67f4
--- /dev/null
@@ -0,0 +1,48 @@
+/* Based on node-formidable by Felix Geisendörfer
+ * Igor Afonov - afonov@gmail.com - 2012
+ * MIT License - http://www.opensource.org/licenses/mit-license.php
+ */
+#ifndef _multipart_parser_h
+#define _multipart_parser_h
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdlib.h>
+#include <ctype.h>
+
+typedef struct multipart_parser multipart_parser;
+typedef struct multipart_parser_settings multipart_parser_settings;
+typedef struct multipart_parser_state multipart_parser_state;
+
+typedef int (*multipart_data_cb) (multipart_parser*, const char *at, size_t length);
+typedef int (*multipart_notify_cb) (multipart_parser*);
+
+struct multipart_parser_settings {
+  multipart_data_cb on_header_field;
+  multipart_data_cb on_header_value;
+  multipart_data_cb on_part_data;
+
+  multipart_notify_cb on_part_data_begin;
+  multipart_notify_cb on_headers_complete;
+  multipart_notify_cb on_part_data_end;
+  multipart_notify_cb on_body_end;
+};
+
+multipart_parser* multipart_parser_init
+    (const char *boundary, const multipart_parser_settings* settings);
+
+void multipart_parser_free(multipart_parser* p);
+
+size_t multipart_parser_execute(multipart_parser* p, const char *buf, size_t len);
+
+void multipart_parser_set_data(multipart_parser* p, void* data);
+void * multipart_parser_get_data(multipart_parser* p);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
index 10a41b91e942638b8d400132c447fd96e7a42677..fac9737e0d54f123d033b032c2ae587e37588e0c 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=e2guardian
-PKG_VERSION:=3.1.2
+PKG_VERSION:=3.2.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=v$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/e2guardian/e2guardian/archive/
-PKG_MD5SUM:=85cfa16074737dbc3935f93dfcded285
+PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/archive/
+PKG_MD5SUM:=70613669ef00a480e3ebb62e12427cf4
+
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -53,6 +54,7 @@ CONFIGURE_ARGS += \
                --enable-sslmitm=no
 
 define Build/Configure
+       ( cd $(PKG_BUILD_DIR); ./autogen.sh )
        $(call Build/Configure/Default,$CONFIGURE_ARGS)
 endef
 
index 86e6c52afb096f0061993779c7af8807072f57f8..9b59d59c2cdd1ef3b875b3db1d891805303afec6 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openvswitch
 
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=2.4.0
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 PKG_LICENSE:=Apache-2.0
@@ -21,7 +21,7 @@ PKG_USE_MIPS16:=0
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/openvswitch/ovs
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=1b05a9d3298f92525d1c2d91bec11abf0766fdf1
+PKG_SOURCE_VERSION:=b979c282ef040a20d09b8d6885648b09352f05db
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 PKG_BUILD_PARALLEL:=1
diff --git a/net/openvswitch/patches/0005-add-wait-any-define-in-test-ovn.patch b/net/openvswitch/patches/0005-add-wait-any-define-in-test-ovn.patch
deleted file mode 100644 (file)
index d6dd6a1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/tests/test-ovn.c b/tests/test-ovn.c
-index 60b87de..4ad3697 100644
---- a/tests/test-ovn.c
-+++ b/tests/test-ovn.c
-@@ -974,6 +974,9 @@ test_tree_shape_exhaustively(struct expr *expr, struct shash *symtab,
- }
- #ifndef _WIN32
-+#ifndef WAIT_ANY
-+#define WAIT_ANY   (-1)
-+#endif
- static void
- wait_pid(pid_t *pids, int *n)
- {
diff --git a/net/openvswitch/patches/0005-datapath-Add-net-ip6_checksum.h-to-stt.c.patch b/net/openvswitch/patches/0005-datapath-Add-net-ip6_checksum.h-to-stt.c.patch
new file mode 100644 (file)
index 0000000..61504d2
--- /dev/null
@@ -0,0 +1,34 @@
+From 554daf066bf4a8eb7bbc8edc1a877a3afc0de38d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jason=20K=C3=B6lker?= <jason@koelker.net>
+Date: Wed, 2 Sep 2015 22:40:24 +0000
+Subject: [PATCH] datapath: Add net/ip6_checksum.h to stt.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+`csum_ipv6_magic` is an asm inline on most platforms. However if it is
+not defined (like on ppc64le) including <net/ip6_checksum.h> will fall
+back to the c implementation by wrapping it in an
+`#ifndef _HAVE_ARCH_IPV6_CSUM`.
+
+Signed-off-by: Jason Kölker <jason@koelker.net>
+Signed-off-by: Jesse Gross <jesse@nicira.com>
+---
+ datapath/linux/compat/stt.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
+index b44f470..dd21753 100644
+--- a/datapath/linux/compat/stt.c
++++ b/datapath/linux/compat/stt.c
+@@ -30,6 +30,7 @@
+ #include <net/icmp.h>
+ #include <net/inet_ecn.h>
+ #include <net/ip.h>
++#include <net/ip6_checksum.h>
+ #include <net/net_namespace.h>
+ #include <net/netns/generic.h>
+ #include <net/sock.h>
+-- 
+2.1.4
+
diff --git a/net/openvswitch/patches/0006-force-kernel-4-1.patch b/net/openvswitch/patches/0006-force-kernel-4-1.patch
new file mode 100644 (file)
index 0000000..d87fd90
--- /dev/null
@@ -0,0 +1,17 @@
+diff --git a/acinclude.m4 b/acinclude.m4
+index 45cfaf6..42866de 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
+     AC_MSG_RESULT([$kversion])
+     if test "$version" -ge 4; then
+-       if test "$version" = 4 && test "$patchlevel" -le 0; then
++       if test "$version" = 4 && test "$patchlevel" -le 1; then
+           : # Linux 4.x
+        else
+-          AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.0.x is not supported (please refer to the FAQ for advice)])
++          AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.1.x is not supported (please refer to the FAQ for advice)])
+        fi
+     elif test "$version" = 3; then
+        : # Linux 3.x
diff --git a/net/openvswitch/patches/0007-add-netns-compat.patch b/net/openvswitch/patches/0007-add-netns-compat.patch
new file mode 100644 (file)
index 0000000..b6592c8
--- /dev/null
@@ -0,0 +1,93 @@
+diff --git a/datapath/datapath.h b/datapath/datapath.h
+index fdf35f0..02be8be 100644
+--- a/datapath/datapath.h
++++ b/datapath/datapath.h
+@@ -86,10 +86,8 @@ struct datapath {
+       /* Stats. */
+       struct dp_stats_percpu __percpu *stats_percpu;
+-#ifdef CONFIG_NET_NS
+       /* Network namespace ref. */
+-      struct net *net;
+-#endif
++      possible_net_t net;
+       u32 user_features;
+ };
+@@ -154,12 +152,12 @@ int lockdep_ovsl_is_held(void);
+ static inline struct net *ovs_dp_get_net(const struct datapath *dp)
+ {
+-      return read_pnet(&dp->net);
++      return ovs_compat_read_pnet(&dp->net);
+ }
+ static inline void ovs_dp_set_net(struct datapath *dp, struct net *net)
+ {
+-      write_pnet(&dp->net, net);
++      ovs_compat_write_pnet(&dp->net, net);
+ }
+ struct vport *ovs_lookup_vport(const struct datapath *dp, u16 port_no);
+diff --git a/datapath/linux/compat/include/net/net_namespace.h b/datapath/linux/compat/include/net/net_namespace.h
+index b7dbfe3..7763584 100644
+--- a/datapath/linux/compat/include/net/net_namespace.h
++++ b/datapath/linux/compat/include/net/net_namespace.h
+@@ -51,4 +51,57 @@ static void rpl_unregister_pernet_gen_##TYPE(struct rpl_pernet_operations *rpl_p
+ #define DEFINE_COMPAT_PNET_REG_FUNC(TYPE)
+ #endif /* 2.6.33 */
++/* In recent kernel versions (4.1) this type is defined ; for older versions we have to define it */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++#define ovs_compat_read_pnet  read_pnet
++#define ovs_compat_write_pnet write_pnet
++
++#if defined(CONFIG_NET_NS) && defined(NETNS_REFCNT_DEBUG)
++static inline struct net *hold_net(struct net *net)
++{
++      if (net)
++              atomic_inc(&net->use_count);
++      return net;
++}
++
++static inline void release_net(struct net *net)
++{
++      if (net)
++              atomic_dec(&net->use_count);
++}
++#else
++static inline struct net *hold_net(struct net *net)
++{
++      return net;
++}
++
++static inline void release_net(struct net *net)
++{
++}
++#endif
++
++#else /* lower than 4.1 */
++typedef struct {
++#ifdef CONFIG_NET_NS
++      struct net *net;
++#endif
++} possible_net_t;
++
++static inline void ovs_compat_write_pnet(possible_net_t *pnet, struct net *net)
++{
++#ifdef CONFIG_NET_NS
++      pnet->net = net;
++#endif
++}
++
++static inline struct net *ovs_compat_read_pnet(const possible_net_t *pnet)
++{
++#ifdef CONFIG_NET_NS
++      return pnet->net;
++#else
++      return &init_net;
++#endif
++}
++#endif /* 4.1.0 */
++
+ #endif /* net/net_namespace.h wrapper */
diff --git a/net/openvswitch/patches/0008-add-back-old-gfp-this-node-define.patch b/net/openvswitch/patches/0008-add-back-old-gfp-this-node-define.patch
new file mode 100644 (file)
index 0000000..ec7d325
--- /dev/null
@@ -0,0 +1,19 @@
+diff --git a/datapath/flow.c b/datapath/flow.c
+index a7a2063..8db8041 100644
+--- a/datapath/flow.c
++++ b/datapath/flow.c
+@@ -51,6 +51,14 @@
+ #include "vlan.h"
++#ifndef GFP_THISNODE
++#ifdef CONFIG_NUMA  
++#define GFP_THISNODE    (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY)
++#else                             
++#define GFP_THISNODE    ((__force gfp_t)0)
++#endif 
++#endif
++
+ u64 ovs_flow_used_time(unsigned long flow_jiffies)
+ {
+       struct timespec cur_ts;
diff --git a/net/openvswitch/patches/0010-patch-nf_ip_hook-4.1.patch b/net/openvswitch/patches/0010-patch-nf_ip_hook-4.1.patch
new file mode 100644 (file)
index 0000000..46c3432
--- /dev/null
@@ -0,0 +1,20 @@
+diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
+index b44f470..f95416e 100644
+--- a/datapath/linux/compat/stt.c
++++ b/datapath/linux/compat/stt.c
+@@ -1326,9 +1326,14 @@ static void clean_percpu(struct work_struct *work)
+ static unsigned int nf_ip_hook(FIRST_PARAM
+                              struct sk_buff *skb,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++                             const struct nf_hook_state *state
++#else
+                              const struct net_device *in,
+                              const struct net_device *out,
+-                             int (*okfn)(struct sk_buff *))
++                             int (*okfn)(struct sk_buff *)
++#endif
++                             )
+ {
+       struct stt_sock *stt_sock;
+       int ip_hdr_len;
diff --git a/net/openvswitch/patches/0011-fix-vxlan-xmit-skb-4.1.patch b/net/openvswitch/patches/0011-fix-vxlan-xmit-skb-4.1.patch
new file mode 100644 (file)
index 0000000..1aecdab
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/datapath/linux/compat/include/net/vxlan.h b/datapath/linux/compat/include/net/vxlan.h
+index 0d60c18..db4dfb6 100644
+--- a/datapath/linux/compat/include/net/vxlan.h
++++ b/datapath/linux/compat/include/net/vxlan.h
+@@ -99,8 +99,13 @@ static inline int rpl_vxlan_xmit_skb(struct vxlan_sock *vs,
+               return -ENOSYS;
+       }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++      return vxlan_xmit_skb(rt, vs->sock->sk, skb, src, dst, tos, ttl, df,
++                            src_port, dst_port, md, xnet, vxflags);
++#else
+       return vxlan_xmit_skb(rt, skb, src, dst, tos, ttl, df,
+                             src_port, dst_port, md, xnet, vxflags);
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)  */
+ }
+ #define vxlan_xmit_skb rpl_vxlan_xmit_skb
diff --git a/net/openvswitch/patches/0012-fix-vport-lisp-4.1.patch b/net/openvswitch/patches/0012-fix-vport-lisp-4.1.patch
new file mode 100644 (file)
index 0000000..47bbfb4
--- /dev/null
@@ -0,0 +1,16 @@
+diff --git a/datapath/vport-lisp.c b/datapath/vport-lisp.c
+index 0024eb4..ce1c3a8 100644
+--- a/datapath/vport-lisp.c
++++ b/datapath/vport-lisp.c
+@@ -455,7 +455,11 @@ static int lisp_send(struct vport *vport, struct sk_buff *skb)
+       ovs_skb_set_inner_protocol(skb, skb->protocol);
+       df = tun_key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
++      sent_len = udp_tunnel_xmit_skb(rt, lisp_port->lisp_rcv_socket->sk, skb, saddr, tun_key->ipv4_dst,
++#else
+       sent_len = udp_tunnel_xmit_skb(rt, skb, saddr, tun_key->ipv4_dst,
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)  */
+                                      tun_key->ipv4_tos, tun_key->ipv4_ttl,
+                                      df, src_port, dst_port, false, true);
index 79843dab0d06c979e911554dddf696e41e63c1b9..38c1cd703284d49944519c0063b71ac1a458d645 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squid
-PKG_VERSION:=3.5.6
+PKG_VERSION:=3.5.9
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
@@ -16,7 +16,7 @@ PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v3/3.5/
-PKG_MD5SUM:=93e18bd257857e35bb634ddb8a348563
+PKG_MD5SUM:=fe7306a90a0ba2fc906e9a8c741cc8ea
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
diff --git a/net/u2pnpd/Makefile b/net/u2pnpd/Makefile
new file mode 100644 (file)
index 0000000..f859d3b
--- /dev/null
@@ -0,0 +1,63 @@
+#
+# Copyright (C) 2015 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:=u2pnpd
+PKG_VERSION:=0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/mhei/u2pnpd/releases/download/v$(PKG_VERSION)
+PKG_MD5SUM:=a98089923d93803fa90d03a504c98b8e
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/u2pnpd
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Announce device via UPnP on the network
+  URL:=https://github.com/mhei/u2pnpd
+  DEPENDS:=+libupnp
+endef
+
+define Package/u2pnpd/description
+  This tools announces a device via UPnP on the local network, thus it is possible
+  to find it within the network neightboorhood of a well-known OS and the user
+  can easily double-click on an icon to open the web frontend of this device without
+  knowing the IP address.
+endef
+
+define Package/u2pnpd/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/u2pnpd $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/u2pnpd.init $(1)/etc/init.d/u2pnpd
+
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_DATA) ./files/u2pnpd.defaults $(1)/etc/uci-defaults/u2pnpd
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/u2pnpd.config $(1)/etc/config/u2pnpd
+endef
+
+define Package/u2pnpd/postinst
+#!/bin/sh
+[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/u2pnpd) && rm -f /etc/uci-defaults/u2pnpd
+exit 0
+endef
+
+$(eval $(call BuildPackage,u2pnpd))
diff --git a/net/u2pnpd/files/u2pnpd.config b/net/u2pnpd/files/u2pnpd.config
new file mode 100644 (file)
index 0000000..8c0d561
--- /dev/null
@@ -0,0 +1,11 @@
+config u2pnpd
+#      option interface        br-lan
+#      option use_https        no
+#      option manufacturer     'OpenWrt'
+#      option manufacturerURL  'http://www.openwrt.org/'
+#      option modelDescription ''
+#      option modelName        'Generic'
+#      option modelNumber      ''
+#      option modelURL         ''
+#      option serialNumber     ''
+#      option uuid             ''
diff --git a/net/u2pnpd/files/u2pnpd.defaults b/net/u2pnpd/files/u2pnpd.defaults
new file mode 100644 (file)
index 0000000..322b0bc
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+uuid=$(cat /proc/sys/kernel/random/uuid)
+
+uci -q batch <<-EOF >/dev/null
+       set u2pnpd.@u2pnpd[0].uuid=$uuid
+       commit u2pnpd
+EOF
+
+exit 0
diff --git a/net/u2pnpd/files/u2pnpd.init b/net/u2pnpd/files/u2pnpd.init
new file mode 100644 (file)
index 0000000..01437fd
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2015 OpenWrt.org
+
+START=50
+STOP=20
+
+SERVICE_DAEMONIZE=1
+SERVICE_PID_FILE=/var/run/u2pnpd.pid
+SERVICE_USE_PID=1
+SERVICE_WRITE_PID=1
+
+start_instance() {
+       local section="$1"
+       local enabled
+       local interface manufacturer manufacturerURL modelDescription
+       local modelName modelNumber modelURL serialNumber friendlyName
+       local uuid httpsURL
+       local i
+
+       config_get_bool enabled "$section" 'enabled' 1
+       [ "$enabled" -gt 0 ] || return 0
+
+       for i in interface httpsURL manufacturer manufacturerURL modelDescription \
+                modelName modelNumber modelURL serialNumber friendlyName uuid; do
+               config_get "$i" "$section" "$i"
+       done
+
+       [ -n "$interface" ] && SERVICE_PID_FILE="/var/run/u2pnpd.$interface.pid"
+
+       service_start /usr/bin/u2pnpd ${httpsURL:+-s} \
+           ${interface:+--interface="$interface"} \
+           ${manufacturer:+--manufacturer="$manufacturer"} \
+           ${manufacturerURL:+--manufacturerURL="$manufacturerURL"} \
+           ${modelDescription:+--modelDescription="$modelDescription"} \
+           ${modelName:+--modelName="$modelName"} \
+           ${modelNumber:+--modelNumber="$modelNumber"} \
+           ${modelURL:+--modelURL="$modelURL"} \
+           ${serialNumber:+--serialNumber="$serialNumber"} \
+           ${friendlyName:+--friendlyName="$friendlyName"} \
+           ${uuid:+--uuid="$uuid"}
+}
+
+stop_instance() {
+       local section="$1"
+       local interface
+
+       config_get interface "$section" 'interface'
+       [ -n "$interface" ] && SERVICE_PID_FILE="/var/run/u2pnpd.$interface.pid"
+
+       service_stop /usr/bin/u2pnpd
+       rm -f "$SERVICE_PID_FILE"
+}
+
+start() {
+       config_load 'u2pnpd'
+       config_foreach start_instance 'u2pnpd'
+}
+
+stop() {
+       config_load 'u2pnpd'
+       config_foreach stop_instance 'u2pnpd'
+}
index f46cec615840654d02accb19e76c4859c2338fab..91dcbfb037228b41e9e0c03334fe1c1f488d6065 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xl2tpd
-PKG_VERSION:=devel-20150812
+PKG_VERSION:=devel-20150930
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 PKG_LICENSE:=GPL-2.0
@@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=5674a5835e9b89b7438917a380f3a6d68528fa3e
+PKG_SOURCE_VERSION:=5faece38704ae32063abe1d25e199c03e6f44669
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
 PKG_INSTALL:=1
index 74a3fd781b3936b70cb6f6f755032e6c0c57565e..81ba7b6984a859b19ced34fbfbb979d8d9bfc339 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairplay
-PKG_VERSION:=2014-10-27
-PKG_RELEASE:=2
+PKG_VERSION:=2015-09-29
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/juhovh/shairplay.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=64d59e3087f829006d091fa0d114efb50972a2bf
+PKG_SOURCE_VERSION:=498bc5bcdd305e04721f94a04b9f26a7da72673f
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
index 7764aabc64b1c5b0e0b05bb9f77dca94ee8dc6b8..4db204eb7dba87faf9f5d3712b5a93b1a96df10d 100644 (file)
@@ -1,24 +1,11 @@
 --- a/src/lib/alac/alac.c
 +++ b/src/lib/alac/alac.c
-@@ -29,11 +29,7 @@
+@@ -29,7 +29,7 @@
   *
   */
  
--#ifdef __BIG_ENDIAN__
--static const int host_bigendian = 1;
--#else
 -static const int host_bigendian = 0;
--#endif
-+static int host_bigendian = 0;
++#define host_bigendian (htonl(42) == 42)
  
  #include <stdio.h>
  #include <stdlib.h>
-@@ -1181,6 +1177,8 @@ alac_file *create_alac(int samplesize, i
- {
-     alac_file *newfile = malloc(sizeof(alac_file));
-+    host_bigendian = (htonl(42) == 42);
-+
-     newfile->samplesize = samplesize;
-     newfile->numchannels = numchannels;
-     newfile->bytespersample = (samplesize / 8) * numchannels;
index 03f30014846c5e92dd74b05ed9dbacf93fe1d5d4..2bfc749fcfe8c1fcbc665aae0d322bb0821622a0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=5.5.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://collectd.org/files/
@@ -185,6 +185,7 @@ CONFIGURE_ARGS+= \
        --disable-debug \
        --enable-daemon \
        --with-nan-emulation \
+       --with-perl-bindings= \
        --without-libgcrypt
 
 CONFIGURE_VARS+= \
@@ -314,7 +315,7 @@ $(eval $(call BuildPlugin,madwifi,MadWifi status input,madwifi,))
 #$(eval $(call BuildPlugin,mysql,MySQL status input,mysql,+PACKAGE_collectd-mod-mysql:libmysqlclient-r))
 $(eval $(call BuildPlugin,memory,physical memory usage input,memory,))
 $(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus))
-$(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:ip @BROKEN))
+$(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:libmnl))
 $(eval $(call BuildPlugin,network,network input/output,network))
 $(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl))
 $(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,))
diff --git a/utils/collectd/patches/500-upstream-parallel-build-fix.patch b/utils/collectd/patches/500-upstream-parallel-build-fix.patch
new file mode 100644 (file)
index 0000000..a10fbbb
--- /dev/null
@@ -0,0 +1,17 @@
+Backport of 780e6a76021a240e95007a04b723d827120afa95
+Subject: [PATCH] build: add libavltree, libcommon & libheap dependencies
+
+Otherwise it can break on very parallel builds since collectd link time
+arrives before one or more of these were built.
+
+--- a/src/daemon/Makefile.am
++++ b/src/daemon/Makefile.am
+@@ -49,7 +49,7 @@ collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LT
+ collectd_CFLAGS = $(AM_CFLAGS)
+ collectd_LDFLAGS = -export-dynamic
+ collectd_LDADD = libavltree.la libcommon.la libheap.la -lm
+-collectd_DEPENDENCIES =
++collectd_DEPENDENCIES = libavltree.la libcommon.la libheap.la
+ # Link to these libraries..
+ if BUILD_WITH_LIBRT
index 5fa70ba3c6358cb1c28da08c143c1256b928e1a2..15e34362ef439d9d173408988c776802460d25c0 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 
 # Make sure to also update the dbus-x package
 PKG_NAME:=dbus
-PKG_VERSION:=1.9.20
+PKG_VERSION:=1.10.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/
-PKG_MD5SUM:=d5a6f0467612054d3bc7361e42ac6ee9
+PKG_MD5SUM:=5af6297348107a906c8449817a728b3b
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 PKG_LICENSE:=AFL-2.1
 
@@ -168,10 +168,10 @@ define Package/libdbus/install
 endef
 
 define Package/dbus/install
-       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DIR) $(1)/usr/share
        $(CP) \
-               $(PKG_INSTALL_DIR)/etc/dbus-1 \
-               $(1)/etc/
+               $(PKG_INSTALL_DIR)/usr/share/dbus-1 \
+               $(1)/usr/share/
 
        $(INSTALL_DIR) $(1)/usr/lib/dbus-1
        $(INSTALL_BIN) \
diff --git a/utils/dump1090/Config.in b/utils/dump1090/Config.in
deleted file mode 100644 (file)
index cee0aa5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-config DUMP1090_DUMP
-       bool "dump1090"
-       depends on PACKAGE_dump1090
-       default y
-       help
-               dump1090 ModeS Receiver
-
-config DUMP1090_WWW
-       bool "website files"
-       depends on DUMP1090_DUMP
-       default y
-       help
-               HTML website files for showing planes
-
-config DUMP1090_VIEW
-       bool "view1090"
-       depends on PACKAGE_dump1090
-       default n
-       help
-               view1090 dump1090 Viewer
index 82ce06a67ada4831b584a4f711eba7e5b931e6f9..6725664b9380dc24f255836ad70b55bec74be7ad 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013-2014 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,63 +8,68 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dump1090
-PKG_VERSION:=2014-11-09
-PKG_RELEASE:=$(PKG_SOURCE_VERSION)
+PKG_VERSION:=2015-09-28
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/MalcolmRobb/dump1090.git
+PKG_SOURCE_URL:=git://github.com/mutability/dump1090.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=bff92c4ad772a0a8d433f788d39dae97e00e4dbe
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_VERSION:=3b4c872ea67118de1399ba9979e71b504a36aca8
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
-PKG_LICENSE:=BSD-3c
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING LICENSE
 
-PKG_CONFIG_DEPENDS:= \
-       CONFIG_DUMP1090_DUMP \
-       CONFIG_DUMP1090_WWW \
-       CONFIG_DUMP1090_VIEW
+PKG_BUILD_DEPENDS:=librtlsdr
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/dump1090
+define Package/dump1090/Default
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Mode S decoder for the Realtek RTL2832U
-  URL:=https://github.com/MalcolmRobb/dump1090
-  DEPENDS:=+libpthread +librtlsdr
+  URL:=https://github.com/mutability/dump1090
+  DEPENDS:=+libpthread
+endef
+
+define Package/dump1090
+  $(call Package/dump1090/Default)
+  TITLE+= (dump1090)
+  DEPENDS+= +librtlsdr
 endef
 
-define Package/dump1090/config
-       source "$(SOURCE)/Config.in"
+define Package/view1090
+  $(call Package/dump1090/Default)
+  TITLE+= (view1090)
 endef
 
 define Package/dump1090/description
  Dump1090 is a Mode S decoder specifically designed for RTLSDR devices.
- Embedded HTTP server that displays the currently detected aircrafts on
- Google Maps. Network output in Basestation and AVR formats.
+endef
+
+define Package/view1090/description
+ View1090 is a Mode S messages viewer for dump1090 devices.
 endef
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS)"
 
 define Package/dump1090/install
-       $(INSTALL_DIR) $(1)/usr/bin
-
-ifneq ($(CONFIG_DUMP1090_DUMP),)
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/dump1090.init $(1)/etc/init.d/dump1090
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) files/dump1090.config $(1)/etc/config/dump1090
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dump1090 $(1)/usr/bin
-ifneq ($(CONFIG_DUMP1090_WWW),)
        $(INSTALL_DIR) $(1)/usr/share/dump1090
        $(CP) $(PKG_BUILD_DIR)/public_html/* $(1)/usr/share/dump1090
-endif
-endif
-ifneq ($(CONFIG_DUMP1090_VIEW),)
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dump1090 $(1)/usr/bin
+endef
+
+define Package/view1090/install
+       $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/view1090 $(1)/usr/bin
-endif
 endef
 
 $(eval $(call BuildPackage,dump1090))
+$(eval $(call BuildPackage,view1090))
index 53d40ef7f6b98fa7359b04265903f4c42a8bd427..8fd6d42955398bfed2e883ef8c38cfb62f7e85a3 100644 (file)
@@ -6,6 +6,8 @@ config dump1090 main
        option enable_agc '0'
        option freq ''
        option ifile ''
+       option iformat ''
+       option throttle '0'
        option raw '0'
        option net '1'
        option modeac '0'
@@ -18,12 +20,16 @@ config dump1090 main
        option net_sbs_port ''
        option net_bi_port ''
        option net_bo_port ''
+       option net_fatsv_port ''
        option net_ro_size ''
-       option net_ro_rate ''
+       option net_ro_interval ''
        option net_heartbeat ''
        option net_buffer ''
+       option net_verbatim '0'
+       option forward_mlat '0'
        option lat ''
        option lon ''
+       option max_range ''
        option fix '0'
        option no_fix '0'
        option no_crc_check '0'
@@ -31,9 +37,17 @@ config dump1090 main
        option agressive '0'
        option mlat '0'
        option stats '0'
+       option stats_range '0'
        option stats_every ''
        option onlyaddr '0'
        option metric '0'
        option snip ''
        option debug ''
        option ppm ''
+       option html_dir '/usr/share/dump1090'
+       option write_json ''
+       option write_json_every ''
+       option json_location_accuracy ''
+       option oversample '0'
+       option dcfilter '0'
+       option measure_noise '0'
index bc0755fb862423c527ceff87d5694aebf01b36a7..8a3e2b2330446e73613c9ea52f3643dd343e204f 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
 
 START=90
 STOP=10
@@ -44,6 +44,8 @@ start_instance() {
        append_bool "$cfg" enable_agc "--enable-agc"
        append_arg "$cfg" freq "--freq"
        append_arg "$cfg" ifile "--ifile"
+       append_arg "$cfg" iformat "--iformat"
+       append_bool "$cfg" throttle "--throttle"
        append_bool "$cfg" raw "--raw"
        append_bool "$cfg" net "--net"
        append_bool "$cfg" modeac "--modeac"
@@ -56,12 +58,16 @@ start_instance() {
        append_arg "$cfg" net_sbs_port "--net-sbs-port"
        append_arg "$cfg" net_bi_port "--net-bi-port"
        append_arg "$cfg" net_bo_port "--net-bo-port"
+       append_arg "$cfg" net_fatsv_port "net-fatsv-port"
        append_arg "$cfg" net_ro_size "--net-ro-size"
-       append_arg "$cfg" net_ro_rate "--net-ro-rate"
+       append_arg "$cfg" net_ro_interval "--net-ro-interval"
        append_arg "$cfg" net_heartbeat "--net-heartbeat"
        append_arg "$cfg" net_buffer "--net-buffer"
+       append_bool "$cfg" net_verbatim "--net-verbatim"
+       append_bool "$cfg" forward_mlat "--forward-mlat"
        append_arg "$cfg" lat "--lat"
        append_arg "$cfg" lon "--lon"
+       append_arg "$cfg" max_range "--max-range"
        append_bool "$cfg" fix "--fix"
        append_bool "$cfg" no_fix "--no-fix"
        append_bool "$cfg" no_crc_check "--no-crc-check"
@@ -69,12 +75,20 @@ start_instance() {
        append_bool "$cfg" agressive "--agressive"
        append_bool "$cfg" mlat "--mlat"
        append_bool "$cfg" stats "--stats"
+       append_bool "$cfg" stats_range "--stats-range"
        append_arg "$cfg" stats_every "--stats-every"
        append_bool "$cfg" onlyaddr "--onlyaddr"
        append_bool "$cfg" metric "--metric"
        append_arg "$cfg" snip "--snip"
        append_arg "$cfg" debug "--debug"
        append_arg "$cfg" ppm "--ppm"
+       append_arg "$cfg" html_dir "--html-dir"
+       append_arg "$cfg" write_json "--write-json"
+       append_arg "$cfg" write_json_every "write-json-every"
+       append_arg "$cfg" json_location_accuracy "--json-location-accuracy"
+       append_bool "$cfg" oversample "--oversample"
+       append_bool "$cfg" dcfilter "--dcfilter"
+       append_bool "$cfg" measure_noise "--measure-noise"
 
        config_get_bool aux "$cfg" 'respawn' '0'
        [ "$aux" = 1 ] && procd_set_param respawn
diff --git a/utils/dump1090/patches/100-html_dir.patch b/utils/dump1090/patches/100-html_dir.patch
deleted file mode 100644 (file)
index 8976057..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/dump1090.h
-+++ b/dump1090.h
-@@ -178,7 +178,7 @@
- #define MODES_NET_SNDBUF_MAX  (7)               
- #ifndef HTMLPATH
--#define HTMLPATH   "./public_html"      // default path for gmap.html etc
-+#define HTMLPATH   "/usr/share/dump1090"      // default path for gmap.html etc
- #endif
- #define MODES_NOTUSED(V) ((void) V)
index 868e100666b0fd1685e26eb1c2c6ee1401a3f34e..de9cecf1de4d5106e78361bfb8d9968bbddf14fc 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lxc
-PKG_VERSION:=1.1.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.1.3
+PKG_RELEASE:=1
 
 PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/
-PKG_MD5SUM:=3ebadacf5fe8bfe689fd7a09812b682c
+PKG_MD5SUM:=197abb5a28ab0b689c737eb1951023fb
 
 PKG_BUILD_DEPENDS:=lua
 PKG_BUILD_PARALLEL:=1
diff --git a/utils/lxc/patches/016-uninitialized-ret-in-monitor.patch b/utils/lxc/patches/016-uninitialized-ret-in-monitor.patch
deleted file mode 100644 (file)
index 7eca2ea..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/lxc/monitor.c
-+++ b/src/lxc/monitor.c
-@@ -181,7 +181,7 @@ int lxc_monitor_sock_name(const char *lx
- int lxc_monitor_open(const char *lxcpath)
- {
-       struct sockaddr_un addr;
--      int fd,ret;
-+      int fd,ret = 0;
-       int retry,backoff_ms[] = {10, 50, 100};
-       size_t len;
diff --git a/utils/lxc/patches/035-fix-undefined-lfd.patch b/utils/lxc/patches/035-fix-undefined-lfd.patch
new file mode 100644 (file)
index 0000000..6b57e26
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/lxc/bdev.c
++++ b/src/lxc/bdev.c
+@@ -1936,3 +1936,3 @@ static int loop_mount(struct bdev *bdev)
+ {
+-      int lfd, ffd = -1, ret = -1;
++      int lfd = -1, ffd = -1, ret = -1;
+       struct loop_info64 lo;
+@@ -1974,3 +1974,3 @@ out:
+       if (ret < 0) {
+-              close(lfd);
++              if (lfd > -1) close(lfd);
+               bdev->lofd = -1;
index 74a9f995f3eb69a4a72cb30283b3f80726644fc1..1017ee88c55344d02ca2d4b6c0736e1c898b151b 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=open-plc-utils
-PKG_VERSION:=2015-07-06
+PKG_VERSION:=2015-09-21
 PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=git://github.com/qca/open-plc-utils.git
+PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=885a1b7e2e663b5ab8797db6d40a0318131fdf18
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
@@ -75,6 +75,10 @@ OPEN_PLC_UTILS_APPS:=efbu efeu efru efsu edru edsu nics \
 
 $(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a))))
 
+ifdef CONFIG_USE_MUSL
+  TARGET_CFLAGS += -D__UCLIBC__
+endif
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
index e9879f601b9066cd86bf778fac67b85b1668785f..3cfc1252b89b6bb13b77260c7ba7fc9ff73443bd 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
-PKG_VERSION:=3.3.1
+PKG_VERSION:=3.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
-PKG_MD5SUM:=86d5462e5cfc2a4341a2b91ce3ed0f09
+PKG_MD5SUM:=46674cdbf2f72e4cfef75fea1b1ec5c8
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
 PKG_LICENSE:=GPL-2.0
@@ -48,7 +48,7 @@ MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
        PREFIX="/usr" \
        HOST="$(GNU_TARGET_NAME)" \
-       ZLIB="yes" \
+       ZLIB="yes"
 
 ifneq ($(CONFIG_USE_GLIBC),)
 TARGET_LDFLAGS += -lresolv
diff --git a/utils/pciutils/patches/105-fix-host.patch b/utils/pciutils/patches/105-fix-host.patch
new file mode 100644 (file)
index 0000000..8df4b8c
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/lib/configure
++++ b/lib/configure
+@@ -44,7 +44,7 @@ if [ -z "$HOST" ] ; then
+ fi
+ [ -n "$RELEASE" ] && rel="${RELEASE}"
+ # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless.
+-host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\2/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
++host=`echo $HOST | sed -e 's/^\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)$/\1-\3/' -e 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr '[A-Z]' '[a-z]'`
+ cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ sys=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo " $host $rel $cpu $sys"
diff --git a/utils/spi-tools/Makefile b/utils/spi-tools/Makefile
new file mode 100644 (file)
index 0000000..ca4da88
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2014-2015 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:=spi-tools
+PKG_VERSION:=1
+
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/cpb-/spi-tools.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=cc6a41fdcec60610703ba6db488c621c64952898
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/spi-tools
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Command line SPI tools
+endef
+
+EXTRA_CFLAGS+=-DVERSION=\"$(PKG_SOURCE_VERSION)\"
+
+define Build/Compile
+       cd $(PKG_BUILD_DIR) ; \
+        $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-config src/spi-config.c ; \
+        $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-pipe src/spi-pipe.c
+endef
+
+define Package/spi-tools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-config $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-pipe $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,spi-tools))
index cbbe32a09faf091b3701d7d61c9643cc7ff1a272..09b4f581c6eb3c45bf2a1d81a3dcf8fdc8e263de 100644 (file)
@@ -9,8 +9,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zoneinfo
-PKG_VERSION:=2015f
-PKG_VERSION_CODE:=2015f
+PKG_VERSION:=2015g
+PKG_VERSION_CODE:=2015g
 PKG_RELEASE:=1
 
 #As i couldn't find real license used "Public Domain"
@@ -20,14 +20,14 @@ PKG_LICENSE:=Public Domain
 PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
 PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
 PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_MD5SUM:=e3b82732d20e973e48af1c6f13df9a1d
+PKG_MD5SUM:=8d46e8b225b9a04c75f5c39636435ad6
 
 include $(INCLUDE_DIR)/package.mk
 
 define Download/tzcode
    FILE=$(PKG_SOURCE_CODE)
    URL=$(PKG_SOURCE_URL)
-   MD5SUM:=19578d432ba8b92f73406a17a9bc268d
+   MD5SUM:=a2c47d908a6426f530efb1393cf1cd06
 endef
 
 $(eval $(call Download,tzcode))