* Have a useful description prefixed with the package name
(E.g.: "foopkg: Add libzot dependency")
* Include Signed-off-by tag in the commit comments.
- See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
+ See: [Sign your work](https://openwrt.org/submitting-patches#sign_your_work)
### Advice on pull requests:
include $(TOPDIR)/rules.mk
PKG_NAME:=netdata
-PKG_VERSION:=1.12.2
+PKG_VERSION:=1.13.0
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0+
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=f8cd689ec1ab262903b5a54c8df2fd0fe6e5e7b0ab4a2c60fde4e88f37aa72b5
+PKG_HASH:=258e64a945bf80e91c4bffab35e7f2d8930025246814038f541ff0ac403a666c
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=sudo
-PKG_VERSION:=1.8.26
+PKG_VERSION:=1.8.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.sudo.ws/dist
-PKG_HASH:=40da219a6f0341ccb22d04a98988e27f09b831d2561b14c6154067a49ef3fee2
+PKG_HASH:=7beb68b94471ef56d8a1036dbcdc09a7b58a949a68ffce48b83f837dd33e2ec0
+PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=doc/LICENSE
PKG_CPE_ID:=cpe:/a:todd_miller:sudo
CATEGORY:=Administration
TITLE:=Delegate authority to run commands
URL:=https://www.sudo.ws/
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
endef
define Package/sudo/description
include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
-PKG_VERSION:=3.19.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.20.1
+PKG_RELEASE:=1
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_LICENSE:=LGPL-2.1+
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:balabit:syslog-ng
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=5cf931a9d7bead0e6d9a2c65eee8f6005a005878f59aa280f3c4294257ed5178
+PKG_HASH:=a65858afe9c649119a23ff61669945cab8692a045ee8259e8ee666445c8fbda0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--disable-redis \
--disable-dependency-tracking \
--disable-python \
+ --disable-geoip2 \
--disable-java \
--disable-java-modules \
--with-librabbitmq-client=no \
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=4.0.3
-PKG_RELEASE:=1
+PKG_VERSION:=4.0.6
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6b3d3b23c72a7af1958dc0938a566be03f0424cb44df5b2a9f487428f32d0463
PKG_SOURCE_URL:=@SF/zabbix
+PKG_HASH:=2890851b3a4b0f70f69ef754aa0d07070b42440f56d280113a9474bc4ed75e5b
+PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:zabbix:zabbix
define Package/zabbix/Default
SECTION:=admin
CATEGORY:=Administration
+ SUBMENU:=zabbix
TITLE:=Zabbix
URL:=https://www.zabbix.com/
- SUBMENU:=zabbix
- MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
USERID:=zabbix=53:zabbix=53
DEPENDS += $(ICONV_DEPENDS) +libpcre +zlib +ZABBIX_GNUTLS:libgnutls +ZABBIX_OPENSSL:libopenssl
endef
$(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \
--with-libevent=$(STAGING_DIR)/usr/include/libevent \
--with-libpcre=$(STAGING_DIR)/usr/include \
+ --with-zlib=$(STAGING_DIR)/usr/include \
$(if $(CONFIG_ZABBIX_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr") \
$(if $(CONFIG_ZABBIX_OPENSSL),--with-openssl="$(STAGING_DIR)/usr")
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
-@@ -116,6 +113,7 @@ Server=127.0.0.1
+@@ -117,6 +114,7 @@ Server=127.0.0.1
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related
-@@ -131,8 +129,6 @@ Server=127.0.0.1
+@@ -132,8 +130,6 @@ Server=127.0.0.1
# Default:
# ServerActive=
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
-@@ -142,8 +138,6 @@ ServerActive=127.0.0.1
+@@ -143,8 +139,6 @@ ServerActive=127.0.0.1
# Default:
# Hostname=
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
-@@ -261,8 +255,8 @@ Hostname=Zabbix server
+@@ -262,8 +256,8 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
--- a/src/libs/zbxcommon/str.c
+++ b/src/libs/zbxcommon/str.c
-@@ -52,7 +52,7 @@ static const char help_message_footer[]
+@@ -54,7 +54,7 @@ static const char help_message_footer[]
void version(void)
{
printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION);
- printf("Revision %s %s, compilation time: %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE, __DATE__, __TIME__);
+ printf("Revision %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE);
puts(copyright_message);
- }
-
+ #if defined(HAVE_POLARSSL) || defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL)
+ printf("\n");
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=asu
+PKG_VERSION:=0.2.3
+PKG_RELEASE=2
+
+PKG_LICENSE:=GPL-3.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/asu/
+PKG_HASH:=e60027cd531cc5b9b20d3321acc06fdf0cdd894004919800575b8235343ba8ef
+
+PKG_BUILD_DEPENDS:=python3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
+
+IMAGEBUILDER_DEPENDS:= \
+ @x86_64 +bash +bzip2 +coreutils +coreutils-stat +diffutils +file \
+ +gawk +gcc +getopt +git +git-http +libncurses +make +patch +perl \
+ +perlbase-attributes +perlbase-findbin +perlbase-getopt \
+ +perlbase-thread +python-light +tar +unzip +wget +xz +xzdiff \
+ +xzgrep +xzless +xz-utils +zlib-dev
+
+define Package/asu
+ SECTION:=devel
+ CATEGORY:=Development
+ TITLE:=attended sysupgrade image server
+ MAINTAINER:=Paul Spooren <paul@spooren.de>
+ URL:=http://github.com/aparcar/gsoc17-attended-sysupgrade/
+ DEPENDS:=$(IMAGEBUILDER_DEPENDS) +pgsql-server +psqlodbcw \
+ +python3-ctypes +python3-distutils +python3-flask \
+ +gunicorn +python3-openssl +python3-pyodbc +python3-yaml \
+ +libustream-mbedtls +ca-certificates +gnupg
+ USERID:=asu:asu
+ VARIANT:=python3
+endef
+
+define Package/asu/description
+ Build server to deliver OpenWrt/LEDE sysupgrade images
+endef
+
+define Py3Package/asu/install
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/asu.defaults $(1)/etc/uci-defaults/99-asu
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/asu.init $(1)/etc/init.d/asu
+ $(INSTALL_DIR) $(1)/etc/asu
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/asu/utils/config.yml.default $(1)/etc/asu/config.yml
+endef
+
+$(eval $(call Py3Package,asu))
+$(eval $(call BuildPackage,asu))
--- /dev/null
+#!/bin/sh
+
+asu_password=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | sha256sum | cut -d' ' -f1)
+asu_tables="$(ls -1 /usr/lib/python*/site-packages/asu/utils/tables.sql | head -n 1)"
+
+uci -q batch <<EOF
+ del postgresql.asu
+ set postgresql.asu=postgres-db
+ set postgresql.asu.name=asu
+ set postgresql.asu.user=asu
+ set postgresql.asu.pass='$asu_password'
+ set postgresql.asu.script='$asu_tables'
+ commit postgresql
+EOF
+
+sed -i "s/database_user.*/database_user: asu/" /etc/asu/config.yml
+sed -i "s/database_pass.*/database_pass: $asu_password/" /etc/asu/config.yml
+
+cp -r /usr/lib/python*/site-packages/asu/utils/distributions /etc/asu/
+
+chown -R root:asu /etc/asu
+chmod -R g+rX /etc/asu
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=01
+
+USE_PROCD=1
+PROG=/usr/bin/flask
+
+start_service() {
+ . /lib/functions/postgresql.sh
+
+ local pgdata=$(uci get postgresql.config.PGDATA)
+ local i=0
+
+ while ! pg_server_ready "$pgdata"; do
+ sleep 1
+ [ $((i++)) -gt 30 ] && return 1
+ done
+
+ i=0
+ while ! pg_test_db asu asu; do
+ sleep 1
+ [ $((i++)) -gt 30 ] && return 1
+ done
+
+ FLASK_APP=asu $PROG loaddb
+
+ procd_open_instance asu_main
+ procd_set_param user asu
+ procd_set_param group asu
+ procd_set_param command gunicorn asu:app
+ procd_close_instance
+
+ procd_open_instance main_worker
+ procd_set_param user asu
+ procd_set_param group asu
+ procd_set_param env FLASK_APP=asu
+ procd_set_param command $PROG run_worker
+ procd_close_instance
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=lttng-tools
-PKG_VERSION:=2.6.0
+PKG_VERSION:=2.10.6
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
-PKG_HASH:=128166445126d76da7d9f42a56dec12716732a1ed697a6cfdf40c9e135384f32
+PKG_HASH:=f05df52bbebf8ce88d1b29e9e98cfc957d2ed738a345118018237ebdb581537c
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1 GPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
-PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
DEPENDS:= +lttng-ust +libpopt +libxml2
endef
-CONFIGURE_ARGS += --disable-kmod
+TARGET_CFLAGS += $(FPIC)
-TARGET_LDFLAGS += -lurcu-bp
-
-MAKE_FLAGS += V="$(V)"
+CONFIGURE_ARGS += \
+ --enable-epoll \
+ --without-kmod \
+ --without-pic
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
--- /dev/null
+From e0212fb3278ca54ac6d3beecf990297670f2612f Mon Sep 17 00:00:00 2001
+From: Kai Kang <kai.kang@windriver.com>
+Date: Thu, 13 Dec 2018 10:55:36 +0800
+Subject: [PATCH] Fix: compile fails for x32 arch
+
+It fails to compile for x32 arch:
+
+| .../src/common/utils.c: Assembler messages:
+| .../src/common/utils.c:1026: Error: register type mismatch for `bsr'
+| .../src/common/utils.c:1028: Error: operand type mismatch for `movq'
+
+Add macro check that not to define that fls_u64() for x32.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/bin/lttng/utils.c | 2 +-
+ src/common/utils.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c
+index 0e96ef0c3..5c79c8c7e 100644
+--- a/src/bin/lttng/utils.c
++++ b/src/bin/lttng/utils.c
+@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
+diff --git a/src/common/utils.c b/src/common/utils.c
+index 08139e5e2..3c3899819 100644
+--- a/src/common/utils.c
++++ b/src/common/utils.c
+@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x)
+ #define HAS_FLS_U32
+ #endif
+
+-#if defined(__x86_64)
++#if defined(__x86_64) && !defined(__ILP32__)
+ static inline
+ unsigned int fls_u64(uint64_t x)
+ {
--- /dev/null
+From 10e8001ad876d8cb3b5a17c7492e713bbc047975 Mon Sep 17 00:00:00 2001
+From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+Date: Thu, 28 Mar 2019 18:31:29 -0400
+Subject: [PATCH] Fix: getgrnam is not MT-Safe, use getgrnam_r
+
+Running the test suite under a Yocto musl build resulted in musl
+coredump due to double freeing.
+
+We get the following backtraces:
+
+0 a_crash () at ./arch/x86_64/atomic_arch.h:108
+1 unmap_chunk (self=<optimized out>) at src/malloc/malloc.c:515
+2 free (p=<optimized out>) at src/malloc/malloc.c:526
+3 0x00007f46d9dc3849 in __getgrent_a (f=f@entry=0x7f46d9d1f7e0, gr=gr@entry=0x7f46d9e24460 <gr>, line=line@entry=0x7f46d9e26058 <line>, size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 <mem>, nmem=nmem@entry=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgrent_a.c:45
+4 0x00007f46d9dc2e6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f46d9e24460 <gr>, buf=buf@entry=0x7f46d9e26058 <line>, size=size@entry=0x7f46d92db550, mem=mem@entry=0x7f46d9e26050 <mem>, nmem=0x7f46d92db558, res=0x7f46d92db548) at src/passwd/getgr_a.c:30
+5 0x00007f46d9dc3733 in getgrnam (name=<optimized out>) at src/passwd/getgrent.c:37
+6 0x0000000000460b29 in utils_get_group_id (name=<optimized out>) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241
+7 0x000000000044ee69 in thread_manage_health (data=<optimized out>) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/main.c:4115
+8 0x00007f46d9de1541 in start (p=<optimized out>) at src/thread/pthread_create.c:195
+9 0x00007f46d9dee661 in __clone () at src/thread/x86_64/clone.s:22
+
+From another run:
+
+0 a_crash () at ./arch/x86_64/atomic_arch.h:108
+1 unmap_chunk (self=<optimized out>) at src/malloc/malloc.c:515
+2 free (p=<optimized out>) at src/malloc/malloc.c:526
+3 0x00007f5abc210849 in __getgrent_a (f=f@entry=0x7f5abc2733e0, gr=gr@entry=0x7f5abc271460 <gr>, line=line@entry=0x7f5abc273058 <line>, size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 <mem>, nmem=nmem@entry=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgrent_a.c:45
+4 0x00007f5abc20fe6b in __getgr_a (name=0x487242 "tracing", gid=gid@entry=0, gr=gr@entry=0x7f5abc271460 <gr>, buf=buf@entry=0x7f5abc273058 <line>, size=size@entry=0x7f5abaef5510, mem=mem@entry=0x7f5abc273050 <mem>, nmem=0x7f5abaef5518, res=0x7f5abaef5508) at src/passwd/getgr_a.c:30
+5 0x00007f5abc210733 in getgrnam (name=<optimized out>) at src/passwd/getgrent.c:37
+6 0x0000000000460b29 in utils_get_group_id (name=<optimized out>) at ../../../lttng-tools-2.10.6/src/common/utils.c:1241
+7 0x000000000042dee4 in notification_channel_socket_create () at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:238
+8 init_thread_state (state=0x7f5abaef5560, handle=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:375
+9 thread_notification (data=0x7f5abbf9be40) at ../../../../lttng-tools-2.10.6/src/bin/lttng-sessiond/notification-thread.c:495
+10 0x00007f5abc22e541 in start (p=<optimized out>) at src/thread/pthread_create.c:195
+11 0x00007f5abc23b661 in __clone () at src/thread/x86_64/clone.s:22
+
+The problem was easily reproducible (~6 crash on ~300 runs). A prototype fix
+using mutex around the getgrnam yielded no crash in over 1000 runs. This
+patch yielded the same results as the prototype fix.
+
+Unfortunately we cannot rely on a mutex in liblttng-ctl since we cannot
+enforce the locking for the application using the lib.
+
+Use getgrnam_r instead.
+
+The previous implementation of utils_get_group_id returned the gid of
+the root group (0) on error/not found. lttng_check_tracing_group needs
+to know if an error/not found occured, returning the root group is not
+enough. We now return the gid via the passed parameter. The caller is
+responsible for either defaulting to the root group or propagating the
+error.
+
+We also do not want to warn when used in liblttng-ctl context. We might
+want to move the warning elsewhere in the future. For now, pass a bool
+if we need to warn or not.
+
+Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+---
+ src/bin/lttng-consumerd/health-consumerd.c | 10 ++-
+ src/bin/lttng-relayd/health-relayd.c | 20 ++++--
+ src/bin/lttng-sessiond/main.c | 24 +++++--
+ src/bin/lttng-sessiond/notification-thread.c | 10 ++-
+ src/common/utils.c | 75 +++++++++++++++++---
+ src/common/utils.h | 4 +-
+ src/lib/lttng-ctl/lttng-ctl.c | 8 +--
+ 7 files changed, 122 insertions(+), 29 deletions(-)
+
+diff --git a/src/bin/lttng-consumerd/health-consumerd.c b/src/bin/lttng-consumerd/health-consumerd.c
+index 1e2f31e4..6045401a 100644
+--- a/src/bin/lttng-consumerd/health-consumerd.c
++++ b/src/bin/lttng-consumerd/health-consumerd.c
+@@ -184,8 +184,14 @@ void *thread_manage_health(void *data)
+ is_root = !getuid();
+ if (is_root) {
+ /* lttng health client socket path permissions */
+- ret = chown(health_unix_sock_path, 0,
+- utils_get_group_id(tracing_group_name));
++ gid_t gid;
++
++ ret = utils_get_group_id(tracing_group_name, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group. */
++ }
++
++ ret = chown(health_unix_sock_path, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", health_unix_sock_path);
+ PERROR("chown");
+diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c
+index ba996621..962e88c4 100644
+--- a/src/bin/lttng-relayd/health-relayd.c
++++ b/src/bin/lttng-relayd/health-relayd.c
+@@ -105,8 +105,14 @@ static int create_lttng_rundir_with_perm(const char *rundir)
+ int is_root = !getuid();
+
+ if (is_root) {
+- ret = chown(rundir, 0,
+- utils_get_group_id(tracing_group_name));
++ gid_t gid;
++
++ ret = utils_get_group_id(tracing_group_name, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group.*/
++ }
++
++ ret = chown(rundir, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", rundir);
+ PERROR("chown");
+@@ -256,8 +262,14 @@ void *thread_manage_health(void *data)
+ is_root = !getuid();
+ if (is_root) {
+ /* lttng health client socket path permissions */
+- ret = chown(health_unix_sock_path, 0,
+- utils_get_group_id(tracing_group_name));
++ gid_t gid;
++
++ ret = utils_get_group_id(tracing_group_name, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
++
++ ret = chown(health_unix_sock_path, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", health_unix_sock_path);
+ PERROR("chown");
+diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
+index fa6fa483..49307064 100644
+--- a/src/bin/lttng-sessiond/main.c
++++ b/src/bin/lttng-sessiond/main.c
+@@ -4112,8 +4112,14 @@ static void *thread_manage_health(void *data)
+
+ if (is_root) {
+ /* lttng health client socket path permissions */
+- ret = chown(config.health_unix_sock_path.value, 0,
+- utils_get_group_id(config.tracing_group_name.value));
++ gid_t gid;
++
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
++
++ ret = chown(config.health_unix_sock_path.value, 0, &gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", config.health_unix_sock_path.value);
+ PERROR("chown");
+@@ -5238,7 +5244,10 @@ static int set_permissions(char *rundir)
+ int ret;
+ gid_t gid;
+
+- gid = utils_get_group_id(config.tracing_group_name.value);
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
+
+ /* Set lttng run dir */
+ ret = chown(rundir, 0, gid);
+@@ -5349,7 +5358,14 @@ static int set_consumer_sockets(struct consumer_data *consumer_data)
+ goto error;
+ }
+ if (is_root) {
+- ret = chown(path, 0, utils_get_group_id(config.tracing_group_name.value));
++ gid_t gid;
++
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group */
++ }
++
++ ret = chown(path, 0, gid);
+ if (ret < 0) {
+ ERR("Unable to set group on %s", path);
+ PERROR("chown");
+diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c
+index 92ac597f..18a264d9 100644
+--- a/src/bin/lttng-sessiond/notification-thread.c
++++ b/src/bin/lttng-sessiond/notification-thread.c
+@@ -235,8 +235,14 @@ int notification_channel_socket_create(void)
+ }
+
+ if (getuid() == 0) {
+- ret = chown(sock_path, 0,
+- utils_get_group_id(config.tracing_group_name.value));
++ gid_t gid;
++
++ ret = utils_get_group_id(config.tracing_group_name.value, true, &gid);
++ if (ret) {
++ gid = 0; /* Default to root group. */
++ }
++
++ ret = chown(sock_path, 0, gid);
+ if (ret) {
+ ERR("Failed to set the notification channel socket's group");
+ ret = -1;
+diff --git a/src/common/utils.c b/src/common/utils.c
+index c0bb031e..778bc00f 100644
+--- a/src/common/utils.c
++++ b/src/common/utils.c
+@@ -1231,24 +1231,77 @@ size_t utils_get_current_time_str(const char *format, char *dst, size_t len)
+ }
+
+ /*
+- * Return the group ID matching name, else 0 if it cannot be found.
++ * Return 0 on success and set *gid to the group_ID matching the passed name.
++ * Else -1 if it cannot be found or an error occurred.
+ */
+ LTTNG_HIDDEN
+-gid_t utils_get_group_id(const char *name)
++int utils_get_group_id(const char *name, bool warn, gid_t *gid)
+ {
+- struct group *grp;
++ static volatile int warn_once;
+
+- grp = getgrnam(name);
+- if (!grp) {
+- static volatile int warn_once;
++ int ret;
++ long sys_len;
++ size_t len;
++ struct group grp;
++ struct group *result;
++ char *buffer = NULL;
+
+- if (!warn_once) {
+- WARN("No tracing group detected");
+- warn_once = 1;
++ /* Get the system limit if it exists */
++ sys_len = sysconf(_SC_GETGR_R_SIZE_MAX);
++ if (sys_len == -1) {
++ len = 1024;
++ } else {
++ len = (size_t) sys_len;
++ }
++
++ buffer = malloc(len);
++ if (!buffer) {
++ PERROR("getgrnam_r malloc");
++ ret = -1;
++ goto error;
++ }
++
++ while ((ret = getgrnam_r(name, &grp, buffer, len, &result)) == ERANGE)
++ {
++ /* Buffer is not big enough, increase its size. */
++ size_t new_len = 2 * len;
++ char *new_buffer = NULL;
++ if (new_len < len) {
++ ERR("getgrnam_r buffer size overflow");
++ ret = -1;
++ goto error;
++ }
++ len = new_len;
++ new_buffer = realloc(buffer, len);
++ if (!new_buffer) {
++ PERROR("getgrnam_r realloc");
++ ret = -1;
++ goto error;
+ }
+- return 0;
++ buffer = new_buffer;
++ }
++ if (ret != 0) {
++ PERROR("getgrnam_r");
++ ret = -1;
++ goto error;
++ }
++
++ /* Group not found. */
++ if (!result) {
++ ret = -1;
++ goto error;
++ }
++
++ *gid = result->gr_gid;
++ ret = 0;
++
++error:
++ free(buffer);
++ if (ret && warn && !warn_once) {
++ WARN("No tracing group detected");
++ warn_once = 1;
+ }
+- return grp->gr_gid;
++ return ret;
+ }
+
+ /*
+diff --git a/src/common/utils.h b/src/common/utils.h
+index 18f19ef1..9c72431d 100644
+--- a/src/common/utils.h
++++ b/src/common/utils.h
+@@ -22,6 +22,8 @@
+ #include <unistd.h>
+ #include <stdint.h>
+ #include <getopt.h>
++#include <stdbool.h>
++#include <sys/types.h>
+
+ #define KIBI_LOG2 10
+ #define MEBI_LOG2 20
+@@ -52,7 +54,7 @@ int utils_get_count_order_u64(uint64_t x);
+ char *utils_get_home_dir(void);
+ char *utils_get_user_home_dir(uid_t uid);
+ size_t utils_get_current_time_str(const char *format, char *dst, size_t len);
+-gid_t utils_get_group_id(const char *name);
++int utils_get_group_id(const char *name, bool warn, gid_t *gid);
+ char *utils_generate_optstring(const struct option *long_options,
+ size_t opt_count);
+ int utils_create_lock_file(const char *filepath);
+diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c
+index 2d84aad9..561b0bcf 100644
+--- a/src/lib/lttng-ctl/lttng-ctl.c
++++ b/src/lib/lttng-ctl/lttng-ctl.c
+@@ -208,15 +208,13 @@ end:
+ LTTNG_HIDDEN
+ int lttng_check_tracing_group(void)
+ {
+- struct group *grp_tracing; /* no free(). See getgrnam(3) */
+- gid_t *grp_list;
++ gid_t *grp_list, tracing_gid;
+ int grp_list_size, grp_id, i;
+ int ret = -1;
+ const char *grp_name = tracing_group;
+
+ /* Get GID of group 'tracing' */
+- grp_tracing = getgrnam(grp_name);
+- if (!grp_tracing) {
++ if (utils_get_group_id(grp_name, false, &tracing_gid)) {
+ /* If grp_tracing is NULL, the group does not exist. */
+ goto end;
+ }
+@@ -241,7 +239,7 @@ int lttng_check_tracing_group(void)
+ }
+
+ for (i = 0; i < grp_list_size; i++) {
+- if (grp_list[i] == grp_tracing->gr_gid) {
++ if (grp_list[i] == tracing_gid) {
+ ret = 1;
+ break;
+ }
+--
+2.17.1
+
+++ /dev/null
---- a/src/common/compat/poll.h
-+++ b/src/common/compat/poll.h
-@@ -55,6 +55,10 @@ static inline void __lttng_poll_free(voi
- #include <features.h>
- #include <common/compat/fcntl.h>
-
-+#ifndef __GLIBC_PREREQ
-+#define __GLIBC_PREREQ(maj, min) (0)
-+#endif
-+
- /* See man epoll(7) for this define path */
- #define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches"
-
---- a/src/common/runas.h
-+++ b/src/common/runas.h
-@@ -21,6 +21,7 @@
-
- #include <unistd.h>
- #include <pthread.h>
-+#include <sys/stat.h>
-
- int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid);
- int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid);
+++ /dev/null
---- a/src/common/mi-lttng.h
-+++ b/src/common/mi-lttng.h
-@@ -49,133 +49,133 @@ struct mi_lttng_version {
- };
-
- /* Strings related to command */
--const char * const mi_lttng_element_command;
--const char * const mi_lttng_element_command_action;
--const char * const mi_lttng_element_command_add_context;
--const char * const mi_lttng_element_command_calibrate;
--const char * const mi_lttng_element_command_create;
--const char * const mi_lttng_element_command_destroy;
--const char * const mi_lttng_element_command_disable_channel;
--const char * const mi_lttng_element_command_disable_event;
--const char * const mi_lttng_element_command_enable_channels;
--const char * const mi_lttng_element_command_enable_event;
--const char * const mi_lttng_element_command_list;
--const char * const mi_lttng_element_command_load;
--const char * const mi_lttng_element_command_name;
--const char * const mi_lttng_element_command_output;
--const char * const mi_lttng_element_command_save;
--const char * const mi_lttng_element_command_set_session;
--const char * const mi_lttng_element_command_snapshot;
--const char * const mi_lttng_element_command_snapshot_add;
--const char * const mi_lttng_element_command_snapshot_del;
--const char * const mi_lttng_element_command_snapshot_list;
--const char * const mi_lttng_element_command_snapshot_record;
--const char * const mi_lttng_element_command_start;
--const char * const mi_lttng_element_command_stop;
--const char * const mi_lttng_element_command_success;
--const char * const mi_lttng_element_command_version;
-+extern const char * const mi_lttng_element_command;
-+extern const char * const mi_lttng_element_command_action;
-+extern const char * const mi_lttng_element_command_add_context;
-+extern const char * const mi_lttng_element_command_calibrate;
-+extern const char * const mi_lttng_element_command_create;
-+extern const char * const mi_lttng_element_command_destroy;
-+extern const char * const mi_lttng_element_command_disable_channel;
-+extern const char * const mi_lttng_element_command_disable_event;
-+extern const char * const mi_lttng_element_command_enable_channels;
-+extern const char * const mi_lttng_element_command_enable_event;
-+extern const char * const mi_lttng_element_command_list;
-+extern const char * const mi_lttng_element_command_load;
-+extern const char * const mi_lttng_element_command_name;
-+extern const char * const mi_lttng_element_command_output;
-+extern const char * const mi_lttng_element_command_save;
-+extern const char * const mi_lttng_element_command_set_session;
-+extern const char * const mi_lttng_element_command_snapshot;
-+extern const char * const mi_lttng_element_command_snapshot_add;
-+extern const char * const mi_lttng_element_command_snapshot_del;
-+extern const char * const mi_lttng_element_command_snapshot_list;
-+extern const char * const mi_lttng_element_command_snapshot_record;
-+extern const char * const mi_lttng_element_command_start;
-+extern const char * const mi_lttng_element_command_stop;
-+extern const char * const mi_lttng_element_command_success;
-+extern const char * const mi_lttng_element_command_version;
-
- /* Strings related to version command */
--const char * const mi_lttng_element_version;
--const char * const mi_lttng_element_version_commit;
--const char * const mi_lttng_element_version_description;
--const char * const mi_lttng_element_version_license;
--const char * const mi_lttng_element_version_major;
--const char * const mi_lttng_element_version_minor;
--const char * const mi_lttng_element_version_patch_level;
--const char * const mi_lttng_element_version_str;
--const char * const mi_lttng_element_version_web;
-+extern const char * const mi_lttng_element_version;
-+extern const char * const mi_lttng_element_version_commit;
-+extern const char * const mi_lttng_element_version_description;
-+extern const char * const mi_lttng_element_version_license;
-+extern const char * const mi_lttng_element_version_major;
-+extern const char * const mi_lttng_element_version_minor;
-+extern const char * const mi_lttng_element_version_patch_level;
-+extern const char * const mi_lttng_element_version_str;
-+extern const char * const mi_lttng_element_version_web;
-
- /* String related to a lttng_event_field */
--const char * const mi_lttng_element_event_field;
--const char * const mi_lttng_element_event_fields;
-+extern const char * const mi_lttng_element_event_field;
-+extern const char * const mi_lttng_element_event_fields;
-
- /* String related to lttng_event_context */
--const char * const mi_lttng_context_type_perf_counter;
--const char * const mi_lttng_context_type_perf_cpu_counter;
--const char * const mi_lttng_context_type_perf_thread_counter;
-+extern const char * const mi_lttng_context_type_perf_counter;
-+extern const char * const mi_lttng_context_type_perf_cpu_counter;
-+extern const char * const mi_lttng_context_type_perf_thread_counter;
-
- /* String related to lttng_event_perf_counter_ctx */
--const char * const mi_lttng_element_perf_counter_context;
-+extern const char * const mi_lttng_element_perf_counter_context;
-
- /* Strings related to pid */
--const char * const mi_lttng_element_pids;
--const char * const mi_lttng_element_pid;
--const char * const mi_lttng_element_pid_id;
-+extern const char * const mi_lttng_element_pids;
-+extern const char * const mi_lttng_element_pid;
-+extern const char * const mi_lttng_element_pid_id;
-
- /* Strings related to save command */
--const char * const mi_lttng_element_save;
-+extern const char * const mi_lttng_element_save;
-
- /* Strings related to load command */
--const char * const mi_lttng_element_load;
-+extern const char * const mi_lttng_element_load;
-
- /* General element of mi_lttng */
--const char * const mi_lttng_element_empty;
--const char * const mi_lttng_element_id;
--const char * const mi_lttng_element_nowrite;
--const char * const mi_lttng_element_success;
--const char * const mi_lttng_element_type_enum;
--const char * const mi_lttng_element_type_float;
--const char * const mi_lttng_element_type_integer;
--const char * const mi_lttng_element_type_other;
--const char * const mi_lttng_element_type_string;
-+extern const char * const mi_lttng_element_empty;
-+extern const char * const mi_lttng_element_id;
-+extern const char * const mi_lttng_element_nowrite;
-+extern const char * const mi_lttng_element_success;
-+extern const char * const mi_lttng_element_type_enum;
-+extern const char * const mi_lttng_element_type_float;
-+extern const char * const mi_lttng_element_type_integer;
-+extern const char * const mi_lttng_element_type_other;
-+extern const char * const mi_lttng_element_type_string;
-
- /* String related to loglevel */
--const char * const mi_lttng_loglevel_str_alert;
--const char * const mi_lttng_loglevel_str_crit;
--const char * const mi_lttng_loglevel_str_debug;
--const char * const mi_lttng_loglevel_str_debug_function;
--const char * const mi_lttng_loglevel_str_debug_line;
--const char * const mi_lttng_loglevel_str_debug_module;
--const char * const mi_lttng_loglevel_str_debug_process;
--const char * const mi_lttng_loglevel_str_debug_program;
--const char * const mi_lttng_loglevel_str_debug_system;
--const char * const mi_lttng_loglevel_str_debug_unit;
--const char * const mi_lttng_loglevel_str_emerg;
--const char * const mi_lttng_loglevel_str_err;
--const char * const mi_lttng_loglevel_str_info;
--const char * const mi_lttng_loglevel_str_notice;
--const char * const mi_lttng_loglevel_str_unknown;
--const char * const mi_lttng_loglevel_str_warning;
-+extern const char * const mi_lttng_loglevel_str_alert;
-+extern const char * const mi_lttng_loglevel_str_crit;
-+extern const char * const mi_lttng_loglevel_str_debug;
-+extern const char * const mi_lttng_loglevel_str_debug_function;
-+extern const char * const mi_lttng_loglevel_str_debug_line;
-+extern const char * const mi_lttng_loglevel_str_debug_module;
-+extern const char * const mi_lttng_loglevel_str_debug_process;
-+extern const char * const mi_lttng_loglevel_str_debug_program;
-+extern const char * const mi_lttng_loglevel_str_debug_system;
-+extern const char * const mi_lttng_loglevel_str_debug_unit;
-+extern const char * const mi_lttng_loglevel_str_emerg;
-+extern const char * const mi_lttng_loglevel_str_err;
-+extern const char * const mi_lttng_loglevel_str_info;
-+extern const char * const mi_lttng_loglevel_str_notice;
-+extern const char * const mi_lttng_loglevel_str_unknown;
-+extern const char * const mi_lttng_loglevel_str_warning;
-
- /* String related to loglevel JUL */
--const char * const mi_lttng_loglevel_str_jul_all;
--const char * const mi_lttng_loglevel_str_jul_config;
--const char * const mi_lttng_loglevel_str_jul_fine;
--const char * const mi_lttng_loglevel_str_jul_finer;
--const char * const mi_lttng_loglevel_str_jul_finest;
--const char * const mi_lttng_loglevel_str_jul_info;
--const char * const mi_lttng_loglevel_str_jul_off;
--const char * const mi_lttng_loglevel_str_jul_severe;
--const char * const mi_lttng_loglevel_str_jul_warning;
-+extern const char * const mi_lttng_loglevel_str_jul_all;
-+extern const char * const mi_lttng_loglevel_str_jul_config;
-+extern const char * const mi_lttng_loglevel_str_jul_fine;
-+extern const char * const mi_lttng_loglevel_str_jul_finer;
-+extern const char * const mi_lttng_loglevel_str_jul_finest;
-+extern const char * const mi_lttng_loglevel_str_jul_info;
-+extern const char * const mi_lttng_loglevel_str_jul_off;
-+extern const char * const mi_lttng_loglevel_str_jul_severe;
-+extern const char * const mi_lttng_loglevel_str_jul_warning;
-
- /* String related to loglevel Log4j */
--const char * const mi_lttng_loglevel_str_log4j_off;
--const char * const mi_lttng_loglevel_str_log4j_fatal;
--const char * const mi_lttng_loglevel_str_log4j_error;
--const char * const mi_lttng_loglevel_str_log4j_warn;
--const char * const mi_lttng_loglevel_str_log4j_info;
--const char * const mi_lttng_loglevel_str_log4j_debug;
--const char * const mi_lttng_loglevel_str_log4j_trace;
--const char * const mi_lttng_loglevel_str_log4j_all;
-+extern const char * const mi_lttng_loglevel_str_log4j_off;
-+extern const char * const mi_lttng_loglevel_str_log4j_fatal;
-+extern const char * const mi_lttng_loglevel_str_log4j_error;
-+extern const char * const mi_lttng_loglevel_str_log4j_warn;
-+extern const char * const mi_lttng_loglevel_str_log4j_info;
-+extern const char * const mi_lttng_loglevel_str_log4j_debug;
-+extern const char * const mi_lttng_loglevel_str_log4j_trace;
-+extern const char * const mi_lttng_loglevel_str_log4j_all;
-
- /* String related to loglevel type */
--const char * const mi_lttng_loglevel_type_all;
--const char * const mi_lttng_loglevel_type_range;
--const char * const mi_lttng_loglevel_type_single;
--const char * const mi_lttng_loglevel_type_unknown;
-+extern const char * const mi_lttng_loglevel_type_all;
-+extern const char * const mi_lttng_loglevel_type_range;
-+extern const char * const mi_lttng_loglevel_type_single;
-+extern const char * const mi_lttng_loglevel_type_unknown;
-
- /* Sting related to lttng_calibrate */
--const char * const mi_lttng_element_calibrate;
--const char * const mi_lttng_element_calibrate_function;
-+extern const char * const mi_lttng_element_calibrate;
-+extern const char * const mi_lttng_element_calibrate_function;
-
- /* String related to a lttng_snapshot */
--const char * const mi_lttng_element_snapshot_ctrl_url;
--const char * const mi_lttng_element_snapshot_data_url;
--const char * const mi_lttng_element_snapshot_max_size;
--const char * const mi_lttng_element_snapshot_n_ptr;
--const char * const mi_lttng_element_snapshot_session_name;
--const char * const mi_lttng_element_snapshots;
-+extern const char * const mi_lttng_element_snapshot_ctrl_url;
-+extern const char * const mi_lttng_element_snapshot_data_url;
-+extern const char * const mi_lttng_element_snapshot_max_size;
-+extern const char * const mi_lttng_element_snapshot_n_ptr;
-+extern const char * const mi_lttng_element_snapshot_session_name;
-+extern const char * const mi_lttng_element_snapshots;
-
- /* Utility string function */
- const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain);
---- a/src/common/config/config-session-abi.h
-+++ b/src/common/config/config-session-abi.h
-@@ -18,95 +18,95 @@
- #ifndef CONFIG_SESSION_INTERNAL_H
- #define CONFIG_SESSION_INTERNAL_H
-
--const char * const config_element_channel;
--const char * const config_element_channels;
--const char * const config_element_domain;
--const char * const config_element_domains;
--const char * const config_element_event;
--const char * const config_element_events;
--const char * const config_element_context;
--const char * const config_element_contexts;
--const char * const config_element_attributes;
--const char * const config_element_exclusion;
--const char * const config_element_exclusions;
--const char * const config_element_function_attributes;
--const char * const config_element_probe_attributes;
--const char * const config_element_symbol_name;
--const char * const config_element_address;
--const char * const config_element_offset;
--const char * const config_element_name;
--const char * const config_element_enabled;
--const char * const config_element_overwrite_mode;
--const char * const config_element_subbuf_size;
--const char * const config_element_num_subbuf;
--const char * const config_element_switch_timer_interval;
--const char * const config_element_read_timer_interval;
--const char * const config_element_output;
--const char * const config_element_output_type;
--const char * const config_element_tracefile_size;
--const char * const config_element_tracefile_count;
--const char * const config_element_live_timer_interval;
--const char * const config_element_type;
--const char * const config_element_buffer_type;
--const char * const config_element_session;
--const char * const config_element_sessions;
--const char * const config_element_perf;
--const char * const config_element_config;
--const char * const config_element_started;
--const char * const config_element_snapshot_mode;
--const char * const config_element_loglevel;
--const char * const config_element_loglevel_type;
--const char * const config_element_filter;
--const char * const config_element_snapshot_outputs;
--const char * const config_element_consumer_output;
--const char * const config_element_destination;
--const char * const config_element_path;
--const char * const config_element_net_output;
--const char * const config_element_control_uri;
--const char * const config_element_data_uri;
--const char * const config_element_max_size;
--
--const char * const config_domain_type_kernel;
--const char * const config_domain_type_ust;
--const char * const config_domain_type_jul;
--const char * const config_domain_type_log4j;
--
--const char * const config_buffer_type_per_pid;
--const char * const config_buffer_type_per_uid;
--const char * const config_buffer_type_global;
--
--const char * const config_overwrite_mode_discard;
--const char * const config_overwrite_mode_overwrite;
--
--const char * const config_output_type_splice;
--const char * const config_output_type_mmap;
--
--const char * const config_loglevel_type_all;
--const char * const config_loglevel_type_range;
--const char * const config_loglevel_type_single;
--
--const char * const config_event_type_all;
--const char * const config_event_type_tracepoint;
--const char * const config_event_type_probe;
--const char * const config_event_type_function;
--const char * const config_event_type_function_entry;
--const char * const config_event_type_noop;
--const char * const config_event_type_syscall;
--const char * const config_event_type_kprobe;
--const char * const config_event_type_kretprobe;
--
--const char * const config_event_context_pid;
--const char * const config_event_context_procname;
--const char * const config_event_context_prio;
--const char * const config_event_context_nice;
--const char * const config_event_context_vpid;
--const char * const config_event_context_tid;
--const char * const config_event_context_vtid;
--const char * const config_event_context_ppid;
--const char * const config_event_context_vppid;
--const char * const config_event_context_pthread_id;
--const char * const config_event_context_hostname;
--const char * const config_event_context_ip;
--const char * const config_event_context_perf_thread_counter;
-+extern const char * const config_element_channel;
-+extern const char * const config_element_channels;
-+extern const char * const config_element_domain;
-+extern const char * const config_element_domains;
-+extern const char * const config_element_event;
-+extern const char * const config_element_events;
-+extern const char * const config_element_context;
-+extern const char * const config_element_contexts;
-+extern const char * const config_element_attributes;
-+extern const char * const config_element_exclusion;
-+extern const char * const config_element_exclusions;
-+extern const char * const config_element_function_attributes;
-+extern const char * const config_element_probe_attributes;
-+extern const char * const config_element_symbol_name;
-+extern const char * const config_element_address;
-+extern const char * const config_element_offset;
-+extern const char * const config_element_name;
-+extern const char * const config_element_enabled;
-+extern const char * const config_element_overwrite_mode;
-+extern const char * const config_element_subbuf_size;
-+extern const char * const config_element_num_subbuf;
-+extern const char * const config_element_switch_timer_interval;
-+extern const char * const config_element_read_timer_interval;
-+extern const char * const config_element_output;
-+extern const char * const config_element_output_type;
-+extern const char * const config_element_tracefile_size;
-+extern const char * const config_element_tracefile_count;
-+extern const char * const config_element_live_timer_interval;
-+extern const char * const config_element_type;
-+extern const char * const config_element_buffer_type;
-+extern const char * const config_element_session;
-+extern const char * const config_element_sessions;
-+extern const char * const config_element_perf;
-+extern const char * const config_element_config;
-+extern const char * const config_element_started;
-+extern const char * const config_element_snapshot_mode;
-+extern const char * const config_element_loglevel;
-+extern const char * const config_element_loglevel_type;
-+extern const char * const config_element_filter;
-+extern const char * const config_element_snapshot_outputs;
-+extern const char * const config_element_consumer_output;
-+extern const char * const config_element_destination;
-+extern const char * const config_element_path;
-+extern const char * const config_element_net_output;
-+extern const char * const config_element_control_uri;
-+extern const char * const config_element_data_uri;
-+extern const char * const config_element_max_size;
-+
-+extern const char * const config_domain_type_kernel;
-+extern const char * const config_domain_type_ust;
-+extern const char * const config_domain_type_jul;
-+extern const char * const config_domain_type_log4j;
-+
-+extern const char * const config_buffer_type_per_pid;
-+extern const char * const config_buffer_type_per_uid;
-+extern const char * const config_buffer_type_global;
-+
-+extern const char * const config_overwrite_mode_discard;
-+extern const char * const config_overwrite_mode_overwrite;
-+
-+extern const char * const config_output_type_splice;
-+extern const char * const config_output_type_mmap;
-+
-+extern const char * const config_loglevel_type_all;
-+extern const char * const config_loglevel_type_range;
-+extern const char * const config_loglevel_type_single;
-+
-+extern const char * const config_event_type_all;
-+extern const char * const config_event_type_tracepoint;
-+extern const char * const config_event_type_probe;
-+extern const char * const config_event_type_function;
-+extern const char * const config_event_type_function_entry;
-+extern const char * const config_event_type_noop;
-+extern const char * const config_event_type_syscall;
-+extern const char * const config_event_type_kprobe;
-+extern const char * const config_event_type_kretprobe;
-+
-+extern const char * const config_event_context_pid;
-+extern const char * const config_event_context_procname;
-+extern const char * const config_event_context_prio;
-+extern const char * const config_event_context_nice;
-+extern const char * const config_event_context_vpid;
-+extern const char * const config_event_context_tid;
-+extern const char * const config_event_context_vtid;
-+extern const char * const config_event_context_ppid;
-+extern const char * const config_event_context_vppid;
-+extern const char * const config_event_context_pthread_id;
-+extern const char * const config_event_context_hostname;
-+extern const char * const config_event_context_ip;
-+extern const char * const config_event_context_perf_thread_counter;
-
- #endif /* CONFIG_SESSION_INTERNAL_H */
--- /dev/null
+#
+# Copyright (C) 2019 Jerônimo Cordoni Pellegrini <j_p@aleph0.info>
+#
+# This file is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for details
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=chicken-scheme-interpreter
+PKG_VERSION=5.0.0
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
+PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://code.call-cc.org/releases/5.0.0/
+PKG_HASH:=a8b94bb94c5d6a4348cedd75dc334ac80924bcd9a7a7a3d6af5121e57ef66595
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/chicken-scheme-interpreter
+SECTION:=lang
+CATEGORY:=Languages
+TITLE:=Chicken Scheme
+URL:=https://call-cc.org
+MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
+endef
+
+define Package/chicken-scheme-interpreter/description
+ Chicken is an implementation of the Scheme language. It is portable, efficient, and supports
+ the R5RS and R7RS (work in progress) standards, and many extensions.
+ Chicken can be used as a scripting language to automate tasks.
+ This package contains the interpreter, 'csi', only --
+ the compiler and the package installer are not included because they depend on a C compiler.
+ For more information, please refer to the Chicken Scheme website at https://call-cc.org.
+endef
+
+MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)"
+
+# not installed:
+# - csc and chicken, the compiler
+# - the include dir (only useful with the compiler)
+# - install, uninstall, status, and chicken-do, which deal with modules (installation of more modules depends on the compiler)
+# - profiler
+# - feathers, the debugger
+# - libchicken.a, the static library
+define Package/chicken-scheme-interpreter/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/lib/chicken/9
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi $(1)/usr/bin/
+ $(CP) $(PKG_BUILD_DIR)/libchicken.so.9 $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/libchicken.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/*.import.so $(1)/usr/lib/chicken/9/
+ $(CP) $(PKG_BUILD_DIR)/types.db $(1)/usr/lib/chicken/9/
+endef
+
+$(eval $(call BuildPackage,chicken-scheme-interpreter))
+
URL:=http://dkolf.de/src/dkjson-lua.fsl/home
MAINTAINER:=Lars Gierth <larsg@systemli.org>
DEPENDS:=+lua
+ PKGARCH:=all
endef
define Package/dkjson/description
# not necessary.
#
# e.g. GO_PKG_GO_GENERATE:=1
+#
+#
+# GO_PKG_GCFLAGS - list of arguments, default empty
+#
+# Additional go tool compile arguments to use when building targets.
+#
+# e.g. GO_PKG_GCFLAGS:=-N -l
+#
+#
+# GO_PKG_LDFLAGS - list of arguments, default empty
+#
+# Additional go tool link arguments to use when building targets.
+#
+# e.g. GO_PKG_LDFLAGS:=-s -w
+#
+#
+# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty
+#
+# Each definition will be passed as the parameter to the -X go tool
+# link argument, i.e. -ldflags "-X importpath.name=value"
+#
+# e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH)
# Credit for this package build process (GoPackage/Build/Configure and
# GoPackage/Build/Compile) belong to Debian's dh-golang completely.
if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
echo "Building targets" ; \
case $(GO_ARCH) in \
- arm) installsuffix="-installsuffix v$(GO_ARM)" ;; \
- mips|mipsle) installsuffix="-installsuffix $(GO_MIPS)" ;; \
- mips64|mips64le) installsuffix="-installsuffix $(GO_MIPS64)" ;; \
+ arm) installsuffix="v$(GO_ARM)" ;; \
+ mips|mipsle) installsuffix="$(GO_MIPS)" ;; \
+ mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \
esac ; \
trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
+ pkg_gcflags="$(GO_PKG_GCFLAGS)" ; \
+ pkg_ldflags="$(GO_PKG_LDFLAGS)" ; \
+ for def in $(GO_PKG_LDFLAGS_X); do \
+ pkg_ldflags="$$$$pkg_ldflags -X $$$$def" ; \
+ done ; \
go install \
- $$$$installsuffix \
+ $$$${installsuffix:+-installsuffix $$$$installsuffix} \
-gcflags "$$$$trimpath" \
-asmflags "$$$$trimpath" \
-ldflags "$$$$ldflags" \
-v \
+ $$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
+ $$$${pkg_ldflags:+-ldflags "$$$$pkg_ldflags"} \
$(1) \
$$$$targets ; \
retval=$$$$? ; \
unexport \
- GOARCH GOBIN GOCACHE GODEBUG GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+ GOARCH GOBIN GOCACHE GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+ GOGC GODEBUG GOMAXPROCS GOTRACEBACK \
CGO_ENABLED \
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
endif
-GO_VERSION_MAJOR_MINOR:=1.11
-GO_VERSION_PATCH:=5
+GO_VERSION_MAJOR_MINOR:=1.12
+GO_VERSION_PATCH:=3
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e
+PKG_HASH:=5c507abe8818429d74ebb650a4155d36bc3f9a725e59e76f5d6aca9690be2373
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
TITLE:=json4lua
URL:=https://github.com/amrhassan/json4lua
DEPENDS:=+lua +luasocket
+ PKGARCH:=all
endef
define Package/json4lua/description
TITLE:=lua-bencode
URL:=https://bitbucket.org/wilhelmy/lua-bencode
DEPENDS:=+lua
+ PKGARCH:=all
endef
define Package/lua-bencode/description
PKG_SOURCE:=lua-libmodbus-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=lua-libmodbus-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://codeload.github.com/remakeelectric/lua-libmodbus/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE_URL:=https://codeload.github.com/etactica/lua-libmodbus/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=90aff3a2cfe7f91f167ad4ea00f55c2aa86cf2aef93d022e3b2cf906a1791254
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
SECTION:=lang
CATEGORY:=Languages
TITLE:=lua-libmodbus
- URL:=https://github.com/remakeelectric/lua-libmodbus
+ URL:=https://github.com/etactica/lua-libmodbus
DEPENDS:=+liblua +libmodbus
endef
TITLE:=Lua-MobDebug
URL:=https://github.com/pkulchenko/MobDebug
DEPENDS:=+lua
+ PKGARCH:=all
endef
define Package/lua-mobdebug/description
TITLE:=Lua WSAPI
URL:=https://keplerproject.github.io/wsapi/
DEPENDS:= +lua
+ PKGARCH:=all
endef
define Package/lua-wsapi/Default/description
TITLE:=Xavante Web Server
URL:=https://keplerproject.github.io/xavante/
DEPENDS:= +lua
+ PKGARCH:=all
endef
define Package/lua-xavante/description
CC="$(TARGET_CC)" \
LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
+ LUA_FLAGS= \
+ LUA_LIBS=-llua \
OPT_FLAGS="$(TARGET_CFLAGS) -Dpthread_yield=sched_yield"
endef
PKG_NAME:=luasec
PKG_VERSION:=0.7
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)?
define Build/Configure
endef
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += $(FPIC)
+
MAKE_FLAGS += \
- INCDIR="$(TARGET_CPPFLAGS) -I." \
- LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
+ LD="$(TARGET_CC)" \
+ INC_PATH="" \
+ LIB_PATH="" \
LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
-diff --git a/src/Makefile b/src/Makefile
-index 9be2f14..93d1dc4 100644
--- a/src/Makefile
+++ b/src/Makefile
+@@ -15,8 +15,8 @@ WARN=-Wall -pedantic
+ BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+ BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR)
+
+-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR)
++LNX_CFLAGS=$(INCDIR) $(DEFS)
++LNX_LDFLAGS=-shared $(LIBDIR)
+
+ MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)'
+ MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS)
@@ -33,10 +33,10 @@ LDFLAGS += $(MYLDFLAGS)
all:
TITLE:=LuaSOAP
URL:=https://github.com/tomasguisasola/luasoap
DEPENDS:=+lua +luaexpat +luasec +luasocket
+ PKGARCH:=all
endef
define Package/luasoap/description
PKG_NAME:=luasocket
PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
PKG_VERSION:=3.0-rc1-20130909
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
LIBDIR="$(TARGET_LDFLAGS)" \
- CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
+ CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LD="$(TARGET_CROSS)ld -shared" \
all
endef
--- /dev/null
+--- a/src/makefile
++++ b/src/makefile
+@@ -163,9 +163,8 @@ DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
+ -DLUASOCKET_API='__attribute__((visibility("default")))' \
+ -DUNIX_API='__attribute__((visibility("default")))' \
+ -DMIME_API='__attribute__((visibility("default")))'
+-CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \
+- -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
+-LDFLAGS_linux=-O -shared -fpic -o
++CFLAGS_linux= -I$(LUAINC) $(DEF) -fvisibility=hidden
++LDFLAGS_linux=-shared -o
+ LD_linux=gcc
+ SOCKET_linux=usocket.o
+
TARGET_CPPFLAGS += -DLUA_USE_LINUX
ifeq ($(BUILD_VARIANT),mysql)
- TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql
- TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
+ MAKE_FLAGS += DRIVER_INCS_mysql='-I$(STAGING_DIR)/usr/include/mysql' \
+ DRIVER_LIBS_mysql='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz'
endif
ifeq ($(BUILD_VARIANT),postgres)
- TARGET_LDFLAGS += -lpq
+ MAKE_FLAGS += DRIVER_LIBS_postgres='$(TARGET_LDFLAGS) -lpq'
endif
ifeq ($(BUILD_VARIANT),sqlite3)
- TARGET_LDFLAGS += -lsqlite3 -lpthread
+ MAKE_FLAGS += DRIVER_LIBS_sqlite='$(TARGET_LDFLAGS) -lsqlite3 -lpthread'
endif
MAKE_FLAGS += \
- DRIVER_INCS="$(TARGET_CPPFLAGS)" \
- DRIVER_LIBS="$(TARGET_LDFLAGS)" \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
$(BUILD_VARIANT)
PKG_NPM_NAME:=arduino-firmata
PKG_NAME:=node-$(PKG_NPM_NAME)
PKG_VERSION:=0.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
-PKG_MIRROR_HASH:=1aef93dc704ea771b9eab51cb64103533f829aee5b2886ad55d173adf3f11ede
-PKG_SOURCE_VERSION:=v0.3.4
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Node.js package to access serial ports for reading and writing
- URL:=https://www.npmjs.org/package/serialport
+ TITLE:=Arduino Firmata implementation for Node.js
+ URL:=https://www.npmjs.com/package/arduino-firmata
DEPENDS:=+node +node-npm +node-serialport
endef
define Package/node-arduino-firmata/description
- Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+ Arduino Firmata protocol (http://firmata.org) implementation on Node.js.
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-arduino-firmata/install
- mkdir -p $(1)/usr/lib/node
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node
- rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ \
- $(1)/usr/lib/node/arduino-firmata/patches \
- $(1)/usr/lib/node/arduino-firmata/.p* \
- $(1)/usr/lib/node/arduino-firmata/.quilt* \
- $(1)/usr/lib/node/arduino-firmata/.built* \
- $(1)/usr/lib/node/arduino-firmata/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,README.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{tests,*.txt} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,node-arduino-firmata))
-
(function() {
'use strict';
- var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+ var ArduinoFirmata, debug, events, exports, serialport;
events = require('eventemitter2');
- SerialPort = (serialport = require('serialport')).SerialPort;
+ serialport = require('serialport');
debug = require('debug')('arduino-firmata');
- exports = module.exports = ArduinoFirmata = (function(superClass) {
- extend(ArduinoFirmata, superClass);
-
- ArduinoFirmata.Status = {
- CLOSE: 0,
- OPEN: 1
- };
-
- ArduinoFirmata.INPUT = 0;
-
- ArduinoFirmata.OUTPUT = 1;
-
- ArduinoFirmata.ANALOG = 2;
-
- ArduinoFirmata.PWM = 3;
-
- ArduinoFirmata.SERVO = 4;
-
- ArduinoFirmata.SHIFT = 5;
-
- ArduinoFirmata.I2C = 6;
-
- ArduinoFirmata.LOW = 0;
-
- ArduinoFirmata.HIGH = 1;
-
- ArduinoFirmata.MAX_DATA_BYTES = 32;
-
- ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
-
- ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
-
- ArduinoFirmata.REPORT_ANALOG = 0xC0;
-
- ArduinoFirmata.REPORT_DIGITAL = 0xD0;
-
- ArduinoFirmata.SET_PIN_MODE = 0xF4;
-
- ArduinoFirmata.REPORT_VERSION = 0xF9;
-
- ArduinoFirmata.SYSTEM_RESET = 0xFF;
-
- ArduinoFirmata.START_SYSEX = 0xF0;
-
- ArduinoFirmata.END_SYSEX = 0xF7;
-
- ArduinoFirmata.list = function(callback) {
- return serialport.list(function(err, ports) {
- var devices, j, len, port;
- if (err) {
- return callback(err);
- }
- devices = [];
- for (j = 0, len = ports.length; j < len; j++) {
- port = ports[j];
- if (/usb|acm|com\d+/i.test(port.comName)) {
- devices.push(port.comName);
+ exports = module.exports = ArduinoFirmata = (function() {
+ class ArduinoFirmata extends events.EventEmitter2 {
+ static list(callback) {
+ return serialport.list(function(err, ports) {
+ var devices, j, len, port;
+ if (err) {
+ return callback(err);
}
- }
- return callback(null, devices);
- });
- };
-
- function ArduinoFirmata() {
- this.status = ArduinoFirmata.Status.CLOSE;
- this.wait_for_data = 0;
- this.execute_multi_byte_command = 0;
- this.multi_byte_channel = 0;
- this.stored_input_data = [];
- this.parsing_sysex = false;
- this.sysex_bytes_read = 0;
- this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
- this.boardVersion = null;
- }
-
- ArduinoFirmata.prototype.isOldArduinoDevice = function() {
- return /usbserial|USB/.test(this.serialport_name);
- };
+ devices = [];
+ for (j = 0, len = ports.length; j < len; j++) {
+ port = ports[j];
+ if (/usb|acm|com|ama\d+/i.test(port.comName)) {
+ devices.push(port.comName);
+ }
+ }
+ return callback(null, devices);
+ });
+ }
- ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
- this.serialport_name = serialport_name;
- if (opts == null) {
- opts = {
- baudrate: 57600
- };
+ constructor() {
+ super();
+ this.status = ArduinoFirmata.Status.CLOSE;
+ this.wait_for_data = 0;
+ this.execute_multi_byte_command = 0;
+ this.multi_byte_channel = 0;
+ this.stored_input_data = [];
+ this.parsing_sysex = false;
+ this.sysex_bytes_read = 0;
+ this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+ this.boardVersion = null;
}
- opts.parser = serialport.parsers.raw;
- if (!this.serialport_name) {
- ArduinoFirmata.list((function(_this) {
- return function(err, devices) {
- return _this.connect(devices[0], opts);
- };
- })(this));
- return this;
+
+ isOldArduinoDevice() {
+ return /usbserial|USB/.test(this.serialport_name);
}
- this.once('boardReady', function() {
- var io_init_wait;
- debug('boardReady');
- io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
- debug("wait " + io_init_wait + "(msec)");
- return setTimeout((function(_this) {
- return function() {
+
+ connect(serialport_name, opts = {
+ baudRate: 57600
+ }) {
+ this.serialport_name = serialport_name;
+ opts.parser = serialport.parsers.raw;
+ if (!this.serialport_name) {
+ ArduinoFirmata.list((err, devices) => {
+ return this.connect(devices[0], opts);
+ });
+ return this;
+ }
+ this.once('boardReady', function() {
+ var io_init_wait;
+ debug('boardReady');
+ io_init_wait = this.isOldArduinoDevice() ? (debug(`old arduino device found ${this.serialport_name}`), 3000) : (debug(`new arduino device found ${this.serialport_name}`), 100);
+ debug(`wait ${io_init_wait}(msec)`);
+ return setTimeout(() => {
var i, j, k;
for (i = j = 0; j < 6; i = ++j) {
- _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
+ this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
}
for (i = k = 0; k < 2; i = ++k) {
- _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
+ this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
}
debug('init IO ports');
- return _this.emit('connect');
- };
- })(this), io_init_wait);
- });
- this.serialport = new SerialPort(this.serialport_name, opts);
- this.serialport.once('open', (function(_this) {
- return function() {
+ return this.emit('connect');
+ }, io_init_wait);
+ });
+ this.serialport = new serialport(this.serialport_name, opts);
+ this.serialport.once('open', () => {
var cid;
- cid = setInterval(function() {
+ cid = setInterval(() => {
debug('request REPORT_VERSION');
- return _this.write([ArduinoFirmata.REPORT_VERSION]);
+ return this.write([ArduinoFirmata.REPORT_VERSION]);
}, 500);
- _this.once('boardVersion', function(version) {
+ this.once('boardVersion', (version) => {
clearInterval(cid);
- _this.status = ArduinoFirmata.Status.OPEN;
- return _this.emit('boardReady');
+ this.status = ArduinoFirmata.Status.OPEN;
+ return this.emit('boardReady');
});
- return _this.serialport.on('data', function(data) {
+ return this.serialport.on('data', (data) => {
var byte, j, len, results;
results = [];
for (j = 0, len = data.length; j < len; j++) {
byte = data[j];
- results.push(_this.process_input(byte));
+ results.push(this.process_input(byte));
}
return results;
});
- };
- })(this));
- return this;
- };
+ });
+ return this;
+ }
- ArduinoFirmata.prototype.isOpen = function() {
- return this.status === ArduinoFirmata.Status.OPEN;
- };
+ isOpen() {
+ return this.status === ArduinoFirmata.Status.OPEN;
+ }
- ArduinoFirmata.prototype.close = function(callback) {
- this.status = ArduinoFirmata.Status.CLOSE;
- return this.serialport.close(callback);
- };
+ close(callback) {
+ this.status = ArduinoFirmata.Status.CLOSE;
+ return this.serialport.close(callback);
+ }
- ArduinoFirmata.prototype.reset = function(callback) {
- return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
- };
+ reset(callback) {
+ return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
+ }
- ArduinoFirmata.prototype.write = function(bytes, callback) {
- return this.serialport.write(bytes, callback);
- };
+ write(bytes, callback) {
+ return this.serialport.write(bytes, callback);
+ }
- ArduinoFirmata.prototype.sysex = function(command, data, callback) {
- var write_data;
- if (data == null) {
- data = [];
+ sysex(command, data = [], callback) {
+ var write_data;
+ //# http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
+ data = data.map(function(i) {
+ return i & 0b1111111; // 7bit
+ });
+ write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
+ return this.write(write_data, callback);
}
- data = data.map(function(i) {
- return i & 0x7f;
- });
- write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
- return this.write(write_data, callback);
- };
- ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
- switch (mode) {
- case true:
- mode = ArduinoFirmata.OUTPUT;
- break;
- case false:
- mode = ArduinoFirmata.INPUT;
+ pinMode(pin, mode, callback) {
+ switch (mode) {
+ case true:
+ mode = ArduinoFirmata.OUTPUT;
+ break;
+ case false:
+ mode = ArduinoFirmata.INPUT;
+ }
+ return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
}
- return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
- };
- ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
- var port_num;
- this.pinMode(pin, ArduinoFirmata.OUTPUT);
- port_num = (pin >>> 3) & 0x0F;
- if (value === 0 || value === false) {
- this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
- } else {
- this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+ digitalWrite(pin, value, callback) {
+ var port_num;
+ this.pinMode(pin, ArduinoFirmata.OUTPUT);
+ port_num = (pin >>> 3) & 0x0F;
+ if (value === 0 || value === false) {
+ this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
+ } else {
+ this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+ }
+ return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
}
- return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
- };
- ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
- value = Math.floor(value);
- this.pinMode(pin, ArduinoFirmata.PWM);
- return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
- };
+ analogWrite(pin, value, callback) {
+ value = Math.floor(value);
+ this.pinMode(pin, ArduinoFirmata.PWM);
+ return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
+ }
- ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
- this.pinMode(pin, ArduinoFirmata.SERVO);
- return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
- };
+ servoWrite(pin, angle, callback) {
+ this.pinMode(pin, ArduinoFirmata.SERVO);
+ return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
+ }
- ArduinoFirmata.prototype.digitalRead = function(pin) {
- return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
- };
+ digitalRead(pin) {
+ return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
+ }
- ArduinoFirmata.prototype.analogRead = function(pin) {
- return this.analog_input_data[pin];
- };
+ analogRead(pin) {
+ return this.analog_input_data[pin];
+ }
- ArduinoFirmata.prototype.process_input = function(input_data) {
- var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
- if (this.parsing_sysex) {
- if (input_data === ArduinoFirmata.END_SYSEX) {
- this.parsing_sysex = false;
- sysex_command = this.stored_input_data[0];
- sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
- return this.emit('sysex', {
- command: sysex_command,
- data: sysex_data
- });
- } else {
- this.stored_input_data[this.sysex_bytes_read] = input_data;
- return this.sysex_bytes_read += 1;
- }
- } else if (this.wait_for_data > 0 && input_data < 128) {
- this.wait_for_data -= 1;
- this.stored_input_data[this.wait_for_data] = input_data;
- if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
- switch (this.execute_multi_byte_command) {
- case ArduinoFirmata.DIGITAL_MESSAGE:
- input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
- diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
- this.digital_input_data[this.multi_byte_channel] = input_data;
- if (this.listeners('digitalChange').length > 0) {
- results = [];
- for (i = j = 0; j <= 13; i = ++j) {
- if (((0x01 << i) & diff) > 0) {
- stat = (input_data & diff) > 0;
- results.push(this.emit('digitalChange', {
- pin: i + this.multi_byte_channel * 8,
- value: stat,
- old_value: !stat
- }));
- } else {
- results.push(void 0);
+ process_input(input_data) {
+ var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
+ if (this.parsing_sysex) {
+ if (input_data === ArduinoFirmata.END_SYSEX) {
+ this.parsing_sysex = false;
+ sysex_command = this.stored_input_data[0];
+ sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
+ return this.emit('sysex', {
+ command: sysex_command,
+ data: sysex_data
+ });
+ } else {
+ this.stored_input_data[this.sysex_bytes_read] = input_data;
+ return this.sysex_bytes_read += 1;
+ }
+ } else if (this.wait_for_data > 0 && input_data < 128) {
+ this.wait_for_data -= 1;
+ this.stored_input_data[this.wait_for_data] = input_data;
+ if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
+ switch (this.execute_multi_byte_command) {
+ case ArduinoFirmata.DIGITAL_MESSAGE:
+ input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+ diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
+ this.digital_input_data[this.multi_byte_channel] = input_data;
+ if (this.listeners('digitalChange').length > 0) {
+ results = [];
+ for (i = j = 0; j <= 13; i = ++j) {
+ if (((0x01 << i) & diff) > 0) {
+ stat = (input_data & diff) > 0;
+ results.push(this.emit('digitalChange', {
+ pin: i + this.multi_byte_channel * 8,
+ value: stat,
+ old_value: !stat
+ }));
+ } else {
+ results.push(void 0);
+ }
}
+ return results;
+ }
+ break;
+ case ArduinoFirmata.ANALOG_MESSAGE:
+ analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+ old_analog_value = this.analogRead(this.multi_byte_channel);
+ this.analog_input_data[this.multi_byte_channel] = analog_value;
+ if (old_analog_value !== analog_value) {
+ return this.emit('analogChange', {
+ pin: this.multi_byte_channel,
+ value: analog_value,
+ old_value: old_analog_value
+ });
}
- return results;
- }
- break;
- case ArduinoFirmata.ANALOG_MESSAGE:
- analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
- old_analog_value = this.analogRead(this.multi_byte_channel);
- this.analog_input_data[this.multi_byte_channel] = analog_value;
- if (old_analog_value !== analog_value) {
- return this.emit('analogChange', {
- pin: this.multi_byte_channel,
- value: analog_value,
- old_value: old_analog_value
- });
- }
- break;
- case ArduinoFirmata.REPORT_VERSION:
- this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
- return this.emit('boardVersion', this.boardVersion);
+ break;
+ case ArduinoFirmata.REPORT_VERSION:
+ this.boardVersion = `${this.stored_input_data[1]}.${this.stored_input_data[0]}`;
+ return this.emit('boardVersion', this.boardVersion);
+ }
}
- }
- } else {
- if (input_data < 0xF0) {
- command = input_data & 0xF0;
- this.multi_byte_channel = input_data & 0x0F;
} else {
- command = input_data;
- }
- if (command === ArduinoFirmata.START_SYSEX) {
- this.parsing_sysex = true;
- return this.sysex_bytes_read = 0;
- } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
- this.wait_for_data = 2;
- return this.execute_multi_byte_command = command;
+ if (input_data < 0xF0) {
+ command = input_data & 0xF0;
+ this.multi_byte_channel = input_data & 0x0F;
+ } else {
+ command = input_data;
+ }
+ if (command === ArduinoFirmata.START_SYSEX) {
+ this.parsing_sysex = true;
+ return this.sysex_bytes_read = 0;
+ } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
+ this.wait_for_data = 2;
+ return this.execute_multi_byte_command = command;
+ }
}
}
+
+ };
+
+ ArduinoFirmata.Status = {
+ CLOSE: 0,
+ OPEN: 1
};
+ ArduinoFirmata.INPUT = 0;
+
+ ArduinoFirmata.OUTPUT = 1;
+
+ ArduinoFirmata.ANALOG = 2;
+
+ ArduinoFirmata.PWM = 3;
+
+ ArduinoFirmata.SERVO = 4;
+
+ ArduinoFirmata.SHIFT = 5;
+
+ ArduinoFirmata.I2C = 6;
+
+ ArduinoFirmata.LOW = 0;
+
+ ArduinoFirmata.HIGH = 1;
+
+ ArduinoFirmata.MAX_DATA_BYTES = 32;
+
+ ArduinoFirmata.DIGITAL_MESSAGE = 0x90; // send data for a digital port
+
+ ArduinoFirmata.ANALOG_MESSAGE = 0xE0; // send data for an analog pin (or PWM)
+
+ ArduinoFirmata.REPORT_ANALOG = 0xC0; // enable analog input by pin
+
+ ArduinoFirmata.REPORT_DIGITAL = 0xD0; // enable digital input by port
+
+ ArduinoFirmata.SET_PIN_MODE = 0xF4; // set a pin to INPUT/OUTPUT/PWM/etc
+
+ ArduinoFirmata.REPORT_VERSION = 0xF9; // report firmware version
+
+ ArduinoFirmata.SYSTEM_RESET = 0xFF; // reset from MIDI
+
+ ArduinoFirmata.START_SYSEX = 0xF0; // start a MIDI SysEx message
+
+ ArduinoFirmata.END_SYSEX = 0xF7; // end a MIDI SysEx message
+
return ArduinoFirmata;
- })(events.EventEmitter2);
+ }).call(this);
}).call(this);
PKG_NPM_NAME:=cylon
PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_SRC_NAME:=$(PKG_NPM_NAME)-firmata
PKG_VERSION:=0.24.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
-PKG_SOURCE_VERSION:=a930f8446f23ec2cb28aadeff54b79ab7704e3a0
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=dceb75539d32f402db0a5f68f2c7e2b52e5547a5ac2dec875d34fd3cc95cce00
+PKG_SOURCE:=$(PKG_SRC_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_SRC_NAME)/-/
+PKG_HASH:=06ac7a8e2e6012577d2f4b043af766bf28a1d3e2a0d50e46629dab4f0bb65104
+PKG_SOURCE_SUBDIR:=$(PKG_SRC_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
SECTION:=lang
CATEGORY:=Languages
TITLE:=CylonJS - $(1)
- URL:=https://www.npmjs.org/package/cylon
+ URL:=https://www.npmjs.org/package/cylon-firmata
DEPENDS:=+node +node-npm $(2)
endef
endef
define Package/node-cylon/description
- JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
+ JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-cylon/install
- mkdir -p $(1)/usr/lib/node/cylon
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
endef
define Package/node-cylon-i2c/install
- mkdir -p $(1)/usr/lib/node/cylon-i2c
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-i2c
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
endef
define Package/node-cylon-gpio/install
- mkdir -p $(1)/usr/lib/node/cylon-gpio
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-gpio
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
endef
define Package/node-cylon-firmata/install
- mkdir -p $(1)/usr/lib/node/cylon-firmata
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/cylon-firmata
+ $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/cylon-firmata/
+ $(CP) $(PKG_BUILD_DIR)/{docs,examples,*.js} \
+ $(1)/usr/lib/node/cylon-firmata/
+ $(CP) $(PKG_BUILD_DIR)/{lib,spec} \
+ $(1)/usr/lib/node/cylon-firmata/
endef
$(eval $(call BuildPackage,node-cylon))
$(eval $(call BuildPackage,node-cylon-i2c))
$(eval $(call BuildPackage,node-cylon-gpio))
$(eval $(call BuildPackage,node-cylon-firmata))
-
include $(TOPDIR)/rules.mk
-PKG_NPM_NAME:=hid
-PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.7.2
-PKG_RELEASE:=2
+PKG_NPM_NAME:=node-hid
+PKG_NAME:=$(PKG_NPM_NAME)
+PKG_VERSION:=0.7.7
+PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v0.7.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=ede801a26a23290ab76d64ab636c3c3e2788030bb830af7006d37444c2a7b2c4
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=ac14467265a64116114e99091cd557ca7953500285c78cb4bdf6b82fe262cca6
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT or X11
PKG_LICENSE_FILES:=
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Languages
TITLE:=Node.js package to access HID devices
URL:=https://github.com/node-hid/node-hid
- DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +libudev-fbsd
+ DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev-fbsd
endef
define Package/node-hid/description
Node.js package to access HID devices
endef
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+
+TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
define Build/Compile
git init $(PKG_BUILD_DIR)
- cd $(PKG_BUILD_DIR) ; \
$(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install --build-from-source --target_arch=$(CPU) -g \
- `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-hid/install
- mkdir -p $(1)/usr/lib/node/node-hid/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node/
- $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
- $(1)/usr/lib/node/node-hid/.p* \
- $(1)/usr/lib/node/node-hid/.quilt* \
- $(1)/usr/lib/node/node-hid/.built* \
- $(1)/usr/lib/node/node-hid/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID.node \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
endef
$(eval $(call BuildPackage,node-hid))
-
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=homebridge
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.4.48
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=020a4d882c04ed26a3c96b8a5e82768b29309cf461aa9a17f330887ed12e3e6b
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_USE_MIPS16:=0
+
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=ISC Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-homebridge
+ SUBMENU:=Node.js
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Node.js HomeKit Server
+ URL:=https://www.npmjs.org/package/homebridge
+ DEPENDS:=+node +node-npm
+ USERID:=homebridge:homebridge
+endef
+
+define Package/node-homebridge/description
+ Homebridge is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API
+endef
+
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+define Build/Prepare
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+ $(MAKE_VARS) \
+ $(MAKE_FLAGS) \
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+ npm install -g $(DL_DIR)/$(PKG_SOURCE)
+ rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+ rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
+endef
+
+define Package/node-homebridge/install
+ $(INSTALL_DIR) $(1)/usr/lib/node
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(LN) ../lib/node/homebridge/bin/homebridge $(1)/usr/bin/homebridge
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/homebridge.init $(1)/etc/init.d/homebridge
+endef
+
+$(eval $(call BuildPackage,node-homebridge))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=98
+USE_PROCD=1
+
+start_service() {
+ [ -d /usr/share/homebridge ] || {
+ mkdir -m 0755 -p /usr/share/homebridge
+ chmod 0700 /usr/share/homebridge
+ chown homebridge:homebridge /usr/share/homebridge
+ }
+ procd_open_instance
+ procd_set_param command /usr/bin/homebridge -U /usr/share/homebridge
+ procd_set_param user homebridge
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
PKG_NPM_NAME:=serialport
PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=6.1.1
-PKG_RELEASE:=2
+PKG_VERSION:=7.1.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=b58c326d217fb0af1639e4ea834d9fca4be16934c486499e2ddac6e52b8dd560
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d6f60bd81fe94578dee8e82887a66c5b007ec3f346b13d8156dd94a46f2b4849
PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Node.js
SECTION:=lang
CATEGORY:=Languages
- TITLE:=Node.js package to access serial ports for reading and writing
- URL:=https://www.npmjs.org/package/serialport
+ TITLE:=Node.js package to access serial ports
+ URL:=https://serialport.io/
DEPENDS:=+node +node-npm
endef
Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
endef
-define Build/Prepare
- /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
- $(Build/Patch)
-endef
-
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
define Build/Compile
- cd $(PKG_BUILD_DIR) ; \
+ $(MAKE_VARS) \
$(MAKE_FLAGS) \
- npm_config_arch=$(CONFIG_ARCH) \
- npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
- npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
- PREFIX="$(PKG_INSTALL_DIR)/usr/" \
- npm install --build-from-source --target_arch=$(CPU) -g \
- `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+ npm_config_arch=$(NODEJS_CPU) \
+ npm_config_target_arch=$(NODEJS_CPU) \
+ npm_config_build_from_source=true \
+ npm_config_nodedir=$(STAGING_DIR)/usr/ \
+ npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+ npm_config_cache=$(TMP_DIR)/npm-cache \
+ npm_config_tmp=$(TMP_DIR)/npm-tmp \
+ npm install -g --build-from-source $(PKG_BUILD_DIR)
+ rm -rf $(TMP_DIR)/npm-tmp
+ rm -rf $(TMP_DIR)/npm-cache
endef
define Package/node-serialport/install
- mkdir -p $(1)/usr/lib/node/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
- $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
- $(1)/usr/lib/node/node-hid/.p* \
- $(1)/usr/lib/node/node-hid/.quilt* \
- $(1)/usr/lib/node/node-hid/.built* \
- $(1)/usr/lib/node/node-hid/.config*
- # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
- # https://github.com/npm/npm/issues/10393
- # https://github.com/npm/npm/issues/12110
- find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+ $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,LICENSE,*.md} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/test.js \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+ $(1)/usr/lib/node/$(PKG_NPM_NAME)/
endef
$(eval $(call BuildPackage,node-serialport))
-
include $(TOPDIR)/rules.mk
PKG_NAME:=node
-PKG_VERSION:=v8.14.1
+PKG_VERSION:=v8.15.1
PKG_RELEASE:=1
PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=b1df87803ddffb76fc6739f025f69f6b8288514fcd2f278f0d675ac3d52a6b9b
+PKG_HASH:=6b6486a3f452624941f6e11dd5f878c298d43e9c21b5f43ca1721dc7ce25add1
HOST_BUILD_DEPENDS:=python/host
PKG_BUILD_DEPENDS:=python/host
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-cgi
-PKG_VERSION:=4.40
+PKG_VERSION:=4.42
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_HASH:=10efff3061b3c31a33b3cc59f955aef9c88d57d12dbac46389758cef92f24f56
+PKG_HASH:=11d308e7dad2312d65747a7fdec5d0c22024c28df5e882e829ca1553482024e7
-PKG_LICENSE:=GPL Artistic-2.0
+PKG_LICENSE:=Artistic-2.0
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
Philip Prindeville <philipp@redfish-solutions.com>
SECTION:=lang
CATEGORY:=Languages
TITLE:=Handle Common Gateway Interface requests and responses
- URL:=http://search.cpan.org/dist/CGI/
+ URL:=https://search.cpan.org/dist/CGI/
DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-parse-recdescent
-PKG_VERSION:=1.967013
+PKG_VERSION:=1.967015
PKG_RELEASE:=1
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JT/JTBRAUN
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/J/JT/JTBRAUN
PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz
-PKG_HASH:=226590d3850cd1678deb0190d5207b3477fb9070a8ca6f18d8999daf44485930
+PKG_HASH:=1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-text-csv_xs
-PKG_VERSION:=1.37
+PKG_VERSION:=1.39
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://www.cpan.org/authors/id/H/HM/HMBRAND/
PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
-PKG_HASH:=20e16da9c38b0938f308c01d954f49d2c6922bac0d2d979bf2ad483fe7476ba2
+PKG_HASH:=aa4e424eaf68bea0d0e8c16b961c942b64926e6183ce1dbbc6c799eafb0a9ebd
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
PECL_NAME:=mcrypt
PECL_LONGNAME:=Bindings for the libmcrypt library
-PKG_VERSION:=1.0.1
+PKG_VERSION:=1.0.2
PKG_RELEASE:=1
-PKG_HASH:=a3b0e5493b5cd209ab780ee54733667293d369e6b7052b4a7dab9dd0def46ac6
+PKG_HASH:=4d21dd20bfdc3cf4d43c967abdd137224f9c56258ca28ee0bc66ce130e01cae4
PKG_NAME:=php7-pecl-mcrypt
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=7.2.15
+PKG_VERSION:=7.2.17
PKG_RELEASE:=1
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
PKG_LICENSE:=PHPv3.01
PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:php:php
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=75e90012faef700dffb29311f3d24fa25f1a5e0f70254a9b8d5c794e25e938ce
+PKG_HASH:=a3e5f51a9ae08813b3925bea3a4de02cd4906fcccf75646e267a213bb63bcf84
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
local port
config_get_bool enabled "$section" 'enabled' 0
- config_get port "$section" 'port' 1026
+ config_get port "$section" 'port'
[ $enabled -gt 0 ] || return 1
PHP_FCGI_CHILDREN='' \
- service_start /usr/bin/php-fcgi -b $port
+ service_start /usr/bin/php-fcgi ${port:+-b $port}
}
start() {
+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
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
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"
#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;
/* 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)
}
}
+ }
+
+ for (l = li[hash]; l; l = l->next) {
-+ if (strcasecmp(l->name, name) == 0)
++ if (timelib_strcasecmp(l->name, name) == 0)
+ return l;
+ }
+
+{
+ const timelib_tzdb_index_entry *alpha = first, *beta = second;
+
-+ return strcasecmp(alpha->id, beta->id);
++ return timelib_strcasecmp(alpha->id, beta->id);
+}
+
+
+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;
}
+#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;
}
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;
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;
}
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);
}
} 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
])
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>
URL:=http://github.com/pallets/flask/
TITLE:=python3-flask
DEPENDS:=+python3-asyncio +python3-click +python3-codecs +python3-decimal \
- +python3-itsdangerous +python3-jinja2 +python3-light +python3-logging \
- +python3-markupsafe +python3-multiprocessing +python3-werkzeug
+ +python3-itsdangerous +python3-jinja2 +python3 +python3-logging \
+ +python3-markupsafe +python3-multiprocessing +python3-setuptools \
+ +python3-werkzeug
VARIANT:=python3
endef
Some packages need custom build rules (because they do).
-For building, if a user specifies a `PyBuild/Compile` & `Py3Build/Compile` rule, this will be used to build/compile the package, instead of the default one defined in `python[3]-package.mk`.
+The default package build and install processes are defined in `python[3]-package.mk`.
-For installing files on the target, 2 build rules are used:
-* `PyPackage/$(1)/filespec` & `Py3Package/$(1)/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` ; most Python[3] packages generate files that get installed in this sub-folder
-* `PyPackage/$(1)/install` & `Py3Package/$(1)/install` is similar to `Package/$(1)/install` ; these allow binary (or other files) to be installed on the target
+#### Building
-Both the 2 above rules generate a `Package/$(1)/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages.
+The default build process calls `setup.py install` inside the directory where the Python source package is extracted (`PKG_BUILD_DIR`). This "installs" the Python package to an intermediate location (`PKG_INSTALL_DIR`) where it is used by the default install process.
+
+There are several Makefile variables that can be used to customize this process (all optional):
+
+* `PYTHON_PKG_SETUP_DIR` / `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`).
+ Default: empty value (`setup.py` is in the package directory)
+* `PYTHON_PKG_SETUP_VARS` / `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`.
+ Default: empty value
+* `PYTHON_PKG_SETUP_GLOBAL_ARGS` / `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command.
+ Default: empty value
+* `PYTHON_PKG_SETUP_ARGS` / `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command.
+ Default: `--single-version-externally-managed`
+
+Conceptually, these variables are used in this way (using a Python 2 package as an example):
+
+```
+cd $(PKG_BUILD_DIR)/$(PYTHON_PKG_SETUP_DIR)
+$(PYTHON_PKG_SETUP_VARS) python setup.py $(PYTHON_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON_PKG_SETUP_ARGS)
+```
+
+The default build process can be completely overridden by defining custom `PyBuild/Compile` & `Py3Build/Compile` rules in the package Makefile.
+
+#### Installing
+
+The default install process copies some/all of the files from `PKG_INSTALL_DIR`, placed there by the build process, to a location passed to the install rule as the first argument (`$(1)`). The OpenWrt build system will then take those files and create the actual .ipk package archives.
+
+This default process uses 2 build rules:
+* `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` (`PYTHON[3]_PKG_DIR`) ; most Python[3] packages generate files that get installed in this sub-folder
+* `PyPackage/<package>/install` & `Py3Package/<package>/install` is similar to `Package/<package>/install` ; these allow binary (or other files) to be installed on the target
+
+Both the 2 above rules generate a `Package/<package>/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages.
+
+The `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` rules contain one or more lines of the following format (whitespace added for clarity):
+
+```
+<one of: +-=> | <file/directory path> | <file permissions>
+```
+
+The initial character controls the action that will be taken:
+
+* `+`: Install the given path. If the path is a directory, all files and subdirectories inside are installed.
+ * If file permissions is specified (optional), then the file or directory (and all files and subdirectories) are assigned the given permissions; if omitted, then the file or directory retains its original permissions.
+* `-`: Remove the given path. Useful when most of a directory should be installed except for a few files or subdirectories.
+ * File permissions is not used / ignored in this case.
+* `=`: Assign the given file permissions to the given path. File permissions is required in this case.
+
+As mentioned, the default `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` install `PYTHON[3]_PKG_DIR`:
+
+```
+define PyPackage/python-example/filespec
++|$(PYTHON_PKG_DIR)
+endef
+```
+
+If there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as:
+
+```
+define PyPackage/python-example/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/examples
+-|$(PYTHON_PKG_DIR)/test_*.py
+endef
+```
### Host-side Python packages for build
include $(TOPDIR)/rules.mk
PKG_NAME:=bcrypt
-PKG_VERSION:=3.1.5
+PKG_VERSION:=3.1.6
PKG_RELEASE:=1
PKG_SOURCE:=bcrypt-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/b/$(PKG_NAME)
-PKG_HASH:=136243dc44e5bab9b61206bd46fff3018bd80980b1a1dfbab64a22ff5745957f
+PKG_HASH:=44636759d222baa62806bbceb20e96f75a015a6381690d1bc2eda91c01ec02ea
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
+++ /dev/null
-#
-# Copyright (C) 2007-2017 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:=chardet
-PKG_VERSION:=3.0.4
-PKG_RELEASE:=1
-PKG_LICENSE:=LGPL-2.1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/
-PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/chardet
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=Universal encoding detector for Python 2 and 3
- URL:=https://github.com/chardet/chardet
- DEPENDS:=+python
-endef
-
-define Package/chardet/description
- Universal encoding detector for Python 2 and 3
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/chardet/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_DIR) $(1)/usr/bin
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \
- $(1)/usr/bin
- # fix python exec path in scripts
- sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect
-endef
-
-$(eval $(call BuildPackage,chardet))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=click-log
+PKG_VERSION:=0.3.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/click-contrib/click-log/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=16babb66a2ebf22c37c1cf38753a84e6027eb8991fcf9a8487971591b8ca9812
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-click-log
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=http://github.com/mitsuhiko/click
+ TITLE:=python3-click-log
+ DEPENDS:=+python3-click
+ VARIANT:=python3
+endef
+
+define Package/python3-click-log/description
+ Simple and beautiful logging for click applications
+endef
+
+$(eval $(call Py3Package,python3-click-log))
+$(eval $(call BuildPackage,python3-click-log))
+$(eval $(call BuildPackage,python3-click-log-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=aiohttp
+PKG_VERSION:=3.5.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=aiohttp-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/aiohttp/
+PKG_HASH:=9c4c83f4fa1938377da32bc2d59379025ceeee8e24b89f72fcbccd8ca22dc9bf
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:aio-libs_project:aiohttp
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-aiohttp
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Async http client/server framework (asyncio)
+ URL:=https://github.com/aio-libs/aiohttp
+ DEPENDS:= \
+ +python3-light \
+ +python3-attrs \
+ +python3-chardet \
+ +python3-multidict \
+ +python3-async-timeout \
+ +python3-yarl \
+ +python3-logging \
+ +python3-codecs \
+ +python3-cgi \
+ +python3-openssl
+ VARIANT:=python3
+endef
+
+define Package/python3-aiohttp/description
+Asynchronous HTTP client/server framework for asyncio and Python3
+endef
+
+$(eval $(call Py3Package,python3-aiohttp))
+$(eval $(call BuildPackage,python3-aiohttp))
+$(eval $(call BuildPackage,python3-aiohttp-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-appdirs
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/a/appdirs/
+PKG_SOURCE:=appdirs-$(PKG_VERSION).tar.gz
+PKG_HASH:=9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92
+PKG_LICENSE:=MIT
+PKG_BUILD_DIR:=$(BUILD_DIR)/appdirs-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-appdirs
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/ActiveState/appdirs
+ TITLE:=python3-appdirs
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-appdirs/description
+ The Universal Character Encoding Detector
+endef
+
+$(eval $(call Py3Package,python3-appdirs))
+$(eval $(call BuildPackage,python3-appdirs))
+$(eval $(call BuildPackage,python3-appdirs-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-astral
+PKG_VERSION:=1.10.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=astral-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/astral/
+PKG_HASH:=d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-astral-$(PKG_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-astral/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Calculations for the position of the sun and moon
+ URL:=https://github.com/sffjunkie/astral
+endef
+
+define Package/python-astral
+$(call Package/python-astral/Default)
+ DEPENDS+= \
+ +PACKAGE_python-astral:python-light \
+ +PACKAGE_python-astral:python-pytz
+ VARIANT:=python
+endef
+
+define Package/python3-astral
+$(call Package/python-astral/Default)
+ DEPENDS+= \
+ +PACKAGE_python3-astral:python3-light \
+ +PACKAGE_python3-astral:python3-pytz
+ VARIANT:=python3
+endef
+
+define Package/python-astral/description
+Astral is a python module for calculating the times of various aspects of the sun and moon.
+endef
+
+define Package/python3-astral/description
+$(call Package/python-astral/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-astral))
+$(eval $(call BuildPackage,python-astral))
+$(eval $(call BuildPackage,python-astral-src))
+
+$(eval $(call Py3Package,python3-astral))
+$(eval $(call BuildPackage,python3-astral))
+$(eval $(call BuildPackage,python3-astral-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=async-timeout
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=async-timeout-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/async-timeout/
+PKG_HASH:=0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-async-timeout
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Timeout context manager for asyncio programs
+ URL:=https://github.com/aio-libs/async-timeout
+ DEPENDS:= \
+ +python3-light \
+ +python3-asyncio
+ VARIANT:=python3
+endef
+
+define Package/python3-async-timeout/description
+Timeout context manager for asyncio programs
+endef
+
+$(eval $(call Py3Package,python3-async-timeout))
+$(eval $(call BuildPackage,python3-async-timeout))
+$(eval $(call BuildPackage,python3-async-timeout-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-attrs
-PKG_VERSION:=18.2.0
+PKG_VERSION:=19.1.0
PKG_RELEASE:=1
PKG_SOURCE:=attrs-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/attrs
-PKG_HASH:=10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69
+PKG_HASH:=f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-attrs-$(PKG_VERSION)
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=Classes Without Boilerplate
- URL:=http://www.attrs.org/
+ URL:=https://www.attrs.org/
endef
define Package/python-attrs
include $(TOPDIR)/rules.mk
PKG_NAME:=python-certifi
-PKG_VERSION:=2018.11.29
+PKG_VERSION:=2019.3.9
PKG_RELEASE:=1
PKG_LICENSE:=MPL-2.0
PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
-PKG_HASH:=47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7
+PKG_HASH:=b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-certifi-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cffi
-PKG_VERSION:=1.12.1
+PKG_VERSION:=1.12.2
PKG_RELEASE:=1
PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cffi
-PKG_HASH:=9b6f7ba4e78c52c1a291d0c0c0bd745d19adde1a9e1c03cb899f0c6efd6f8033
+PKG_HASH:=e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
CATEGORY:=Languages
SUBMENU:=Python
TITLE:=C Foreign Function Interface
- URL:=http://cffi.readthedocs.org/
+ URL:=https://cffi.readthedocs.org/
DEPENDS:=+libffi
endef
--- /dev/null
+#
+# Copyright (C) 2007-2017 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:=python-chardet
+PKG_VERSION:=3.0.4
+PKG_RELEASE:=1
+PKG_LICENSE:=LGPL-2.1
+
+PKG_SOURCE:=chardet-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/
+PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-chardet-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-chardet/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+ URL:=https://github.com/chardet/chardet
+endef
+
+define Package/python-chardet
+$(call Package/python-chardet/Default)
+ TITLE:=Universal encoding detector for Python 2
+ DEPENDS:=+PACKAGE_python-chardet:python
+ VARIANT:=python
+endef
+
+define Package/python3-chardet
+$(call Package/python-chardet/Default)
+ TITLE:=Universal encoding detector for Python3
+ DEPENDS:=+PACKAGE_python3-chardet:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-chardet/description
+ Universal encoding detector for Python 2 and 3
+endef
+
+define Package/python3-chardet/description
+$(call Package/python-chardet/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-chardet))
+$(eval $(call BuildPackage,python-chardet))
+$(eval $(call BuildPackage,python-chardet-src))
+
+$(eval $(call Py3Package,python3-chardet))
+$(eval $(call BuildPackage,python3-chardet))
+$(eval $(call BuildPackage,python3-chardet-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-contextlib2
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/contextlib2/
+PKG_SOURCE:=contextlib2-$(PKG_VERSION).tar.gz
+PKG_HASH:=509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48
+PKG_BUILD_DIR:=$(BUILD_DIR)/contextlib2-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-contextlib2
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=http://contextlib2.readthedocs.org
+ TITLE:=python3-contextlib2
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-contextlib2/description
+ contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions.
+endef
+
+$(eval $(call Py3Package,python3-contextlib2))
+$(eval $(call BuildPackage,python3-contextlib2))
+$(eval $(call BuildPackage,python3-contextlib2-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cryptodome
+PKG_VERSION:=3.8.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pycryptodome-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodome
+PKG_HASH:=68ad0ce4a374577a26bb7f458575abe3c2a342818b5280de6e5738870b7761b3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodome-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+define Package/python-cryptodome/Default
+ SECTION:=lang-python
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=A self-contained cryptographic library for Python
+ URL:=https://www.pycryptodome.org/
+ DEPENDS:=+libgmp
+endef
+
+define Package/python-cryptodome
+$(call Package/python-cryptodome/Default)
+ DEPENDS+=+PACKAGE_python-cryptodome:python
+ VARIANT:=python
+ CONFLICTS:=python-crypto
+endef
+
+define Package/python3-cryptodome
+$(call Package/python-cryptodome/Default)
+ DEPENDS+=+PACKAGE_python3-cryptodome:python3
+ VARIANT:=python3
+ CONFLICTS:=python3-crypto
+endef
+
+define Package/python-cryptodome/description
+PyCryptodome is a self-contained Python package of low-level
+cryptographic primitives.
+endef
+
+define Package/python3-cryptodome/description
+$(call Package/python-cryptodome/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-cryptodome))
+$(eval $(call BuildPackage,python-cryptodome))
+$(eval $(call BuildPackage,python-cryptodome-src))
+
+$(eval $(call Py3Package,python3-cryptodome))
+$(eval $(call BuildPackage,python3-cryptodome))
+$(eval $(call BuildPackage,python3-cryptodome-src))
--- /dev/null
+--- a/lib/Crypto/Math/_IntegerGMP.py
++++ b/lib/Crypto/Math/_IntegerGMP.py
+@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG;
+ int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d);
+ """
+
+-lib = load_lib("gmp", gmp_defs)
++lib = load_lib("libgmp.so.10", gmp_defs)
+ implementation = {"library": "gmp", "api": backend}
+
+ if hasattr(lib, "__mpir_version"):
--- /dev/null
+--- a/setup.py
++++ b/setup.py
+@@ -293,6 +293,9 @@ package_data = {
+ ],
+ }
+
++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')]
++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')}
++
+ ext_modules = [
+ # Hash functions
+ Extension("Crypto.Hash._MD2",
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cryptodomex
+PKG_VERSION:=3.8.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pycryptodomex-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodomex
+PKG_HASH:=9251b3f6254d4274caa21b79bd432bf07afa3567c6f02f11861659fb6245139a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+ CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+define Package/python-cryptodomex/Default
+ SECTION:=lang-python
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=A self-contained cryptographic library for Python
+ URL:=https://www.pycryptodome.org/
+ DEPENDS:=+libgmp
+endef
+
+define Package/python-cryptodomex
+$(call Package/python-cryptodomex/Default)
+ DEPENDS+=+PACKAGE_python-cryptodomex:python
+ VARIANT:=python
+endef
+
+define Package/python3-cryptodomex
+$(call Package/python-cryptodomex/Default)
+ DEPENDS+=+PACKAGE_python3-cryptodomex:python3
+ VARIANT:=python3
+endef
+
+define Package/python-cryptodomex/description
+PyCryptodome is a self-contained Python package of low-level
+cryptographic primitives.
+endef
+
+define Package/python3-cryptodomex/description
+$(call Package/python-cryptodomex/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-cryptodomex))
+$(eval $(call BuildPackage,python-cryptodomex))
+$(eval $(call BuildPackage,python-cryptodomex-src))
+
+$(eval $(call Py3Package,python3-cryptodomex))
+$(eval $(call BuildPackage,python3-cryptodomex))
+$(eval $(call BuildPackage,python3-cryptodomex-src))
--- /dev/null
+--- a/lib/Cryptodome/Math/_IntegerGMP.py
++++ b/lib/Cryptodome/Math/_IntegerGMP.py
+@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG;
+ int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d);
+ """
+
+-lib = load_lib("gmp", gmp_defs)
++lib = load_lib("libgmp.so.10", gmp_defs)
+ implementation = {"library": "gmp", "api": backend}
+
+ if hasattr(lib, "__mpir_version"):
--- /dev/null
+--- a/setup.py
++++ b/setup.py
+@@ -293,6 +293,9 @@ package_data = {
+ ],
+ }
+
++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')]
++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')}
++
+ ext_modules = [
+ # Hash functions
+ Extension("Crypto.Hash._MD2",
PKG_NAME:=pycurl
PKG_VERSION:=7.43.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=pycurl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycurl
+PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
+
PKG_MAINTAINER:=Waldemar Konik <informatyk74@interia.pl>
PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE=COPYING-LGPL
+PKG_LICENSE_FILES:=COPYING-LGPL
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://dl.bintray.com/pycurl/pycurl/
-PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-curl-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-curl
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-curl/Default
CATEGORY:=Languages
SECTION:=lang
SUBMENU:=Python
TITLE:=Python module interface to the cURL library
URL:=http://pycurl.io/
- DEPENDS:=+python +libcurl
+ DEPENDS:=+libcurl
+endef
+
+define Package/python-curl
+$(call Package/python-curl/Default)
+ DEPENDS+=+PACKAGE_python-curl:python
+ VARIANT:=python
endef
define Package/python-curl/description
-Python module interface to the cURL library.
+PycURL is a Python interface to libcurl, the multiprotocol file transfer library.
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --with-openssl --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-curl
+$(call Package/python-curl/Default)
+ DEPENDS+=+PACKAGE_python3-curl:python3
+ VARIANT:=python3
endef
-define Package/python-curl/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
+define Package/python3-curl/description
+$(call Package/python-curl/description)
+.
+(Variant for Python3)
endef
+PYTHON_PKG_SETUP_ARGS:=--with-mbedtls
+PYTHON3_PKG_SETUP_ARGS:=--with-mbedtls
+
+$(eval $(call PyPackage,python-curl))
$(eval $(call BuildPackage,python-curl))
+$(eval $(call BuildPackage,python-curl-src))
+
+$(eval $(call Py3Package,python3-curl))
+$(eval $(call BuildPackage,python3-curl))
+$(eval $(call BuildPackage,python3-curl-src))
--- /dev/null
+From bb7d7a803665005cc72ad68a388e9e937ff3d2f6 Mon Sep 17 00:00:00 2001
+From: Josef Schlehofer <pepe.schlehofer@gmail.com>
+Date: Sat, 23 Mar 2019 21:02:17 +0100
+Subject: [PATCH] support for mbedTLS
+
+---
+ INSTALL.rst | 4 ++--
+ doc/thread-safety.rst | 2 +-
+ setup.py | 28 +++++++++++++++++++++-------
+ src/module.c | 6 ++++--
+ src/pycurl.h | 7 ++++++-
+ src/threadsupport.c | 39 +++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 73 insertions(+), 13 deletions(-)
+
+diff --git a/INSTALL.rst b/INSTALL.rst
+index 8ad8b4f..da70d25 100644
+--- a/INSTALL.rst
++++ b/INSTALL.rst
+@@ -53,7 +53,7 @@ It will then fail at runtime as follows::
+
+ To fix this, you need to tell ``setup.py`` what SSL backend is used::
+
+- python setup.py --with-[openssl|gnutls|nss] install
++ python setup.py --with-[openssl|gnutls|nss|mbedtls] install
+
+ Note: as of PycURL 7.21.5, setup.py accepts ``--with-openssl`` option to
+ indicate that libcurl is built against OpenSSL. ``--with-ssl`` is an alias
+@@ -85,7 +85,7 @@ environment variable::
+ The same applies to the SSL backend, if you need to specify it (see the SSL
+ note above)::
+
+- export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss]
++ export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss|mbedtls]
+ easy_install pycurl
+
+
+diff --git a/doc/thread-safety.rst b/doc/thread-safety.rst
+index 5ba3f3e..ae2b9e5 100644
+--- a/doc/thread-safety.rst
++++ b/doc/thread-safety.rst
+@@ -21,7 +21,7 @@ For Python programs using PycURL, this means:
+ Python code *outside of a libcurl callback for the PycURL object in question*
+ is unsafe.
+
+-PycURL handles the necessary SSL locks for OpenSSL/LibreSSL, GnuTLS and NSS.
++PycURL handles the necessary SSL locks for OpenSSL/LibreSSL, GnuTLS, NSS and mbedTLS.
+
+ A special situation exists when libcurl uses the standard C library
+ name resolver (i.e., not threaded nor c-ares resolver). By default libcurl
+diff --git a/setup.py b/setup.py
+index e1e6925..5ab437f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -143,6 +143,7 @@ class ExtensionConfiguration(object):
+ '--with-ssl': self.using_openssl,
+ '--with-gnutls': self.using_gnutls,
+ '--with-nss': self.using_nss,
++ '--with-mbedtls': self.using_mbedtls,
+ }
+
+ def detect_ssl_option(self):
+@@ -152,20 +153,20 @@ class ExtensionConfiguration(object):
+ if option != other_option:
+ if scan_argv(self.argv, other_option) is not None:
+ raise ConfigurationError('Cannot give both %s and %s' % (option, other_option))
+-
++
+ return option
+
+ def detect_ssl_backend(self):
+ ssl_lib_detected = False
+-
++
+ if 'PYCURL_SSL_LIBRARY' in os.environ:
+ ssl_lib = os.environ['PYCURL_SSL_LIBRARY']
+- if ssl_lib in ['openssl', 'gnutls', 'nss']:
++ if ssl_lib in ['openssl', 'gnutls', 'nss', 'mbedtls']:
+ ssl_lib_detected = True
+ getattr(self, 'using_%s' % ssl_lib)()
+ else:
+ raise ConfigurationError('Invalid value "%s" for PYCURL_SSL_LIBRARY' % ssl_lib)
+-
++
+ option = self.detect_ssl_option()
+ if option:
+ ssl_lib_detected = True
+@@ -194,6 +195,10 @@ class ExtensionConfiguration(object):
+ self.using_nss()
+ ssl_lib_detected = True
+ break
++ if arg[2:] == 'mbedtls':
++ self.using_nss()
++ ssl_lib_detected = True
++ break
+
+ if not ssl_lib_detected and len(self.argv) == len(self.original_argv) \
+ and not os.environ.get('PYCURL_CURL_CONFIG') \
+@@ -201,7 +206,7 @@ class ExtensionConfiguration(object):
+ # this path should only be taken when no options or
+ # configuration environment variables are given to setup.py
+ ssl_lib_detected = self.detect_ssl_lib_on_centos6()
+-
++
+ self.ssl_lib_detected = ssl_lib_detected
+
+ def curl_config(self):
+@@ -301,7 +306,7 @@ class ExtensionConfiguration(object):
+ if errtext:
+ msg += ":\n" + errtext
+ raise ConfigurationError(msg)
+-
++
+ # hack
+ self.sslhintbuf = sslhintbuf
+
+@@ -327,7 +332,7 @@ specify the SSL backend manually.''')
+ self.library_dirs.append(arg[2:])
+ else:
+ self.extra_link_args.append(arg)
+-
++
+ if not self.libraries:
+ self.libraries.append("curl")
+
+@@ -354,6 +359,9 @@ specify the SSL backend manually.''')
+ elif ssl_version.startswith('NSS/'):
+ self.using_nss()
+ ssl_lib_detected = True
++ elif ssl_version.startswith('mbedTLS/'):
++ self.using_mbedtls()
++ ssl_lib_detected = 'mbedtls'
+ return ssl_lib_detected
+
+ def detect_ssl_lib_on_centos6(self):
+@@ -505,6 +513,11 @@ specify the SSL backend manually.''')
+ self.libraries.append('ssl3')
+ self.define_macros.append(('HAVE_CURL_SSL', 1))
+
++ def using_mbedtls(self):
++ self.define_macros.append(('HAVE_CURL_MBEDTLS', 1))
++ self.libraries.append('mbedtls')
++ self.define_macros.append(('HAVE_CURL_SSL', 1))
++
+ def get_bdist_msi_version_hack():
+ # workaround for distutils/msi version requirement per
+ # epydoc.sourceforge.net/stdlib/distutils.version.StrictVersion-class.html -
+@@ -871,6 +884,7 @@ PycURL Unix options:
+ --with-ssl legacy alias for --with-openssl
+ --with-gnutls libcurl is linked against GnuTLS
+ --with-nss libcurl is linked against NSS
++ --with-mbedtls libcurl is linked against mbedTLS
+ '''
+
+ windows_help = '''\
+diff --git a/src/module.c b/src/module.c
+index 2331ae8..7fdb25a 100644
+--- a/src/module.c
++++ b/src/module.c
+@@ -328,7 +328,7 @@ initpycurl(void)
+ PyObject *collections_module = NULL;
+ PyObject *named_tuple = NULL;
+ PyObject *arglist = NULL;
+-
++
+ assert(Curl_Type.tp_weaklistoffset > 0);
+ assert(CurlMulti_Type.tp_weaklistoffset > 0);
+ assert(CurlShare_Type.tp_weaklistoffset > 0);
+@@ -355,6 +355,8 @@ initpycurl(void)
+ runtime_ssl_lib = "gnutls";
+ } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
+ runtime_ssl_lib = "nss";
++ } else if (!strncmp(vi->ssl_version, "mbedTLS/", 2)) {
++ runtime_ssl_lib = "mbedtls";
+ } else {
+ runtime_ssl_lib = "none/other";
+ }
+@@ -461,7 +463,7 @@ initpycurl(void)
+ /* constants for ioctl callback argument values */
+ insint_c(d, "IOCMD_NOP", CURLIOCMD_NOP);
+ insint_c(d, "IOCMD_RESTARTREAD", CURLIOCMD_RESTARTREAD);
+-
++
+ /* opensocketfunction return value */
+ insint_c(d, "SOCKET_BAD", CURL_SOCKET_BAD);
+
+diff --git a/src/pycurl.h b/src/pycurl.h
+index 65290f7..2294cb8 100644
+--- a/src/pycurl.h
++++ b/src/pycurl.h
+@@ -174,6 +174,11 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+ # define COMPILE_SSL_LIB "gnutls"
+ # elif defined(HAVE_CURL_NSS)
+ # define COMPILE_SSL_LIB "nss"
++# elif defined(HAVE_CURL_MBEDTLS)
++# include <mbedtls/ssl.h>
++# define PYCURL_NEED_SSL_TSL
++# define PYCURL_NEED_MBEDTLS_TSL
++# define COMPILE_SSL_LIB "mbedtls"
+ # else
+ # ifdef _MSC_VER
+ /* sigh */
+@@ -190,7 +195,7 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+ /* since we have no crypto callbacks for other ssl backends,
+ * no reason to require users match those */
+ # define COMPILE_SSL_LIB "none/other"
+-# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS */
++# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */
+ #else
+ # define COMPILE_SSL_LIB "none/other"
+ #endif /* HAVE_CURL_SSL */
+diff --git a/src/threadsupport.c b/src/threadsupport.c
+index 6ca07f5..51abffd 100644
+--- a/src/threadsupport.c
++++ b/src/threadsupport.c
+@@ -232,6 +232,45 @@ pycurl_ssl_cleanup(void)
+ }
+ #endif
+
++/* mbedTLS */
++
++#ifdef PYCURL_NEED_MBEDTLS_TSL
++static int
++pycurl_ssl_mutex_create(void **m)
++{
++ if ((*((PyThread_type_lock *) m) = PyThread_allocate_lock()) == NULL) {
++ return -1;
++ } else {
++ return 0;
++ }
++}
++
++static int
++pycurl_ssl_mutex_destroy(void **m)
++{
++ PyThread_free_lock(*((PyThread_type_lock *) m));
++ return 0;
++}
++
++static int
++pycurl_ssl_mutex_lock(void **m)
++{
++ return !PyThread_acquire_lock(*((PyThread_type_lock *) m), 1);
++}
++
++PYCURL_INTERNAL int
++pycurl_ssl_init(void)
++{
++ return 0;
++}
++
++PYCURL_INTERNAL void
++pycurl_ssl_cleanup(void)
++{
++ return;
++}
++#endif
++
+ /*************************************************************************
+ // CurlShareObject
+ **************************************************************************/
+--
+2.17.0.windows.1
+
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-decorator
+PKG_VERSION:=4.3.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=c053ec881270608a5aef624a45a7700ec76ceca9d96689506411e1f319085380
+PKG_BUILD_DIR:=$(BUILD_DIR)/decorator-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-decorator
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/micheles/decorator
+ TITLE:=python3-decodator
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+$(eval $(call Py3Package,python3-decorator))
+$(eval $(call BuildPackage,python3-decorator))
+$(eval $(call BuildPackage,python3-decorator-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-influxdb
+PKG_VERSION:=5.2.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/influxdb/
+PKG_SOURCE:=influxdb-$(PKG_VERSION).tar.gz
+PKG_HASH:=afeff28953a91b4ea1aebf9b5b8258a4488d0e49e2471db15ea43fd2c8533143
+PKG_LICENSE:=MIT
+PKG_BUILD_DIR:=$(BUILD_DIR)/influxdb-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-influxdb
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/influxdb/influxdb-python
+ TITLE:=python3-influxdb
+ DEPENDS:=+python3-requests +python3-pytz +python3-six +python3-dateutil
+ VARIANT:=python3
+endef
+
+define Package/python3-influxdb/description
+ Python client for InfluxDB
+endef
+
+$(eval $(call Py3Package,python3-influxdb))
+$(eval $(call BuildPackage,python3-influxdb))
+$(eval $(call BuildPackage,python3-influxdb-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-jsonpath-ng
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/j/jsonpath-ng/
+PKG_SOURCE:=jsonpath-ng-$(PKG_VERSION).tar.gz
+PKG_HASH:=b1fc75b877e9b2f46845a455fbdcfb0f0d9c727c45c19a745d02db620a9ef0be
+PKG_BUILD_DIR:=$(BUILD_DIR)/jsonpath-ng-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-jsonpath-ng
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/h2non/jsonpath-ng
+ TITLE:=python3-jsonpath-ng
+ DEPENDS:=+python3-ply +python3-six +python3-decorator
+ VARIANT:=python3
+endef
+
+$(eval $(call Py3Package,python3-jsonpath-ng))
+$(eval $(call BuildPackage,python3-jsonpath-ng))
+$(eval $(call BuildPackage,python3-jsonpath-ng-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=multidict
+PKG_VERSION:=4.5.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=multidict-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/multidict/
+PKG_HASH:=024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-multidict
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=multidict implementation
+ URL:=https://github.com/aio-libs/multidict
+ DEPENDS:= \
+ +python3-light \
+ +python3-attrs
+ VARIANT:=python3
+endef
+
+define Package/python3-multidict/description
+Multidict is dict-like collection of key-value pairs where key might be occurred more than once in the container.
+endef
+
+$(eval $(call Py3Package,python3-multidict))
+$(eval $(call BuildPackage,python3-multidict))
+$(eval $(call BuildPackage,python3-multidict-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-oauthlib
-PKG_VERSION:=2.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/oauthlib
-PKG_HASH:=ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162
+PKG_HASH:=0ce32c5d989a1827e3f1148f98b9085ed2370fc939bf524c9c851d8714797298
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-oauthlib-$(PKG_VERSION)
PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
delete_empty_dirs() {
local dst_dir="$1"
if [ -d "$dst_dir/usr" ] ; then
- for _ in $(seq 1 10) ; do
- find "$dst_dir/usr" -empty -type d -exec rmdir {} \; || continue
- break
- done
- rmdir "$dst_dir/usr" || true
+ find "$dst_dir/usr" -empty -type d -delete
fi
}
mode="$5"
filespec="$6"
-find "$src_dir" -name "*\.exe" -exec rm -f {} \;
+SED="${SED:-sed -e}"
+
+find "$src_dir" -name "*.exe" -delete
process_filespec "$src_dir" "$dst_dir" "$filespec" || {
echo "process filespec error-ed"
usr_bin_dir="$dst_dir/usr/bin"
if [ -d "$usr_bin_dir" ] ; then
- sed "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i $usr_bin_dir/*
+ $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/*
fi
if [ "$mode" == "sources" ] ; then
# Copy only python source files
- find "$dst_dir" -not -type d -not -name "*\.py" -exec rm -f {} \;
+ find "$dst_dir" -not -type d -not -name "*.py" -delete
delete_empty_dirs "$dst_dir"
exit 0
legacy=
[ "$ver" == "3" ] && legacy="-b"
+# default max recursion is 10
+max_recursion_level=20
# XXX [So that you won't goof as I did]
# Note: Yes, I tried to use the -O & -OO flags here.
# So, we just stuck to un-optimized byte-codes,
# which is still way better/faster than running
# Python sources all the time.
-$python -m compileall $legacy -d '/' "$dst_dir" || {
+$python -m compileall -r "$max_recursion_level" $legacy -d '/' "$dst_dir" || {
echo "python -m compileall err-ed"
exit 1
}
# Delete source files and pyc [ un-optimized bytecode files ]
# We may want to make this optimization thing configurable later, but not sure atm
-find "$dst_dir" -type f -name "*\.py" -exec rm -f {} \;
+find "$dst_dir" -type f -name "*.py" -delete
delete_empty_dirs "$dst_dir"
define Package/$(1)/install
$$(call PyPackage/$(1)/install,$$(1))
+ SED="$(SED)" \
$(SHELL) $(python_mk_path)python-package-install.sh "2" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON_BIN)" "$$(2)" \
endef
PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
PYTHON_PKG_SETUP_VARS ?=
)
$(call Build/Compile/PyMod, \
$(PYTHON_PKG_SETUP_DIR), \
+ $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON_PKG_SETUP_ARGS), \
$(PYTHON_PKG_SETUP_VARS) \
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-paho-mqtt
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=1
+PKG_LICENSE:=Eclipse Public License v1.0 / Eclipse Distribution License v1.0
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
+
+PKG_SOURCE:=paho-mqtt-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904
+PKG_HASH:=e440a052b46d222e184be3be38676378722072fcd4dfd2c8f509fb861a7b0b79
+PKG_BUILD_DIR:=$(BUILD_DIR)/paho-mqtt-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-paho-mqtt
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python3-paho-mqtt
+ URL:=http://eclipse.org/paho
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-paho-mqtt/description
+ MQTT version 3.1/3.1.1 client class
+endef
+
+$(eval $(call Py3Package,python3-paho-mqtt))
+$(eval $(call BuildPackage,python3-paho-mqtt))
+$(eval $(call BuildPackage,python3-paho-mqtt-src))
PKG_NAME:=python-pcapy
PKG_VERSION:=0.11.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=pcapy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pcapy
PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
PKG_LICENSE:=Apache-1.1
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
SUBMENU:=Python
TITLE:=python-pcapy
URL:=https://www.coresecurity.com/corelabs-research/open-source-tools/pcapy
- DEPENDS:=+python +libpcap +libstdcpp
+ DEPENDS:=+python +libpcap $(CXX_DEPENDS)
endef
define Package/python-pcapy/description
--- /dev/null
+diff --git a/setup.py b/setup.py
+index 4da69bc..165059b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -28,7 +28,7 @@ if sys.platform == 'win32':
+ library_dirs.append(r'c:\wpdpack\Lib')
+ libraries = ['wpcap', 'packet', 'ws2_32']
+ else:
+- libraries = ['pcap', 'stdc++']
++ libraries = ['pcap']
+
+
+ # end of user configurable parameters
define Package/python3-ply
$(call Package/python-ply/Default)
- DEPENDS:=+PACKAGE_python3-ply:python3-light
+ DEPENDS:=+python3-light
VARIANT:=python3
endef
PKG_NAME:=python-pyopenssl
PKG_VERSION:=19.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=pyOpenSSL-$(PKG_VERSION).tar.gz
-
-PKG_SOURCE_URL:=https://pypi.io/packages/source/p/pyOpenSSL
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyOpenSSL
PKG_HASH:=aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200
PKG_LICENSE:=Apache-2.0
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://github.com/pyca/pyopenssl
+ TITLE:=OpenSSL wrapper
+ URL:=https://pyopenssl.org/
endef
define Package/python-pyopenssl
$(call Package/python-pyopenssl/Default)
- TITLE:=python-pyopenssl
- VARIANT:=python
DEPENDS:= \
+PACKAGE_python-pyopenssl:python-light \
+PACKAGE_python-pyopenssl:python-cryptography \
+PACKAGE_python-pyopenssl:python-six
+ VARIANT:=python
endef
define Package/python3-pyopenssl
$(call Package/python-pyopenssl/Default)
- TITLE:=python3-pyopenssl
- VARIANT:=python3
DEPENDS:= \
+PACKAGE_python3-pyopenssl:python3-light \
+PACKAGE_python3-pyopenssl:python3-cryptography \
+PACKAGE_python3-pyopenssl:python3-six
+ VARIANT:=python3
endef
define Package/python-pyopenssl/description
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyotp
+PKG_VERSION:=2.2.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyotp-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyotp
+PKG_HASH:=be0ffeabddaa5ee53e7204e7740da842d070cf69168247a3d0c08541b84de602
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyotp
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Python One-Time Password Library
+ URL:=https://github.com/pyauth/pyotp
+ DEPENDS:=+python3-light
+ VARIANT:=python3
+endef
+
+define Package/python3-pyotp/description
+ PyOTP is a Python library for generating and verifying one-time passwords.
+ It can be used to implement two-factor (2FA) or multi-factor (MFA) authentication methods
+ in web applications and in other systems that require users to log in.
+endef
+
+$(eval $(call Py3Package,python3-pyotp))
+$(eval $(call BuildPackage,python3-pyotp))
+$(eval $(call BuildPackage,python3-pyotp-src))
--- /dev/null
+#
+# Copyright (C) 2007-2019 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:=python-pytz
+PKG_VERSION:=2019.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pytz-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
+PKG_HASH:=d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pytz-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+HOST_BUILD_DEPENDS:=python/host
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-pytz/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ URL:=https://pythonhosted.org/pytz/
+endef
+
+define Package/python-pytz
+$(call Package/python-pytz/Default)
+ TITLE:=World timezone definitions, modern and historical
+ DEPENDS:=+PACKAGE_python-pytz:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-pytz
+$(call Package/python-pytz/Default)
+ TITLE:=World timezone definitions, modern and historical for Python3
+ DEPENDS:=+PACKAGE_python3-pytz:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-pytz/description
+ World timezone definitions, modern and historical
+endef
+
+define Package/python3-pytz/description
+$(call Package/python-pytz/description)
+.
+(Variant for Python3)
+endef
+
+define Host/Compile
+ $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
+endef
+
+Host/Install:=
+
+$(eval $(call HostBuild))
+
+$(eval $(call PyPackage,python-pytz))
+$(eval $(call BuildPackage,python-pytz))
+$(eval $(call BuildPackage,python-pytz-src))
+
+$(eval $(call Py3Package,python3-pytz))
+$(eval $(call BuildPackage,python3-pytz))
+$(eval $(call BuildPackage,python3-pytz-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-qrcode
-PKG_VERSION:=6.0
+PKG_VERSION:=6.1
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/8d/b6/beed3d50e1047a2aa6437d3a653e5f31feb7f4de8bc054299dc205682e41
-PKG_HASH:=037b0db4c93f44586e37f84c3da3f763874fcac85b2974a69a98e399ac78e1bf
-PKG_BUILD_DIR:=$(BUILD_DIR)/qrcode-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/q/qrcode/
+PKG_HASH:=505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-oauthlib-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
TITLE:=QR Code image generator
URL:=https://github.com/lincolnloop/python-qrcode
- DEPENDS:=+python +python-six
+ DEPENDS:=+python +python-six +python-setuptools +pillow
+ VARIANT:=python
endef
define Package/python-qrcode/description
Pure python QR Code generator
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/python-qrcode/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
+$(eval $(call PyPackage,python-qrcode))
$(eval $(call BuildPackage,python-qrcode))
+$(eval $(call BuildPackage,python-qrcode-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=python-requests-oauthlib
-PKG_VERSION:=1.0.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=1
PKG_LICENSE:=ISC
PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests-oauthlib
-PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f
+PKG_HASH:=bd6533330e8748e94bf0b214775fed487d309b8b8fe823dc45641ebcd9a32f57
PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
#
-# Copyright (C) 2007-2016 OpenWrt.org
+# Copyright (C) 2007-2019 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
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
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests
PKG_HASH:=502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e
-PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION)
PKG_CPE_ID:=cpe:/a:python-requests:requests
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
+include ../python3-package.mk
-define Package/python-requests
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-requests/Default
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
- MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
- TITLE:=HTTP library for Python
+ MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
URL:=http://python-requests.org/
- DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi
+endef
+
+define Package/python-requests
+$(call Package/python-requests/Default)
+ TITLE:=HTTP library for Python
+ DEPENDS:= \
+ +PACKAGE_python-requests:python \
+ +PACKAGE_python-requests:python-chardet \
+ +PACKAGE_python-requests:python-idna \
+ +PACKAGE_python-requests:python-urllib3 \
+ +PACKAGE_python-requests:python-certifi
VARIANT:=python
endef
+define Package/python3-requests
+$(call Package/python-requests/Default)
+ TITLE:=HTTP library for Python3
+ DEPENDS:= \
+ +python3-light \
+ +python3-chardet \
+ +python3-idna \
+ +python3-urllib3 \
+ +python3-certifi
+ VARIANT:=python3
+endef
+
define Package/python-requests/description
Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
endef
+define Package/python3-requests/description
+$(call Package/python-requests/description)
+.
+(Variant for Python3)
+endef
+
$(eval $(call PyPackage,python-requests))
$(eval $(call BuildPackage,python-requests))
$(eval $(call BuildPackage,python-requests-src))
+
+$(eval $(call Py3Package,python3-requests))
+$(eval $(call BuildPackage,python3-requests))
+$(eval $(call BuildPackage,python3-requests-src))
--- /dev/null
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-schema
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/keleshev/schema/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=6c6da2154c0f63025127a1ecb3b2f07b95ec8dd029663fc74ab2e972bf770c72
+PKG_BUILD_DIR:=$(BUILD_DIR)/schema-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-schema
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ URL:=https://github.com/keleshev/schema
+ TITLE:=python3-schema
+ DEPENDS:=+python3-light +python3-contextlib2
+ VARIANT:=python3
+endef
+
+define Package/python3-schema/description
+ Schema validation just got Pythonic
+endef
+
+$(eval $(call Py3Package,python3-schema))
+$(eval $(call BuildPackage,python3-schema))
+$(eval $(call BuildPackage,python3-schema-src))
PKG_SOURCE:=service_identity-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/service_identity
PKG_HASH:=0858a54aabc5b459d1aafa8a518ed2081a285087f349fe3e55197989232e2e2d
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-service-identity-$(PKG_VERSION)
PKG_LICENSE:=MIT
SECTION:=lang
CATEGORY:=Languages
SUBMENU:=Python
- URL:=https://github.com/pyca/service_identity
+ TITLE:=Service identity verification
+ URL:=https://service-identity.readthedocs.io/
endef
define Package/python-service-identity
$(call Package/python-service-identity/Default)
- TITLE:=python-service-identity
DEPENDS:= \
+PACKAGE_python-service-identity:python-light \
+PACKAGE_python-service-identity:python-attrs \
define Package/python3-service-identity
$(call Package/python-service-identity/Default)
- TITLE:=python3-service-identity
DEPENDS:= \
+PACKAGE_python3-service-identity:python3-light \
+PACKAGE_python3-service-identity:python3-attrs \
--- /dev/null
+#
+# Copyright (C) 2007-2017 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:=python-simplejson
+PKG_VERSION:=3.16.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=simplejson-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
+PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-simplejson-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-simplejson/Default
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+ URL:=https://simplejson.readthedocs.org/
+endef
+
+define Package/python-simplejson
+$(call Package/python-simplejson/Default)
+ TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
+ DEPENDS:=+python-light
+ VARIANT:=python
+endef
+
+define Package/python3-simplejson
+$(call Package/python-simplejson/Default)
+ TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3
+ DEPENDS:=+PACKAGE_python3-simplejson:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-simplejson/description
+ Simple, fast, extensible JSON encoder/decoder for Python
+endef
+
+define Package/python3-simplejson/description
+$(call Package/python-simplejson/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-simplejson))
+$(eval $(call BuildPackage,python-simplejson))
+$(eval $(call BuildPackage,python-simplejson-src))
+
+$(eval $(call Py3Package,python3-simplejson))
+$(eval $(call BuildPackage,python3-simplejson))
+$(eval $(call BuildPackage,python3-simplejson-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-slugify
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=python-slugify-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-slugify/
+PKG_HASH:=492b27e5a12495340e50652ab4eab3a229ef7167c44b66b3a2861450e68b269a
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-slugify
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Slugify application that handles Unicode
+ URL:=https://github.com/un33k/python-slugify
+ DEPENDS+= \
+ +python3-light \
+ +python3-text-unidecode
+ VARIANT:=python3
+endef
+
+define Package/python3-slugify/description
+A Python slugify application that handles unicode.
+endef
+
+$(eval $(call Py3Package,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify-src))
#
PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=15
+PYTHON_VERSION_MICRO:=16
-PYTHON_SETUPTOOLS_PKG_RELEASE:=2
-PYTHON_PIP_PKG_RELEASE:=2
+PYTHON_SETUPTOOLS_PKG_RELEASE:=1
+PYTHON_PIP_PKG_RELEASE:=1
-PYTHON_SETUPTOOLS_VERSION:=39.0.1
-PYTHON_PIP_VERSION:=9.0.3
+PYTHON_SETUPTOOLS_VERSION:=40.6.2
+PYTHON_PIP_VERSION:=18.1
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=voluptuous-serialize
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous-serialize/
+PKG_HASH:=d30fef4f1aba251414ec0b315df81a06da7bf35201dcfb1f6db5253d738a154f
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-voluptuous-serialize
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Python Voluptuous Serialize
+ URL:=https://github.com/balloob/voluptuous-serialize
+ DEPENDS:= \
+ +python3-light \
+ +python3-voluptuous
+ VARIANT:=python3
+endef
+
+define Package/python3-voluptuous-serialize/description
+Convert Voluptuous schemas to dictionaries so they can be serialized.
+endef
+
+$(eval $(call Py3Package,python3-voluptuous-serialize))
+$(eval $(call BuildPackage,python3-voluptuous-serialize))
+$(eval $(call BuildPackage,python3-voluptuous-serialize-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-voluptuous
+PKG_VERSION:=0.11.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=voluptuous-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous/
+PKG_HASH:=567a56286ef82a9d7ae0628c5842f65f516abcb496e74f3f59f1d7b28df314ef
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-voluptuous-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-voluptuous/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Data validation library
+ URL:=https://github.com/alecthomas/voluptuous
+endef
+
+define Package/python-voluptuous
+$(call Package/python-voluptuous/Default)
+ DEPENDS:= \
+ +PACKAGE_python-voluptuous:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-voluptuous
+$(call Package/python-voluptuous/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-voluptuous:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-voluptuous/description
+It is primarily intended for validating data coming into Python as JSON, YAML, etc.
+endef
+
+define Package/python3-voluptuous/description
+$(call Package/python-voluptuous/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous-src))
+
+$(eval $(call Py3Package,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous-src))
+
include $(TOPDIR)/rules.mk
PKG_NAME:=PyYAML
-PKG_VERSION:=3.13
+PKG_VERSION:=5.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
-PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/PyYAML
+PKG_HASH:=436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
include ../python-package.mk
include ../python3-package.mk
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
define Package/python-yaml/Default
- SUBMENU:=Python
SECTION:=lang
+ SUBMENU:=Python
CATEGORY:=Languages
- URL:=https://pyyaml.org/wiki/PyYAML
+ TITLE:=YAML parser and emitter for Python
+ URL:=https://github.com/yaml/pyyaml
DEPENDS:=+libyaml
endef
define Package/python-yaml
$(call Package/python-yaml/Default)
- TITLE:=YAML parser and emitter for Python
- DEPENDS+=+PACKAGE_python-yaml:python-light +PACKAGE_python-yaml:python-codecs
+ DEPENDS+= \
+ +PACKAGE_python-yaml:python-light \
+ +PACKAGE_python-yaml:python-codecs
VARIANT:=python
endef
define Package/python3-yaml
$(call Package/python-yaml/Default)
- TITLE:=YAML parser and emitter for Python3
DEPENDS+=+PACKAGE_python3-yaml:python3-light
VARIANT:=python3
endef
-define PyBuild/Compile
- $(call Build/Compile/PyMod,,\
- --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
- )
+define Package/python-yaml/description
+PyYAML is a YAML parser and emitter for the Python programming language.
endef
-define Py3Build/Compile
- $(call Build/Compile/Py3Mod,,\
- --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
- )
+define Package/python3-yaml/description
+$(call Package/python-yaml/description)
+.
+(Variant for Python3)
endef
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
+PYTHON3_PKG_SETUP_ARGS:=
+
$(eval $(call PyPackage,python-yaml))
$(eval $(call BuildPackage,python-yaml))
+$(eval $(call BuildPackage,python-yaml-src))
+
$(eval $(call Py3Package,python3-yaml))
$(eval $(call BuildPackage,python3-yaml))
+$(eval $(call BuildPackage,python3-yaml-src))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yarl
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=yarl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/yarl/
+PKG_HASH:=024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-yarl
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=Yet another URL library
+ URL:=https://github.com/aio-libs/yarl
+ DEPENDS:= \
+ +python3-light \
+ +python3-multidict \
+ +python3-urllib \
+ +python3-idna
+ VARIANT:=python3
+endef
+
+define Package/python3-yarl/description
+Yet another URL library
+endef
+
+$(eval $(call Py3Package,python3-yarl))
+$(eval $(call BuildPackage,python3-yarl))
+$(eval $(call BuildPackage,python3-yarl-src))
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=5
+PKG_RELEASE:=4
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574
+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>
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
- $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
- $(HOST_PYTHON_LIB_DIR) \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
- $(HOST_PYTHON_DIR)/lib/pkgconfig/python.pc \
- $(HOST_PYTHON_DIR)/lib/pkgconfig/python2.pc \
- $(HOST_PYTHON_DIR)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
$(1)/usr/lib/pkgconfig
+ $(INSTALL_BIN) \
+ ./files/python-config.in \
+ $(1)/usr/bin/python$(PYTHON_VERSION)-config
+ $(SED) \
+ 's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \
+ $(1)/usr/bin/python$(PYTHON_VERSION)-config
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
- $(1)/usr/lib/python$(PYTHON_VERSION)/
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
+ $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
endef
PYTHON_BASE_LIB_FILES:= \
--- /dev/null
+#!@EXENAME@
+
+import sys
+import os
+import getopt
+from distutils import sysconfig
+
+# start changes
+host_prefix = sysconfig.PREFIX
+
+target_bin_dir = os.path.dirname(os.path.abspath(__file__))
+target_prefix = os.path.normpath(os.path.join(target_bin_dir, '..'))
+
+target_data_dir = os.path.join(target_prefix, 'lib', 'python' + sysconfig.get_config_var('VERSION') + '-openwrt')
+sys.path.append(target_data_dir)
+
+try:
+ from _sysconfigdatatarget import build_time_vars
+ sysconfig._config_vars = {}
+ sysconfig._config_vars.update(build_time_vars)
+except ImportError:
+ print >>sys.stderr, "Could not import target data from %s" % (target_data_dir)
+ sys.exit(1)
+# end changes
+# plus .replace(host_prefix, target_prefix) below
+
+valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
+ 'ldflags', 'help']
+
+def exit_with_usage(code=1):
+ print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
+ '|'.join('--'+opt for opt in valid_opts))
+ sys.exit(code)
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
+except getopt.error:
+ exit_with_usage()
+
+if not opts:
+ exit_with_usage()
+
+pyver = sysconfig.get_config_var('VERSION')
+getvar = sysconfig.get_config_var
+
+opt_flags = [flag for (flag, val) in opts]
+
+if '--help' in opt_flags:
+ exit_with_usage(code=0)
+
+for opt in opt_flags:
+ if opt == '--prefix':
+ #print sysconfig.PREFIX
+ print target_prefix
+
+ elif opt == '--exec-prefix':
+ #print sysconfig.EXEC_PREFIX
+ print target_prefix
+
+ elif opt in ('--includes', '--cflags'):
+ flags = ['-I' + sysconfig.get_python_inc(),
+ '-I' + sysconfig.get_python_inc(plat_specific=True)]
+ if opt == '--cflags':
+ flags.extend(getvar('CFLAGS').split())
+ #print ' '.join(flags)
+ print ' '.join(flags).replace(host_prefix, target_prefix)
+
+ elif opt in ('--libs', '--ldflags'):
+ libs = ['-lpython' + pyver]
+ libs += getvar('LIBS').split()
+ libs += getvar('SYSLIBS').split()
+ # add the prefix/lib/pythonX.Y/config dir, but only if there is no
+ # shared library in prefix/lib/.
+ if opt == '--ldflags':
+ if not getvar('Py_ENABLE_SHARED'):
+ libs.insert(0, '-L' + getvar('LIBPL'))
+ if not getvar('PYTHONFRAMEWORK'):
+ libs.extend(getvar('LINKFORSHARED').split())
+ #print ' '.join(libs)
+ print ' '.join(libs).replace(host_prefix, target_prefix)
+
+zlib zlibmodule.c -lz
# Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
--- 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 \
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
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 \
-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);
}
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},
+++ /dev/null
-From 18b20bad75b4ff0486940fba4ec680e96e70f3a2 Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Tue, 18 Sep 2018 15:13:09 +0200
-Subject: [PATCH] [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree
- (GH-9146) (GH-9394)
-
-The C accelerated _elementtree module now initializes hash randomization
-salt from _Py_HashSecret instead of libexpat's default CPRNG.
-
-Signed-off-by: Christian Heimes <christian@python.org>
-
-https://bugs.python.org/issue34623.
-(cherry picked from commit cb5778f00ce48631c7140f33ba242496aaf7102b)
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-
-https://bugs.python.org/issue34623
----
- Include/pyexpat.h | 4 +++-
- .../next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst | 2 ++
- Modules/_elementtree.c | 5 +++++
- Modules/pyexpat.c | 5 +++++
- 4 files changed, 15 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-
-diff --git a/Include/pyexpat.h b/Include/pyexpat.h
-index 5340ef5fa3..3fc5fa54da 100644
---- a/Include/pyexpat.h
-+++ b/Include/pyexpat.h
-@@ -3,7 +3,7 @@
-
- /* note: you must import expat.h before importing this module! */
-
--#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
-+#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
- #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
-
- struct PyExpat_CAPI
-@@ -43,6 +43,8 @@ struct PyExpat_CAPI
- XML_Parser parser, XML_UnknownEncodingHandler handler,
- void *encodingHandlerData);
- void (*SetUserData)(XML_Parser parser, void *userData);
-+ /* might be none for expat < 2.1.0 */
-+ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
- /* always add new stuff to the end! */
- };
-
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-new file mode 100644
-index 0000000000..31ad92ef85
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -0,0 +1,2 @@
-+The C accelerated _elementtree module now initializes hash randomization
-+salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
-index f7f992dd3a..b38e0ab329 100644
---- a/Modules/_elementtree.c
-+++ b/Modules/_elementtree.c
-@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw)
- PyErr_NoMemory();
- return NULL;
- }
-+ /* expat < 2.1.0 has no XML_SetHashSalt() */
-+ if (EXPAT(SetHashSalt) != NULL) {
-+ EXPAT(SetHashSalt)(self->parser,
-+ (unsigned long)_Py_HashSecret.prefix);
-+ }
-
- ALLOC(sizeof(XMLParserObject), "create expatparser");
-
-diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
-index 2b4d31293c..1f8c0d70a5 100644
---- a/Modules/pyexpat.c
-+++ b/Modules/pyexpat.c
-@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void)
- capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
- capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
- capi.SetUserData = XML_SetUserData;
-+#if XML_COMBINED_VERSION >= 20100
-+ capi.SetHashSalt = XML_SetHashSalt;
-+#else
-+ capi.SetHashSalt = NULL;
-+#endif
-
- /* export using capsule */
- capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);
---
-2.19.1
-
+++ /dev/null
-From 10be1d3f802b874914b2a13eb41407c7a582d9b3 Mon Sep 17 00:00:00 2001
-From: "Miss Islington (bot)"
- <31488909+miss-islington@users.noreply.github.com>
-Date: Fri, 21 Sep 2018 21:57:00 -0700
-Subject: [PATCH] [2.7] bpo-34623: Mention CVE-2018-14647 in news entry
- (GH-9482) (GH-9490)
-
-https://bugs.python.org/issue34623
-(cherry picked from commit 026337a7101369297c8083047d2f3c6fc9dd1e2b)
-
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-https://bugs.python.org/issue34623
----
- .../next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-index 31ad92ef85..cbaa4b7506 100644
---- a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -1,2 +1,2 @@
--The C accelerated _elementtree module now initializes hash randomization
--salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-+CVE-2018-14647: The C accelerated _elementtree module now initializes hash
-+randomization salt from _Py_HashSecret instead of libexpat's default CSPRNG.
---
-2.19.1
-
-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])
+++ /dev/null
-From 06b15424b0dcacb1c551b2a36e739fffa8d0c595 Mon Sep 17 00:00:00 2001
-From: "Miss Islington (bot)"
- <31488909+miss-islington@users.noreply.github.com>
-Date: Tue, 15 Jan 2019 15:11:52 -0800
-Subject: [PATCH] bpo-35746: Fix segfault in ssl's cert parser (GH-11569)
-
-Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
-distribution points with empty DP or URI correctly. A malicious or buggy
-certificate can result into segfault.
-
-Signed-off-by: Christian Heimes <christian@python.org>
-
-https://bugs.python.org/issue35746
-(cherry picked from commit a37f52436f9aa4b9292878b72f3ff1480e2606c3)
-
-Co-authored-by: Christian Heimes <christian@python.org>
----
- Lib/test/talos-2019-0758.pem | 22 +++++++++++++++++++
- Lib/test/test_ssl.py | 22 +++++++++++++++++++
- .../2019-01-15-18-16-05.bpo-35746.nMSd0j.rst | 3 +++
- Modules/_ssl.c | 4 ++++
- 4 files changed, 51 insertions(+)
- create mode 100644 Lib/test/talos-2019-0758.pem
- create mode 100644 Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
-
-diff --git a/Lib/test/talos-2019-0758.pem b/Lib/test/talos-2019-0758.pem
-new file mode 100644
-index 0000000000..13b95a77fd
---- /dev/null
-+++ b/Lib/test/talos-2019-0758.pem
-@@ -0,0 +1,22 @@
-+-----BEGIN CERTIFICATE-----
-+MIIDqDCCApKgAwIBAgIBAjALBgkqhkiG9w0BAQswHzELMAkGA1UEBhMCVUsxEDAO
-+BgNVBAMTB2NvZHktY2EwHhcNMTgwNjE4MTgwMDU4WhcNMjgwNjE0MTgwMDU4WjA7
-+MQswCQYDVQQGEwJVSzEsMCoGA1UEAxMjY29kZW5vbWljb24tdm0tMi50ZXN0Lmxh
-+bC5jaXNjby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC63fGB
-+J80A9Av1GB0bptslKRIUtJm8EeEu34HkDWbL6AJY0P8WfDtlXjlPaLqFa6sqH6ES
-+V48prSm1ZUbDSVL8R6BYVYpOlK8/48xk4pGTgRzv69gf5SGtQLwHy8UPBKgjSZoD
-+5a5k5wJXGswhKFFNqyyxqCvWmMnJWxXTt2XDCiWc4g4YAWi4O4+6SeeHVAV9rV7C
-+1wxqjzKovVe2uZOHjKEzJbbIU6JBPb6TRfMdRdYOw98n1VXDcKVgdX2DuuqjCzHP
-+WhU4Tw050M9NaK3eXp4Mh69VuiKoBGOLSOcS8reqHIU46Reg0hqeL8LIL6OhFHIF
-+j7HR6V1X6F+BfRS/AgMBAAGjgdYwgdMwCQYDVR0TBAIwADAdBgNVHQ4EFgQUOktp
-+HQjxDXXUg8prleY9jeLKeQ4wTwYDVR0jBEgwRoAUx6zgPygZ0ZErF9sPC4+5e2Io
-+UU+hI6QhMB8xCzAJBgNVBAYTAlVLMRAwDgYDVQQDEwdjb2R5LWNhggkA1QEAuwb7
-+2s0wCQYDVR0SBAIwADAuBgNVHREEJzAlgiNjb2Rlbm9taWNvbi12bS0yLnRlc3Qu
-+bGFsLmNpc2NvLmNvbTAOBgNVHQ8BAf8EBAMCBaAwCwYDVR0fBAQwAjAAMAsGCSqG
-+SIb3DQEBCwOCAQEAvqantx2yBlM11RoFiCfi+AfSblXPdrIrHvccepV4pYc/yO6p
-+t1f2dxHQb8rWH3i6cWag/EgIZx+HJQvo0rgPY1BFJsX1WnYf1/znZpkUBGbVmlJr
-+t/dW1gSkNS6sPsM0Q+7HPgEv8CPDNK5eo7vU2seE0iWOkxSyVUuiCEY9ZVGaLVit
-+p0C78nZ35Pdv4I+1cosmHl28+es1WI22rrnmdBpH8J1eY6WvUw2xuZHLeNVN0TzV
-+Q3qq53AaCWuLOD1AjESWuUCxMZTK9DPS4JKXTK8RLyDeqOvJGjsSWp3kL0y3GaQ+
-+10T1rfkKJub2+m9A9duin1fn6tHc2wSvB7m3DA==
-+-----END CERTIFICATE-----
-diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
-index e476031702..9240184d98 100644
---- a/Lib/test/test_ssl.py
-+++ b/Lib/test/test_ssl.py
-@@ -72,6 +72,7 @@ NONEXISTINGCERT = data_file("XXXnonexisting.pem")
- BADKEY = data_file("badkey.pem")
- NOKIACERT = data_file("nokia.pem")
- NULLBYTECERT = data_file("nullbytecert.pem")
-+TALOS_INVALID_CRLDP = data_file("talos-2019-0758.pem")
-
- DHFILE = data_file("ffdh3072.pem")
- BYTES_DHFILE = DHFILE.encode(sys.getfilesystemencoding())
-@@ -227,6 +228,27 @@ class BasicSocketTests(unittest.TestCase):
- self.assertEqual(p['crlDistributionPoints'],
- ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))
-
-+ def test_parse_cert_CVE_2019_5010(self):
-+ p = ssl._ssl._test_decode_cert(TALOS_INVALID_CRLDP)
-+ if support.verbose:
-+ sys.stdout.write("\n" + pprint.pformat(p) + "\n")
-+ self.assertEqual(
-+ p,
-+ {
-+ 'issuer': (
-+ (('countryName', 'UK'),), (('commonName', 'cody-ca'),)),
-+ 'notAfter': 'Jun 14 18:00:58 2028 GMT',
-+ 'notBefore': 'Jun 18 18:00:58 2018 GMT',
-+ 'serialNumber': '02',
-+ 'subject': ((('countryName', 'UK'),),
-+ (('commonName',
-+ 'codenomicon-vm-2.test.lal.cisco.com'),)),
-+ 'subjectAltName': (
-+ ('DNS', 'codenomicon-vm-2.test.lal.cisco.com'),),
-+ 'version': 3
-+ }
-+ )
-+
- def test_parse_cert_CVE_2013_4238(self):
- p = ssl._ssl._test_decode_cert(NULLBYTECERT)
- if support.verbose:
-diff --git a/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst b/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
-new file mode 100644
-index 0000000000..dffe347eec
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
-@@ -0,0 +1,3 @@
-+[CVE-2019-5010] Fix a NULL pointer deref in ssl module. The cert parser did
-+not handle CRL distribution points with empty DP or URI correctly. A
-+malicious or buggy certificate can result into segfault.
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index a96c419260..19bb1207b4 100644
---- a/Modules/_ssl.c
-+++ b/Modules/_ssl.c
-@@ -1223,6 +1223,10 @@ _get_crl_dp(X509 *certificate) {
- STACK_OF(GENERAL_NAME) *gns;
-
- dp = sk_DIST_POINT_value(dps, i);
-+ if (dp->distpoint == NULL) {
-+ /* Ignore empty DP value, CVE-2019-5010 */
-+ continue;
-+ }
- gns = dp->distpoint->name.fullname;
-
- for (j=0; j < sk_GENERAL_NAME_num(gns); j++) {
---
-2.17.1
-
--- /dev/null
+From 3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Thu, 7 Mar 2019 08:25:22 -0800
+Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
+ to separators (GH-12201)
+
+---
+ Doc/library/urlparse.rst | 20 ++++++++++++++++
+ Lib/test/test_urlparse.py | 24 +++++++++++++++++++
+ Lib/urlparse.py | 17 +++++++++++++
+ .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst | 3 +++
+ 4 files changed, 64 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+
+diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst
+index 22249da54fbb..0989c88c3022 100644
+--- a/Doc/library/urlparse.rst
++++ b/Doc/library/urlparse.rst
+@@ -119,12 +119,22 @@ The :mod:`urlparse` module defines the following functions:
+ See section :ref:`urlparse-result-object` for more information on the result
+ object.
+
++ Characters in the :attr:`netloc` attribute that decompose under NFKC
++ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++ decomposed before parsing, or is not a Unicode string, no error will be
++ raised.
++
+ .. versionchanged:: 2.5
+ Added attributes to return value.
+
+ .. versionchanged:: 2.7
+ Added IPv6 URL parsing capabilities.
+
++ .. versionchanged:: 2.7.17
++ Characters that affect netloc parsing under NFKC normalization will
++ now raise :exc:`ValueError`.
++
+
+ .. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
+
+@@ -232,11 +242,21 @@ The :mod:`urlparse` module defines the following functions:
+ See section :ref:`urlparse-result-object` for more information on the result
+ object.
+
++ Characters in the :attr:`netloc` attribute that decompose under NFKC
++ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++ decomposed before parsing, or is not a Unicode string, no error will be
++ raised.
++
+ .. versionadded:: 2.2
+
+ .. versionchanged:: 2.5
+ Added attributes to return value.
+
++ .. versionchanged:: 2.7.17
++ Characters that affect netloc parsing under NFKC normalization will
++ now raise :exc:`ValueError`.
++
+
+ .. function:: urlunsplit(parts)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 4e1ded73c266..73b0228ea8e3 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -1,4 +1,6 @@
+ from test import test_support
++import sys
++import unicodedata
+ import unittest
+ import urlparse
+
+@@ -624,6 +626,28 @@ def test_portseparator(self):
+ self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
+ ('http','www.python.org:80','','','',''))
+
++ def test_urlsplit_normalization(self):
++ # Certain characters should never occur in the netloc,
++ # including under normalization.
++ # Ensure that ALL of them are detected and cause an error
++ illegal_chars = u'/:#?@'
++ hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
++ denorm_chars = [
++ c for c in map(unichr, range(128, sys.maxunicode))
++ if (hex_chars & set(unicodedata.decomposition(c).split()))
++ and c not in illegal_chars
++ ]
++ # Sanity check that we found at least one such character
++ self.assertIn(u'\u2100', denorm_chars)
++ self.assertIn(u'\uFF03', denorm_chars)
++
++ for scheme in [u"http", u"https", u"ftp"]:
++ for c in denorm_chars:
++ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
++ print "Checking %r" % url
++ with self.assertRaises(ValueError):
++ urlparse.urlsplit(url)
++
+ def test_main():
+ test_support.run_unittest(UrlParseTestCase)
+
+diff --git a/Lib/urlparse.py b/Lib/urlparse.py
+index f7c2b032b097..54eda08651ab 100644
+--- a/Lib/urlparse.py
++++ b/Lib/urlparse.py
+@@ -165,6 +165,21 @@ def _splitnetloc(url, start=0):
+ delim = min(delim, wdelim) # use earliest delim position
+ return url[start:delim], url[delim:] # return (domain, rest)
+
++def _checknetloc(netloc):
++ if not netloc or not isinstance(netloc, unicode):
++ return
++ # looking for characters like \u2100 that expand to 'a/c'
++ # IDNA uses NFKC equivalence, so normalize for this check
++ import unicodedata
++ netloc2 = unicodedata.normalize('NFKC', netloc)
++ if netloc == netloc2:
++ return
++ _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
++ for c in '/?#@:':
++ if c in netloc2:
++ raise ValueError("netloc '" + netloc2 + "' contains invalid " +
++ "characters under NFKC normalization")
++
+ def urlsplit(url, scheme='', allow_fragments=True):
+ """Parse a URL into 5 components:
+ <scheme>://<netloc>/<path>?<query>#<fragment>
+@@ -193,6 +208,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return v
+@@ -216,6 +232,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return v
+diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+new file mode 100644
+index 000000000000..1e1ad92c6feb
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+@@ -0,0 +1,3 @@
++Changes urlsplit() to raise ValueError when the URL contains characters that
++decompose under IDNA encoding (NFKC-normalization) into characters that
++affect how the URL is parsed.
+\ No newline at end of file
--- /dev/null
+From 06b5ee585d6e76bdbb4002f642d864d860cbbd2b Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Tue, 12 Mar 2019 08:23:33 -0700
+Subject: [PATCH] bpo-36216: Only print test messages when verbose
+
+---
+ Lib/test/test_urlparse.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 73b0228ea8e3..1830d0b28688 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -644,7 +644,8 @@ def test_urlsplit_normalization(self):
+ for scheme in [u"http", u"https", u"ftp"]:
+ for c in denorm_chars:
+ url = u"{}://netloc{}false.netloc/path".format(scheme, c)
+- print "Checking %r" % url
++ if test_support.verbose:
++ print "Checking %r" % url
+ with self.assertRaises(ValueError):
+ urlparse.urlsplit(url)
+
--- /dev/null
+diff --git a/Lib/compileall.py b/Lib/compileall.py
+index 5cfa8bed3f..8716c9c0ca 100644
+--- a/Lib/compileall.py
++++ b/Lib/compileall.py
+@@ -152,10 +152,10 @@ def main():
+ """Script main program."""
+ import getopt
+ try:
+- opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:')
++ opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:')
+ except getopt.error, msg:
+ print msg
+- print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
++ print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \
+ "[-x regexp] [-i list] [directory|file ...]"
+ print
+ print "arguments: zero or more file and directory names to compile; " \
+@@ -164,6 +164,7 @@ def main():
+ print
+ print "options:"
+ print "-l: don't recurse into subdirectories"
++ print "-r recursion: control the maximum recursion level"
+ print "-f: force rebuild even if timestamps are up-to-date"
+ print "-q: output only error messages"
+ print "-d destdir: directory to prepend to file paths for use in " \
+@@ -187,6 +188,7 @@ def main():
+ flist = None
+ for o, a in opts:
+ if o == '-l': maxlevels = 0
++ if o == '-r': maxlevels = int(a)
+ if o == '-d': ddir = a
+ if o == '-f': force = 1
+ if o == '-q': quiet = 1
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
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
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))
define Package/$(1)/install
$$(call Py3Package/$(1)/install,$$(1))
+ SED="$(SED)" \
$(SHELL) $(python3_mk_path)python-package-install.sh "3" \
"$(PKG_INSTALL_DIR)" "$$(1)" \
"$(HOST_PYTHON3_BIN)" "$$(2)" \
endef
PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
PYTHON3_PKG_SETUP_VARS ?=
)
$(call Build/Compile/Py3Mod, \
$(PYTHON3_PKG_SETUP_DIR), \
+ $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
$(PYTHON3_PKG_SETUP_ARGS), \
$(PYTHON3_PKG_SETUP_VARS) \
PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
-PKG_RELEASE:=5
+PKG_RELEASE:=10
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
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>
endef
define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_DIR) $(1)/usr/bin
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
$(1)/usr/include/
$(CP) \
- $(HOST_PYTHON3_LIB_DIR) \
+ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
$(1)/usr/lib/
$(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python3.pc \
- $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python-$(PYTHON3_VERSION).pc \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
$(1)/usr/lib/pkgconfig
- $(CP) \
- $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
- $(1)/usr/lib/python$(PYTHON_VERSION)/
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
+ $(1)/usr/bin/
endef
PYTHON3_BASE_LIB_FILES:= \
+zlib zlibmodule.c -lz
# Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
--- 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
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
--- 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):
--- 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).
--- 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
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) \
--- 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; }
--- 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)
--- 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()
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
$(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)/
# 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; }
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)
--- /dev/null
+From 30a779770fe690584456970b602ea16ec3f74ce7 Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Thu, 7 Mar 2019 08:05:31 -0800
+Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
+ to separators (GH-12201)
+
+---
+ Doc/library/urllib.parse.rst | 18 +++++++++++++++
+ Lib/test/test_urlparse.py | 23 +++++++++++++++++++
+ Lib/urllib/parse.py | 17 ++++++++++++++
+ .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst | 3 +++
+ 4 files changed, 61 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+
+diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
+index 0c8f0f607314..b565e1edd321 100644
+--- a/Doc/library/urllib.parse.rst
++++ b/Doc/library/urllib.parse.rst
+@@ -124,6 +124,11 @@ or on combining URL components into a URL string.
+ Unmatched square brackets in the :attr:`netloc` attribute will raise a
+ :exc:`ValueError`.
+
++ Characters in the :attr:`netloc` attribute that decompose under NFKC
++ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++ decomposed before parsing, no error will be raised.
++
+ .. versionchanged:: 3.2
+ Added IPv6 URL parsing capabilities.
+
+@@ -136,6 +141,10 @@ or on combining URL components into a URL string.
+ Out-of-range port numbers now raise :exc:`ValueError`, instead of
+ returning :const:`None`.
+
++ .. versionchanged:: 3.7.3
++ Characters that affect netloc parsing under NFKC normalization will
++ now raise :exc:`ValueError`.
++
+
+ .. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace', max_num_fields=None)
+
+@@ -257,10 +266,19 @@ or on combining URL components into a URL string.
+ Unmatched square brackets in the :attr:`netloc` attribute will raise a
+ :exc:`ValueError`.
+
++ Characters in the :attr:`netloc` attribute that decompose under NFKC
++ normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++ ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++ decomposed before parsing, no error will be raised.
++
+ .. versionchanged:: 3.6
+ Out-of-range port numbers now raise :exc:`ValueError`, instead of
+ returning :const:`None`.
+
++ .. versionchanged:: 3.7.3
++ Characters that affect netloc parsing under NFKC normalization will
++ now raise :exc:`ValueError`.
++
+
+ .. function:: urlunsplit(parts)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index be50b47603aa..e6638aee2244 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -1,3 +1,5 @@
++import sys
++import unicodedata
+ import unittest
+ import urllib.parse
+
+@@ -984,6 +986,27 @@ def test_all(self):
+ expected.append(name)
+ self.assertCountEqual(urllib.parse.__all__, expected)
+
++ def test_urlsplit_normalization(self):
++ # Certain characters should never occur in the netloc,
++ # including under normalization.
++ # Ensure that ALL of them are detected and cause an error
++ illegal_chars = '/:#?@'
++ hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
++ denorm_chars = [
++ c for c in map(chr, range(128, sys.maxunicode))
++ if (hex_chars & set(unicodedata.decomposition(c).split()))
++ and c not in illegal_chars
++ ]
++ # Sanity check that we found at least one such character
++ self.assertIn('\u2100', denorm_chars)
++ self.assertIn('\uFF03', denorm_chars)
++
++ for scheme in ["http", "https", "ftp"]:
++ for c in denorm_chars:
++ url = "{}://netloc{}false.netloc/path".format(scheme, c)
++ with self.subTest(url=url, char='{:04X}'.format(ord(c))):
++ with self.assertRaises(ValueError):
++ urllib.parse.urlsplit(url)
+
+ class Utility_Tests(unittest.TestCase):
+ """Testcase to test the various utility functions in the urllib."""
+diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
+index f691ab74f87f..39c5d6a80824 100644
+--- a/Lib/urllib/parse.py
++++ b/Lib/urllib/parse.py
+@@ -391,6 +391,21 @@ def _splitnetloc(url, start=0):
+ delim = min(delim, wdelim) # use earliest delim position
+ return url[start:delim], url[delim:] # return (domain, rest)
+
++def _checknetloc(netloc):
++ if not netloc or netloc.isascii():
++ return
++ # looking for characters like \u2100 that expand to 'a/c'
++ # IDNA uses NFKC equivalence, so normalize for this check
++ import unicodedata
++ netloc2 = unicodedata.normalize('NFKC', netloc)
++ if netloc == netloc2:
++ return
++ _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
++ for c in '/?#@:':
++ if c in netloc2:
++ raise ValueError("netloc '" + netloc2 + "' contains invalid " +
++ "characters under NFKC normalization")
++
+ def urlsplit(url, scheme='', allow_fragments=True):
+ """Parse a URL into 5 components:
+ <scheme>://<netloc>/<path>?<query>#<fragment>
+@@ -419,6 +434,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult('http', netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return _coerce_result(v)
+@@ -442,6 +458,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+ url, fragment = url.split('#', 1)
+ if '?' in url:
+ url, query = url.split('?', 1)
++ _checknetloc(netloc)
+ v = SplitResult(scheme, netloc, url, query, fragment)
+ _parse_cache[key] = v
+ return _coerce_result(v)
+diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+new file mode 100644
+index 000000000000..5546394157f9
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+@@ -0,0 +1,3 @@
++Changes urlsplit() to raise ValueError when the URL contains characters that
++decompose under IDNA encoding (NFKC-normalization) into characters that
++affect how the URL is parsed.
+++ /dev/null
-#
-# Copyright (C) 2007-2018 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:=pytz
-PKG_VERSION:=2018.9
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
-PKG_HASH:=d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c
-
-PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=python/host
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/pytz
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=World timezone definitions, modern and historical
- URL:=https://sourceforge.net/projects/pytz/
- DEPENDS:=+python
-endef
-
-define Package/pytz/description
- World timezone definitions, modern and historical
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Host/Compile
- $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
-endef
-
-Host/Install:=
-
-define Package/pytz/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,pytz))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ruamel-yaml
+PKG_VERSION:=0.15.91
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ruamel.yaml-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/ruamel.yaml/
+PKG_HASH:=692f03ed24c8c1d9fa9fd4c045f7ba1c26f1e96edb8bfb4d54854ba26bc02319
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ruamel.yaml-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/ruamel-yaml/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=YAML 1.2 loader/dumper package for Python
+ URL:=https://bitbucket.org/ruamel/yaml
+endef
+
+define Package/python-ruamel-yaml
+$(call Package/ruamel-yaml/Default)
+ DEPENDS:= \
+ +PACKAGE_python-ruamel-yaml:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-ruamel-yaml
+$(call Package/ruamel-yaml/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-ruamel-yaml:python3-light
+ VARIANT:=python3
+endef
+
+define Package/ruamel-yaml/description
+ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
+endef
+
+define Package/python3-ruamel-yaml/description
+$(call Package/ruamel-yaml/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-ruamel-yaml))
+$(eval $(call BuildPackage,python-ruamel-yaml))
+$(eval $(call BuildPackage,python-ruamel-yaml-src))
+
+$(eval $(call Py3Package,python3-ruamel-yaml))
+$(eval $(call BuildPackage,python3-ruamel-yaml))
+$(eval $(call BuildPackage,python3-ruamel-yaml-src))
+++ /dev/null
-#
-# Copyright (C) 2007-2017 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:=simplejson
-PKG_VERSION:=3.16.0
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
-PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/simplejson
- SUBMENU:=Python
- SECTION:=lang
- CATEGORY:=Languages
- MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
- TITLE:=Simple, fast, extensible JSON encoder/decoder for Python
- URL:=https://simplejson.readthedocs.org/
- DEPENDS:=+python
-endef
-
-define Package/simplejson/description
- Simple, fast, extensible JSON encoder/decoder for Python
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/simplejson/install
- $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
- $(CP) \
- $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
- $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,simplejson))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-text-unidecode
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=text-unidecode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/t/text-unidecode/
+PKG_HASH:=5a1375bb2ba7968740508ae38d92e1f889a0832913cb1c447d5e2046061a396d
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-text-unidecode-$(PKG_VERSION)
+
+PKG_LICENSE:=Artistic-1.0-cl8
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-text-unidecode/Default
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=The most basic Text::Unidecode port
+ URL:=https://github.com/kmike/text-unidecode/
+endef
+
+define Package/python-text-unidecode
+$(call Package/python-text-unidecode/Default)
+ DEPENDS:= \
+ +PACKAGE_python-text-unidecode:python-light
+ VARIANT:=python
+endef
+
+define Package/python3-text-unidecode
+$(call Package/python-text-unidecode/Default)
+ DEPENDS:= \
+ +PACKAGE_python3-text-unidecode:python3-light
+ VARIANT:=python3
+endef
+
+define Package/python-text-unidecode/description
+text-unidecode is the most basic port of the Text::Unidecode Perl library.
+endef
+
+define Package/python3-text-unidecode/description
+$(call Package/python-text-unidecode/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-text-unidecode))
+$(eval $(call BuildPackage,python-text-unidecode))
+$(eval $(call BuildPackage,python-text-unidecode-src))
+
+$(eval $(call Py3Package,python3-text-unidecode))
+$(eval $(call BuildPackage,python3-text-unidecode))
+$(eval $(call BuildPackage,python3-text-unidecode-src))
include $(TOPDIR)/rules.mk
PKG_NAME:=ruby
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.6.2
PKG_RELEASE:=1
# First two numbes
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/
-PKG_HASH:=47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
+PKG_HASH:=91fcde77eea8e6206d775a48ac58450afe4883af1a42e5b358320beb33a445fa
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
TITLE:=uuid
URL:=https://github.com/Tieske/uuid
DEPENDS:=+lua +luasocket
+ PKGARCH:=all
endef
define Package/uuid/description
PKG_NAME:=boost
PKG_VERSION:=1.69.0
PKG_SOURCE_VERSION:=1_69_0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
$(eval $(call DefineBoostLibrary,filesystem,system,))
$(eval $(call DefineBoostLibrary,graph,regex,))
-$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2))
+$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +zstd))
$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
$(eval $(call DefineBoostLibrary,math,,))
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=botan
+PKG_VERSION:=2.10.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
+
+PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
+PKG_BUILD_DIR:=$(BUILD_DIR)/Botan-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://botan.randombit.net/releases/
+PKG_HASH:=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
+
+PKG_USE_MIPS16:=0
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILE:=license.txt
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/botan/Default
+ SUBMENU:=SSL
+ TITLE:=Crypto and TLS for C++11
+ URL:=https://botan.randombit.net
+endef
+
+define Package/botan/Default/description
+ Botan (Japanese for peony) is a cryptography library written in C++11 and
+ released under the permissive Simplified BSD license.
+endef
+
+define Package/libbotan
+ $(call Package/botan/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+= (library)
+ ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+ DEPENDS:=+libstdcpp +libpthread
+endef
+
+define Package/libbotan/description
+ $(call Package/botan/Default/description)
+ This package contains the botan library.
+endef
+
+CONFIGURE_CMD = ./configure.py
+
+CONFIGURE_ARGS = \
+ --cpu="$(ARCH)" \
+ --cc-bin="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
+ --program-suffix="" \
+ --prefix=$(CONFIGURE_PREFIX) \
+ --exec-prefix=$(CONFIGURE_PREFIX) \
+ --bindir=$(CONFIGURE_PREFIX)/bin \
+ --sbindir=$(CONFIGURE_PREFIX)/sbin \
+ --libexecdir=$(CONFIGURE_PREFIX)/lib \
+ --sysconfdir=/etc \
+ --datadir=$(CONFIGURE_PREFIX)/share \
+ --localstatedir=/var \
+ --mandir=$(CONFIGURE_PREFIX)/man \
+ --infodir=$(CONFIGURE_PREFIX)/info \
+ --optimize-for-size \
+ $(DISABLE_IPV6)
+
+
+TARGET_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed \
+ -lpthread
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/botan* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
+endef
+
+define Package/libbotan/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libbotan))
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=czmq
+PKG_VERSION:=4.2.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=cfab29c2b3cc8a845749758a51e1dd5f5160c1ef57e2a41ea96e4c2dcc8feceb
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+PKG_LICENSE:=MPLv2
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+PKG_ABI_VERSION:=4
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/autotools.mk
+
+define Package/czmq
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=CZMQ High-level C binding for ZeroMQ
+ URL:=http://czmq.zeromq.org
+ ABI_VERSION:=$(PKG_ABI_VERSION)
+ DEPENDS:=+libzmq +libuuid +libpcre +libmicrohttpd +liblz4 +libcurl
+endef
+
+define Package/czmq/description
+ High-level C binding for ZeroMQ which is high-performance asynchronous messaging
+ library, aimed at use in distributed or concurrent applications.
+endef
+
+TARGET_CFLAGS += --std=c99
+CONFIGURE_ARGS += --without-docs
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/czmq/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zmakecert $(1)/usr/bin/zmakecert
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/
+ $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so
+ $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so.$(PKG_ABI_VERSION)
+endef
+
+$(eval $(call BuildPackage,czmq))
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
$(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
--- /dev/null
+--- 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
include $(TOPDIR)/rules.mk
PKG_NAME:=fcgi
-PKG_VERSION:=2.4.1
+PKG_VERSION:=2.4.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)2-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/FastCGI-Archives/fcgi2/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=53cc36624bb92a88e3d5a3d696282e1af24b280c3f275604123d9c6d407173e2
+PKG_HASH:=1fe83501edfc3a7ec96bb1e69db3fd5ea1730135bd73ab152186fd0b437013bc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-$(PKG_VERSION)
PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
server specific APIs.
endef
+TARGET_CXXFLAGS += -fno-rtti -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
-diff --git a/include/fcgio.h b/include/fcgio.h
-index 20d222a..92eda3c 100644
--- a/include/fcgio.h
+++ b/include/fcgio.h
@@ -77,10 +77,10 @@ protected:
// Use a buffer. The only reasons that a buffer would be useful is
// to support the use of the unget()/putback() or seek() methods. Using
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 5a54c11..e57b622 100644
--- a/libfcgi/fcgio.cpp
+++ b/libfcgi/fcgio.cpp
-@@ -89,7 +89,7 @@ int fcgi_streambuf::sync()
+@@ -86,7 +86,7 @@ int fcgi_streambuf::sync()
}
// uflow() removes the char, underflow() doesn't
{
if (this->bufsize)
{
-@@ -103,7 +103,7 @@ int fcgi_streambuf::uflow()
+@@ -100,7 +100,7 @@ int fcgi_streambuf::uflow()
}
}
+++ /dev/null
-diff --git a/Makefile.am b/Makefile.am
-index b35f7f3..c34a274 100755
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,7 +4,7 @@
- # $Id: Makefile.am,v 1.8 2003/11/02 21:42:47 robs Exp $
- #
-
--SUBDIRS = libfcgi cgi-fcgi examples include
-+SUBDIRS = libfcgi cgi-fcgi include
-
- include_HEADERS = fcgi_config.h
-
+++ /dev/null
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 5a54c11..9ecca45 100644
---- a/libfcgi/fcgio.cpp
-+++ b/libfcgi/fcgio.cpp
-@@ -23,6 +23,7 @@
- #endif
-
- #include <limits.h>
-+#include <stdio.h>
- #include "fcgio.h"
-
- using std::streambuf;
+++ /dev/null
-From 78fac26891fe7494355021dbac109b807b8c6d53 Mon Sep 17 00:00:00 2001
-From: Joachim Nilsson <troglobit@gmail.com>
-Date: Mon, 14 May 2018 15:40:43 +0200
-Subject: [PATCH] Convert AM_INIT_AUTOMAKE() --> AC_INIT() and trigger non-GNU
- project
-
-Converts from old-style configure syntax with AM_INIT_AUTOMAKE to
-AC_INIT and enable "foreign" mode, i.e. non-GNU conformant tree
-to avoid copying in COPYING and other files when autogen.sh runs.
-
-Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
----
- configure.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 2f72645..c5fbc4b 100755
---- a/configure.in
-+++ b/configure.in
-@@ -4,8 +4,8 @@ dnl This file is an input file used by the GNU "autoconf" program to
- dnl generate the file "configure", which is run during the build
- dnl to configure the system for the local environment.
-
--AC_INIT
--AM_INIT_AUTOMAKE(fcgi, 2.4.1-SNAP-0910052249)
-+AC_INIT(fcgi, 2.4.1-SNAP-0910052249)
-+AM_INIT_AUTOMAKE([1.11 foreign])
-
- AM_CONFIG_HEADER(fcgi_config.h)
-
---
-2.20.0
-
include $(TOPDIR)/rules.mk
PKG_NAME:=file
-PKG_VERSION:=5.35
+PKG_VERSION:=5.36
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://src.fedoraproject.org/lookaside/pkgs/file/ \
http://download.openpkg.org/components/cache/file/ \
ftp://ftp.astron.com/pub/file/
-PKG_HASH:=30c45e817440779be7aac523a905b123cba2a6ed0bf4f5439e1e99ba940b5546
+PKG_HASH:=fb608290c0fd2405a8f63e5717abf6d03e22e183fb21884413d1edd918184379
PKG_LICENSE:=BSD-2c
PKG_LICENSE_FILES:=COPYING
DEPENDS:=+zlib
endef
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
- --disable-libseccomp
+ --disable-libseccomp \
+ --disable-rpath \
+ --disable-warnings \
+ --without-pic
MAKE_PATH := src
-TARGET_CFLAGS += $(FPIC)
-
define Build/Compile/magic
( cd $(PKG_BUILD_DIR)/magic/Magdir; \
for f in `ls`; do \
include $(TOPDIR)/rules.mk
PKG_NAME:=freetype
-PKG_VERSION:=2.9.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.10.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/freetype
-PKG_HASH:=db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
+PKG_HASH:=fccc62928c65192fff6c98847233b28eb7ce05f12d2fea3f6cc90e8b4e5fbe06
PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
bool "enable DTLS heartbeat support"
default y
-config GNUTLS_OPENPGP
- bool "enable OPENPGP authentication support"
- default n
-
config GNUTLS_SRP
bool "enable SRP authentication support"
default n
include $(TOPDIR)/rules.mk
PKG_NAME:=gnutls
-PKG_VERSION:=3.6.5
+PKG_VERSION:=3.6.7
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6
-PKG_HASH:=073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35
+PKG_HASH:=5b3409ad5aaf239808730d1ee12fdcd148c0be00262c7edf157af655a8a188e2
#PKG_FIXUP:=autoreconf gettext-version
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_LICENSE:=LGPLv2.1+
PKG_CPE_ID:=cpe:/a:gnu:gnutls
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
PKG_LIBTOOL_PATHS:=. lib
-PKG_CHECK_FORMAT_SECURITY:=0
PKG_CONFIG_DEPENDS:= \
CONFIG_GNUTLS_ALPN \
CONFIG_GNUTLS_EXT_LIBTASN1 \
CONFIG_GNUTLS_HEARTBEAT \
CONFIG_GNUTLS_OCSP \
- CONFIG_GNUTLS_OPENPGP \
CONFIG_GNUTLS_PKCS11 \
CONFIG_GNUTLS_PSK \
CONFIG_GNUTLS_SRP \
define Package/libgnutls
$(call Package/gnutls/Default)
TITLE+= (library)
- DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev
+ DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev +libatomic
endef
define Package/libgnutls/description
CONFIGURE_ARGS+= \
--enable-shared \
--enable-static \
+ --disable-doc \
+ --disable-gcc-warnings \
+ --disable-guile \
--disable-rpath \
+ --disable-seccomp-tests \
+ --disable-tests \
+ --disable-valgrind-tests \
+ \
--disable-libdane \
- --with-included-unistring \
- --disable-guile \
- --disable-nls \
- --without-idn \
- --without-zlib \
+ --disable-ssl2-support \
+ --disable-ssl3-support \
--enable-local-libopts \
- --disable-doc \
- --disable-tests \
+ --without-idn \
--with-default-trust-store-dir=/etc/ssl/certs/ \
- --disable-crywrap \
- --with-librt-prefix="$(LIBRT_ROOT_DIR)/"
+ --with-included-unistring \
+ --with-librt-prefix="$(LIBRT_ROOT_DIR)/" \
+ --with-pic
ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y)
CONFIGURE_ARGS += --with-included-libtasn1
CONFIGURE_ARGS += --disable-psk-authentication
endif
-ifneq ($(CONFIG_GNUTLS_OPENPGP),y)
-CONFIGURE_ARGS += --disable-openpgp-authentication
-endif
-
ifneq ($(CONFIG_GNUTLS_ANON),y)
CONFIGURE_ARGS += --disable-anon-authentication
endif
CONFIGURE_ARGS += --enable-cryptodev
endif
-TARGET_CFLAGS += $(FPIC)
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
$(CP) \
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+PKG_NAME:=google-authenticator-libpam
+PKG_SOURCE_DATE:=2019-01-03
+PKG_RELEASE:=1
+
+PKG_SOURCE_VERSION:=60207b6c4cebf825863043e963bf67f6a0520076
+PKG_SOURCE_URL:=https://codeload.github.com/google/google-authenticator-libpam/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_HASH:=39267ba837f870b3f4cbf9166a76eed35879d3f87d058740f2c0a5e16570bce3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/google-authenticator-libpam
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libpam +libqrencode
+ TITLE:=Google Authenticator PAM module
+ URL:=https://github.com/google/google-authenticator-libpam
+ MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+endef
+
+define Package/google-authenticator-libpam/description
+ Google Authenticator PAM module
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/lib/security
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/* $(1)/lib/security/
+endef
+
+define Package/libpam-google-authenticator/install
+ $(INSTALL_DIR) $(1)/usr/lib/security
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/*.so* \
+ $(1)/usr/lib/security/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,google-authenticator-libpam))
PKG_NAME:=hiredis
PKG_VERSION:=0.14.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)?
--- /dev/null
+commit f96d9f9d2e3ba39352035e6ac26463243484d404
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date: Sun Jan 13 19:25:52 2019 +0100
+
+ Setup .pc file to allow use for cross-compiling
+
+ The Makefile is currently creating the pkg-config file using static lib
+ and include dir statements. Change that so that projects that
+ cross-compile hiredis can use pkg-config to setup other programs
+ depending on it.
+
+ Note: these projects (like OpenWrt) call pkg-config with arguments to
+ overwrite some variables in the .pc file, namely:
+
+ --define-variable=prefix=<...>
+ --define-variable=exec_prefix=<...>
+
+ Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+diff --git a/Makefile b/Makefile
+index 07b8a83..14d21de 100644
+--- a/Makefile
++++ b/Makefile
+@@ -166,8 +166,8 @@ $(PKGCONFNAME): hiredis.h
+ @echo "Generating $@ for pkgconfig..."
+ @echo prefix=$(PREFIX) > $@
+ @echo exec_prefix=\$${prefix} >> $@
+- @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
+- @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
++ @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@
++ @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@
+ @echo >> $@
+ @echo Name: hiredis >> $@
+ @echo Description: Minimalistic C client library for Redis. >> $@
include $(TOPDIR)/rules.mk
PKG_NAME:=icu4c
-PKG_VERSION:=63.1
-PKG_RELEASE:=1
+MAJOR_VERSION:=64
+MINOR_VERSION:=1
+PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
+PKG_RELEASE:=2
-PKG_SOURCE:=$(PKG_NAME)-63_1-src.tgz
-PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d
+PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz
+PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION)
+PKG_HASH:=92f1b7b9d51b396679c17f35a2112423361b8da3c1b9de00aa94fd768ae296e6
PKG_LICENSE:=ICU-1.8.1+
PKG_LICENSE_FILES:=LICENSE
--enable-dyload \
--prefix=$(STAGING_DIR_HOSTPKG)
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ mkdir -p $(PKG_BUILD_DIR)/data/out
+endef
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
--- /dev/null
+--- a/runConfigureICU
++++ b/runConfigureICU
+@@ -239,8 +239,8 @@
+ THE_COMP="the GNU C++"
+ CC=gcc; export CC
+ CXX=g++; export CXX
+- RELEASE_CFLAGS='-O3'
+- RELEASE_CXXFLAGS='-O3'
++ RELEASE_CFLAGS=' '
++ RELEASE_CXXFLAGS=' '
+ DEBUG_CFLAGS='-g'
+ DEBUG_CXXFLAGS='-g'
+ ;;
--- /dev/null
+From cb5cf996d123014a2420c853c4db60e4500973b1 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 1 Apr 2019 04:52:32 -0700
+Subject: [PATCH] Add big endian ARM support (#92)
+
+This fixes compilation on such platforms.
+---
+ double-conversion/utils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h
+index 1e44fca..b715c65 100644
+--- a/18n/double-conversion-utils.h
++++ b/i18n/double-conversion-utils.h
+@@ -99,7 +99,7 @@ int main(int argc, char** argv) {
+ defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+ defined(__SH4__) || defined(__alpha__) || \
+- defined(_MIPS_ARCH_MIPS32R2) || \
++ defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) || \
+ defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+ defined(__riscv) || \
+ defined(__or1k__) || defined(__arc__) || \
--- /dev/null
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jose
+PKG_VERSION:=10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libjose
+ SECTION:=libs
+ TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+ DEPENDS:=+zlib +jansson +libopenssl +libpthread
+ URL:=https://github.com/latchset/jose
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose
+ SECTION:=utils
+ TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+ DEPENDS:=+libjose
+ URL:=https://github.com/latchset/jose
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose/description
+ jose is a command line utility for performing various tasks on JSON
+ Object Signing and Encryption (JOSE) objects. José provides a full
+ crypto stack including key generation, signing and encryption.
+endef
+
+define Package/libjose/description
+ libjose is a library for performing various tasks on JSON
+ Object Signing and Encryption (JOSE) objects. José provides a full
+ crypto stack including key generation, signing and encryption.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h $(1)/usr/include/$(PKG_NAME)
+ $(CP) $(PKG_BUILD_DIR)/*.pc $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libjose/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so* $(1)/usr/lib/
+endef
+
+define Package/jose/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libjose))
+$(eval $(call BuildPackage,jose))
--- /dev/null
+From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001
+From: Nathaniel McCallum <npmccallum@redhat.com>
+Date: Fri, 29 Sep 2017 14:49:57 -0400
+Subject: [PATCH] Fix minor FILE* leak
+
+---
+ cmd/jwe/pwd.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h
+index 0b5be54..2f021eb 100644
+--- a/cmd/jwe/pwd.h
++++ b/cmd/jwe/pwd.h
+@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt)
+ nf.c_lflag &= ~ECHO;
+ nf.c_lflag |= ECHONL;
+
+- if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
++ if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
++ fclose(tty);
+ return NULL;
++ }
+
+ fprintf(tty, "%s", prompt);
+
+@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt)
+ }
+
+ tcsetattr(fileno(tty), TCSANOW, &of);
++ fclose(tty);
+ return pwd;
+ }
+ #endif
PKG_NAME:=ldns
PKG_VERSION:=1.7.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
$(CP) $(PKG_INSTALL_DIR)/usr/include/ldns $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libldns.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/packaging/libldns.pc $(1)/usr/lib/pkgconfig
endef
define Package/libldns/install
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcgroup
+PKG_VERSION:=0.41
+PKG_RELEASE:=1
+PKG_LICENSE:=LGPL
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=@SF/libcg
+PKG_HASH:=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcgroup
+ TITLE:=CGroup config and exec library
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+musl-fts +@KERNEL_CGROUPS
+endef
+
+define Package/cgroup-tools
+ TITLE:=CGroup config and exec tools
+ DEPENDS:=+libcgroup
+ CATEGORY:=Utilities
+endef
+
+define Package/libcgroup/description
+ Helpers utils for working with cgroups.
+endef
+
+CONFIGURE_ARGS += --enable-tools \
+ --enable-shared \
+ --disable-daemon \
+ --disable-pam
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/include/libcgroup.h $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/include/libcgroup $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/libcgroup.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libcgroup/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+endef
+
+define Package/cgroup-tools/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/.libs/* $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,libcgroup))
+$(eval $(call BuildPackage,cgroup-tools))
--- /dev/null
+diff --git a/configure.in b/configure.in
+index 75f4a51..f70b37c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -193,6 +193,19 @@ if test x$with_pam = xtrue; then
+ header files!])])
+ fi
+
++AC_CHECK_LIB(
++ [fts],
++ [fts_open],
++ [],
++ [AC_MSG_ERROR([Cannot compile without fts!])]
++)
++
++AC_CHECK_HEADERS(
++ [fts.h],
++ [],
++ [AC_MSG_ERROR([Cannot compile without fts.h])]
++)
++
+ AC_CONFIG_FILES([Makefile
+ tests/Makefile
+ tests/tools/testenv.sh
include $(TOPDIR)/rules.mk
PKG_NAME:=cups
-PKG_VERSION:=2.2.10
+PKG_VERSION:=2.2.11
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=77c8b2b3bb7fe8b5fbfffc307f2c817b2d7ec67b657f261a1dd1c61ab81205bb
+PKG_HASH:=f58010813fd6903f690cdb0c0b91e4d1bc9e5b9570c28734229ba3ed2908b76c
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE.txt
include $(TOPDIR)/rules.mk
PKG_NAME:=libdaq
-PKG_VERSION:=2.0.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.2.2
+PKG_RELEASE:=1
-PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
- @SF/snort
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
-PKG_HASH:=d41da5f7793e66044e6927dd868c0525e7ee4ec1a3515bf74ef9a30cd9273af0
+PKG_HASH:=7cd818cabb1ad35360e83076e54775f07165ee71407dc672d147e27d3cd37f7b
PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
--with-libpcap-includes="$(STAGING_DIR)/usr/include" \
--with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
-define Build/Compile
- $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)
-endef
-
-define Build/Install
- $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/
---- a/configure
-+++ b/configure
-@@ -13552,10 +13552,11 @@ if ${daq_cv_libpcap_version_1x+:} false;
+diff -u --recursive daq-2.2.2-vanilla/configure daq-2.2.2/configure
+--- daq-2.2.2-vanilla/configure 2017-07-05 15:58:03.000000000 -0400
++++ daq-2.2.2/configure 2018-09-01 17:18:56.774898034 -0400
+@@ -13244,10 +13244,11 @@
else
if test "$cross_compiling" = yes; then :
---- a/os-daq-modules/daq_ipfw.c
-+++ b/os-daq-modules/daq_ipfw.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c daq-2.2.2/os-daq-modules/daq_ipfw.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_ipfw.c 2018-09-01 17:21:10.608181841 -0400
@@ -23,10 +23,10 @@
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/socket.h>
---- a/os-daq-modules/daq_ipq.c
-+++ b/os-daq-modules/daq_ipq.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c daq-2.2.2/os-daq-modules/daq_ipq.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_ipq.c 2018-09-01 17:21:23.162208457 -0400
@@ -24,10 +24,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <netinet/ip.h>
---- a/os-daq-modules/daq_nfq.c
-+++ b/os-daq-modules/daq_nfq.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c daq-2.2.2/os-daq-modules/daq_nfq.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_nfq.c 2018-09-01 17:21:35.202233988 -0400
@@ -24,10 +24,10 @@
#include <stdio.h>
#include <stdlib.h>
include $(TOPDIR)/rules.mk
PKG_NAME:=libdouble-conversion
-PKG_VERSION:=3.1.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.1.4
+PKG_RELEASE:=2
PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c49a6b3fa9c917f827b156c8e0799ece88ae50440487a99fc2f284cfd357a5b9
+PKG_HASH:=95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE_FILES:=COPYING LICENSE
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libdouble-conversion
endef
$(eval $(call BuildPackage,libdouble-conversion))
+$(eval $(call HostBuild))
--- /dev/null
+--- a/double-conversion/utils.h
++++ b/double-conversion/utils.h
+@@ -91,7 +91,7 @@ int main(int argc, char** argv) {
+ defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+ defined(__SH4__) || defined(__alpha__) || \
+- defined(_MIPS_ARCH_MIPS32R2) || \
++ defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) || \
+ defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+ defined(__riscv) || \
+ defined(__or1k__) || defined(__arc__) || \
include $(TOPDIR)/rules.mk
PKG_NAME:=glog
-PKG_VERSION:=0.3.5
-PKG_RELEASE:=3
+PKG_VERSION:=0.4.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0
+PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILE:=COPYING
--- /dev/null
+Index: glog-0.4.0/src/symbolize_unittest.cc
+===================================================================
+--- glog-0.4.0.orig/src/symbolize_unittest.cc
++++ glog-0.4.0/src/symbolize_unittest.cc
+@@ -401,7 +401,7 @@ int main(int argc, char **argv) {
+ FLAGS_logtostderr = true;
+ InitGoogleLogging(argv[0]);
+ InitGoogleTest(&argc, argv);
+-#if defined(HAVE_SYMBOLIZE)
++#if defined(HAVE_SYMBOLIZE) && defined(HAVE_STACKTRACE)
+ # if defined(__ELF__)
+ // We don't want to get affected by the callback interface, that may be
+ // used to install some callback function at InitGoogle() time.
include $(TOPDIR)/rules.mk
PKG_NAME:=libgpg-error
-PKG_VERSION:=1.34
+PKG_VERSION:=1.36
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
https://ftp.nluug.nl/security/gnupg/ \
http://ring.ksc.gr.jp/archives/net/gnupg/libgpg-error/ \
https://www.gnupg.org/ftp/gcrypt/libgpg-error/
-PKG_HASH:=0680799dee71b86b2f435efb825391eb040ce2704b057f6bd3dcc47fbc398c81
+PKG_HASH:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE:=LGPL-2.1+
--- a/configure.ac
+++ b/configure.ac
-@@ -74,6 +74,18 @@ AM_SILENT_RULES
+@@ -74,6 +74,21 @@ AM_SILENT_RULES
AC_CANONICAL_HOST
AB_INIT
+ arm-openwrt-linux-gnu|armeb-openwrt-linux-gnu)
+ host=arm-unknown-linux-gnueabi
+ ;;
++ mips64-openwrt-linux-gnu)
++ host=mips64el-unknown-linux-gnuabi64
++ ;;
+ *)
+ host=$(echo $host | sed 's/openwrt/unknown/g')
+ ;;
include $(TOPDIR)/rules.mk
PKG_NAME:=libhttp-parser
-PKG_VERSION:=2.8.1
+PKG_VERSION:=2.9.0
PKG_RELEASE:=1
-PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE-MIT
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/nodejs/http-parser/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=51615f68b8d67eadfd2482decc63b3e55d749ce0055502bbb5b0032726d22d96
+PKG_HASH:=ef26268c54c8084d17654ba2ed5140bffeffd2a040a895ffb22a6cca3f6c613f
PKG_BUILD_DIR:=$(BUILD_DIR)/http-parser-$(PKG_VERSION)
+PKG_MAINTAINER:=Ramanathan Sivagurunathan <ramzthecoder@gmail.com>, Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE-MIT
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
include $(INCLUDE_DIR)/package.mk
define Package/libhttp-parser
endef
define Package/libhttp-parser/description
- A parser for HTTP messages written in C. It parses both requests and responses.
+ A parser for HTTP messages written in C. It parses both requests and responses.
The parser is designed to be used in performance HTTP applications.
It does not make any syscalls nor allocations, it does not buffer data,
it can be interrupted at anytime. Depending on your architecture,
(in a web server that is per connection).
endef
-define Build/Compile
- $(call Build/Compile/Default, library)
-endef
+MAKE_FLAGS+=library
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/http_parser.h $(1)/usr/include/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/include/http_parser.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_DATA) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
- ( cd $(1)/usr/lib ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
+ $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libhttp_parser.so* $(1)/usr/lib/
endef
define Package/libhttp-parser/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/libhttp_parser.so.* $(1)/usr/lib/
- ( cd $(1)/usr/lib ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so ; \
- ln -s libhttp_parser.so.$(PKG_VERSION) libhttp_parser.so.2.8 )
+ $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libhttp_parser.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libhttp-parser))
PKG_NAME:=libinput
PKG_VERSION:=1.7.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/
--- /dev/null
+--- a/src/libinput.h
++++ b/src/libinput.h
+@@ -29,6 +29,7 @@
+ extern "C" {
+ #endif
+
++#include <stdarg.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <libudev.h>
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmaxminddb
+PKG_VERSION:=1.3.2
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/maxmind/libmaxminddb/releases/download/$(PKG_VERSION)/
+PKG_HASH:=e6f881aa6bd8cfa154a44d965450620df1f714c6dc9dd9971ad98f6e04f6c0f0
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libmaxminddb
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A library for working with MaxMind DB files
+ URL:=https://maxmind.github.io/libmaxminddb/
+endef
+
+define Package/libmaxminddb/description
+ The libmaxminddb library provides functions for working MaxMind DB files.
+endef
+
+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/libmaxminddb.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libmaxminddb/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmdblookup $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libmaxminddb))
PKG_NAME:=libmodbus
PKG_VERSION:=3.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://libmodbus.org/releases
--- /dev/null
+From 1c5d969f46ccd5333f602dfbe2b0a1295650b9b0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
+Date: Wed, 25 Oct 2017 20:35:47 +0200
+Subject: [PATCH 1/2] Only set SER_RS485_ENABLED bit of existing RS485 settings
+
+Thanks to @JCWren
+---
+ src/modbus-rtu.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
+index 8d9f386..f2911d6 100644
+--- a/src/modbus-rtu.c
++++ b/src/modbus-rtu.c
+@@ -909,9 +909,13 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
+ #if HAVE_DECL_TIOCSRS485
+ modbus_rtu_t *ctx_rtu = ctx->backend_data;
+ struct serial_rs485 rs485conf;
+- memset(&rs485conf, 0x0, sizeof(struct serial_rs485));
+
+ if (mode == MODBUS_RTU_RS485) {
++ // Get
++ if (ioctl(ctx->s, TIOCGRS485, &rs485conf) < 0) {
++ return -1;
++ }
++ // Set
+ rs485conf.flags = SER_RS485_ENABLED;
+ if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
+ return -1;
+@@ -923,6 +927,10 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
+ /* Turn off RS485 mode only if required */
+ if (ctx_rtu->serial_mode == MODBUS_RTU_RS485) {
+ /* The ioctl call is avoided because it can fail on some RS232 ports */
++ if (ioctl(ctx->s, TIOCGRS485, &rs485conf) < 0) {
++ return -1;
++ }
++ rs485conf.flags &= ~SER_RS485_ENABLED;
+ if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
+ return -1;
+ }
+--
+2.21.0
+
--- /dev/null
+From 91a1d74f76c64e7b35bfb10114e1a4a6ff351656 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= <stephane.raimbault@gmail.com>
+Date: Thu, 26 Oct 2017 11:10:31 +0200
+Subject: [PATCH 2/2] Oops fix OR on RS485 settings (1c5d969)
+
+---
+ src/modbus-rtu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c
+index f2911d6..190298e 100644
+--- a/src/modbus-rtu.c
++++ b/src/modbus-rtu.c
+@@ -916,7 +916,7 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
+ return -1;
+ }
+ // Set
+- rs485conf.flags = SER_RS485_ENABLED;
++ rs485conf.flags |= SER_RS485_ENABLED;
+ if (ioctl(ctx->s, TIOCSRS485, &rs485conf) < 0) {
+ return -1;
+ }
+--
+2.21.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=libseccomp
-PKG_VERSION:=2.3.3
+PKG_VERSION:=2.4.0
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155
+PKG_HASH:=2e74c7e8b54b340ad5d472e59286c6758e1e1e96c6b43c3dbdc8ddafbf0e525d
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
PKG_BUILD_PARALLEL:=1
DEPENDS+=
endef
+define Package/scmp_sys_resolver
+$(call Package/libseccomp/Default)
+ TITLE+= scmp_sys_resolver
+ DEPENDS+= libseccomp
+endef
+
define Package/libseccomp/description
This package contains the seccomp library.
endef
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
endef
+define Package/scmp_sys_resolver/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
+endef
+
$(eval $(call BuildPackage,libseccomp))
+$(eval $(call BuildPackage,scmp_sys_resolver))
SECTION:=libs
CATEGORY:=Libraries
TITLE:=typesafe callback system for standard C++
- URL:=http://libsigc.sourceforge.net/
+ URL:=https://libsigcplusplus.github.io/libsigcplusplus/
DEPENDS:=+libstdcpp
endef
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/erikd/libsndfile.git
-PKG_SOURCE_DATE:=2019-02-26
-PKG_SOURCE_VERSION:=7c5da26b703753ec4ec598d95893a36a8639eece
-PKG_MIRROR_HASH:=88018902907ff56dc896845f65046450d116f213cafa4a823ea95faa14670389
+PKG_SOURCE_DATE:=2019-03-08
+PKG_SOURCE_VERSION:=5056a77fdae85f96eee4dff82af462db5a5c341e
+PKG_MIRROR_HASH:=5a695b64885ed3c41910029116de8b713118be6349554685fe53997316c369ea
PKG_LICENSE:=LGPLv2.1
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=libssh2
-PKG_VERSION:=1.8.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.8.2
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.libssh2.org/download
-PKG_HASH:=39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4
+PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
PKG_FIXUP:=autoreconf
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libssh2:libssh2
PKG_CONFIG_DEPENDS:= \
CONFIG_LIBSSH2_MBEDTLS \
PKG_NAME:=libstrophe
PKG_VERSION:=0.9.2
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
$(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
$(INSTALL_DIR) $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libstrophe.pc \
+ $(1)/usr/lib/pkgconfig/
endef
define Package/libstrophe/install
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l-utils
-PKG_VERSION:=1.16.3
+PKG_VERSION:=1.16.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
-PKG_HASH:=7c5c0d49c130cf65d384f28e9f3a53c5f7d17bf18740c48c40810e0fbbed5b54
+PKG_HASH:=ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0 LGPL-2.1
define Package/libv4l/Default
TITLE:=Video 4 Linux
- URL:=http://www.linuxtv.org/
+ URL:=https://www.linuxtv.org/
endef
define Package/libv4l/Default/description
TARGET_LDFLAGS += -largp -Wl,--gc-sections
CONFIGURE_ARGS+= \
+ --disable-bpf \
--disable-doxygen-doc \
--disable-libdvbv5 \
--disable-qv4l2 \
--- a/configure.ac
+++ b/configure.ac
-@@ -283,16 +283,9 @@ else
+@@ -309,16 +309,9 @@ else
AC_MSG_WARN(ALSA library not available)
fi
--- /dev/null
+POSIX says that behavior when subopts list is empty is undefined.
+musl libs will set value to NULL which leads to crash.
+
+Simply avoid getsubopt, since we cannot rely on it.
+
+diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+index 3ea6cd3..291fb3e 100644
+--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+@@ -692,16 +692,17 @@ static bool parse_subset(char *optarg)
+
+ static bool parse_next_subopt(char **subs, char **value)
+ {
+- static char *const subopts[] = {
+- NULL
+- };
+- int opt = getsubopt(subs, subopts, value);
++ char *p = *subs;
++ *value = *subs;
+
+- if (opt < 0 || *value)
+- return false;
+- fprintf(stderr, "No value given to suboption <%s>\n",
+- subopts[opt]);
+- return true;
++ while (*p && *p != ',')
++ p++;
++
++ if (*p)
++ *p++ = '\0';
++
++ *subs = p;
++ return false;
+ }
+
+ void common_cmd(int ch, char *optarg)
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libyubikey
+PKG_VERSION:=1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE:=libyubikey-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c/Releases
+PKG_HASH:=04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/libyubikey-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libyubikey
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The Yuibco yubikey c library
+ URL:=https://developers.yubico.com/yubico-c/
+endef
+
+define Package/libyubikey/description
+ The c library for the yubikey from Yubico
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/yubikey.h $(STAGING_DIR)/usr/include
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static
+
+define Package/libyubikey/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/modhex $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykgenerate $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykparse $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so.* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,libyubikey))
--- /dev/null
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=log4cplus
+PKG_VERSION:=2.0.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/
+PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73
+
+PKG_LICENSE_FILE:=LICENSE
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/log4cplus
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A simple to use C++ logging API
+ URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
+ DEPENDS:=+libstdcpp
+endef
+
+define Package/log4cplus/description
+ log4cplus is a simple to use C++11 logging API providing thread--safe,
+ flexible, and arbitrarily granular control over log management and
+ configuration. It is modeled after the Java log4j API.
+endef
+
+TARGET_CFLAGS += -flto
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CMAKE_OPTIONS += \
+ -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
+ -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
+ -DUNICODE:BOOL=OFF \
+ -DWITH_ICONV:BOOL=OFF
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/log4cplus $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+define Package/log4cplus/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,log4cplus))
include $(TOPDIR)/rules.mk
PKG_NAME:=lttng-ust
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.10.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
-PKG_HASH:=a75c3ea6cbfa3a89107a2141b27ebabf13964e628855566571f09459bbbc8cb3
+PKG_HASH:=9e8420f90d5f963f7aa32bc6d44adc1e491136f687c69ffb7a3075d33b40852b
+PKG_MAINTAINER:=
PKG_LICENSE:=LGPL-2.1 GPL-2.0
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
DEPENDS:= +liburcu +libuuid +librt
endef
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --without-pic
+
+CONFIGURE_VARS += \
+ ac_cv_prog_BUILD_GEN_TP_EXAMPLES=no
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ust.pc $(1)/usr/lib/pkgconfig/
endef
--- a/Makefile.am
+++ b/Makefile.am
-@@ -20,8 +20,6 @@ if BUILD_JAVA_AGENT
- SUBDIRS += liblttng-ust-java-agent
+@@ -26,8 +26,6 @@ SUBDIRS += python-lttngust \
+ liblttng-ust-python-agent
endif
-SUBDIRS += tests doc
+++ /dev/null
---- a/configure.ac
-+++ b/configure.ac
-@@ -350,7 +350,14 @@ AC_ARG_WITH([lttng-system-rundir],
- AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"],
- [LTTng system runtime directory])
-
--AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:])
-+AC_ARG_ENABLE([examples],
-+ [AS_HELP_STRING([--enable-examples],[build examples [default=no]])],
-+ [enable_examples=$enableval],
-+ [enable_examples=no]
-+)
-+if test "x$enable_examples" = "xyes"; then
-+ AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:])
-+fi
- AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test $BUILD_GEN_TP_EXAMPLES], [Build examples requiring lttng-gen-tp])
-
- AC_CONFIG_FILES([
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=measurement-kit
+PKG_VERSION:=0.10.0
+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:=c31ff8a457dfdbb2d42ef60f82646e508f6649107f15eec31fc22bc140ceb8e6
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/measurement-kit
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=C++14 library that implements open network measurement methodologies
+ URL:=https://measurement-kit.github.io/
+ DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +ca-bundle
+endef
+
+define Package/measurement-kit/description
+ Measurement Kit is a C++14 library that implements open network measurement methodologies (performance, censorship, etc.)
+endef
+
+CONFIGURE_ARGS+= --with-ca-bundle=/etc/ssl/cert.pem
+
+define Build/Configure
+ ( cd $(PKG_BUILD_DIR); ./autogen.sh )
+ $(call Build/Configure/Default)
+endef
+
+define Package/measurement-kit/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/measurement_kit $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,measurement-kit))
--- /dev/null
+--- 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
+
--- /dev/null
+--- 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??????
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nspr
+PKG_VERSION:=4.21
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+ https://download.cdn.mozilla.net/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ \
+ https://archive.mozilla.org/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/
+PKG_HASH:=15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH = ./nspr
+MAKE_PATH = ./nspr
+PKG_AUTOMAKE_PATHS = $(PKG_BUILD_DIR)/nspr
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+ conf=--enable-64bit
+endif
+
+export MUSL=$(if $(CONFIG_LIBC_USE_GLIBC),0,1)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CONFIGURE_ARGS += \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --disable-debug \
+ --with-pthreads \
+ $(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \
+ $(conf)
+
+define Build/Compile
+ CROSS_COMPILE=1 CFLAGS="-DXP_UNIX $(HOST_CFLAGS)" LDFLAGS="" CC="$(HOSTCC)" \
+ $(MAKE) -C $(PKG_BUILD_DIR)/nspr/config
+ $(call Build/Compile/Default)
+endef
+
+define Package/nspr
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Netscape Portable Runtime (NSPR)
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR
+ DEPENDS:=+libpthread
+endef
+
+define Package/nspr/description
+ Netscape Portable Runtime (NSPR) provides a platform-neutral API for system
+ level and libc-like functions. The API is used in the Mozilla clients, many
+ of Red Hat's and Oracle's server applications, and other software offerings.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include \
+ $(1)/usr/lib/ \
+ $(1)/usr/lib/pkgconfig/ \
+ $(1)/usr/share/aclocal/
+
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/nspr $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
+endef
+
+define Package/nspr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,nspr))
--- /dev/null
+From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 16 Nov 2018 13:52:49 +0800
+Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
+
+Remove _BUILD_STRING and _BUILD_TIME to avoid
+adding timestamp to _pl_bld.h which can result
+in adding timestamp in library file such as
+libnspr4.so.
+ $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
+ [snip]
+ 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
+ [snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ lib/ds/Makefile.in | 8 +-------
+ lib/libc/src/Makefile.in | 8 +-------
+ lib/prstreams/Makefile.in | 8 +-------
+ pr/src/Makefile.in | 8 +-------
+ 4 files changed, 4 insertions(+), 28 deletions(-)
+
+diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
+index e737791..b578476 100644
+--- a/nspr/lib/ds/Makefile.in
++++ b/nspr/lib/ds/Makefile.in
+@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
+index e8a6d9f..978ed28 100644
+--- a/nspr/lib/libc/src/Makefile.in
++++ b/nspr/lib/libc/src/Makefile.in
+@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
+index aeb2944..f318097 100644
+--- a/nspr/lib/prstreams/Makefile.in
++++ b/nspr/lib/prstreams/Makefile.in
+@@ -116,13 +116,7 @@ endif
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
+index 19c5a69..b4ac31c 100644
+--- a/nspr/pr/src/Makefile.in
++++ b/nspr/pr/src/Makefile.in
+@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
+
+ $(TINC):
+ @$(MAKE_OBJDIR)
+- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+- @if test ! -z "$(SH_NOW)"; then \
+- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+- else \
+- true; \
+- fi
+- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+
+
+ $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
+--
+2.7.4
+
--- /dev/null
+From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001
+From: Antoine Tenart <antoine.tenart@free-electrons.com>
+Date: Mon, 23 Oct 2017 10:28:20 +0200
+Subject: [PATCH] Add ARC support
+
+[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc].
+
+Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ]
+---
+ pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++
+ pr/include/md/_linux.h | 2 ++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index fec8525378dc..5f4fa0eac783 100644
+--- a/nspr/pr/include/md/_linux.cfg
++++ b/nspr/pr/include/md/_linux.cfg
+@@ -1157,6 +1157,51 @@
+ #define PR_BYTES_PER_WORD_LOG2 3
+ #define PR_BYTES_PER_DWORD_LOG2 3
+
++#elif defined(__arc__)
++
++#define IS_LITTLE_ENDIAN 1
++#undef IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE 1
++#define PR_BYTES_PER_SHORT 2
++#define PR_BYTES_PER_INT 4
++#define PR_BYTES_PER_INT64 8
++#define PR_BYTES_PER_LONG 4
++#define PR_BYTES_PER_FLOAT 4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD 4
++#define PR_BYTES_PER_DWORD 8
++
++#define PR_BITS_PER_BYTE 8
++#define PR_BITS_PER_SHORT 16
++#define PR_BITS_PER_INT 32
++#define PR_BITS_PER_INT64 64
++#define PR_BITS_PER_LONG 32
++#define PR_BITS_PER_FLOAT 32
++#define PR_BITS_PER_DOUBLE 64
++#define PR_BITS_PER_WORD 32
++
++#define PR_BITS_PER_BYTE_LOG2 3
++#define PR_BITS_PER_SHORT_LOG2 4
++#define PR_BITS_PER_INT_LOG2 5
++#define PR_BITS_PER_INT64_LOG2 6
++#define PR_BITS_PER_LONG_LOG2 5
++#define PR_BITS_PER_FLOAT_LOG2 5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2 5
++
++#define PR_ALIGN_OF_SHORT 2
++#define PR_ALIGN_OF_INT 4
++#define PR_ALIGN_OF_LONG 4
++#define PR_ALIGN_OF_INT64 4
++#define PR_ALIGN_OF_FLOAT 4
++#define PR_ALIGN_OF_DOUBLE 4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD 4
++
++#define PR_BYTES_PER_WORD_LOG2 2
++#define PR_BYTES_PER_DWORD_LOG2 3
++
+ #else
+
+ #error "Unknown CPU architecture"
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index 8e04fad479a1..628b1217e9c8 100644
+--- a/nspr/pr/include/md/_linux.h
++++ b/nspr/pr/include/md/_linux.h
+@@ -63,6 +63,8 @@
+ #define _PR_SI_ARCHITECTURE "riscv32"
+ #elif defined(__riscv) && (__riscv_xlen == 64)
+ #define _PR_SI_ARCHITECTURE "riscv64"
++#elif defined(__arc__)
++#define _PR_SI_ARCHITECTURE "arc"
+ #else
+ #error "Unknown CPU architecture"
+ #endif
+--
+2.17.1
+
--- /dev/null
+--- a/nspr/config/config.mk 2017-10-31 13:13:22.692343122 +0200
++++ b/nspr/config/config.mk 2017-10-31 13:13:58.758016378 +0200
+@@ -126,6 +126,9 @@
+
+ ifeq ($(USE_IPV6),1)
+ DEFINES += -D_PR_INET6
++ifeq ($(MUSL),1)
++CFLAGS += -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE
++endif
+ endif
+
+ ifeq ($(MOZ_UNICODE),1)
+--- a/nspr/config/Makefile.in 2019-03-31 13:44:56.919871810 +0300
++++ b/nspr/config/Makefile.in 2019-03-31 13:45:21.560545948 +0300
+@@ -30,7 +30,7 @@
+
+ # This version hasn't been ported for us; the one in mozilla/config has
+ ifneq ($(OS_ARCH),OS2)
+-CSRCS += nsinstall.c
++#CSRCS += nsinstall.c
+
+ PLSRCS = nfspwd.pl
+ endif
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nss
+PKG_VERSION:=3.43
+PKG_RELEASE:=2
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+ https://download.cdn.mozilla.net/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src \
+ https://archive.mozilla.org/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src
+PKG_HASH:=f30bc1b7330887b75de9fec37dbc173001758dc43fb095ffbc45dac4093fe2ca
+
+PKG_BUILD_PARALLEL:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libnss
+ SECTION:=libs
+ SUBMENU:=SSL
+ CATEGORY:=Libraries
+ TITLE:=Mozilla's SSL and TLS implementation
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+ DEPENDS:=+libpthread +libsqlite3 +nspr
+endef
+
+define Package/nss-utils
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Utilities for Mozilla's SSL and TLS implementation
+ URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+ DEPENDS:=+libnss
+endef
+
+define Package/libnss/description
+ Network Security Services (NSS) is a set of libraries designed to support
+ cross-platform development of security-enabled client and server applications.
+ Applications built with NSS can support SSL v2 and v3, TLS, PKCS 5, PKCS 7,
+ PKCS 11, PKCS 12, S/MIME, X.509 v3 certificates, and other security standards.
+endef
+
+CONFIGURE_PATH = ./nss
+MAKE_PATH = ./nss
+
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+ export USE_64=1
+endif
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+export CROSS_COMPILE=1
+export BUILD_OPT=1
+export NATIVE_CC=$(HOSTCC)
+export NATIVE_FLAGS=$(HOST_CFLAGS)
+export NSDISTMODE=copy
+export NSS_ENABLE_WERROR=0
+export NSS_DISABLE_GTESTS=1
+export NSS_USE_SYSTEM_SQLITE=1
+export OS_TARGET=Linux
+export OS_ARCH=Linux
+export OS_TEST=$(ARCH)
+export CPU_ARCH=$(ARCH)
+export fpic=$(FPIC)
+export NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr
+export SEED_ONLY_DEV_URANDOM=1
+export OS_REL_CFLAGS=$(TARGET_CFLAGS)
+export NS_USE_GCC=1
+export FREEBL_NO_DEPEND=1
+#size optimisation, seems to not impact speed
+export NSS_DISABLE_DBM=1
+export NSS_PKIX_NO_LDAP=1
+export ALLOW_OPT_CODE_SIZE=1
+export OPT_CODE_SIZE=1
+
+#native compile nsinstall
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ USE_NATIVE=1 OS_REL_CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" CC="$(HOSTCC)" \
+ $(MAKE) -C $(PKG_BUILD_DIR)/nss/coreconf/nsinstall
+# $(if $(CONFIG_LIBC_USE_GLIBC),, \
+# $(SED) '/-DHAVE_SYS_CDEFS_H/d' $(PKG_BUILD_DIR)/nss/lib/dbm/config/config.mk)
+endef
+
+define Package/libnss/conffiles
+/etc/pki/nssdb
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) \
+ $(1)/usr/include/nss \
+ $(1)/usr/lib \
+ $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/dist/private/nss/*.h \
+ $(1)/usr/include/nss/
+ $(CP) $(PKG_BUILD_DIR)/dist/public/nss/*.h \
+ $(1)/usr/include/nss/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/*.so \
+ $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/nss/config/*.pc \
+ $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/nss-utils/install
+ $(INSTALL_DIR) \
+ $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/bin/certutil $(1)/usr/bin
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/bin/pk12util $(1)/usr/bin
+endef
+
+#for now pack only libreswan needed libs
+define Package/libnss/install
+ $(INSTALL_DIR) \
+ $(1)/usr/lib \
+ $(1)/etc/pki/nssdb \
+ $(1)/etc/ipsec.d
+
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libfreebl3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libnss3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libnssutil3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libsmime3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libsoftokn3.so $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libssl3.so $(1)/usr/lib/
+# Pprovide databases with a blank certificate
+ $(CP) ./files/blank-cert9.db $(1)/etc/pki/nssdb/cert9.db
+ $(CP) ./files/blank-key4.db $(1)/etc/pki/nssdb/key4.db
+ $(CP) ./files/system-pkcs11.txt $(1)/etc/pki/nssdb/pkcs11.txt
+ ln -s /etc/pki/nssdb/cert9.db $(1)/etc/ipsec.d/cert9.db
+ ln -s /etc/pki/nssdb/key4.db $(1)/etc/ipsec.d/key4.db
+ ln -s /etc/pki/nssdb/pkcs11.txt $(1)/etc/ipsec.d/pkcs11.txt
+endef
+
+$(eval $(call BuildPackage,nss-utils))
+$(eval $(call BuildPackage,libnss))
--- /dev/null
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
+
--- /dev/null
+Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date: 2016-12-27
+Initial Package Version: 3.12.4
+Upstream Status: Not applicable
+Origin: Self, rediffed for nss-3.28.
+Description: Adds auto-generated nss.pc and nss-config script, and
+ allows building without nspr in the source tree.
+ For 3.40.1, Requires: updated to nspr >= 4.20.
+
+diff -Naurp nss-3.28-orig/nss/Makefile nss-3.28/nss/Makefile
+--- nss-3.28-orig/nss/Makefile 2016-12-21 05:56:27.000000000 -0600
++++ nss-3.28/nss/Makefile 2016-12-26 22:24:52.695146032 -0600
+@@ -46,7 +46,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
+ # (7) Execute "local" rules. (OPTIONAL). #
+ #######################################################################
+
+-nss_build_all: build_nspr all latest
++nss_build_all: all latest
+
+ nss_clean_all: clobber_nspr clobber
+
+diff -Naurp nss-3.28-orig/nss/config/Makefile nss-3.28/nss/config/Makefile
+--- nss-3.28-orig/nss/config/Makefile 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/Makefile 2016-12-26 22:20:40.008205774 -0600
+@@ -0,0 +1,40 @@
++CORE_DEPTH = ..
++DEPTH = ..
++
++include $(CORE_DEPTH)/coreconf/config.mk
++
++NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
++PREFIX = /usr
++
++all: export libs
++
++export:
++ # Create the nss.pc file
++ mkdir -p $(DIST)/lib/pkgconfig
++ sed -e "s,@prefix@,$(PREFIX)," \
++ -e "s,@exec_prefix@,\$${prefix}," \
++ -e "s,@libdir@,\$${prefix}/lib," \
++ -e "s,@includedir@,\$${prefix}/include/nss," \
++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++ nss.pc.in > nss.pc
++ chmod 0644 nss.pc
++ ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
++
++ # Create the nss-config script
++ mkdir -p $(DIST)/bin
++ sed -e "s,@prefix@,$(PREFIX)," \
++ -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
++ -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++ -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++ nss-config.in > nss-config
++ chmod 0755 nss-config
++ ln -sf ../../../nss/config/nss-config $(DIST)/bin
++
++libs:
++
++dummy: all export libs
++
+diff -Naurp nss-3.28-orig/nss/config/nss-config.in nss-3.28/nss/config/nss-config.in
+--- nss-3.28-orig/nss/config/nss-config.in 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/nss-config.in 2016-12-26 22:20:40.008205774 -0600
+@@ -0,0 +1,153 @@
++#!/bin/sh
++
++prefix=@prefix@
++
++major_version=@NSS_MAJOR_VERSION@
++minor_version=@NSS_MINOR_VERSION@
++patch_version=@NSS_PATCH_VERSION@
++
++usage()
++{
++ cat <<EOF
++Usage: nss-config [OPTIONS] [LIBRARIES]
++Options:
++ [--prefix[=DIR]]
++ [--exec-prefix[=DIR]]
++ [--includedir[=DIR]]
++ [--libdir[=DIR]]
++ [--version]
++ [--libs]
++ [--cflags]
++Dynamic Libraries:
++ nss
++ nssutil
++ smime
++ ssl
++ softokn
++EOF
++ exit $1
++}
++
++if test $# -eq 0; then
++ usage 1 1>&2
++fi
++
++lib_nss=yes
++lib_nssutil=yes
++lib_smime=yes
++lib_ssl=yes
++lib_softokn=yes
++
++while test $# -gt 0; do
++ case "$1" in
++ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++ *) optarg= ;;
++ esac
++
++ case $1 in
++ --prefix=*)
++ prefix=$optarg
++ ;;
++ --prefix)
++ echo_prefix=yes
++ ;;
++ --exec-prefix=*)
++ exec_prefix=$optarg
++ ;;
++ --exec-prefix)
++ echo_exec_prefix=yes
++ ;;
++ --includedir=*)
++ includedir=$optarg
++ ;;
++ --includedir)
++ echo_includedir=yes
++ ;;
++ --libdir=*)
++ libdir=$optarg
++ ;;
++ --libdir)
++ echo_libdir=yes
++ ;;
++ --version)
++ echo ${major_version}.${minor_version}.${patch_version}
++ ;;
++ --cflags)
++ echo_cflags=yes
++ ;;
++ --libs)
++ echo_libs=yes
++ ;;
++ nss)
++ lib_nss=yes
++ ;;
++ nssutil)
++ lib_nssutil=yes
++ ;;
++ smime)
++ lib_smime=yes
++ ;;
++ ssl)
++ lib_ssl=yes
++ ;;
++ softokn)
++ lib_softokn=yes
++ ;;
++ *)
++ usage 1 1>&2
++ ;;
++ esac
++ shift
++done
++
++# Set variables that may be dependent upon other variables
++if test -z "$exec_prefix"; then
++ exec_prefix=`pkg-config --variable=exec_prefix nss`
++fi
++if test -z "$includedir"; then
++ includedir=`pkg-config --variable=includedir nss`
++fi
++if test -z "$libdir"; then
++ libdir=`pkg-config --variable=libdir nss`
++fi
++
++if test "$echo_prefix" = "yes"; then
++ echo $prefix
++fi
++
++if test "$echo_exec_prefix" = "yes"; then
++ echo $exec_prefix
++fi
++
++if test "$echo_includedir" = "yes"; then
++ echo $includedir
++fi
++
++if test "$echo_libdir" = "yes"; then
++ echo $libdir
++fi
++
++if test "$echo_cflags" = "yes"; then
++ echo -I$includedir
++fi
++
++if test "$echo_libs" = "yes"; then
++ libdirs="-L$libdir"
++ if test -n "$lib_nss"; then
++ libdirs="$libdirs -lnss${major_version}"
++ fi
++ if test -n "$lib_nssutil"; then
++ libdirs="$libdirs -lnssutil${major_version}"
++ fi
++ if test -n "$lib_smime"; then
++ libdirs="$libdirs -lsmime${major_version}"
++ fi
++ if test -n "$lib_ssl"; then
++ libdirs="$libdirs -lssl${major_version}"
++ fi
++ if test -n "$lib_softokn"; then
++ libdirs="$libdirs -lsoftokn${major_version}"
++ fi
++ echo $libdirs
++fi
++
+diff -Naurp nss-3.28-orig/nss/config/nss.pc.in nss-3.28/nss/config/nss.pc.in
+--- nss-3.28-orig/nss/config/nss.pc.in 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/nss.pc.in 2016-12-26 22:22:53.300694346 -0600
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: NSS
++Description: Network Security Services
++Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
++Requires: nspr >= 4.20
++Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
++Cflags: -I${includedir}
++
+diff -Naurp nss-3.28-orig/nss/manifest.mn nss-3.28/nss/manifest.mn
+--- nss-3.28-orig/nss/manifest.mn 2016-12-21 05:56:27.000000000 -0600
++++ nss-3.28/nss/manifest.mn 2016-12-26 22:24:12.278991843 -0600
+@@ -10,4 +10,4 @@ IMPORTS = nspr20/v4.8 \
+
+ RELEASE = nss
+
+-DIRS = coreconf lib cmd cpputil gtests
++DIRS = coreconf lib cmd cpputil gtests config
--- /dev/null
+--- a/nss/coreconf/arch.mk 2019-04-01 22:20:32.470080052 +0300
++++ b/nss/coreconf/arch.mk 2019-04-01 22:21:01.730987548 +0300
+@@ -20,13 +20,13 @@
+ # Macros for getting the OS architecture
+ #
+
+-OS_ARCH := $(subst /,_,$(shell uname -s))
++OS_ARCH ?= $(subst /,_,$(shell uname -s))
+
+ #
+ # Attempt to differentiate between sparc and x86 Solaris
+ #
+
+-OS_TEST := $(shell uname -m)
++OS_TEST ?= $(shell uname -m)
+ ifeq ($(OS_TEST),i86pc)
+ OS_RELEASE := $(shell uname -r)_$(OS_TEST)
+ else
--- /dev/null
+--- a/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:14.797053528 +0300
++++ b/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:26.156310432 +0300
+@@ -30,7 +30,7 @@
+ #define MAXNAMLEN FILENAME_MAX
+
+ #else
+-#include <param.h>
++#include <sys/param.h>
+ #endif
+ #endif
+
+--- a/nss/coreconf/rules.mk 2019-03-31 22:39:06.741609534 +0300
++++ b/nss/coreconf/rules.mk 2019-03-31 22:36:13.260356949 +0300
+@@ -261,7 +261,7 @@
+ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
+ $(AR) $(subst /,\\,$(OBJS))
+ else
+- $(AR) $(OBJS)
++ $(AR) rcs $@ $(OBJS)
+ endif
+ $(RANLIB) $@
+
+--- a/nss/coreconf/arch.mk 2019-03-31 23:38:34.374931416 +0300
++++ b/nss/coreconf/arch.mk 2019-03-31 23:38:44.667236102 +0300
+@@ -305,7 +305,7 @@
+ OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
+ endif
+ OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
+-OBJDIR_NAME = $(OBJDIR_NAME_BASE).OBJ
++OBJDIR_NAME = build_dir
+
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+--- a/nss/coreconf/Linux.mk 2019-04-01 10:08:59.129269177 +0300
++++ b/nss/coreconf/Linux.mk 2019-04-01 10:09:15.557782574 +0300
+@@ -139,6 +139,7 @@
+ DEFINES += -D_REENTRANT
+ endif
+
++ifndef USE_NATIVE
+ DSO_CFLAGS = -fPIC
+ DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+@@ -149,6 +150,7 @@
+ ZDEFS_FLAG = -Wl,-z,defs
+ DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
++endif
+
+ # On Maemo, we need to use the -rpath-link flag for even the standard system
+ # library directories.
+--- a/nss/coreconf/Linux.mk 2019-04-01 23:10:19.091912203 +0300
++++ b/nss/coreconf/Linux.mk 2019-04-06 14:07:13.499169075 +0300
+@@ -140,7 +140,7 @@
+ endif
+
+ ifndef USE_NATIVE
+-DSO_CFLAGS = -fPIC
++DSO_CFLAGS = $(fpic)
+ DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+ # incorrectly reports undefined references in the libraries we link with, so
+--- a/nss/coreconf/Linux.mk 2019-04-06 20:25:36.431663894 +0300
++++ b/nss/coreconf/Linux.mk 2019-04-06 20:26:23.397129525 +0300
+@@ -107,11 +107,6 @@
+ endif
+
+ ifdef BUILD_OPT
+-ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
+- OPTIMIZER = -Os
+-else
+- OPTIMIZER = -O2
+-endif
+ ifdef MOZ_DEBUG_SYMBOLS
+ ifdef MOZ_DEBUG_FLAGS
+ OPTIMIZER += $(MOZ_DEBUG_FLAGS)
+--- a/nss/coreconf/UNIX.mk 2019-04-06 20:34:24.284157646 +0300
++++ b/nss/coreconf/UNIX.mk 2019-04-06 20:34:34.760485327 +0300
+@@ -10,7 +10,6 @@
+ LDOPTS += -L$(SOURCE_LIB_DIR)
+
+ ifdef BUILD_OPT
+- OPTIMIZER += -O
+ DEFINES += -UDEBUG -DNDEBUG
+ else
+ OPTIMIZER += -g
PKG_NAME:=opencv
PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
PKG_SOURCE_URL:=http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(PKG_VERSION)/
--- /dev/null
+--- a/3rdparty/ippicv/downloader.cmake
++++ b/3rdparty/ippicv/downloader.cmake
+@@ -64,7 +64,7 @@ function(_icv_downloader)
+ if(DEFINED ENV{OPENCV_ICV_URL})
+ set(OPENCV_ICV_URL $ENV{OPENCV_ICV_URL})
+ else()
+- set(OPENCV_ICV_URL "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
++ set(OPENCV_ICV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
+ endif()
+ endif()
+
PKG_NAME:=openldap
PKG_VERSION:=2.4.47
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
PKG_CONFIG_DEPENDS := \
CONFIG_OPENLDAP_DEBUG \
+ CONFIG_OPENLDAP_CRYPT \
CONFIG_OPENLDAP_MONITOR \
CONFIG_OPENLDAP_DB47 \
CONFIG_OPENLDAP_ICU
help
Enable debugging information. This option must be enabled
for the loglevel directive to work.
+ config OPENLDAP_CRYPT
+ bool "Crypt(3) passwords support"
+ default n
+ help
+ With crypt(3) password storage scheme enabled, OpenLDAP can
+ receive and store SHA-256 and SHA-512 password hashes from
+ Samba AD-DC. If this option is disabled, synchronization of
+ passwords between Samba AD-DC (v4.5 and above) and OpenLDAP
+ requires use of cleartext passwords.
+ To enable crypt(3) password synchronization functionality:
+ 1. Re-include crypt(3) support in OpenWRT by enabling 'Include
+ crypt() support for SHA256, SHA512 and Blowfish ciphers' option
+ in "Advanced configuration options (for developers)" ->
+ "Toolchain Options".
+ 2. Provision AD-DC with 'password hash userPassword schemes'
+ option. For more information, see smb.conf manpage for details
+ on 'password hash userPassword schemes'.
+ 3. Use a script to synchronize passwords from AD-DC to
+ OpenLDAP. See samba-tool manpage for 'user syncpasswords'.
config OPENLDAP_MONITOR
bool "Enable monitor backend"
default n
--disable-relay
+ifdef CONFIG_OPENLDAP_CRYPT
+ CONFIGURE_ARGS+= --enable-crypt
+else
+ CONFIGURE_ARGS+= --disable-crypt
+endif
+
ifdef CONFIG_OPENLDAP_MONITOR
CONFIGURE_ARGS+= --enable-monitor
else
SECTION:=libs
CATEGORY:=Libraries
URL:=https://www.pcre.org/
+ DEPENDS:=$(CXX_DEPENDS)
endef
define Package/libpcre
define Package/libpcrecpp
$(call Package/libpcre/default)
TITLE:=C++ wrapper for Perl Compatible Regular Expression library
- DEPENDS:=+libpcre $(CXX_DEPENDS)
+ DEPENDS:=+libpcre
endef
TARGET_CFLAGS += $(FPIC)
--enable-unicode-properties \
--enable-pcre16 \
--with-match-limit-recursion=16000 \
+ --enable-cpp
-ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
- CONFIGURE_ARGS+= --enable-cpp
-else
- CONFIGURE_ARGS+= --disable-cpp
-endif
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)"
PKG_USE_MIPS16:=0
PKG_FIXUP:=autoreconf
PKG_MACRO_PATHS:=config
-PKG_BUILD_DEPENDS += readline/host postgresql/host
+PKG_BUILD_DEPENDS:=readline/host postgresql/host
PKG_INSTALL:=1
include $(INCLUDE_DIR)/host-build.mk
PKG_NAME:=libprotobuf-c
PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
--- /dev/null
+Index: protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
+===================================================================
+--- protobuf-c-1.3.1.orig/t/generated-code2/cxx-generate-packed-data.cc
++++ protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
+@@ -998,7 +998,7 @@ static void dump_test_packed_repeated_en
+ static void dump_test_unknown_fields (void)
+ {
+ EmptyMess mess;
+- const google::protobuf::Message::Reflection *reflection = mess.GetReflection();
++ const google::protobuf::Reflection *reflection = mess.GetReflection();
+ google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess);
+
+ #if GOOGLE_PROTOBUF_VERSION >= 2001000
include $(TOPDIR)/rules.mk
PKG_NAME:=protobuf
-PKG_VERSION:=3.5.1
+PKG_VERSION:=3.7.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
-PKG_HASH:=c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092
+PKG_HASH:=97f6cdaa0724d5a8cd3375d5f5cf4bd253d5ad5291154f533ed0d94a9d501ef3
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=protobuf/host
-PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CATEGORY:=Libraries
TITLE:=A structured data encoding library
URL:=https://github.com/google/protobuf
- DEPENDS:=+zlib +libpthread +libstdcpp
+ DEPENDS:=+zlib +libpthread +libatomic +libstdcpp
MAINTAINER:=Ken Keys <kkeys@caida.org>
endef
PKG_NAME:=tiff
PKG_VERSION:=4.0.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
--- /dev/null
+From 802d3cbf3043be5dce5317e140ccb1c17a6a2d39 Mon Sep 17 00:00:00 2001
+From: Thomas Bernard <miniupnp@free.fr>
+Date: Tue, 29 Jan 2019 11:21:47 +0100
+Subject: [PATCH] TIFFWriteDirectoryTagTransferfunction() : fix NULL
+ dereferencing
+
+http://bugzilla.maptools.org/show_bug.cgi?id=2833
+
+we must check the pointer is not NULL before memcmp() the memory
+---
+ libtiff/tif_dirwrite.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
+index c15a28db..ef30c869 100644
+--- a/libtiff/tif_dirwrite.c
++++ b/libtiff/tif_dirwrite.c
+@@ -1893,12 +1893,14 @@ TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir
+ n=3;
+ if (n==3)
+ {
+- if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16)))
++ if (tif->tif_dir.td_transferfunction[2] == NULL ||
++ !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16)))
+ n=2;
+ }
+ if (n==2)
+ {
+- if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16)))
++ if (tif->tif_dir.td_transferfunction[1] == NULL ||
++ !_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16)))
+ n=1;
+ }
+ if (n==0)
+--
+2.18.1
+
--- /dev/null
+From 0c74a9f49b8d7a36b17b54a7428b3526d20f88a8 Mon Sep 17 00:00:00 2001
+From: Scott Gayou <github.scott@gmail.com>
+Date: Wed, 23 Jan 2019 15:03:53 -0500
+Subject: [PATCH] Fix for simple memory leak that was assigned CVE-2019-6128.
+
+pal2rgb failed to free memory on a few errors. This was reported
+here: http://bugzilla.maptools.org/show_bug.cgi?id=2836.
+---
+ tools/pal2rgb.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
+index 01d8502e..9492f1cf 100644
+--- a/tools/pal2rgb.c
++++ b/tools/pal2rgb.c
+@@ -118,12 +118,14 @@ main(int argc, char* argv[])
+ shortv != PHOTOMETRIC_PALETTE) {
+ fprintf(stderr, "%s: Expecting a palette image.\n",
+ argv[optind]);
++ (void) TIFFClose(in);
+ return (-1);
+ }
+ if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
+ fprintf(stderr,
+ "%s: No colormap (not a valid palette image).\n",
+ argv[optind]);
++ (void) TIFFClose(in);
+ return (-1);
+ }
+ bitspersample = 0;
+@@ -131,11 +133,14 @@ main(int argc, char* argv[])
+ if (bitspersample != 8) {
+ fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n",
+ argv[optind]);
++ (void) TIFFClose(in);
+ return (-1);
+ }
+ out = TIFFOpen(argv[optind+1], "w");
+- if (out == NULL)
++ if (out == NULL) {
++ (void) TIFFClose(in);
+ return (-2);
++ }
+ cpTags(in, out);
+ TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth);
+ TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
+--
+2.18.1
+
PKG_NAME:=vips
PKG_VERSION:=8.7.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/libvips/libvips/releases/download/v$(PKG_VERSION)
--- /dev/null
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Reviewed-By: Laszlo Boszormenyi (GCS) <gcs@debian.org>
+Last-Update: 2018-07-24
+
+--- vips-8.6.4.orig/configure.ac
++++ vips-8.6.4/configure.ac
+@@ -26,7 +26,11 @@ VIPS_MAJOR_VERSION=vips_major_version()
+ VIPS_MINOR_VERSION=vips_minor_version()
+ VIPS_MICRO_VERSION=vips_micro_version()
+ VIPS_VERSION=vips_version()
+-VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
++if test "x$SOURCE_DATE_EPOCH" = "x"; then
++ VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
++else
++ VIPS_VERSION_STRING=$VIPS_VERSION-`LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH"`
++fi
+
+ # libtool library versioning ... not user-visible (except as part of the
+ # library file name) and does not correspond to major/minor/micro above
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yubico-pam
+PKG_VERSION:=2.26
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pam_yubico-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-pam/Releases
+PKG_HASH:=2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_BUILD_DEPENDS:=ykclient ykpers libyubikey libpam curl
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pam_yubico-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/yubico-pam
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The Yuibco PAM module
+ URL:=https://developers.yubico.com/yubico-pam/
+ DEPENDS:=+ykclient +ykpers +libyubikey +libpam +curl
+endef
+
+define Package/yubico-pam/description
+ The Yubico PAM module provides an easy way to integrate the YubiKey
+ into your existing user authentication infrastructure.
+endef
+
+CONFIGURE_VARS += YKPERS_CFLAGS=-I$(STAGING_DIR)/usr/include \
+ YKPERS_LIBS=-L$(STAGING_DIR)/usr/lib \
+ LDFLAGS="-Wl,-rpath-link,$(STAGING_DIR)/usr/lib \
+ -L$(STAGING_DIR)/usr/lib"
+
+CONFIGURE_ARGS += --without-ldap \
+ --enable-shared \
+ --disable-static \
+
+define Build/Compile
+ $(call Build/Compile/Default, \
+ LDFLAGS="-L$(STAGING_DIR)/usr/lib -lykpers-1")
+endef
+
+define Package/yubico-pam/install
+ $(INSTALL_DIR) $(1)/lib/security
+ $(CP) $(PKG_BUILD_DIR)/.libs/pam_yubico.so* $(1)/lib/security
+endef
+
+$(eval $(call BuildPackage,yubico-pam,+ykclient,+ykpers,+libyubikey))
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot
-PKG_VERSION:=2.3.4.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.3.5.1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=b8873e2ce5c33e58963bb7a8d2ff8427c09dbfdd63e13a0b0f4502864043aa07
+PKG_HASH:=d78f9d479e3b2caa808160f86bfec1c9c7b46344d8b14b88f5fa9bbbf8c7c33f
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>
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
# iconv is needed when compiling with MySQL support. iconv will also be used by
lib_cv_va_copy=yes \
lib_cv_va_copy=yes \
lib_cv___va_copy=yes \
- lib_cv_va_val_copy=yes
+ lib_cv_va_val_copy=yes \
+ ac_cv_prog_KRB5CONFIG="krb5-config"
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
--- a/src/lib-ssl-iostream/dovecot-openssl-common.c
+++ b/src/lib-ssl-iostream/dovecot-openssl-common.c
-@@ -79,6 +79,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -63,9 +63,11 @@ void dovecot_openssl_common_global_ref(void)
+ /*i_warning("CRYPTO_set_mem_functions() was called too late");*/
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
+ SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
++#endif
+ }
+
+ bool dovecot_openssl_common_global_unref(void)
+@@ -79,6 +81,7 @@ bool dovecot_openssl_common_global_unref(void)
ENGINE_finish(dovecot_openssl_engine);
dovecot_openssl_engine = NULL;
}
/* OBJ_cleanup() is called automatically by EVP_cleanup() in
newer versions. Doesn't hurt to call it anyway. */
OBJ_cleanup();
-@@ -100,6 +101,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -100,6 +103,7 @@ bool dovecot_openssl_common_global_unref(void)
ERR_free_strings();
#ifdef HAVE_OPENSSL_CLEANUP
OPENSSL_cleanup();
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
+@@ -510,8 +513,10 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx,
+ int nid;
+ const char *curve_name;
+ #endif
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (SSL_CTX_need_tmp_RSA(ssl_ctx) != 0)
+ SSL_CTX_set_tmp_rsa_callback(ssl_ctx, ssl_gen_rsa_key);
++#endif
+ if (set->dh == NULL || *set->dh == '\0')
+ SSL_CTX_set_tmp_dh_callback(ssl_ctx, ssl_tmp_dh_callback);
+ #ifdef HAVE_ECDH
#ifdef HAVE_SSL_NEW_MEM_FUNCS
static void *dovecot_openssl_malloc(size_t size, const char *u0 ATTR_UNUSED, int u1 ATTR_UNUSED)
-@@ -75,10 +78,12 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -77,10 +80,12 @@ bool dovecot_openssl_common_global_unref(void)
if (--openssl_init_refcount > 0)
return TRUE;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
/* OBJ_cleanup() is called automatically by EVP_cleanup() in
newer versions. Doesn't hurt to call it anyway. */
-@@ -86,7 +91,9 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -88,7 +93,9 @@ bool dovecot_openssl_common_global_unref(void)
#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
SSL_COMP_free_compression_methods();
#endif
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
#ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT
-@@ -109,6 +116,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -111,6 +118,7 @@ bool dovecot_openssl_common_global_unref(void)
int dovecot_openssl_common_global_set_engine(const char *engine,
const char **error_r)
{
if (dovecot_openssl_engine != NULL)
return 1;
-@@ -130,5 +138,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
+@@ -132,5 +140,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
dovecot_openssl_engine = NULL;
return -1;
}
include $(TOPDIR)/rules.mk
PKG_NAME:=fdm
-PKG_VERSION:=1.9
-PKG_RELEASE:=4
-PKG_LICENSE:=BSD-2-Clause
+PKG_VERSION:=2.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/nicm/fdm/releases/download/$(PKG_VERSION)
-PKG_HASH:=16416c38a9a7e32d187220cc5ae61a51463d5e4e47419c5c513f422523d39914
+PKG_HASH:=06b28cb6b792570bc61d7e29b13d2af46b92fea77e058b2b17e11e8f7ed0cea4
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+PKG_LICENSE:=BSD-2-Clause
+PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CATEGORY:=Mail
TITLE:=fetch mail and deliver
URL:=https://github.com/nicm/fdm
- MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
MENU:=1
DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre
USERID:=_fdm=99:_fdm=99
endef
ifdef CONFIG_FDM_WITH_PCRE
- EXTRA_CFLAGS := -DPCRE
- EXTRA_LDFLAGS += -lpcre
+ CONFIGURE_ARGS += --enable-pcre
endif
-MAKE_FLAGS += \
- PREFIX="/usr" \
- $(if $(CONFIG_FDM_WITH_PCRE),PCRE=1)
-
define Package/fdm/config
source "$(SOURCE)/Config.in"
endef
+++ /dev/null
-From eb7461e4ceab14020b3a129d826e4ee86f9da8c6 Mon Sep 17 00:00:00 2001
-From: Nicholas Marriott <nicholas.marriott@gmail.com>
-Date: Tue, 26 Jun 2018 12:19:25 +0100
-Subject: [PATCH] Compat fixes from Rosen Penev.
-
----
- Makefile.am | 6 +
- compat/base64.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++++
- fdm.h | 18 +++
- 3 files changed, 343 insertions(+), 2 deletions(-)
- create mode 100644 compat/base64.c
-
-diff --git a/Makefile.am b/Makefile.am
-index a4ebbf3..fb25d33 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -110,6 +110,9 @@ dist_fdm_SOURCES = \
- lex.c
-
- nodist_fdm_SOURCES =
-+if NO_B64_NTOP
-+nodist_fdm_SOURCES += compat/base64.c
-+endif
- if NO_STRLCAT
- nodist_fdm_SOURCES += compat/strlcat.c
- endif
-diff --git a/compat/base64.c b/compat/base64.c
-new file mode 100644
-index 0000000..4e44d6a
---- /dev/null
-+++ b/compat/base64.c
-@@ -0,0 +1,317 @@
-+/* $OpenBSD: base64.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
-+
-+/*
-+ * Copyright (c) 1996 by Internet Software Consortium.
-+ *
-+ * Permission to use, copy, modify, and 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
-+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
-+ * CONSORTIUM 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.
-+ */
-+
-+/*
-+ * Portions Copyright (c) 1995 by International Business Machines, Inc.
-+ *
-+ * International Business Machines, Inc. (hereinafter called IBM) grants
-+ * permission under its copyrights to use, copy, modify, and distribute this
-+ * Software with or without fee, provided that the above copyright notice and
-+ * all paragraphs of this notice appear in all copies, and that the name of IBM
-+ * not be used in connection with the marketing of any product incorporating
-+ * the Software or modifications thereof, without specific, written prior
-+ * permission.
-+ *
-+ * To the extent it has a right to do so, IBM grants an immunity from suit
-+ * under its patents, if any, for the use, sale or manufacture of products to
-+ * the extent that such products are used for performing Domain Name System
-+ * dynamic updates in TCP/IP networks by means of the Software. No immunity is
-+ * granted for any product per se or for any other function of any product.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-+ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
-+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
-+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
-+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
-+ */
-+
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <arpa/nameser.h>
-+
-+#include <ctype.h>
-+#include <resolv.h>
-+#include <stdio.h>
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include "fdm.h"
-+
-+static const char Base64[] =
-+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-+static const char Pad64 = '=';
-+
-+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
-+ The following encoding technique is taken from RFC 1521 by Borenstein
-+ and Freed. It is reproduced here in a slightly edited form for
-+ convenience.
-+
-+ A 65-character subset of US-ASCII is used, enabling 6 bits to be
-+ represented per printable character. (The extra 65th character, "=",
-+ is used to signify a special processing function.)
-+
-+ The encoding process represents 24-bit groups of input bits as output
-+ strings of 4 encoded characters. Proceeding from left to right, a
-+ 24-bit input group is formed by concatenating 3 8-bit input groups.
-+ These 24 bits are then treated as 4 concatenated 6-bit groups, each
-+ of which is translated into a single digit in the base64 alphabet.
-+
-+ Each 6-bit group is used as an index into an array of 64 printable
-+ characters. The character referenced by the index is placed in the
-+ output string.
-+
-+ Table 1: The Base64 Alphabet
-+
-+ Value Encoding Value Encoding Value Encoding Value Encoding
-+ 0 A 17 R 34 i 51 z
-+ 1 B 18 S 35 j 52 0
-+ 2 C 19 T 36 k 53 1
-+ 3 D 20 U 37 l 54 2
-+ 4 E 21 V 38 m 55 3
-+ 5 F 22 W 39 n 56 4
-+ 6 G 23 X 40 o 57 5
-+ 7 H 24 Y 41 p 58 6
-+ 8 I 25 Z 42 q 59 7
-+ 9 J 26 a 43 r 60 8
-+ 10 K 27 b 44 s 61 9
-+ 11 L 28 c 45 t 62 +
-+ 12 M 29 d 46 u 63 /
-+ 13 N 30 e 47 v
-+ 14 O 31 f 48 w (pad) =
-+ 15 P 32 g 49 x
-+ 16 Q 33 h 50 y
-+
-+ Special processing is performed if fewer than 24 bits are available
-+ at the end of the data being encoded. A full encoding quantum is
-+ always completed at the end of a quantity. When fewer than 24 input
-+ bits are available in an input group, zero bits are added (on the
-+ right) to form an integral number of 6-bit groups. Padding at the
-+ end of the data is performed using the '=' character.
-+
-+ Since all base64 input is an integral number of octets, only the
-+ -------------------------------------------------
-+ following cases can arise:
-+
-+ (1) the final quantum of encoding input is an integral
-+ multiple of 24 bits; here, the final unit of encoded
-+ output will be an integral multiple of 4 characters
-+ with no "=" padding,
-+ (2) the final quantum of encoding input is exactly 8 bits;
-+ here, the final unit of encoded output will be two
-+ characters followed by two "=" padding characters, or
-+ (3) the final quantum of encoding input is exactly 16 bits;
-+ here, the final unit of encoded output will be three
-+ characters followed by one "=" padding character.
-+ */
-+
-+int
-+b64_ntop(src, srclength, target, targsize)
-+ u_char const *src;
-+ size_t srclength;
-+ char *target;
-+ size_t targsize;
-+{
-+ size_t datalength = 0;
-+ u_char input[3];
-+ u_char output[4];
-+ int i;
-+
-+ while (2 < srclength) {
-+ input[0] = *src++;
-+ input[1] = *src++;
-+ input[2] = *src++;
-+ srclength -= 3;
-+
-+ output[0] = input[0] >> 2;
-+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
-+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-+ output[3] = input[2] & 0x3f;
-+
-+ if (datalength + 4 > targsize)
-+ return (-1);
-+ target[datalength++] = Base64[output[0]];
-+ target[datalength++] = Base64[output[1]];
-+ target[datalength++] = Base64[output[2]];
-+ target[datalength++] = Base64[output[3]];
-+ }
-+
-+ /* Now we worry about padding. */
-+ if (0 != srclength) {
-+ /* Get what's left. */
-+ input[0] = input[1] = input[2] = '\0';
-+ for (i = 0; i < srclength; i++)
-+ input[i] = *src++;
-+
-+ output[0] = input[0] >> 2;
-+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
-+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-+
-+ if (datalength + 4 > targsize)
-+ return (-1);
-+ target[datalength++] = Base64[output[0]];
-+ target[datalength++] = Base64[output[1]];
-+ if (srclength == 1)
-+ target[datalength++] = Pad64;
-+ else
-+ target[datalength++] = Base64[output[2]];
-+ target[datalength++] = Pad64;
-+ }
-+ if (datalength >= targsize)
-+ return (-1);
-+ target[datalength] = '\0'; /* Returned value doesn't count \0. */
-+ return (datalength);
-+}
-+
-+/* skips all whitespace anywhere.
-+ converts characters, four at a time, starting at (or after)
-+ src from base - 64 numbers into three 8 bit bytes in the target area.
-+ it returns the number of data bytes stored at the target, or -1 on error.
-+ */
-+
-+int
-+b64_pton(src, target, targsize)
-+ char const *src;
-+ u_char *target;
-+ size_t targsize;
-+{
-+ int tarindex, state, ch;
-+ u_char nextbyte;
-+ char *pos;
-+
-+ state = 0;
-+ tarindex = 0;
-+
-+ while ((ch = (unsigned char)*src++) != '\0') {
-+ if (isspace(ch)) /* Skip whitespace anywhere. */
-+ continue;
-+
-+ if (ch == Pad64)
-+ break;
-+
-+ pos = strchr(Base64, ch);
-+ if (pos == 0) /* A non-base64 character. */
-+ return (-1);
-+
-+ switch (state) {
-+ case 0:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] = (pos - Base64) << 2;
-+ }
-+ state = 1;
-+ break;
-+ case 1:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] |= (pos - Base64) >> 4;
-+ nextbyte = ((pos - Base64) & 0x0f) << 4;
-+ if (tarindex + 1 < targsize)
-+ target[tarindex+1] = nextbyte;
-+ else if (nextbyte)
-+ return (-1);
-+ }
-+ tarindex++;
-+ state = 2;
-+ break;
-+ case 2:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] |= (pos - Base64) >> 2;
-+ nextbyte = ((pos - Base64) & 0x03) << 6;
-+ if (tarindex + 1 < targsize)
-+ target[tarindex+1] = nextbyte;
-+ else if (nextbyte)
-+ return (-1);
-+ }
-+ tarindex++;
-+ state = 3;
-+ break;
-+ case 3:
-+ if (target) {
-+ if (tarindex >= targsize)
-+ return (-1);
-+ target[tarindex] |= (pos - Base64);
-+ }
-+ tarindex++;
-+ state = 0;
-+ break;
-+ }
-+ }
-+
-+ /*
-+ * We are done decoding Base-64 chars. Let's see if we ended
-+ * on a byte boundary, and/or with erroneous trailing characters.
-+ */
-+
-+ if (ch == Pad64) { /* We got a pad char. */
-+ ch = (unsigned char)*src++; /* Skip it, get next. */
-+ switch (state) {
-+ case 0: /* Invalid = in first position */
-+ case 1: /* Invalid = in second position */
-+ return (-1);
-+
-+ case 2: /* Valid, means one byte of info */
-+ /* Skip any number of spaces. */
-+ for (; ch != '\0'; ch = (unsigned char)*src++)
-+ if (!isspace(ch))
-+ break;
-+ /* Make sure there is another trailing = sign. */
-+ if (ch != Pad64)
-+ return (-1);
-+ ch = (unsigned char)*src++; /* Skip the = */
-+ /* Fall through to "single trailing =" case. */
-+ /* FALLTHROUGH */
-+
-+ case 3: /* Valid, means two bytes of info */
-+ /*
-+ * We know this char is an =. Is there anything but
-+ * whitespace after it?
-+ */
-+ for (; ch != '\0'; ch = (unsigned char)*src++)
-+ if (!isspace(ch))
-+ return (-1);
-+
-+ /*
-+ * Now make sure for cases 2 and 3 that the "extra"
-+ * bits that slopped past the last full byte were
-+ * zeros. If we don't check them, they become a
-+ * subliminal channel.
-+ */
-+ if (target && tarindex < targsize &&
-+ target[tarindex] != 0)
-+ return (-1);
-+ }
-+ } else {
-+ /*
-+ * We ended by seeing the end of the string. Make sure we
-+ * have no partial bytes lying around.
-+ */
-+ if (state != 0)
-+ return (-1);
-+ }
-+
-+ return (tarindex);
-+}
-diff --git a/fdm.h b/fdm.h
-index 5de799c..abc52e0 100644
---- a/fdm.h
-+++ b/fdm.h
-@@ -84,6 +84,18 @@ extern char *__progname;
- #define INFTIM -1
- #endif
-
-+#ifndef WAIT_ANY
-+#define WAIT_ANY -1
-+#endif
-+
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
-+#ifndef ACCESSPERMS
-+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
-+#endif
-+
- #ifndef __dead
- #define __dead __attribute__ ((__noreturn__))
- #endif
-@@ -707,6 +719,12 @@ size_t strlcpy(char *, const char *, size_t);
- size_t strlcat(char *, const char *, size_t);
- #endif
-
-+#ifndef HAVE_B64_NTOP
-+/* base64.c */
-+int b64_ntop(src, srclength, target, targsize);
-+int b64_pton(src, target, targsize);
-+#endif
-+
- /* shm.c */
- char *shm_path(struct shm *);
- void *shm_create(struct shm *, size_t);
---
-2.17.1
-
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -123,6 +123,3 @@ endif
+ if NO_STRTONUM
+ nodist_fdm_SOURCES += compat/strtonum.c
+ endif
+-if NO_B64_NTOP
+-nodist_fdm_SOURCES += compat/base64.c
+-endif
-From f6c656c5c0368b2fb4284af0484c3bedfc7ae42c Mon Sep 17 00:00:00 2001
+From 3aa079c4885d89257c5033b4992011511b603150 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Tue, 26 Jun 2018 14:14:34 -0700
Subject: [PATCH] Fix compile with OpenSSL 1.1.0
OpenSSL 1.1.0 deprecared SSL_library_init and SSL_load_error_strings.
They're part of OPENSSL_init_ssl now.
---
- fdm.c | 5 +++++
- 1 file changed, 5 insertions(+)
+ fdm.c | 2 ++
+ 1 file changed, 2 insertions(+)
diff --git a/fdm.c b/fdm.c
-index cdf8383..9355b91 100644
+index cdf8383..6721bbd 100644
--- a/fdm.c
+++ b/fdm.c
-@@ -717,8 +717,13 @@ retry:
+@@ -717,8 +717,10 @@ retry:
}
conf.lock_file = lock;
-+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
SSL_load_error_strings();
-+#else
-+ OPENSSL_init_ssl(0, NULL);
+#endif
/* Filter account list. */
+++ /dev/null
-From 070cee8d1efba1ca260777a204fba7cdfe676ca5 Mon Sep 17 00:00:00 2001
-From: Nicholas Marriott <nicholas.marriott@gmail.com>
-Date: Tue, 17 Jan 2017 23:14:03 +0000
-Subject: [PATCH] Look for OPENSSL_init_ssl, from Tomasz Miasko.
-
----
- configure.ac | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5793c2d..161040c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -93,11 +93,16 @@ if test "x$found_libcrypto" = xno; then
- AC_MSG_ERROR("libcrypto not found")
- fi
- AC_SEARCH_LIBS(
-- SSL_library_init,
-+ OPENSSL_init_ssl,
- [ssl],
- found_libssl=yes,
- found_libssl=no
- )
-+AC_SEARCH_LIBS(
-+ SSL_library_init,
-+ [ssl],
-+ found_libssl=yes
-+)
- if test "x$found_libssl" = xno; then
- AC_MSG_ERROR("libssl not found")
- fi
include $(TOPDIR)/rules.mk
PKG_NAME:=mutt
-PKG_VERSION:=1.11.2
+PKG_VERSION:=1.11.4
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
https://bitbucket.org/mutt/mutt/downloads/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=da5cd4c39f228914d3933d8cf3a017c8271fdd9b9d81c6e4fc42ad22e1a28723
+PKG_HASH:=b651357ea6c8762178080493991c77ecb111d916d171d422500257ab48be2801
PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
PKG_LICENSE:=GPL-2.0+
include $(TOPDIR)/rules.mk
PKG_NAME:=dovecot-pigeonhole
-PKG_VERSION_PLUGIN:=0.5.4
+PKG_VERSION_PLUGIN:=0.5.5
PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
-PKG_RELEASE:=4
+PKG_RELEASE:=1
DOVECOT_VERSION:=2.3
PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz
PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION)
-PKG_HASH:=547999e67a001abc5e654c7e35653d3fe057fa9a47a24257e39a79c41ef08516
+PKG_HASH:=cbaa106e1c2b23824420efdd6a9f8572c64c8dccf75a3101a899b6ddb25149a5
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=COPYING COPYING.LGPL
include $(TOPDIR)/rules.mk
PKG_NAME:=postfix
-PKG_RELEASE:=3
-PKG_VERSION:=3.3.2
+PKG_RELEASE:=1
+PKG_VERSION:=3.4.4
PKG_SOURCE_URL:= \
https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
- ftp://ftp.porcupine.org/mirrors/postfix-release/official/
+ http://ftp.porcupine.org/mirrors/postfix-release/official/
-PKG_HASH:=3c93f31eee49a58e592c31e62a058701cadde11e8e066ea441da19fddad7b35b
+PKG_HASH:=27f2ab631a966a40e002aedc6db9281e5970295fa5fd96b29066e457a4601e34
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
PKG_LICENSE:=IPL-1.0
-diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c
---- postfix-2.8.1/src/smtpd/smtpd_check.c 2011-01-04 22:03:50.000000000 +0300
-+++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c 2011-03-06 19:35:39.000000000 +0300
-@@ -5322,7 +5322,7 @@ char *smtpd_check_queue(SMTPD_STATE *s
+--- a/src/smtpd/smtpd_check.c
++++ b/src/smtpd/smtpd_check.c
+@@ -5325,7 +5325,7 @@ char *smtpd_check_queue(SMTPD_STATE *state)
*/
#define BLOCKS(x) ((x) / fsbuf.block_size)
+++ /dev/null
---- a/src/posttls-finger/posttls-finger.c
-+++ b/src/posttls-finger/posttls-finger.c
-@@ -374,7 +374,9 @@
- #include <tls.h>
-
- #ifdef USE_TLS
-+#ifndef OPENSSL_NO_ENGINE
- #include <openssl/engine.h>
-+#endif
- #endif
-
- /*
-@@ -1524,7 +1526,9 @@ static void ssl_cleanup(void)
- #else
- ERR_remove_state(0); /* Deprecated with OpenSSL 1.0.0 */
- #endif
-+#ifndef OPENSSL_NO_ENGINE
- ENGINE_cleanup();
-+#endif
- CONF_modules_unload(1);
- ERR_free_strings();
- EVP_cleanup();
-diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install
---- postfix-2.10.2/conf/post-install 2013-06-13 18:07:46.000000000 +0400
-+++ postfix-2.10.2_patched/conf/post-install 2013-11-19 21:17:49.572820573 +0400
-@@ -366,10 +366,10 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -366,10 +366,10 @@ test -f $config_directory/main.cf && {
# Sanity checks
case $setgid_group in
no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-@@ -377,7 +377,7 @@
+@@ -377,7 +377,7 @@ case $setgid_group in
esac
for path in "$daemon_directory" "$command_directory" "$queue_directory" \
"$meta_directory"
do
case "$path" in
-@@ -386,7 +386,7 @@
+@@ -386,7 +386,7 @@ do
esac
done
do
case "$path" in
/*) ;;
-diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
---- postfix-2.10.2/postfix-install 2012-05-22 23:40:29.000000000 +0400
-+++ postfix-2.10.2_patched/postfix-install 2013-11-19 21:12:20.694160734 +0400
-@@ -563,13 +563,13 @@
+--- a/postfix-install
++++ b/postfix-install
+@@ -563,13 +563,13 @@ case "$setgid_group" in
exit 1;;
esac
for path in "$html_directory" "$readme_directory" "$shlib_directory"
do
-@@ -582,7 +582,7 @@
+@@ -582,7 +582,7 @@ do
done
for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \
"$meta_directory"
do
case "$path" in
-@@ -789,8 +789,8 @@
+@@ -789,8 +789,8 @@ do
compare_or_replace $mode "$owner" "$group" html/$file \
$HTML_DIRECTORY/$file || exit 1;;
'$manpage_directory')
---- a/src/util/dict_db.c 2017-07-16 16:56:00.819659962 +0300
-+++ b/src/util/dict_db.c 2017-07-16 16:58:31.011401358 +0300
-@@ -740,8 +740,8 @@
+--- a/src/util/dict_db.c
++++ b/src/util/dict_db.c
+@@ -750,8 +750,8 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
msg_fatal("create DB database: %m");
if (db == 0)
msg_panic("db_create null result");
-diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h
---- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400
-+++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400
-@@ -759,9 +759,8 @@
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -760,9 +760,8 @@ extern int initgroups(const char *, int);
#define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
#define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */
#define HAS_FSYNC
---- a/makedefs 2016-01-28 12:30:14.444082390 -0500
-+++ b/makedefs 2016-01-28 13:44:02.092006512 -0500
-@@ -213,7 +213,7 @@ error() {
+--- a/makedefs
++++ b/makedefs
+@@ -215,7 +215,7 @@ error() {
case $# in
# Officially supported usage.
RELEASE=`(uname -r) 2>/dev/null`
# No ${x%%y} support in Solaris 11 /bin/sh
RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
-@@ -227,6 +227,15 @@ case $# in
+@@ -229,6 +229,15 @@ case $# in
esac
case "$SYSTEM.$RELEASE" in
--- a/src/posttls-finger/posttls-finger.c
+++ b/src/posttls-finger/posttls-finger.c
-@@ -318,6 +318,7 @@
+@@ -342,6 +342,7 @@
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install
---- postfix-2.11.1/postfix-install 2014-10-05 20:43:58.598876904 +0400
-+++ postfix-2.11.1.patched/postfix-install 2014-10-05 20:47:36.076700082 +0400
-@@ -861,23 +861,23 @@
+--- a/postfix-install
++++ b/postfix-install
+@@ -861,23 +861,23 @@ do
esac
done
-diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf
---- postfix-2.11.1/conf/main.cf 2013-12-24 18:57:25.000000000 +0400
-+++ postfix-2.11.1.patched/conf/main.cf 2014-10-05 21:35:53.427534410 +0400
-@@ -40,43 +40,8 @@
+--- a/conf/main.cf
++++ b/conf/main.cf
+@@ -40,43 +40,8 @@ compatibility_level = 2
#
#soft_bounce = no
# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
-@@ -632,45 +597,4 @@
+@@ -632,45 +597,4 @@ debugger_command =
# -dmS $process_name gdb $daemon_directory/$process_name
# $process_id & sleep 1
-diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install
---- postfix-2.11.1/conf/post-install 2014-10-05 20:43:58.597876946 +0400
-+++ postfix-2.11.1.patched/conf/post-install 2014-10-11 16:28:01.258874097 +0400
-@@ -326,7 +326,7 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -326,7 +326,7 @@ fake_fmt() {
case `uname -s` in
HP-UX*) FMT=cat;;
SunOS*) FMT=fake_fmt;;
-diff -Naur a/conf/post-install b/conf/post-install
---- a/conf/post-install 2015-12-28 00:00:45.000000000 +0000
-+++ b/conf/post-install 2017-08-01 22:42:30.476896711 +0000
-@@ -566,15 +566,16 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -566,15 +566,16 @@ test -n "$create" && {
then
set_permission=1
fi
include $(TOPDIR)/rules.mk
PKG_NAME:=crtmpserver
-PKG_REV:=b6fdcdb953d1e99c48a0c37a8c80f2cad2db443b
-PKG_VERSION:=2012-07-18+git-$(PKG_REV)
-PKG_RELEASE:=4
+PKG_SOURCE_DATE:=2015-10-04
+PKG_SOURCE_VERSION:=b866fffca37c3b967a8878499cd2b91aa2587f34
+PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/j0sh/crtmpserver/tar.gz/$(PKG_REV)?
-PKG_HASH:=e210eeb99d39334e7beb0a1be27dcf23d1f851383f87cf63d7fb98209ef96cee
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/shiretu/crtmpserver/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=3744bef060129fda6f7902eb64f566b0d5049864dc542b2882c550b083ef82aa
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
-include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/crtmpserver
SECTION:=multimedia
CATEGORY:=Multimedia
- DEPENDS:=$(CXX_DEPENDS) +libopenssl +liblua
+ DEPENDS:=+libstdcpp +libopenssl +liblua
TITLE:=C++ RTMP Server
endef
+++ /dev/null
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -72,7 +72,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
-
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
-
+++ /dev/null
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -31,8 +31,8 @@ OPTIMIZATIONS = -O3
- COMPILE_FLAGS = $(FPIC) $(OPTIMIZATIONS) $(CFLAGS)
-
- #linking flags
--dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,"\$$ORIGIN"
--dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,"\$$ORIGIN"
-+dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,/usr/lib/crtmpserver
-+dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,/usr/lib/crtmpserver
-
- #compile switches
- PLATFORM_DEFINES = \
-- the application will also be known by that names. It is optional
--aliases=
--{
-@@ -89,13 +89,6 @@ configuration=
+@@ -87,13 +87,6 @@ configuration=
+ port=1935,
+ protocol="inboundRtmp"
},
- {
- ip="0.0.0.0",
+- {
+- ip="0.0.0.0",
- port=8081,
- protocol="inboundRtmps",
- sslKey="server.key",
- sslCert="server.crt"
- },
-- {
-- ip="0.0.0.0",
+ {
+ ip="0.0.0.0",
port=8080,
- protocol="inboundRtmpt"
- },
-@@ -184,6 +177,7 @@ configuration=
+@@ -206,6 +199,7 @@ configuration=
name="samplefactory",
description="asdsadasdsa",
protocol="dynamiclinklibrary",
--- /dev/null
+--- a/sources/common/src/utils/logging/syslogloglocation.cpp
++++ b/sources/common/src/utils/logging/syslogloglocation.cpp
+@@ -35,8 +35,6 @@ SyslogLogLocation::SyslogLogLocation(Variant &configuration, string identifier,
+ _priorities[_WARNING_] = LOG_WARNING;
+ _priorities[_ERROR_] = LOG_ERR;
+ _priorities[_FATAL_] = LOG_ERR;
+- _priorities[_PROD_ACCESS_] = LOG_ERR;
+- _priorities[_PROD_ERROR_] = LOG_ERR;
+ _specificLevel = specificLevel;
+ _enforceLoggerName = (_configuration[CONF_LOG_APPENDER_NAME] != "");
+ _pDefualtFormatter = NULL;
+++ /dev/null
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -38,7 +38,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT
- PLATFORM_DEFINES = \
- -DLINUX \
- -DLITTLE_ENDIAN_BYTE_ALIGNED \
-- -DNET_EPOLL
-+ -DNET_SELECT
-
- SSL_BASE=/usr/local
-
+++ /dev/null
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -58,7 +58,7 @@ DEFINES = $(PLATFORM_DEFINES) $(FEATURES
-
- #library paths
- SSL_INCLUDE=-I$(SSL_BASE)/include
--SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto
-+SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto -ldl
-
- #lua
- LUA_INCLUDE=-I$(PROJECT_BASE_PATH)/3rdparty/lua-dev
-@@ -72,25 +72,25 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
-
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) $(PROJECT_BASE_PATH)/builders/make/output/dynamic/liblua.so -ltinyxml -lcrypt -ldl
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
-
- #thelib
- THELIB_INCLUDE=$(COMMON_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/thelib/include
--THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon
-+THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon -ldl
- THELIB_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/thelib/src -type f -name "*.cpp")
- THELIB_OBJS = $(THELIB_SRCS:.cpp=.thelib.o)
-
- #tests
- TESTS_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/tests/include
--TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib
-+TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl
- TESTS_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/tests/src -type f -name "*.cpp")
- TESTS_OBJS=$(TESTS_SRCS:.cpp=.tests.o)
-
- #crtmpserver
- CRTMPSERVER_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/crtmpserver/include
--CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib
-+CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl
- CRTMPSERVER_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/crtmpserver/src -type f -name "*.cpp")
- CRTMPSERVER_OBJS_DYNAMIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_dynamic.o)
- CRTMPSERVER_OBJS_STATIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_static.o)
+++ /dev/null
---- a/sources/common/src/utils/logging/fileloglocation.cpp
-+++ b/sources/common/src/utils/logging/fileloglocation.cpp
-@@ -17,6 +17,7 @@
- * along with crtmpserver. If not, see <http://www.gnu.org/licenses/>.
- */
-
-+#include <ctime>
-
- #include "utils/logging/fileloglocation.h"
- #include "utils/lua/luautils.h"
--- /dev/null
+--- a/builders/make/apps.mk
++++ b/builders/make/apps.mk
+@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
+ %.vptests.o: %.cpp
+ $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
+
+-ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
+-ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
+-applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
++ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
++ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
++applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
+++ /dev/null
---- a/3rdparty/tinyxml/tinyxml.h
-+++ b/3rdparty/tinyxml/tinyxml.h
-@@ -39,6 +39,7 @@ distribution.
- #include <string>
- #include <iostream>
- #include <sstream>
-+#include "lstate.h"
- using namespace std;
-
- // Help out windows:
+++ /dev/null
---- a/builders/make/apps.mk
-+++ b/builders/make/apps.mk
-@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
- %.vptests.o: %.cpp
- $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
-
--ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
--ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
--applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
-+ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
-+ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
-+applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
--- /dev/null
+--- a/sources/thelib/include/protocols/ts/basetsappprotocolhandler.h
++++ b/sources/thelib/include/protocols/ts/basetsappprotocolhandler.h
+@@ -18,7 +18,7 @@
+ */
+
+
+-#if defined HAS_PROTOCOL_TS && defined HAS_MEDIA_TS
++#if defined HAS_PROTOCOL_TS || defined HAS_MEDIA_TS
+ #ifndef _BASETSAPPPROTOCOLHANDLER_H
+ #define _BASETSAPPPROTOCOLHANDLER_H
+
+++ /dev/null
---- a/sources/common/include/platform/linux/max.h
-+++ b/sources/common/include/platform/linux/max.h
-@@ -21,87 +21,7 @@
- #ifndef _MAX_H
- #define _MAX_H
-
--#ifdef UINT64_MAX
--#undef UINT64_MAX
--#endif
--
--#ifdef INT64_MAX
--#undef INT64_MAX
--#endif
--
--#ifdef UINT32_MAX
--#undef UINT32_MAX
--#endif
--
--#ifdef INT32_MAX
--#undef INT32_MAX
--#endif
--
--#ifdef UINT16_MAX
--#undef UINT16_MAX
--#endif
--
--#ifdef INT16_MAX
--#undef INT16_MAX
--#endif
--
--#ifdef UINT8_MAX
--#undef UINT8_MAX
--#endif
--
--#ifdef INT8_MAX
--#undef INT8_MAX
--#endif
--
--
--
--#ifndef UINT64_MAX
--#define UINT64_MAX ((uint64_t)(0xffffffffffffffffULL))
--#endif
--
--#ifndef INT64_MAX
--#define INT64_MAX ((int64_t)(0x7fffffffffffffffLL))
--#endif
--
--#ifndef INT64_MIN
--#define INT64_MIN ((int64_t)(0x8000000000000000LL))
--#endif
--
--#ifndef UINT32_MAX
--#define UINT32_MAX ((uint32_t)(0xffffffffUL))
--#endif
--
--#ifndef INT32_MAX
--#define INT32_MAX ((int32_t)(0x7fffffffL))
--#endif
--
--#ifndef INT32_MIN
--#define INT32_MIN ((int32_t)(0x80000000L))
--#endif
--
--#ifndef UINT16_MAX
--#define UINT16_MAX ((uint16_t)(0xffff))
--#endif
--
--#ifndef INT16_MAX
--#define INT16_MAX ((int16_t)(0x7fff))
--#endif
--
--#ifndef INT16_MIN
--#define INT16_MIN ((int16_t)(0x8000))
--#endif
--
--#ifndef UINT8_MAX
--#define UINT8_MAX ((uint8_t)(0xff))
--#endif
--
--#ifndef INT8_MAX
--#define INT8_MAX ((int8_t)(0x7f))
--#endif
--
--#ifndef INT8_MIN
--#define INT8_MIN ((int8_t)(0x80))
--#endif
-+#include <stdint.h>
-
- #endif /* _MAX_H */
- #endif /* LINUX */
delete[] _pIV;
delete[] _pKey;
}
-@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Vari
+@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Variant ¶meters) {
_inputBuffer.IgnoreAll();
_tempBuffer.IgnoreAll();
return true;
}
-@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData
+@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData(IOBuffer &buffer) {
int decryptedFinalSize = 0;
uint32_t padding = 0;
};
DLLEXP void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut,
+--- /dev/null
++++ b/sources/common/include/utils/misc/libcrypto-compat.h
+@@ -0,0 +1,26 @@
++#ifndef LIBCRYPTO_COMPAT_H
++#define LIBCRYPTO_COMPAT_H
++
++#include <openssl/opensslv.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/bn.h>
++#include <openssl/dh.h>
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
++int DH_set_length(DH *dh, long length);
++
++EVP_MD_CTX *EVP_MD_CTX_new(void);
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
++
++HMAC_CTX *HMAC_CTX_new(void);
++void HMAC_CTX_free(HMAC_CTX *ctx);
++#define HMAC_CTX_reset HMAC_CTX_cleanup
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* LIBCRYPTO_COMPAT_H */
--- a/sources/common/src/utils/misc/crypto.cpp
+++ b/sources/common/src/utils/misc/crypto.cpp
@@ -35,6 +35,7 @@ DHWrapper::~DHWrapper() {
- Cleanup();
- return false;
+ goto return_error;
- }
-
-- //4. Set the key length
-- _pDH->length = _bitsCount;
++ }
++
+ //4. Set internal p and g
+ if (DH_set0_pqg(_pDH, p, NULL, g) != 1) {
+ FATAL("Unable to set internal p and g");
+ goto return_error;
-+ }
+ }
+ p = g = NULL;
-- //5. Generate private and public key
+- //4. Set the key length
+- _pDH->length = _bitsCount;
+ //5. Set the key length
+ if (DH_set_length(_pDH, _bitsCount) != 1) {
+ FATAL("Unable to set length");
+ goto return_error;
+ }
-+
+
+- //5. Generate private and public key
+ //6. Generate private and public key
if (DH_generate_key(_pDH) != 1) {
FATAL("Unable to generate DH public/private keys");
}
bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
-@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *p
+@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
return false;
}
}
bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
-@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *
+@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
return false;
}
}
bool DHWrapper::CreateSharedKey(uint8_t *pPeerPublicKey, int32_t length) {
-@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *p
+@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *pDst, int32_t dstLength) {
void DHWrapper::Cleanup() {
if (_pDH != NULL) {
int32_t keySize = BN_num_bytes(pNum);
if ((keySize <= 0) || (dstLength <= 0) || (keySize > dstLength)) {
FATAL("CopyPublicKey failed due to either invalid DH state or invalid call");
-@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKe
+@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut
uint8_t digest[SHA256_DIGEST_LENGTH];
unsigned int digestLen = 0;
RC4_set_key(rc4keyIn, 16, digest);
}
-@@ -220,14 +229,17 @@ string md5(string source, bool textResul
+@@ -220,14 +229,17 @@ string md5(string source, bool textResult) {
}
string md5(uint8_t *pBuffer, uint32_t length, bool textResult) {
if (textResult) {
string result = "";
-@@ -244,12 +256,12 @@ void HMACsha256(const void *pData, uint3
+@@ -259,12 +271,12 @@ void HMACsha256(const void *pData, uint32_t dataLength,
const void *pKey, uint32_t keyLength, void *pResult) {
unsigned int digestLen;
o_assert(digestLen == 32);
}
---- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-@@ -211,6 +211,7 @@ string BaseSSLProtocol::GetSSLErrors() {
-
- string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
- string formatString;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- formatString = "method: %p\n";
- formatString += "callback: %p\n";
- formatString += "cb_arg: %p\n";
-@@ -240,6 +241,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBI
- pBIO->references,
- (int64_t) pBIO->num_read,
- (int64_t) pBIO->num_write);
-+#else
-+// Some of these are problematic in openssl >= 1.1, since
-+// the BIO struct is opaque.
-+ formatString = "method: %s\n";
-+ formatString += "callback: %p\n";
-+ formatString += "cb_arg: %p\n";
-+ formatString += "init: %d\n";
-+ formatString += "shutdown: %d\n";
-+ formatString += "flags: %d\n";
-+ formatString += "retry_reason: %d\n";
-+ formatString += "num: %d\n";
-+ formatString += "ptr: %p\n";
-+ formatString += "next_bio: %p\n";
-+ formatString += "prev_bio: %s\n";
-+ formatString += "references: %s\n";
-+ formatString += "num_read: %"PRId64"\n";
-+ formatString += "num_write: %"PRId64;
-+ return format(formatString,
-+ BIO_method_name(pBIO),
-+ BIO_get_callback(pBIO),
-+ BIO_get_callback_arg(pBIO),
-+ BIO_get_init(pBIO),
-+ BIO_get_shutdown(pBIO),
-+ BIO_get_flags(pBIO),
-+ BIO_get_retry_reason(pBIO),
-+ BIO_get_fd(pBIO, NULL),
-+ BIO_get_data(pBIO),
-+ BIO_next(pBIO),
-+ "unknown", //prev_bio
-+ "unknown", //references
-+ BIO_number_read(pBIO),
-+ BIO_number_written(pBIO));
-+#endif
+@@ -397,8 +409,8 @@ string unhex(const uint8_t *pBuffer, uint32_t length) {
}
- void BaseSSLProtocol::InitRandGenerator() {
---- /dev/null
-+++ b/sources/common/include/utils/misc/libcrypto-compat.h
-@@ -0,0 +1,25 @@
-+#ifndef LIBCRYPTO_COMPAT_H
-+#define LIBCRYPTO_COMPAT_H
-+
-+#include <openssl/opensslv.h>
+ void CleanupSSL() {
+-#ifndef NO_SSL_ENGINE_CLEANUP
+- ERR_remove_state(0);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
-+#include <openssl/dh.h>
-+#include <openssl/evp.h>
-+#include <openssl/hmac.h>
-+
-+int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-+void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
-+int DH_set_length(DH *dh, long length);
-+
-+EVP_MD_CTX *EVP_MD_CTX_new(void);
-+void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
-+#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
-+
-+HMAC_CTX *HMAC_CTX_new(void);
-+void HMAC_CTX_free(HMAC_CTX *ctx);
-+#define HMAC_CTX_reset HMAC_CTX_cleanup
-+
-+#endif /* OPENSSL_VERSION_NUMBER */
-+
-+#endif /* LIBCRYPTO_COMPAT_H */
++ ERR_remove_thread_state(NULL);
+ ENGINE_cleanup();
+ CONF_modules_unload(1);
+ ERR_free_strings();
--- /dev/null
+++ b/sources/common/src/utils/misc/libcrypto-compat.cpp
@@ -0,0 +1,90 @@
+}
+
+#endif /* OPENSSL_VERSION_NUMBER */
+--- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
+@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
+ bool BaseSSLProtocol::Initialize(Variant ¶meters) {
+ //1. Initialize the SSL library
+ if (!_libraryInitialized) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ //3. This is the first time we use the library. So we have to
+ //initialize it first
+ SSL_library_init();
+@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant ¶meters) {
+ OpenSSL_add_all_algorithms();
+ OpenSSL_add_all_ciphers();
+ OpenSSL_add_all_digests();
++#endif
+
+ //initialize the random numbers generator
+ InitRandGenerator();
+@@ -211,6 +213,7 @@ string BaseSSLProtocol::GetSSLErrors() {
+
+ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+ string formatString;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ formatString = "method: %p\n";
+ formatString += "callback: %p\n";
+ formatString += "cb_arg: %p\n";
+@@ -240,6 +243,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+ pBIO->references,
+ (int64_t) pBIO->num_read,
+ (int64_t) pBIO->num_write);
++#else
++// Some of these are problematic in openssl >= 1.1, since
++// the BIO struct is opaque.
++ formatString = "method: %s\n";
++ formatString += "callback: %p\n";
++ formatString += "cb_arg: %p\n";
++ formatString += "init: %d\n";
++ formatString += "shutdown: %d\n";
++ formatString += "flags: %d\n";
++ formatString += "retry_reason: %d\n";
++ formatString += "num: %d\n";
++ formatString += "ptr: %p\n";
++ formatString += "next_bio: %p\n";
++ formatString += "prev_bio: %s\n";
++ formatString += "references: %s\n";
++ formatString += "num_read: %"PRId64"\n";
++ formatString += "num_write: %"PRId64;
++ return format(STR(formatString),
++ BIO_method_name(pBIO),
++ BIO_get_callback(pBIO),
++ BIO_get_callback_arg(pBIO),
++ BIO_get_init(pBIO),
++ BIO_get_shutdown(pBIO),
++ BIO_get_flags(pBIO),
++ BIO_get_retry_reason(pBIO),
++ BIO_get_fd(pBIO, NULL),
++ BIO_get_data(pBIO),
++ BIO_next(pBIO),
++ "unknown", //prev_bio
++ "unknown", //references
++ BIO_number_read(pBIO),
++ BIO_number_written(pBIO));
++#endif
+ }
+
+ void BaseSSLProtocol::InitRandGenerator() {
+--- a/sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp
+@@ -33,7 +33,7 @@ bool OutboundSSLProtocol::InitGlobalContext(Variant ¶meters) {
+ _pGlobalSSLContext = _pGlobalContexts[hash];
+ if (_pGlobalSSLContext == NULL) {
+ //2. prepare the global ssl context
+- _pGlobalSSLContext = SSL_CTX_new(TLSv1_method());
++ _pGlobalSSLContext = SSL_CTX_new(SSLv23_method());
+ if (_pGlobalSSLContext == NULL) {
+ FATAL("Unable to create global SSL context");
+ return false;
+++ /dev/null
---- a/sources/common/src/utils/misc/crypto.cpp
-+++ b/sources/common/src/utils/misc/crypto.cpp
-@@ -350,6 +350,7 @@ string unhex(string source) {
- return result;
- }
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- void CleanupSSL() {
- ERR_remove_state(0);
- ENGINE_cleanup();
-@@ -358,3 +359,4 @@ void CleanupSSL() {
- EVP_cleanup();
- CRYPTO_cleanup_all_ex_data();
- }
-+#endif
---- a/sources/crtmpserver/src/crtmpserver.cpp
-+++ b/sources/crtmpserver/src/crtmpserver.cpp
-@@ -298,8 +298,10 @@ void Cleanup() {
- delete gRs.pConfigFile;
- gRs.pConfigFile = NULL;
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- WARN("Doing final OpenSSL cleanup");
- CleanupSSL();
-+#endif
-
- WARN("Shutting down the logger leaving you in the dark. Bye bye... :(");
- Logger::Free(true);
---- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
- bool BaseSSLProtocol::Initialize(Variant ¶meters) {
- //1. Initialize the SSL library
- if (!_libraryInitialized) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- //3. This is the first time we use the library. So we have to
- //initialize it first
- SSL_library_init();
-@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant ¶meters) {
- OpenSSL_add_all_algorithms();
- OpenSSL_add_all_ciphers();
- OpenSSL_add_all_digests();
-+#endif
-
- //initialize the random numbers generator
- InitRandGenerator();
include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=3.4.5
+PKG_VERSION:=3.4.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_HASH:=741cbd6394eaed370774ca4cc089eaafbc54d0824b9aa360d4b3b0cbcbc4a92c
+PKG_HASH:=3572279cb139d9e39dcfbc23edf438ff5311ec3fc5d0dcb3558e49591e5cb83e
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
Ian Leonard <antonlacon@gmail.com>
PKG_NAME:=graphicsmagick
PKG_VERSION:=1.3.31
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION)
PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.bz2
--without-zstd \
--without-x
+TARGET_CFLAGS += -flto
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) \
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-libav
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
Ted Hess <thess@kitschensync.net>
PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da
+PKG_HASH:=96241130cb0067e01925a7cfe084dcf05941f139eb1ab45e5556c3f95120ce49
PKG_LICENSE:=GPL-2.0 LGPL-2.0
PKG_LICENSE_FILES:=COPYING COPYING.LIB
REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
CONFIGURE_ARGS += \
+ --disable-Bsymbolic \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-valgrind \
--without-system-libav \
+ --with-pic \
--with-libav-extra-configure=" \
$(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
--disable-bsfs \
--disable-programs \
--disable-devices \
+ --disable-debug \
+ --disable-doc \
+ --disable-extra-warnings \
+ --disable-htmlpages \
+ --disable-manpages \
+ --disable-podpages \
+ --disable-txtpages \
+ --disable-runtime-cpudetect \
--disable-encoders \
$(LIBAV_CONFIGURE_ENCODERS) \
--disable-decoders \
--disable-fma4 \
--disable-avx2 \
--disable-inline-asm \
- --disable-yasm"
-
-TARGET_CFLAGS += -D_GNU_SOURCE
-
-TARGET_LDFLAGS += $(FPIC)
+ --disable-x86asm"
define Package/gst1-libav/install
$(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
Ted Hess <thess@kitschensync.net>
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-PKG_HASH:=910b4e0e2e897e8b6d06767af1779d70057c309f67292f485ff988d087aa0de5
+PKG_HASH:=eafbb705190ca6dbf0e5dfbe1bc3d0f217fbc2a828037b5ede12d3611b9f9bd7
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
GST_VERSION:=1.0
CONFIGURE_ARGS += \
+ --disable-Bsymbolic \
--disable-debug \
--disable-examples \
- --disable-nls \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-introspection \
+ --disable-valgrind \
+ --disable-rpath \
\
--disable-directsound \
--disable-directdraw \
--disable-zbar \
--disable-srtp \
\
+ --without-html-dir \
--without-libiconv-prefix \
--without-libintl-prefix \
--with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
- --without-x \
-
-TARGET_CFLAGS+= -std=gnu99
-
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
+ --with-pic
define Package/gst1-plugins-bad/install
/bin/true
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,11 +2,11 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- SUBDIRS = \
- gst-libs gst sys ext pkgconfig \
-- m4 common docs tests tools
-+ m4 common docs tools
-
- DIST_SUBDIRS = \
- gst gst-libs sys ext pkgconfig \
-- m4 common docs tests tools
-+ m4 common docs tools
-
- EXTRA_DIST = \
- depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -2600,24 +2600,6 @@ sys/vdpau/Makefile
- sys/wasapi/Makefile
- sys/winks/Makefile
- sys/winscreencap/Makefile
--tests/Makefile
--tests/check/Makefile
--tests/files/Makefile
--tests/examples/Makefile
--tests/examples/avsamplesink/Makefile
--tests/examples/camerabin2/Makefile
--tests/examples/codecparsers/Makefile
--tests/examples/compositor/Makefile
--tests/examples/directfb/Makefile
--tests/examples/audiomixmatrix/Makefile
--tests/examples/ipcpipeline/Makefile
--tests/examples/mpegts/Makefile
--tests/examples/mxf/Makefile
--tests/examples/opencv/Makefile
--tests/examples/uvch264/Makefile
--tests/examples/waylandsink/Makefile
--tests/examples/webrtc/Makefile
--tests/icles/Makefile
- ext/voamrwbenc/Makefile
- ext/voaacenc/Makefile
- ext/assrender/Makefile
+++ /dev/null
---- a/ext/dtls/gstdtlsagent.c
-+++ b/ext/dtls/gstdtlsagent.c
-@@ -124,11 +124,11 @@ _gst_dtls_init_openssl (void)
- }
-
- GST_INFO_OBJECT (NULL, "initializing openssl %lx", OPENSSL_VERSION_NUMBER);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init ();
- SSL_load_error_strings ();
- ERR_load_BIO_strings ();
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
- {
- gint i;
- gint num_locks;
-@@ -197,7 +197,7 @@ gst_dtls_agent_init (GstDtlsAgent * self)
- SSL_CTX_set_cipher_list (priv->ssl_context,
- "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
- SSL_CTX_set_read_ahead (priv->ssl_context, 1);
--#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- SSL_CTX_set_ecdh_auto (priv->ssl_context, 1);
- #endif
- }
---- a/ext/dtls/gstdtlscertificate.c
-+++ b/ext/dtls/gstdtlscertificate.c
-@@ -45,8 +45,15 @@
- #endif
- #endif
-
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
- #include <openssl/ssl.h>
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- GST_DEBUG_CATEGORY_STATIC (gst_dtls_certificate_debug);
- #define GST_CAT_DEFAULT gst_dtls_certificate_debug
-
-@@ -240,8 +247,8 @@ init_generated (GstDtlsCertificate * self)
-
- X509_set_version (priv->x509, 2);
- ASN1_INTEGER_set (X509_get_serialNumber (priv->x509), 0);
-- X509_gmtime_adj (X509_get_notBefore (priv->x509), 0);
-- X509_gmtime_adj (X509_get_notAfter (priv->x509), 31536000L); /* A year */
-+ X509_gmtime_adj (X509_getm_notBefore (priv->x509), 0);
-+ X509_gmtime_adj (X509_getm_notAfter (priv->x509), 31536000L); /* A year */
- X509_set_pubkey (priv->x509, priv->private_key);
-
- name = X509_get_subject_name (priv->x509);
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
Ted Hess <thess@kitschensync.net>
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base
-PKG_HASH:=ca6139490e48863e7706d870ff4e8ac9f417b56f3b9e4b3ce490c13b09a77461
+PKG_HASH:=6952be988abe67b5affd46b194e97863b160cd58846199873b4315fe5e1cdbf0
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-alsa \
CONFIG_PACKAGE_libgst1app \
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--disable-debug \
--disable-examples \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-introspection \
+ --disable-rpath \
+ --disable-valgrind \
+ --without-html-dir \
+ --with-pic \
\
$(call GST_COND_SELECT,alsa) \
$(call GST_COND_SELECT,app) \
$(call GST_COND_SELECT,audioresample) \
$(call GST_COND_SELECT,audiotestsrc) \
--disable-cdparanoia \
- --disable-freetypetest \
$(call GST_COND_SELECT,gio) \
--disable-libvisual \
$(call GST_COND_SELECT,ogg) \
\
--without-libiconv-prefix \
--without-libintl-prefix \
- --without-x \
\
--with-audioresample-format=int \
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
( cd $(PKG_INSTALL_DIR); $(CP) \
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -13,7 +13,6 @@ SUBDIRS = \
+diff -u --recursive gst-plugins-base-1.15.2-vanilla/configure.ac gst-plugins-base-1.15.2/configure.ac
+--- gst-plugins-base-1.15.2-vanilla/configure.ac 2019-02-26 06:39:03.000000000 -0500
++++ gst-plugins-base-1.15.2/configure.ac 2019-03-16 13:30:18.212618930 -0400
+@@ -1044,7 +1044,6 @@
+ docs/libs/Makefile
+ docs/plugins/Makefile
+ docs/version.entities
+-po/Makefile.in
+ common/Makefile
+ common/m4/Makefile
+ m4/Makefile
+diff -u --recursive gst-plugins-base-1.15.2-vanilla/Makefile.am gst-plugins-base-1.15.2/Makefile.am
+--- gst-plugins-base-1.15.2-vanilla/Makefile.am 2019-01-26 13:51:01.000000000 -0500
++++ gst-plugins-base-1.15.2/Makefile.am 2019-03-16 13:30:03.006572636 -0400
+@@ -13,7 +13,6 @@
tools \
tests \
docs \
common \
m4
-@@ -24,7 +23,6 @@ DIST_SUBDIRS = \
+@@ -24,7 +23,6 @@
gst sys ext \
tools \
tests \
common \
m4
---- a/configure.ac
-+++ b/configure.ac
-@@ -1030,7 +1030,6 @@ docs/Makefile
- docs/libs/Makefile
- docs/plugins/Makefile
- docs/version.entities
--po/Makefile.in
- common/Makefile
- common/m4/Makefile
- m4/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -11,7 +11,6 @@ SUBDIRS = \
- gst-libs \
- gst sys $(SUBDIRS_EXT) \
- tools \
-- tests \
- docs \
- common \
- m4
-@@ -22,7 +21,6 @@ DIST_SUBDIRS = \
- gst-libs \
- gst sys ext \
- tools \
-- tests \
- common \
- m4
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -992,40 +992,6 @@ pkgconfig/gstreamer-gl.pc
- pkgconfig/gstreamer-gl-uninstalled.pc
- pkgconfig/gstreamer-plugins-base.pc
- pkgconfig/gstreamer-plugins-base-uninstalled.pc
--tests/Makefile
--tests/check/Makefile
--tests/examples/Makefile
--tests/examples/app/Makefile
--tests/examples/audio/Makefile
--tests/examples/decodebin_next/Makefile
--tests/examples/dynamic/Makefile
--tests/examples/encoding/Makefile
--tests/examples/fft/Makefile
--tests/examples/gio/Makefile
--tests/examples/gl/Makefile
--tests/examples/gl/generic/Makefile
--tests/examples/gl/generic/cube/Makefile
--tests/examples/gl/generic/doublecube/Makefile
--tests/examples/gl/generic/recordgraphic/Makefile
--tests/examples/gl/generic/cubeyuv/Makefile
--tests/examples/gl/qt/Makefile
--tests/examples/gl/gtk/Makefile
--tests/examples/gl/gtk/fxtest/Makefile
--tests/examples/gl/gtk/3dvideo/Makefile
--tests/examples/gl/gtk/switchvideooverlay/Makefile
--tests/examples/gl/gtk/filternovideooverlay/Makefile
--tests/examples/gl/gtk/filtervideooverlay/Makefile
--tests/examples/gl/cocoa/Makefile
--tests/examples/gl/sdl/Makefile
--tests/examples/gl/clutter/Makefile
--tests/examples/overlay/Makefile
--tests/examples/seek/Makefile
--tests/examples/snapshot/Makefile
--tests/examples/playback/Makefile
--tests/examples/playrec/Makefile
--tests/files/Makefile
--tests/icles/Makefile
--tests/icles/playback/Makefile
- docs/Makefile
- docs/libs/Makefile
- docs/plugins/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -11,13 +11,11 @@ SUBDIRS = \
- gst-libs \
- gst sys $(SUBDIRS_EXT) \
- tools \
-- docs \
- common \
- m4
-
- DIST_SUBDIRS = \
- pkgconfig \
-- docs \
- gst-libs \
- gst sys ext \
- tools \
---- a/configure.ac
-+++ b/configure.ac
-@@ -992,10 +992,6 @@ pkgconfig/gstreamer-gl.pc
- pkgconfig/gstreamer-gl-uninstalled.pc
- pkgconfig/gstreamer-plugins-base.pc
- pkgconfig/gstreamer-plugins-base-uninstalled.pc
--docs/Makefile
--docs/libs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- common/Makefile
- common/m4/Makefile
- m4/Makefile
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
Ted Hess <thess@kitschensync.net>
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-good/
-PKG_HASH:=5f8b553260cb0aac56890053d8511db1528d53cae10f0287cfce2cb2acc70979
+PKG_HASH:=b805962a2d777ff6145f6ca2ca8458499c9e23236cbcc41787c69ac51b02c818
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-lame \
CONFIG_PACKAGE_gst1-mod-mpg123 \
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
$(call GST_COND_SELECT,lame) \
$(call GST_COND_SELECT,mpg123) \
\
+ --disable-Bsymbolic \
--disable-debug \
--disable-examples \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-rpath \
+ --disable-valgrind \
\
--disable-aalib \
--disable-annodex \
--disable-y4m \
--disable-zlib \
\
+ --without-gudev \
+ --without-libv4l2 \
--without-libiconv-prefix \
- --without-libintl-prefix \
- --without-x \
-
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
+ --without-libintl-prefix
define Package/gst1-plugins-good/install
/bin/true
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,7 +2,6 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- ALWAYS_SUBDIRS = \
- gst sys ext \
-- tests \
- docs \
- common \
- m4 \
---- a/configure.ac
-+++ b/configure.ac
-@@ -1292,22 +1292,6 @@ sys/osxvideo/Makefile
- sys/v4l2/Makefile
- sys/waveform/Makefile
- sys/ximage/Makefile
--tests/Makefile
--tests/check/Makefile
--tests/examples/Makefile
--tests/examples/audiofx/Makefile
--tests/examples/cairo/Makefile
--tests/examples/equalizer/Makefile
--tests/examples/gtk/Makefile
--tests/examples/jack/Makefile
--tests/examples/level/Makefile
--tests/examples/rtp/Makefile
--tests/examples/rtsp/Makefile
--tests/examples/shapewipe/Makefile
--tests/examples/spectrum/Makefile
--tests/examples/v4l2/Makefile
--tests/files/Makefile
--tests/icles/Makefile
- common/Makefile
- common/m4/Makefile
- m4/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,7 +2,6 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- ALWAYS_SUBDIRS = \
- gst sys ext \
-- docs \
- common \
- m4 \
- pkgconfig
---- a/configure.ac
-+++ b/configure.ac
-@@ -1295,9 +1295,6 @@ sys/ximage/Makefile
- common/Makefile
- common/m4/Makefile
- m4/Makefile
--docs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-good-uninstalled.pc
- )
include $(TOPDIR)/rules.mk
PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
Ted Hess <thess@kitschensync.net>
PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-ugly
-PKG_HASH:=ac02d837f166c35ff6ce0738e281680d0b90052cfb1f0255dcf6aaca5f0f6d23
+PKG_HASH:=6e802c63680ac24b6970a35b3001e5c96e57f1b19814cd3916d52a32d33123b2
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_gst1-mod-asf \
CONFIG_PACKAGE_gst1-mod-mpeg2dec \
PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--disable-debug \
--disable-examples \
+ --disable-fatal-warnings \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
+ --disable-gtk-doc-html \
+ --disable-valgrind \
+ --disable-rpath \
\
--disable-a52dec \
--disable-amrnb \
\
--without-libiconv-prefix \
--without-libintl-prefix \
-
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv) \
-
+ --with-pic
define Package/gst1-plugins-ugly/install
/bin/true
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- SUBDIRS = \
-- gst-libs gst ext docs m4 tests common pkgconfig
-+ gst-libs gst ext docs m4 common pkgconfig
-
- EXTRA_DIST = \
- depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -423,9 +423,6 @@ ext/x264/Makefile
- docs/Makefile
- docs/plugins/Makefile
- docs/version.entities
--tests/Makefile
--tests/check/Makefile
--tests/files/Makefile
- m4/Makefile
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
- SUBDIRS = \
-- gst-libs gst ext docs m4 common pkgconfig
-+ gst-libs gst ext m4 common pkgconfig
-
- EXTRA_DIST = \
- depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -420,9 +420,6 @@ ext/dvdread/Makefile
- ext/mpeg2dec/Makefile
- ext/sidplay/Makefile
- ext/x264/Makefile
--docs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- m4/Makefile
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
include $(TOPDIR)/rules.mk
PKG_NAME:=gstreamer1
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.15.2
PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
-PKG_HASH:=f94f6696c5f05a3b3a9183e39c5f5c0b779f75a04c0efa497e7920afa985ffc7
+PKG_HASH:=27a3211eb5c3f6929c5f123ffecaac0ea6e9ed6b93be879c033a7d5af13ad7e6
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--enable-static \
+ --disable-Bsymbolic \
--disable-benchmarks \
+ --disable-debug \
--disable-examples \
--disable-failing-tests \
--disable-fatal-warnings \
--disable-introspection \
+ --disable-glib-asserts \
+ --disable-gobject-cast-checks \
--disable-gst-tracer-hooks \
+ --disable-gst-debug \
--disable-gtk-doc-html \
+ --disable-option-parsing \
+ --disable-rpath \
--disable-tests \
--disable-valgrind \
--without-dw \
--without-libintl-prefix \
--without-unwind
-EXTRA_LDFLAGS+= \
- -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
- $(if $(ICONV_FULL),-liconv)
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
( cd $(PKG_INSTALL_DIR); $(CP) \
data
--- a/configure.ac
+++ b/configure.ac
-@@ -1086,7 +1086,6 @@ libs/gst/net/Makefile
+@@ -1108,7 +1108,6 @@ libs/gst/net/Makefile
plugins/Makefile
plugins/elements/Makefile
plugins/tracers/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -7,7 +7,7 @@ aclocaldir = $(datadir)/aclocal
- aclocal_DATA = gst-element-check-1.0.m4
-
- SUBDIRS = pkgconfig \
-- gst libs plugins tests \
-+ gst libs plugins \
- docs \
- m4 \
- common \
-@@ -19,7 +19,7 @@ endif
-
- # These are all the possible subdirs
- DIST_SUBDIRS = pkgconfig \
-- gst libs plugins tools tests \
-+ gst libs plugins tools \
- docs \
- m4 \
- common \
---- a/configure.ac
-+++ b/configure.ac
-@@ -1086,20 +1086,6 @@ libs/gst/net/Makefile
- plugins/Makefile
- plugins/elements/Makefile
- plugins/tracers/Makefile
--tests/Makefile
--tests/benchmarks/Makefile
--tests/check/Makefile
--tests/misc/Makefile
--tests/examples/Makefile
--tests/examples/adapter/Makefile
--tests/examples/controller/Makefile
--tests/examples/stepping/Makefile
--tests/examples/helloworld/Makefile
--tests/examples/memory/Makefile
--tests/examples/netclock/Makefile
--tests/examples/ptp/Makefile
--tests/examples/streamiddemux/Makefile
--tests/examples/streams/Makefile
- tools/Makefile
- common/Makefile
- common/m4/Makefile
+++ /dev/null
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -8,7 +8,6 @@ aclocal_DATA = gst-element-check-1.0.m4
-
- SUBDIRS = pkgconfig \
- gst libs plugins \
-- docs \
- m4 \
- common \
- data
-@@ -20,7 +19,6 @@ endif
- # These are all the possible subdirs
- DIST_SUBDIRS = pkgconfig \
- gst libs plugins tools \
-- docs \
- m4 \
- common \
- data
---- a/configure.ac
-+++ b/configure.ac
-@@ -1089,12 +1089,6 @@ plugins/tracers/Makefile
- tools/Makefile
- common/Makefile
- common/m4/Makefile
--docs/Makefile
--docs/gst/Makefile
--docs/gst/gstreamer.types
--docs/libs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- m4/Makefile
- pkgconfig/Makefile
- stamp.h
--- a/gst/gstplugin.c
+++ b/gst/gstplugin.c
-@@ -776,15 +776,8 @@ _priv_gst_plugin_load_file_for_registry (const gchar * filename,
+@@ -777,15 +777,8 @@ _priv_gst_plugin_load_file_for_registry (const gchar * filename,
goto return_error;
}
include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=3
+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
DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
+libid3tag +libflac +libvorbis +libuuid \
$(ICONV_DEPENDS) $(INTL_DEPENDS)
+ USERID:=minidlna:minidlna
endef
define Package/minidlna/description
config minidlna config
- option 'enabled' '1'
+ option 'enabled' '0'
+ option user 'minidlna'
option port '8200'
option interface 'br-lan'
option friendly_name 'OpenWrt DLNA Server'
option db_dir '/var/run/minidlna'
- option log_dir '/var/log'
+ option log_dir '/var/log/minidlna'
option inotify '1'
option enable_tivo '0'
option wide_links '0'
SERVICE_USE_PID=1
SERVICE_PID_FILE=/var/run/minidlna/minidlna.pid
-MINIDLNA_CONFIG_FILE="/tmp/minidlna.conf"
+MINIDLNA_CONFIG_FILE="/var/etc/minidlna.conf"
minidlna_cfg_append() {
echo "$1" >> "$MINIDLNA_CONFIG_FILE"
minidlna_cfg_add_media_dir() {
local val=$1
-
minidlna_cfg_append "media_dir=$val"
}
local port
local interface
- config_get port $cfg port
- config_get interface $cfg interface
+ config_get port "$cfg" port
+ config_get interface "$cfg" interface
[ -z "$interface" -o -t "$port" ] && return 1
+ mkdir -p /var/etc
echo "# this file is generated automatically, don't edit" > "$MINIDLNA_CONFIG_FILE"
minidlna_cfg_append "port=$port"
minidlna_cfg_append "network_interface=$interface"
- minidlna_cfg_addstr $cfg friendly_name
- minidlna_cfg_addstr $cfg db_dir
- minidlna_cfg_addstr $cfg log_dir
- minidlna_cfg_addstr $cfg log_level 'error'
- minidlna_cfg_addbool $cfg inotify '1'
- minidlna_cfg_addbool $cfg enable_tivo '0'
- minidlna_cfg_addbool $cfg wide_links '0'
- minidlna_cfg_addbool $cfg strict_dlna '0'
- minidlna_cfg_addstr $cfg album_art_names
- minidlna_cfg_addstr $cfg presentation_url
- minidlna_cfg_addstr $cfg notify_interval '900'
- minidlna_cfg_addstr $cfg serial '12345678'
- minidlna_cfg_addstr $cfg model_number '1'
- minidlna_cfg_addstr $cfg minissdpsocket
- minidlna_cfg_addstr $cfg root_container '.'
+ minidlna_cfg_addstr "$cfg" friendly_name
+ minidlna_cfg_addstr "$cfg" user
+ minidlna_cfg_addstr "$cfg" db_dir
+ minidlna_cfg_addstr "$cfg" log_dir
+ minidlna_cfg_addstr "$cfg" log_level 'error'
+ minidlna_cfg_addbool "$cfg" inotify '1'
+ minidlna_cfg_addbool "$cfg" enable_tivo '0'
+ minidlna_cfg_addbool "$cfg" wide_links '0'
+ minidlna_cfg_addbool "$cfg" strict_dlna '0'
+ minidlna_cfg_addstr "$cfg" album_art_names
+ minidlna_cfg_addstr "$cfg" presentation_url
+ minidlna_cfg_addstr "$cfg" notify_interval '900'
+ minidlna_cfg_addstr "$cfg" serial '12345678'
+ minidlna_cfg_addstr "$cfg" model_number '1'
+ minidlna_cfg_addstr "$cfg" minissdpsocket
+ minidlna_cfg_addstr "$cfg" root_container '.'
config_list_foreach "$cfg" "media_dir" minidlna_cfg_add_media_dir
return 0
local enabled
local db_dir
local log_dir
+ local user
config_load 'minidlna'
config_get_bool enabled config 'enabled' '0'
minidlna_create_config config || return 1
config_get db_dir config 'db_dir' '/var/run/minidlna'
- config_get log_dir config 'log_dir' '/var/log'
+ config_get log_dir config 'log_dir' '/var/log/minidlna'
+ config_get user config 'user' 'root'
+
+ mkdir -m 0755 -p "$db_dir" "$log_dir"
+ chown -R "$user" "$db_dir" "$log_dir"
- mkdir -m 0755 -p $db_dir
- mkdir -m 0755 -p $log_dir
service_start /usr/bin/minidlna -f "$MINIDLNA_CONFIG_FILE"
}
--- /dev/null
+--- 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
+++ /dev/null
---- 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
--- /dev/null
+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>"
+ "<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>"
+ "<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;
--- /dev/null
+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)
--- /dev/null
+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 *
include $(TOPDIR)/rules.mk
PKG_NAME:=mjpg-streamer
-PKG_VERSION:=2018-04-14
+PKG_VERSION:=2018-10-25
PKG_RELEASE:=1
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>, \
Ted Hess <thess@kitschensync.net>
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/jacksonliam/mjpg-streamer.git
-PKG_SOURCE_VERSION:=821c330ea6bbb5fbed98d48e00aac156e923161b
+PKG_SOURCE_VERSION:=ddb69b7b4f114f3c2ca01adf55712792ca8aed43
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MIRROR_HASH:=f95e54bc95c808b9867bbca364e58b6c7e08cb26613205f8d87450ab9c899942
+PKG_MIRROR_HASH:=d87ebff5de0c17a35a5b81adad5aa234bc70fe2bb17d1c6277c726845dc043bb
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
option led 'auto'
option www '/www/webcam'
option port '8080'
+ #option listen_ip '192.168.1.1'
option username 'openwrt'
option password 'openwrt'
config_get port "$s" 'port'
[ -n "$port" ] && output_arg="${output_arg} --port $port"
+ config_get listen_ip "$s" 'listen_ip'
+ [ -n "$listen_ip" ] && output_arg="${output_arg} --listen $listen_ip"
+
config_get www "$s" 'www'
[ -n "$www" ] && output_arg="${output_arg} --www $www"
add_subdirectory(plugins/output_udp)
-add_subdirectory(plugins/output_viewer)
+#add_subdirectory(plugins/output_viewer)
-
+ add_subdirectory(plugins/output_zmqserver)
+
#
# mjpg_streamer executable
@@ -49,8 +49,7 @@ set (MJPG_STREAMER_PLUGIN_INSTALL_PATH "
# Global dependencies
#
-
+
-find_library(JPEG_LIB jpeg)
-
+#find_library(JPEG_LIB jpeg)
-
+
#
# Input plugins
--- a/plugins/input_uvc/CMakeLists.txt
+++ b/plugins/input_uvc/CMakeLists.txt
-@@ -8,27 +8,27 @@ if (PLUGIN_INPUT_UVC)
-
+@@ -9,27 +9,27 @@ if (PLUGIN_INPUT_UVC)
add_definitions(-DLINUX -D_GNU_SOURCE)
-- find_library(V4L2_LIB v4l2)
-+# find_library(V4L2_LIB v4l2)
+ find_library(V4L2_LIB v4l2)
+- find_library(JPEG_LIB jpeg)
++# find_library(JPEG_LIB jpeg)
- if (V4L2_LIB)
- add_definitions(-DUSE_LIBV4L2)
- endif (V4L2_LIB)
+# if (V4L2_LIB)
-+# add_definitions(-DUSE_LIBV4L2)
++# add_definitions(-DUSE_LIBV4L2)
+# endif (V4L2_LIB)
- if (NOT JPEG_LIB)
include $(TOPDIR)/rules.mk
PKG_NAME:=v4l2rtspserver
-PKG_VERSION:=0.1.3
+PKG_VERSION:=0.1.6
PKG_RELEASE:=1
#cannot use codeload as this uses submodules
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=73499d0db515ae0d66c6d2a73c9c474ca35007aaf17451da01e793d972eab35a
-
-PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
-PKG_LICENSE:=Unlicense
-PKG_LICENSE_FILES:=LICENSE
+PKG_MIRROR_HASH:=9e076d2ecac08d5cbd0af7cfaa355e077e03fe35be73259ae7f520e2ef4243f8
LIVE555_VERSION:=2019.02.03
LIVE555_HASH:=1c938d91553eff224c7a860f8f38b3256028704b474a3fc6bcf2eddc42268710
LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
+PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
+PKG_LICENSE:=Unlicense
+PKG_LICENSE_FILES:=LICENSE
+
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
TARGET_CXXFLAGS += -fno-rtti
TARGET_LDFLAGS += -Wl,--gc-sections
-define Build/Prepare
- $(Build/Prepare/Default)
+CMAKE_OPTIONS += -DALSA=OFF -DLIVE555CFLAGS="-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1"
- ## need to compile some dependencies so that cmake will find them
- # build live555
- $(eval $(call Download,live555))
-
- mkdir -p $(PKG_BUILD_DIR)/live555
- $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live555
- $(CP) files/config.openwrt $(PKG_BUILD_DIR)/live555
- ( cd $(PKG_BUILD_DIR)/live555; ./genMakefiles openwrt )
-
- +$(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555
- $(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555 PREFIX="$(STAGING_DIR)/usr/" install
-
- # build v4l2wrapper
- +$(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/v4l2wrapper
- $(CP) $(PKG_BUILD_DIR)/v4l2wrapper/libv4l2wrapper.a $(PKG_BUILD_DIR)
-
- # cmake patches (these are very hacky and should be a lot cleaner)
-
- # prevent root path override
- $(SED) 's/SET(CMAKE_FIND_ROOT_PATH/#SET(CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
-
- # set search path for v4l2wrapper to current build dir
- $(SED) 's/V4L2WRAPPER_LIBRARY libv4l2wrapper.a/V4L2WRAPPER_LIBRARY libv4l2wrapper.a PATHS "." NO_CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
+define Build/Prepare
+ $(Build/Prepare/Default)
- # disable ALSA
- $(SED) 's/find_package(ALSA QUIET)//' $(PKG_BUILD_DIR)/CMakeLists.txt
+ # download live555
+ $(eval $(call Download,live555))
+ mkdir -p $(PKG_BUILD_DIR)/live
+ $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live
endef
+
define Package/v4l2rtspserver/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/
+++ /dev/null
-COMPILE_OPTS = $(INCLUDES) -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1
-C = c
-C_COMPILER = $(GCC)
-CFLAGS += $(COMPILE_OPTS)
-C_FLAGS = $(CFLAGS)
-CPP = cpp
-CPLUSPLUS_COMPILER = $(AS) # optimizations are only in AR apparently, so use instead of CXX
-CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
-CPLUSPLUS_FLAGS += $(CPPFLAGS) -fexceptions
-OBJ = o
-LINK = $(CXX) -o
-LINK_OPTS = -L. $(LDFLAGS)
-CONSOLE_LINK_OPTS = $(LINK_OPTS)
-LIBRARY_LINK = $(AR) cr
-LIBRARY_LINK_OPTS =
-LIB_SUFFIX = a
-LIBS_FOR_CONSOLE_APPLICATION = $(CXXLIBS)
-LIBS_FOR_GUI_APPLICATION = $(LIBS_FOR_CONSOLE_APPLICATION)
-EXE =
config_get path "$s" 'path'
config_get format "$s" 'format'
- # pull out resolution width and height from string
- local w="$(echo $resolution | cut -d'x' -f1)"
- local h="$(echo $resolution | cut -d'x' -f2)"
-
# make sure format is uppercase
format="$(echo $format | tr a-z A-Z)"
args="$args -P $port"
args="$args -u ${path}"
args="$args -F $fps"
- args="$args -W $w"
- args="$args -H $h"
- args="$args -f$format"
+ args="$args -G ${resolution}"
+ if [ ! -z "$format" ]; then
+ args="$args -f$format"
+ fi
args="$args -c" # fixes issue with corrupt frames with H264
if [ -n "$username" ]; then
+++ /dev/null
-From f732d44c2bc47e6eccf65e5eb3160734f11e5d3e Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 27 Dec 2018 20:16:59 -0800
-Subject: [PATCH] Switch Makefile to compile with g++
-
-With this change I managed to get OpenWrt to compile with uclibcxx
-instead of libstdcpp.
-
-Made CXX adjustable by the shell as OpenWrt needs to override this.
-It also has its own ar.
-
-EXTRA_CXXFLAGS seems to be the proper variable based on usage in the
-OpenWrt tree.
----
- Makefile | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 51aaa37..f05bf0d 100644
---- a/v4l2wrapper/Makefile
-+++ b/v4l2wrapper/Makefile
-@@ -1,12 +1,12 @@
--CFLAGS = -W -Wall -pthread -g -pipe $(CFLAGS_EXTRA)
--CFLAGS += -I inc
-+CXXFLAGS ?= -W -Wall -pthread -g -pipe $(EXTRA_CXXFLAGS)
-+CXXFLAGS += -I inc
- RM = rm -rf
--CC = $(CROSS)gcc
--AR = $(CROSS)ar
-+CXX ?= $(CROSS)g++
-+AR ?= $(CROSS)ar
- PREFIX?=/usr
-
- ifneq ($(wildcard $(SYSROOT)$(PREFIX)/include/log4cpp/Category.hh),)
--CFLAGS += -DHAVE_LOG4CPP -I $(SYSROOT)$(PREFIX)/include
-+CXXFLAGS += -DHAVE_LOG4CPP -I $(SYSROOT)$(PREFIX)/include
- endif
-
- V4L2WRAPPER_CPP:=$(wildcard src/*.cpp)
-@@ -17,7 +17,7 @@ V4L2WRAPPER_OBJ:=$(V4L2WRAPPER_CPP:%.cpp=%.o)
- all: libv4l2wrapper.a
-
- %.o: %.cpp
-- $(CC) -c -o $@ $< $(CFLAGS)
-+ $(CXX) -c -o $@ $< $(CXXFLAGS)
-
- libv4l2wrapper.a: $(V4L2WRAPPER_OBJ)
- $(AR) rcs $@ $^
---
-2.20.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.03.01
+PKG_VERSION:=2019.4.7
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/rg3/youtube-dl/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=65a4ed3588ff67c69b4b3a507acefb29225d5051ffe606688778cfaf8efd79a5
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
+PKG_HASH:=d8250c9fedea3bcf5c2df62012e9814c96db53540a2842b8f8345885adfd0a85
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
PKG_LICENSE:=Unlicense
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
-PKG_BUILD_DEPENDS:=python/host zip/host
-
include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
-define Package/youtube-dl
+define Package/youtube-dl/Default
SECTION:=multimedia
CATEGORY:=Multimedia
- TITLE:=utility to download videos from YouTube.com
- DEPENDS:=+python-openssl +python-email +python-xml +python-codecs +python-ctypes +ca-certificates
- URL:=https://youtube-dl.org
+ TITLE:=Utility to download videos from YouTube.com
+ DEPENDS:=+ca-certificates
+ URL:=https://yt-dl.org
endef
define Package/youtube-dl/description
youtube-dl is a small command-line program to download videos
- from YouTube.com and a few more sites.
- It requires the Python interpreter.
+ from YouTube.com and other video sites.
+ It requires the Python3 interpreter.
endef
-define Package/youtube-dl/install
- $(INSTALL_DIR) $(1)/usr/bin
-
- python -m compileall $(PKG_BUILD_DIR)/youtube_dl/
- cd $(PKG_BUILD_DIR) && zip --quiet youtube-dl-c.zip youtube_dl/*.pyc youtube_dl/*/*.pyc
- cd $(PKG_BUILD_DIR) && zip --quiet --junk-paths youtube-dl-c.zip youtube_dl/__main__.pyc
- echo '#!/usr/bin/env python' > $(PKG_BUILD_DIR)/youtube-dl-c
- cat $(PKG_BUILD_DIR)/youtube-dl-c.zip >> $(PKG_BUILD_DIR)/youtube-dl-c
-
- $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/youtube-dl-c $(1)/usr/bin/youtube-dl
+define Package/youtube-dl
+$(call Package/youtube-dl/Default)
+ DEPENDS+= \
+ +PACKAGE_youtube-dl:python3 \
+ +PACKAGE_youtube-dl:python3-email \
+ +PACKAGE_youtube-dl:python3-xml \
+ +PACKAGE_youtube-dl:python3-codecs \
+ +PACKAGE_youtube-dl:python3-ctypes
+ VARIANT:=python3
endef
+$(eval $(call Py3Package,youtube-dl))
$(eval $(call BuildPackage,youtube-dl))
+$(eval $(call BuildPackage,youtube-dl-src))
+++ /dev/null
-diff --git a/Makefile b/Makefile
-index 4a62f44..fee93e8 100644
---- a/Makefile
-+++ b/Makefile
-@@ -85,12 +85,12 @@ supportedsites:
- $(PYTHON) devscripts/make_supportedsites.py docs/supportedsites.md
-
- README.txt: README.md
-- pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
-+# pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
-
- youtube-dl.1: README.md
-- $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
-- pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
-- rm -f youtube-dl.1.temp.md
-+# $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
-+# pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
-+# rm -f youtube-dl.1.temp.md
-
- youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
- $(PYTHON) devscripts/bash-completion.py
PKG_NAME:=acme
PKG_VERSION:=2.7.9
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_LICENSE:=GPLv3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=25f8eef1a53584e3ebc653e1ae7763362ca97c40bb476ab7fee01aa50fa3a101
PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION)
PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+PKGARCH:=all
LUCI_DIR:=/usr/lib/lua/luci
iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
- if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ $UPDATE_UHTTPD -eq 1 ] ); then
+ if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ "$UPDATE_UHTTPD" -eq 1 ] ); then
if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
UHTTPD_LISTEN_HTTP=
/etc/init.d/uhttpd reload
fi
- if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ $UPDATE_NGINX -eq 1 ] ); then
+ if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ "$UPDATE_NGINX" -eq 1 ] ); then
NGINX_WEBSERVER=0
/etc/init.d/nginx restart
fi
[ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1
log "Running ACME for $main_domain"
-
+
handle_credentials() {
local credential="$1"
eval export $credential
PKG_NAME:=aggregate
PKG_VERSION:=1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://ftp.isc.org/isc/aggregate/
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25,8 +25,9 @@
+ INSTALL = @INSTALL@
+ DEFS = @DEFS@
+ LIBS = @LIBS@
+-CFLAGS = -O
+-LDFLAGS = -s
++CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
+ prefix = @prefix@
+
+ SHELL = /bin/sh
PKG_NAME:=aircrack-ng
PKG_VERSION:=1.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/aircrack-ng/aircrack-ng/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=7e03f9828495a3a1a781ad79e41805971bf7347c092df852820232bca866a19b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=42f2b48d7f46b39e0d5d2f2a64cbf63f87416a70
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=17893e05278635675a77a3cb0927202ec4df2fc9a742689a7a88e4a8f27a69b6
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
CONFIG_AIRCRACK_NG_HWLOC \
CONFIG_AIRCRACK_NG_SQLITE3
+include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
define Package/aircrack-ng
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread +libstdcpp
+ DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread $(CXX_DEPENDS)
DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
Bash script designed to turn wireless cards into monitor mode.
endef
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ echo "$(PKG_VERSION)_rev$(PKG_SOURCE_VERSION)" > $(PKG_BUILD_DIR)/VERSION
+endef
+
CONFIGURE_ARGS += \
--disable-silent-rules \
--enable-shared \
\
PYTHON=$(PYTHON) \
\
- $(if $(CONFIG_AIRCRACK_NG_OPENSSL),--with-openssl,--without-openssl) \
+ $(if $(CONFIG_AIRCRACK_NG_OPENSSL),,--without-openssl) \
$(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
$(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
- $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3,--without-sqlite3)
+ $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3)
TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
PKG_NAME:=apcupsd
PKG_VERSION:=3.14.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_LICENSE:=GPL-2.0
URL:=http://www.apcupsd.org/
endef
+CONFIGURE_VARS += SHUTDOWN=/sbin/halt
+
define Build/Configure
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
$(call Build/Configure/Default, \
APCPID=/var/run/apcupsd.pid
APCUPSD=/usr/sbin/apcupsd
-SHUTDOWN=/sbin/shutdown
+SHUTDOWN=/sbin/halt
SCRIPTSHELL=/bin/sh
SCRIPTDIR=/etc/apcupsd
WALL=true
;;
doreboot)
echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
- ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
+ echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot
;;
doshutdown)
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
- ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
+ echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt
;;
annoyme)
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
--- /dev/null
+--- a/Makefile.orig 2019-04-04 18:19:45.007668656 +0200
++++ a/Makefile 2019-04-04 18:23:00.723165465 +0200
+@@ -1,6 +1,6 @@
+ topdir:=.
+
+-SUBDIRS=src platforms doc
++SUBDIRS=src platforms
+ include autoconf/targets.mak
+
+ # Force platforms/ to build after src/
PKG_NAME:=aria2
PKG_VERSION:=1.34.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
append_header() {
local h="$1"
[ -n "$h" ] && \
- echo "header=\"${h}\"" >>"$config_file_tmp"
+ echo "header=\"$h\"" >>"$config_file_tmp"
}
aria2_validate() {
- uci_validate_section "$NAME" aria2 "$1" \
+ uci_load_validate "$NAME" aria2 "$1" "$2" \
'enabled:bool:0' \
'enable_logging:bool' \
'enable_proxy:bool' \
'all_proxy_user:string' \
'auto_save_interval:range(0,600)' \
'bt_enable_lpd:or("true","false")' \
+ 'bt_detach_seed_only:or("true","false")' \
+ 'bt_load_saved_metadata:or("true","false")' \
+ 'bt_prioritize_piece:string' \
'bt_max_open_files:uinteger' \
'bt_max_peers:uinteger' \
'bt_remove_unselected_file:or("true","false")' \
'ca_certificate:file' \
'certificate:file' \
'check_certificate:or("true","false"):true' \
+ 'check_integrity:or("true","false")' \
'connect_timeout:uinteger' \
'dht_listen_port:string' \
'dir:string' \
aria2_start() {
local section="$1"
- aria2_validate "$section" || { _err "Validation failed."; return 1; }
+ [ "$2" = "0" ] || { _err "Validation failed."; return 1; }
- [ "$enabled" = "1" ] || { _info "Instance \"${section}\" disabled."; return 1; }
- [ -n "$dir" ] || { _err "Please set downlod dir."; return 1; }
- [ -d "$dir" ] || { _err "Please create downlod dir first."; return 1; }
+ [ "$enabled" = "1" ] || { _info "Instance \"$section\" disabled."; return 1; }
+ [ -n "$dir" ] || { _err "Please set download dir."; return 1; }
+ [ -d "$dir" ] || { _err "Please create download dir first."; return 1; }
- config_file="${config_dir}/${NAME}.conf.${section}"
- config_file_tmp="${config_dir}/${NAME}.conf.tmp"
- session_file="${config_dir}/${NAME}.session.${section}"
+ config_file="$config_dir/$NAME.conf.$section"
+ config_file_tmp="$config_dir/$NAME.conf.tmp"
+ session_file="$config_dir/$NAME.session.$section"
_make_dir "$config_dir" || {
- _err "Can't create config dir: ${config_dir}"
+ _err "Can't create config dir: $config_dir"
return 1
}
_create_file "$session_file" "$config_file" "$config_file_tmp" || {
- _err "Can't create files: ${session_file}, ${config_file}, ${config_file_tmp}"
+ _err "Can't create files: $session_file, $config_file, $config_file_tmp"
return 1
}
# create tmp file
cat >"$config_file_tmp" <<-EOF
- # Auto generated file, changes to this file will lost.
+ # Auto generated file, changes to this file will be lost.
EOF
- append_setting "dir=${dir}"
+ append_setting "dir=$dir"
append_setting "enable-rpc=true"
append_setting "rpc-allow-origin-all=true"
append_setting "rpc-listen-all=true"
append_setting "quiet=true"
append_setting "continue=true"
- append_setting "input-file=${session_file}"
- append_setting "save-session=${session_file}"
+ append_setting "input-file=$session_file"
+ append_setting "save-session=$session_file"
if [ -z "$enable_logging" ]; then
append_options "log" "log_level"
log_dir="$(dirname "$log")"
_make_dir "$log_dir" || {
- _err "Can't create log dir: ${log_dir}"
+ _err "Can't create log dir: $log_dir"
return 1
}
# create or clear log file
echo >"$log"
- append_setting "log=${log}"
+ append_setting "log=$log"
append_options "log_level"
fi
unset_auth_method() {
uci -q batch <<-EOF
- set ${NAME}.${section}.rpc_auth_method=""
+ set $NAME.$section.rpc_auth_method=""
commit $NAME
EOF
}
if [ -z "$rpc_auth_method" ]; then
if [ -n "$rpc_secret" ]; then
- append_setting "rpc-secret=${rpc_secret}"
+ append_setting "rpc-secret=$rpc_secret"
elif [ -n "$rpc_user" ]; then
- append_setting "rpc-user=${rpc_user}"
- append_setting "rpc-passwd=${rpc_passwd}"
+ append_setting "rpc-user=$rpc_user"
+ append_setting "rpc-passwd=$rpc_passwd"
else
- _info "It is recommand to set RPC secret."
+ _info "It is recommended to set RPC secret."
fi
elif [ "$rpc_auth_method" = "token" ]; then
if [ -n "$rpc_secret" ]; then
- append_setting "rpc-secret=${rpc_secret}"
+ append_setting "rpc-secret=$rpc_secret"
else
unset_auth_method
fi
elif [ "$rpc_auth_method" = "user_pass" ]; then
if [ -n "$rpc_user" ]; then
- append_setting "rpc-user=${rpc_user}"
- append_setting "rpc-passwd=${rpc_passwd}"
+ append_setting "rpc-user=$rpc_user"
+ append_setting "rpc-passwd=$rpc_passwd"
else
_info "Please set RPC user."
unset_auth_method
fi
if [ ."$enable_dht" = ."true" ]; then
- dht_file="${config_dir}/dht.dat.${section}"
+ dht_file="$config_dir/dht.dat.$section"
_create_file "$dht_file" || {
- _err "Can't create DHT file: ${dht_file}"
+ _err "Can't create DHT file: $dht_file"
return 1
}
append_setting "enable-dht=true"
- append_setting "dht-file-path=${dht_file}"
+ append_setting "dht-file-path=$dht_file"
fi
if [ ."$enable_dht6" = ."true" ] && [ ."$disable_ipv6" != ."true" ]; then
- dht6_file="${config_dir}/dht6.dat.${section}"
+ dht6_file="$config_dir/dht6.dat.$section"
_create_file "$dht6_file" || {
- _err "Can't create DHT6 file: ${dht6_file}"
+ _err "Can't create DHT6 file: $dht6_file"
return 1
}
append_setting "enable-dht6=true"
- append_setting "dht-file-path6=${dht6_file}"
+ append_setting "dht-file-path6=$dht6_file"
fi
if [ -n "$bt_tracker" ]; then
if [ -z "$bt_tracker_list" ]; then
bt_tracker_list="$t"
else
- bt_tracker_list="${bt_tracker_list},${t}"
+ bt_tracker_list="$bt_tracker_list,$t"
fi
done
- append_setting "bt-tracker=${bt_tracker_list}"
+ append_setting "bt-tracker=$bt_tracker_list"
fi
append_options "auto_save_interval" "bt_enable_lpd" "bt_max_open_files" "bt_max_peers" \
- "bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_save_metadata" "bt_seed_unverified" \
- "bt_stop_timeout" "certificate" "connect_timeout" "dht_listen_port" "disable_ipv6" "disk_cache" \
- "enable_peer_exchange" "event_poll" "file_allocation" "follow_torrent" "force_save" "http_accept_gzip" \
- "http_no_cache" "listen_port" "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
+ "bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_prioritize_piece" \
+ "bt_stop_timeout" "bt_detach_seed_only" "bt_save_metadata" "bt_load_saved_metadata" \
+ "bt_seed_unverified" "certificate" "check_integrity" "connect_timeout" "dht_listen_port" \
+ "disable_ipv6" "disk_cache" "enable_peer_exchange" "event_poll" "file_allocation" \
+ "follow_torrent" "force_save" "http_accept_gzip" "http_no_cache" "listen_port" \
+ "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
"max_download_limit" "max_overall_download_limit" "max_overall_upload_limit" "max_tries" \
"max_upload_limit" "min_split_size" "pause" "pause_metadata" "peer_id_prefix" "private_key" \
"retry_wait" "rpc_listen_port" "save_session_interval" "seed_ratio" "seed_time" "split" "timeout" \
if [ -n "$user" ]; then
if ( user_exists "$user" && _change_owner "$user" "$config_dir" "$log" ); then
- _info "Aria2 will run with user '${user}'."
+ _info "Aria2 will run with user '$user'."
if [ "$user" != "root" ]; then
- _info "Please make sure user '${user}' has write access to download dir: ${dir}"
+ _info "Please make sure user '$user' has write access to download dir: $dir"
fi
else
- _info "Set run user to '${user}' failed, default user will be used."
+ _info "Setting run user to '$user' failed, default user will be used."
user=
fi
fi
- procd_open_instance "${NAME}.${section}"
+ procd_open_instance "$NAME.$section"
procd_set_param command "$PROG"
- procd_append_param command --conf-path="${config_file}"
+ procd_append_param command --conf-path="$config_file"
procd_set_param respawn
procd_set_param stdout 1
[ -n "$user" ] && \
procd_set_param user "$user"
- procd_add_jail "${NAME}.${section}" log
+ procd_add_jail "$NAME.$section" log
procd_add_jail_mount "$config_file"
procd_add_jail_mount_rw "$dir" "$config_dir" "$log"
procd_close_instance
service_triggers() {
procd_add_reload_trigger "$NAME"
+ procd_add_validation aria2_validate
}
start_service() {
config_load "$NAME"
- config_foreach aria2_start "aria2"
+ config_foreach aria2_validate "aria2" aria2_start
}
URL:=https://github.com/dtaht/ceropackages-3.10
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
DEPENDS:=+ipset
+ PKGARCH:=all
endef
define Package/bcp38/description
CATEGORY:=Network
TITLE:=Link Aggregation (Channel Bonding) proto handler
DEPENDS:=+kmod-bonding
+ PKGARCH:=all
endef
define Package/proto-bonding/description
include $(TOPDIR)/rules.mk
PKG_NAME:=clamav
-PKG_VERSION:=0.101.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.101.2
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=fa368fa9b2f57638696150c7d108b06dec284e8d8e3b8e702c784947c01fb806
+PKG_HASH:=0a12ebdf6ff7a74c0bde2bdc2b55cae33449e6dd953ec90824a9e01291277634
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=conserver
-PKG_VERSION:=8.2.2
-PKG_RELEASE:=2
+PKG_VERSION:=8.2.4
+PKG_RELEASE:=1
PKG_MAINTAINER:=Bjørn Mork <bjorn@mork.no>
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/conserver/conserver.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/conserver/conserver/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=27d92e6c04e97cd0884774eace0b44f30087695927bcce8addc11dba9c090d7c
+PKG_HASH:=8d8b263d9531ebb827257bd67baf9200cac4fb7ffbe033122686e39ca42cddd6
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
CONFIGURE_ARGS += \
--with-openssl \
+ $(if $(CONFIG_IPV6),--with-ipv6) \
--sysconfdir=/etc/conserver \
--with-port=3109 \
--with-logfile=/var/log/conserver/server.log
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(CP) ./files/config.sub $(PKG_BUILD_DIR)/
+ $(CP) ./files/config.guess $(PKG_BUILD_DIR)/
+endef
+
define Package/conserver/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/conserver $(1)/usr/sbin/
--- /dev/null
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-03-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$driver"
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "$UNAME_SYSTEM" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
+ echo unknown)`
+ case "$UNAME_MACHINE_ARCH" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
+ ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "$UNAME_VERSION" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "$machine-${os}${release}${abi-}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+ exit ;;
+ *:SolidBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:MirBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+ exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo "$UNAME_MACHINE"-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix"$UNAME_RELEASE"
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux"$UNAME_RELEASE"
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos"$UNAME_RELEASE"
+ ;;
+ sun4)
+ echo sparc-sun-sunos"$UNAME_RELEASE"
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint"$UNAME_RELEASE"
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint"$UNAME_RELEASE"
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint"$UNAME_RELEASE"
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint"$UNAME_RELEASE"
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten"$UNAME_RELEASE"
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix"$UNAME_RELEASE"
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos"$UNAME_RELEASE"
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+ then
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
+ then
+ echo m88k-dg-dgux"$UNAME_RELEASE"
+ else
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+ fi
+ else
+ echo i586-dg-dgux"$UNAME_RELEASE"
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+ fi
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "$sc_cpu_version" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "$sc_kernel_bits" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "$HP_ARCH" = "" ]; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ "$HP_ARCH" = hppa2.0w ]
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
+ exit ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo "$UNAME_MACHINE"-unknown-osf1mk
+ else
+ echo "$UNAME_MACHINE"-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ *:BSD/OS:*:*)
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+ fi
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case "$UNAME_PROCESSOR" in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ i*:CYGWIN*:*)
+ echo "$UNAME_MACHINE"-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo "$UNAME_MACHINE"-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo "$UNAME_MACHINE"-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
+ exit ;;
+ i*:PW*:*)
+ echo "$UNAME_MACHINE"-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case "$UNAME_MACHINE" in
+ x86)
+ echo i586-pc-interix"$UNAME_RELEASE"
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix"$UNAME_RELEASE"
+ exit ;;
+ esac ;;
+ i*:UWIN*:*)
+ echo "$UNAME_MACHINE"-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-pc-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
+ exit ;;
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+ else
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ cris:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ crisv32:Linux:*:*)
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ frv:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ hexagon:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ ia64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m32r*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ m68*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-"$LIBC"
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-"$LIBC"
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-"$LIBC"
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-"$LIBC"
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-"$LIBC"
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+ exit ;;
+ sh64*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sh*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ tile*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ vax:Linux:*:*)
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+ exit ;;
+ x86_64:Linux:*:*)
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo "$UNAME_MACHINE"-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo "$UNAME_MACHINE"-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo "$UNAME_MACHINE"-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo "$UNAME_MACHINE"-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ i*86:*DOS:*:*)
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+ else
+ echo "$UNAME_MACHINE"-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv"$UNAME_RELEASE"
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo "$UNAME_MACHINE"-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo "$UNAME_MACHINE"-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux"$UNAME_RELEASE"
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv"$UNAME_RELEASE"
+ else
+ echo mips-unknown-sysv"$UNAME_RELEASE"
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Rhapsody:*:*)
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ # shellcheck disable=SC2154
+ if test "$cputype" = 386; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo "$UNAME_MACHINE"-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux"$UNAME_RELEASE"
+ exit ;;
+ *:DragonFly:*:*)
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "$UNAME_MACHINE" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
+ exit ;;
+ i*86:rdos:*:*)
+ echo "$UNAME_MACHINE"-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo "$UNAME_MACHINE"-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
+ exit ;;
+ *:Unleashed:*:*)
+ echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+ exit ;;
+esac
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) /* >= ULTRIX4 */
+ printf ("mips-dec-ultrix4\n"); exit (0);
+#else
+#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST)
+ printf ("mips-dec-ultrix3\n"); exit (0);
+#endif
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
--- /dev/null
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-01-05'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ os=${os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ os=${os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $os in
+ irix*)
+ ;;
+ *)
+ os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $os in
+ nextstep* )
+ ;;
+ ns2*)
+ os=nextstep2
+ ;;
+ *)
+ os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ os=${os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
+ ;;
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
+ ;;
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
+ ;;
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
+ ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ os=${os:-unicosmp}
+ ;;
+ c90-unknown | c90-cray)
+ vendor=cray
+ os=${os:-unicos}
+ ;;
+ fx80-unknown)
+ vendor=alliant
+ ;;
+ romp-unknown)
+ vendor=ibm
+ ;;
+ mmix-unknown)
+ vendor=knuth
+ ;;
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
+ ;;
+ rs6000-unknown)
+ vendor=ibm
+ ;;
+ vax-unknown)
+ vendor=dec
+ ;;
+ pdp11-unknown)
+ vendor=dec
+ ;;
+ we32k-unknown)
+ vendor=att
+ ;;
+ cydra-unknown)
+ vendor=cydrome
+ ;;
+ i370-ibm*)
+ vendor=ibm
+ ;;
+ orion-unknown)
+ vendor=highlevel
+ ;;
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
+ ;;
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ os=${os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ os=linux
+ ;;
+ c54x-*)
+ cpu=tic54x
+ ;;
+ c55x-*)
+ cpu=tic55x
+ ;;
+ c6x-*)
+ cpu=tic6x
+ ;;
+ e500v[12]-*)
+ cpu=powerpc
+ os=$os"spe"
+ ;;
+ mips3*-*)
+ cpu=mips64
+ ;;
+ ms1-*)
+ cpu=mt
+ ;;
+ m68knommu-*)
+ cpu=m68k
+ os=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ ppc-* | ppcbe-*)
+ cpu=powerpc
+ ;;
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
+ ;;
+ ppc64-*)
+ cpu=powerpc64
+ ;;
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
+ ;;
+ sb1-*)
+ cpu=mipsisa64sb1
+ ;;
+ sb1el-*)
+ cpu=mipsisa64sb1el
+ ;;
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+ ;;
+ spur-*)
+ cpu=spur
+ ;;
+ strongarm-* | thumb-*)
+ cpu=arm
+ ;;
+ tx39-*)
+ cpu=mipstx39
+ ;;
+ tx39el-*)
+ cpu=mipstx39el
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+ ;;
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ os=${os:-elf}
+ ;;
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
+ ;;
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
+ ;;
+ crx-*)
+ os=${os:-elf}
+ ;;
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
+ ;;
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
+ ;;
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
+ ;;
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
+ ;;
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
+ ;;
+ s390-*)
+ cpu=s390
+ vendor=ibm
+ ;;
+ s390x-*)
+ cpu=s390x
+ vendor=ibm
+ ;;
+ tile*-*)
+ os=${os:-linux-gnu}
+ ;;
+
+ *)
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv64 \
+ | rl78 | romp | rs6000 | rx \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 | wasm32 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x$os != x ]
+then
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ qnx*)
+ case $cpu in
+ x86 | i*86)
+ ;;
+ *)
+ os=nto-$os
+ ;;
+ esac
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ nto-qnx*)
+ ;;
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+ ;;
+ linux-dietlibc)
+ os=linux-dietlibc
+ ;;
+ linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ nsk*)
+ os=nsk
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ # This must come after sysvr4.
+ sysv*)
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ zvmoe)
+ os=zvmoe
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ nacl*)
+ ;;
+ ios)
+ ;;
+ none)
+ ;;
+ *-eabi)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ os=linux
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $os in
+ riscix*)
+ vendor=acorn
+ ;;
+ sunos*)
+ vendor=sun
+ ;;
+ cnk*|-aix*)
+ vendor=ibm
+ ;;
+ beos*)
+ vendor=be
+ ;;
+ hpux*)
+ vendor=hp
+ ;;
+ mpeix*)
+ vendor=hp
+ ;;
+ hiux*)
+ vendor=hitachi
+ ;;
+ unos*)
+ vendor=crds
+ ;;
+ dgux*)
+ vendor=dg
+ ;;
+ luna*)
+ vendor=omron
+ ;;
+ genix*)
+ vendor=ns
+ ;;
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
+ vendor=ibm
+ ;;
+ os400*)
+ vendor=ibm
+ ;;
+ ptx*)
+ vendor=sequent
+ ;;
+ tpf*)
+ vendor=ibm
+ ;;
+ vxsim* | vxworks* | windiss*)
+ vendor=wrs
+ ;;
+ aux*)
+ vendor=apple
+ ;;
+ hms*)
+ vendor=hitachi
+ ;;
+ mpw* | macos*)
+ vendor=apple
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ vendor=atari
+ ;;
+ vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
+++ /dev/null
---- a/conserver/cutil.h
-+++ b/conserver/cutil.h
-@@ -7,6 +7,8 @@
- #include <stdarg.h>
- #if HAVE_OPENSSL
- # include <openssl/ssl.h>
-+# include <openssl/bn.h>
-+# include <openssl/dh.h>
- # include <openssl/err.h>
- # if OPENSSL_VERSION_NUMBER < 0x10100000L
- # define TLS_method SSLv23_method
PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_RELEASE:=7
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli
$(INSTALL_DIR) $(1)/lib/firewall
- $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh
endef
$(eval $(call BuildPackage,coova-chilli))
# Script executed after network interface has been brought up.
# Executed with the following parameters: <devicename> <ip address>
# <mask>
- # Normally you do not need to uncomment this option.
- #option ipup /etc/chilli.ipup
+ # Normally you do not need to modify this option.
+ option ipup /etc/chilli/up.sh
# Script executed after network interface has been taken down.
# Executed with the following parameters: <devicename> <ip address>
# <mask>
- # Normally you do not need to uncomment this option.
- #option ipdown /etc/chilli.ipdown
+ # Normally you do not need to modify this option.
+ option ipdown /etc/chilli/down.sh
# Radius parameters
+++ /dev/null
-#!/bin/sh
-
-chilli_firewall() {
- local cfg="$1"
-
- local network ifname tun
-
- config_get network "$cfg" network
-
- . /lib/functions/network.sh
- network_get_device ifname ${network:-lan}
-
- if [ "$ifname" = "" ]
- then
- config_get ifname "$cfg" dhcpif
- fi
-
- config_get tun "$cfg" tundev
-
- for n in ACCEPT DROP REJECT
- do
- iptables -F zone_${network}_${n}
- iptables -I zone_${network}_${n} -i $tun -j $n
- iptables -I zone_${network}_${n} -o $tun -j $n
- done
-
- iptables -D forward -i ${ifname} -j zone_${network}_forward
- iptables -A forward -i ${ifname} -j DROP
- iptables -A forward -i $tun -j zone_${network}_forward
-
- iptables -D input -i ${ifname} -j zone_${network}
- iptables -A input -i $tun -j zone_${network}
-
- iptables -I zone_${network} -p tcp --dport 3990 -j ACCEPT
- iptables -I zone_${network} -p tcp --dport 3991 -j ACCEPT
-}
-
-chilli_post_core_cb() {
- config_load chilli
- config_foreach chilli_firewall chilli
-}
PKG_VERSION:=2.7.8
# Release == build
# increase on changes of services files or tld_names.dat
-PKG_RELEASE:=6
+PKG_RELEASE:=8
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=
# lets prefer GNU Wget because it does all for us - IPv4/IPv6/HTTPS/PROXY/force IP version
if [ -n "$WGET_SSL" -a $USE_CURL -eq 0 ]; then # except global option use_curl is set to "1"
- __PROG="$WGET_SSL -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
+ __PROG="$WGET_SSL --hsts-file=/tmp/.wget-hsts -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
# force network/ip to use for communication
if [ -n "$bind_network" ]; then
local __BINDIP
--- /dev/null
+#!/bin/sh
+#
+# script to determine and return SLAAC ipv6 address using prefix from a locally configured interface and the MAC address of the device
+# (c) 2018 Keve Mueller <keve at keve dot hu>
+#
+# activated inside /etc/config/ddns by setting
+#
+# option ip_source 'script'
+# option ip_script '/usr/lib/ddns/slaac_sample.sh br-lan AA:BB:CC:DD:EE:FF'
+#
+# the script is executed (not parsed) inside get_local_ip() function
+# of /usr/lib/ddns/dynamic_dns_functions.sh
+#
+# useful when this box is the only DDNS client in the network and other clients use SLAAC
+# so no need to install ddns client on every "internal" box
+#
+# NB: this will not catch the actual IPV6 used by the host when it is configured to use temporary addresses
+
+#NB: we need a valid MAC address that is fully expanded with leading zeroes on all positions
+format_eui_64() {
+ local macaddr="$1"
+ echo ${macaddr:0:1}$(echo ${macaddr:1:1}|tr 0123456789abcdefABCDEF 23016745ab89efcd89efcd)${macaddr:3:2}:${macaddr:6:2}ff:fe${macaddr:9:2}:${macaddr:12:2}${macaddr:15:2}
+}
+
+# expand :: in an ipv6 address specification to the appropriate series of 0:
+# result will have 8 ipv6 fragments separated by single colon
+# NB: input must be a valid IPv6 address, e.g. ::1
+# NB: numbers are not prepended with leading zeroes
+expand_ipv6_colons() {
+ local ipv6=$1
+# we need :: to be in the middle, so prepend a 0 if the input starts with : and append 0 if it ends with it
+ if [ "${ipv6:0:1}" = ":" ]; then ipv6=0${ipv6}; fi
+ if [ "${ipv6: -1:1}" = ":" ]; then ipv6=${ipv6}0; fi
+# retain only the real colons
+ local colons=${ipv6//::|[0123456789abcdefABCDEF]/}
+# count them
+ local num_colons=${#colons}
+ local filler=":0:0:0:0:0:0:"
+# replace the :: with the appropriate substring from filler
+ local ipv6_x=${ipv6/::/${filler:0:(7-$num_colons)*2-1}}
+ echo $ipv6_x
+}
+
+# obtain the first ipv6 address of the device passed in $1
+addr_net=$(ip -6 -o addr show dev $1 scope global up | cut -d" " -f 7 | head -1)
+#addr_net=$1
+addr=${addr_net%/*}
+# TODO: we assume /64 subnet
+# get the first 64 bits of the address
+prefix=$(expand_ipv6_colons $addr | cut -d: -f -4)
+# compute the SLAAC 64 bits from the MAC
+suffix=$(format_eui_64 "$2")
+
+echo -n $prefix:$suffix
+exit 0
+
+#echo "Should never come here" >&2
+#exit 2
+
SUBMENU:=wireless
DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio
TITLE:=Dynamic access point manager
+ PKGARCH:=all
endef
define Package/dynapoint/description
PKG_NAME:=e2guardian
PKG_VERSION:=3.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf"
validate_e2guardian_section() {
- uci_validate_section e2guardian e2guardian "${1}" \
+ uci_load_validate e2guardian e2guardian "$1" "$2" \
'accessdeniedaddress:string' \
'bannediplist:string' \
'contentscanexceptions:string' \
'weightedphrasemode:range(0,2)'
}
-start_service() {
-
- local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \
- createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \
- downloadmanager exceptioniplist filecachedir loglocation \
- filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \
- initialtrickledelay ipcfilename ipipcfilename language languagedir logadblocks logchildprocesshandling \
- logclienthostnames logconnectionhandlingerrors logexceptionhits logfileformat loglevel loguseragent \
- maxagechildren maxchildren maxcontentfilecachescansize maxcontentfiltersize maxcontentramcachescansize \
- maxips maxsparechildren maxuploadsize minchildren minsparechildren nodaemon nologger \
- pcontimeout perroomdirectory phrasefiltermode prefercachedlists preforkchildren preservecase proxyexchange \
- proxyip proxyport proxytimeout recheckreplacedurls reverseaddresslookups reverseclientiplookups scancleancache \
- showweightedfound softrestart trickledelay urlcacheage urlcachenumber urlipcfilename usecustombannedflash \
- usecustombannedimage usexforwardedfor weightedphrasemode
-
- validate_e2guardian_section e2guardian || {
+start_e2guardian_instance() {
+
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
}
+start_service()
+{
+ validate_e2guardian_section e2guardian start_e2guardian_instance
+}
+
stop_service()
{
PID=`cat /tmp/e2guardian/e2guardian.pid`
include $(TOPDIR)/rules.mk
PKG_NAME:=fping
-PKG_VERSION:=4.1
+PKG_VERSION:=4.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://fping.org/dist/
-PKG_HASH:=2733e2a18cc2b5b935c4e3b5b84ccf2080c38043f1864d7c43326e8048ddab73
+PKG_SOURCE_URL:=https://fping.org/dist/
+PKG_HASH:=7d339674b6a95aae1d8ad487ff5056fd95b474c3650938268f6a905c3771b64a
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=BSD-4-Clause
SECTION:=net
CATEGORY:=Network
TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
- URL:=http://fping.org/
+ URL:=https://fping.org/
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_17
-PKG_RELEASE:=2
+PKG_VERSION:=release_3_0_18
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
+PKG_HASH:=c6802e3ec675b1cf59c850b0f01ed088e2983c5c4daa7f64cc22be4e6ad13ae5
-PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
+PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYRIGHT LICENSE
define Package/freeradius3-common
$(call Package/freeradius3/Default)
TITLE:=common files
- DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +PACKAGE_libpcre:libpcre +libreadline +libtalloc
+ DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +PACKAGE_libpcre:libpcre +libreadline +libtalloc +libatomic
endef
define Package/freeradius3-default
/etc/freeradius3/mods-enabled/realm
endef
-# SQL support has not been ported
+define Package/freeradius3-mod-sql
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3
+ TITLE:=Radius generic SQL front-end
+endef
+
+define Package/freeradius3-mod-sql/conffiles
+/etc/freeradius3/mods-available/sql
+endef
+
+define Package/freeradius3-mod-sql-mysql
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql +libmysqlclient
+ TITLE:=Radius MySQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/mysql
+endef
+
+define Package/freeradius3-mod-sql-null
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql
+ TITLE:=Radius Dummy SQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-postgresql
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql +libpq
+ TITLE:=Radius PostgreSQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/postgresql
+endef
+
+define Package/freeradius3-mod-sql-sqlite
+ $(call Package/freeradius3/Default)
+ DEPENDS:=freeradius3-mod-sql +libsqlite3
+ TITLE:=Radius SQLite back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/sqlite
+endef
+
+define Package/freeradius3-mod-sqlcounter
+ $(call Package/freeradius3/Default)
+ DEPENDS:=+freeradius3-mod-sql
+ TITLE:=Packet counter using accounting records written into an SQL database
+endef
+
+define Package/freeradius3-mod-sqlcounter/conffiles
+/etc/freeradius3/mods-config/sql/counter
+/etc/freeradius3/mods-available/sqlcounter
+endef
+
+define Package/freeradius3-mod-sqlippool
+ $(call Package/freeradius3/Default)
+ DEPENDS:=+freeradius3-mod-sql
+ TITLE:=Radius SQL Based IP Pool module
+endef
+
+define Package/freeradius3-mod-sqlippool/conffiles
+/etc/freeradius3/mods-config/sql/ippool
+/etc/freeradius3/mods-config/sql/ippool-dhcp
+/etc/freeradius3/mods-available/dhcp_sqlippool
+/etc/freeradius3/mods-available/sqlippool
+endef
define Package/freeradius3-mod-radutmp
$(call Package/freeradius3/Default)
TITLE:=Misc. client utilities
endef
+# This is a workaround for a bug in configure.ac, that does not check
+# for the openss/rand.h header. Setting the macro is safe for openwrt,
+# and faster than rebuilding configure.
+# This has been fixed upstream in the 3.0.x branch, and should not be
+# needed in a future release.
+EXTRA_CFLAGS+= -DHAVE_OPENSSL_RAND_H
+
CONFIGURE_ARGS+= \
--libdir=/usr/lib/freeradius3 \
--libexecdir=/usr/lib/freeradius3 \
--without-rlm_ruby \
--without-rlm_securid \
--without-rlm_smsotp \
- --without-rlm_sql \
--without-rlm_sql_db2 \
--without-rlm_sql_firebird \
--without-rlm_sql_freetds \
--without-rlm_sql_iodbc \
- --without-rlm_sql_mysql \
--without-rlm_sql_oracle \
- --without-rlm_sql_postgresql \
- --without-rlm_sql_sqlite \
--without-rlm_sql_unixodbc \
- --without-rlm_sqlcounter \
- --without-rlm_sqlhpwippool \
- --without-rlm_sqlippool \
--without-rlm_unbound \
--without-rlm_yubikey \
+CONFIGURE_LIBS+= -latomic
+
PKG_DICTIONARIES:= \
compat \
freeradius freeradius.internal \
CONFIGURE_ARGS+= --without-rlm_eap_pwd
endif
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql),)
+ CONFIGURE_ARGS+= --with-rlm_sql
+else
+ CONFIGURE_ARGS+= --without-rlm_sql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-mysql),)
+ CONFIGURE_ARGS+= \
+ --with-rlm_sql_mysql \
+ --with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql"
+else
+ CONFIGURE_ARGS+= --without-rlm_sql_mysql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-postgresql),)
+ CONFIGURE_ARGS+= --with-rlm_sql_postgresql
+else
+ CONFIGURE_ARGS+= --without-rlm_sql_postgresql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-sqlite),)
+ CONFIGURE_ARGS+= --with-rlm_sql_sqlite
+else
+ CONFIGURE_ARGS+= --without-rlm_sql_sqlite
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sqlcounter),)
+ CONFIGURE_ARGS+= --with-rlm_sqlcounter
+else
+ CONFIGURE_ARGS+= --without-rlm_sqlcounter
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sqlippool),)
+ CONFIGURE_ARGS+= --with-rlm_sqlippool
+else
+ CONFIGURE_ARGS+= --without-rlm_sqlippool
+endif
+
ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),)
CONFIGURE_ARGS+= --with-rlm_radutmp
else
$(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
$(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
$(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-mysql,rlm_sql_mysql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-null,rlm_sql_null,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-postgresql,rlm_sql_postgresql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-sqlite,rlm_sql_sqlite,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlcounter,rlm_sqlcounter,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlippool,rlm_sqlippool,))
$(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
$(eval $(call BuildPackage,freeradius3-utils))
return state;
}
-@@ -3151,7 +3151,7 @@ post_ca:
+@@ -3277,7 +3277,7 @@ post_ca:
/*
* Callbacks, etc. for session resumption.
*/
/*
* Cache sessions on disk if requested.
*/
-@@ -3221,7 +3221,7 @@ post_ca:
+@@ -3347,7 +3347,7 @@ post_ca:
/*
* Setup session caching
*/
PKG_NAME:=gnunet
-PKG_VERSION:=0.11.0
+PKG_VERSION:=0.11.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gnunet
-PKG_HASH:=b7477a3c3b0d5e8a013685dc208cfb4ccee4145f8668faa8eb5b382af36c7e9a
+PKG_HASH:=2405db9232ae6ded57e7ff513abdf810c65e3861823b3985717ce990b8d87a37
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
( for bin in arm ats ats-new cadet core config ecc identity nat nat-auto nat-server nse \
- peerinfo revocation scalarproduct scrypt statistics transport uri; do \
+ peerinfo peerstore revocation scalarproduct scrypt statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
( for lib in arm ats atsapplication atstransport block blockgroup cadet \
core datacache dht dns dnsparser fragmentation friends hello \
- identity natauto natnew nse nt peerinfo regexblock regex revocation \
- scalarproduct set statistics transport transportaddress \
+ identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \
+ scalarproduct set statistics transport transportaddress transportapplication \
transportcommunicator transportcore transportmonitor util; do \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
- ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix; do \
+ ( for plug in ats_proportional ats2_simple block_dht block_regex block_revocation transport_unix; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
done )
( for lex in daemon-topology helper-nat-client \
- helper-nat-server service-arm service-ats service-cadet \
+ helper-nat-server service-arm service-ats service-ats-new service-cadet \
service-core service-dht service-identity service-nat service-nat-auto \
- service-nse service-peerinfo service-regex \
+ service-nse service-peerinfo service-peerstore service-regex \
service-revocation service-scalarproduct-alice \
service-scalarproduct-bob service-scalarproduct-ecc-alice \
service-scalarproduct-ecc-bob service-set service-statistics \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
done )
- ( for conf in arm ats cadet core datacache dht identity identity-provider \
- nat nat-auto nse peerinfo regex revocation scalarproduct \
- set statistics topology transport util; do \
+ ( for conf in arm ats cadet communicator-unix core datacache dht identity \
+ identity-provider nat nat-auto nse peerinfo peerstore regex revocation \
+ scalarproduct set statistics topology transport util; do \
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
done )
$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
endef
+BIN_auction:=auction-create auction-info auction-join
+LIBEXEC_auction:=service-auction
+CONF_auction:=auction
+DEPENDS_auction:=+gnunet-reclaim +jansson
+
DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
BIN_conversation:=conversation conversation-test
LIB_conversation:=conversation microphone speaker
DEPENDS_transport-http_server:=+libmicrohttpd-ssl
PLUGIN_transport-http_server:=transport_http_server transport_https_server
+BIN_transport-http_server:=transport-certificate-creation
PLUGIN_transport-tcp:=transport_tcp
PLUGIN_transport-wlan:=transport_wlan
LIBEXEC_transport-wlan:=helper-transport-wlan
-PLUGIN_transport-xt:=transport_xt
-
-PLUGIN_transport-xu:=transport_xu
DEPENDS_experiments:=+libglpk
PLUGIN_experiments:=ats_mlp ats_ril
LIBEXEC_dv:=service-dv
CONF_dv:=dv
-DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor
+DEPENDS_fs:=+gnunet-datastore +libextractor
BIN_fs:=auto-share directory download fs publish unindex search
LIB_fs:=fs
PLUGIN_fs:=block_fs
DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra
USERID_gns:=gnunet=958:gnunetdns=452
-BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
+BIN_gns:=gns gns-import.sh gns-proxy-setup-ca namecache namestore resolver zoneimport
LIB_gns:=gns gnsrecord namecache namestore
PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
LIBEXEC_datastore:=service-datastore
CONF_datastore:=datastore
-BIN_peerstore:=peerstore
-LIB_peerstore:=peerstore
-LIBEXEC_peerstore:=service-peerstore
-CONF_peerstore:=peerstore
-
-DEPENDS_auction:=+gnunet-reclaim
-BIN_auction:=auction-create auction-info auction-join
-LIBEXEC_auction:=service-auction
-CONF_auction:=auction
DEPENDS_reclaim:=+gnunet-gns +gnunet-sqlite +libpbc +libgabe
BIN_reclaim:=credential reclaim
LIB_reclaim:=consensus credential abe reclaim reclaimattribute secretsharing
LIBEXEC_reclaim:=service-consensus service-credential service-reclaim service-secretsharing
-CONF_reclaim:=consensus reclaim secretsharing
+CONF_reclaim:=consensus credential reclaim secretsharing
PLUGIN_reclaim:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid reclaim_sqlite
DEPENDS_rest:=+gnunet-gns +gnunet-reclaim +libmicrohttpd-ssl +jansson
DEPENDS_gns-flat:=+gnunet-gns
PLUGIN_gns-flat:=namecache_flat namestore_heap
-DEPENDS_peerstore-flat:=+gnunet-peerstore
PLUGIN_peerstore-flat:=peerstore_flat
DEPENDS_fs-heap:=+gnunet-datastore
PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite
CONFLICTS_gns-sqlite:=gnunet-gns-flat
-DEPENDS_peerstore-sqlite:=+gnunet-peerstore +gnunet-sqlite
+DEPENDS_peerstore-sqlite:=+gnunet-sqlite
PLUGIN_peerstore-sqlite:=peerstore_sqlite
CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat
$(eval $(call PostInstFixSUIDPerms,gnunet-vpn))
$(eval $(call BuildPackage,gnunet))
+$(eval $(call BuildComponent,auction,auction components,))
$(eval $(call BuildComponent,conversation,conversation component,))
$(eval $(call BuildComponent,curl,cURL wrapper component,))
$(eval $(call BuildComponent,datastore,data storage components,))
$(eval $(call BuildComponent,gns,name resolution components,y))
$(eval $(call BuildComponent,gns-proxy,gns-proxy component,))
$(eval $(call BuildComponent,hostlist,HTTP bootstrap hostlist client and server,y))
-$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
$(eval $(call BuildComponent,reclaim,reclaim identity-provider subsystem,))
$(eval $(call BuildComponent,rest,REST interface,))
$(eval $(call BuildComponent,rps,RPS routing component,y))
$(eval $(call BuildComponent,transport-tcp,TCP transport,y))
$(eval $(call BuildComponent,transport-udp,UDP transport,y))
$(eval $(call BuildComponent,transport-wlan,WLAN transport,y))
-$(eval $(call BuildComponent,transport-xt,xt transport,))
-$(eval $(call BuildComponent,transport-xu,xu transport,))
$(eval $(call BuildComponent,utils,administration utililties,))
$(eval $(call BuildComponent,vpn,vpn components,y))
+++ /dev/null
-From 6603f7e1a837d3a51a1949a6f4e1802b6ef3d806 Mon Sep 17 00:00:00 2001
-From: "Schanzenbach, Martin" <mschanzenbach@posteo.de>
-Date: Thu, 28 Feb 2019 14:19:34 +0100
-Subject: [PATCH] fix dist for experimental
-
----
- po/POTFILES.in | 114 ++++++++++++++++++++--------------------
- src/include/Makefile.am | 1 +
- 2 files changed, 58 insertions(+), 57 deletions(-)
-
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -4,6 +4,14 @@ src/arm/arm_monitor_api.c
- src/arm/gnunet-arm.c
- src/arm/gnunet-service-arm.c
- src/arm/mockup-service.c
-+src/ats-tests/ats-testing-experiment.c
-+src/ats-tests/ats-testing-log.c
-+src/ats-tests/ats-testing-preferences.c
-+src/ats-tests/ats-testing-traffic.c
-+src/ats-tests/ats-testing.c
-+src/ats-tests/gnunet-ats-sim.c
-+src/ats-tests/gnunet-solver-eval.c
-+src/ats-tool/gnunet-ats.c
- src/ats/ats_api2_application.c
- src/ats/ats_api2_transport.c
- src/ats/ats_api_connectivity.c
-@@ -11,10 +19,10 @@ src/ats/ats_api_performance.c
- src/ats/ats_api_scanner.c
- src/ats/ats_api_scheduling.c
- src/ats/gnunet-ats-solver-eval.c
--src/ats/gnunet-service-ats_addresses.c
-+src/ats/gnunet-service-ats-new.c
- src/ats/gnunet-service-ats.c
-+src/ats/gnunet-service-ats_addresses.c
- src/ats/gnunet-service-ats_connectivity.c
--src/ats/gnunet-service-ats-new.c
- src/ats/gnunet-service-ats_normalization.c
- src/ats/gnunet-service-ats_performance.c
- src/ats/gnunet-service-ats_plugins.c
-@@ -26,14 +34,6 @@ src/ats/plugin_ats2_simple.c
- src/ats/plugin_ats_mlp.c
- src/ats/plugin_ats_proportional.c
- src/ats/plugin_ats_ril.c
--src/ats-tests/ats-testing.c
--src/ats-tests/ats-testing-experiment.c
--src/ats-tests/ats-testing-log.c
--src/ats-tests/ats-testing-preferences.c
--src/ats-tests/ats-testing-traffic.c
--src/ats-tests/gnunet-ats-sim.c
--src/ats-tests/gnunet-solver-eval.c
--src/ats-tool/gnunet-ats.c
- src/auction/gnunet-auction-create.c
- src/auction/gnunet-auction-info.c
- src/auction/gnunet-auction-join.c
-@@ -50,8 +50,8 @@ src/cadet/cadet_api_list_peers.c
- src/cadet/cadet_api_list_tunnels.c
- src/cadet/cadet_test_lib.c
- src/cadet/desirability_table.c
--src/cadet/gnunet-cadet.c
- src/cadet/gnunet-cadet-profiler.c
-+src/cadet/gnunet-cadet.c
- src/cadet/gnunet-service-cadet.c
- src/cadet/gnunet-service-cadet_channel.c
- src/cadet/gnunet-service-cadet_connection.c
-@@ -67,15 +67,15 @@ src/consensus/gnunet-service-consensus.c
- src/consensus/plugin_block_consensus.c
- src/conversation/conversation_api.c
- src/conversation/conversation_api_call.c
--src/conversation/gnunet-conversation.c
- src/conversation/gnunet-conversation-test.c
--src/conversation/gnunet_gst.c
--src/conversation/gnunet_gst_test.c
--src/conversation/gnunet-helper-audio-playback.c
-+src/conversation/gnunet-conversation.c
- src/conversation/gnunet-helper-audio-playback-gst.c
--src/conversation/gnunet-helper-audio-record.c
-+src/conversation/gnunet-helper-audio-playback.c
- src/conversation/gnunet-helper-audio-record-gst.c
-+src/conversation/gnunet-helper-audio-record.c
- src/conversation/gnunet-service-conversation.c
-+src/conversation/gnunet_gst.c
-+src/conversation/gnunet_gst_test.c
- src/conversation/microphone.c
- src/conversation/plugin_gnsrecord_conversation.c
- src/conversation/speaker.c
-@@ -111,7 +111,6 @@ src/dht/dht_api.c
- src/dht/dht_test_lib.c
- src/dht/gnunet-dht-get.c
- src/dht/gnunet-dht-monitor.c
--src/dht/gnunet_dht_profiler.c
- src/dht/gnunet-dht-put.c
- src/dht/gnunet-service-dht.c
- src/dht/gnunet-service-dht_clients.c
-@@ -120,6 +119,7 @@ src/dht/gnunet-service-dht_hello.c
- src/dht/gnunet-service-dht_neighbours.c
- src/dht/gnunet-service-dht_nse.c
- src/dht/gnunet-service-dht_routing.c
-+src/dht/gnunet_dht_profiler.c
- src/dht/plugin_block_dht.c
- src/dns/dns_api.c
- src/dns/gnunet-dns-monitor.c
-@@ -129,8 +129,8 @@ src/dns/gnunet-service-dns.c
- src/dns/gnunet-zonewalk.c
- src/dns/plugin_block_dns.c
- src/exit/gnunet-daemon-exit.c
--src/exit/gnunet-helper-exit.c
- src/exit/gnunet-helper-exit-windows.c
-+src/exit/gnunet-helper-exit.c
- src/fragmentation/defragmentation.c
- src/fragmentation/fragmentation.c
- src/fs/fs_api.c
-@@ -155,8 +155,8 @@ src/fs/gnunet-auto-share.c
- src/fs/gnunet-daemon-fsprofiler.c
- src/fs/gnunet-directory.c
- src/fs/gnunet-download.c
--src/fs/gnunet-fs.c
- src/fs/gnunet-fs-profiler.c
-+src/fs/gnunet-fs.c
- src/fs/gnunet-helper-fs-publish.c
- src/fs/gnunet-publish.c
- src/fs/gnunet-search.c
-@@ -176,10 +176,10 @@ src/gns/gns_tld_api.c
- src/gns/gnunet-bcd.c
- src/gns/gnunet-dns2gns.c
- src/gns/gnunet-gns-benchmark.c
--src/gns/gnunet-gns.c
- src/gns/gnunet-gns-helper-service-w32.c
- src/gns/gnunet-gns-import.c
- src/gns/gnunet-gns-proxy.c
-+src/gns/gnunet-gns.c
- src/gns/gnunet-service-gns.c
- src/gns/gnunet-service-gns_interceptor.c
- src/gns/gnunet-service-gns_resolver.c
-@@ -187,19 +187,19 @@ src/gns/nss/nss_gns.c
- src/gns/nss/nss_gns_query.c
- src/gns/plugin_block_gns.c
- src/gns/plugin_gnsrecord_gns.c
-+src/gns/w32nsp-install.c
-+src/gns/w32nsp-resolve.c
-+src/gns/w32nsp-uninstall.c
-+src/gns/w32nsp.c
- src/gnsrecord/gnsrecord.c
- src/gnsrecord/gnsrecord_crypto.c
- src/gnsrecord/gnsrecord_misc.c
- src/gnsrecord/gnsrecord_serialization.c
- src/gnsrecord/plugin_gnsrecord_dns.c
--src/gns/w32nsp.c
--src/gns/w32nsp-install.c
--src/gns/w32nsp-resolve.c
--src/gns/w32nsp-uninstall.c
- src/hello/address.c
- src/hello/gnunet-hello.c
--src/hello/hello.c
- src/hello/hello-ng.c
-+src/hello/hello.c
- src/hostlist/gnunet-daemon-hostlist.c
- src/hostlist/gnunet-daemon-hostlist_client.c
- src/hostlist/gnunet-daemon-hostlist_server.c
-@@ -222,8 +222,8 @@ src/namecache/namecache_api.c
- src/namecache/plugin_namecache_flat.c
- src/namecache/plugin_namecache_postgres.c
- src/namecache/plugin_namecache_sqlite.c
--src/namestore/gnunet-namestore.c
- src/namestore/gnunet-namestore-fcfsd.c
-+src/namestore/gnunet-namestore.c
- src/namestore/gnunet-service-namestore.c
- src/namestore/gnunet-zoneimport.c
- src/namestore/namestore_api.c
-@@ -238,10 +238,10 @@ src/nat-auto/gnunet-service-nat-auto.c
- src/nat-auto/gnunet-service-nat-auto_legacy.c
- src/nat-auto/nat_auto_api.c
- src/nat-auto/nat_auto_api_test.c
--src/nat/gnunet-helper-nat-client.c
- src/nat/gnunet-helper-nat-client-windows.c
--src/nat/gnunet-helper-nat-server.c
-+src/nat/gnunet-helper-nat-client.c
- src/nat/gnunet-helper-nat-server-windows.c
-+src/nat/gnunet-helper-nat-server.c
- src/nat/gnunet-nat.c
- src/nat/gnunet-service-nat.c
- src/nat/gnunet-service-nat_externalip.c
-@@ -250,16 +250,16 @@ src/nat/gnunet-service-nat_mini.c
- src/nat/gnunet-service-nat_stun.c
- src/nat/nat_api.c
- src/nat/nat_api_stun.c
--src/nse/gnunet-nse.c
- src/nse/gnunet-nse-profiler.c
-+src/nse/gnunet-nse.c
- src/nse/gnunet-service-nse.c
- src/nse/nse_api.c
- src/nt/nt.c
-+src/peerinfo-tool/gnunet-peerinfo.c
-+src/peerinfo-tool/gnunet-peerinfo_plugins.c
- src/peerinfo/gnunet-service-peerinfo.c
- src/peerinfo/peerinfo_api.c
- src/peerinfo/peerinfo_api_notify.c
--src/peerinfo-tool/gnunet-peerinfo.c
--src/peerinfo-tool/gnunet-peerinfo_plugins.c
- src/peerstore/gnunet-peerstore.c
- src/peerstore/gnunet-service-peerstore.c
- src/peerstore/peerstore_api.c
-@@ -295,7 +295,6 @@ src/regex/regex_internal_dht.c
- src/regex/regex_test_graph.c
- src/regex/regex_test_lib.c
- src/regex/regex_test_random.c
--src/rest/gnunet-rest-server.c
- src/rest-plugins/json_reclaim.c
- src/rest-plugins/oidc_helper.c
- src/rest-plugins/plugin_rest_copying.c
-@@ -306,27 +305,28 @@ src/rest-plugins/plugin_rest_namestore.c
- src/rest-plugins/plugin_rest_openid_connect.c
- src/rest-plugins/plugin_rest_peerinfo.c
- src/rest-plugins/plugin_rest_reclaim.c
-+src/rest/gnunet-rest-server.c
- src/rest/rest.c
- src/revocation/gnunet-revocation.c
- src/revocation/gnunet-service-revocation.c
- src/revocation/plugin_block_revocation.c
- src/revocation/revocation_api.c
--src/rps/gnunet-rps.c
- src/rps/gnunet-rps-profiler.c
-+src/rps/gnunet-rps.c
- src/rps/gnunet-service-rps.c
- src/rps/gnunet-service-rps_custommap.c
- src/rps/gnunet-service-rps_sampler.c
- src/rps/gnunet-service-rps_sampler_elem.c
- src/rps/gnunet-service-rps_view.c
--src/rps/rps_api.c
- src/rps/rps-sampler_client.c
- src/rps/rps-sampler_common.c
- src/rps/rps-test_util.c
-+src/rps/rps_api.c
- src/scalarproduct/gnunet-scalarproduct.c
--src/scalarproduct/gnunet-service-scalarproduct_alice.c
--src/scalarproduct/gnunet-service-scalarproduct_bob.c
- src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
- src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
-+src/scalarproduct/gnunet-service-scalarproduct_alice.c
-+src/scalarproduct/gnunet-service-scalarproduct_bob.c
- src/scalarproduct/scalarproduct_api.c
- src/secretsharing/gnunet-secretsharing-profiler.c
- src/secretsharing/gnunet-service-secretsharing.c
-@@ -352,15 +352,16 @@ src/statistics/gnunet-statistics.c
- src/statistics/statistics_api.c
- src/template/gnunet-service-template.c
- src/template/gnunet-template.c
-+src/testbed-logger/gnunet-service-testbed-logger.c
-+src/testbed-logger/testbed_logger_api.c
- src/testbed/generate-underlay-topology.c
- src/testbed/gnunet-daemon-latency-logger.c
- src/testbed/gnunet-daemon-testbed-blacklist.c
- src/testbed/gnunet-daemon-testbed-underlay.c
- src/testbed/gnunet-helper-testbed.c
--src/testbed/gnunet_mpi_test.c
- src/testbed/gnunet-service-test-barriers.c
--src/testbed/gnunet-service-testbed_barriers.c
- src/testbed/gnunet-service-testbed.c
-+src/testbed/gnunet-service-testbed_barriers.c
- src/testbed/gnunet-service-testbed_cache.c
- src/testbed/gnunet-service-testbed_connectionpool.c
- src/testbed/gnunet-service-testbed_cpustatus.c
-@@ -368,20 +369,19 @@ src/testbed/gnunet-service-testbed_links
- src/testbed/gnunet-service-testbed_meminfo.c
- src/testbed/gnunet-service-testbed_oc.c
- src/testbed/gnunet-service-testbed_peers.c
--src/testbed/gnunet_testbed_mpi_spawn.c
- src/testbed/gnunet-testbed-profiler.c
--src/testbed-logger/gnunet-service-testbed-logger.c
--src/testbed-logger/testbed_logger_api.c
--src/testbed/testbed_api_barriers.c
-+src/testbed/gnunet_mpi_test.c
-+src/testbed/gnunet_testbed_mpi_spawn.c
- src/testbed/testbed_api.c
-+src/testbed/testbed_api_barriers.c
- src/testbed/testbed_api_hosts.c
- src/testbed/testbed_api_operations.c
- src/testbed/testbed_api_peers.c
- src/testbed/testbed_api_sd.c
- src/testbed/testbed_api_services.c
- src/testbed/testbed_api_statistics.c
--src/testbed/testbed_api_testbed.c
- src/testbed/testbed_api_test.c
-+src/testbed/testbed_api_testbed.c
- src/testbed/testbed_api_topology.c
- src/testbed/testbed_api_underlay.c
- src/testing/gnunet-testing.c
-@@ -393,29 +393,29 @@ src/transport/gnunet-communicator-tcp.c
- src/transport/gnunet-communicator-udp.c
- src/transport/gnunet-communicator-unix.c
- src/transport/gnunet-helper-transport-bluetooth.c
--src/transport/gnunet-helper-transport-wlan.c
- src/transport/gnunet-helper-transport-wlan-dummy.c
-+src/transport/gnunet-helper-transport-wlan.c
- src/transport/gnunet-service-tng.c
--src/transport/gnunet-service-transport_ats.c
- src/transport/gnunet-service-transport.c
-+src/transport/gnunet-service-transport_ats.c
- src/transport/gnunet-service-transport_hello.c
- src/transport/gnunet-service-transport_manipulation.c
- src/transport/gnunet-service-transport_neighbours.c
- src/transport/gnunet-service-transport_plugins.c
- src/transport/gnunet-service-transport_validation.c
--src/transport/gnunet-transport.c
- src/transport/gnunet-transport-certificate-creation.c
- src/transport/gnunet-transport-profiler.c
- src/transport/gnunet-transport-wlan-receiver.c
- src/transport/gnunet-transport-wlan-sender.c
-+src/transport/gnunet-transport.c
- src/transport/plugin_transport_http_client.c
- src/transport/plugin_transport_http_common.c
- src/transport/plugin_transport_http_server.c
- src/transport/plugin_transport_smtp.c
- src/transport/plugin_transport_tcp.c
- src/transport/plugin_transport_template.c
--src/transport/plugin_transport_udp_broadcasting.c
- src/transport/plugin_transport_udp.c
-+src/transport/plugin_transport_udp_broadcasting.c
- src/transport/plugin_transport_unix.c
- src/transport/plugin_transport_wlan.c
- src/transport/plugin_transport_xt.c
-@@ -424,6 +424,11 @@ src/transport/tcp_connection_legacy.c
- src/transport/tcp_server_legacy.c
- src/transport/tcp_server_mst_legacy.c
- src/transport/tcp_service_legacy.c
-+src/transport/transport-testing-filenames.c
-+src/transport/transport-testing-loggers.c
-+src/transport/transport-testing-main.c
-+src/transport/transport-testing-send.c
-+src/transport/transport-testing.c
- src/transport/transport_api2_address.c
- src/transport/transport_api2_communication.c
- src/transport/transport_api2_core.c
-@@ -436,11 +441,6 @@ src/transport/transport_api_manipulation
- src/transport/transport_api_monitor_peers.c
- src/transport/transport_api_monitor_plugins.c
- src/transport/transport_api_offer_hello.c
--src/transport/transport-testing.c
--src/transport/transport-testing-filenames.c
--src/transport/transport-testing-loggers.c
--src/transport/transport-testing-main.c
--src/transport/transport-testing-send.c
- src/util/bandwidth.c
- src/util/benchmark.c
- src/util/bio.c
-@@ -453,8 +453,8 @@ src/util/configuration_loader.c
- src/util/container_bloomfilter.c
- src/util/container_heap.c
- src/util/container_meta_data.c
--src/util/container_multihashmap32.c
- src/util/container_multihashmap.c
-+src/util/container_multihashmap32.c
- src/util/container_multipeermap.c
- src/util/container_multishortmap.c
- src/util/crypto_abe.c
-@@ -476,15 +476,15 @@ src/util/dnsparser.c
- src/util/dnsstub.c
- src/util/getopt.c
- src/util/getopt_helpers.c
--src/util/gnunet-config.c
- src/util/gnunet-config-diff.c
-+src/util/gnunet-config.c
- src/util/gnunet-ecc.c
- src/util/gnunet-helper-w32-console.c
- src/util/gnunet-resolver.c
- src/util/gnunet-scrypt.c
- src/util/gnunet-service-resolver.c
--src/util/gnunet-timeout.c
- src/util/gnunet-timeout-w32.c
-+src/util/gnunet-timeout.c
- src/util/gnunet-uri.c
- src/util/helper.c
- src/util/load.c
-@@ -513,13 +513,13 @@ src/util/tun.c
- src/util/w32cat.c
- src/util/win.c
- src/util/winproc.c
--src/vpn/gnunet-helper-vpn.c
- src/vpn/gnunet-helper-vpn-windows.c
-+src/vpn/gnunet-helper-vpn.c
- src/vpn/gnunet-service-vpn.c
- src/vpn/gnunet-vpn.c
- src/vpn/vpn_api.c
--src/zonemaster/gnunet-service-zonemaster.c
- src/zonemaster/gnunet-service-zonemaster-monitor.c
-+src/zonemaster/gnunet-service-zonemaster.c
- src/fs/fs_api.h
- src/include/compat.h
- src/include/gnunet_common.h
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -47,6 +47,7 @@ gnunetinclude_HEADERS = \
- gnunet_container_lib.h \
- gnunet_conversation_service.h \
- gnunet_core_service.h \
-+ gnunet_credential_service.h \
- gnunet_crypto_lib.h \
- gnunet_curl_lib.h \
- gnunet_datacache_lib.h \
---- /dev/null
-+++ b/src/include/gnunet_credential_service.h
-@@ -0,0 +1,375 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2012-2014 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+
-+/**
-+ * @author Martin Schanzenbach
-+ *
-+ * @file
-+ * API to the Credential service
-+ *
-+ * @defgroup credential Credential service
-+ * Credentials
-+ *
-+ * @{
-+ */
-+#ifndef GNUNET_CREDENTIAL_SERVICE_H
-+#define GNUNET_CREDENTIAL_SERVICE_H
-+
-+#include "gnunet_util_lib.h"
-+#include "gnunet_gns_service.h"
-+#include "gnunet_identity_service.h"
-+
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#if 0 /* keep Emacsens' auto-indent happy */
-+}
-+#endif
-+#endif
-+
-+
-+/**
-+ * Connection to the Credential service.
-+ */
-+struct GNUNET_CREDENTIAL_Handle;
-+
-+/**
-+ * Handle to control a lookup operation.
-+ */
-+struct GNUNET_CREDENTIAL_Request;
-+
-+/*
-+* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
-+*/
-+enum GNUNET_CREDENTIAL_CredentialFlags {
-+
-+ //Subject had credentials before, but have been revoked now
-+ GNUNET_CREDENTIAL_FLAG_REVOKED=0,
-+
-+ //Subject flag indicates that the subject is a holder of this credential and may present it as such
-+ GNUNET_CREDENTIAL_FLAG_SUBJECT=1,
-+
-+ //Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance
-+ GNUNET_CREDENTIAL_FLAG_ISSUER=2
-+
-+};
-+
-+GNUNET_NETWORK_STRUCT_BEGIN
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationRecord {
-+
-+ /**
-+ * Number of delegation sets in this record
-+ */
-+ uint32_t set_count;
-+
-+ /**
-+ * Length of delegation sets
-+ */
-+ uint64_t data_size;
-+ /**
-+ * Followed by set_count DelegationSetRecords
-+ *
-+ */
-+};
-+
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationRecordSet {
-+
-+ /**
-+ * Public key of the subject this attribute was delegated to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Length of attribute, may be 0
-+ */
-+ uint32_t subject_attribute_len;
-+};
-+
-+
-+GNUNET_NETWORK_STRUCT_END
-+
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationSet {
-+
-+ /**
-+ * Public key of the subject this attribute was delegated to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ uint32_t subject_attribute_len;
-+
-+ /**
-+ * The subject attribute
-+ */
-+ const char *subject_attribute;
-+};
-+
-+
-+/**
-+ * A delegation
-+ */
-+struct GNUNET_CREDENTIAL_Delegation {
-+
-+ /**
-+ * The issuer of the delegation
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Public key of the subject this attribute was delegated to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Length of the attribute
-+ */
-+ uint32_t issuer_attribute_len;
-+
-+ /**
-+ * The attribute
-+ */
-+ const char *issuer_attribute;
-+
-+ /**
-+ * Length of the attribute
-+ */
-+ uint32_t subject_attribute_len;
-+
-+ /**
-+ * The attribute
-+ */
-+ const char *subject_attribute;
-+};
-+
-+
-+/**
-+ * A credential
-+ */
-+struct GNUNET_CREDENTIAL_Credential {
-+
-+ /**
-+ * The issuer of the credential
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Public key of the subject this credential was issued to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Signature of this credential
-+ */
-+ struct GNUNET_CRYPTO_EcdsaSignature signature;
-+
-+ /**
-+ * Expiration of this credential
-+ */
-+ struct GNUNET_TIME_Absolute expiration;
-+
-+ /**
-+ * Length of the attribute
-+ */
-+ uint32_t issuer_attribute_len;
-+
-+ /**
-+ * The attribute
-+ */
-+ const char *issuer_attribute;
-+
-+};
-+
-+
-+
-+/**
-+ * Initialize the connection with the Credential service.
-+ *
-+ * @param cfg configuration to use
-+ * @return handle to the Credential service, or NULL on error
-+ */
-+struct GNUNET_CREDENTIAL_Handle *
-+GNUNET_CREDENTIAL_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
-+
-+
-+/**
-+ * Shutdown connection with the Credentail service.
-+ *
-+ * @param handle connection to shut down
-+ */
-+void
-+GNUNET_CREDENTIAL_disconnect (struct GNUNET_CREDENTIAL_Handle *handle);
-+
-+
-+/**
-+ * Iterator called on obtained result for an attribute verification.
-+ *
-+ * @param cls closure
-+ * @param d_count the number of delegations processed
-+ * @param delegation_chain the delegations processed
-+ * @param c_count the number of credentials found
-+ * @param credential the credentials
-+ */
-+typedef void (*GNUNET_CREDENTIAL_CredentialResultProcessor) (void *cls,
-+ unsigned int d_count,
-+ struct GNUNET_CREDENTIAL_Delegation *delegation_chain,
-+ unsigned int c_count,
-+ struct GNUNET_CREDENTIAL_Credential *credential);
-+
-+/**
-+ * Iterator called on obtained result for an attribute delegation.
-+ *
-+ * @param cls closure
-+ * @param success GNUNET_YES if successful
-+ * @param result the record data that can be handed to the subject
-+ */
-+typedef void (*GNUNET_CREDENTIAL_DelegateResultProcessor) (void *cls,
-+ uint32_t success);
-+
-+/**
-+ * Iterator called on obtained result for an attribute delegation removal.
-+ *
-+ * @param cls closure
-+ * @param success GNUNET_YES if successful
-+ * @param result the record data that can be handed to the subject
-+ */
-+typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls,
-+ uint32_t success);
-+
-+
-+/**
-+ * Performs attribute verification.
-+ * Checks if there is a delegation chain from
-+ * attribute ``issuer_attribute'' issued by the issuer
-+ * with public key ``issuer_key'' maps to the attribute
-+ * ``subject_attribute'' claimed by the subject with key
-+ * ``subject_key''
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer_key the issuer public key
-+ * @param issuer_attribute the issuer attribute
-+ * @param subject_key the subject public key
-+ * @param credential_count number of credentials
-+ * @param credentials the subject credentials
-+ * @param proc function to call on result
-+ * @param proc_cls closure for processor
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request*
-+GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle *handle,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
-+ const char *issuer_attribute,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key,
-+ uint32_t credential_count,
-+ const struct GNUNET_CREDENTIAL_Credential *credentials,
-+ GNUNET_CREDENTIAL_CredentialResultProcessor proc,
-+ void *proc_cls);
-+
-+struct GNUNET_CREDENTIAL_Request*
-+GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
-+ const char *issuer_attribute,
-+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key,
-+ GNUNET_CREDENTIAL_CredentialResultProcessor proc,
-+ void *proc_cls);
-+
-+/**
-+ * Delegate an attribute
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer the ego that should be used to delegate the attribute
-+ * @param attribute the name of the attribute to delegate
-+ * @param subject the subject of the delegation
-+ * @param delegated_attribute the name of the attribute that is delegated to
-+ * @param proc the result callback
-+ * @param proc_cls the result closure context
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request *
-+GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
-+ struct GNUNET_IDENTITY_Ego *issuer,
-+ const char *attribute,
-+ struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
-+ const char *delegated_attribute,
-+ GNUNET_CREDENTIAL_DelegateResultProcessor proc,
-+ void *proc_cls);
-+
-+/**
-+ * Remove a delegation
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer the ego that was used to delegate the attribute
-+ * @param attribute the name of the attribute that is delegated
-+ * @param proc the callback
-+ * @param proc_cls callback closure
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request *
-+GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
-+ struct GNUNET_IDENTITY_Ego *issuer,
-+ const char *attribute,
-+ GNUNET_CREDENTIAL_RemoveDelegateResultProcessor proc,
-+ void *proc_cls);
-+
-+
-+
-+/**
-+ * Issue an attribute to a subject
-+ *
-+ * @param issuer the ego that should be used to issue the attribute
-+ * @param subject the subject of the attribute
-+ * @param attribute the name of the attribute
-+ * @param expiration the TTL of the credential
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
-+ struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
-+ const char *attribute,
-+ struct GNUNET_TIME_Absolute *expiration);
-+
-+
-+
-+/**
-+ * Cancel pending lookup request
-+ *
-+ * @param lr the lookup request to cancel
-+ */
-+void
-+GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr);
-+
-+
-+#if 0 /* keep Emacsens' auto-indent happy */
-+{
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+
-+/** @} */ /* end of group */
+++ /dev/null
-From 5be7a51b0980909719670953c938ee724627ad90 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 15:30:26 +0100
-Subject: [PATCH] credential: include headers in dist sources
-
----
- src/credential/Makefile.am | 3 +++
- src/include/Makefile.am | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
---- a/src/credential/Makefile.am
-+++ b/src/credential/Makefile.am
-@@ -68,8 +68,11 @@ gnunet_service_credential_LDADD = \
-
-
- libgnunetcredential_la_SOURCES = \
-+ credential.h \
- credential_api.c \
-+ credential_serialization.h \
- credential_serialization.c \
-+ credential_misc.h \
- credential_misc.c
- libgnunetcredential_la_LIBADD = \
- $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -47,7 +47,7 @@ gnunetinclude_HEADERS = \
- gnunet_container_lib.h \
- gnunet_conversation_service.h \
- gnunet_core_service.h \
-- gnunet_credential_service.h \
-+ gnunet_credential_service.h \
- gnunet_crypto_lib.h \
- gnunet_curl_lib.h \
- gnunet_datacache_lib.h \
-@@ -107,7 +107,7 @@ gnunetinclude_HEADERS = \
- gnunet_regex_service.h \
- gnunet_rest_lib.h \
- gnunet_rest_plugin.h \
-- gnunet_rps_service.h \
-+ gnunet_rps_service.h \
- gnunet_revocation_service.h \
- gnunet_scalarproduct_service.h \
- gnunet_scheduler_lib.h \
---- /dev/null
-+++ b/src/credential/credential.h
-@@ -0,0 +1,221 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2012-2013 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @file credential/credential.h
-+ * @brief IPC messages between CREDENTIAL API and CREDENTIAL service
-+ * @author Martin Schanzenbach
-+ */
-+#ifndef CREDENTIAL_H
-+#define CREDENTIAL_H
-+
-+#include "gnunet_credential_service.h"
-+
-+GNUNET_NETWORK_STRUCT_BEGIN
-+
-+/**
-+ * Message from client to Credential service to collect credentials.
-+ */
-+struct CollectMessage
-+{
-+ /**
-+ * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
-+ */
-+ struct GNUNET_MessageHeader header;
-+
-+ /**
-+ * Subject public key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPrivateKey subject_key;
-+
-+ /**
-+ * Trust anchor
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Length of the issuer attribute
-+ */
-+ uint16_t issuer_attribute_len;
-+
-+ /**
-+ * Unique identifier for this request (for key collisions).
-+ */
-+ uint32_t id GNUNET_PACKED;
-+
-+ /* Followed by the zero-terminated attribute */
-+
-+};
-+
-+
-+/**
-+ * Message from client to Credential service to verify attributes.
-+ */
-+struct VerifyMessage
-+{
-+ /**
-+ * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
-+ */
-+ struct GNUNET_MessageHeader header;
-+
-+ /**
-+ * Subject public key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Trust anchor
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Number of credentials
-+ */
-+ uint32_t c_count;
-+
-+ /**
-+ * Length of the issuer attribute
-+ */
-+ uint16_t issuer_attribute_len;
-+
-+ /**
-+ * Unique identifier for this request (for key collisions).
-+ */
-+ uint32_t id GNUNET_PACKED;
-+
-+ /* Followed by the zero-terminated attribute and credentials to look up */
-+
-+};
-+
-+
-+/**
-+ * Message from CREDENTIAL service to client: new results.
-+ */
-+struct DelegationChainResultMessage
-+{
-+ /**
-+ * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT
-+ */
-+ struct GNUNET_MessageHeader header;
-+
-+ /**
-+ * Unique identifier for this request (for key collisions).
-+ */
-+ uint32_t id GNUNET_PACKED;
-+
-+ /**
-+ * Indicates if credential has been found at all
-+ */
-+ uint32_t cred_found GNUNET_PACKED;
-+
-+ /**
-+ * The number of delegations in the response
-+ */
-+ uint32_t d_count GNUNET_PACKED;
-+
-+ /**
-+ * The number of credentials in the response
-+ */
-+ uint32_t c_count GNUNET_PACKED;
-+
-+ /* followed by ad_count GNUNET_CREDENTIAL_RecordData structs*/
-+
-+};
-+
-+struct DelegationRecordData
-+{
-+ /**
-+ * Subject key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Subject attributes
-+ */
-+ uint32_t subject_attribute_len GNUNET_PACKED;
-+};
-+
-+
-+struct ChainEntry
-+{
-+ /**
-+ * Issuer key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Subject key
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Issuer attributes
-+ */
-+ uint32_t issuer_attribute_len GNUNET_PACKED;
-+
-+ /**
-+ * Subject attributes
-+ */
-+ uint32_t subject_attribute_len GNUNET_PACKED;
-+};
-+
-+
-+struct CredentialEntry
-+{
-+
-+ /**
-+ * The signature for this credential by the issuer
-+ */
-+ struct GNUNET_CRYPTO_EcdsaSignature signature;
-+
-+ /**
-+ * Signature meta
-+ */
-+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-+
-+ /**
-+ * Public key of the issuer
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+ /**
-+ * Public key of the subject this credential was issued to
-+ */
-+ struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+ /**
-+ * Expiration time of this credential
-+ */
-+ uint64_t expiration GNUNET_PACKED;
-+
-+ /**
-+ * Issuer attribute length
-+ */
-+ uint32_t issuer_attribute_len;
-+
-+ /**
-+ * Followed by the attribute string
-+ */
-+};
-+
-+
-+GNUNET_NETWORK_STRUCT_END
-+
-+#endif
-+
---- /dev/null
-+++ b/src/credential/credential_misc.h
-@@ -0,0 +1,35 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2012-2013 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @file credential/credential_misc.h
-+ * @brief Credential helper functions
-+ */
-+#ifndef CREDENTIAL_MISC_H
-+#define CREDENTIAL_MISC_H
-+
-+
-+
-+char*
-+GNUNET_CREDENTIAL_credential_to_string (const struct GNUNET_CREDENTIAL_Credential *cred);
-+
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_from_string (const char* str);
-+
-+#endif
---- /dev/null
-+++ b/src/credential/credential_serialization.h
-@@ -0,0 +1,159 @@
-+/*
-+ This file is part of GNUnet.
-+ Copyright (C) 2009-2013, 2016 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+*/
-+
-+
-+/**
-+ * @file credential/credential_serialization.h
-+ * @brief API to serialize and deserialize delegation chains
-+ * and credentials
-+ * @author Martin Schanzenbach
-+ */
-+#ifndef CREDENTIAL_SERIALIZATION_H
-+#define CREDENTIAL_SERIALIZATION_H
-+
-+#include "platform.h"
-+#include "gnunet_util_lib.h"
-+#include "gnunet_constants.h"
-+#include "gnunet_credential_service.h"
-+
-+/**
-+ * Calculate how many bytes we will need to serialize
-+ * the given delegation record
-+ *
-+ * @param ds_count number of delegation chain entries
-+ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
-+ * @return the required size to serialize
-+ */
-+size_t
-+GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count,
-+ const struct GNUNET_CREDENTIAL_DelegationSet *dsr);
-+
-+/**
-+ * Serizalize the given delegation record entries
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
-+ * @param dest_size size of the destination
-+ * @param dest where to store the result
-+ * @return the size of the data, -1 on failure
-+ */
-+ssize_t
-+GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count,
-+ const struct GNUNET_CREDENTIAL_DelegationSet *dsr,
-+ size_t dest_size,
-+ char *dest);
-+
-+
-+/**
-+ * Deserialize the given destination
-+ *
-+ * @param len size of the serialized delegation recird
-+ * @param src the serialized data
-+ * @param d_count the number of delegation chain entries
-+ * @param dsr where to put the delegation chain entries
-+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-+ */
-+int
-+GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len,
-+ const char *src,
-+ unsigned int d_count,
-+ struct GNUNET_CREDENTIAL_DelegationSet *dsr);
-+
-+ /**
-+ * Calculate how many bytes we will need to serialize
-+ * the given delegation chain and credential
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dd array of #GNUNET_CREDENTIAL_Delegation
-+ * @param c_count number of credential entries
-+ * @param cd a #GNUNET_CREDENTIAL_Credential
-+ * @return the required size to serialize
-+ */
-+ size_t
-+ GNUNET_CREDENTIAL_delegation_chain_get_size (unsigned int d_count,
-+ const struct GNUNET_CREDENTIAL_Delegation *dd,
-+ unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+ /**
-+ * Serizalize the given delegation chain entries and credential
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dd array of #GNUNET_CREDENTIAL_Delegation
-+ * @param c_count number of credential entries
-+ * @param cd a #GNUNET_CREDENTIAL_Credential
-+ * @param dest_size size of the destination
-+ * @param dest where to store the result
-+ * @return the size of the data, -1 on failure
-+ */
-+ ssize_t
-+ GNUNET_CREDENTIAL_delegation_chain_serialize (unsigned int d_count,
-+ const struct GNUNET_CREDENTIAL_Delegation *dd,
-+ unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd,
-+ size_t dest_size,
-+ char *dest);
-+
-+
-+ /**
-+ * Deserialize the given destination
-+ *
-+ * @param len size of the serialized delegation chain and cred
-+ * @param src the serialized data
-+ * @param d_count the number of delegation chain entries
-+ * @param dd where to put the delegation chain entries
-+ * @param c_count number of credential entries
-+ * @param cd where to put the credential data
-+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-+ */
-+ int
-+ GNUNET_CREDENTIAL_delegation_chain_deserialize (size_t len,
-+ const char *src,
-+ unsigned int d_count,
-+ struct GNUNET_CREDENTIAL_Delegation *dd,
-+ unsigned int c_count,
-+ struct GNUNET_CREDENTIAL_Credential *cd);
-+ size_t
-+ GNUNET_CREDENTIAL_credentials_get_size (unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+ssize_t
-+GNUNET_CREDENTIAL_credentials_serialize (unsigned int c_count,
-+ const struct GNUNET_CREDENTIAL_Credential *cd,
-+ size_t dest_size,
-+ char *dest);
-+
-+
-+int
-+GNUNET_CREDENTIAL_credentials_deserialize (size_t len,
-+ const char *src,
-+ unsigned int c_count,
-+ struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+
-+int
-+GNUNET_CREDENTIAL_credential_serialize (struct GNUNET_CREDENTIAL_Credential *cred,
-+ char **data);
-+
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_deserialize (const char* data,
-+ size_t data_size);
-+#endif
-+/* end of credential_serialization.h */
---- a/src/credential/Makefile.in
-+++ b/src/credential/Makefile.in
-@@ -714,8 +714,11 @@ gnunet_service_credential_LDADD = \
- $(GN_LIBINTL)
-
- libgnunetcredential_la_SOURCES = \
-+ credential.h \
- credential_api.c \
-+ credential_serialization.h \
- credential_serialization.c \
-+ credential_misc.h \
- credential_misc.c
-
- libgnunetcredential_la_LIBADD = \
+++ /dev/null
-From c776664d488028f844ae6045e60f693a8624bfac Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:06:06 +0100
-Subject: [PATCH] reclaim-attribute: include header in dist sources
-
----
- src/reclaim-attribute/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/src/reclaim-attribute/Makefile.am
-+++ b/src/reclaim-attribute/Makefile.am
-@@ -20,6 +20,7 @@ lib_LTLIBRARIES = \
- libgnunetreclaimattribute.la
-
- libgnunetreclaimattribute_la_SOURCES = \
-+ reclaim_attribute.h \
- reclaim_attribute.c
- libgnunetreclaimattribute_la_LIBADD = \
- $(top_builddir)/src/util/libgnunetutil.la \
---- /dev/null
-+++ b/src/reclaim-attribute/reclaim_attribute.h
-@@ -0,0 +1,56 @@
-+/*
-+ This file is part of GNUnet.
-+ Copyright (C) 2012-2015 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @author Martin Schanzenbach
-+ * @file reclaim-attribute/reclaim_attribute.h
-+ * @brief GNUnet reclaim identity attributes
-+ *
-+ */
-+#ifndef RECLAIM_ATTRIBUTE_H
-+#define RECLAIM_ATTRIBUTE_H
-+
-+#include "gnunet_reclaim_service.h"
-+
-+struct Attribute
-+{
-+ /**
-+ * Attribute type
-+ */
-+ uint32_t attribute_type;
-+
-+ /**
-+ * Attribute version
-+ */
-+ uint32_t attribute_version;
-+
-+ /**
-+ * Name length
-+ */
-+ uint32_t name_len;
-+
-+ /**
-+ * Data size
-+ */
-+ uint32_t data_size;
-+
-+ //followed by data_size Attribute value data
-+};
-+
-+#endif
+++ /dev/null
-From 6c0f43552d627b93f99f7fd40d63815f323958c3 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:16:13 +0100
-Subject: [PATCH] reclaim: include reclaim.conf in source dist
-
----
- src/reclaim/Makefile.am | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/src/reclaim/Makefile.am
-+++ b/src/reclaim/Makefile.am
-@@ -17,9 +17,10 @@ SQLITE_PLUGIN = libgnunet_plugin_reclaim
- endif
-
- EXTRA_DIST = \
-+ reclaim.conf \
- test_reclaim_defaults.conf \
-- test_reclaim.conf \
-- $(check_SCRIPTS)
-+ test_reclaim.conf \
-+ $(check_SCRIPTS)
-
- pkgcfgdir= $(pkgdatadir)/config.d/
-
---- /dev/null
-+++ b/src/reclaim/reclaim.conf
-@@ -0,0 +1,23 @@
-+[reclaim]
-+START_ON_DEMAND = NO
-+RUN_PER_USER = YES
-+#PORT = 2108
-+HOSTNAME = localhost
-+BINARY = gnunet-service-reclaim
-+ACCEPT_FROM = 127.0.0.1;
-+ACCEPT_FROM6 = ::1;
-+UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-reclaim.sock
-+UNIX_MATCH_UID = NO
-+UNIX_MATCH_GID = YES
-+TOKEN_EXPIRATION_INTERVAL = 30 m
-+DATABASE = sqlite
-+
-+[reclaim-rest-plugin]
-+#ADDRESS = https://identity.gnu:8000#/login
-+ADDRESS = https://ui.reclaim/#/login
-+PSW = secret
-+JWT_SECRET = secret
-+EXPIRATION_TIME = 1d
-+
-+[reclaim-sqlite]
-+FILENAME = $GNUNET_DATA_HOME/reclaim/sqlite.db
+++ /dev/null
-From da16f9c20dda74dc689c9564d1791cc2af3ede9d Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:23:40 +0100
-Subject: [PATCH] rest-plugins: include headers in dist sources
-
----
- src/rest-plugins/Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/src/rest-plugins/Makefile.am
-+++ b/src/rest-plugins/Makefile.am
-@@ -30,6 +30,7 @@ endif
-
- libgnunet_plugin_rest_reclaim_la_SOURCES = \
- plugin_rest_reclaim.c \
-+ json_reclaim.h \
- json_reclaim.c
- libgnunet_plugin_rest_reclaim_la_LIBADD = \
- $(top_builddir)/src/identity/libgnunetidentity.la \
-@@ -117,6 +118,7 @@ libgnunet_plugin_rest_gns_la_LDFLAGS = \
-
- libgnunet_plugin_rest_openid_connect_la_SOURCES = \
- plugin_rest_openid_connect.c \
-+ oidc_helper.h \
- oidc_helper.c
- libgnunet_plugin_rest_openid_connect_la_LIBADD = \
- $(top_builddir)/src/identity/libgnunetidentity.la \
---- /dev/null
-+++ b/src/rest-plugins/oidc_helper.h
-@@ -0,0 +1,111 @@
-+/*
-+ This file is part of GNUnet
-+ Copyright (C) 2010-2015 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+
-+/**
-+ * @file reclaim/oidc_helper.h
-+ * @brief helper library for OIDC related functions
-+ * @author Martin Schanzenbach
-+ */
-+
-+#ifndef JWT_H
-+#define JWT_H
-+
-+#define JWT_ALG "alg"
-+
-+/* Use 512bit HMAC */
-+#define JWT_ALG_VALUE "HS512"
-+
-+#define JWT_TYP "typ"
-+
-+#define JWT_TYP_VALUE "jwt"
-+
-+#define SERVER_ADDRESS "https://api.reclaim"
-+
-+/**
-+ * Create a JWT from attributes
-+ *
-+ * @param aud_key the public of the audience
-+ * @param sub_key the public key of the subject
-+ * @param attrs the attribute list
-+ * @param expiration_time the validity of the token
-+ * @param secret_key the key used to sign the JWT
-+ * @return a new base64-encoded JWT string.
-+ */
-+char*
-+OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
-+ const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
-+ const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
-+ const struct GNUNET_TIME_Relative *expiration_time,
-+ const char *nonce,
-+ const char *secret_key);
-+
-+/**
-+ * Builds an OIDC authorization code including
-+ * a reclaim ticket and nonce
-+ *
-+ * @param issuer the issuer of the ticket, used to sign the ticket and nonce
-+ * @param ticket the ticket to include in the code
-+ * @param nonce the nonce to include in the code
-+ * @return a new authorization code (caller must free)
-+ */
-+char*
-+OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
-+ const struct GNUNET_RECLAIM_Ticket *ticket,
-+ const char* nonce);
-+
-+/**
-+ * Parse reclaim ticket and nonce from
-+ * authorization code.
-+ * This also verifies the signature in the code.
-+ *
-+ * @param audience the expected audience of the code
-+ * @param code the string representation of the code
-+ * @param ticket where to store the ticket
-+ * @param nonce where to store the nonce
-+ * @return GNUNET_OK if successful, else GNUNET_SYSERR
-+ */
-+int
-+OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
-+ const char* code,
-+ struct GNUNET_RECLAIM_Ticket **ticket,
-+ char **nonce);
-+
-+/**
-+ * Build a token response for a token request
-+ * TODO: Maybe we should add the scope here?
-+ *
-+ * @param access_token the access token to include
-+ * @param id_token the id_token to include
-+ * @param expiration_time the expiration time of the token(s)
-+ * @param token_response where to store the response
-+ */
-+void
-+OIDC_build_token_response (const char *access_token,
-+ const char *id_token,
-+ const struct GNUNET_TIME_Relative *expiration_time,
-+ char **token_response);
-+/**
-+ * Generate a new access token
-+ */
-+char*
-+OIDC_access_token_new ();
-+
-+
-+#endif
---- /dev/null
-+++ b/src/rest-plugins/json_reclaim.h
-@@ -0,0 +1,48 @@
-+/*
-+ This file is part of GNUnet.
-+ Copyright (C) 2009-2018 GNUnet e.V.
-+
-+ GNUnet is free software: you can redistribute it and/or modify it
-+ under the terms of the GNU Affero General Public License as published
-+ by the Free Software Foundation, either version 3 of the License,
-+ or (at your option) any later version.
-+
-+ GNUnet is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Affero General Public License for more details.
-+
-+ You should have received a copy of the GNU Affero General Public License
-+ along with this program. If not, see <http://www.gnu.org/licenses/>.
-+
-+ SPDX-License-Identifier: AGPL3.0-or-later
-+*/
-+
-+/**
-+ * @file rest-plugins/json_reclaim.h
-+ * @brief JSON handling of reclaim data
-+ * @author Martin Schanzenbach
-+ */
-+#include "platform.h"
-+#include "gnunet_util_lib.h"
-+#include "gnunet_json_lib.h"
-+#include "gnunet_reclaim_service.h"
-+#include "gnunet_reclaim_attribute_lib.h"
-+
-+/**
-+ * JSON Specification for Reclaim claims.
-+ *
-+ * @param ticket struct of GNUNET_RECLAIM_ATTRIBUTE_Claim to fill
-+ * @return JSON Specification
-+ */
-+struct GNUNET_JSON_Specification
-+GNUNET_RECLAIM_JSON_spec_claim (struct GNUNET_RECLAIM_ATTRIBUTE_Claim **attr);
-+
-+/**
-+ * JSON Specification for Reclaim tickets.
-+ *
-+ * @param ticket struct of GNUNET_RECLAIM_Ticket to fill
-+ * @return JSON Specification
-+ */
-+struct GNUNET_JSON_Specification
-+GNUNET_RECLAIM_JSON_spec_ticket (struct GNUNET_RECLAIM_Ticket **ticket);
--- /dev/null
+diff --git a/src/abe/Makefile.am b/src/abe/Makefile.am
+index 23a7ae68e..cccd3ccb0 100644
+--- a/src/abe/Makefile.am
++++ b/src/abe/Makefile.am
+@@ -20,6 +20,8 @@ libgnunetabe_la_LIBADD = \
+ $(LTLIBICONV) \
+ $(LTLIBINTL) \
+ $(ABE_LIBADD) \
++ $(top_builddir)/src/util/libgnunetutil.la \
++ -lgmp \
+ -lgabe \
+ -lpbc \
+ -lglib-2.0 \
+diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am
+index 13918508e..be50cce26 100644
+--- a/src/reclaim/Makefile.am
++++ b/src/reclaim/Makefile.am
+@@ -99,6 +99,7 @@ libgnunet_plugin_reclaim_sqlite_la_LIBADD = \
+ libgnunetreclaim.la \
+ $(top_builddir)/src/sq/libgnunetsq.la \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
++ $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \
+ $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
+ $(LTLIBINTL)
+ libgnunet_plugin_reclaim_sqlite_la_LDFLAGS = \
+@@ -126,6 +127,7 @@ libgnunetreclaim_la_SOURCES = \
+ reclaim.h
+ libgnunetreclaim_la_LIBADD = \
+ $(top_builddir)/src/util/libgnunetutil.la \
++ $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \
+ $(GN_LIBINTL) $(XLIB)
+ libgnunetreclaim_la_LDFLAGS = \
+ $(GN_LIB_LDFLAGS) $(WINFLAGS) \
PKG_NAME:=haproxy
PKG_VERSION:=1.8.19
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
--- /dev/null
+commit 7c3fd37724c58cf09359e0d381a9be305dd7869b
+Author: Olivier Houchard <cognet@ci0.org>
+Date: Mon Feb 25 16:18:16 2019 +0100
+
+ BUG/MAJOR: listener: Make sure the listener exist before using it.
+
+ In listener_accept(), make sure we have a listener before attempting to
+ use it.
+ An another thread may have closed the FD meanwhile, and set fdtab[fd].owner
+ to NULL.
+ As the listener is not free'd, it is ok to attempt to accept() a new
+ connection even if the listener was closed. At worst the fd has been
+ reassigned to another connection, and accept() will fail anyway.
+
+ Many thanks to Richard Russo for reporting the problem, and suggesting the
+ fix.
+
+ This should be backported to 1.9 and 1.8.
+
+ (cherry picked from commit d16a9dfed80e75d730754b717370515265698cdd)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+ (cherry picked from commit a2511ed1fcdfa8047dbe2268fc0259f9b06cf891)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/listener.c b/src/listener.c
+index a30efe03..5f6fafbc 100644
+--- a/src/listener.c
++++ b/src/listener.c
+@@ -441,8 +441,8 @@ void delete_listener(struct listener *listener)
+ void listener_accept(int fd)
+ {
+ struct listener *l = fdtab[fd].owner;
+- struct proxy *p = l->bind_conf->frontend;
+- int max_accept = l->maxaccept ? l->maxaccept : 1;
++ struct proxy *p;
++ int max_accept;
+ int expire;
+ int cfd;
+ int ret;
+@@ -450,6 +450,10 @@ void listener_accept(int fd)
+ static int accept4_broken;
+ #endif
+
++ if (!l)
++ return;
++ p = l->bind_conf->frontend;
++ max_accept = l->maxaccept ? l->maxaccept : 1;
+ if (HA_SPIN_TRYLOCK(LISTENER_LOCK, &l->lock))
+ return;
+
+++ /dev/null
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -39,6 +39,7 @@
- #include <netdb.h>
- #include <netinet/tcp.h>
-
-+#include <openssl/bn.h>
- #include <openssl/crypto.h>
- #include <openssl/ssl.h>
- #include <openssl/x509.h>
-@@ -60,6 +61,17 @@
- #include <openssl/async.h>
- #endif
-
-+#ifndef OPENSSL_VERSION
-+#define OPENSSL_VERSION SSLEAY_VERSION
-+#define OpenSSL_version(x) SSLeay_version(x)
-+#define OpenSSL_version_num SSLeay
-+#endif
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- #include <import/lru.h>
- #include <import/xxhash.h>
-
-@@ -217,7 +229,7 @@ static struct {
- .capture_cipherlist = 0,
- };
-
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
-
- static HA_RWLOCK_T *ssl_rwlocks;
-
-@@ -1716,8 +1728,8 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
- ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
-
- /* Set duration for the certificate */
-- if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
-- !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
-+ if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
-+ !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
- goto mkcert_error;
-
- /* set public key in the certificate */
-@@ -6299,7 +6311,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
- goto out;
-
- smp_trash = get_trash_chunk();
-- if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
-+ if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
- goto out;
-
- smp->data.u.str = *smp_trash;
-@@ -6399,7 +6411,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
- goto out;
-
- smp_trash = get_trash_chunk();
-- if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
-+ if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
- goto out;
-
- smp->data.u.str = *smp_trash;
-@@ -8976,10 +8988,12 @@ static void __ssl_sock_init(void)
- #endif
-
- xprt_register(XPRT_SSL, &ssl_sock);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_library_init();
-+#endif
- cm = SSL_COMP_get_compression_methods();
- sk_SSL_COMP_zero(cm);
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- ssl_locking_init();
- #endif
- #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
-@@ -9008,8 +9022,8 @@ static void __ssl_sock_init(void)
- #else /* OPENSSL_IS_BORINGSSL */
- OPENSSL_VERSION_TEXT
- "\nRunning on OpenSSL version : %s%s",
-- SSLeay_version(SSLEAY_VERSION),
-- ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
-+ OpenSSL_version(OPENSSL_VERSION),
-+ ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
- #endif
- memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
- #if OPENSSL_VERSION_NUMBER < 0x00907000L
-@@ -9100,12 +9114,14 @@ static void __ssl_sock_deinit(void)
- }
- #endif
-
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- ERR_remove_state(0);
- ERR_free_strings();
-
- EVP_cleanup();
-+#endif
-
--#if OPENSSL_VERSION_NUMBER >= 0x00907000L
-+#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
- CRYPTO_cleanup_all_ex_data();
- #endif
- }
--- /dev/null
+commit 78714ea673cefa83d3dff5aa9aa5e97726cfb5cd
+Author: Willy Tarreau <w@1wt.eu>
+Date: Mon Feb 25 15:02:04 2019 +0100
+
+ BUG/MINOR: listener: keep accept rate counters accurate under saturation
+
+ The test on l->nbconn forces to exit the loop before updating the freq
+ counters, so the last session which reaches a listener's limit will not
+ be accounted for in the session rate measurement.
+
+ Let's move the test at the beginning of the loop and mark the listener
+ as saturated on exit.
+
+ This may be backported to 1.9 and 1.8.
+
+ (cherry picked from commit 741b4d6b7aad1e4a66dd8584b5eff729b08fade7)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+ (cherry picked from commit 5c7c7e447df84a04bda88c40382b652cdb77a079)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/listener.c b/src/listener.c
+index 5f6fafbc..b94d823c 100644
+--- a/src/listener.c
++++ b/src/listener.c
+@@ -457,11 +457,6 @@ void listener_accept(int fd)
+ if (HA_SPIN_TRYLOCK(LISTENER_LOCK, &l->lock))
+ return;
+
+- if (unlikely(l->nbconn >= l->maxconn)) {
+- listener_full(l);
+- goto end;
+- }
+-
+ if (!(l->options & LI_O_UNLIMITED) && global.sps_lim) {
+ int max = freq_ctr_remain(&global.sess_per_sec, global.sps_lim, 0);
+
+@@ -520,7 +515,7 @@ void listener_accept(int fd)
+ * worst case. If we fail due to system limits or temporary resource
+ * shortage, we try again 100ms later in the worst case.
+ */
+- while (max_accept--) {
++ while (l->nbconn < l->maxconn && max_accept--) {
+ struct sockaddr_storage addr;
+ socklen_t laddr = sizeof(addr);
+ unsigned int count;
+@@ -627,11 +622,6 @@ void listener_accept(int fd)
+ goto transient_error;
+ }
+
+- if (l->nbconn >= l->maxconn) {
+- listener_full(l);
+- goto end;
+- }
+-
+ /* increase the per-process number of cumulated connections */
+ if (!(l->options & LI_O_UNLIMITED)) {
+ count = update_freq_ctr(&global.sess_per_sec, 1);
+@@ -659,6 +649,9 @@ void listener_accept(int fd)
+ limit_listener(l, &global_listener_queue);
+ task_schedule(global_listener_queue_task, tick_first(expire, global_listener_queue_task->expire));
+ end:
++ if (l->nbconn >= l->maxconn)
++ listener_full(l);
++
+ HA_SPIN_UNLOCK(LISTENER_LOCK, &l->lock);
+ }
+
--- /dev/null
+commit 4c82743abd299f0aa8105e98ec92b76375a7f344
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Thu Mar 7 14:19:24 2019 +0100
+
+ BUG/MEDIUM: logs: Only attempt to free startup_logs once.
+
+ deinit_log_buffers() can be called once per thread, however startup_logs
+ is common to all threads. So only attempt to free it once.
+
+ This should be backported to 1.9 and 1.8.
+
+ (cherry picked from commit 7c49711d6041d1afc42d5b310ddfd7d6f6817c3c)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+ (cherry picked from commit bc3e21b27849275306a0580488613b7dfd4d8eb5)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/log.c b/src/log.c
+index b3f33662..9c112255 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -1380,11 +1380,15 @@ int init_log_buffers()
+ /* Deinitialize log buffers used for syslog messages */
+ void deinit_log_buffers()
+ {
++ void *tmp_startup_logs;
++
+ free(logheader);
+ free(logheader_rfc5424);
+ free(logline);
+ free(logline_rfc5424);
+- free(startup_logs);
++ tmp_startup_logs = HA_ATOMIC_XCHG(&startup_logs, NULL);
++ free(tmp_startup_logs);
++
+ logheader = NULL;
+ logheader_rfc5424 = NULL;
+ logline = NULL;
--- /dev/null
+commit 63f5dbf1b9fcdc5b10537d733b0e0798905ff1dc
+Author: Dragan Dosen <ddosen@haproxy.com>
+Date: Thu Mar 7 15:24:23 2019 +0100
+
+ BUG/MEDIUM: 51d: fix possible segfault on deinit_51degrees()
+
+ When haproxy is built with 51Degrees support, but not configured to use
+ 51Degrees database, a segfault can occur when deinit_51degrees()
+ function is called, eg. during soft-stop on SIGUSR1 signal.
+
+ Only builds that use Pattern algorithm are affected.
+
+ This fix must be backported to all stable branches where 51Degrees
+ support is available. Additional adjustments are required for some
+ branches due to API and naming changes.
+
+ (cherry picked from commit bc6218e1b02860c6cdad0d2bb4dc8874557087f8)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+ (cherry picked from commit 4e0363e84cb3f6ca341e1f83c6fd490c76c9ae6b)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/51d.c b/src/51d.c
+index a36333ef..03101136 100644
+--- a/src/51d.c
++++ b/src/51d.c
+@@ -639,7 +639,8 @@ static void deinit_51degrees(void)
+
+ free(global_51degrees.header_names);
+ #ifdef FIFTYONEDEGREES_H_PATTERN_INCLUDED
+- fiftyoneDegreesWorksetPoolFree(global_51degrees.pool);
++ if (global_51degrees.pool)
++ fiftyoneDegreesWorksetPoolFree(global_51degrees.pool);
+ #endif
+ #ifdef FIFTYONEDEGREES_H_TRIE_INCLUDED
+ free(global_51degrees.device_offsets.firstOffset);
--- /dev/null
+commit 57e2606f70fa8d26fe4b5563ba72a6c7f2a25655
+Author: Lukas Tribus <lukas@ltri.eu>
+Date: Tue Mar 5 23:14:32 2019 +0100
+
+ BUG/MINOR: ssl: fix warning about ssl-min/max-ver support
+
+ In 84e417d8 ("MINOR: ssl: support Openssl 1.1.1 early callback for
+ switchctx") the code was extended to also support OpenSSL 1.1.1
+ (code already supported BoringSSL). A configuration check warning
+ was updated but with the wrong logic, the #ifdef needs a && instead
+ of an ||.
+
+ Reported in #54.
+
+ Should be backported to 1.8.
+
+ (cherry picked from commit 1aabc939780d5eab1f88089d01fb077ad9315c65)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+ (cherry picked from commit f407d16b8f4cf2afb148668a23a1ba1cc4dd942a)
+ Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 7736c324..afdb1fce 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -7418,7 +7418,7 @@ static int parse_tls_method_minmax(char **args, int cur_arg, struct tls_version_
+
+ static int ssl_bind_parse_tls_method_minmax(char **args, int cur_arg, struct proxy *px, struct ssl_bind_conf *conf, char **err)
+ {
+-#if (OPENSSL_VERSION_NUMBER < 0x10101000L) || !defined(OPENSSL_IS_BORINGSSL)
++#if (OPENSSL_VERSION_NUMBER < 0x10101000L) && !defined(OPENSSL_IS_BORINGSSL)
+ ha_warning("crt-list: ssl-min-ver and ssl-max-ver are not supported with this Openssl version (skipped).\n");
+ #endif
+ return parse_tls_method_minmax(args, cur_arg, &conf->ssl_methods, err);
--- /dev/null
+commit 62aec002ccd6a7129b4f5e2e88be1957a6b2308b
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date: Thu Mar 7 18:48:22 2019 +0100
+
+ MEDIUM: threads: Use __ATOMIC_SEQ_CST when using the newer atomic API.
+
+ When using the new __atomic* API, ask the compiler to generate barriers.
+ A variant of those functions that don't generate barriers will be added later.
+ Before that, using HA_ATOMIC* would not generate any barrier, and some parts
+ of the code should be reviewed and missing barriers should be added.
+
+ This should probably be backported to 1.8 and 1.9.
+
+ (cherry picked from commit 113537967c8680f94977473e18c9e14dc09c3356)
+ [wt: this is in fact a real bug fix : all these atomics do not provide
+ the slightest sequential consistency by default as the value 0 is
+ __ATOMIC_RELAXED, which will definitely cause random issues with
+ threads on non-x86 platforms].
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+ (cherry picked from commit e5d1670f5fa95972fed6391201c0da8982bb9f94)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/common/hathreads.h b/include/common/hathreads.h
+index 24fb1d1a..8a738aaf 100644
+--- a/include/common/hathreads.h
++++ b/include/common/hathreads.h
+@@ -213,14 +213,14 @@ static inline unsigned long thread_isolated()
+ })
+ #else
+ /* gcc >= 4.7 */
+-#define HA_ATOMIC_CAS(val, old, new) __atomic_compare_exchange_n(val, old, new, 0, 0, 0)
+-#define HA_ATOMIC_ADD(val, i) __atomic_add_fetch(val, i, 0)
+-#define HA_ATOMIC_XADD(val, i) __atomic_fetch_add(val, i, 0)
+-#define HA_ATOMIC_SUB(val, i) __atomic_sub_fetch(val, i, 0)
+-#define HA_ATOMIC_AND(val, flags) __atomic_and_fetch(val, flags, 0)
+-#define HA_ATOMIC_OR(val, flags) __atomic_or_fetch(val, flags, 0)
+-#define HA_ATOMIC_XCHG(val, new) __atomic_exchange_n(val, new, 0)
+-#define HA_ATOMIC_STORE(val, new) __atomic_store_n(val, new, 0)
++#define HA_ATOMIC_CAS(val, old, new) __atomic_compare_exchange_n(val, old, new, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_ADD(val, i) __atomic_add_fetch(val, i, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_XADD(val, i) __atomic_fetch_add(val, i, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_SUB(val, i) __atomic_sub_fetch(val, i, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_AND(val, flags) __atomic_and_fetch(val, flags, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_OR(val, flags) __atomic_or_fetch(val, flags, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_XCHG(val, new) __atomic_exchange_n(val, new, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_STORE(val, new) __atomic_store_n(val, new, __ATOMIC_SEQ_CST)
+ #endif
+
+ #define HA_ATOMIC_UPDATE_MAX(val, new) \
--- /dev/null
+commit 1dfa4fd4be313a87f2a4861e81d0ad8ea8214223
+Author: Willy Tarreau <w@1wt.eu>
+Date: Thu Mar 14 19:10:55 2019 +0100
+
+ BUG/MEDIUM: threads/fd: do not forget to take into account epoll_fd/pipes
+
+ Each thread uses one epoll_fd or kqueue_fd, and a pipe (thus two FDs).
+ These ones have to be accounted for in the maxsock calculation, otherwise
+ we can reach maxsock before maxconn. This is difficult to observe but it
+ in fact happens when a server connects back to the frontend and has checks
+ enabled : the check uses its FD and serves to fill the loop. In this case
+ all FDs planed for the datapath are used for this.
+
+ This needs to be backported to 1.9 and 1.8.
+
+ (cherry picked from commit 2c58b41c96e70f567d0f9ae876a80770630c06ee)
+ Signed-off-by: Willy Tarreau <w@1wt.eu>
+ (cherry picked from commit 26d110ba04cba02b337beff53a83847320e4fcdb)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/haproxy.c b/src/haproxy.c
+index 68367627..5c3febdd 100644
+--- a/src/haproxy.c
++++ b/src/haproxy.c
+@@ -1828,6 +1828,9 @@ static void init(int argc, char **argv)
+ global.hardmaxconn = global.maxconn; /* keep this max value */
+ global.maxsock += global.maxconn * 2; /* each connection needs two sockets */
+ global.maxsock += global.maxpipes * 2; /* each pipe needs two FDs */
++ global.maxsock += global.nbthread; /* one epoll_fd/kqueue_fd per thread */
++ global.maxsock += 2 * global.nbthread; /* one wake-up pipe (2 fd) per thread */
++
+ /* compute fd used by async engines */
+ if (global.ssl_used_async_engines) {
+ int sides = !!global.ssl_used_frontend + !!global.ssl_used_backend;
--- /dev/null
+commit a3cfe8f4bc2ec98fdbe25c49f2c21699b6d09d2b
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date: Mon Mar 18 13:57:42 2019 +0100
+
+ BUG/MAJOR: spoe: Fix initialization of thread-dependent fields
+
+ A bug was introduced in the commit b0769b ("BUG/MEDIUM: spoe: initialization
+ depending on nbthread must be done last"). The code depending on global.nbthread
+ was moved from cfg_parse_spoe_agent() to spoe_check() but the pointer on the
+ agent configuration was not updated to use the filter's one. The variable
+ curagent is a global variable only valid during the configuration parsing. In
+ spoe_check(), conf->agent must be used instead.
+
+ This patch must be backported to 1.9 and 1.8.
+
+ (cherry picked from commit fe261551b9980fe33990eb34d2153bf1de24b20f)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+ (cherry picked from commit 7a93d271d549144a8ed8c816f5694a51ab62b90c)
+ Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/flt_spoe.c b/src/flt_spoe.c
+index e4453882..66d26f34 100644
+--- a/src/flt_spoe.c
++++ b/src/flt_spoe.c
+@@ -2937,20 +2937,20 @@ spoe_check(struct proxy *px, struct flt_conf *fconf)
+ if (global.nbthread == 1)
+ conf->agent->flags |= SPOE_FL_ASYNC;
+
+- if ((curagent->rt = calloc(global.nbthread, sizeof(*curagent->rt))) == NULL) {
++ if ((conf->agent->rt = calloc(global.nbthread, sizeof(*conf->agent->rt))) == NULL) {
+ ha_alert("Proxy %s : out of memory initializing SPOE agent '%s' declared at %s:%d.\n",
+ px->id, conf->agent->id, conf->agent->conf.file, conf->agent->conf.line);
+ return 1;
+ }
+ for (i = 0; i < global.nbthread; ++i) {
+- curagent->rt[i].frame_size = curagent->max_frame_size;
+- curagent->rt[i].applets_act = 0;
+- curagent->rt[i].applets_idle = 0;
+- curagent->rt[i].sending_rate = 0;
+- LIST_INIT(&curagent->rt[i].applets);
+- LIST_INIT(&curagent->rt[i].sending_queue);
+- LIST_INIT(&curagent->rt[i].waiting_queue);
+- HA_SPIN_INIT(&curagent->rt[i].lock);
++ conf->agent->rt[i].frame_size = conf->agent->max_frame_size;
++ conf->agent->rt[i].applets_act = 0;
++ conf->agent->rt[i].applets_idle = 0;
++ conf->agent->rt[i].sending_rate = 0;
++ LIST_INIT(&conf->agent->rt[i].applets);
++ LIST_INIT(&conf->agent->rt[i].sending_queue);
++ LIST_INIT(&conf->agent->rt[i].waiting_queue);
++ HA_SPIN_INIT(&conf->agent->rt[i].lock);
+ }
+
+ free(conf->agent->b.name);
--- /dev/null
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -39,6 +39,7 @@
+ #include <netdb.h>
+ #include <netinet/tcp.h>
+
++#include <openssl/bn.h>
+ #include <openssl/crypto.h>
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
+@@ -60,6 +61,17 @@
+ #include <openssl/async.h>
+ #endif
+
++#ifndef OPENSSL_VERSION
++#define OPENSSL_VERSION SSLEAY_VERSION
++#define OpenSSL_version(x) SSLeay_version(x)
++#define OpenSSL_version_num SSLeay
++#endif
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_getm_notBefore X509_get_notBefore
++#define X509_getm_notAfter X509_get_notAfter
++#endif
++
+ #include <import/lru.h>
+ #include <import/xxhash.h>
+
+@@ -217,7 +229,7 @@ static struct {
+ .capture_cipherlist = 0,
+ };
+
+-#ifdef USE_THREAD
++#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+
+ static HA_RWLOCK_T *ssl_rwlocks;
+
+@@ -1716,8 +1728,8 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
+ ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
+
+ /* Set duration for the certificate */
+- if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
+- !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
++ if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
++ !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
+ goto mkcert_error;
+
+ /* set public key in the certificate */
+@@ -6299,7 +6311,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
+ goto out;
+
+ smp_trash = get_trash_chunk();
+- if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
++ if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
+ goto out;
+
+ smp->data.u.str = *smp_trash;
+@@ -6399,7 +6411,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
+ goto out;
+
+ smp_trash = get_trash_chunk();
+- if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
++ if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
+ goto out;
+
+ smp->data.u.str = *smp_trash;
+@@ -8976,10 +8988,12 @@ static void __ssl_sock_init(void)
+ #endif
+
+ xprt_register(XPRT_SSL, &ssl_sock);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ SSL_library_init();
++#endif
+ cm = SSL_COMP_get_compression_methods();
+ sk_SSL_COMP_zero(cm);
+-#ifdef USE_THREAD
++#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ssl_locking_init();
+ #endif
+ #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
+@@ -9008,8 +9022,8 @@ static void __ssl_sock_init(void)
+ #else /* OPENSSL_IS_BORINGSSL */
+ OPENSSL_VERSION_TEXT
+ "\nRunning on OpenSSL version : %s%s",
+- SSLeay_version(SSLEAY_VERSION),
+- ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
++ OpenSSL_version(OPENSSL_VERSION),
++ ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
+ #endif
+ memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
+ #if OPENSSL_VERSION_NUMBER < 0x00907000L
+@@ -9100,12 +9114,14 @@ static void __ssl_sock_deinit(void)
+ }
+ #endif
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ ERR_remove_state(0);
+ ERR_free_strings();
+
+ EVP_cleanup();
++#endif
+
+-#if OPENSSL_VERSION_NUMBER >= 0x00907000L
++#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
+ CRYPTO_cleanup_all_ex_data();
+ #endif
+ }
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
-PKG_VERSION:=2.22.0
+PKG_VERSION:=2.23.0
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6547d7a560482c5eda9106ae19267bc8afbb6af48fed3bebf423ade28103e173
+PKG_HASH:=19e8573b44b94ce83bd5705569934049cb1dc39db11449abcb9e4b36afe5a279
PKG_LICENSE:=BSD-3-clause
include $(INCLUDE_DIR)/package.mk
endef
define Package/i2pd/conffiles
+ /etc/config/i2pd
/etc/i2pd/i2pd.conf
- /etc/i2pd/subscriptions.txt
/etc/i2pd/tunnels.conf
endef
$(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/share/i2pd
$(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/i2pd.config $(1)/etc/config/i2pd
$(INSTALL_DIR) $(1)/etc/i2pd
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
$(SED) ' \
s/127.0.0.1/192.168.1.1/g; \
s/datadir = \/var\/lib/datadir = \/etc/ \
' $(1)/etc/i2pd/i2pd.conf
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
endef
--- /dev/null
+config i2pd
+ # Set where i2pd should store its data (netDB, certificates, addresses, etc)
+ # By default we store it in RAM so no data is written to ROM.
+ # IMPORTANT!
+ # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash will
+ # die.
+ option data_dir '/var/lib/i2pd'
+
+ # If you don't store i2pd data permanently, you can still choose to store only
+ # addressbook. If not, i2pd will be forced to do HTTP reseeding reseeding on
+ # every start. Storing addressbook may be useful if HTTP reseeding is not
+ # possible or blocked (by censorship).
+ # Even addressbook doesn't take up too much space, extroot is still strongly
+ # recommended to avoid flash wear-out.
+ #option addressbook_dir '/etc/i2pd/addressbook'
START=90
STOP=10
+# default params
PROG=/usr/sbin/i2pd
USER="i2pd"
GROUP="i2pd"
PIDFILE=/var/run/i2pd.pid
-DATADIR=/var/lib/i2pd
+#DATADIR=/var/lib/i2pd
+CONFFILE=/etc/i2pd/i2pd.conf
+
+. /lib/functions.sh
+
start_service() {
- ## RAM
- if [ ! -d $DATADIR ]; then
- mkdir -p $DATADIR
- ln -s /usr/share/i2pd/certificates $DATADIR/certificates
- ln -s /etc/i2pd/tunnels.conf $DATADIR/tunnels.conf
- # for peoples who not possible to use http reseeding
- ln -s /etc/i2pd/addressbook $DATADIR/addressbook
+ local data_dir
+ local addressbook_dir
+
+ config_load i2pd
+
+ config_get data_dir i2pd data_dir
+ config_get addressbook_dir i2pd addressbook_dir
+
+ ## Setting up data dir
+ if [ ! -d "$data_dir" ]; then
+ mkdir -p "$data_dir"
+ ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
+ ln -s /etc/i2pd/tunnels.conf "$data_dir/tunnels.conf"
+ if [ -n "$addressbook_dir" ]; then
+ if [ ! -d "$addressbook_dir" ]; then
+ mkdir -p "$addressbook_dir"
+ fi
+ ln -s "$addressbook_dir" "$data_dir/addressbook"
+ fi
fi
## We need permissions
- chown $USER:$GROUP $DATADIR
- touch $PIDFILE
- chown $USER:adm $PIDFILE
+ chown "$USER:$GROUP" "$data_dir"
+ chown "$USER:$GROUP" "$addressbook_dir"
+ touch "$PIDFILE"
+ chown "$USER:adm" "$PIDFILE"
procd_open_instance
- procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf --pidfile $PIDFILE
+ procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
## Don't know about i2pd user's HOME
- procd_set_param env HOME=$DATADIR
+ procd_set_param env "HOME=$DATADIR"
procd_set_param limits nofile=4096
procd_set_param stdout 1
procd_set_param stderr 1
- procd_set_param user $USER
- procd_set_param pidfile $PIDFILE
+ procd_set_param user "$USER"
+ procd_set_param pidfile "$PIDFILE"
procd_close_instance
}
--- /dev/null
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=kea
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=3
+PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
+PKG_BUILD_DEPENDS:=boost log4cplus kea/host
+HOST_BUILD_DEPENDS:=boost boost/host log4cplus/host
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)/
+
+PKG_HASH:=edce4fab68ca7af607cf7f5bc86596e04fe0ef4b8e88906e339cdefcf21daaec
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=MPL-2.0
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
+
+define Package/kea/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=ISC Kea
+ URL:=https://www.isc.org/kea
+endef
+
+define Package/kea/description
+ Kea is an open source DHCPv4/DHCPv6 server being developed by Internet
+ Systems Consortium. Kea is a high-performance, extensible DHCP server
+ engine that is designed to be easily modified and extended with hooks
+ libraries. It provides DHCPv4 and DHCPv6 servers, a dynamic DNS update
+ module, a portable DHCP library, libdhcp++, control agent that provides
+ management REST interface, and a DHCP benchmarking tool, perfdhcp.
+endef
+
+define Package/kea-libs
+ $(call Package/kea/Default)
+ TITLE+= Libraries
+ DEPENDS:=+libopenssl +log4cplus \
+ +boost +boost-python3 +boost-system
+endef
+
+define Package/kea-dhcp4
+ $(call Package/kea/Default)
+ TITLE+= DHCP Server v4
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-dhcp6
+ $(call Package/kea/Default)
+ TITLE+= DHCP Server v6
+ DEPENDS:=@IPV6 +kea-libs
+endef
+
+define Package/kea-dhcp-ddns
+ $(call Package/kea/Default)
+ TITLE+= DHCP - DDNS
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-admin
+ $(call Package/kea/Default)
+ TITLE+= Admin
+ DEPENDS:= +kea-libs +python3
+endef
+
+define Package/kea-ctrl
+ $(call Package/kea/Default)
+ TITLE+= Control
+ DEPENDS:= +kea-dhcp4 +IPV6:kea-dhcp6 \
+ +kea-dhcp-ddns
+endef
+
+define Package/kea-lfc
+ $(call Package/kea/Default)
+ TITLE+= lfc
+ DEPENDS:=+kea-libs
+endef
+
+define Package/kea-perfdhcp
+ $(call Package/kea/Default)
+ TITLE+= perfdhcp
+ DEPENDS:=+kea-libs
+endef
+
+CONFIGURE_ARGS += \
+ --with-log4cplus="$(STAGING_DIR)/usr" \
+ --with-openssl="$(STAGING_DIR)/usr" \
+ $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,)
+
+CONFIGURE_VARS += \
+ cross_compiling="yes"
+
+HOST_CONFIGURE_ARGS += \
+ --enable-static-link \
+ --enable-boost-headers-only \
+ --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
+ --with-boost-include="$(STAGING_DIR)/usr/include" \
+ --with-openssl="$(STAGING_DIR)/usr" \
+ --without-pic
+
+HOST_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed
+
+TARGET_CXXFLAGS += \
+ $(FPIC) \
+ -fdata-sections \
+ -ffunction-sections
+
+TARGET_LDFLAGS += \
+ -Wl,--gc-sections,--as-needed
+
+# Only compile the kea-msg-compiler which we need for
+# package compilation
+define Host/Compile
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/exceptions $(HOST_MAKE_FLAGS)
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/util $(HOST_MAKE_FLAGS)
+ +$(HOST_MAKE_VARS) \
+ $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/log $(HOST_MAKE_FLAGS)
+endef
+
+define Host/Install
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/lib/log/compiler/kea-msg-compiler \
+ $(STAGING_DIR_HOSTPKG)/bin/
+endef
+
+define Build/Compile
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/lib/log/compiler
+ $(INSTALL_BIN) $(STAGING_DIR_HOSTPKG)/bin/kea-msg-compiler \
+ $(PKG_BUILD_DIR)/src/lib/log/compiler/
+ $(call Build/Compile/Default)
+endef
+
+define Package/kea-libs/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/kea-dhcp4/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp4 $(1)/usr/sbin/kea-dhcp4
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp4.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp6/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp6 $(1)/usr/sbin/kea-dhcp6
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp6.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp-ddns/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp-ddns $(1)/usr/sbin/kea-dhcp-ddns
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp-ddns.conf $(1)/etc/kea/
+endef
+
+define Package/kea-admin/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-admin $(1)/usr/sbin/kea-admin
+endef
+
+define Package/kea-ctrl/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keactrl $(1)/usr/sbin/keactrl
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-ctrl-agent $(1)/usr/sbin/kea-ctrl-agent
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/keactrl.conf $(1)/etc/kea/
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-ctrl-agent.conf $(1)/etc/kea/
+ $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-netconf.conf $(1)/etc/kea/
+endef
+
+define Package/kea-lfc/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-lfc $(1)/usr/sbin/kea-lfc
+endef
+
+define Package/kea-perfdhcp/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/perfdhcp $(1)/usr/sbin/perfdhcp
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,kea-libs))
+$(eval $(call BuildPackage,kea-dhcp4))
+$(eval $(call BuildPackage,kea-dhcp6))
+$(eval $(call BuildPackage,kea-dhcp-ddns))
+$(eval $(call BuildPackage,kea-admin))
+$(eval $(call BuildPackage,kea-ctrl))
+$(eval $(call BuildPackage,kea-lfc))
+$(eval $(call BuildPackage,kea-perfdhcp))
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -580,10 +580,10 @@ AC_TRY_COMPILE([
+ AC_MSG_RESULT(no))
+
+ AC_MSG_CHECKING(for usuable C++11 regex)
+-AC_TRY_RUN([
++AC_TRY_COMPILE([
+ #include <regex>
+-#include <iostream>
+-int main() {
++#include <iostream>],
++[int main() {
+ const std::regex regex(".*");
+ const std::string string = "This should match!";
+ const auto result = std::regex_search(string, regex);
--- /dev/null
+--- a/m4macros/ax_crypto.m4
++++ b/m4macros/ax_crypto.m4
+@@ -454,7 +454,7 @@ EOF
+ dnl Check availability of SHA-2
+ AC_MSG_CHECKING([support of SHA-2])
+ LIBS_SAVED=${LIBS}
+- LIBS="$LIBS $CRYPTO_LIBS"
++ LIBS="$LIBS $CRYPTO_LIBS -lpthread"
+ CPPFLAGS_SAVED=${CPPFLAGS}
+ CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS"
+ AC_LINK_IFELSE(
--- /dev/null
+--- a/src/bin/admin/Makefile.am
++++ b/src/bin/admin/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ # Install kea-admin in sbin.
+ sbin_SCRIPTS = kea-admin
+--- a/src/bin/agent/Makefile.am
++++ b/src/bin/agent/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/d2/Makefile.am
++++ b/src/bin/d2/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp4/Makefile.am
++++ b/src/bin/dhcp4/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp6/Makefile.am
++++ b/src/bin/dhcp6/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/keactrl/Makefile.am
++++ b/src/bin/keactrl/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ # Install keactrl in sbin and the keactrl.conf required by the keactrl
+ # in etc. keactrl will look for its configuration file in the etc folder.
+--- a/src/bin/lfc/Makefile.am
++++ b/src/bin/lfc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/netconf/Makefile.am
++++ b/src/bin/netconf/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/perfdhcp/Makefile.am
++++ b/src/bin/perfdhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/shell/Makefile.am
++++ b/src/bin/shell/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ pkgpython_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py
+
+--- a/src/hooks/dhcp/high_availability/Makefile.am
++++ b/src/hooks/dhcp/high_availability/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/lease_cmds/Makefile.am
++++ b/src/hooks/dhcp/lease_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/stat_cmds/Makefile.am
++++ b/src/hooks/dhcp/stat_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/user_chk/Makefile.am
++++ b/src/hooks/dhcp/user_chk/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiodns/Makefile.am
++++ b/src/lib/asiodns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiolink/Makefile.am
++++ b/src/lib/asiolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cc/Makefile.am
++++ b/src/lib/cc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cfgrpt/Makefile.am
++++ b/src/lib/cfgrpt/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+--- a/src/lib/config/Makefile.am
++++ b/src/lib/config/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/config_backend/Makefile.am
++++ b/src/lib/config_backend/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cql/Makefile.am
++++ b/src/lib/cql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CQL_CPPFLAGS)
+--- a/src/lib/cryptolink/Makefile.am
++++ b/src/lib/cryptolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES)
+--- a/src/lib/database/Makefile.am
++++ b/src/lib/database/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp/Makefile.am
++++ b/src/lib/dhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp_ddns/Makefile.am
++++ b/src/lib/dhcp_ddns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcpsrv/Makefile.am
++++ b/src/lib/dhcpsrv/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . testutils tests benchmarks
++SUBDIRS = . benchmarks
+
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ kea_lfc_location = @prefix@/sbin/kea-lfc
+--- a/src/lib/dns/Makefile.am
++++ b/src/lib/dns/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/eval/Makefile.am
++++ b/src/lib/eval/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/exceptions/Makefile.am
++++ b/src/lib/exceptions/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS=$(KEA_CXXFLAGS)
+--- a/src/lib/hooks/Makefile.am
++++ b/src/lib/hooks/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/http/Makefile.am
++++ b/src/lib/http/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/Makefile.am
++++ b/src/lib/log/Makefile.am
+@@ -2,7 +2,6 @@ SUBDIRS = interprocess .
+ if !CROSS_COMPILING
+ SUBDIRS += compiler
+ endif
+-SUBDIRS += tests
+
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/interprocess/Makefile.am
++++ b/src/lib/log/interprocess/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -DLOCKFILE_DIR=\"$(localstatedir)/run/$(PACKAGE_NAME)\"
+--- a/src/lib/mysql/Makefile.am
++++ b/src/lib/mysql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS)
+--- a/src/lib/pgsql/Makefile.am
++++ b/src/lib/pgsql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS)
+--- a/src/lib/process/Makefile.am
++++ b/src/lib/process/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""
+--- a/src/lib/stats/Makefile.am
++++ b/src/lib/stats/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/Makefile.am
++++ b/src/lib/util/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+
+-SUBDIRS = . io unittests tests python threads
++SUBDIRS = . io python threads
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/threads/Makefile.am
++++ b/src/lib/util/threads/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+--- a/src/lib/yang/Makefile.am
++++ b/src/lib/yang/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils pretests tests
++SUBDIRS = .
+
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_CPPFLAGS)
--- /dev/null
+if PACKAGE_keepalived
+
+menu "Configuration"
+
+config KEEPALIVED_BFD
+ bool
+ default n
+ prompt "Enable BFD support"
+ help
+ Builds support for BFD
+
+config KEEPALIVED_SHA1
+ bool
+ default y
+ prompt "Enable SHA1 support in genhash"
+ help
+ Builds support for using SHA1 with genhash
+
+config KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS support"
+ help
+ Builds support for IPVS
+
+config KEEPALIVED_LVS_SYNCD
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS syncd daemon control"
+ help
+ Builds support for configuring IPVS syncd daemon
+
+config KEEPALIVED_LVS_64BIT_STATS
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable IPVS 64 bit stats"
+ help
+ Builds support for IPVS 64 bit stats
+
+config KEEPALIVED_FWMARK
+ depends on KEEPALIVED_LVS
+ bool
+ default y
+ prompt "Enable support for setting FWMARK on sockets"
+ help
+ Builds support for setting firewall mark on checker sockets
+
+config KEEPALIVED_SNMP_CHECKER
+ depends on KEEPALIVED_LVS
+ bool
+ default n
+ prompt "Enable SNMP support for checker (LVS)"
+ help
+ Builds support for using SNMP with LVS
+
+config KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable VRRP support"
+ help
+ Builds support for VRRP
+
+config KEEPALIVED_IPTABLES
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable iptables for VIP filtering"
+ help
+ Builds support for using iptables/ipsets for filtering packets
+ to VIPs
+
+config KEEPALIVED_SNMP_VRRP
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRP"
+ help
+ Builds support for using SNMP with VRRP
+
+config KEEPALIVED_SNMP_RFC2
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRPv2 (RFC2787)"
+ help
+ Builds support for using RFC2787 SNMP support for VRRPv2
+
+config KEEPALIVED_SNMP_RFC3
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable SNMP support for VRRPv3 (RFC6527)"
+ help
+ Builds support for using RFC6527 SNMP support for VRRPv3
+
+config KEEPALIVED_SNMP_REPLY_V3_FOR_V2
+ depends on KEEPALIVED_SNMP_RFC3
+ bool
+ default n
+ prompt "Enable SNMP v3 responses for VRRPv2 instances"
+ help
+ Builds support for using SNMP v3 responses for VRRPv2 instances
+
+config KEEPALIVED_DBUS
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable DBus support"
+ help
+ Builds support for using DBus with VRRP
+
+config KEEPALIVED_JSON
+ depends on KEEPALIVED_VRRP
+ bool
+ default n
+ prompt "Enable JSON support with VRRP"
+ help
+ Builds support for using JSON output for VRRP
+
+config KEEPALIVED_VRRP_AUTH
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable (removed) VRRPv2 authentication"
+ help
+ Builds support for using (removed) VRRPv2 authentication
+ Note: authentication was removed from the VRRPv2 specification
+ by RFC3768 in 2004.
+ Use of this option is non-compliant and can cause problems.
+ Avoid using if possible, except when using unicast, where it
+ can be helpful.
+
+config KEEPALIVED_CHECKSUM_COMPAT
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable checksum compatibility"
+ help
+ Builds support for interworking with instances using
+ old(incorrect) checksum method
+
+config KEEPALIVED_ROUTES
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable support for VRRP instances managing routes and rules"
+ help
+ Builds support for VRRP instances adding and removing IP
+ routes and rules
+
+config KEEPALIVED_LINKBEAT
+ depends on KEEPALIVED_VRRP
+ bool
+ default y
+ prompt "Enable support for linkbeat"
+ help
+ Builds support for using linkbeat polling to monitor the state
+ of interfaces
+
+endmenu
+
+endif # PACKAGE_keepalived
include $(TOPDIR)/rules.mk
PKG_NAME:=keepalived
-PKG_VERSION:=2.0.10
+PKG_VERSION:=2.0.15
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.keepalived.org/software
-PKG_HASH:=40e0e55afed9ca313d621a9c5878579696fafb5504dab521aadaf20ba6e7f597
+PKG_SOURCE_URL:=https://www.keepalived.org/software
+PKG_HASH:=933ee01bc6346aa573453b998f87510d3cce4aba4537c9642b24e6dbfba5c6f4
PKG_CPE_ID:=cpe:/a:keepalived:keepalived
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Ben Kelly <ben@benjii.net> \
Florian Eckert <fe@dev.tdt.de>
+PKG_CONFIG_DEPENDS += \
+ KEEPALIVED_VRRP \
+ KEEPALIVED_LVS \
+ KEEPALIVED_IPTABLES \
+ KEEPALIVED_BFD \
+ KEEPALIVED_SNMP_VRRP \
+ KEEPALIVED_SNMP_CHECKER \
+ KEEPALIVED_SNMP_RFC2 \
+ KEEPALIVED_SNMP_RFC3 \
+ KEEPALIVED_SNMP_REPLY_V3_FOR_V2 \
+ KEEPALIVED_DBUS \
+ KEEPALIVED_JSON \
+ KEEPALIVED_ROUTES \
+ IPV6
+
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
+define Package/keepalived/config
+ source "$(SOURCE)/Config.in"
+endef
+
+# specifying +(IPV6&&KEEPALIVED_IPTABLES) in the DEPENDS definition doesn't work
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES)$(CONFIG_IPV6),yy)
+ KEEPALIVED_DEPENDS_LIBIP6TC=+libip6tc
+endif
+
+# The +kmod-nf-ipvs line should be +KEEPALIVED_LVS:kmod-nf-ipvs,
+# but make menuconfig then reports :error: recursive dependency detected!
+# !!FIXME DEPENDS:= +KEEPALIVED_LVS:kmod-nf-ipvs
define Package/keepalived
SECTION:=net
CATEGORY:=Network
- TITLE:=Failover and monitoring daemon for LVS clusters
+ TITLE:=VRRP with failover and monitoring daemon for LVS clusters
URL:=http://www.keepalived.org/
DEPENDS:= \
- +libopenssl \
- +libip4tc \
- +IPV6:libip6tc \
- +libxtables \
- +kmod-macvlan \
+ +libnl-genl \
+libmagic \
- +libnl-route \
- +libnfnetlink \
- +kmod-nf-ipvs
+ +KEEPALIVED_VRRP:kmod-macvlan \
+ +KEEPALIVED_VRRP:libnl-route \
+ +KEEPALIVED_VRRP:libnfnetlink \
+ +KEEPALIVED_SHA1:libopenssl \
+ +KEEPALIVED_IPTABLES:libip4tc \
+ $(KEEPALIVED_DEPENDS_LIBIP6TC) \
+ +KEEPALIVED_IPTABLES:libxtables \
+ +KEEPALIVED_IPTABLES:libipset \
+ +(KEEPALIVED_SNMP_VRRP||KEEPALIVED_SNMP_CHECKER||KEEPALIVED_SNMP_RFC2||KEEPALIVED_SNMP_RFC3):libnetsnmp \
+ +KEEPALIVED_JSON:libjson-c \
+ +KEEPALIVED_DBUS:glib2
endef
define Package/keepalived/description
- Failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
+ VRRP with failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
endef
define Package/keepalived/conffiles
endef
CONFIGURE_ARGS+= \
- --disable-libipset \
- --disable-libnl \
- --enable-sha1 \
- --disable-snmp \
- --with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)" \
- --with-init=SYSV
+ --with-init=SYSV \
+ --disable-nftables
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),)
+CONFIGURE_ARGS += \
+ --disable-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),)
+CONFIGURE_ARGS += \
+ --disable-lvs
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_BFD),y)
+CONFIGURE_ARGS += \
+ --enable-bfd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SHA1),y)
+CONFIGURE_ARGS += \
+ --enable-sha1
+endif
+
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),y)
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES),)
+CONFIGURE_ARGS += \
+ --disable-iptables
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_IPSETS),)
+CONFIGURE_ARGS += \
+ --disable-libipset-dynamic
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_VRRP),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-rfcv2
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-rfcv3
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ifeq ($(CONFIG_KEEPALIVED_SNMP_REPLY_V3_FOR_V2),)
+CONFIGURE_ARGS += \
+ --disable-snmp-reply-v3-for-v2
+endif
+endif # CONFIG_KEEPALIVED_SNMP_RFC3
+
+ifeq ($(CONFIG_KEEPALIVED_JSON),y)
+CONFIGURE_ARGS += \
+ --enable-json
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP_AUTH),)
+CONFIGURE_ARGS += \
+ --disable-vrrp-auth
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_CHECKSUM_COMPAT),)
+CONFIGURE_ARGS += \
+ --disable-checksum-compat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+CONFIGURE_ARGS += \
+ --enable-dbus
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LINKBEAT),)
+CONFIGURE_ARGS += \
+ --disable-linkbeat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_ROUTES),)
+CONFIGURE_ARGS += \
+ --disable-routes
+endif
+endif # CONFIG_KEEPALIVED_VRRP
-MAKE_FLAGS += \
- STRIP="/bin/true" \
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),y)
+ifeq ($(CONFIG_KEEPALIVED_LVS_SYNCD),)
+CONFIGURE_ARGS += \
+ --disable-lvs-syncd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS_64BIT_STATS),)
+CONFIGURE_ARGS += \
+ --disable-lvs-64bit-stats
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_FWMARK),)
+CONFIGURE_ARGS += \
+ --disable-fwmark
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_CHECKER),y)
+CONFIGURE_ARGS += \
+ --enable-snmp-checker
+endif
+
+endif # CONFIG_KEEPALIVED_LVS
+
+
+MAKE_FLAGS += STRIP="/bin/true"
+TARGET_CFLAGS += -I$(LINUX_DIR)
define Package/keepalived/install
$(INSTALL_DIR) $(1)/usr/sbin
- $(CP) $(PKG_INSTALL_DIR)/usr/sbin/keepalived $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keepalived \
+ $(1)/usr/sbin/
+
$(INSTALL_DIR) $(1)/usr/bin
- $(CP) $(PKG_INSTALL_DIR)/usr/bin/genhash $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/genhash \
+ $(1)/usr/bin/
+
$(INSTALL_DIR) $(1)/etc/keepalived
- $(CP) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf $(1)/etc/keepalived/
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf \
+ $(1)/etc/keepalived/
+
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/keepalived.init $(1)/etc/init.d/keepalived
+ $(INSTALL_BIN) ./files/keepalived.init \
+ $(1)/etc/init.d/keepalived
+
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_CONF) ./files/keepalived.config $(1)/etc/config/keepalived
+ $(INSTALL_CONF) ./files/keepalived.config \
+ $(1)/etc/config/keepalived
+
$(INSTALL_DIR) $(1)/etc
- $(INSTALL_CONF) ./files/keepalived.user $(1)/etc/keepalived.user
+ $(INSTALL_CONF) ./files/keepalived.user \
+ $(1)/etc/keepalived.user
+
$(INSTALL_DIR) $(1)/etc/hotplug.d/keepalived
- $(INSTALL_DATA) ./files/hotplug-user $(1)/etc/hotplug.d/keepalived/01-user
+ $(INSTALL_DATA) ./files/hotplug-user \
+ $(1)/etc/hotplug.d/keepalived/01-user
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER)$(CONFIG_KEEPALIVED_SNMP_RFC2)$(CONFIG_KEEPALIVED_SNMP_RFC3),)
+ $(INSTALL_DIR) $(1)/usr/share/snmp/mibs
+endif
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER),)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt \
+ $(1)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRP-MIB.txt \
+ $(1)/usr/share/snmp/mibs/VRRP-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRPv3-MIB.txt \
+ $(1)/usr/share/snmp/mibs/VRRPv3-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+ $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf \
+ $(1)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf
+
+ $(INSTALL_DIR) $(1)/usr/share/dbus-1/interfaces
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml \
+ $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml \
+ $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml
+endif
+
endef
$(eval $(call BuildPackage,keepalived))
# option vrrp_mcast_group4 "224.0.0.18" # optional, default 224.0.0.18
# option vrrp_mcast_group6 "f02::12" # optional, default ff02::12
# option linkbeat_use_polling "1"
+# option vrrp_startup_delay "5"
#config ipaddress
# option name "ipaddress0"
config_get notification_email $1 notification_email
print_list_indent notification_email
- print_elems_indent $1 $INDENT_1 notification_email_from smtp_server smtp_connect_timeout \
- router_id vrrp_mcast_group4 vrrp_mcast_group6
+ print_elems_indent $1 $INDENT_1 \
+ notification_email_from \
+ smtp_server \
+ smtp_connect_timeout \
+ router_id \
+ vrrp_mcast_group4 \
+ vrrp_mcast_group6 \
+ vrrp_startup_delay
}
print_ipaddress_indent() {
include $(TOPDIR)/rules.mk
PKG_NAME:=knot
-PKG_VERSION:=2.7.6
+PKG_VERSION:=2.8.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=a1cb1877f04f7c2549c977c2658cfafd07c7e0e924f8e8aa8d4ae4b707f697a2
+PKG_HASH:=b21bf03e5cb6804df4e0e8b3898446349e86ddae5bf110edaf240d0ad1e2a2c6
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
Usage: /usr/share/knot/runtests.sh
endef
+export KNOT_VERSION_FORMAT=release
+
CONFIGURE_ARGS += \
--enable-recvmmsg=no \
--disable-fastparser \
$(INSTALL_DIR) $(1)/usr/share/knot
$(INSTALL_BIN) ./files/runtests.sh $(1)/usr/share/knot/
- $(INSTALL_DIR) $(1)/usr/share/knot/tap
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/runtests $(1)/usr/share/knot/tap/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/
+ $(INSTALL_DIR) $(1)/usr/share/knot/tap
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/.libs/runtests $(1)/usr/share/knot/tap/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh $(1)/usr/share/knot/tap/
$(INSTALL_DIR) $(1)/usr/share/knot/tests
find $(PKG_BUILD_DIR)/tests/$$$${module}/.libs -maxdepth 1 -executable -type f | \
xargs -I{} basename {} | \
xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/$$$${module}/.libs/{} \
- $(1)/usr/share/knot/tests/$$$${module}_{}; \
+ $(1)/usr/share/knot/tests/$$$${module}_{}; \
done
endef
-ZSCANNER_TOOL="$BUILD"/zscanner-tool
+ZSCANNER_TOOL="$SOURCE"/zscanner-tool
- plan 80
+ plan 84
include $(TOPDIR)/rules.mk
PKG_NAME:=krb5
-PKG_VERSION:=1.16.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.17
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_LICENSE_FILES:=NOTICE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.16
-PKG_HASH:=9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027
+PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.17
+PKG_HASH:=5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
TITLE:=Kerberos 5 Server
endef
+define Package/krb5-server-extras
+ $(call Package/krb5/Default)
+ DEPENDS:=+krb5-libs +libpthread
+ TITLE:=Kerberos 5 Admin Server
+endef
+
define Package/krb5-client
$(call Package/krb5/Default)
DEPENDS:=+krb5-libs
define Package/krb5-server/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
-# $(INSTALL_DIR) $(1)/usr/bin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
-# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
+endef
+
+define Package/krb5-server-extras/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
+endef
+
+define Package/krb5-server/postinst
+mkdir -p $${IPKG_INSTROOT}/etc/krb5kdc
+touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl
endef
$(eval $(call BuildPackage,krb5-libs))
$(eval $(call BuildPackage,krb5-server))
+$(eval $(call BuildPackage,krb5-server-extras))
$(eval $(call BuildPackage,krb5-client))
[ -f /etc/krb5kdc/principal ] || ( echo; echo ) | kdb5_util create -s
/usr/sbin/krb5kdc
- /usr/sbin/kadmind
+ [ -x /usr/sbin/kadmind ] && /usr/sbin/kadmind
}
stop() {
killall krb5kdc 2> /dev/null
- killall kadmind 2> /dev/null
+ [ -x /usr/sbin/kadmind ] && killall kadmind 2> /dev/null
}
PKG_NAME:=lcdringer
PKG_VERSION:=0.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,9 +87,6 @@ fi
+ AC_SUBST(GSTREAMER_CFLAGS)
+ AC_SUBST(GSTREAMER_LIBS)
+
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
+-AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-
+ AM_PROG_VALAC([0.11.4])
+ AM_CONDITIONAL(HAVE_VALAC, test -x "$VALAC")
+
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libreswan
+PKG_VERSION:=3.27
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://download.libreswan.org/
+PKG_HASH:=ead07dd701116094b483dc57e54e2a5ee9a06d3982bb142260bcbf3d1faf7b82
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+define Package/libreswan/Default
+ TITLE:=Libreswan
+ URL:=https://libreswan.org/
+endef
+
+define Package/libreswan/Default/description
+ Libreswan is a free software implementation of the most widely supported and
+ standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
+ ("IKE"). These standards are produced and maintained by the Internet
+ Engineering Task Force ("IETF").
+endef
+
+define Package/libreswan
+$(call Package/libreswan/Default)
+ SUBMENU:=VPN
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:= +kmod-libreswan +libnss +librt +libevent2 +libevent2-pthreads \
+ +ip-full
+ PROVIDES:=openswan
+ CONFLICTS:=strongswan
+ TITLE+= IPsec Server
+endef
+
+define Package/libreswan/description
+$(call Package/libreswan/Default/description)
+ Libreswan is a free software implementation of the most widely supported and
+ standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
+ ("IKE"). These standards are produced and maintained by the Internet
+ Engineering Task Force ("IETF").
+endef
+
+define KernelPackage/libreswan
+$(call Package/libreswan/Default)
+ SUBMENU:=Network Support
+ TITLE+= (kernel module)
+ FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
+ DEPENDS:= +kmod-crypto-authenc +kmod-crypto-hash +kmod-ipt-ipsec +iptables-mod-ipsec \
+ +kmod-ipsec +kmod-ipsec4 +kmod-crypto-rng +IPV6:kmod-ipsec6
+endef
+
+define KernelPackage/libreswan/description
+$(call Package/libreswan/Default/description)
+ This package contains the Libreswan kernel module.
+endef
+
+define Package/libreswan/conffiles
+/etc/ipsec.d
+/etc/ipsec.conf
+/etc/ipsec.secrets
+endef
+
+TARGET_CFLAGS+= -Wno-error=format-nonliteral
+MAKE_FLAGS+= \
+ WERROR_CFLAGS=" " \
+ USE_DNSSEC=false \
+ USE_LINUX_AUDIT=false \
+ USE_LABELED_IPSEC=false \
+ USE_NM=false \
+ USE_LIBCURL=false \
+ USE_GLIBC_KERN_FLIP_HEADERS=true \
+ USE_XAUTHPAM=false \
+ USE_FIPSCHECK=false \
+ USE_LIBCAP_NG=false \
+ USE_SYSTEMD_WATCHDOG=false \
+ INC_USRLOCAL="/usr" \
+ FINALRUNDIR="/var/run/pluto" \
+ ARCH="$(LINUX_KARCH)" \
+ KERNELSRC="$(LINUX_DIR)"
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ $(SED) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \
+ $(PKG_BUILD_DIR)/mk/program.mk
+endef
+
+define Build/Compile
+ $(call Build/Compile/Default,base)
+ $(call Build/Compile/Default,module)
+endef
+
+define Package/libreswan/install
+ $(INSTALL_DIR) \
+ $(1)/etc/init.d \
+ $(1)/etc/ipsec.d/policies \
+ $(1)/usr/libexec/ipsec \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec \
+ $(1)/usr/sbin/ipsec
+ $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
+ $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
+ $(INSTALL_DATA) ./files/ipsec.secrets $(1)/etc/ipsec.secrets
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ipsec.d/policies/* \
+ $(1)/etc/ipsec.d/policies/
+ $(CP) $(PKG_INSTALL_DIR)/usr/libexec/ipsec/* \
+ $(1)/usr/libexec/ipsec/
+endef
+
+$(eval $(call BuildPackage,libreswan))
+$(eval $(call KernelPackage,libreswan))
--- /dev/null
+# /etc/ipsec.conf - Libreswan IPsec configuration file
+#
+# see 'man ipsec.conf' and 'man pluto' for more information
+#
+# For example configurations and documentation, see https://libreswan.org/wiki/
+
+config setup
+ # Normally, pluto logs via syslog.
+ #logfile=/var/log/pluto.log
+ #
+ # Do not enable debug options to debug configuration issues!
+ #
+ # plutodebug="control parsing"
+ # plutodebug="all crypt"
+ plutodebug=none
+ #
+ # NAT-TRAVERSAL support
+ # exclude networks used on server side by adding %v4:!a.b.c.0/24
+ # It seems that T-Mobile in the US and Rogers/Fido in Canada are
+ # using 25/8 as "private" address space on their wireless networks.
+ # This range has never been announced via BGP (at least up to 2015)
+ virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10
+
+# if it exists, include system wide crypto-policy defaults
+# include /etc/crypto-policies/back-ends/libreswan.config
+
+# It is best to add your IPsec connections as separate files in /etc/ipsec.d/
+
+conn L2TP-PSK-NAT
+ rightsubnet=vhost:%priv
+ also=L2TP-PSK-noNAT
+
+conn L2TP-PSK-noNAT
+ authby=secret
+ pfs=no
+ auto=add
+ keyingtries=8
+ ikelifetime=8h
+ keylife=1h
+ type=transport
+ left=A.B.C.D
+ leftprotoport=17/1701
+ right=%any
+ rightprotoport=17/%any
+
+include /etc/ipsec.d/*.conf
\ No newline at end of file
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=10
+
+#USE_PROCD=1
+
+. $IPKG_INSTROOT/lib/functions.sh
+
+EXTRA_COMMANDS=status
+EXTRA_HELP=" status Show the status of the service"
+
+# Check that networking is up.
+[ "${NETWORKING}" = "no" ] && exit 6
+
+if [ $(id -u) -ne 0 ]; then
+ echo "permission denied (must be superuser)" | \
+ logger -s -p daemon.error -t ipsec_setup 2>&1
+ exit 4
+fi
+
+# where the private directory and the config files are
+IPSEC_EXECDIR="${IPSEC_EXECDIR-/usr/libexec/ipsec}"
+IPSEC_SBINDIR="${IPSEC_SBINDIR-/usr/sbin}"
+IPSEC_CONF="${IPSEC_CONF-/etc/ipsec.conf}"
+unset PLUTO_OPTIONS
+
+rundir=/var/run/pluto
+plutopid=${rundir}/pluto.pid
+plutoctl=${rundir}/pluto.ctl
+lockdir=/var/lock
+lockfile=${lockdir}/ipsec
+ipsecversion=/proc/net/ipsec_version
+kamepfkey=/proc/net/pfkey
+
+# /etc/resolv.conf related paths
+LIBRESWAN_RESOLV_CONF=${rundir}/libreswan-resolv-conf-backup
+ORIG_RESOLV_CONF=/etc/resolv.conf
+
+# misc setup
+umask 022
+
+# standardize PATH, and export it for everything else's benefit
+PATH="${IPSEC_SBINDIR}":/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
+export PATH
+
+mkdir -p ${rundir}
+chmod 700 ${rundir}
+
+verify_config() {
+ [ -f ${IPSEC_CONF} ] || exit 6
+ config_error=$(ipsec addconn --config ${IPSEC_CONF} --checkconfig 2>&1)
+ RETVAL=$?
+ if [ ${RETVAL} -gt 0 ]; then
+ echo "Configuration error - the following error occurred:"
+ echo ${config_error}
+ echo "IKE daemon status was not modified"
+ exit ${RETVAL}
+ fi
+}
+
+start() {
+ echo -n "Starting pluto IKE daemon for IPsec: "
+ ipsec _stackmanager start
+ # pluto searches the current directory, so this is required for making it selinux compliant
+ cd /
+ # Create nss db or convert from old format to new sql format
+ ipsec --checknss
+ # Enable nflog if configured
+ ipsec --checknflog > /dev/null
+ # This script will enter an endless loop to ensure pluto restarts on crash
+ ipsec _plutorun --config ${IPSEC_CONF} --nofork ${PLUTO_OPTIONS} & [ -d ${lockdir} ] || mkdir -p ${lockdir}
+ touch ${lockfile}
+ # Because _plutorun starts pluto at background we need to make sure pluto is started
+ # before we know if start was successful or not
+ for waitsec in 1 2 3 4 5; do
+ if status >/dev/null; then
+ RETVAL=0
+ break
+ else
+ echo -n "."
+ sleep 1
+ RETVAL=1
+ fi
+ done
+ if [ ${RETVAL} -ge 1 ]; then
+ rm -f ${lockfile}
+ fi
+ echo
+ return ${RETVAL}
+}
+
+stop() {
+ if [ -e ${plutoctl} ]; then
+ echo "Shutting down pluto IKE daemon"
+ ipsec whack --shutdown 2>/dev/null
+ # don't use seq, might not exist on embedded
+ for waitsec in 1 2 3 4 5 6 7 8 9 10; do
+ if [ -s ${plutopid} ]; then
+ echo -n "."
+ sleep 1
+ else
+ break
+ fi
+ done
+ echo
+ rm -f ${plutoctl} # we won't be using this anymore
+ fi
+ if [ -s ${plutopid} ]; then
+ # pluto did not die peacefully
+ pid=$(cat ${plutopid})
+ if [ -d /proc/${pid} ]; then
+ kill -TERM ${pid}
+ RETVAL=$?
+ sleep 5;
+ if [ -d /proc/${pid} ]; then
+ kill -KILL ${pid}
+ RETVAL=$?
+ fi
+ if [ ${RETVAL} -ne 0 ]; then
+ echo "Kill failed - removing orphaned ${plutopid}"
+ fi
+ else
+ echo "Removing orphaned ${plutopid}"
+ fi
+ rm -f ${plutopid}
+ fi
+
+ ipsec _stackmanager stop
+ ipsec --stopnflog > /dev/null
+
+ # cleaning up backup resolv.conf
+ if [ -e ${LIBRESWAN_RESOLV_CONF} ]; then
+ if grep 'Libreswan' ${ORIG_RESOLV_CONF} > /dev/null 2>&1; then
+ cp ${LIBRESWAN_RESOLV_CONF} ${ORIG_RESOLV_CONF}
+ fi
+ rm -f ${LIBRESWAN_RESOLV_CONF}
+ fi
+
+ rm -f ${lockfile}
+ return ${RETVAL}
+}
+
+restart() {
+ verify_config
+ stop
+ start
+ return $?
+}
+
+status() {
+ local RC
+ if [ -f ${plutopid} ]; then
+ if [ -r ${plutopid} ]; then
+ pid=$(cat ${plutopid})
+ if [ -n "$pid" -a -d /proc/${pid} ]; then
+ RC=0 # running
+ else
+ RC=1 # not running but pid exists
+ fi
+ else
+ RC=4 # insufficient privileges
+ fi
+ fi
+ if [ -z "${RC}" ]; then
+ if [ -f ${lockfile} ]; then
+ RC=2
+ else
+ RC=3
+ fi
+ fi
+ case "${RC}" in
+ 0)
+ echo "ipsec: pluto (pid ${pid}) is running..."
+ return 0
+ ;;
+ 1)
+ echo "ipsec: pluto dead but pid file exits"
+ return 1
+ ;;
+ 2)
+ echo "ipsec: pluto dead but subsys locked"
+ return 2
+ ;;
+ 4)
+ echo "ipsec: pluto status unknown due to insufficient privileges."
+ return 4
+ ;;
+ esac
+ echo "ipsec: pluto is stopped"
+ return 3
+}
+
+condrestart() {
+ verify_config
+ RETVAL=$?
+ if [ -f ${lockfile} ]; then
+ restart
+ RETVAL=$?
+ fi
+ return ${RETVAL}
+}
+
+version() {
+ ipsec version
+ return $?
+}
--- /dev/null
+# This file holds shared secrets (PSK) and XAUTH user passwords used for
+# authentication. See pluto(8) manpage or the libreswan website.
+
+# Unlike older openswan, this file does NOT contain any X.509 related
+# information such as private key :RSA statements as these now reside
+# in the NSS database. See:
+#
+# https://libreswan.org/wiki/Using_NSS_with_libreswan
+# https://libreswan.org/wiki/Migrating_from_Openswan
+#
+# The preferred method for adding secrets is to create a new file in
+# the /etc/ipsec.d/ directory, so it will be included via the include
+# line below
+
+#A.B.C.D %any : PSK "SsEeCcRrEeTt"
+
+include /etc/ipsec.d/*.secrets
include $(TOPDIR)/rules.mk
PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.49
-PKG_RELEASE:=5
+PKG_VERSION:=1.4.53
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
-PKG_HASH:=aedf49d7127d9e4c0ea56618e9e945a17674dc46a37ac7990120f87dd939ce09
+PKG_HASH:=3bdfce1cf3e9650a556a8c26fb15342c5717c63f530c54693db632b0371dcb78
PKG_LICENSE:=BSD-3c
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lighttpd:lighttpd
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+++ /dev/null
-diff --git a/src/rand.c b/src/rand.c
-index 10cd025..63fbb0d 100644
---- a/src/rand.c
-+++ b/src/rand.c
-@@ -226,7 +226,9 @@ int li_rand_bytes (unsigned char *buf, int num)
- void li_rand_cleanup (void)
- {
- #ifdef USE_OPENSSL_CRYPTO
-+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
- RAND_cleanup();
-+ #endif
- #endif
- safe_memclear(xsubi, sizeof(xsubi));
- }
+++ /dev/null
-From 72f2c7559a1cd75b6d86e72358b4b78cdeefa5f4 Mon Sep 17 00:00:00 2001
-From: yangfl <yangfl@users.noreply.github.com>
-Date: Fri, 1 Feb 2019 15:05:32 +0800
-Subject: [PATCH] Disable auto loading mod_authn_file
-
-Which will cause openwrt/packages#7737
----
- src/configfile.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/configfile.c b/src/configfile.c
-index 1b2651b9..29bb2aa4 100644
---- a/src/configfile.c
-+++ b/src/configfile.c
-@@ -482,9 +482,9 @@ static int config_insert(server *srv) {
- * existing lighttpd 1.4.x configs */
- if (contains_mod_auth) {
- if (append_mod_authn_file) {
-- ds = data_string_init();
-+ /* ds = data_string_init();
- buffer_copy_string_len(ds->value, CONST_STR_LEN("mod_authn_file"));
-- array_insert_unique(srv->srvconf.modules, (data_unset *)ds);
-+ array_insert_unique(srv->srvconf.modules, (data_unset *)ds); */
- }
- if (append_mod_authn_ldap) {
- #if defined(HAVE_LDAP_H) && defined(HAVE_LBER_H) && defined(HAVE_LIBLDAP) && defined(HAVE_LIBLBER)
---
-2.20.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=linknx
-PKG_VERSION:=0.0.1.36
+PKG_VERSION:=0.0.1.37
PKG_RELEASE:=1
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/linknx/linknx/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=e271ae32e2b68dff67864812c67e891d361f02960777bfb13f199dee0884f38f
+PKG_HASH:=3c3aaf8c409538153b15f5fb975a4485e58c4820cfea289a3f20777ba69782ab
PKG_BUILD_DEPENDS:=argp-standalone
PKG_FORTIFY_SOURCE:=1
PKG_NAME:=mini_snmpd
PKG_VERSION:=1.4-rc1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PROG=/usr/bin/mini_snmpd
NAME=mini_snmpd
+global_respawn_threshold=
+global_respawn_timeout=
+global_respawn_retry=
+
_log() {
- logger -p daemon.info -t mini_snmpd "$@"
+ logger -p daemon.info -t mini_snmpd "$@"
}
_err() {
- logger -p daemon.err -t mini_snmpd "$@"
+ logger -p daemon.err -t mini_snmpd "$@"
}
-# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd
+# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd
# and at least configuration entry for network physical interface defined in /etc/config/network
# It handles network interfaces not yet present (e.g. ppp) but will statfs() the root/wrong filesystem if device not mounted
# Tip: complex scripts run faster without in openwrt if you stop busybox forking and searching for applets. Faster bootups
# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
-# BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n]
+# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+# BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n]
# CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD
mini_snmpd_validation="enabled:bool:0 \
append_disk() {
local disk="$1" disk_count
[ -z $disk_count ] && disk_count=0
- if grep -qF "$disk" /proc/mounts ; then
+ if grep -qF "$disk" /proc/mounts; then
# check the fileystem is mountpoint, and directory search permissions available for statfs()
# presence as a directory -d test done is already done by uci_validate_section()
[ -x "$disk" ] || {
_err "$cfg: mountpoint $disk for snmp monitoring EACCES error. Check permissions, ignoring"
return 1
}
- if [ $disk_count -lt 4 ] ; then
+ if [ $disk_count -lt 4 ]; then
append disks_arg "$disk" ','
disk_count=$((disk_count++))
else
[ -z $netdev_count ] && netdev_count=0
# for the purposes of snmp monitoring it doesn't need to be up, it just needs to exist in /proc/net/dev
network_get_device netdev "$name"
- if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then
+ if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then
[ $netdev_count -ge 4 ] && {
_err "$cfg: too many network interfaces configured, ignoring $name"
return
}
- netdev_count=$((netdev_count++))
- if [ -n "$interfaces_arg" ]; then
+ netdev_count=$((netdev_count++))
+ if [ -n "$interfaces_arg" ]; then
append interfaces_arg "$netdev" ','
- else
+ else
append interfaces_arg "$netdev"
fi
else
config_get listen_interface "$cfg" listen_interface
# If the interface is up & instance is running we'll watch at the instance level and only restart that instance if it's bound interface changes
# Regardless of ubus knowing about an interface (in the case it's not yet configured)
- [ -n "$listen_interface" ] && trigger_interfaces="${listen_interface} ${trigger_interfaces} "
+ [ -n "$listen_interface" ] && trigger_interfaces="$listen_interface $trigger_interfaces"
# Restart daemon if one of monitored interfaces changes
config_get reload_interfaces "$cfg" interfaces
-
}
validate_mini_snmpd_section() {
# validate a mini_snmpd instance in uci config file mini_snmpd
# http://luci.subsignal.org/trac/wiki/Documentation/Datatypes ubox/validate/validate.c
- uci_validate_section mini_snmpd mini_snmpd "${1}" $mini_snmpd_validation
+ uci_load_validate mini_snmpd mini_snmpd "$1" "$2" $mini_snmpd_validation
}
service_triggers() {
- config_load 'mini_snmpd'
- procd_open_trigger
- procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload
- config_foreach watch_interfaces 'mini_snmpd'
+ config_load 'mini_snmpd'
+ procd_open_trigger
+ procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload
+ config_foreach watch_interfaces 'mini_snmpd'
# this only watches interfaces for which there is no running instance due to interface down / not in ubus
# hence start not reload, this trigger will not affect running instances as another start will not change their procd command arguments
# or stop the already running process
- [ -n "$trigger_interfaces" ] & {
- for n in $trigger_interfaces ; do
+ [ -n "$trigger_interfaces" ] && {
+ for n in $trigger_interfaces; do
procd_add_interface_trigger "interface.*" $n /etc/init.d/mini_snmpd start
- done
- }
+ done
+ }
[ -n "$reload_interfaces" ] && {
for n in $reload_interfaces; do
procd_add_reload_interface_trigger $n
done
}
- procd_close_trigger
+ procd_close_trigger
procd_add_validation validate_mini_snmpd_section
}
start_instance() {
local cfg validation_failed validation_err disks_arg interfaces_arg
- cfg="$1"
- #uci_validate_section should unset undefined variables from other instances
- #however defining uci variables as local will scope them to this instance
- #"local variables are also visible to functions called by the parent function" so it's good practice
- local enabled ipv6 debug auth community contact location listen_interface \
- udp_port tcp_port vendor_oid mib_timeout
- local disks="" interfaces=""
- validate_mini_snmpd_section "$cfg" 2>/dev/null || validation_failed=1
- [ "$enabled" == 1 ] || {
- _log "instance:$cfg disabled not starting"
+ cfg="$1"
+ [ "$2" = 0 ] || validation_failed=1
+ [ "$enabled" == 1 ] || {
+ _log "instance:$cfg disabled not starting"
return 1
}
-
+
local listen_interface_json listen_interface_ip listen_interface_device listen_interface_up
[ -n "$listen_interface" ] && {
if [ "$ipv6" = 1 ]; then
network_get_physdev listen_interface_device "$listen_interface"
}
- [ $validation_failed ] && {
+ [ $validation_failed ] && {
_err "validation of $NAME configuration for $cfg instance failed, all tests should be within constraints"
_err "please edit the configuration values below using [l]uci "
validation_err=`/sbin/validate_data mini_snmpd mini_snmpd "$cfg" $mini_snmpd_validation 2>&1 | sed '/with\ false$/!d;s/validates\ as\ /needs\ to\ be\ /;s/with\ false//' `
- _err "${validation_err}"
+ _err "$validation_err"
return 1
}
config_list_foreach "$cfg" 'disks' append_disk
_err "$cfg: you haven't sucessfully configured any mountpoints or disks for this instance, not starting"
return 1
}
-
+
+ [ -z "$respawn_threshold$respawn_timeout$respawn_retry" ] && {
+ respawn_threshold=$global_respawn_threshold
+ respawn_timeout=$global_respawn_timeout
+ respawn_retry=$global_respawn_retry
+ }
+ [ -z "$global_respawn_threshold$global_respawn_timeout$global_respawn_retry" ] && {
+ global_respawn_threshold=$respawn_threshold
+ global_respawn_timeout=$respawn_timeout
+ global_respawn_retry=$respawn_retry
+ }
+
procd_open_instance
procd_set_param command "$PROG" -n
- procd_set_param stdout "1"
+ procd_set_param stdout "1"
procd_set_param stderr "1"
# don't the like default respawn values? you can override through uci.
- # vars left as global so you only need to do it in the first mini_snmpd instance
+ # vars saved as global so you only need to do it in the first mini_snmpd instance
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-10} ${respawn_retry:-1}
# this monitors ubus changes
[ -n "$listen_interface" ] && {
#procd_open_trigger
- #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload
+ #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload
#procd_close_trigger
procd_add_reload_interface_trigger $listen_interface #or use shorthand of above
}
# this re-starts the daemon if a properly configured network interface is changed whilst it is already running
- # igmpproxy has this as well as "procd_set_param netdev"
-
- append_arg "-c" "$community"
- append_arg "-L" "${location}"
- append_arg "-C" "${contact}"
- append_arg "-p" $udp_port
- append_arg "-P" $tcp_port
- append_arg "-V" "${vendor_oid}"
- append_arg "-t" $mib_timeout
-
- [ "$ipv6" = 1 ] && procd_append_param command "-6"
+ # igmpproxy has this as well as "procd_set_param netdev"
+
+ append_arg "-c" "$community"
+ append_arg "-L" "$location"
+ append_arg "-C" "$contact"
+ append_arg "-p" $udp_port
+ append_arg "-P" $tcp_port
+ append_arg "-V" "$vendor_oid"
+ append_arg "-t" $mib_timeout
+
+ [ "$ipv6" = 1 ] && procd_append_param command "-6"
[ "$debug" = 1 ] && procd_append_param command "-v"
- # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string
+ # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string
# e.g. ="1" however it sets bools defined in /etc/config/* to =1 / =0
[ "$auth" = 1 -o "$auth" = "1" ] && procd_append_param command "-a"
[ -n "$disks_arg" ] && procd_append_param command "-d" "$disks_arg"
. /lib/functions/network.sh
config_load 'mini_snmpd'
- config_foreach start_instance 'mini_snmpd'
+ config_foreach validate_mini_snmpd_section 'mini_snmpd' start_instance
}
-
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto
-PKG_VERSION:=1.5.7
-PKG_RELEASE:=1
+PKG_VERSION:=1.5.8
+PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.txt
PKG_CPE_ID:=cpe:/a:eclipse:mosquitto
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://mosquitto.org/files/source/
-PKG_HASH:=d4024c3388502d50be4192991e90d66dfb344376104df3f63846c9f201779955
+PKG_HASH:=78d7e70c3794dc3a1d484b4f2f8d3addebe9c2da3f5a1cebe557f7d13beb0da4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
append_if "$1" max_queued_bytes
append_if "$1" max_queued_messages
append_if "$1" message_size_limit
- append_if "$1" passwd_file
+ append_if "$1" password_file
append_if "$1" pid_file
append_if "$1" psk_file
append_optional_bool "$1" queue_qos0_messages
include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
-PKG_VERSION:=2.7.11
+PKG_VERSION:=2.7.12
PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=GPLv2
MMX_UNREACHABLE=""
MM_UNREACHABLE=""
+# return true(=0) if has any mwan3 interface enabled
+# otherwise return false
mwan3_rtmon_ipv4()
{
local tid=1
return $ret
}
+# return true(=0) if has any mwan3 interface enabled
+# otherwise return false
mwan3_rtmon_ipv6()
{
local tid=1
sleep 3
while true; do
mwan3_lock "service" "mwan3rtmon"
- [ mwan3_remon_ipv4 = "1" ] || \
- [ mwan3_rtmon_ipv6 = "1" ] && break
+ mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6
+ ret=$?
mwan3_unlock "service" "mwan3rtmon"
+ [ "$ret" = "0" ] || break
[ "$rtmon_interval" = "0" ] && break
sleep "$rtmon_interval" &
wait
done
- mwan3_unlock "service" "mwan3rtmon"
}
main "$@"
$(call Package/net-snmp/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libnl-tiny
+ DEPENDS:=+libnl-tiny +libpci
TITLE:=Open source SNMP implementation (libraries)
endef
PKG_NAME:=nfs-kernel-server
PKG_VERSION:=2.3.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
PKG_SOURCE_URL:=@SF/nfs
PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
+PKG_BUILD_DEPENDS:=$(PKG_NAME)/host libevent2
HOST_BUILD_DEPENDS:=libtirpc/host
PKG_CONFIG_DEPENDS:= \
$(call Package/nfs-kernel-server/Default)
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS+= +libevent2 +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+ DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
URL:=http://nfs.sourceforge.net/
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=nft-qos
-PKG_VERSION:=1.0.4
+PKG_VERSION:=1.0.6
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
CATEGORY:=Base system
DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
TITLE:=QoS scripts over nftables
+ PKGARCH:=all
endef
define Package/nft-qos/description
. /lib/nft-qos/core.sh
+qosdef_validate_dynamic() {
+ uci_load_validate nft-qos default "$1" "$2" \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)' \
+ 'dynamic_bw_up:uinteger:100' \
+ 'dynamic_bw_down:uinteger:100'
+}
+
# return average rate for dhcp leases
qosdef_dynamic_rate() { # <bandwidth>
local c=0 c6=0
# init dynamic qos
qosdef_init_dynamic() {
- local dynamic_bw_up dynamic_bw_down limit_enable limit_type
local hook_ul="prerouting" hook_dl="postrouting"
- uci_validate_section nft-qos default default \
- 'limit_enable:bool:0' \
- 'limit_type:maxlength(8)' \
- 'dynamic_bw_up:uinteger:100' \
- 'dynamic_bw_down:uinteger:100'
-
- [ $? -ne 0 ] && {
+ [ "$2" = 0 ] || {
logger -t nft-qos-dynamic "validation failed"
return 1
}
P1=""; P2=""; P3=""; P4=""; P5=""; P6="";
P7=""; P8=""; P9=""; P10=""; P11="";
+qosdef_validate_priority() {
+ uci_load_validate nft-qos default "$1" "$2" \
+ 'priority_enable:bool:0' \
+ 'priority_netdev:maxlength(8)'
+}
+
_qosdef_handle_protox() { # <priority> <rule>
case "$1" in
-400) P1="$P1""$2";;
# init traffic priority
qosdef_init_priority() {
- local priority_enable priority_netdev ifname="br-lan"
+ local ifname="br-lan"
- uci_validate_section nft-qos default default \
- 'priority_enable:bool:0' \
- 'priority_netdev:maxlength(8)'
-
- [ $? -ne 0 ] && {
+ [ "$2" = 0 ] || {
logger -t nft-qos-priority "validation failed"
return 1
}
;;
wan*) network_get_device ifname "$priority_netdev" || \
ifname="$(uci_get network.$priority_netdev.ifname)"
+ ;;
esac
qosdef_appendx "table netdev nft-qos-priority {\n"
. /lib/nft-qos/core.sh
+qosdef_validate_static() {
+ uci_load_validate nft-qos default "$1" "$2" \
+ 'limit_enable:bool:0' \
+ 'limit_type:maxlength(8)' \
+ 'static_unit_dl:string:kbytes' \
+ 'static_unit_ul:string:kbytes' \
+ 'static_rate_dl:uinteger:50' \
+ 'static_rate_ul:uinteger:50'
+}
+
# append rule for static qos
qosdef_append_rule_sta() { # <section> <operator> <default-unit> <default-rate>
local ipaddr unit rate
# static limit rate init
qosdef_init_static() {
- local unit_dl unit_ul rate_dl rate_ul
- local limit_enable limit_type hook_ul="prerouting" hook_dl="postrouting"
-
- uci_validate_section nft-qos default default \
- 'limit_enable:bool:0' \
- 'limit_type:maxlength(8)' \
- 'static_unit_dl:string:kbytes' \
- 'static_unit_ul:string:kbytes' \
- 'static_rate_dl:uinteger:50' \
- 'static_rate_ul:uinteger:50'
+ local hook_ul="prerouting" hook_dl="postrouting"
- [ $? -ne 0 ] && {
+ [ "$2" = 0 ] || {
logger -t nft-qos-static "validation failed"
return 1
}
}
qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-static {\n"
- qosdef_append_chain_sta $hook_ul upload upload $unit_ul $rate_ul
- qosdef_append_chain_sta $hook_dl download download $unit_dl $rate_dl
+ qosdef_append_chain_sta $hook_ul upload upload $static_unit_ul $static_rate_ul
+ qosdef_append_chain_sta $hook_dl download download $static_unit_dl $static_rate_dl
qosdef_appendx "}\n"
}
NFT_QOS_DYNAMIC_ON=
-qosdef_validate_section_dynamic() {
- local limit_enable limit_type
-
- uci_validate_section nft-qos default default \
- 'limit_enable:bool:0' \
- 'limit_type:maxlength(8)'
-
+qosdef_check_if_dynamic() {
[ $limit_enable -eq 1 -a \
"$limit_type" = "dynamic" ] && \
NFT_QOS_DYNAMIC_ON="y"
case "$ACTION" in
add | update | remove)
- qosdef_validate_section_dynamic
+ qosdef_validate_dynamic default qosdef_check_if_dynamic
[ -z "$NFT_QOS_DYNAMIC_ON" ] && return
qosdef_init_env
qosdef_flush_dynamic
qosdef_init_header
- qosdef_init_dynamic
+ qosdef_validate_dynamic default qosdef_init_dynamic
qosdef_init_done
qosdef_start
;;
# Traffic Priority Samples :
#
# protocol : tcp, udp, udplite, sctp, dccp, tcp is default
-# priority : integer between 1-11, 1 is default
-# service : you can input a integer or service name, e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
+# priority : integer between 1-11, 1 is default and the highest
+# service : you can input a integer or service name,
+# e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
#
#config priority
# option protocol 'tcp'
service_triggers() {
procd_add_reload_trigger nft-qos
+
+ procd_open_validate
+ qosdef_validate_dynamic
+ qosdef_validate_static
+ qosdef_validate_priority
+ procd_close_validate
}
start_service() {
qosdef_init_header
qosdef_init_monitor
- qosdef_init_dynamic
- qosdef_init_static
- qosdef_init_priority
+ qosdef_validate_dynamic default qosdef_init_dynamic
+ qosdef_validate_static default qosdef_init_static
+ qosdef_validate_priority default qosdef_init_priority
qosdef_init_done
qosdef_start
}
include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
-PKG_VERSION:=1.15.8
+PKG_VERSION:=1.15.10
PKG_RELEASE:=1
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787
+PKG_HASH:=b865743abd52bce4745d0f7e7fedde3cafbaaab617b022c105e3e4e456537c3c
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
Ansuel Smith <ansuelsmth@gmail.com>
CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
CONFIG_NGINX_RTMP_MODULE \
CONFIG_NGINX_TS_MODULE \
+ CONFIG_OPENSSL_ENGINE \
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Web Servers/Proxies
TITLE:=Nginx web server
URL:=http://nginx.org/
- DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
+ DEPENDS:=+NGINX_PCRE:libpcre +NGINX_SSL:libopenssl \
+NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
endef
endef
Package/nginx-ssl/description = $(Package/nginx/description) \
- This varian is compiled with SSL support enabled. To enable additional module \
+ This variant is compiled with SSL support enabled. To enable additional module \
select them in the nginx default configuration menu.
define Package/nginx-all-module
endef
Package/nginx-all-module/description = $(Package/nginx/description) \
- This varian is compiled with ALL module selected.
+ This variant is compiled with ALL module selected.
define Package/nginx/config
source "$(SOURCE)/Config.in"
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p12
-PKG_RELEASE:=2
+PKG_VERSION:=4.2.8p13
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_HASH:=709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
+PKG_HASH:=288772cecfcd9a53694ffab108d1825a31ba77f3a8466b0401baeca3bc232a38
PKG_LICENSE:=Unique
PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
+PKG_CPE_ID:=cpe:/a:ntp:ntp
PKG_FIXUP:=autoreconf
PKG_LIBTOOL_PATHS:=. sntp
include $(TOPDIR)/rules.mk
PKG_NAME:=obfs4proxy
-PKG_VERSION:=0.0.7
-PKG_RELEASE:=1
+PKG_VERSION:=0.0.9
+PKG_RELEASE:=2
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/obfs4.git
-PKG_SOURCE_VERSION:=8256fac93c2cf79742725e3aaced5bbe3380fd32
-PKG_SOURCE_DATE:=20161115
-PKG_MIRROR_HASH:=9c504337f7a2b46310083224cf0998fc7645f8af5d50657cf74358d39916eddc
+PKG_SOURCE:=obfs4-$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4/-/archive/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_HASH:=ab2608014fae15b4e0dad2f8128e81f912ab27277539004b759180c1fb5007dd
+PKG_BUILD_DIR:=$(BUILD_DIR)/obfs4-$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
-GO_PKG:=git.torproject.org/pluggable-transports/obfs4.git
+GO_PKG:=gitlab.com/yawning/obfs4.git
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/obfs4proxy/Default
TITLE:=A Tor pluggable transport proxy, implementing obfs4
- URL:=https://gitweb.torproject.org/pluggable-transports/obfs4.git/
+ URL:=https://gitlab.com/yawning/obfs4
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
CATEGORY:=Network
endef
-define Package/golang-torproject-pluggable-transports-obfs4-dev
+define Package/golang-gitlab-yawning-obfs4-dev
$(call Package/obfs4proxy/Default)
$(call GoPackage/GoSubMenu)
TITLE+= (source files)
- DEPENDS+= \
- +golang-github-agl-ed25519-dev \
- +golang-github-dchest-siphash-dev \
- +golang-golang-x-crypto-dev \
- +golang-golang-x-net-dev \
- +golang-torproject-pluggable-transports-goptlib-dev
PKGARCH:=all
endef
program.
endef
-define Package/golang-torproject-pluggable-transports-obfs4-dev/description
+define Package/golang-gitlab-yawning-obfs4-dev/description
$(call Package/obfs4proxy/Default/description)
This package provides the source files for the client/bridge program.
$(eval $(call GoBinPackage,obfs4proxy))
$(eval $(call BuildPackage,obfs4proxy))
-
-$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-obfs4-dev))
-$(eval $(call BuildPackage,golang-torproject-pluggable-transports-obfs4-dev))
+$(eval $(call GoSrcPackage,golang-gitlab-yawning-obfs4-dev))
+$(eval $(call BuildPackage,golang-gitlab-yawning-obfs4-dev))
+++ /dev/null
-From af4824cb0b2c36a0eba4bc1590eb0737302e992e Mon Sep 17 00:00:00 2001
-From: Yawning Angel <yawning@schwanenlied.me>
-Date: Wed, 10 Jan 2018 15:11:44 +0000
-Subject: Bug 24793: Send the correct authorization HTTP header for basic auth.
-
-Apparently I didn't test the "connect via HTTP(s)" proxy with
-authentication at all when I added that functionality, so it has been
-broken for years.
-
-This should fix it now.
----
- obfs4proxy/proxy_http.go | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go
-index 6f11790..a5c2100 100644
---- a/obfs4proxy/proxy_http.go
-+++ b/obfs4proxy/proxy_http.go
-@@ -29,6 +29,7 @@ package main
-
- import (
- "bufio"
-+ "encoding/base64"
- "fmt"
- "net"
- "net/http"
-@@ -90,7 +91,9 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
- }
- req.Close = false
- if s.haveAuth {
-- req.SetBasicAuth(s.username, s.password)
-+ // SetBasicAuth doesn't quite do what is appropriate, because
-+ // the correct header is `Proxy-Authorization`.
-+ req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username + ":" + s.password)))
- }
- req.Header.Set("User-Agent", "")
-
---
-cgit v1.1
-
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
-PKG_VERSION:=0.12.2
+PKG_VERSION:=0.12.3
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_HASH:=71ccf1dfe9e13a05d9dc1104256cad6ff91e7b7d8c07a02398842ce018a3897d
+PKG_HASH:=42f8f459dae6f88862d4098997d8f5668d97439ec78beede3985f6ff24d91edd
PKG_LICENSE:=GPLv2+
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=ola
PKG_VERSION:=0.10.7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
--- /dev/null
+From d311970864a2338d63ce3c22a46bb9ec4bb26bfe Mon Sep 17 00:00:00 2001
+From: Peter Newman <peterjnewman@gmail.com>
+Date: Fri, 8 Mar 2019 15:43:50 +0000
+Subject: [PATCH] Attempt to fix Protobuf 3.7 builds
+
+---
+ configure.ac | 3 +++
+ protoc/StrUtil.cpp | 10 ++++++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9824609b4..4f782847c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -803,6 +803,9 @@ AS_IF([test "${enable_rdm_tests}" = "yes"],
+ AS_IF([test "x$build_java_libs" = xyes],
+ [PROTOBUF_SUPPORT([2.4.0])],
+ [PROTOBUF_SUPPORT([2.3.0])])
++# Version 3.7 and above of protoc require some additional includes
++AC_CHECK_HEADERS([google/protobuf/io/strtod.h google/protobuf/stubs/logging.h \
++ google/protobuf/stubs/stl_util.h])
+
+
+ # Doxygen
+diff --git a/protoc/StrUtil.cpp b/protoc/StrUtil.cpp
+index 85891a6a4..2914e82f1 100644
+--- a/protoc/StrUtil.cpp
++++ b/protoc/StrUtil.cpp
+@@ -41,6 +41,16 @@
+
+ #include "protoc/StrUtil.h"
+
++#ifdef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
++#include <google/protobuf/io/strtod.h>
++#endif // HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
++#ifdef HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H
++#include <google/protobuf/stubs/logging.h>
++#endif // HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H
++#ifdef HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H
++#include <google/protobuf/stubs/stl_util.h>
++#endif // HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H
++
+ #ifdef _WIN32
+ // MSVC has only _snprintf, not snprintf.
+ //
--- /dev/null
+From 409a82f0e35fc33627f16180af7ba8a617347c8e Mon Sep 17 00:00:00 2001
+From: Peter Newman <peterjnewman@gmail.com>
+Date: Sat, 9 Mar 2019 14:08:01 +0000
+Subject: [PATCH] Add the missing config.h include
+
+---
+ protoc/StrUtil.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/protoc/StrUtil.cpp b/protoc/StrUtil.cpp
+index 2914e82f1..d300b71e8 100644
+--- a/protoc/StrUtil.cpp
++++ b/protoc/StrUtil.cpp
+@@ -41,6 +41,11 @@
+
+ #include "protoc/StrUtil.h"
+
++#if HAVE_CONFIG_H
++#include <config.h>
++#endif // HAVE_CONFIG_H
++
++// Required for Protobuf 3.7 onwards
+ #ifdef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
+ #include <google/protobuf/io/strtod.h>
+ #endif // HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H
--- /dev/null
+--- a/protoc/CppFileGenerator.cpp
++++ b/protoc/CppFileGenerator.cpp
+@@ -223,9 +223,9 @@
+ printer->Print(
+ "namespace {\n"
+ "\n"
+- "GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);\n"
++ "::google::protobuf::internal::once_flag protobuf_AssignDescriptors_once_;\n"
+ "inline void protobuf_AssignDescriptorsOnce() {\n"
+- " ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,"
++ " ::google::protobuf::internal::call_once(protobuf_AssignDescriptors_once_,"
+ "\n"
+ " &$assigndescriptorsname$);\n"
+ "}\n"
PKG_NAME:=openssh
PKG_VERSION:=7.9p1
-PKG_RELEASE:=5
+PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
--without-pam
endif
-ifeq ($(CONFIG_OPENSSL_ENGINE_CRYPTO),y)
+ifeq ($(CONFIG_OPENSSL_ENGINE),y)
CONFIGURE_ARGS+= \
--with-ssl-engine
endif
PROG=/usr/sbin/sshd
start_service() {
- for type in rsa ecdsa ed25519; do {
+ for type in rsa ecdsa ed25519
+ do
# check for keys
key=/etc/ssh/ssh_host_${type}_key
[ ! -f $key ] && {
/usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&-
}
}
- }; done
+ done
mkdir -m 0700 -p /var/empty
- local lport=`grep ^Port /etc/ssh/sshd_config | cut -d " " -f 2`
- [ -z $lport ] && lport=22
+ local lport=$(awk '/^Port / { print $2; exit }' /etc/ssh/sshd_config)
+ [ -z "$lport" ] && lport=22
procd_open_instance
procd_add_mdns "ssh" "tcp" "$lport"
shutdown() {
local pid
- local pids
- local pid_mine
stop
# kill active clients
- pid_mine="$$"
- pids="$(pidof sshd)"
- for pid in $pids; do
- [ "$pid" = "$pid_mine" ] && continue
+ for pid in $(pidof sshd)
+ do
+ [ "$pid" == "$$" ] && continue
[ -e "/proc/$pid/stat" ] && kill $pid
done
}
CATEGORY:=Network
TITLE:=PPPoSSH (Point-to-Point Protocol over SSH)
DEPENDS:=+ppp +resolveip @(PACKAGE_dropbear||PACKAGE_openssh-client)
+ PKGARCH:=all
endef
define Package/pppossh/description
PKG_NAME:=pptpd
PKG_VERSION:=1.4.0
-PKG_RELEASE:=3
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/poptop
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
include $(INCLUDE_DIR)/package.mk
define Package/pptpd
OPTIONS_PPTP=/var/etc/options.pptpd
validate_login_section() {
- uci_validate_section pptpd login "${1}" \
+ uci_load_validate pptpd login "$1" "$2" \
'username:string' \
- 'password:string'
+ 'password:string' \
+ 'remoteip:string'
}
validate_pptpd_section() {
- uci_validate_section pptpd service "${1}" \
+ uci_load_validate pptpd service "$1" "$2" \
'enabled:uinteger' \
'localip:string' \
'remoteip:string' \
}
setup_login() {
- validate_login_section "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
- [ -n "${username}" ] || return 0
- [ -n "${password}" ] || return 0
+ [ -n "$username" ] || return 0
+ [ -n "$password" ] || return 0
+ [ -n "$remoteip" ] || remoteip=*
- echo "${username} pptp-server ${password} *" >> $CHAP_SECRETS
+ echo "$username pptp-server $password $remoteip" >> $CHAP_SECRETS
}
setup_config() {
- local enabled localip remoteip mppe
-
- validate_pptpd_section "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
start_service() {
config_load pptpd
- setup_config pptpd || return
- config_foreach setup_login login
+ validate_pptpd_section pptpd setup_config || return
+ config_foreach validate_login_section login setup_login
ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
procd_set_param command $BIN -c $CONFIG --fg -o $OPTIONS_PPTP
procd_close_instance
}
+
+service_triggers () {
+ procd_add_reload_trigger "pptpd"
+
+ procd_open_validate
+ validate_pptpd_section
+ validate_login_section
+ procd_close_validate
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=prosody
-PKG_VERSION:=0.9.12
-PKG_RELEASE:=1
+PKG_VERSION:=0.11.2
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://prosody.im/downloads/source
-PKG_HASH:=1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d
+PKG_SOURCE_URL:=https://prosody.im/downloads/source
+PKG_HASH:=8911f6dc29b9e0c4edf9e61dc23fa22d77bc42c4caf28b809ab843b2f08e4831
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=MIT/X11
+PKG_BUILD_DEPENDS:=lua/host
+PKG_CPE_ID:=cpe:/a:prosody:prosody
+HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS)
PKG_INSTALL:=1
SECTION:=net
CATEGORY:=Network
SUBMENU:=Instant Messaging
- DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua
+ DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua +luabitop
TITLE:=XMPP server
- URL:=http://prosody.im/
+ URL:=https://prosody.im/
USERID:=prosody=54:prosody=54
endef
/etc/prosody/prosody.cfg.lua
endef
-TARGET_CFLAGS += $(FPIC)
-
-TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
+TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_LDFLAGS += -shared
+MAKE_FLAGS += LD="$(TARGET_CC)"
define Build/Configure
# this is *NOT* GNU autoconf stuff
(cd $(PKG_BUILD_DIR); ./configure \
--prefix=/usr \
- --with-lua="$(STAGING_DIR_HOSTPKG)/bin" \
+ --with-lua="$(STAGING_DIR_HOSTPKG)" \
--with-lua-include="$(STAGING_DIR)/usr/include" \
--with-lua-lib="$(STAGING_DIR)/usr/lib" \
--cflags="$(TARGET_CFLAGS)" \
- --ldflags="$(TARGET_LDFLAGS) -llua -lm -ldl -shared" \
+ --ldflags="$(TARGET_LDFLAGS)" \
--c-compiler="$(CC)" \
- --linker="$(LD)" \
--datadir="/etc/prosody/data" \
)
endef
-# LDFLAGS="$(TARGET_LDFLAGS) -llua -lm -ldl" \
-
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
- PREFIX="/usr" \
define Package/prosody/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/
$(INSTALL_DIR) $(1)/usr/lib/prosody/core
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/
- $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
+ #$(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
#$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/
$(INSTALL_DIR) $(1)/usr/lib/prosody/modules
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_s2s/*.lua $(1)/usr/lib/prosody/modules/mod_s2s/
$(INSTALL_DIR) $(1)/usr/lib/prosody/modules/muc
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/muc/*.lua $(1)/usr/lib/prosody/modules/muc/
- $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_pubsub
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_pubsub/*.lua $(1)/usr/lib/prosody/modules/mod_pubsub/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_mam
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_mam/*.lua $(1)/usr/lib/prosody/modules/mod_mam/
+ #$(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage
+ #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/
$(INSTALL_DIR) $(1)/usr/lib/prosody/net
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/
$(INSTALL_DIR) $(1)/usr/lib/prosody/net/http
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/http/*.lua $(1)/usr/lib/prosody/net/http/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/net/resolvers
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/resolvers/*.lua $(1)/usr/lib/prosody/net/resolvers/
+ $(INSTALL_DIR) $(1)/usr/lib/prosody/net/websocket
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/websocket/*.lua $(1)/usr/lib/prosody/net/websocket/
$(INSTALL_DIR) $(1)/usr/lib/prosody/util
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/
paxctl -v /usr/bin/ > /dev/null 2>&1
[ $$? -ne 0 ] && {
cp /usr/bin/lua /tmp
- paxctl -c -m /tmp/lua > /dev/null 2>&1
+ paxctl -c -m /tmp/lua > /dev/null 2>&1
cp -f /tmp/lua /usr/bin/lua
}
}
-- Prosody Example Configuration File
--
-- Information on configuring Prosody can be found on our
--- website at http://prosody.im/doc/configure
+-- website at https://prosody.im/doc/configure
--
-- Tip: You can check that the syntax of this file is correct
--- when you have finished by running: luac -p prosody.cfg.lua
+-- when you have finished by running this command:
+-- prosodyctl check config
-- If there are any errors, it will let you know what and where
-- they are, otherwise it will keep quiet.
--
-- This is a (by default, empty) list of accounts that are admins
-- for the server. Note that you must create the accounts separately
--- (see http://prosody.im/doc/creating_accounts for info)
+-- (see https://prosody.im/doc/creating_accounts for info)
-- Example: admins = { "user1@example.com", "user2@example.net" }
admins = { }
-- Enable use of libevent for better performance under high load
--- For more information see: http://prosody.im/doc/libevent
---use_libevent = true;
+-- For more information see: https://prosody.im/doc/libevent
+--use_libevent = true
+
+-- Prosody will always look in its source directory for modules, but
+-- this option allows you to specify additional locations where Prosody
+-- will look for modules first. For community modules, see https://modules.prosody.im/
+--plugin_paths = {}
-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
"disco"; -- Service discovery
-- Not essential, but recommended
+ "carbons"; -- Keep multiple clients in sync
+ "pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
"private"; -- Private XML storage (for room bookmarks, etc.)
- "vcard"; -- Allow users to set vCards
- --"privacy"; -- Support privacy lists
- --"compression"; -- Stream compression
+ "blocklist"; -- Allow users to block communications with other users
+ "vcard4"; -- User profiles (stored in PEP)
+ "vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
-- Nice to have
- "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
"version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server
"ping"; -- Replies to XMPP pings with pongs
- "pep"; -- Enables users to publish their mood, activity, playing music and more
"register"; -- Allow users to register on this server using a client and change passwords
- "adhoc"; -- Support for "ad-hoc commands" that can be executed with an XMPP client
+ --"mam"; -- Store messages in an archive and allow users to access it
+ --"csi_simple"; -- Simple Mobile optimizations
-- Admin interfaces
"admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
--"admin_telnet"; -- Opens telnet console interface on localhost port 5582
- -- Other specific functionality
- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+ -- HTTP modules
--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
- --"httpserver"; -- Serve static files from a directory over HTTP
+ --"websocket"; -- XMPP over WebSockets
+ --"http_files"; -- Serve static files from a directory over HTTP
+
+ -- Other specific functionality
+ --"limits"; -- Enable bandwidth limiting for XMPP connections
--"groups"; -- Shared roster support
+ --"server_contact_info"; -- Publish contact information for this service
--"announce"; -- Send announcement to all online users
--"welcome"; -- Welcome users who register accounts
--"watchregistrations"; -- Alert admins of registrations
--"motd"; -- Send a message to users when they log in
-};
+ --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
+ --"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
+}
--- These modules are auto-loaded, should you
--- (for some mad reason) want to disable
--- them then uncomment them below
+-- These modules are auto-loaded, but should you want
+-- to disable them then uncomment them here:
modules_disabled = {
- -- "presence"; -- Route user/contact status information
- -- "message"; -- Route messages
- -- "iq"; -- Route info queries
-- "offline"; -- Store offline messages
-};
+ -- "c2s"; -- Handle client connections
+ -- "s2s"; -- Handle server-to-server connections
+ -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+}
-- Disable account creation by default, for security
--- For more information see http://prosody.im/doc/creating_accounts
-allow_registration = false;
+-- For more information see https://prosody.im/doc/creating_accounts
+allow_registration = false
+
+-- Force clients to use encrypted connections? This option will
+-- prevent clients from authenticating unless they are using encryption.
+
+c2s_require_encryption = true
+
+-- Force servers to use encrypted connections? This option will
+-- prevent servers from authenticating unless they are using encryption.
+
+s2s_require_encryption = true
+
+-- Force certificate authentication for server-to-server connections?
--- Only allow encrypted streams? Encryption is already used when
--- available. These options will cause Prosody to deny connections that
--- are not encrypted. Note that some servers do not support s2s
--- encryption or have it disabled, including gmail.com and Google Apps
--- domains.
+s2s_secure_auth = false
---c2s_require_encryption = false
---s2s_require_encryption = false
+-- Some servers have invalid or self-signed certificates. You can list
+-- remote domains here that will not be required to authenticate using
+-- certificates. They will be authenticated using DNS instead, even
+-- when s2s_secure_auth is enabled.
+
+--s2s_insecure_domains = { "insecure.example" }
+
+-- Even if you disable s2s_secure_auth, you can still require valid
+-- certificates for some domains by specifying a list here.
+
+--s2s_secure_domains = { "jabber.org" }
-- Select the authentication backend to use. The 'internal' providers
-- use Prosody's configured data storage to store the authentication data.
--- To allow Prosody to offer secure authentication mechanisms to clients, the
--- default provider stores passwords in plaintext. If you do not trust your
--- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
--- for information about using the hashed backend.
--- See http://prosody.im/doc/authentication for other possibilities including
--- Cyrus SASL.
-authentication = "internal_plain"
+authentication = "internal_hashed"
-- Select the storage backend to use. By default Prosody uses flat files
-- in its configured data directory, but it also supports more backends
-- through modules. An "sql" backend is included by default, but requires
--- additional dependencies. See http://prosody.im/doc/storage for more info.
+-- additional dependencies. See https://prosody.im/doc/storage for more info.
--storage = "sql" -- Default is "internal"
--sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
+-- Archiving configuration
+-- If mod_mam is enabled, Prosody will store a copy of every message. This
+-- is used to synchronize conversations between multiple clients, even if
+-- they are offline. This setting controls how long Prosody will keep
+-- messages in the archive before removing them.
+
+archive_expires_after = "1w" -- Remove archived messages after 1 week
+
+-- You can also configure messages to be stored in-memory only. For more
+-- archiving options, see https://prosody.im/doc/modules/mod_mam
+
-- Logging configuration
-- For advanced logging see http://prosody.im/doc/logging
log = {
-- "*console"; -- Log to the console, useful for debugging with daemonize=false
}
+-- Uncomment to enable statistics
+-- For more info see https://prosody.im/doc/statistics
+-- statistics = "internal"
+
-- Pidfile, used by prosodyctl and the init.d script
pidfile = "/var/run/prosody/prosody.pid"
prosody_user = "prosody"
prosody_group = "prosody"
+-- Certificates
+-- Every virtual host and component needs a certificate so that clients and
+-- servers can securely verify its identity. Prosody will automatically load
+-- certificates/keys from the directory specified here.
+-- For more information, including how to use 'prosodyctl' to auto-import certificates
+-- (from e.g. Let's Encrypt) see https://prosody.im/doc/certificates
+
+-- Location of directory to find certificates in (relative to main config file):
+--certificates = "certs"
+
+-- HTTPS currently only supports a single certificate, specify it here:
+--https_certificate = "certs/localhost.crt"
+
----------- Virtual hosts -----------
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
-- Settings under each VirtualHost entry apply *only* to that host.
---Set up a MUC (multi-user chat) room server on conference.example.com:
--Component "conference.example.com" "muc"
-
-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
--Component "proxy.example.com" "proxy65"
+--- Store MUC messages in an archive and allow users to access it
+--modules_enabled = { "muc_mam" }
---Set up an external component (default component port is 5347)
--
include $(TOPDIR)/rules.mk
PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.32
+PKG_VERSION:=1.41
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/lnslbrty/ptunnel-ng/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0e51f6fa2fb5b11e9cd5303e450a4e236e4688560ad2a14b0b6e01e9fc2970db
+PKG_HASH:=b61855dcffe920fd188e5239464b049231f83e550e24e76669eb49d59991baff
PKG_LICENSE:=BSD-3
PKG_LICENSE_FILES:=COPYING
CONFIGURE_ARGS += \
--disable-pcap \
- --disable-selinux
+ --disable-selinux \
+ --with-rngdev=/dev/urandom
define Package/ptunnel-ng/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rosy-file-server
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rosy-file-server
+ SUBMENU:=File Transfer
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Rosy File Server over HTTP
+ PKGARCH:=all
+endef
+
+define Package/rosy-file-server/description
+ This package is a configuration management for luci-app-rosy-file-server.
+endef
+
+define Package/rosy-file-server/conffiles
+/etc/config/rosy-file-server
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/rosy-file-server/install
+ $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config
+ $(INSTALL_BIN) ./files/rosyfs.init $(1)/etc/init.d/rosyfs
+ $(INSTALL_CONF) ./files/rosyfs.config $(1)/etc/config/rosyfs
+endef
+
+$(eval $(call BuildPackage,rosy-file-server))
--- /dev/null
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+config rosyfs default
+
+ # Web title
+ option title 'Rosy File Server'
+
+ # Path to share
+ option target '/www'
+
+ option disabled '0'
--- /dev/null
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+START=99
+USE_PROCD=1
+SHARE_PATH=/www/rosyfs-share
+
+service_triggers() {
+ procd_add_reload_trigger rosyfs
+}
+
+start_service() {
+ config_load rosyfs
+ config_get disabled default disabled '0'
+ config_get target default target ''
+
+ [ $disabled -eq 1 ] && return
+
+ [ -n "$target" -a ! "$(readlink $SHARE_PATH)" = "$target" ] && {
+ rm -f $SHARE_PATH
+ ln -s $target $SHARE_PATH
+ }
+}
+
+stop_service() {
+ rm -f $SHARE_PATH
+}
PKG_NAME:=rpcbind
PKG_VERSION:=1.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=@SF/rpcbind
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=BSD-3-Clause
+PKG_CPE_ID:=cpe:/a:rpcbind_project:rpcbind
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS:= \
- CONFIG_RPCBIND_LIBWRAP \
- CONFIG_RPCBIND_WARMSTARTS
+ CONFIG_RPCBIND_LIBWRAP
include $(INCLUDE_DIR)/package.mk
config RPCBIND_LIBWRAP
bool "Enable libwrap (TCP wrappers) support."
default y
-
- config RPCBIND_WARMSTARTS
- bool "Enable warmstarts support"
- default y
- help
- The warmstart feature saves RPC registrations on termination.
endif
endef
CONFIGURE_ARGS += \
--with-rpcuser=rpc \
- --without-systemdsystemunitdir
+ --without-systemdsystemunitdir \
+ --enable-warmstarts
ifeq ($(CONFIG_RPCBIND_LIBWRAP),y)
CONFIGURE_ARGS += --enable-libwrap
else
CONFIGURE_ARGS += --disable-libwrap
endif
-ifeq ($(CONFIG_RPCBIND_WARMSTARTS),y)
- CONFIGURE_ARGS += --enable-warmstarts
-endif
define Package/rpcbind/install
$(INSTALL_DIR) $(1)/usr/bin
--- /dev/null
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2017-05-29
+Initial Package Version: 0.2.4 (also affects earlier versions)
+Upstream Status: Unknown
+Origin: Guido Vranken
+Description: Fixes CVE-2017-8779 (DOS by remote attackers - memory consumption
+without subsequent free).
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 5862c26..e11f61b 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -48,6 +48,7 @@
+ #include <rpc/rpc.h>
+ #include <rpc/rpcb_prot.h>
+ #include <rpc/svc_dg.h>
++#include <rpc/rpc_com.h>
+ #include <netconfig.h>
+ #include <errno.h>
+ #include <syslog.h>
+@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/,
+ static bool_t
+ xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
+ {
+- return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));
++ return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE));
+ }
+
+ /*
config SAMBA4_SERVER_ACL
bool "ACL support (xattr)"
depends on PACKAGE_samba4-server
- select PACKAGE_acl
help
installs: sharesec
modules: vfs_acl_xattr vfs_acl_tdb vfs_posixacl
config SAMBA4_SERVER_AD_DC
bool "Active Directory Domain Controller support (requires krb5-server) (EXPERIMENTAL)"
depends on PACKAGE_samba4-server
- select PACKAGE_python-base
select PACKAGE_python-crypto
- select PACKAGE_libopenssl
- select PACKAGE_libgnutls
- select PACKAGE_libopenldap
help
- installs: samba (meta-daemon) python-crypt ntlm_auth
+ installs: samba (meta-daemon) python-crypto ntlm_auth
scripts: samba-tool
Run as a Active Directory Domain Controller
bool "Avahi support"
depends on PACKAGE_samba4-server
select SAMBA4_SERVER_VFS
- select PACKAGE_libavahi-client
help
Announce Samba resources via DNS/DNS-SD using the Avahi daemon, for Linux/Mac clients.
default y
config SAMBA4_SERVER_WINBIND
bool "Winbind support"
depends on PACKAGE_samba4-server
- depends on SAMBA4_SERVER_AD_DC
help
installs: winbindd (daemon) wbinfo
include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.9.4
-PKG_RELEASE:=3
+PKG_VERSION:=4.9.5
+PKG_RELEASE:=1
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=COPYING
-PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/
+PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/ \
+ https://ftp5.gwdg.de/pub/samba/stable/ \
+ https://ftp.yz.yamagata-u.ac.jp/pub/network/samba/ \
+ http://ftp.uni-bayreuth.de/netsoftware/samba/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6d98a8d8bcccbe788e4bbb406362e6676311aca711a3f3cc9b3a404bb9ff0b4f
+PKG_HASH:=078956d2d98e22011265afd4b7221efe4861067dcba4a031583b01f34d423700
-# Buildroot bug? Can't add target deps via '+SAMBA4_SERVER_AD_DC:python-crypto' (as work-around we select via config.in)
-PKG_BUILD_DEPENDS:=SAMBA4_SERVER_AD_DC:python-crypto nfs-kernel-server/host
+# samba4=(asn1_compile) e2fsprogs=(compile_et) nfs-kernel-server=(rpcgen)
+PKG_BUILD_DEPENDS:=samba4/host e2fsprogs/host nfs-kernel-server/host
PKG_CONFIG_DEPENDS:= \
CONFIG_SAMBA4_SERVER_NETBIOS \
CONFIG_PACKAGE_kmod-fs-xfs
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
define Package/samba4-libs
$(call Package/samba4/Default)
TITLE+= libs
- DEPENDS:= +zlib +libtirpc +krb5-libs +libpopt \
+ DEPENDS:= +zlib +libtirpc +libpopt +libcomerr \
+PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
+SAMBA4_SERVER_VFS:attr \
$(call Package/samba4/Default)
TITLE+= server
DEPENDS:= +samba4-libs
+ EXTRA_DEPENDS:=$(if $(CONFIG_SAMBA4_SERVER_AD_DC),python-crypto,)
endef
define Package/samba4-server/description
- installs: smbd (daemon) smbpasswd pdbedit testparm
+ installs: smbd, nmbd (daemon) smbpasswd pdbedit testparm
- This provides the basic fileserver service and is the minimum needed to serve file shares.
- HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
+ This provides the basic fileserver service and is the minimum needed to serve file shares.
+ HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
endef
+# BUG: We cant add DEPENDS:= +SAMBA4_SERVER_AD_DC:python-crypto, so this only happens here via select!
define Package/samba4-server/config
select PACKAGE_wsdd2
source "$(SOURCE)/Config.in"
CPP="$(TARGET_CROSS)cpp"
CONFIGURE_CMD = ./buildtools/bin/waf
+HOST_CONFIGURE_CMD = ./buildtools/bin/waf
# Strip options that WAF configure script does not recognize
CONFIGURE_ARGS:=$(filter-out \
- --host=% \
- --build=% \
- --program-suffix=% \
+ --target=% \
+ --host=% \
+ --build=% \
+ --program-prefix=% \
+ --program-suffix=% \
--disable-nls \
--disable-ipv6 \
, $(CONFIGURE_ARGS))
+HOST_CONFIGURE_ARGS:=$(filter-out \
+ --target=% \
+ --host=% \
+ --build=% \
+ --program-prefix=% \
+ --program-suffix=% \
+ --disable-nls \
+ --disable-ipv6 \
+ , $(HOST_CONFIGURE_ARGS))
+
+# Waf needs the "configure" argument
+CONFIGURE_ARGS:=configure $(CONFIGURE_ARGS)
+HOST_CONFIGURE_ARGS:=configure $(HOST_CONFIGURE_ARGS)
+
CONFIGURE_ARGS += \
--hostcc="$(HOSTCC)" \
--cross-compile \
--without-regedit \
--without-gpgme
+HOST_CONFIGURE_ARGS += \
+ --hostcc="$(HOSTCC)" \
+ --disable-cups \
+ --disable-iprint \
+ --disable-cephfs \
+ --disable-fault-handling \
+ --disable-glusterfs \
+ --disable-rpath \
+ --disable-rpath-install \
+ --disable-rpath-private-install \
+ --enable-fhs \
+ --without-automount \
+ --without-iconv \
+ --without-lttng \
+ --without-ntvfs-fileserver \
+ --without-pam \
+ --without-systemd \
+ --without-utmp \
+ --without-dmapi \
+ --without-fam \
+ --without-gettext \
+ --without-regedit \
+ --without-gpgme
+
+HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
+ --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
+ --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+HOST_CONFIGURE_VARS += python_LDFLAGS="" python_LIBDIR=""
+
# Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
# Support for Nettle wasn't comitted
ifdef CONFIG_TARGET_x86_64
--with-piddir=/var/run \
--with-privatedir=/etc/samba
-CONFIGURE_ARGS += \
- --with-system-mitkrb5 "$(STAGING_DIR)/usr" \
- --with-system-mitkdc=/usr/sbin/krb5kdc
-
- ## embedded-heimdal
- # --bundled-libraries=talloc,tevent,tdb,ldb,com_err,cmocka,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
-
ifeq ($(CONFIG_SAMBA4_SERVER_AVAHI),y)
CONFIGURE_ARGS += --enable-avahi
else
CONFIGURE_ARGS += --without-acl-support
endif
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap --with-experimental-mit-ad-dc
+ CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/python2.7 $(TARGET_CFLAGS)
else
- CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+ CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
+ --disable-gnutls --without-dnsupdate --without-ads --without-ldap
CONFIGURE_VARS += \
python_LDFLAGS="" \
python_LIBDIR=""
SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,auth_script,
SAMBA4_VFS_MODULES :=vfs_default,
+SAMBA4_VFS_MODULES_SHARED :=
ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
ifeq ($(CONFIG_PACKAGE_kmod-fs-btrfs),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_btrfs,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_btrfs,
endif
endif
ifeq ($(CONFIG_SAMBA4_SERVER_VFSX),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
ifeq ($(CONFIG_PACKAGE_kmod-fs-xfs),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_linux_xfs_sgid,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_linux_xfs_sgid,
endif
endif
ifeq ($(CONFIG_SAMBA4_SERVER_QUOTAS),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_default_quota,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_default_quota,
endif
ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,vfs_acl_xattr,vfs_acl_tdb,
+ SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_acl_xattr,vfs_acl_tdb,
# vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
# vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
endif
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,
+ SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,pdb_ldapsam,
SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_samba4,
- SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_audit,vfs_extd_audit,vfs_full_audit,
+ SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_audit,vfs_extd_audit,vfs_full_audit,
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
- SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_passdb,idmap_nss,idmap_tdb,idmap_tdb2,idmap_script,nss_info_template,
- SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_ad,idmap_rfc2307,
+ SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_tdb,idmap_passdb,idmap_nss,nss_info_template,
+ SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_hash,idmap_tdb2,idmap_script,
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_ad,idmap_ldap,idmap_rfc2307,
# idmap_ad needs --with-ads
# idmap_rfc2307 needs ldap headers
+endif
SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_winbind,
endif
-SAMBA4_MODULES :=${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}${SAMBA4_VFS_MODULES}
-SAMBA4_MODULES_SHARDED :=${SAMBA4_IDMAP_MODULES_SHARED}
+SAMBA4_MODULES :=${SAMBA4_VFS_MODULES}${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}
+SAMBA4_MODULES_SHARDED :=${SAMBA4_VFS_MODULES_SHARED}${SAMBA4_IDMAP_MODULES_SHARED}
CONFIGURE_ARGS += \
--with-static-modules=$(SAMBA4_MODULES)!DEFAULT,!FORCED \
--with-shared-modules=$(SAMBA4_MODULES_SHARDED)!DEFAULT,!FORCED
+HOST_CONFIGURE_ARGS += \
+ --with-static-modules=!DEFAULT,!FORCED \
+ --with-shared-modules=!DEFAULT,!FORCED
+
# Setup build/install targets
# CONFIG_PACKAGE_samba4-server
BUILD_TARGETS_SERVER :=smbd/smbd,smbpasswd,pdbedit,testparm
BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),nmbd
endif
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth
+ BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth,samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil
endif
ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),winbindd,wbinfo,winbind_krb5_locator
# CONFIG_PACKAGE_samba4-client
BUILD_TARGETS_CLIENT :=client/smbclient,client/cifsdd
# CONFIG_PACKAGE_samba4-admin
-BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas
+BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas,eventlogadm
# CONFIG_PACKAGE_samba4-utils
BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
# lib bundling
# NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
-CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
-#CONFIGURE_ARGS += --nonshared-binary=$(BUILD_TARGETS_SERVER)
+CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka
+HOST_CONFIGURE_ARGS += --builtin-libraries=replace --nonshared-binary=asn1_compile
+
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
else
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
endif
-CONFIGURE_ARGS += --private-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
+# BUG: --private-libraries, Does not work for System possible libs, will not get "samba4" suffix!
+CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace
+# CONFIGURE_ARGS += --disable-symbol-versions
+
+define Host/Compile
+ (cd $(HOST_BUILD_DIR); \
+ ./buildtools/bin/waf build \
+ --targets=asn1_compile \
+ )
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/asn1_compile $(STAGING_DIR_HOSTPKG)/bin/
+endef
define Build/Prepare
$(Build/Prepare/Default)
echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
# NOTE: For some unknown reason this answer is not needed on some hosts/distros, yet needed on others?
echo 'Checking whether POSIX capabilities are available: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
- $(call Build/Configure/Default,configure)
+ $(call Build/Configure/Default)
endef
# BUG: We need to use "waf install --targets=" otherwise a "make install" or "waf install" will retrigger a full recompile of all possible targets!
define Build/Compile
(cd $(PKG_BUILD_DIR); \
- ./buildtools/bin/waf install -j$(shell nproc) \
- --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
+ ./buildtools/bin/waf install \
+ --jobs=$(shell nproc) \
--destdir="$(PKG_INSTALL_DIR)" \
+ --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
)
endef
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/*.so* $(1)/usr/lib/
+
+ $(INSTALL_DIR) $(1)/usr/lib/samba/vfs $(1)/usr/lib/samba/idmap $(1)/usr/lib/samba/ldb $(1)/usr/lib/samba/krb5
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
+ fi
+ if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/krb5 ]; then \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/krb5 $(1)/usr/lib/samba/; \
+ fi
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+ $(INSTALL_DIR) $(1)/usr/lib/python2.7
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
+endif
endef
define Package/samba4-client/install
define Package/samba4-admin/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/eventlogadm $(1)/usr/sbin/
endef
define Package/samba4-utils/install
endef
define Package/samba4-server/install
- $(INSTALL_DIR) $(1)/usr/lib/samba
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
- fi
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/auth ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/auth $(1)/usr/lib/samba/; \
- fi
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
- fi
- if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/pdb ]; then \
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/pdb $(1)/usr/lib/samba/; \
- fi
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+ # waf does not install those?
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil} $(1)/usr/bin/
endif
ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
/etc/samba/idmap.ldb
/etc/samba/lmhosts
/etc/nsswitch.conf
+/etc/krb5.conf
endef
+$(eval $(call HostBuild))
$(eval $(call BuildPackage,samba4-libs))
$(eval $(call BuildPackage,samba4-server))
$(eval $(call BuildPackage,samba4-client))
EOT
}
- [ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+ [ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+
+ if [ -f /etc/samba/smb.conf ]; then
+ logger -t 'samba4-server' "Local custom /etc/samba/smb.conf file detected, all luci/config settings are ignored!"
+ fi
+
}
smb_add_share() {
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
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
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
config SEAFILE_CONSOLE_SUPPORT
bool "Enable seafile server console"
default n
-
-config SEAFILE_RIAK_SUPPORT
- bool "Enable support for riak backend"
- default n
endmenu
PKG_NAME:=seafile-server
PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/nls.mk
include ../../lang/python/python-package.mk
+# Check that the actual Makefile version-relase match the above.
+$(eval $(shell awk '/^PKG_VERSION.*=/ { print "SEAHUB_" $$$$0 }' ../seafile-seahub/Makefile))
+ifneq ($(PKG_VERSION),$(SEAHUB_PKG_VERSION))
+ $(error $(if $(SEAHUB_PKG_VERSION), \
+ Version mismatch between seafile-seahub ($(SEAHUB_PKG_VERSION)) and \
+ seafile-server ($(PKG_VERSION)), \
+ Could not get PKG_VERSION from seafile-seahub Makefile))
+endif
+
define Package/seafile-server
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
+jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
- EXTRA_DEPENDS:=seafile-seahub (=6.3.4-1)
MENU:=1
endef
Open source cloud storage with advanced features on privacy protection and teamwork.
endef
-CONFIGURE_ARGS += --disable-client \
- --enable-server \
- --enable-python \
- --disable-static-build \
- --disable-server-pkg
+CONFIGURE_ARGS += --enable-python
ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
CONFIGURE_ARGS += --enable-fuse
CONFIGURE_ARGS += --disable-console
endif
-ifeq ($(CONFIG_SEAFILE_RIAK_SUPPORT),y)
- CONFIGURE_ARGS += --enable-riak
-else
- CONFIGURE_ARGS += --disable-riak
-endif
-
PKG_BUILD_DEPENDS:=vala/host libevhtp
# This is required as python-package.mk overrides the default setting of having interlinking enabled
+From 115a4583deb9ae11adbc419ea87c990d0b8572fe Mon Sep 17 00:00:00 2001
+From: Joffrey Darcq <j-off@live.fr>
+Date: Sat, 28 Apr 2018 22:27:28 +0200
+Subject: [PATCH 1/2] fix django version 1.11
+
+---
+ tools/seafile-admin | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
diff --git a/tools/seafile-admin b/tools/seafile-admin
-index 495ceab..72b6a07 100755
+index 5e3658b..38e7288 100755
--- a/tools/seafile-admin
+++ b/tools/seafile-admin
-@@ -502,7 +502,7 @@ def init_seahub():
+@@ -518,10 +518,10 @@ def init_seahub():
+
+
+ def check_django_version():
+- '''Requires django 1.8'''
++ '''Requires django 1.11'''
+ import django
+- if django.VERSION[0] != 1 or django.VERSION[1] != 8:
+- error('Django 1.8 is required')
++ if django.VERSION[0] != 1 or django.VERSION[1] != 11:
++ error('Django 1.11 is required')
+ del django
+
+
+
+From bf69ff1cf1080081eae5d8115842c26468746736 Mon Sep 17 00:00:00 2001
+From: Joffrey Darcq <j-off@live.fr>
+Date: Sun, 3 Jun 2018 15:51:54 +0200
+Subject: [PATCH 2/2] fix django version 1.11
+
+---
+ tools/seafile-admin | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/seafile-admin b/tools/seafile-admin
+index 38e7288..c16aab6 100755
+--- a/tools/seafile-admin
++++ b/tools/seafile-admin
+@@ -499,8 +499,8 @@ def init_seahub():
# create seahub_settings.py
create_seahub_settings_py()
- argv = [PYTHON, 'manage.py', 'syncdb']
+- # Set proper PYTHONPATH before run django syncdb command
+ argv = [PYTHON, 'manage.py', 'migrate']
- # Set proper PYTHONPATH before run django syncdb command
++ # Set proper PYTHONPATH before run django migrate command
env = get_seahub_env()
-@@ -512,7 +512,7 @@ def init_seahub():
+ print
+@@ -509,7 +509,7 @@ def init_seahub():
print
if run_argv(argv, cwd=seahub_dir, env=env) != 0:
# - 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>
-## components
+Skip to [recipes](#recipes) for quick setup instructions
+
+# components
`ss-local` provides SOCKS5 proxy with UDP associate support.
`ss-server`, the "ss server" in the above diagram
-## uci
+# uci
Option names are the same as those used in json config files. Check `validate_xxx` func definition of the [service script](files/shadowsocks-libev.init) and shadowsocks-libev's own documentation for supported options and expected value types. A [sample config file](files/shadowsocks-libev.config) is also provided for reference.
Note also that `src_ips_xx` and `dst_ips_xx` actually also accepts cidr network representation. Option names are retained in its current form for backward compatibility coniderations
-## notes and faq
+# notes and faq
Useful paths and commands for debugging
ss-redir needs to open a new socket and setsockopt IP_TRANSPARENT when sending udp reply to client. This requires `CAP_NET_ADMIN` and as such the process cannot run as `nobody`
ss-local, ss-redir, etc. supports specifying an array of remote ss server, but supporting this in uci seems to be overkill. The workaround can be defining multiple `server` sections and multiple `ss-redir` instances with `reuse_port` enabled
+
+# recipes
+
+## forward all
+
+This will setup firewall rules to forward almost all incoming tcp/udp and locally generated tcp traffic (excluding those to private addresses like 192.168.0.0/16 etc.) through remote shadowsocks server
+
+Install components.
+Retry each command till it succeed
+
+ opkg install shadowsocks-libev-ss-redir
+ opkg install shadowsocks-libev-ss-rules
+ opkg install shadowsocks-libev-ss-tunnel
+
+Edit uci config `/etc/config/shadowsocks-libev`.
+Replace `config server 'sss0'` section with parameters of your own remote shadowsocks server.
+As for other options, change them only when you know the effect.
+
+ config server 'sss0'
+ option disabled 0
+ option server '_sss_addr_'
+ option server_port '_sss_port_'
+ option password '********'
+ option method 'aes-256-cfb'
+
+ config ss_tunnel
+ option disabled 0
+ option server 'sss0'
+ option local_address '0.0.0.0'
+ option local_port '8053'
+ option tunnel_address '8.8.8.8:53'
+ option mode 'tcp_and_udp'
+
+ config ss_redir ssr0
+ option disabled 0
+ option server 'sss0'
+ option local_address '0.0.0.0'
+ option local_port '1100'
+ option mode 'tcp_and_udp'
+ option reuse_port 1
+
+ config ss_rules 'ss_rules'
+ option disabled 0
+ option redir_tcp 'ssr0'
+ option redir_udp 'ssr0'
+ option src_default 'checkdst'
+ option dst_default 'forward'
+ option local_default 'forward'
+
+Restart shadowsocks-libev components
+
+ /etc/init.d/shadowsocks-libev restart
+
+Check if things are in place
+
+ iptables-save | grep ss_rules
+ netstat -lntp | grep -E '8053|1100'
+ ps ww | grep ss-
+
+Edit `/etc/config/dhcp`, add a line to the first dnsmasq section like the following to let it use local tunnel endpoint for upstream dns query
+
+ config dnsmasq
+ ...
+ list server '127.0.0.1#8053'
+
+Restart dnsmasq
+
+ /etc/init.d/dnsmasq restart
+
+Check network on your computer
+
+ nslookup www.google.com
+ curl -vv https://www.google.com
PKG_NAME:=shorewall-core
PKG_MAJOR_MINOR_VERSION:=5.2
PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.1
+PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=894d9ca5425e38880eeb270cbe26b83c90b4ca8490ebe48fb20be466e1704d03
+PKG_HASH:=fa71e435ba3ffa3b424c3fe4dfb405c536e4c8d837e8f0936486f7673478ce5b
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
PKG_NAME:=shorewall-lite
PKG_MAJOR_MINOR_VERSION:=5.2
PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.1
+PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=7500900e071b516972fe9a39282a7ee5312b1dae3481247d20e8b767d7935c5d
+PKG_HASH:=0469486e8087502b59f8a4531bb476d3a929e4e59b4a0492f54e85ae2a8bebff
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall-lite restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall -l start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall-lite/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall-lite restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall-lite/state/firewall disable "$DEVICE"
+ fi
;;
-esac
\ No newline at end of file
+esac
PKG_NAME:=shorewall
PKG_MAJOR_MINOR_VERSION:=5.2
PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.1
+PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=736ba008c2a70f9588115bfeeef5e3206ffc2d28c586520f2f96352bb8ccf1cd
+PKG_HASH:=58615c40598d3f2f71e6aab286ebd281c9018dea584ee658e5609ea0e434b242
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall/state/firewall disable "$DEVICE"
+ fi
;;
esac
PKG_NAME:=shorewall6-lite
PKG_MAJOR_MINOR_VERSION:=5.2
PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.1
+PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=83dae94e5f99f10100ee0c82774e15d67bf5f8be8ce3a424c31da90b75d5a415
+PKG_HASH:=82cbb075d7575400d859b59142f1e36ac8c575d35f19bf3a263278c67be5a3ea
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall6-lite restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall -6 -l start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall6-lite/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall6-lite restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall6-lite/state/firewall disable "$DEVICE"
+ fi
;;
-esac
\ No newline at end of file
+esac
PKG_NAME:=shorewall6
PKG_MAJOR_MINOR_VERSION:=5.2
PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.1
+PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=17710f45ab4547301341260e72e1794d20999c2a3f653e5223966036e2c915d6
+PKG_HASH:=43d48d47929fdef29023ff2659550f0b2289064d54b7abe64f79efeb1613146a
PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
PKG_LICENSE:=GPL-2.0+
#!/bin/sh
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
- /etc/init.d/shorewall6 restart
+ if [ "$INTERFACE" = "lan" ]; then
+ /usr/sbin/shorewall -6 start
+ elif [ "${INTERFACE:0:3}" = "wan" ] &&
+ [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+ /etc/shorewall6/state/firewall enable "$DEVICE"
+ fi
;;
ifdown)
- # might need to restore some routing
- /etc/init.d/shorewall6 restart
+ if [ "${INTERFACE:0:3}" = "wan" ]; then
+ /etc/shorewall6/state/firewall disable "$DEVICE"
+ fi
;;
esac
PKG_NAME:=snort
PKG_VERSION:=2.9.11.1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PROG=/usr/bin/snort
validate_snort_section() {
- uci_validate_section snort snort "${1}" \
+ uci_load_validate snort snort "$1" "$2" \
'config_file:string' \
'interface:string'
}
-start_service() {
- local config_file interface
-
- validate_snort_section snort || {
+start_snort_instance() {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_open_instance
procd_set_param command $PROG "-q" "--daq-dir" "/usr/lib/daq/" "-i" "$interface" "-c" "$config_file" "-s" "-N"
- procd_set_param file $CONFIGFILE
+ procd_set_param file $config_file
procd_set_param respawn
procd_close_instance
}
+start_service()
+{
+ validate_snort_section snort start_snort_instance
+}
+
stop_service()
{
service_stop ${PROG}
-]])],
-[have_daq_ext_modflow="yes"],
-[have_daq_ext_modflow="no"])
-+have_daq_ext_modflow="no"
++have_daq_ext_modflow="yes"
AC_MSG_RESULT($have_daq_ext_modflow)
if test "x$have_daq_ext_modflow" = "xyes"; then
CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
-]])],
-[have_daq_data_channel_flags="yes"],
-[have_daq_data_channel_flags="no"])
-+have_daq_data_channel_flags="no"
++have_daq_data_channel_flags="yes"
AC_MSG_RESULT($have_daq_data_channel_flags)
if test "x$have_daq_data_channel_flags" = "xyes"; then
CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
-]])],
-[have_daq_data_channel_separate_ip_versions="yes"],
-[have_daq_data_channel_separate_ip_versions="no"])
-+have_daq_data_channel_separate_ip_versions="no"
++have_daq_data_channel_separate_ip_versions="yes"
AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
--- /dev/null
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=snort3
+PKG_VERSION:=3.0.0-beta
+PKG_VERSION_SHORT:=3.0.0
+PKG_RELEASE:=2
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_SOURCE:=snort-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
+PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/snort3
+ SUBMENU:=Firewall
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libstdcpp +libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
+ TITLE:=Lightweight Network Intrusion Detection System
+ URL:=http://www.snort.org/
+ MENU:=1
+endef
+
+define Package/snort3/description
+ Snort is an open source network intrusion detection and prevention system.
+ It is capable of performing real-time traffic analysis, alerting, blocking
+ and packet logging on IP networks. It utilizes a combination of protocol
+ analysis and pattern matching in order to detect anomalies, misuse and
+ attacks.
+endef
+
+CMAKE_OPTIONS += \
+ -DENABLE_STATIC_DAQ:BOOL=NO \
+ -DENABLE_COREFILES:BOOL=NO \
+ -DENABLE_GDB:BOOL=NO \
+ -DMAKE_DOC:BOOL=NO \
+ -DMAKE_HTML_DOC:BOOL=NO \
+ -DMAKE_PDF_DOC:BOOL=NO \
+ -DMAKE_TEXT_DOC:BOOL=NO \
+ -DHAVE_LZMA=OFF
+
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -ltirpc
+
+define Package/snort3/conffiles
+/etc/config/snort
+endef
+
+define Package/snort3/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/snort \
+ $(1)/usr/bin/
+
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
+ $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/usr/lib/snort
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
+ $(1)/usr/lib/snort/
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
+ $(1)/usr/lib/snort/
+
+ $(INSTALL_DIR) $(1)/usr/share/lua
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
+ $(1)/usr/share/lua/
+
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.lua \
+ $(1)/usr/share/lua/
+
+ $(INSTALL_DIR) $(1)/etc/snort
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) \
+ ./files/snort.init \
+ $(1)/etc/init.d/snort
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) \
+ ./files/snort.config \
+ $(1)/etc/config/snort
+endef
+
+$(eval $(call BuildPackage,snort3))
--- /dev/null
+config snort 'snort'
+ option config_dir '/etc/snort/etc/'
+ option alert_module 'alert_syslog'
+ option interface 'eth0'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/bin/snort
+
+validate_snort_section() {
+ uci_validate_section snort snort "${1}" \
+ 'config_dir:string' \
+ 'alert_module:string' \
+ 'interface:string'
+}
+
+start_service() {
+ local config_file interface
+
+ validate_snort_section snort || {
+ echo "validation failed"
+ return 1
+ }
+
+ procd_open_instance
+ procd_set_param command $PROG -q --daq-dir /usr/lib/daq/ -i "$interface" -c "$config_dir/snort.lua" -A "$alert_module"
+ procd_set_param env SNORT_LUA_PATH="$config_dir"
+ procd_set_param file $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service()
+{
+ service_stop ${PROG}
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger "snort"
+ procd_add_validation validate_snort_section
+}
--- /dev/null
+diff -u --recursive snort-3.0.0-vanilla/daqs/daq_file.c snort-3.0.0/daqs/daq_file.c
+--- snort-3.0.0-vanilla/daqs/daq_file.c 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/daqs/daq_file.c 2019-03-28 23:03:25.292770141 -0400
+@@ -33,7 +33,7 @@
+
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+
+ #include <daq_api.h>
+ #include <sfbpf_dlt.h>
+diff -u --recursive snort-3.0.0-vanilla/daqs/daq_hext.c snort-3.0.0/daqs/daq_hext.c
+--- snort-3.0.0-vanilla/daqs/daq_hext.c 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/daqs/daq_hext.c 2019-03-28 22:54:15.738207157 -0400
+@@ -35,7 +35,7 @@
+ #include <arpa/inet.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <sys/socket.h>
+
+ #include <daq_api.h>
+diff -u --recursive snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc
+--- snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc 2019-03-28 22:32:04.211783669 -0400
+@@ -27,6 +27,7 @@
+
+ #include <netdb.h>
+
++#include <tirpc/rpc/rpcent.h>
+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ #include <rpc/rpc.h>
+ #elif defined(__sun)
+diff -u --recursive snort-3.0.0-vanilla/src/utils/util.cc snort-3.0.0/src/utils/util.cc
+--- snort-3.0.0-vanilla/src/utils/util.cc 2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/src/utils/util.cc 2019-03-28 22:16:16.860942230 -0400
+@@ -605,13 +605,8 @@
+ {
+ static THREAD_LOCAL char buf[128];
+
+-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L && \
+- defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600) || _GNU_SOURCE
+- return strerror_r(errnum, buf, sizeof(buf));
+-#else
+ (void)strerror_r(errnum, buf, sizeof(buf));
+ return buf;
+-#endif
+ }
+
+ char* snort_strndup(const char* src, size_t dst_size)
PKG_VERSION:=4.28-9669
PKG_VERREL:=beta
PKG_VERDATE:=2018.09.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/
--- /dev/null
+--- a/src/makefiles/linux_64bit.mak
++++ b/src/makefiles/linux_64bit.mak
+@@ -29,9 +29,9 @@ OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT
+
+ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+
+-OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64
++OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char
+
+-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+
+ INSTALL_BINDIR=/usr/bin/
+ INSTALL_VPNSERVER_DIR=/usr/vpnserver/
#
-# Copyright (C) 2018 The Regents of the University of California
+# Copyright (C) 2019 The Regents of the University of California
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=spoofer
-PKG_VERSION:=1.4.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
-PKG_HASH:=e6d9e954709a15dc55187a962e8698d880f3df3ce8b914097c576a3a1f852d0d
+PKG_HASH:=994555b360a095f0e9baed2469ef26bd29610af155ce58b3984d2f1616a74526
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE
+++ /dev/null
---- a/prober/spoofer-prober.cc
-+++ b/prober/spoofer-prober.cc
-@@ -2135,8 +2135,10 @@ int main(int argc, char **argv) {
- #endif
- #ifdef HAVE_LIBSSL
- if (enableTLS) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- SSL_load_error_strings();
- SSL_library_init();
-+#endif
- ssl_ctx = SSL_CTX_new(SSLv23_client_method());
- if (!ssl_ctx) {
- ssl_err("SSL_CTX_new() failed");
PKG_NAME:=squid
PKG_VERSION:=4.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
MIMETABLE="/tmp/squid/mime.conf"
validate_squid_section() {
- uci_validate_section squid squid "${1}" \
+ uci_load_validate squid squid "$1" "$2" \
'config_file:string' \
'http_port:port:3128' \
'http_port_options:string' \
group_exists squid || group_add squid $USERID && group_add_user squid squid
}
-start_service() {
- local config_file http_port http_port_options ssldb ssldb_options coredump_dir visible_hostname pinger_enable
+start_squid_instance() {
+ local config_dir
- validate_squid_section squid || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_close_instance
}
+start_service()
+{
+ validate_squid_section squid start_squid_instance
+}
+
stop_service()
{
- ${PROG} -f $CONFIGFILE -N -k shutdown 2>/dev/null
+ $PROG -f $CONFIGFILE -N -k shutdown 2>/dev/null
}
service_triggers()
SUBMENU:=SSH
TITLE:=Manages Local and Remote openssh ssh(1) tunnels
DEPENDS:=+openssh-client
+ PKGARCH:=all
endef
define Package/sshtunnel/description
-menu "Configuration"
- depends on PACKAGE_strongswan
+
+if PACKAGE_strongswan
+comment Configuration
# --with-routing-table
config STRONGSWAN_ROUTING_TABLE
prompt "Set the IPsec routing table priority"
default "220"
-endmenu
+comment Packages
+
+endif
define Package/strongswan
$(call Package/strongswan/Default)
+ MENU:=1
DEPENDS:= +libpthread +ip \
+kmod-crypto-authenc \
+kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6 \
define Package/strongswan-full
$(call Package/strongswan/Default)
TITLE+= (full)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-charon-cmd \
+strongswan-ipsec \
define Package/strongswan-default
$(call Package/strongswan/Default)
TITLE+= (default)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-ipsec \
+strongswan-mod-aes \
define Package/strongswan-isakmp
$(call Package/strongswan/Default)
TITLE+= (isakmp)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-ipsec \
+strongswan-mod-aes \
define Package/strongswan-minimal
$(call Package/strongswan/Default)
TITLE+= (minimal)
- DEPENDS:= +strongswan \
+ DEPENDS:= strongswan \
+strongswan-charon \
+strongswan-mod-aes \
+strongswan-mod-gmp \
define Package/strongswan-charon
$(call Package/strongswan/Default)
TITLE+= IKEv1/IKEv2 keying daemon
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-charon/description
define Package/strongswan-charon-cmd
$(call Package/strongswan/Default)
TITLE+= charon-cmd utility
- DEPENDS:= +strongswan +strongswan-charon
+ DEPENDS:= strongswan +strongswan-charon
endef
define Package/strongswan-charon-cmd/description
define Package/strongswan-ipsec
$(call Package/strongswan/Default)
TITLE+= utilities
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-ipsec/description
define Package/strongswan-pki
$(call Package/strongswan/Default)
TITLE+= PKI tool
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-pki/description
define Package/strongswan-scepclient
$(call Package/strongswan/Default)
TITLE+= SCEP client
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-scepclient/description
define Package/strongswan-swanctl
$(call Package/strongswan/Default)
TITLE+= swanctl utility
- DEPENDS:= +strongswan +strongswan-mod-vici
+ DEPENDS:= strongswan +strongswan-mod-vici
endef
define Package/strongswan-swanctl/description
define Package/strongswan-libtls
$(call Package/strongswan/Default)
TITLE+= libtls
- DEPENDS:= +strongswan
+ DEPENDS:= strongswan
endef
define Package/strongswan-libtls/description
define Package/strongswan-mod-$(1)
$$(call Package/strongswan/Default)
TITLE:= StrongSwan $(2) plugin
- DEPENDS:= +strongswan $(3)
+ DEPENDS:= strongswan $(3)
endef
define Package/strongswan-mod-$(1)/install
#### `list spki`
This list specifies the SPKI pinset which is verified against the keys in the
-server cerrtificate. The values takes the form `'<digest type>/value>'`, where
+server cerrtificate. The value takes the form `'<digest type>/value>'`, where
the `digest type` is the hashing algorithm used, and the value is the Base64
encoded hash of the public key. At present, only `sha256` is
supported for the digest type.
upstream_recursive_servers:
- address_data: 2606:4700:4700::1111
tls_auth_name: "cloudflare-dns.com"
- - address_data: 2606:4700:4700::1111
+ - address_data: 2606:4700:4700::1001
tls_auth_name: "cloudflare-dns.com"
- address_data: 1.1.1.1
tls_auth_name: "cloudflare-dns.com"
include $(TOPDIR)/rules.mk
PKG_NAME:=stunnel
-PKG_VERSION:=5.49
-PKG_RELEASE:=2
+PKG_VERSION:=5.51
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0+
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
https://www.usenix.org.uk/mirrors/stunnel/archive/$(word 1, $(subst .,$(space),$(PKG_VERSION))).x/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=3d6641213a82175c19f23fde1c3d1c841738385289eb7ca1554f4a58b96d955e
+PKG_HASH:=77437cdd1aef1a621824bb3607e966534642fe90c69f4d2279a9da9fa36c3253
PKG_FIXUP:=autoreconf
PKG_FIXUP:=patch-libtool
--with-threads=pthread \
--with-ssl=$(STAGING_DIR)/usr \
--disable-libwrap \
- --disable-systemd \
- --disable-fips
+ --disable-systemd
ifeq ($(CONFIG_IPV6),n)
CONFIGURE_ARGS+= \
'checkHost:list(host)' \
'checkIP:list(ipaddr)' \
'ciphers:list(string)' \
+ 'ciphersuites:list(string)' \
'client:bool' \
'config:list(string)' \
'connect:list(string)' \
'CRLfile:string' \
'CRLpath:string' \
- 'curve:string' \
+ 'curves:list(string)' \
'debug:or(range(0,7),string)' \
'delay:bool' \
'engineId:string' \
cert \
CRLfile \
CRLpath \
- curve \
debug \
logId \
engineId \
print_lists_reduce : \
ciphers \
+ curves \
+ ciphersuites \
;
print_host_port \
include $(TOPDIR)/rules.mk
PKG_NAME:=tcpreplay
-PKG_VERSION:=4.3.1
+PKG_VERSION:=4.3.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION)
-PKG_HASH:=108924a25e616e3465139410c49cae629c338df73443dfc8fc155ea9f099c659
+PKG_HASH:=955aed6a40f49a5b8c1234fd0a928edc5c665d94b7755ab5769c30938e33f380
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=docs/LICENSE
-#
-# 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.76
+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:=fda84ae0cfc71e2b67ca2d073978f60cb52feea5a697601938ff86656bfdd8f9
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/tgt
- SECTION:=net
- CATEGORY:=Network
- URL:=http://stgt.sourceforge.net/
- TITLE:=userspace iSCSI target
- DEPENDS:=+libpthread +libaio
+ SECTION:=net
+ CATEGORY:=Network
+ URL:=http://stgt.sourceforge.net/
+ TITLE:=userspace iSCSI target
+ DEPENDS:=+libpthread +libaio
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
- CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
- $(MAKE) -C $(PKG_BUILD_DIR) \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- LD="$(TARGET_CC)" \
- LDFLAGS="$(TARGET_LDFLAGS)" \
- install-programs
+ $(call Build/Compile/Default,programs)
endef
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/tgt
+ $(INSTALL_BIN) ./files/tgt.init $(1)/etc/init.d/tgt
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgt{d,adm} $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,tgt))
+++ /dev/null
-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
+++ /dev/null
-#!/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
-}
--- /dev/null
+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
--- /dev/null
+#!/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
+}
PKG_NAME:=tor
PKG_VERSION:=0.3.5.8
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dist.torproject.org/ \
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
Peter Wagner <tripolar@gmx.at>
PKG_LICENSE_FILES:=LICENSE
-PKG_CPE_ID:=cpe:/:a:torproject:tor
+PKG_CPE_ID:=cpe:/a:torproject:tor
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
--disable-libscrypt \
--disable-unittests \
--disable-lzma \
+ --disable-zstd \
--with-tor-user=tor \
--with-tor-group=tor
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
--- /dev/null
+#
+# Copyright (C) 2017-2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=torsocks
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://people.torproject.org/~dgoulet/torsocks/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=b9f1b981d6b3fd4e1820de1eee325f8a7038c84765d5a6cd9af12571d5cc3622
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/torsocks
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=torsocks
+ URL:=https://trac.torproject.org/projects/tor/wiki/doc/torsocks
+ DEPENDS:=+tor
+endef
+
+define Package/torsocks/description
+ Torsocks allows you to use most applications in a safe way with Tor.
+ It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you're using.
+endef
+
+define Build/Configure
+ $(call Build/Configure/Default)
+ifeq ($(CONFIG_USE_UCLIBC),y)
+ find $(PKG_BUILD_DIR) -name 'Makefile' -exec sed -i 's|--param ssp-buffer-size=1 -fstack-protector-all||' \{\} \+
+endif
+endef
+
+define Package/conffiles
+/etc/tor/torsocks.conf
+endef
+
+define Package/torsocks/install
+ $(INSTALL_DIR) $(1)/etc/tor/
+ $(CP) $(PKG_INSTALL_DIR)/etc/tor/torsocks.conf $(1)/etc/tor/
+ $(INSTALL_DIR) $(1)/usr/lib/torsocks
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/torsocks/libtorsocks.so* $(1)/usr/lib/torsocks/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torsocks $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,torsocks))
--- /dev/null
+#
+# Copyright (C) 2018 Luiz Angelo Daros de Luca
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=trafficshaper
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPLv2
+PKG_ARCH:=all
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+include $(INCLUDE_DIR)/package.mk
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/trafficshaper
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+tc +kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables +kmod-sched-cake +iptables-mod-conntrack-extra
+ TITLE:=WAN traffic shaper based on LAN addresses
+ MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+ PKGARCH:=all
+endef
+
+define Package/trafficshaper/description
+Setup QoS rules to limit (or reserve) traffic used by classes of clients.
+Uplink and downlink can be controled (or not controlled) independently.
+Client classes are defined by its network addresses (IPv4 or IPv6). Each
+client class can define absolute or relative (to wan) bandwith, and also
+the use (or not) of spare wan bandwidth when avaiable.
+
+endef
+
+define Package/trafficshaper/conffiles
+/etc/config/trafficshaper
+endef
+
+define Build/Compile
+endef
+
+define Package/trafficshaper/install
+$(CP) ./files/* $(1)
+endef
+
+$(eval $(call BuildPackage,trafficshaper))
--- /dev/null
+package trafficshaper
+
+config globals 'globals'
+ option mark_mask '0xFF'
+
+config wan 'wan'
+ option downlink '20000'
+ option uplink '20000'
+
+config wan 'wanb'
+ option downlink '15000'
+ option uplink '5000'
+
+config class 'corp'
+ list network '192.168.1.0/24'
+ list network 'fdc8:1234:1234:1::/64'
+ option reserved_downlink '50%'
+ option reserved_uplink '35%'
+ option allowed_downlink '100%'
+ option allowed_uplink '100%'
+
+config class 'vpn'
+ list network '192.168.2.0/24'
+ list network 'fdc8:1234:1234:2::/64'
+ option reserved_downlink '25%'
+ option reserved_uplink '50%'
+ option allowed_downlink '100%'
+ option allowed_uplink '100%'
+
+config class 'guest'
+ list network '192.168.3.0/24'
+ list network 'fdc8:1234:1234:3::/64'
+ option reserved_downlink '25%'
+ option reserved_uplink '15%'
+ option allowed_downlink '25%'
+ option allowed_uplink '15%'
+
+config class 'default'
+ option reserved_downlink '1000'
+ option reserved_uplink '1000'
+ option allowed_downlink '100%'
+ option allowed_uplink '100%'
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
+
+START=25
+USE_PROCD=1
+
+echo_err() {
+ echo "$@" >&2
+}
+
+msg() {
+ local level=$1; shift
+ echo_err "$APPNAME[$level]: $*"
+}
+
+LOGLEVEL=${LOGLEVEL:-2}
+
+die() {
+ local err=$1; shift
+ e "$*"
+ exit $err
+}
+
+APPNAME="trafficshaper"
+IPT_CHAIN=$APPNAME
+
+debug_exec(){
+ local err
+ d "exec: $*"
+ if "$@"; then
+ return 0
+ else
+ err="$?"
+ fi
+ e "exec[err=$err]: $*"
+ return "$err"
+}
+
+IP="debug_exec ip"
+TC="debug_exec tc"
+IP4T="debug_exec iptables -w 5"
+IP6T="debug_exec ip6tables -w 5"
+
+#QDISC="cake autorate_ingress internet ethernet diffserv4 triple-isolate"
+QDISC="cake"
+
+REQ_MODULES="sch_htb sch_cake act_connmark act_mirred em_u32"
+REQ_CMDS="ip tc iptables"
+
+preinit(){
+ [ "$LOGLEVEL" -ge 1 ] && e() { msg ERROR "$@"; } || e() { true; }
+ [ "$LOGLEVEL" -ge 2 ] && v() { msg INFO "$@"; } || v() { true; }
+ [ "$LOGLEVEL" -ge 3 ] && d() { msg DEBUG "$@"; } || d() { true; }
+ [ "$LOGLEVEL" -ge 4 ] && set -x
+ set -e
+}
+
+requires() {
+ for module in $REQ_MODULES; do
+ [ -d /sys/module/$module ] || insert_modules "$module" ||
+ die 2 "cannot load $module. Please install kmod-$module"
+ done
+ for cmd in $REQ_CMDS; do
+ which $cmd &>/dev/null ||
+ die 2 "cannot find command $cmd. Please install $cmd"
+ done
+
+ if ! which ip6tables &>/dev/null; then
+ v "Disabling IPv6 as ip6tables was not found"
+ IP6T=true
+ fi
+
+ . /lib/functions/network.sh
+
+ config_load $APPNAME
+}
+
+do_stop() {
+ local only_int=$1
+
+ preinit
+ requires
+
+ v "Stopping $APPNAME${only_int:+ for interface $only_int}"
+ if [ -z "$only_int" ]; then
+ d "Cleaning iptables"
+ # Cleaning iptables
+ for IPT in "$IP4T" "$IP6T"; do
+ $IPT -t mangle -D FORWARD -j $IPT_CHAIN &>/dev/null || :
+ $IPT -t mangle -F $IPT_CHAIN &>/dev/null || :
+ $IPT -t mangle -X $IPT_CHAIN &>/dev/null || :
+ $IPT -t mangle -F $IPT_CHAIN-classify &>/dev/null || :
+ $IPT -t mangle -X $IPT_CHAIN-classify &>/dev/null || :
+ done
+ fi
+
+ d "Cleaning tc"
+ local dev_done int dev ifb interfaces
+ if [ "$only_int" ]; then
+ config_get type $only_int TYPE
+ if [ "$type" != "wan" ]; then
+ d "interface $only_int not found in trafficshaper config. Ignoring"
+ return 0
+ fi
+ interfaces="$only_int"
+
+ else
+ interfaces="$(config_foreach echo wan)"
+ fi
+
+ for int in $interfaces; do
+ d "Cleaning tc for interface $int"
+ network_get_physdev dev "$int" ||
+ die 1 "failed to get physical dev of interface $int"
+
+ if echo "$dev_done" | grep -x -F -q "$dev"; then
+ continue
+ fi
+ ifb="ifb_$dev"
+ if [ ${#ifb} -gt 15 ]; then
+ die 1 "ifb name too long: ${ifb}"
+ fi
+
+ $TC qdisc del dev ${ifb} root 2> /dev/null || :
+ $TC qdisc del dev ${dev} root 2> /dev/null || :
+ $TC qdisc del dev ${dev} ingress 2> /dev/null || :
+
+ d "Removing ${ifb}..."
+ $IP link set dev ${ifb} down 2>/dev/null || :
+ $IP link delete dev ${ifb} 2>/dev/null || :
+
+ intdev_done="$(echo "$dev_done"; echo -n $dev)"
+ done
+}
+
+
+calc_bw() {
+ local value=$1 reference=$2
+ case "${value}" in
+ *%) echo "$((${value%\%} * reference / 100 ))";;
+ *) echo ${value};;
+ esac
+}
+
+mask_range() {
+ local mask=$(($1)) n=0 fsb
+ if [ $mask -le 0 ]; then
+ e "mask '$1' must be greater than 0 (have a sequence of set bit)"
+ return 2
+ fi
+ while [ "$((mask & 0x1))" -eq 0 ]; do
+ mask=$((mask >> 1))
+ : $((n++))
+ done
+ fsb="$n"
+ while [ "$((mask & 0x1))" -eq 1 ]; do
+ mask=$((mask >> 1))
+ : $((n++))
+ done
+ if [ $mask -ne 0 ]; then
+ e "mask '$1' must be a continuos sequence of set bit"
+ return 2
+ fi
+ echo $fsb $((n-1))
+ return 0
+}
+
+start_iptables(){
+ d "Creating iptables mangle rules"
+
+ config_get mark_mask globals mark_mask 0xFF
+ mark_mask=$(printf '0x%X\n' $(($mark_mask)))
+
+ local fsb_lst class_id_max class_id_shift
+ fsb_lst=$(mask_range $mark_mask)
+ class_id_max=$(((1<<(${fsb_lst#* } - ${fsb_lst% *} +1))+1))
+ class_id_shift=$((${fsb_lst% *}))
+
+ d "General iptables rules:"
+ for IPT in "$IP4T" "$IP6T"; do
+ $IPT -t mangle -N $IPT_CHAIN
+ $IPT -t mangle -N $IPT_CHAIN-classify
+
+ $IPT -t mangle -A FORWARD -j $IPT_CHAIN
+ $IPT -t mangle -A $IPT_CHAIN -j CONNMARK --restore-mark --nfmask $mark_mask --ctmask $mark_mask \
+ -m comment --comment "Get previous class"
+ $IPT -t mangle -A $IPT_CHAIN -m mark --mark 0x0/$mark_mask -j $IPT_CHAIN-classify \
+ -m comment --comment "If no class, try to classify"
+ done
+
+ d "Classes iptables rules:"
+ local class_reserved_uplink class_reserved_downlink class_nets i=2 xi default_class_id
+ for class in $(config_foreach echo class); do
+ config_get class_reserved_uplink $class reserved_uplink
+ config_get class_reserved_downlink $class reserved_downlink
+ config_get class_nets $class network
+ if [ "$class" = default ]; then
+ default_class_id=$i
+ if [ -z "$class_reserved_uplink" -a -z "$class_reserved_downlink" ] ; then
+ die 2 "class default must defined either reserved uplink or downlink!"
+ fi
+ if [ "$class_nets" ]; then
+ die 2 "class default must not have any network defined!"
+ fi
+ else
+ if [ "$i" -ge "$class_id_max" ]; then
+ die 1 "Max client classes reached. Please, use less classes or increase option mark_mask '$mark_mask' in globals. Current mask allows only $((class_id_max-2)) classes if default is the last one."
+ fi
+ fi
+
+ xi=$(printf '0x%X\n' $(((i-1)<<class_id_shift)))
+
+ for class_net in $class_nets; do
+ case $class_net in
+ *:*) IPT="$IP6T" ;;
+ *.*) IPT="$IP4T" ;;
+ *) die 2 "Unknown address family of network $class_net in class $class!"
+ esac
+ if [ "$class_reserved_uplink" ]; then
+ $IPT -t mangle -A $IPT_CHAIN-classify -s $class_net -m mark --mark 0x0/$mark_mask -j MARK --set-mark ${xi}/$mark_mask \
+ -m comment --comment "$APPNAME-$class up"
+ fi
+ if [ "$class_reserved_downlink" ]; then
+ $IPT -t mangle -A $IPT_CHAIN-classify -d $class_net -m mark --mark 0x0/$mark_mask -j MARK --set-mark ${xi}/$mark_mask \
+ -m comment --comment "$APPNAME-$class down"
+ fi
+ done
+ : $((i++))
+ done
+ if [ -z "$default_class_id" ]; then
+ die 2 "No default class defined!"
+ fi
+
+ $IP4T -t mangle -A $IPT_CHAIN-classify -j CONNMARK --save-mark --nfmask $mark_mask --ctmask $mark_mask
+ $IP6T -t mangle -A $IPT_CHAIN-classify -j CONNMARK --save-mark --nfmask $mark_mask --ctmask $mark_mask
+}
+
+
+
+start_tc_interface() {
+ local int=$1; shift
+ local dev=$1; shift
+ local default_class_id=$1; shift
+
+ config_get mark_mask globals mark_mask 0xFF
+ local fsb_lst class_id_max class_id_shift
+ fsb_lst=$(mask_range $mark_mask)
+ class_id_max=$(((1<<(${fsb_lst#* } - ${fsb_lst% *} +1))))
+ class_id_shift=$((${fsb_lst% *}))
+
+ local downlink uplink type
+ config_get downlink $int downlink
+ config_get uplink $int uplink
+
+ d "Creating tc rules for $int ($dev)"
+ local dev_down dev_up
+ if [ "$downlink" ]; then
+ local ifb="ifb_$dev"
+ if [ ${#ifb} -gt 15 ]; then
+ die 1 "ifb name too long: ${ifb}"
+ fi
+
+ d "Creating ${ifb}..."
+ $IP link add name ${ifb} type ifb
+ $IP link set dev $ifb up
+ d "Redirect ingress $dev to $ifb..."
+ $TC qdisc add dev $dev handle ffff: ingress
+ $TC filter add dev $dev parent ffff: protocol all u32 match u32 0 0 action connmark action mirred egress redirect dev $ifb
+ dev_down=$ifb
+ else
+ dev_down=
+ fi
+ if [ "$uplink" ]; then
+ dev_up="$dev"
+ fi
+
+ # Download/Upload
+ if [ "$dev_down" ]; then
+ tc qdisc add dev $dev_down root handle 1: htb default "$default_class_id"
+ tc class add dev $dev_down parent 1: classid 1:1 htb rate $(calc_bw ${downlink})kbit burst 500k quantum 1500
+ fi
+
+ if [ "$dev_up" ]; then
+ tc qdisc add dev $dev_up root handle 1: htb default "$default_class_id"
+ tc class add dev $dev_up parent 1: classid 1:1 htb rate $(calc_bw ${uplink})kbit burst 500k quantum 1500
+ fi
+
+ v "$int($dev):" \
+ "${downlink:+downlink of ${downlink}kbit}"\
+ "${uplink:+uplink of ${uplink}kbit}"\
+
+ local class class_reserved_downlink class_reserved_uplink class_allowed_downlink class_allowed_uplink class_nets class_net i=2
+ for class in $(config_foreach echo class); do
+ config_get class_reserved_downlink $class reserved_downlink
+ if [ "$class_reserved_downlink" ]; then
+ if [ "$dev_down" ]; then
+ class_reserved_downlink=$(calc_bw $class_reserved_downlink $downlink)
+ config_get class_allowed_downlink $class allowed_downlink "$class_reserved_downlink"
+ class_allowed_downlink=$(calc_bw $class_allowed_downlink $downlink)
+ else
+ e "class $class defines reserved downlink but not wan $int. Downlink shapping will be ignored"
+ class_reserved_downlink=
+ fi
+ elif [ "$dev_down" ]; then
+ e "class $class does not define reserved downlink but wan $int does. Downlink shapping will use default class"
+ fi
+
+ if [ "$class_allowed_downlink" -lt "$class_reserved_downlink" ]; then
+ die 1 "Allowed downlink bandwitdh in class $class must not be smaller than reserved downlink."
+ fi
+
+ config_get class_reserved_uplink $class reserved_uplink
+ if [ "$class_reserved_uplink" ]; then
+ if [ "$dev_up" ]; then
+ class_reserved_uplink=$(calc_bw $class_reserved_uplink $uplink)
+ config_get class_allowed_uplink $class allowed_uplink "$class_reserved_uplink"
+ class_allowed_uplink=$(calc_bw $class_allowed_uplink $uplink)
+ else
+ e "class $class defines reserved uplink but not wan $int. Downlink shapping will be ignored"
+ class_reserved_uplink=
+ fi
+ elif [ "$dev_up" ]; then
+ e "class $class does not define reserved uplink but wan $int does. Downlink shapping will use default class"
+ fi
+
+ if [ -n "$class_allowed_uplink" -a -n "$class_reserved_uplink" ] && [ "$class_allowed_uplink" -lt "$class_reserved_uplink" ]; then
+ die 1 "Allowed uplink bandwitdh in class $class must not be smaller than reserved uplink."
+ fi
+
+ v "$int($dev): $class(class 1:$i) will have" \
+ "${class_reserved_downlink:+download of ${class_reserved_downlink}kbit (up to ${class_allowed_downlink}kbit)}"\
+ "${class_reserved_uplink:+upload of ${class_reserved_uplink}kbit up (up to ${class_allowed_uplink}kbit)}"
+
+ xi=$(printf '0x%X\n' $(((i-1)<<class_id_shift)))
+ if [ "$class_reserved_uplink" ]; then
+ $TC class add dev $dev_up parent 1:1 classid 1:$i htb rate ${class_reserved_uplink}kbit ceil ${class_allowed_uplink}kbit quantum 1500 burst 50k
+ $TC qdisc add dev $dev_up parent 1:$i handle $i: $QDISC
+ if [ "$class" != default ]; then
+ $TC filter add dev $dev_up parent 1: protocol ip prio $i handle ${xi}/$mark_mask fw flowid 1:$i
+ fi
+ fi
+ if [ "$class_reserved_downlink" ]; then
+ $TC class add dev $dev_down parent 1:1 classid 1:$i htb rate ${class_reserved_downlink}kbit ceil ${class_allowed_downlink}kbit quantum 1500 burst 50k
+ $TC qdisc add dev $dev_down parent 1:$i handle $i: $QDISC
+ if [ "$class" != default ]; then
+ $TC filter add dev $dev_down parent 1: protocol ip prio $i handle ${xi}/$mark_mask fw flowid 1:$i
+ fi
+ fi
+ : $((i++))
+ done
+}
+
+start_tc() {
+ d "Creating tc rules"
+ local dev_done int dev interfaces
+ local default_class_id=$1; shift
+ local only_int=$1
+
+ if [ "$only_int" ]; then
+ config_get type $only_int TYPE
+ if [ "$type" != "wan" ]; then
+ d "interface $only_int not found in trafficshaper config. Ignoring"
+ return 0
+ fi
+ interfaces="$only_int"
+
+ else
+ interfaces="$(config_foreach echo wan)"
+ fi
+
+ for int in $interfaces; do
+ network_get_physdev dev "$int" ||
+ die 1 "failed to get physical dev of interface $int"
+
+ if echo "$dev_done" | grep -x -F -q "$dev"; then
+ e "$int uses $dev which was already configured. Only list each WAN once. Skipping..."
+ continue
+ fi
+
+ start_tc_interface $int $dev $ifb "$default_class_id"
+ intdev_done="$(echo "$dev_done"; echo -n $dev)"
+ done
+}
+
+do_start() {
+ local only_int=$1 type
+
+ preinit
+ (LOGLEVEL=0 do_stop "$only_int")
+ requires
+
+ trap "set +e; do_stop $only_int" EXIT
+
+ v "Starting $APPNAME${only_int:+ for interface $only_int}"
+
+ local default_class_id
+ if ! default_class_id=$(i=2 config_foreach 'eval echo $((i++))' class '| grep " default"'); then
+ die 2 "No default class defined!"
+ fi
+ default_class_id=${default_class_id% *}
+
+ [ "$only_int" ] || start_iptables
+ start_tc "$default_class_id" "$only_int"
+
+ trap - EXIT
+}
+
+start_service() {
+ ( do_start )
+}
+
+stop_service() {
+ ( do_stop )
+}
+
+restart_service() {
+ ( do_start )
+}
+
+is_running() {
+ $IP4T -t mangle -L $IPT_CHAIN &>/dev/null
+}
+
+reload_service() {
+ preinit
+ if ! is_running; then
+ d "Not running. Nothing to reload"
+ return 0
+ fi
+ logger -t "$APPNAME" "Reloading $*..."
+ ( do_start "$@" )
+}
+
+add_interface_trigger() {
+ procd_add_interface_trigger "interface.update" "$1" /etc/init.d/$APPNAME reload $1
+}
+
+service_triggers() {
+ preinit; set +e
+ requires
+
+ procd_add_reload_trigger "$APPNAME"
+ config_foreach add_interface_trigger wan
+
+ procd_open_validate
+ validate_trafficshaper_global
+ validate_trafficshaper_wan
+ validate_trafficshaper_class
+ procd_close_validate
+}
+
+validate_trafficshaper_global() {
+ uci_validate_section $APPNAME global "${1}" \
+ 'mark_mask:uinteger:0xFF'
+}
+
+validate_trafficshaper_wan() {
+ uci_validate_section "$APPNAME" wan "${1}" \
+ 'downlink:uinteger' \
+ 'uplink:uinteger'
+}
+
+validate_trafficshaper_class() {
+ uci_validate_section "$APPNAME" class "${1}" \
+ 'network:cidr' \
+ 'reserved_downlink:or(uinteger, string)' \
+ 'reserved_uplink:or(uinteger, string)' \
+ 'allowed_downlink:or(uinteger, string)' \
+ 'allowed_uplink:or(uinteger, string)'
+}
+
+boot() {
+ LOGLEVEL=1 start
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
-PKG_VERSION:=1.4.0
+PKG_VERSION:=1.4.5
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
option trm_enabled '0'
option trm_captive '1'
option trm_proactive '1'
+ option trm_netcheck '0'
option trm_iface 'trm_wwan'
option trm_triggerdelay '2'
option trm_debug '0'
- option trm_maxretry '3'
+ option trm_maxretry '5'
+ option trm_listexpiry '0'
option trm_minquality '35'
option trm_maxwait '30'
option trm_timeout '60'
local delay="$(uci_get travelmate global trm_triggerdelay)"
PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
- procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
+ procd_add_interface_trigger "interface.*.down" "${trigger:-"trm_wwan"}" "${trm_init}" reload
+ procd_add_config_trigger "config.change" "wireless" "${trm_init}" reload
procd_add_config_trigger "config.change" "travelmate" "${trm_init}" restart
}
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.4.0"
+trm_ver="1.4.5"
trm_sysver="unknown"
trm_enabled=0
trm_debug=0
+trm_iface="trm_wwan"
trm_captive=1
trm_proactive=1
+trm_netcheck=0
trm_captiveurl="http://captive.apple.com"
trm_minquality=35
trm_maxretry=3
trm_maxwait=30
trm_timeout=60
+trm_listexpiry=0
trm_radio=""
trm_connection=""
trm_rtfile="/tmp/trm_runtime.json"
#
f_trim()
{
- local trim="$1"
+ local IFS trim="${1}"
trim="${trim#"${trim%%[![:space:]]*}"}"
trim="${trim%"${trim##*[![:space:]]}"}"
#
f_envload()
{
- local sys_call sys_desc sys_model
+ local IFS sys_call sys_desc sys_model
# (re-)initialize global list variables
#
trm_sysver="${sys_model}, ${sys_desc}"
fi
- # get eap capabilities and rebind setting
+ # get eap capabilities and rebind protection setting
#
trm_eap="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
trm_rebind="$(uci_get dhcp "@dnsmasq[0]" rebind_protection)"
# load config and check 'enabled' option
#
- option_cb()
+ config_cb()
{
- local option="${1}"
- local value="${2}"
- eval "${option}=\"${value}\""
+ local name="${1}" type="${2}"
+ if [ "${name}" = "travelmate" ] && [ "${type}" = "global" ]
+ then
+ option_cb()
+ {
+ local option="${1}" value="${2}"
+ eval "${option}=\"${value}\""
+ }
+ else
+ option_cb()
+ {
+ return 0
+ }
+ fi
}
config_load travelmate
then
trm_minquality=35
fi
+ if [ ${trm_listexpiry} -lt 0 ] || [ ${trm_listexpiry} -gt 300 ]
+ then
+ trm_listexpiry=0
+ fi
if [ ${trm_maxretry} -lt 1 ] || [ ${trm_maxretry} -gt 10 ]
then
- trm_maxretry=3
+ trm_maxretry=5
fi
if [ ${trm_maxwait} -lt 20 ] || [ ${trm_maxwait} -gt 40 ] || [ ${trm_maxwait} -ge ${trm_timeout} ]
then
then
trm_timeout=60
fi
+
+ # load json runtime file
+ #
+ json_load_file "${trm_rtfile}" >/dev/null 2>&1
+ json_select data >/dev/null 2>&1
+ if [ ${?} -ne 0 ]
+ then
+ > "${trm_rtfile}"
+ json_init
+ json_add_object "data"
+ fi
}
# gather radio information & bring down all STA interfaces
#
f_prep()
{
- local config="${1}" proactive="${2}"
+ local IFS config="${1}" proactive="${2}"
local mode="$(uci_get wireless "${config}" mode)"
local network="$(uci_get wireless "${config}" network)"
local radio="$(uci_get wireless "${config}" device)"
then
trm_active_sta="${config}"
fi
- if [ -z "${eaptype}" ] || ([ -n "${eaptype}" ] && [ ${trm_eap} -eq 0 ])
+ if [ -z "${eaptype}" ] || ([ -n "${eaptype}" ] && [ ${trm_eap:-1} -eq 0 ])
then
trm_stalist="$(f_trim "${trm_stalist} ${config}-${radio}")"
fi
fi
fi
- f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, trm_eap: ${trm_eap}, trm_rebind: ${trm_rebind}, disabled: ${disabled}"
+ f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, trm_eap: ${trm_eap:-"-"}, trm_rebind: ${trm_rebind:-"-"}, disabled: ${disabled}"
}
# check interface status
#
f_check()
{
- local IFS ifname radio dev_status last_status config sta_essid sta_bssid result cp_domain wait=1 mode="${1}" status="${2:-"false"}"
+ local IFS ifname radio dev_status last_status config sta_essid sta_bssid result cp_domain wait mode="${1}" status="${2:-"false"}"
- trm_ifquality=0
if [ "${mode}" != "initial" ] && [ "${status}" = "false" ]
then
ubus call network reload
+ wait=$(( ${trm_maxwait} / 6 ))
+ sleep ${wait}
fi
+
+ wait=1
while [ ${wait} -le ${trm_maxwait} ]
do
dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
fi
elif [ "${mode}" = "rev" ]
then
- wait=$(( ${trm_maxwait} / 3 ))
- sleep ${wait}
break
else
ifname="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')"
if [ -n "${ifname}" ]
then
trm_ifquality="$(${trm_iwinfo} ${ifname} info 2>/dev/null | awk -F "[\/| ]" '/Link Quality:/{printf "%i\n", (100 / $NF * $(NF-1)) }')"
- if [ ${trm_ifquality} -ge ${trm_minquality} ]
+ if [ ${trm_captive} -eq 1 ]
then
- trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
- elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ] && [ "${trm_ifstatus}" != "${status}" ]
- then
- trm_ifstatus="${status}"
- sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
- sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
- f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
+ result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \
+ awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
fi
- fi
- fi
- if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
- then
- json_get_var last_status "travelmate_status"
- if ([ "${trm_ifstatus}" = "false" ] && [ "${trm_ifstatus}" != "${status}" ]) || \
- ([ "${trm_ifstatus}" = "true" ] && [ "${mode}" = "sta" ] && [ -n "${trm_active_sta}" ]) || \
- [ -z "${last_status}" ] || [ "${last_status}" = "running / not connected" ] || [ ${trm_ifquality} -lt ${trm_minquality} ]
- then
- f_jsnup
- fi
- if [ "${mode}" = "initial" ] && [ ${trm_captive} -eq 1 ] && [ "${trm_ifstatus}" = "true" ]
- then
- result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \
- awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
- if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
+ if [ ${trm_ifquality} -ge ${trm_minquality} ] && ([ ${trm_captive} -eq 0 ] || [ ${trm_netcheck} -eq 0 ] || [ "${result%/*}" != "net nok" ])
then
- cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
- if [ -x "/etc/init.d/dnsmasq" ] && [ -n "${cp_domain}" ]
+ trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
+ if [ "${trm_ifstatus}" = "true" ]
then
- if [ -z "$(uci_get dhcp "@dnsmasq[0]" rebind_domain | grep -Fo "${cp_domain}")" ]
+ if [ ${trm_captive} -eq 1 ]
then
- uci -q add_list dhcp.@dnsmasq[0].rebind_domain="${cp_domain}"
- uci_commit dhcp
- /etc/init.d/dnsmasq reload
+ cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
+ if [ -n "${cp_domain}" ] && [ ${trm_rebind:-0} -eq 1 ] && [ -x "/etc/init.d/dnsmasq" ]
+ then
+ while [ -n "${cp_domain}" ] && [ -z "$(uci_get dhcp "@dnsmasq[0]" rebind_domain | grep -Fo "${cp_domain}")" ]
+ do
+ uci -q add_list dhcp.@dnsmasq[0].rebind_domain="${cp_domain}"
+ uci_commit dhcp
+ /etc/init.d/dnsmasq reload
+ f_log "info" "captive portal domain '${cp_domain}' added to rebind whitelist"
+ result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \
+ awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
+ cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
+ done
+ fi
fi
+ trm_connection="${result}/${trm_ifquality}"
+ f_jsnup
+ break
fi
- trm_connection="${result}/${trm_ifquality}"
+ else
+ if [ -n "${trm_connection}" ]
+ then
+ sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
+ sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
+ if [ ${trm_ifquality} -lt ${trm_minquality} ]
+ then
+ f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality})"
+ elif [ ${trm_captive} -eq 1 ] && [ ${trm_netcheck} -eq 1 ] && [ "${result%/*}" = "net nok" ]
+ then
+ f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' has no internet (${result})"
+ fi
+ unset trm_connection
+ trm_ifstatus="${status}"
+ f_jsnup
+ break
+ fi
+ fi
+ else
+ if [ -n "${trm_connection}" ]
+ then
+ unset trm_connection
+ trm_ifstatus="${status}"
f_jsnup
+ break
fi
fi
- break
fi
fi
wait=$(( wait + 1 ))
sleep 1
done
- f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, result: ${result:-"-"}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}"
+ f_log "debug" "f_check::: mode: ${mode}, name: ${ifname:-"-"}, status: ${trm_ifstatus}, quality: ${trm_ifquality}, result: ${result:-"-"}, connection: ${trm_connection:-"-"}, wait: ${wait}, max_wait: ${trm_maxwait}, min_quality: ${trm_minquality}, captive: ${trm_captive}, netcheck: ${trm_netcheck}"
}
# update runtime information
#
f_jsnup()
{
- local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
-
- if [ "${status}" = "true" ]
- then
- status="connected (${trm_connection:-"-"})"
- else
- unset trm_connection
- status="running / not connected"
- fi
+ local IFS config d1 d2 d3 last_date last_station sta_iface sta_radio sta_essid sta_bssid last_status dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
dev_status="$(ubus -S call network.wireless status 2>/dev/null)"
if [ -n "${dev_status}" ]
fi
fi
+ json_get_var last_date "last_rundate"
+ json_get_var last_station "station_id"
+ if [ "${status}" = "true" ]
+ then
+ status="connected (${trm_connection:-"-"})"
+ json_get_var last_status "travelmate_status"
+ if [ "${last_status}" = "running / not connected" ] || [ "${last_station}" != "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}" ]
+ then
+ last_date="$(/bin/date "+%Y.%m.%d-%H:%M:%S")"
+ fi
+ else
+ unset trm_connection
+ status="running / not connected"
+ fi
+ if [ -z "${last_date}" ]
+ then
+ last_date="$(/bin/date "+%Y.%m.%d-%H:%M:%S")"
+ fi
+
json_get_var faulty_list "faulty_stations"
+ if [ -n "${faulty_list}" ] && [ ${trm_listexpiry} -gt 0 ]
+ then
+ d1="$(/bin/date -d "${last_date}" "+%s")"
+ d2="$(/bin/date "+%s")"
+ d3=$(( (d2 - d1) / 60 ))
+ if [ ${d3} -ge ${trm_listexpiry} ]
+ then
+ faulty_list=""
+ fi
+ fi
+
if [ -n "${faulty_station}" ]
then
if [ -z "$(printf "%s" "${faulty_list}" | grep -Fo "${faulty_station}")" ]
json_add_string "station_id" "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}"
json_add_string "station_interface" "${sta_iface:-"-"}"
json_add_string "faulty_stations" "${faulty_list}"
- json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+ json_add_string "last_rundate" "${last_date}"
json_add_string "system" "${trm_sysver}"
json_dump > "${trm_rtfile}"
- f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}"
+ f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}, list_expiry: ${trm_listexpiry}"
}
# write to syslog
#
f_log()
{
- local class="${1}"
- local log_msg="${2}"
+ local IFS class="${1}" log_msg="${2}"
if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
then
f_main()
{
local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
- local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
+ local station_id sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
f_check "initial"
f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
then
config_load wireless
config_foreach f_prep wifi-iface ${trm_proactive}
- if [ "${trm_ifstatus}" = "true" ] && [ ${trm_proactive} -eq 1 ]
+ if [ "${trm_ifstatus}" = "true" ] && [ -n "${trm_active_sta}" ] && [ ${trm_proactive} -eq 1 ]
then
json_get_var station_id "station_id"
active_radio="${station_id%%/*}"
active_essid="${active_essid#*/}"
active_bssid="${station_id##*/}"
f_check "dev" "true"
+ f_log "debug" "f_main ::: active_radio: ${active_radio}, active_essid: \"${active_essid}\", active_bssid: ${active_bssid:-"-"}"
else
uci_commit wireless
f_check "dev"
fi
json_get_var faulty_list "faulty_stations"
f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
+ # radio loop
+ #
for dev in ${trm_devlist}
do
- f_log "debug" "f_main ::: device: ${dev}"
if [ -z "$(printf "%s" "${trm_stalist}" | grep -o "\-${dev}")" ]
then
f_log "debug" "f_main ::: no station on '${dev}' - continue"
continue
fi
- cnt=1
- while [ ${cnt} -le ${trm_maxretry} ]
+ # station loop
+ #
+ for sta in ${trm_stalist}
do
- f_log "debug" "f_main ::: cnt: ${cnt}, max_cnt: ${trm_maxretry}"
- for sta in ${trm_stalist}
- do
- config="${sta%%-*}"
- sta_radio="${sta##*-}"
- sta_essid="$(uci_get wireless "${config}" ssid)"
- sta_bssid="$(uci_get wireless "${config}" bssid)"
- sta_iface="$(uci_get wireless "${config}" network)"
- json_get_var faulty_list "faulty_stations"
- if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+ config="${sta%%-*}"
+ sta_radio="${sta##*-}"
+ sta_essid="$(uci_get wireless "${config}" ssid)"
+ sta_bssid="$(uci_get wireless "${config}" bssid)"
+ sta_iface="$(uci_get wireless "${config}" network)"
+ json_get_var faulty_list "faulty_stations"
+ if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+ then
+ f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
+ continue
+ fi
+ if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
+ then
+ f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
+ break 2
+ fi
+ f_log "debug" "f_main ::: sta_radio: ${sta_radio}, sta_essid: \"${sta_essid}\", sta_bssid: ${sta_bssid:-"-"}"
+ if [ -z "${scan_list}" ]
+ then
+ scan_list="$(f_trim "$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
+ awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i};gsub(/,/,".",var2)}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
+ sort -rn | awk 'BEGIN{ORS=","}{print $0}' | awk '{print substr($0,1,4096)}')")"
+ f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
+ if [ -z "${scan_list}" ]
then
- f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
- continue
+ f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
+ continue 2
fi
- if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
+ fi
+ # scan loop
+ #
+ IFS=","
+ for scan in ${scan_list}
+ do
+ if [ -z "${scan_quality}" ]
then
- f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
- break 3
- fi
- if [ -z "${scan_list}" ]
+ scan_quality="${scan}"
+ elif [ -z "${scan_bssid}" ]
then
- scan_list="$(f_trim "$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
- awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++) \
- if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
- sort -rn | awk '{ORS=",";print $0}')")"
- f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
- if [ -z "${scan_list}" ]
- then
- f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
- continue 3
- fi
+ scan_bssid="${scan}"
+ elif [ -z "${scan_essid}" ]
+ then
+ scan_essid="${scan}"
fi
- IFS=","
- for scan in ${scan_list}
- do
- if [ -z "${scan_quality}" ]
- then
- scan_quality="${scan}"
- elif [ -z "${scan_bssid}" ]
- then
- scan_bssid="${scan}"
- elif [ -z "${scan_essid}" ]
- then
- scan_essid="${scan}"
- fi
- if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+ if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+ then
+ if [ ${scan_quality} -ge ${trm_minquality} ]
then
- if [ ${scan_quality} -ge ${trm_minquality} ]
+ if (([ "${scan_essid}" = "\"${sta_essid//,/.}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
+ ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
then
- if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
- ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
+ f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_essid: ${scan_essid}, scan_bssid: ${scan_bssid:-"-"}"
+ if [ "${dev}" = "${active_radio}" ]
then
- f_log "debug" "f_main ::: scan_quality: ${scan_quality}, sta_bssid: ${sta_bssid}, scan_bssid: ${scan_bssid}, sta_essid: \"${sta_essid}\", scan_essid: ${scan_essid}"
- if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
- then
- uci_set wireless "${trm_active_sta}" disabled 1
- unset trm_connection
- fi
+ unset trm_connection active_radio active_essid active_bssid
+ uci_set wireless "${trm_active_sta}" disabled 1
+ uci_commit wireless
+ fi
+ # retry loop
+ #
+ cnt=1
+ while [ ${cnt} -le ${trm_maxretry} ]
+ do
uci_set wireless "${config}" disabled 0
f_check "sta"
if [ "${trm_ifstatus}" = "true" ]
then
+ unset IFS scan_list
uci_commit wireless
- f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
- return
+ f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
+ return 0
else
uci -q revert wireless
f_check "rev"
- if [ ${cnt} -eq ${trm_maxretry} ] || ([ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ])
+ if [ ${cnt} -eq ${trm_maxretry} ]
then
faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
f_jsnup "${faulty_station}"
- f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
+ break 2
else
f_jsnup
- f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+ f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
fi
- unset scan_list
- break
fi
- fi
+ cnt=$(( cnt + 1 ))
+ sleep $(( ${trm_maxwait} / 6 ))
+ done
+ else
+ unset scan_quality scan_bssid scan_essid
+ continue
fi
+ else
unset scan_quality scan_bssid scan_essid
+ continue
fi
- done
- unset IFS scan_quality scan_bssid scan_essid
+ fi
done
- cnt=$(( cnt + 1 ))
- sleep $(( ${trm_maxwait} / 6 ))
- unset scan_list
+ unset IFS scan_quality scan_bssid scan_essid
done
+ unset scan_list
done
fi
}
f_log "err" "system libraries not found"
fi
-# initialize json runtime file
-#
-json_load_file "${trm_rtfile}" >/dev/null 2>&1
-json_select data >/dev/null 2>&1
-if [ ${?} -ne 0 ]
-then
- > "${trm_rtfile}"
- json_init
- json_add_object "data"
-fi
-
# control travelmate actions
#
+f_envload
while true
do
if [ -z "${trm_action}" ]
f_log "info" "travelmate instance started ::: action: ${trm_action}, pid: ${$}"
unset trm_action
fi
+ json_cleanup
f_envload
f_main
done
include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
-PKG_VERSION:=1.9.0
-PKG_RELEASE:=1
+PKG_VERSION:=1.9.1
+PKG_RELEASE:=2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.unbound.net/downloads
+PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
+
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
-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_CPE_ID:=cpe:/a:nlnetlabs:unbound
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
define Package/unbound/Default
TITLE:=Validating Recursive DNS Server
- URL:=http://www.unbound.net/
- DEPENDS:=+libopenssl
+ URL:=https://www.unbound.net/
+ DEPENDS:=+libopenssl +@OPENSSL_WITH_EC
endef
define Package/unbound
--disable-dsa \
--disable-gost \
--enable-allsymbols \
+ --enable-ecdsa \
--enable-tfo-client \
--enable-tfo-server \
--with-libexpat="$(STAGING_DIR)/usr" \
+++ /dev/null
---- 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]);
+++ /dev/null
-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);
TITLE:=VPN configuration script for vpnc and OpenConnect
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
SUBMENU:=VPN
+ PKGARCH:=all
endef
define Package/vpnc-scripts/description
PKG_NAME:=vpnc
PKG_REV:=550
PKG_VERSION:=0.5.3.r$(PKG_REV)
-PKG_RELEASE:=8
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://svn.unix-ag.uni-kl.de/vpnc/trunk/
logger -t vpnc "initializing..."
serv_addr=
- for ip in $(resolveip -t 10 "$server"); do
+ for ip in $(resolveip -4t 10 "$server"); do
( proto_add_host_dependency "$config" "$ip" $interface )
serv_addr=1
done
TITLE:=Sends 'magic packets' to wake-on-LAN enabled ethernet adapters
URL:=http://gsd.di.uminho.pt/jpo/software/wakeonlan/
DEPENDS:=+perl +perlbase-getopt +perlbase-net +perlbase-socket
+ PKGARCH:=all
endef
define Package/wakeonlan/description
include $(TOPDIR)/rules.mk
PKG_NAME:=wavemon
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.9.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4199e2ad11a036f4289f5ad42a8b0fe518f2b5ff77447f4c366dbcf3f23e91d5
+PKG_HASH:=5823ef9459d6147a457b390b6744a77465584e93d37c2809fa7a0be557070166
+PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
+PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
and higher), e.g. the Lucent Orinoco cards.
endef
-CONFIGURE_VARS += \
- ac_cv_lib_cap_cap_get_flag=no \
- BUILD_DATE=$(SOURCE_DATE_EPOCH)
-
-TARGET_CFLAGS += -pthread -I$(STAGING_DIR)/usr/include/libnl3
+CONFIGURE_ARGS += --without-libcap
-MAKE_FLAGS += \
- CFLAGS="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include"
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3
define Package/wavemon/install
$(INSTALL_DIR) $(1)/usr/bin
--- /dev/null
+From f6e20c9c6e9b50963caaf5483248d329473a6815 Mon Sep 17 00:00:00 2001
+From: Gerrit Renker <Gerrit.Renker@ctl.io>
+Date: Mon, 21 Jan 2019 09:23:43 -0700
+Subject: [PATCH] Scan screen: resolves #62
+
+---
+ iw_if.c | 10 ++++++----
+ iw_if.h | 2 +-
+ iw_scan.c | 2 +-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/iw_if.c b/iw_if.c
+index c0b0128..d8bacbc 100644
+--- a/iw_if.c
++++ b/iw_if.c
+@@ -87,11 +87,13 @@ int if_set_down(const char *ifname)
+ return if_set_up_or_down(ifname, false);
+ }
+
+-/** Exit handler to restore interface 'down' state on exit via on_exit(3). */
+-void if_set_down_on_exit(int rc, void *arg)
++/** Exit handler to restore interface 'down' state on exit via atexit(3). */
++void if_set_down_on_exit(void)
+ {
+- if (if_set_down(arg) < 0) {
+- err_msg("unable to restore %s interface state - set down manually", arg);
++ const char *ifname = conf_ifname();
++
++ if (ifname && if_set_down(ifname) < 0) {
++ err_msg("unable to restore %s interface state - set down manually", ifname);
+ }
+ }
+
+diff --git a/iw_if.h b/iw_if.h
+index 50f5a47..e2199d3 100644
+--- a/iw_if.h
++++ b/iw_if.h
+@@ -76,7 +76,7 @@ struct if_info {
+ };
+ extern bool if_is_up(const char *ifname);
+ extern int if_set_up(const char *ifname);
+-extern void if_set_down_on_exit(int rc, void *arg);
++extern void if_set_down_on_exit(void);
+ extern void if_getinf(const char *ifname, struct if_info *info);
+
+ /**
+diff --git a/iw_scan.c b/iw_scan.c
+index 18e9e06..e2b3067 100644
+--- a/iw_scan.c
++++ b/iw_scan.c
+@@ -430,7 +430,7 @@ void *do_scan(void *sr_ptr)
+
+ if (if_set_up(conf_ifname()) < 0)
+ err_sys("Can not bring up interface '%s'", conf_ifname());
+- if (on_exit(if_set_down_on_exit, (void *)conf_ifname()) < 0)
++ if (atexit(if_set_down_on_exit) < 0)
+ snprintf(sr->msg, sizeof(sr->msg), "Warning: unable to restore %s down state on exit", conf_ifname());
+ break;
+ }
+--
+2.17.1
+
include $(TOPDIR)/rules.mk
PKG_NAME:=wget
-PKG_VERSION:=1.20.1
-PKG_RELEASE:=3
+PKG_VERSION:=1.20.3
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=b783b390cb571c837b392857945f5a1f00ec6b043177cc42abb8ee1b542ee1b3
+PKG_HASH:=31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:wget
+
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
PKG_NAME:=wifidog-ng
PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
BIN=/usr/bin/wifidog-ng
-dhcp_host_white=1
+global_dhcp_host_white=1
+
+validate_gateway_section() {
+ uci_load_validate wifidog-ng gateway "$1" "$2" \
+ 'enabled:bool:0' \
+ 'interface:uci("network", "@interface"):lan' \
+ 'dhcp_host_white:bool:1'
+}
start_wifidog() {
- local cfg="$1"
- local enabled interface
-
- uci_validate_section wifidog-ng gateway "${1}" \
- 'enabled:bool:0' \
- 'interface:uci("network", "@interface"):lan' \
- 'dhcp_host_white:bool:1'
-
- [ $? -ne 0 ] && {
- echo "validation gateway failed" >&2
- exit 1
- }
-
- [ $enabled -eq 1 ] || exit 0
-
- # timeout = 49 days
- ipset -! create wifidog-ng-mac hash:mac timeout 4294967
- ipset -! create wifidog-ng-ip hash:ip
-
- modprobe wifidog-ng
- echo "enabled=1" > /proc/wifidog-ng/config
-
- procd_open_instance
- procd_set_param command $BIN
- procd_set_param respawn
- procd_close_instance
+ [ "$2" = 0 ] || {
+ echo "validation gateway failed" >&2
+ exit 1
+ }
+
+ [ $enabled = 1 ] || exit 0
+
+ [ $dhcp_host_white = 1 ] || global_dhcp_host_white=0
+
+ # timeout = 24.855 days
+ ipset -! create wifidog-ng-mac hash:mac timeout 2147483
+ ipset -! create wifidog-ng-ip hash:ip
+
+ modprobe wifidog-ng
+ echo "enabled=1" > /proc/wifidog-ng/config
+
+ procd_open_instance
+ procd_set_param command $BIN
+ procd_set_param respawn
+ procd_close_instance
+}
+
+validate_server_section() {
+ uci_load_validate wifidog-ng server "$1" "$2" \
+ 'host:host'
}
parse_server() {
- local cfg="$1"
- local host
-
- config_get host $cfg host
- validate_data ip4addr "$host" 2> /dev/null
- if [ $? -eq 0 ];
- then
- ipset add wifidog-ng-ip $host
- else
- echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
- fi
+ [ "$2" = 0 ] || {
+ echo "validation server failed" >&2
+ exit 1
+ }
+
+ if validate_data ip4addr "$host" 2> /dev/null; then
+ ipset add wifidog-ng-ip $host
+ else
+ echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+ fi
}
-parse_validated_user() {
- local cfg="$1"
- local mac ip
+validate_validated_user_section() {
+ uci_load_validate wifidog-ng validated_user "$1" "$2" \
+ 'mac:macaddr'
+}
- uci_validate_section wifidog-ng validated_user "${1}" \
- 'mac:macaddr'
+parse_validated_user() {
+ [ "$2" = 0 ] || {
+ echo "validation validated_user failed" >&2
+ exit 1
+ }
- [ $? -ne 0 ] && {
- echo "validation validated_user failed" >&2
- exit 1
- }
+ [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+}
- [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+validate_validated_domain_section() {
+ uci_load_validate wifidog-ng validated_domain "$1" "$2" \
+ 'domain:host'
}
parse_validated_domain() {
- local cfg="$1"
- local domain
+ [ "$2" = 0 ] || {
+ echo "validation validated_domain failed" >&2
+ exit 1
+ }
- uci_validate_section wifidog-ng validated_domain "${1}" \
- 'domain:host'
-
- [ $? -ne 0 ] && {
- echo "validation validated_domain failed" >&2
- exit 1
- }
+ [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+}
- [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+validate_dhcp_host_section() {
+ uci_load_validate dhcp host "$1" "$2" \
+ 'mac:macaddr'
}
parse_dhcp_host() {
- local cfg="$1"
- local mac ip
+ [ "$2" = 0 ] || {
+ echo "validation validated dhcp host failed" >&2
+ exit 1
+ }
- uci_validate_section dhcp host "${1}" \
- 'mac:macaddr'
-
- [ $? -ne 0 ] && {
- echo "validation validated dhcp host failed" >&2
- exit 1
- }
-
- [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+ [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
}
start_service() {
- config_load wifidog-ng
- config_foreach start_wifidog gateway
+ config_load wifidog-ng
+ config_foreach validate_gateway_section gateway start_wifidog
- echo -n > /tmp/dnsmasq.d/wifidog-ng
+ echo -n > /tmp/dnsmasq.d/wifidog-ng
- config_foreach parse_server server
- config_foreach parse_validated_user validated_user
- config_foreach parse_validated_domain validated_domain
+ config_foreach validate_server_section server parse_server
+ config_foreach validate_validated_user_section validated_user parse_validated_user
+ config_foreach validate_validated_domain_section validated_domain parse_validated_domain
- [ $dhcp_host_white -eq 1 ] && {
- config_load dhcp
- config_foreach parse_dhcp_host host
- }
+ [ $global_dhcp_host_white = 1 ] && {
+ config_load dhcp
+ config_foreach validate_dhcp_host_section host parse_dhcp_host
+ }
- /etc/init.d/dnsmasq restart &
+ /etc/init.d/dnsmasq restart &
}
stop_service() {
- rmmod wifidog-ng
+ rmmod wifidog-ng
+
+ ipset destroy wifidog-ng-mac
+ ipset destroy wifidog-ng-ip
+}
+
+service_triggers() {
+ procd_add_reload_trigger "wifidog-ng"
- ipset destroy wifidog-ng-mac
- ipset destroy wifidog-ng-ip
+ procd_open_validate
+ validate_gateway_section
+ validate_server_section
+ validate_validated_user_section
+ validate_validated_domain_section
+ validate_dhcp_host_section
+ procd_close_validate
}
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yggdrasil
+PKG_VERSION:=0.3.5
+PKG_RELEASE:=4
+
+PKG_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=2c69029adeb053ad049e90f1e4b7efa986094779868da77464d3c869984e861b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-3.0
+PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/yggdrasil-network/yggdrasil-go
+GO_PKG_BUILD_PKG:=github.com/yggdrasil-network/yggdrasil-go/cmd/...
+
+GO_PKG_LDFLAGS_X:= \
+ github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil.buildName=yggdrasil-openwrt \
+ github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil.buildVersion=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/yggdrasil
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Routing and Redirection
+ TITLE:=Yggdrasil supports end-to-end encrypted IPv6 networks
+ URL:=https://yggdrasil-network.github.io/
+ DEPENDS:=$(GO_ARCH_DEPENDS) @IPV6 +kmod-tun
+endef
+
+define Package/yggdrasil/description
+ Yggdrasil builds end-to-end encrypted networks with IPv6.
+ Beyond the similarities with cjdns is a different routing
+ algorithm. This globally-agreed spanning tree uses greedy
+ routing in a metric space. Back-pressure routing techniques
+ allow advanced link aggregation bonding on per-stream basis.
+ In turn, a single stream will span across multiple network
+ interfaces simultaneously with much greater throughput.
+endef
+
+define Package/yggdrasil/install
+ $(INSTALL_DIR) \
+ $(1)/etc/init.d \
+ $(1)/etc/uci-defaults \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) \
+ $(GO_PKG_BUILD_BIN_DIR)/yggdrasil \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) \
+ $(GO_PKG_BUILD_BIN_DIR)/yggdrasilctl \
+ $(1)/usr/sbin
+
+ $(INSTALL_BIN) \
+ ./files/yggdrasil.defaults \
+ $(1)/etc/uci-defaults/yggdrasil
+
+ $(INSTALL_BIN) \
+ ./files/yggdrasil.init \
+ $(1)/etc/init.d/yggdrasil
+endef
+
+$(eval $(call GoBinPackage,yggdrasil))
+$(eval $(call BuildPackage,yggdrasil))
--- /dev/null
+#!/bin/sh
+
+yggConfig="/etc/yggdrasil.conf"
+
+first_boot_genConfig()
+{
+ . /usr/share/libubox/jshn.sh
+ boardcfg=$(ubus call system board)
+ yggcfg=$(yggdrasil -genconf -json | grep NodeInfo -v)
+
+ json_load "$boardcfg"
+ json_get_var kernel kernel
+ json_get_var hostname hostname
+ json_get_var system system
+ json_get_var model model
+ json_get_var board_name board_name
+
+ json_load "$yggcfg"
+ json_add_string "IfName" "ygg0"
+ json_add_object "NodeInfo"
+ json_add_string "kernel" "$kernel"
+ json_add_string "hostname" "$hostname"
+ json_add_string "system" "$system"
+ json_add_string "model" "$model"
+ json_add_string "board_name" "$board_name"
+ json_close_object
+ json_dump
+}
+
+if [ ! -e ${yggConfig} ]; then
+ echo "first_boot: adding system board details to NodeInfo[] in NEW config: ${yggConfig}" | logger -t yggdrasil
+
+ first_boot_genConfig > ${yggConfig}
+
+ # create the network interface
+ uci -q batch <<-EOF >/dev/null
+ set network.yggdrasil=interface
+ set network.yggdrasil.ifname=ygg0
+ set network.yggdrasil.proto=none
+EOF
+
+ # create the firewall zone
+ uci -q batch <<-EOF >/dev/null
+ add firewall zone
+ set firewall.@zone[-1].name=yggdrasil
+ add_list firewall.@zone[-1].network=yggdrasil
+ set firewall.@zone[-1].input=REJECT
+ set firewall.@zone[-1].output=ACCEPT
+ set firewall.@zone[-1].forward=REJECT
+ set firewall.@zone[-1].conntrack=1
+ set firewall.@zone[-1].family=ipv6
+EOF
+
+ # allow ICMP from yggdrasil zone, e.g. ping6
+ uci -q batch <<-EOF >/dev/null
+ add firewall rule
+ set firewall.@rule[-1].name='Allow-ICMPv6-yggdrasil'
+ set firewall.@rule[-1].src=yggdrasil
+ set firewall.@rule[-1].proto=icmp
+ add_list firewall.@rule[-1].icmp_type=echo-request
+ add_list firewall.@rule[-1].icmp_type=echo-reply
+ add_list firewall.@rule[-1].icmp_type=destination-unreachable
+ add_list firewall.@rule[-1].icmp_type=packet-too-big
+ add_list firewall.@rule[-1].icmp_type=time-exceeded
+ add_list firewall.@rule[-1].icmp_type=bad-header
+ add_list firewall.@rule[-1].icmp_type=unknown-header-type
+ set firewall.@rule[-1].limit='1000/sec'
+ set firewall.@rule[-1].family=ipv6
+ set firewall.@rule[-1].target=ACCEPT
+EOF
+
+ # allow SSH from yggdrasil zone, needs to be explicitly enabled
+ uci -q batch <<-EOF >/dev/null
+ add firewall rule
+ set firewall.@rule[-1].enabled=0
+ set firewall.@rule[-1].name='Allow-SSH-yggdrasil'
+ set firewall.@rule[-1].src=yggdrasil
+ set firewall.@rule[-1].proto=tcp
+ set firewall.@rule[-1].dest_port=22
+ set firewall.@rule[-1].target=ACCEPT
+EOF
+
+ # allow LuCI access from yggdrasil zone, needs to be explicitly enabled
+ uci -q batch <<-EOF >/dev/null
+ add firewall rule
+ set firewall.@rule[-1].enabled=0
+ set firewall.@rule[-1].name='Allow-HTTP-yggdrasil'
+ set firewall.@rule[-1].src=yggdrasil
+ set firewall.@rule[-1].proto=tcp
+ set firewall.@rule[-1].dest_port=80
+ set firewall.@rule[-1].target=ACCEPT
+EOF
+
+ uci commit firewall
+ uci commit network
+
+else
+ :
+fi
+
+exit 0
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=85
+
+USE_PROCD=1
+
+start_service()
+{
+ [ -f /etc/uci-defaults/yggdrasil ] && ( . /etc/uci-defaults/yggdrasil )
+
+ procd_open_instance
+ procd_set_param respawn
+ procd_set_param command /bin/ash -c "/usr/sbin/yggdrasil -useconffile /etc/yggdrasil.conf | logger -t yggdrasil"
+
+ procd_close_instance
+}
+
+stop_service()
+{
+ killall yggdrasil
+}
+
+reload_service()
+{
+ restart
+}
+
+service_triggers()
+{
+ procd_add_reload_trigger yggdrasil
+}
include $(TOPDIR)/rules.mk
PKG_NAME:=znc
-PKG_VERSION:=1.7.2
+PKG_VERSION:=1.7.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://znc.in/releases \
https://znc.in/releases/archive
-PKG_HASH:=60b4e78f54c532c32673d1ef8e5f606c530ef3a6d6b76ea1daa66459a86682a9
+PKG_HASH:=1e4cc31837a1e8e6cc310873659a167cec16a3fd4281cbc3bf364e42352c113d
PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
PKG_LICENSE:=Apache-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=attendedsysupgrade-common
-PKG_VERSION:=0.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.2
+PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
TITLE:=Common files neede by attendedsysupgrade packages
MAINTAINER:=Paul Spooren <paul@spooren.de>
DEPENDS:=+rpcd +rpcd-mod-rpcsys
+ PKGARCH:=all
endef
define Package/attendedsysupgrade-common/description
define Package/attendedsysupgrade-common/install
$(INSTALL_DIR) $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/attendedsysupgrade.defaults $(1)/etc/uci-defaults/attendedsysupgrade
+
+ $(INSTALL_DIR) $(1)/etc/opkg/keys/
+ $(INSTALL_BIN) ./files/c06d891233ba699 $(1)/etc/opkg/keys/c06d891233ba699
endef
$(eval $(call BuildPackage,attendedsysupgrade-common))
uci -q batch <<EOF
set attendedsysupgrade.server=server
-set attendedsysupgrade.server.url='https://example.org'
+set attendedsysupgrade.server.url='https://chef.libremesh.org'
set attendedsysupgrade.client=client
set attendedsysupgrade.client.upgrade_packages='1'
--- /dev/null
+untrusted comment: public key c06d891233ba699
+RWQMBtiRIzummeTc81jtKdJ3XwnaZGtHLRwjls0ovGsKoTnTmS7fj4Na
include $(TOPDIR)/rules.mk
PKG_NAME:=auc
-PKG_VERSION:=0.1.2
+PKG_VERSION:=0.1.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0
*/
#define _GNU_SOURCE
-#define AUC_VERSION "0.1.2"
+#define AUC_VERSION "0.1.4"
#include <fcntl.h>
#include <dlfcn.h>
static int retry, imagebuilder, building, ibready;
static char *board_name = NULL;
static char *target = NULL;
-static char *distribution = NULL, *version = NULL;
+static char *distribution = NULL, *version = NULL, *revision = NULL;
static int uptodate;
static char *filename = NULL;
static int rc;
enum {
RELEASE_DISTRIBUTION,
RELEASE_VERSION,
+ RELEASE_REVISION,
RELEASE_TARGET,
__RELEASE_MAX,
};
static const struct blobmsg_policy release_policy[__RELEASE_MAX] = {
[RELEASE_DISTRIBUTION] = { .name = "distribution", .type = BLOBMSG_TYPE_STRING },
[RELEASE_VERSION] = { .name = "version", .type = BLOBMSG_TYPE_STRING },
+ [RELEASE_REVISION] = { .name = "revision", .type = BLOBMSG_TYPE_STRING },
[RELEASE_TARGET] = { .name = "target", .type = BLOBMSG_TYPE_STRING },
};
*/
enum {
UPGTEST_CODE,
- UPGTEST_STDOUT,
+ UPGTEST_STDERR,
__UPGTEST_MAX,
};
static const struct blobmsg_policy upgtest_policy[__UPGTEST_MAX] = {
[UPGTEST_CODE] = { .name = "code", .type = BLOBMSG_TYPE_INT32 },
- [UPGTEST_STDOUT] = { .name = "stdout", .type = BLOBMSG_TYPE_STRING },
+ [UPGTEST_STDERR] = { .name = "stderr", .type = BLOBMSG_TYPE_STRING },
};
static const struct blobmsg_policy image_policy[__IMAGE_MAX] = {
[IMAGE_REQHASH] = { .name = "request_hash", .type = BLOBMSG_TYPE_STRING },
- [IMAGE_URL] = { .name = "url", .type = BLOBMSG_TYPE_STRING },
[IMAGE_FILES] = { .name = "files", .type = BLOBMSG_TYPE_STRING },
[IMAGE_SYSUPGRADE] = { .name = "sysupgrade", .type = BLOBMSG_TYPE_STRING },
};
blobmsg_parse(release_policy, __RELEASE_MAX, rel,
blobmsg_data(tb[BOARD_RELEASE]), blobmsg_data_len(tb[BOARD_RELEASE]));
- if (!rel[RELEASE_TARGET]) {
- fprintf(stderr, "No target received\n");
+ if (!rel[RELEASE_TARGET] ||
+ !rel[RELEASE_DISTRIBUTION] ||
+ !rel[RELEASE_VERSION] ||
+ !rel[RELEASE_REVISION]) {
+ fprintf(stderr, "No release information received\n");
rc=-1;
return;
}
target = strdup(blobmsg_get_string(rel[RELEASE_TARGET]));
-
distribution = strdup(blobmsg_get_string(rel[RELEASE_DISTRIBUTION]));
version = strdup(blobmsg_get_string(rel[RELEASE_VERSION]));
+ revision = strdup(blobmsg_get_string(rel[RELEASE_REVISION]));
blobmsg_add_string(buf, "distro", distribution);
blobmsg_add_string(buf, "target", target);
blobmsg_add_string(buf, "version", version);
+ blobmsg_add_string(buf, "revision", revision);
}
/*
}
*valid = (blobmsg_get_u32(tb[UPGTEST_CODE]) == 0)?1:0;
- if (*valid == 0)
- fprintf(stderr, "%s", blobmsg_get_string(tb[UPGTEST_STDOUT]));
+
+ if (tb[UPGTEST_STDERR])
+ fprintf(stderr, "%s", blobmsg_get_string(tb[UPGTEST_STDERR]));
+ else if (*valid == 0)
+ fprintf(stderr, "image verification failed\n");
+ else
+ fprintf(stderr, "image verification succeeded\n");
};
/**
char *newversion = NULL;
struct blob_attr *tb[__IMAGE_MAX];
struct blob_attr *tbc[__CHECK_MAX];
- char *tmp;
struct stat imgstat;
int check_only = 0;
- int ignore_sig = 0;
unsigned char argc = 1;
snprintf(user_agent, sizeof(user_agent), "%s (%s)", argv[0], AUC_VERSION);
if (!strncmp(argv[argc], "-c", 3))
check_only = 1;
- if (!strncmp(argv[argc], "-F", 3))
- ignore_sig = 1;
-
argc++;
};
goto freeboard;
}
- strncpy(url, blobmsg_get_string(tb[IMAGE_SYSUPGRADE]), sizeof(url));
+ if (!tb[IMAGE_FILES]) {
+ if (!rc) {
+ fprintf(stderr, "no path to image files returned\n");
+ rc=-1;
+ }
+ goto freeboard;
+ }
+
+ snprintf(url, sizeof(url), "%s/%s/%s", serverurl,
+ blobmsg_get_string(tb[IMAGE_FILES]),
+ blobmsg_get_string(tb[IMAGE_SYSUPGRADE]));
server_request(url, NULL, NULL);
}
valid = 0;
- ubus_invoke(ctx, id, "upgrade_test", NULL, upgtest_cb, &valid, 3000);
+ ubus_invoke(ctx, id, "upgrade_test", NULL, upgtest_cb, &valid, 15000);
if (!valid) {
- fprintf(stdout, "image verification failed\n");
rc=-1;
goto freeboard;
}
+ fprintf(stderr, "invoking sysupgrade\n");
+
blobmsg_add_u8(&upgbuf, "keep", 1);
- fprintf(stdout, "invoking sysupgrade\n");
- ubus_invoke(ctx, id, "upgrade_start", upgbuf.head, NULL, NULL, 3000);
+ ubus_invoke(ctx, id, "upgrade_start", upgbuf.head, NULL, NULL, 120000);
freeboard:
free(board_name);
--- /dev/null
+# 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)))
--- /dev/null
+# 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)))
--- /dev/null
+
+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'
--- /dev/null
+#!/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'
+}
--- /dev/null
+# 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)))
--- /dev/null
+## 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]
--- /dev/null
+#!/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"
+}
TITLE:=bmx7-dnsupdate
MAINTAINER:=Paul Spooren <spooren@informatik.uni-leipzig.de>
DEPENDS:=+bmx7 +bmx7-json inotifywait jshn
+ PKGARCH:=all
endef
define Build/Compile
include $(TOPDIR)/rules.mk
PKG_NAME:=bonnie++
-PKG_VERSION:=1.97.3
-PKG_RELEASE:=2
+PKG_VERSION:=1.98
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=https://www.coker.com.au/bonnie++/
-PKG_HASH:=e27b386ae0dc054fa7b530aab6bdead7aea6337a864d1f982bc9ebacb320746e
+PKG_HASH:=6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04
PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
PKG_LICENSE:=GPL-2.0
endef
ifeq ($(CONFIG_USE_UCLIBCXX),y)
-TARGET_LDFLAGS +=-nodefaultlibs
+TARGET_LDFLAGS += -nodefaultlibs
endif
-TARGET_CXXFLAGS +=-fno-rtti
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- TARGET_CXX="$(TARGET_CXX)" \
- TARGET_LINK="$(TARGET_CXX)" \
- MORECFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all
-endef
+TARGET_CXXFLAGS += -fno-rtti -flto
define Package/bonniexx/install
$(INSTALL_DIR) $(1)/usr/bin
+++ /dev/null
-Index: bonnie++-1.97.3/configure
-===================================================================
---- bonnie++-1.97.3.orig/configure
-+++ bonnie++-1.97.3/configure
-@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj
-
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5 ; }
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-Index: bonnie++-1.97.3/Makefile
-===================================================================
---- bonnie++-1.97.3.orig/Makefile
-+++ bonnie++-1.97.3/Makefile
-@@ -1,5 +1,7 @@
- EXES=bonnie++ zcav getc_putc getc_putc_helper
- EXE=bon_csv2html generate_randfile
-+TARGET_CXX=g++
-+TARGET_LINK=g++
-
- all: $(EXE) $(EXES)
-
-@@ -10,8 +12,8 @@ eprefix=${prefix}
- #MORE_WARNINGS=-Weffc++
- WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
- CFLAGS=-O2 -DNDEBUG $(WFLAGS) $(MORECFLAGS)
--CXX=g++ $(CFLAGS)
--LINK=g++
-+CXX=$(TARGET_CXX) $(CFLAGS)
-+LINK=$(TARGET_LINK)
- THREAD_LFLAGS=-lpthread
-
- INSTALL=/usr/bin/install -c
--- a/bon_file.cpp
+++ b/bon_file.cpp
-@@ -464,25 +464,37 @@ int COpenTest::delete_sequential(BonTime
+@@ -469,25 +469,37 @@ int COpenTest::delete_sequential(BonTime
}
if(m_number_directories != 1)
{
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,12 +7,6 @@ SCRIPTS=bon_csv2txt
+
+ prefix=@prefix@
+ eprefix=@exec_prefix@
+-#MORE_WARNINGS=-Weffc++
+-WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
+-CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
+-CXX=@CXX@ $(CFLAGS)
+-LINK=@CXX@
+-THREAD_LFLAGS=@thread_ldflags@
+
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+@@ -34,22 +28,22 @@ GETCHSRC=getc_putc_helper.cpp duration.cpp
+ GETCHOBJS=$(GETCHSRC:.cpp=.o)
+
+ bonnie++: $(BONOBJS)
+- $(LINK) -o bonnie++ $(BONOBJS) $(THREAD_LFLAGS)
++ $(CXX) $(CXXFLAGS) -o bonnie++ $(BONOBJS)
+
+ zcav: $(ZCAVOBJS)
+- $(LINK) -o zcav $(ZCAVOBJS) $(THREAD_LFLAGS)
++ $(CXX) $(CXXFLAGS) -o zcav $(ZCAVOBJS)
+
+ getc_putc: $(GETCOBJS) getc_putc_helper
+- $(LINK) -o getc_putc $(GETCOBJS) $(THREAD_LFLAGS)
++ $(CXX) $(CXXFLAGS) -o getc_putc $(GETCOBJS)
+
+ getc_putc_helper: $(GETCHOBJS)
+- $(CXX) -o getc_putc_helper $(GETCHOBJS)
++ $(CXX) $(CXXFLAGS) -o getc_putc_helper $(GETCHOBJS)
+
+ bon_csv2html: bon_csv2html.o
+- $(LINK) bon_csv2html.o -o bon_csv2html
++ $(CXX) $(CXXFLAGS) bon_csv2html.o -o bon_csv2html
+
+ generate_randfile: generate_randfile.o
+- $(LINK) generate_randfile.o -o generate_randfile
++ $(CXX) $(CXXFLAGS) generate_randfile.o -o generate_randfile
+
+ install-bin: $(EXE) $(EXES)
+ mkdir -p $(eprefix)/bin $(eprefix)/sbin
+@@ -63,7 +57,7 @@ install: install-bin
+ @INSTALL_DATA@ $(MAN8) @mandir@/man8
+
+ %.o: %.cpp
+- $(CXX) -c $<
++ $(CXX) $(CXXFLAGS) -c $<
+
+ clean:
+ rm -f $(EXE) $(EXES) *.o build-stamp install-stamp
+--- a/configure.in
++++ b/configure.in
+@@ -31,7 +31,6 @@ fi
+
+ dnl Checks for programs.
+ AC_LANG_CPLUSPLUS
+-AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_CXXCPP
+ AC_PROG_INSTALL
+@@ -66,7 +65,7 @@ AC_SUBST(linux_pthread)
+ AC_TRY_COMPILE([#define _GNU_SOURCE
+ #include <pthread.h>
+ ] , [pthread_mutexattr_t attr;
+- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);]
+ , linux_pthread="yes")
+ if [[ -n "$linux_pthread" ]]; then
+ linux_pthread="#define LINUX_PTHREAD"
+@@ -83,7 +82,7 @@ void * thread_func(void * param) { return NULL; }
+ , thread_ldflags="-pthread")
+
+ AC_SUBST(large_file)
+-AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
++AC_TRY_COMPILE([#ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #include <stdio.h>
+++ /dev/null
---- a/configure.in
-+++ b/configure.in
-@@ -31,7 +31,6 @@ fi
-
- dnl Checks for programs.
- AC_LANG_CPLUSPLUS
--AC_PROG_CC
- AC_PROG_CXX
- AC_PROG_CXXCPP
- AC_PROG_INSTALL
-@@ -60,13 +59,13 @@ if [[ -n "$snprintf" ]]; then
- snprintf="#define NO_SNPRINTF"
- fi
-
--AC_CHECK_HEADERS(algorithm algo.h algo)
-+AC_CHECK_HEADERS(algorithm)
-
- AC_SUBST(linux_pthread)
- AC_TRY_COMPILE([#define _GNU_SOURCE
- #include <pthread.h>
- ] , [pthread_mutexattr_t attr;
-- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
-+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);]
- , linux_pthread="yes")
- if [[ -n "$linux_pthread" ]]; then
- linux_pthread="#define LINUX_PTHREAD"
-@@ -83,7 +82,7 @@ void * thread_func(void * param) { return NULL; }
- , thread_ldflags="-pthread")
-
- AC_SUBST(large_file)
--AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
-+AC_TRY_COMPILE([#ifndef _LARGEFILE64_SOURCE
- #define _LARGEFILE64_SOURCE
- #endif
- #include <stdio.h>
--- /dev/null
+if PACKAGE_btrfs-progs
+
+config BTRFS_PROGS_ZSTD
+ bool "Build with zstd support"
+ default n
+ help
+ This allows you to manage BTRFS with zstd compression
+
+endif
include $(TOPDIR)/rules.mk
PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.20.1
-PKG_RELEASE:=2
+PKG_VERSION:=4.20.2
+PKG_RELEASE:=3
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
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
- DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
+ DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
TITLE:=Btrfs filesystems utilities
URL:=https://btrfs.wiki.kernel.org/
endef
GPL and open for contribution from anyone.
endef
+define Package/btrfs-progs/config
+ source "$(SOURCE)/Config.in"
+endef
+
progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
btrfs-select-super btrfstune mkfs.btrfs
--disable-backtrace \
--disable-convert \
--disable-documentation \
- --disable-python \
- --disable-zstd
+ --disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
PKG_NAME:=collectd
PKG_VERSION:=5.8.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \
--- /dev/null
+From eeabc41e703f39cae0ad7eb8a596045a5a2f25b4 Mon Sep 17 00:00:00 2001
+From: cekstam <christian.ekstam@gmail.com>
+Date: Tue, 27 Mar 2018 13:15:28 +0200
+Subject: [PATCH 1/3] Add scale and shift to modbus plugin
+
+Adding a Scale and Shift parameter to the modbus plugin in order to correct amplifed data
+---
+ src/collectd.conf.pod | 10 ++++++++++
+ src/modbus.c | 18 ++++++++++++++----
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+--- a/src/collectd.conf.pod
++++ b/src/collectd.conf.pod
+@@ -4169,6 +4169,16 @@ supported.
+ Sets the type instance to use when dispatching the value to I<collectd>. If
+ unset, an empty string (no type instance) is used.
+
++=item B<Scale> I<Value>
++
++The values taken from collectd are multiplied by I<Value>. The field is optional
++and the default is B<1.0>.
++
++=item B<Shift> I<Value>
++
++I<Value> is added to values from collectd after they have been multiplied by
++B<Scale> value. The field is optional and the default value is B<0.0>.
++
+ =back
+
+ =item E<lt>B<Host> I<Name>E<gt> blocks
+--- a/src/modbus.c
++++ b/src/modbus.c
+@@ -105,6 +105,8 @@ struct mb_data_s /* {{{ */
+ mb_mreg_type_t modbus_register_type;
+ char type[DATA_MAX_NAME_LEN];
+ char instance[DATA_MAX_NAME_LEN];
++ double scale;
++ double shift;
+
+ mb_data_t *next;
+ }; /* }}} */
+@@ -395,13 +397,13 @@ static int mb_init_connection(mb_host_t
+ #define CAST_TO_VALUE_T(ds, vt, raw) \
+ do { \
+ if ((ds)->ds[0].type == DS_TYPE_COUNTER) \
+- (vt).counter = (counter_t)(raw); \
++ (vt).counter = (((counter_t)(raw) * ds[0].scale) + ds[0].shift); \
+ else if ((ds)->ds[0].type == DS_TYPE_GAUGE) \
+- (vt).gauge = (gauge_t)(raw); \
++ (vt).gauge = (((gauge_t)(raw) * ds[0].scale) + ds[0].shift); \
+ else if ((ds)->ds[0].type == DS_TYPE_DERIVE) \
+- (vt).derive = (derive_t)(raw); \
++ (vt).derive = (((derive_t)(raw) * ds[0].scale) + ds[0].shift); \
+ else /* if (ds->ds[0].type == DS_TYPE_ABSOLUTE) */ \
+- (vt).absolute = (absolute_t)(raw); \
++ (vt).absolute = (((absolute_t)(raw) * ds[0].scale) + ds[0].shift); \
+ } while (0)
+
+ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
+@@ -723,6 +725,8 @@ static int mb_config_add_data(oconfig_it
+ data.name = NULL;
+ data.register_type = REG_TYPE_UINT16;
+ data.next = NULL;
++ data.scale = 1;
++ data.shift = 0;
+
+ status = cf_util_get_string(ci, &data.name);
+ if (status != 0)
+@@ -736,6 +740,12 @@ static int mb_config_add_data(oconfig_it
+ else if (strcasecmp("Instance", child->key) == 0)
+ status = cf_util_get_string_buffer(child, data.instance,
+ sizeof(data.instance));
++ else if (strcasecmp("Scale", child->key) == 0)
++ status = cf_util_get_string_buffer(child, data.scale,
++ sizeof(data.scale));
++ else if (strcasecmp("Shift", child->key) == 0)
++ status = cf_util_get_string_buffer(child, data.shift,
++ sizeof(data.shift));
+ else if (strcasecmp("RegisterBase", child->key) == 0)
+ status = cf_util_get_int(child, &data.register_base);
+ else if (strcasecmp("RegisterType", child->key) == 0) {
--- /dev/null
+From e596496f5c783f4bba85c4d559502c98e4050465 Mon Sep 17 00:00:00 2001
+From: cekstam <christian.ekstam@gmail.com>
+Date: Tue, 27 Mar 2018 14:11:52 +0200
+Subject: [PATCH 2/3] correcting all the wrongs
+
+, data->scale, data->shift
+---
+ src/modbus.c | 32 +++++++++++++++-----------------
+ 1 file changed, 15 insertions(+), 17 deletions(-)
+
+--- a/src/modbus.c
++++ b/src/modbus.c
+@@ -394,16 +394,16 @@ static int mb_init_connection(mb_host_t
+ } /* }}} int mb_init_connection */
+ #endif /* !LEGACY_LIBMODBUS */
+
+-#define CAST_TO_VALUE_T(ds, vt, raw) \
++#define CAST_TO_VALUE_T(ds, vt, raw, scale, shift) \
+ do { \
+ if ((ds)->ds[0].type == DS_TYPE_COUNTER) \
+- (vt).counter = (((counter_t)(raw) * ds[0].scale) + ds[0].shift); \
++ (vt).counter = (((counter_t)(raw) * scale) + shift); \
+ else if ((ds)->ds[0].type == DS_TYPE_GAUGE) \
+- (vt).gauge = (((gauge_t)(raw) * ds[0].scale) + ds[0].shift); \
++ (vt).gauge = (((gauge_t)(raw) * scale) + shift); \
+ else if ((ds)->ds[0].type == DS_TYPE_DERIVE) \
+- (vt).derive = (((derive_t)(raw) * ds[0].scale) + ds[0].shift); \
++ (vt).derive = (((derive_t)(raw) * scale) + shift); \
+ else /* if (ds->ds[0].type == DS_TYPE_ABSOLUTE) */ \
+- (vt).absolute = (((absolute_t)(raw) * ds[0].scale) + ds[0].shift); \
++ (vt).absolute = (((absolute_t)(raw) * scale) + shift); \
+ } while (0)
+
+ static int mb_read_data(mb_host_t *host, mb_slave_t *slave, /* {{{ */
+@@ -532,7 +532,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned float value is %g",
+ (double)float_value);
+
+- CAST_TO_VALUE_T(ds, vt, float_value);
++ CAST_TO_VALUE_T(ds, vt, float_value, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else if (data->register_type == REG_TYPE_FLOAT_CDAB) {
+ float float_value;
+@@ -543,7 +543,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned float value is %g",
+ (double)float_value);
+
+- CAST_TO_VALUE_T(ds, vt, float_value);
++ CAST_TO_VALUE_T(ds, vt, float_value, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else if (data->register_type == REG_TYPE_INT32) {
+ union {
+@@ -557,7 +557,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned int32 value is %" PRIi32,
+ v.i32);
+
+- CAST_TO_VALUE_T(ds, vt, v.i32);
++ CAST_TO_VALUE_T(ds, vt, v.i32, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else if (data->register_type == REG_TYPE_INT32_CDAB) {
+ union {
+@@ -571,7 +571,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned int32 value is %" PRIi32,
+ v.i32);
+
+- CAST_TO_VALUE_T(ds, vt, v.i32);
++ CAST_TO_VALUE_T(ds, vt, v.i32, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else if (data->register_type == REG_TYPE_INT16) {
+ union {
+@@ -586,7 +586,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned int16 value is %" PRIi16,
+ v.i16);
+
+- CAST_TO_VALUE_T(ds, vt, v.i16);
++ CAST_TO_VALUE_T(ds, vt, v.i16, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else if (data->register_type == REG_TYPE_UINT32) {
+ uint32_t v32;
+@@ -597,7 +597,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned uint32 value is %" PRIu32,
+ v32);
+
+- CAST_TO_VALUE_T(ds, vt, v32);
++ CAST_TO_VALUE_T(ds, vt, v32, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else if (data->register_type == REG_TYPE_UINT32_CDAB) {
+ uint32_t v32;
+@@ -608,7 +608,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned uint32 value is %" PRIu32,
+ v32);
+
+- CAST_TO_VALUE_T(ds, vt, v32);
++ CAST_TO_VALUE_T(ds, vt, v32, data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ } else /* if (data->register_type == REG_TYPE_UINT16) */
+ {
+@@ -618,7 +618,7 @@ static int mb_read_data(mb_host_t *host,
+ "Returned uint16 value is %" PRIu16,
+ values[0]);
+
+- CAST_TO_VALUE_T(ds, vt, values[0]);
++ CAST_TO_VALUE_T(ds, vt, values[0], data->scale, data->shift);
+ mb_submit(host, slave, data, vt);
+ }
+
+@@ -741,11 +741,9 @@ static int mb_config_add_data(oconfig_it
+ status = cf_util_get_string_buffer(child, data.instance,
+ sizeof(data.instance));
+ else if (strcasecmp("Scale", child->key) == 0)
+- status = cf_util_get_string_buffer(child, data.scale,
+- sizeof(data.scale));
++ status = cf_util_get_double(child, &data.scale);
+ else if (strcasecmp("Shift", child->key) == 0)
+- status = cf_util_get_string_buffer(child, data.shift,
+- sizeof(data.shift));
++ status = cf_util_get_double(child, &data.shift);
+ else if (strcasecmp("RegisterBase", child->key) == 0)
+ status = cf_util_get_int(child, &data.register_base);
+ else if (strcasecmp("RegisterType", child->key) == 0) {
--- /dev/null
+From a00ab52931a587cf29c53a945e9295b4d7fe41ba Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Thu, 28 Mar 2019 01:52:04 +0100
+Subject: [PATCH] Add support for RS485 to modbus plugin
+
+Allow setting up RS485 mode for Modbus-RTU
+---
+ src/collectd.conf.pod | 6 +++++
+ src/modbus.c | 55 +++++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 57 insertions(+), 4 deletions(-)
+
+--- a/src/collectd.conf.pod
++++ b/src/collectd.conf.pod
+@@ -4234,6 +4234,12 @@ For Modbus/RTU, specifies the path to th
+ For Modbus/RTU, specifies the baud rate of the serial device.
+ Note, connections currently support only 8/N/1.
+
++=item B<UARTType> I<UARTType>
++
++For Modbus/RTU, specifies the type of the serial device.
++RS232, RS422 and RS485 are supported. Defaults to RS232.
++Available only on Linux systems with libmodbus>=2.9.4.
++
+ =item B<Interval> I<Interval>
+
+ Sets the interval (in seconds) in which the values will be collected from this
+--- a/src/modbus.c
++++ b/src/modbus.c
+@@ -95,6 +95,12 @@ enum mb_conntype_e /* {{{ */
+ MBCONN_RTU }; /* }}} */
+ typedef enum mb_conntype_e mb_conntype_t;
+
++enum mb_uarttype_e /* {{{ */
++{ UARTTYPE_RS232,
++ UARTTYPE_RS422,
++ UARTTYPE_RS485 }; /* }}} */
++typedef enum mb_uarttype_e mb_uarttype_t;
++
+ struct mb_data_s;
+ typedef struct mb_data_s mb_data_t;
+ struct mb_data_s /* {{{ */
+@@ -124,8 +130,9 @@ struct mb_host_s /* {{{ */
+ char host[DATA_MAX_NAME_LEN];
+ char node[NI_MAXHOST]; /* TCP hostname or RTU serial device */
+ /* char service[NI_MAXSERV]; */
+- int port; /* for Modbus/TCP */
+- int baudrate; /* for Modbus/RTU */
++ int port; /* for Modbus/TCP */
++ int baudrate; /* for Modbus/RTU */
++ mb_uarttype_t uarttype; /* UART type for Modbus/RTU */
+ mb_conntype_t conntype;
+ cdtime_t interval;
+
+@@ -390,6 +397,22 @@ static int mb_init_connection(mb_host_t
+ return status;
+ }
+
++#if defined(linux) && LIBMODBUS_VERSION_CHECK(2, 9, 4)
++ switch (host->uarttype) {
++ case UARTTYPE_RS485:
++ if (modbus_rtu_set_serial_mode(host->connection, MODBUS_RTU_RS485))
++ DEBUG("Modbus plugin: Setting RS485 mode failed.");
++ break;
++ case UARTTYPE_RS422:
++ /* libmodbus doesn't say anything about full-duplex symmetric RS422 UART */
++ break;
++ case UARTTYPE_RS232:
++ break;
++ default:
++ DEBUG("Modbus plugin: Invalid UART type!.");
++ }
++#endif /* defined(linux) && LIBMODBUS_VERSION_CHECK(2, 9, 4) */
++
+ return 0;
+ } /* }}} int mb_init_connection */
+ #endif /* !LEGACY_LIBMODBUS */
+@@ -951,11 +974,35 @@ static int mb_config_add_host(oconfig_it
+ status = -1;
+ } else if (strcasecmp("Device", child->key) == 0) {
+ status = cf_util_get_string_buffer(child, host->node, sizeof(host->node));
+- if (status == 0)
++ if (status == 0) {
+ host->conntype = MBCONN_RTU;
++ host->uarttype = UARTTYPE_RS232;
++ }
+ } else if (strcasecmp("Baudrate", child->key) == 0)
+ status = cf_util_get_int(child, &host->baudrate);
+- else if (strcasecmp("Interval", child->key) == 0)
++ else if (strcasecmp("UARTType", child->key) == 0) {
++#if defined(linux) && !LEGACY_LIBMODBUS && LIBMODBUS_VERSION_CHECK(2, 9, 4)
++ char buffer[NI_MAXHOST];
++ status = cf_util_get_string_buffer(child, buffer, sizeof(buffer));
++ if (status != 0)
++ break;
++ if (strncmp(buffer, "RS485", 6) == 0)
++ host->uarttype = UARTTYPE_RS485;
++ else if (strncmp(buffer, "RS422", 6) == 0)
++ host->uarttype = UARTTYPE_RS422;
++ else if (strncmp(buffer, "RS232", 6) == 0)
++ host->uarttype = UARTTYPE_RS232;
++ else {
++ ERROR("Modbus plugin: The UARTType \"%s\" is unknown.", buffer);
++ status = -1;
++ break;
++ }
++#else
++ ERROR("Modbus plugin: Option `UARTType' not supported. Please "
++ "upgrade libmodbus to at least 2.9.4");
++ return -1;
++#endif
++ } else if (strcasecmp("Interval", child->key) == 0)
+ status = cf_util_get_cdtime(child, &host->interval);
+ else if (strcasecmp("Slave", child->key) == 0)
+ /* Don't set status: Gracefully continue if a slave fails. */
PKG_NAME:=device-observatory
PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
-
-PKG_LICENSE:=GPL-3.0+
+PKG_RELEASE:=3
PKG_SOURCE_URL:=https://codeload.github.com/mwarning/device-observatory/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=83b3f362f154a427abbd3af31b3c2dda9983cdc15f6b833d804727ef0fbdc72e
+PKG_LICENSE:=GPL-3.0+
+PKG_BUILD_DEPENDS:=vim/host
+
include $(INCLUDE_DIR)/package.mk
define Package/device-observatory
PKG_NAME:=fio
PKG_VERSION:=3.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
--- /dev/null
+From ec4b65d9c9180101807f598c9edecb462f54261a Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 31 Mar 2019 21:19:03 -0700
+Subject: [PATCH] arch: fix build breakage on armv6 again
+
+6K was missing from the defines.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ arch/arch-arm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arch-arm.h b/arch/arch-arm.h
+index fc1c4844..78cb2ebe 100644
+--- a/arch/arch-arm.h
++++ b/arch/arch-arm.h
+@@ -7,7 +7,7 @@
+ || defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5E__)\
+ || defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) \
+ || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
+- || defined(__ARM_ARCH_6KZ__)
++ || defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6K__)
+ #define nop __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t")
+ #define read_barrier() __asm__ __volatile__ ("" : : : "memory")
+ #define write_barrier() __asm__ __volatile__ ("" : : : "memory")
+--
+2.17.1
+
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
PKG_NAME:=gammu
PKG_VERSION:=1.39.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
mkdir -p $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
endef
define Package/gammu/install
--- /dev/null
+#
+# Copyright (C) 2018 Lucian Cristian
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gddrescue
+PKG_VERSION:=1.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz
+PKG_SOURCE_URL:=http://http.debian.net/debian/pool/main/g/$(PKG_NAME)
+PKG_HASH:=5831d7e24070bc700d8f22deaeec56af1149392ce30ae67254096eaf8c9169ab
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gddrescue
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Data recovery tool
+ URL:=https://www.gnu.org/software/ddrescue/
+ DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/gddrescue/description
+ GNU ddrescue is a data recovery tool. It copies data from one file
+ or block device (hard disc, cdrom, etc) to another, trying to rescue
+ the good parts first in case of read errors.
+endef
+
+CONFIGURE_ARGS += \
+ CXX="$(TARGET_CXX)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ CXXFLAGS="$(TARGET_CXXFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+
+define Package/gddrescue/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ddrescue $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ddrescuelog $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,gddrescue))
--- /dev/null
+--- a/block.h
++++ b/block.h
+@@ -34,6 +34,7 @@ class Block
+ { if( size_ < 0 || size_ > LLONG_MAX - pos_ ) size_ = LLONG_MAX - pos_; }
+
+ public:
++ Block() {} // default constructor
+ Block( const long long p, const long long s ) : pos_( p ), size_( s )
+ { if( p < 0 ) { pos_ = 0; if( s > 0 ) size_ -= std::min( s, -p ); }
+ fix_size(); }
+@@ -102,6 +103,7 @@ private:
+ Status status_;
+
+ public:
++ Sblock() {} // default constructor
+ Sblock( const Block & b, const Status st )
+ : Block( b ), status_( st ) {}
+ Sblock( const long long p, const long long s, const Status st )
+--- a/mapbook.cc
++++ b/mapbook.cc
+@@ -19,6 +19,7 @@
+
+ #include <algorithm>
+ #include <cerrno>
++#include <cctype>
+ #include <climits>
+ #include <cstdio>
+ #include <cstdlib>
\ No newline at end of file
PKG_NAME:=gpsd
PKG_VERSION:=3.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
validate_section_gpsd()
{
- uci_validate_section gpsd gpsd "${1}" \
+ uci_load_validate gpsd gpsd "$1" "$2" \
'enabled:bool:1' \
'device:string' \
'listen_globally:bool:0' \
gpsd_instance()
{
- local device enabled listen_globally port
-
- validate_section_gpsd "${1}" || {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
- [ "${enabled}" = "0" ] && return 1
+ [ "$enabled" = "0" ] && return 1
procd_open_instance
procd_set_param command "$PROG" -N -n
- [ "${listen_globally}" -ne 0 ] && procd_append_param command -G
- procd_append_param command -S "${port}"
- procd_append_param command "${device}"
+ [ "$listen_globally" -ne 0 ] && procd_append_param command -G
+ procd_append_param command -S "$port"
+ procd_append_param command "$device"
procd_set_param respawn
procd_close_instance
start_service()
{
- config_load "${NAME}"
- config_foreach gpsd_instance gpsd
+ config_load "$NAME"
+ config_foreach validate_section_gpsd gpsd gpsd_instance
+}
+
+service_triggers() {
+ procd_add_reload_trigger "$NAME"
+ procd_add_validation validate_section_gpsd
}
PKG_NAME:=hd-idle
PKG_VERSION:=1.05
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Lim Guo Wei <limguowei@gmail.com>
PKG_LICENSE:=GPL-2.0
validate_section_hdidle()
{
- uci_validate_section hd-idle hd-idle "${1}" \
+ uci_load_validate hd-idle hd-idle "$1" "$2" \
'disk:string' \
'enabled:bool' \
'idle_time_interval:uinteger:10' \
}
hdidle_append() {
- local disk enabled idle_time_interval idle_time_unit
-
- validate_section_hdidle "${1}" || return
+ [ "$2" = 0 ] || return
[ "$enabled" -gt 0 ] || return
config_load "hd-idle"
numdisks="0"
- config_foreach hdidle_append "hd-idle"
+ config_foreach validate_section_hdidle "hd-idle" hdidle_append
if [ "$numdisks" -gt 0 ]; then
procd_set_param respawn
procd_close_instance
fi
}
+
+service_triggers() {
+ procd_add_reload_trigger "hd-idle"
+ procd_add_validation validate_section_hdidle
+}
PKG_NAME:=i2c-tools
PKG_VERSION:=4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
PKG_HASH:=57b219efd183795bd545dd5a60d9eabbe9dcb6f8fb92bc7ba2122b87f98527d5
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING COPYING.LGPL
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-i2c-tools-$(PKG_VERSION)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdump $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cset $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cget $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2ctransfer $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,libi2c))
TARGET_CFLAGS += -fno-ipa-sra
endif
-TARGET_CFLAGS += -std=c99
+TARGET_CFLAGS += -std=c99 -D_GNU_SOURCE
CONFIGURE_ARGS+= \
--disable-docs \
endef
CONFIGURE_ARGS += \
- --disable-gnutls \
--disable-apparmor \
+ --disable-cgmanager \
--disable-doc \
--disable-examples \
+ --disable-gnutls \
+ --disable-selinux \
+ --disable-python \
--enable-lua=yes \
--with-lua-pc="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc"
include $(TOPDIR)/rules.mk
PKG_NAME:=moreutils
-PKG_VERSION:=0.62
+PKG_VERSION:=0.63
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://git.kitenet.net/index.cgi/moreutils.git/snapshot
-PKG_HASH:=812ac4e9e09dbfb812c64fb1929ed5275c279312d78e3fe1c30b01380c902db9
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
+PKG_HASH:=4fc86d56a8a276a0cec71cdabda5ccca50c7a44a2a1ccd888476741d1ce6831d
PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
PKG_LICENSE:=GPL-2.0
include $(TOPDIR)/rules.mk
PKG_NAME:=nano
-PKG_VERSION:=3.2
+PKG_VERSION:=4.0
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=d12773af3589994b2e4982c5792b07c6240da5b86c5aef2103ab13b401fe6349
+PKG_HASH:=1e2fcfea35784624a7d86785768b772d58bb3995d1aec9176a27a113b1e9bac3
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=ncdu
-PKG_VERSION:=1.13
+PKG_VERSION:=1.14
PKG_RELEASE=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.yorhel.nl/download
-PKG_HASH:=f4d9285c38292c2de05e444d0ba271cbfe1a705eee37c2b23ea7c448ab37255a
+PKG_HASH:=c694783aab21e27e64baad314b7c1ff34541bfa219fe9645ef6780f1c5558c44
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_NAME:=open-vm-tools
PKG_VERSION:=10.3.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-10430147.tar.gz
PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
--without-x \
--without-gtk2 \
--without-gtk3 \
- --without-xerces
+ --without-xerces \
+ --enable-resolutionkms=no
define Package/open-vm-tools/install
$(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libresolutionKMS.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
--- /dev/null
+--- a/vmhgfs-fuse/fsutil.h
++++ b/vmhgfs-fuse/fsutil.h
+@@ -32,9 +32,7 @@
+ #include "hgfsProto.h"
+ #include <fuse.h>
+
+-#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
+ typedef long long loff_t;
+-#endif
+
+ /*
+ * Struct used to pass around attributes.
PKG_NAME:=openocd
PKG_SOURCE_VERSION:=0.10.0
PKG_VERSION:=v$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=@SF/openocd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
+PKG_CPE_ID:=cpe:/a:openocd:open_on-chip_debugger
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
--- /dev/null
+Subject: Bind to IPv4 localhost by default
+Origin: other, http://openocd.zylin.com/#/c/4331/2
+Last-Update: 2018-01-18
+
+From f8630b0b15e30dc6c51270006a4e075c79cf466a Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Sat, 13 Jan 2018 16:22:10 +0300
+Subject: [PATCH] server: bind to IPv4 localhost by default
+
+Since OpenOCD basically allows to perform arbitrary actions on behalf of
+the running user, it makes sense to restrict the exposure by default.
+
+If you need network connectivity and your environment is safe enough,
+use "bindto 0.0.0.0" to switch to the old behaviour.
+
+Change-Id: I4a4044b90d0ecb30118cea96fc92a7bcff0924e0
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+
+diff --git a/doc/openocd.texi b/doc/openocd.texi
+index 7f5b72e..5c7f465 100644
+--- a/doc/openocd.texi
++++ b/doc/openocd.texi
+@@ -7017,7 +7017,7 @@
+
+ @deffn Command bindto [name]
+ Specify address by name on which to listen for incoming TCP/IP connections.
+-By default, OpenOCD will listen on all available interfaces.
++By default, OpenOCD will listen on the loopback interface only.
+ @end deffn
+
+ @anchor{targetstatehandling}
+diff --git a/src/server/server.c b/src/server/server.c
+index 1e52e97..ea1e898 100644
+--- a/src/server/server.c
++++ b/src/server/server.c
+@@ -259,7 +259,7 @@
+ c->sin.sin_family = AF_INET;
+
+ if (bindto_name == NULL)
+- c->sin.sin_addr.s_addr = INADDR_ANY;
++ c->sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ else {
+ hp = gethostbyname(bindto_name);
+ if (hp == NULL) {
--- /dev/null
+Subject: Prevent some forms of Cross Protocol Scripting attacks
+Author: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Origin: other, http://openocd.zylin.com/#/c/4335/
+Bug-Debian: https://bugs.debian.org/887488
+Last-Update: 2018-01-18
+
+From 3a223ca3ebc7ac24d7726a0cd58e5695bc813657 Mon Sep 17 00:00:00 2001
+From: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Date: Sat, 13 Jan 2018 21:00:47 +0100
+Subject: [PATCH] CVE-2018-5704: Prevent some forms of Cross Protocol Scripting attacks
+
+OpenOCD can be targeted by a Cross Protocol Scripting attack from
+a web browser running malicious code, such as the following PoC:
+
+var x = new XMLHttpRequest();
+x.open("POST", "http://127.0.0.1:4444", true);
+x.send("exec xcalc\r\n");
+
+This mitigation should provide some protection from browser-based
+attacks and is based on the corresponding fix in Redis:
+
+https://github.com/antirez/redis/blob/8075572207b5aebb1385c4f233f5302544439325/src/networking.c#L1758
+
+Change-Id: Ia96ebe19b74b5805dc228bf7364c7971a90a4581
+Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Reported-by: Josef Gajdusek <atx@atx.name>
+---
+
+diff --git a/src/server/startup.tcl b/src/server/startup.tcl
+index 64ace40..dd1b31e 100644
+--- a/src/server/startup.tcl
++++ b/src/server/startup.tcl
+@@ -8,3 +8,14 @@
+ # one target
+ reset halt
+ }
++
++proc prevent_cps {} {
++ echo "Possible SECURITY ATTACK detected."
++ echo "It looks like somebody is sending POST or Host: commands to OpenOCD."
++ echo "This is likely due to an attacker attempting to use Cross Protocol Scripting"
++ echo "to compromise your OpenOCD instance. Connection aborted."
++ exit
++}
++
++proc POST {args} { prevent_cps }
++proc Host: {args} { prevent_cps }
PKG_NAME:=pciutils
PKG_VERSION:=3.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
PKG_HASH:=db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
CATEGORY:=Utilities
TITLE:=Linux PCI Utilities
URL:=http://mj.ucw.cz/pciutils.shtml
- DEPENDS:=+libkmod +zlib
+ DEPENDS:=+libkmod +libpci
endef
define Package/pciutils/description
of PCI devices
endef
+define Package/libpci
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Linux PCI Libraries
+ URL:=http://mj.ucw.cz/pciutils.shtml
+ DEPENDS:=
+endef
+
+
PCI_IDS_VER:=0.319
PCI_IDS_FILE:=pci.ids.$(PCI_IDS_VER)
define Download/pci_ids
$(CP) $(DL_DIR)/$(PCI_IDS_FILE) $(PKG_BUILD_DIR)/pci.ids
endef
+TARGET_CFLAGS += $(FPIC)
+
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
PREFIX="/usr" \
HOST="Linux" \
HWDB="no" \
- ZLIB="yes"
+ ZLIB="no" \
+ SHARED="yes"
ifneq ($(CONFIG_USE_GLIBC),)
TARGET_LDFLAGS += -lresolv
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpci.so.3 \
+ $(PKG_INSTALL_DIR)/usr/lib/libpci.so
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_BUILD_DIR)/lib/libpci.pc $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)/usr/include/pci
$(CP) $(foreach i,pci.h config.h header.h types.h, \
$(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/share
- $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids $(1)/usr/share/
endef
+define Package/libpci/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+
+$(eval $(call BuildPackage,libpci))
$(eval $(call BuildPackage,pciutils))
--- /dev/null
+#
+# Copyright (C) 2019 Lucian Cristain <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=powertop
+PKG_VERSION:=2.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://01.org/sites/default/files/downloads/
+PKG_HASH:=d3b7459eaba7d01c8841dd33a3b4d369416c01e9bd8951b0d88234cf18fe4a75
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+PKG_MAINTAINER:=Lucian Cristain <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/powertop
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libpci +libncursesw +libnl-genl +libstdcpp
+ TITLE:=Power consumption monitor
+ URL:=https://01.org/powertop
+endef
+
+define Package/powertop/description
+ PowerTOP is a Linux tool to diagnose issues with power consumption
+ and power management.
+endef
+
+define Package/powertop/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/powertop \
+ $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,powertop))
--- /dev/null
+--- ./src/devices/devfreq.h.orig
++++ ./src/devices/devfreq.h
+@@ -25,6 +25,7 @@
+ #ifndef _INCLUDE_GUARD_DEVFREQ_H
+ #define _INCLUDE_GUARD_DEVFREQ_H
+
++#include <sys/time.h>
+ #include "device.h"
+ #include "../parameters/parameters.h"
+
+diff --git a/src/perf/perf.h b/src/perf/perf.h
+index ee072ae06d24..932588a684f9 100644
+--- a/src/perf/perf.h
++++ b/src/perf/perf.h
+@@ -26,6 +26,7 @@
+ #define _INCLUDE_GUARD_PERF_H_
+
+ #include <iostream>
++#include <stdio.h>
+
+
+ extern "C" {
--- /dev/null
+--- traceevent/event-parse.c.orig
++++ ./traceevent/event-parse.c
+@@ -5121,12 +5121,17 @@
+ const char *msg;
+
+ if (errnum >= 0) {
++#if defined(__GLIBC__)
+ msg = strerror_r(errnum, buf, buflen);
+ if (msg != buf) {
+ size_t len = strlen(msg);
+ memcpy(buf, msg, min(buflen - 1, len));
+ *(buf + min(buflen - 1, len)) = '\0';
+ }
++#else
++ if (strerror_r(errnum, buf, buflen))
++ snprintf(buf, buflen, "errnum %i", errnum);
++#endif
+ return 0;
+ }
+
--- /dev/null
+From 7235a786ea30ae5ca7c1b3458ef5b2388c08dfd9 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 28 Mar 2019 18:44:27 -0700
+Subject: [PATCH] src/main: Add missing pthread header
+
+Otherwise compilation can fail with:
+
+main.cpp: In function 'void one_measurement(int, int, char*)':
+main.cpp:226:3: error: 'pthread_t' was not declared in this scope
+ pthread_t thread = 0UL;
+ ^~~~~~~~~
+main.cpp:226:3: note: suggested alternative: 'pread'
+ pthread_t thread = 0UL;
+ ^~~~~~~~~
+ pread
+
+et al.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/main.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index cbb7a4e..75d4202 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -39,6 +39,7 @@
+ #include <locale.h>
+ #include <sys/resource.h>
+ #include <limits.h>
++#include <pthread.h>
+
+ #include "cpu/cpu.h"
+ #include "process/process.h"
+--
+2.17.1
+
--- /dev/null
+From 8cdf846922ffb3e0d2a828be473fdf9c45a56e7c Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 30 Mar 2019 20:19:17 -0700
+Subject: [PATCH] intel_cpus.cpp: Change open parameter to const char *
+
+ifstream::open takes std::string starting with C++11, not before.
+
+This fixes compilation with uClibc++ and potentially other older libraries
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/cpu/intel_cpus.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
+index 0030dba..4dffadc 100644
+--- a/src/cpu/intel_cpus.cpp
++++ b/src/cpu/intel_cpus.cpp
+@@ -92,7 +92,7 @@ int is_supported_intel_cpu(int model, int cpu)
+
+ int is_intel_pstate_driver_loaded()
+ {
+- const string filename("/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver");
++ const char *filename = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver";
+ const string intel_pstate("intel_pstate");
+ char line[32] = { '\0' };
+ ifstream file;
+--
+2.17.1
+
PKG_NAME:=prometheus-node-exporter-lua
PKG_VERSION:=2018.12.30
-PKG_RELEASE:=4
+PKG_RELEASE:=6
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=Apache-2.0
local function scrape()
- metric("node_nf_conntrack_entries", "gauge", nil,
- string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_count"), 1, -2))
- metric("node_nf_conntrack_entries_limit", "gauge", nil,
- string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_max"), 1, -2))
+ local count = get_contents("/proc/sys/net/netfilter/nf_conntrack_count")
+ local max = get_contents("/proc/sys/net/netfilter/nf_conntrack_max")
+ if count ~= "" then
+ metric("node_nf_conntrack_entries", "gauge", nil, string.sub(count, 1, -2))
+ end
+ if max ~= "" then
+ metric("node_nf_conntrack_entries_limit", "gauge", nil, string.sub(max, 1, -2))
+ end
end
return { scrape = scrape }
local iwinfo = require "iwinfo"
local function scrape()
+ local metric_wifi_stations = metric("wifi_stations", "gauge")
local metric_wifi_station_signal = metric("wifi_station_signal_dbm","gauge")
- local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets_total","gauge")
- local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets_total","gauge")
+ local metric_wifi_station_tx_packets = metric("wifi_station_tx_packets_total","counter")
+ local metric_wifi_station_rx_packets = metric("wifi_station_rx_packets_total","counter")
local u = ubus.connect()
local status = u:call("network.wireless", "status", {})
for _, intf in ipairs(dev_table['interfaces']) do
local ifname = intf['ifname']
local iw = iwinfo[iwinfo.type(ifname)]
+ local count = 0
local assoclist = iw.assoclist(ifname)
for mac, station in pairs(assoclist) do
metric_wifi_station_signal(labels, station.signal)
metric_wifi_station_tx_packets(labels, station.tx_packets)
metric_wifi_station_rx_packets(labels, station.rx_packets)
+ count = count + 1
end
+ metric_wifi_stations({ifname = ifname}, count)
end
end
end
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus
-PKG_VERSION:=2.7.1
+PKG_VERSION:=2.8.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=bfbeb434342a03b5849e2ec7a0cbe573067299cf59ccf59db0cacd8db8800bb0
+PKG_HASH:=691fdadf5913c17ac0bedc1e8c2b865fd2958800b9cb118b1139e58a1963a11f
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
--- /dev/null
+diff --git a/go.mod b/go.mod
+index 35693e6d..e58ee088 100644
+--- a/go.mod
++++ b/go.mod
+@@ -7,7 +7,6 @@ require (
+ github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f // indirect
+ github.com/VividCortex/ewma v1.1.1 // indirect
+ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf
+- github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
+ github.com/aws/aws-sdk-go v0.0.0-20180507225419-00862f899353
+ github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8 // indirect
+ github.com/cenk/backoff v2.0.0+incompatible // indirect
+@@ -35,7 +34,6 @@ require (
+ github.com/gogo/protobuf v1.2.0
+ github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 // indirect
+ github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec
+- github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a // indirect
+ github.com/google/gofuzz v0.0.0-20150304233714-bbcb9da2d746 // indirect
+ github.com/google/pprof v0.0.0-20180605153948-8b03ce837f34
+ github.com/googleapis/gnostic v0.0.0-20180520015035-48a0ecefe2e4 // indirect
+@@ -46,14 +44,8 @@ require (
+ github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
+ github.com/hashicorp/consul v0.0.0-20180615161029-bed22a81e9fd
+ github.com/hashicorp/go-cleanhttp v0.0.0-20160407174126-ad28ea4487f0 // indirect
+- github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
+- github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c // indirect
+- github.com/hashicorp/go-multierror v1.0.0 // indirect
+ github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 // indirect
+- github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect
+- github.com/hashicorp/memberlist v0.1.0 // indirect
+- github.com/hashicorp/serf v0.0.0-20161007004122-1d4fa605f6ff // indirect
+- github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
++ github.com/hashicorp/serf v0.8.2 // indirect
+ github.com/hpcloud/tail v1.0.0 // indirect
+ github.com/influxdata/influxdb v0.0.0-20170331210902-15e594fc09f1
+ github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
+@@ -82,7 +74,6 @@ require (
+ github.com/opentracing-contrib/go-stdlib v0.0.0-20170113013457-1de4cc2120e7
+ github.com/opentracing/basictracer-go v1.0.0 // indirect
+ github.com/opentracing/opentracing-go v1.0.1
+- github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect
+ github.com/peterbourgon/diskv v0.0.0-20180312054125-0646ccaebea1 // indirect
+ github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect
+ github.com/petermattis/goid v0.0.0-20170504144140-0ded85884ba5 // indirect
+@@ -97,16 +88,14 @@ require (
+ github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13
+ github.com/sasha-s/go-deadlock v0.0.0-20161201235124-341000892f3d // indirect
+ github.com/satori/go.uuid v1.2.0 // indirect
+- github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
+ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
+ github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371
+ github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04
+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
+ github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
+ github.com/spf13/pflag v1.0.3 // indirect
+- github.com/stretchr/testify v1.2.2
+- golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8 // indirect
+- golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
++ github.com/stretchr/testify v1.3.0
++ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
+ golang.org/x/time v0.0.0-20170424234030-8be79e1e0910
+ golang.org/x/tools v0.0.0-20181023010539-40a48ad93fbe
+@@ -118,15 +107,12 @@ require (
+ gopkg.in/fsnotify/fsnotify.v1 v1.3.0
+ gopkg.in/inf.v0 v0.9.0 // indirect
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+- gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect
+ gopkg.in/yaml.v2 v2.2.1
+ k8s.io/api v0.0.0-20181213150558-05914d821849
+ k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
+ k8s.io/client-go v2.0.0-alpha.0.0.20181121191925-a47917edff34+incompatible
+ k8s.io/klog v0.1.0
+ k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a // indirect
+- labix.org/v2/mgo v0.0.0-20140701140051-000000000287 // indirect
+- launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect
+ sigs.k8s.io/yaml v1.1.0 // indirect
+ )
+
+diff --git a/go.sum b/go.sum
+index 2e938c06..e37c7504 100644
+--- a/go.sum
++++ b/go.sum
+@@ -17,12 +17,15 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5Vpd
+ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
+ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
++github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
+ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
++github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+ github.com/aws/aws-sdk-go v0.0.0-20180507225419-00862f899353 h1:qFKf58XUUvHaEz0zFkLJsQ4dzoAyrQ8QyhK4nHGHBI4=
+ github.com/aws/aws-sdk-go v0.0.0-20180507225419-00862f899353/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k=
+ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
+ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
++github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+ github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8 h1:tYoz1OeRpx3dJZlh9T4dQt4kAndcmpl+VNdzbSgFC/0=
+ github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8/go.mod h1:Iev9Q3MErcn+w3UOJD/DkEzllvugfdx7bGcMOFhvr/4=
+ github.com/cenk/backoff v2.0.0+incompatible h1:7vXVw3g7XE+Vnj0A9TmFGtMeP4oZQ5ZzpPvKhLFa80E=
+@@ -46,6 +49,7 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T
+ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
+ github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
+ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
++github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+ github.com/dgrijalva/jwt-go v0.0.0-20161101193935-9ed569b5d1ac h1:xrQJVwQCGqDvOO7/0+RyIq5J2M3Q4ZF7Ug/BMQtML1E=
+@@ -61,6 +65,7 @@ github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7Vpz
+ github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw=
+ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA=
++github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+ github.com/getsentry/raven-go v0.1.0 h1:lc5jnN9D+q3panDpihwShgaOVvP6esoMEKbID2yhLoQ=
+@@ -93,8 +98,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM
+ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+ github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec h1:ZaSUjYC8aWT/om43c8YVz0SqjT8ABtqw7REbZGsCroE=
+ github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+-github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a h1:ZJu5NB1Bk5ms4vw0Xu4i+jD32SE9jQXyfnOvwhHqlT0=
+-github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
++github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
++github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
+ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+ github.com/google/gofuzz v0.0.0-20150304233714-bbcb9da2d746 h1:M6d2zDTA4cKXT6OwFsJxlo5tWrAukj3KfvJ1zcBatnA=
+@@ -122,24 +127,28 @@ github.com/hashicorp/go-cleanhttp v0.0.0-20160407174126-ad28ea4487f0 h1:2l0haPDq
+ github.com/hashicorp/go-cleanhttp v0.0.0-20160407174126-ad28ea4487f0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+ github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=
+ github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+-github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c h1:BTAbnbegUIMB6xmQCwWE8yRzbA4XSpnZY5hvRJC188I=
+-github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
++github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=
++github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+ github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
+ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+ github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E=
+ github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90/go.mod h1:o4zcYY1e0GEZI6eSEr+43QDYmuGglw1qSO6qdHUHCgg=
+-github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM=
+-github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
++github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
++github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
++github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+ github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
+ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
++github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
++github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
++github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
+ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
+ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+-github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU1hzH8=
+-github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE=
+-github.com/hashicorp/serf v0.0.0-20161007004122-1d4fa605f6ff h1:3QdMaUEV3zE0VcBgBj+P3GQ26ZKmhb5gLea1hqAZ50U=
+-github.com/hashicorp/serf v0.0.0-20161007004122-1d4fa605f6ff/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE=
+-github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
+-github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
++github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
++github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
++github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=
++github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
++github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=
++github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+ github.com/influxdata/influxdb v0.0.0-20170331210902-15e594fc09f1 h1:O08dwjOwv9CYlJJEUZKAazSoQDKlsN34Bq3dnhqhyVI=
+@@ -170,16 +179,23 @@ github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
+ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+ github.com/lightstep/lightstep-tracer-go v0.15.6 h1:D0GGa7afJ7GcQvu5as6ssLEEKYXvRgKI5d5cevtz8r4=
+ github.com/lightstep/lightstep-tracer-go v0.15.6/go.mod h1:6AMpwZpsyCFwSovxzM78e+AsYxE8sGwiM6C3TytaWeI=
++github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
++github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+ github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
+ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
+ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
++github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+ github.com/miekg/dns v1.1.4 h1:rCMZsU2ScVSYcAsOXgmC6+AKOK+6pmQTOcw03nfwYV0=
+ github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
++github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
+ github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9 h1:Y94YB7jrsihrbGSqRNMwRWJ2/dCxr0hdC2oPRohkx0A=
+ github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+ github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
+ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
++github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
++github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
++github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+ github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
+ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+@@ -219,6 +235,7 @@ github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
+ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
++github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+ github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+ github.com/prometheus/client_golang v0.9.1 h1:K47Rk0v/fkEfwfQet2KWhscE0cJzjgCCDBG2KHZoVno=
+ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+@@ -239,6 +256,7 @@ github.com/rlmcpherson/s3gof3r v0.5.0 h1:1izOJpTiohSibfOHuNyEA/yQnAirh05enzEdmhe
+ github.com/rlmcpherson/s3gof3r v0.5.0/go.mod h1:s7vv7SMDPInkitQMuZzH615G7yWHdrU2r/Go7Bo71Rs=
+ github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk=
+ github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A=
++github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+ github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13 h1:4AQBn5RJY4WH8t8TLEMZUsWeXHAUcoao42TCAfpEJJE=
+ github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
+ github.com/sasha-s/go-deadlock v0.0.0-20161201235124-341000892f3d h1:yVBZEAirqhDYAc7xftf/swe8eHcg63jqfwdqN8KSoR8=
+@@ -253,7 +271,6 @@ github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371 h1:SWV2fHctRpRrp49
+ github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
+ github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04 h1:y0cMJ0qjii33BnD6tMGcF/+gHYsoKQ6tbwQpy233OII=
+ github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
+-github.com/simonpasquier/klog-gokit v0.1.0 h1:l3GGzgwlUF4vC1ApCOEsMsV+6nJPM01VoVCUCZgOIUw=
+ github.com/simonpasquier/klog-gokit v0.1.0/go.mod h1:4lorAA0CyDox4KO34BrvNAJk8J2Ma/M9Q2BDkR38vSI=
+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+@@ -263,25 +280,35 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1
+ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+ github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
+ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
++github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
++github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
++github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+ go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b h1:6ayHMBPtdP3jNuk+Sfhso+PTB7ZJQ5E1FBo403m2H8w=
+ go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
+-golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8 h1:h7zdf0RiEvWbYBKIx4b+q41xoUVnMmvsGZnIVE5syG8=
+-golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
++golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs=
++golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+ golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I=
+ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
+ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
++golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
++golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
++golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
+ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
++golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
++golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
++golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
++golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8 h1:YoY1wS6JYVRpIfFngRf2HHo9R9dAne3xbkGOQ5rJXjU=
+ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+@@ -315,8 +342,6 @@ gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o=
+ gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+-gopkg.in/vmihailenco/msgpack.v2 v2.9.1 h1:kb0VV7NuIojvRfzwslQeP3yArBqJHW9tOl4t38VS1jM=
+-gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8=
+ gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
+ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+ honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+@@ -328,9 +353,5 @@ k8s.io/client-go v2.0.0-alpha.0.0.20181121191925-a47917edff34+incompatible h1:7J
+ k8s.io/client-go v2.0.0-alpha.0.0.20181121191925-a47917edff34+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
+ k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a h1:tHgpQvrWaYfrnC8G4N0Oszw5HHCsZxKilDi2R7HuCSM=
+ k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
+-labix.org/v2/mgo v0.0.0-20140701140051-000000000287 h1:L0cnkNl4TfAXzvdrqsYEmxOHOCv2p5I3taaReO8BWFs=
+-labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4=
+-launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54=
+-launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM=
+ sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
+ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
PKG_NAME:=qemu
PKG_VERSION:=3.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
PKG_SOURCE_URL:=http://download.qemu.org/
--disable-fortify-source \
--disable-stack-protector \
+# Make a list from QEMU source code for reference
+#
+# grep -E '^\s*--disable-[^)]+\)' configure | cut -f1 -d')' | sort -u
+#
CONFIGURE_ARGS += \
--audio-drv-list='' \
- --disable-debug-info \
- --disable-modules \
- --disable-sdl \
- --disable-qom-cast-debug \
- --disable-virtfs \
- --disable-vnc \
- --disable-debug-tcg \
- --disable-sparse \
- --disable-strip \
- --disable-vnc-sasl \
- --disable-vnc-jpeg \
- --disable-vnc-png \
- --disable-uuid \
- --disable-vde \
- --disable-netmap \
- --disable-xen \
- --disable-xen-pci-passthrough \
- --disable-xen-pv-domain-build \
- --disable-brlapi \
+ --disable-attr \
--disable-bluez \
- --disable-tcg-interpreter \
+ --disable-brlapi \
+ --disable-bsd-user \
+ --disable-bzip2 \
--disable-cap-ng \
- --disable-spice \
- --disable-libiscsi \
- --disable-libnfs \
--disable-cocoa \
- --disable-bsd-user \
--disable-curl \
- --disable-linux-aio \
- --disable-attr \
+ --disable-debug-info \
+ --disable-debug-tcg \
--disable-docs \
+ --disable-gcrypt \
+ --disable-glusterfs \
+ --disable-gnutls \
+ --disable-gtk \
+ --disable-guest-agent-msi \
+ --disable-jemalloc \
+ --disable-libiscsi \
+ --disable-libnfs \
+ --disable-libpmem \
+ --disable-libssh2 \
+ --disable-libudev \
+ --disable-libusb \
+ --disable-libxml2 \
+ --disable-linux-aio \
+ --disable-lzo \
+ --disable-modules \
+ --disable-netmap \
+ --disable-nettle \
+ --disable-numa \
--disable-opengl \
+ --disable-qom-cast-debug \
--disable-rbd \
- --disable-xfsctl \
+ --disable-rdma \
+ --disable-sdl \
+ --disable-seccomp \
--disable-smartcard \
- --disable-libusb \
- --disable-usb-redir \
- --disable-zlib-test \
- --disable-lzo \
--disable-snappy \
- --disable-bzip2 \
- --disable-guest-agent-msi \
+ --disable-sparse \
+ --disable-spice \
+ --disable-strip \
+ --disable-tcg-interpreter \
+ --disable-tcmalloc \
--disable-tools \
- --disable-seccomp \
- --disable-glusterfs \
- --disable-gtk \
- --disable-gnutls \
- --disable-nettle \
- --disable-gcrypt \
- --disable-rdma \
- --disable-vte \
- --disable-virglrenderer \
--disable-tpm \
- --disable-libssh2 \
+ --disable-usb-redir \
+ --disable-uuid \
+ --disable-vde \
--disable-vhdx \
- --disable-numa \
- --disable-tcmalloc \
- --disable-jemalloc \
- --disable-strip \
+ --disable-virglrenderer \
+ --disable-virtfs \
+ --disable-vnc \
+ --disable-vnc-jpeg \
+ --disable-vnc-png \
+ --disable-vnc-sasl \
+ --disable-vte \
--disable-werror \
+ --disable-xen \
+ --disable-xen-pci-passthrough \
+ --disable-xen-pv-domain-build \
+ --disable-xfsctl \
+ --disable-zlib-test \
CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
-From 0b4011cd0983ced6e065f397049f967656494793 Mon Sep 17 00:00:00 2001
+From 82d1bb429533dcab4278ed21afc19ee303d7d3f5 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:43:19 +0800
-Subject: [PATCH 1/3] configure: allow disable fortify_source
+Subject: [PATCH 1/4] configure: allow disable fortify_source
Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
OpenWrt base build system decide flavor of fortify_source to use
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
-index 0c6e757..8ea3fdd 100755
+index 0a3c6a72c3..d274df816c 100755
--- a/configure
+++ b/configure
-@@ -1313,6 +1313,8 @@ for opt do
+@@ -1491,6 +1491,8 @@ for opt do
;;
- --disable-git-update) git_update=no
+ --disable-libpmem) libpmem=no
;;
+ --disable-fortify-source) fortify_source="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
---
-1.8.3.1
-
--- /dev/null
+From 4d7955f069922c482886e03e5cd352281dbce146 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Tue, 2 Apr 2019 06:31:31 +0000
+Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
+ line
+
+---
+ configure | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure b/configure
+index d274df816c..a138faeb72 100755
+--- a/configure
++++ b/configure
+@@ -1491,6 +1491,10 @@ for opt do
+ ;;
+ --disable-libpmem) libpmem=no
+ ;;
++ --enable-libudev) libudev=yes
++ ;;
++ --disable-libudev) libudev=no
++ ;;
+ --disable-fortify-source) fortify_source="no"
+ ;;
+ *)
+++ /dev/null
-From 83e72b93889fbcbbfff281b0dbcc58c5a7455257 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 2/3] disas: fix compilation failure when isnan is a macro
-
----
- disas/libvixl/vixl/utils.h | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
-index 5ab134e..df30663 100644
---- a/disas/libvixl/vixl/utils.h
-+++ b/disas/libvixl/vixl/utils.h
-@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
- // An fpclassify() function for 16-bit half-precision floats.
- int float16classify(float16 value);
-
-+#ifdef isnan
-+#define isnan_ isnan
-+#else
-+#define isnan_ std::isnan
-+#endif
-+
- // NaN tests.
- inline bool IsSignallingNaN(double num) {
- const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
- uint64_t raw = double_to_rawbits(num);
-- if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-+ if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
- return true;
- }
- return false;
-@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
- inline bool IsSignallingNaN(float num) {
- const uint32_t kFP32QuietNaNMask = 0x00400000;
- uint32_t raw = float_to_rawbits(num);
-- if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-+ if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
- return true;
- }
- return false;
-@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
-
- template <typename T>
- inline bool IsQuietNaN(T num) {
-- return std::isnan(num) && !IsSignallingNaN(num);
-+ return isnan_(num) && !IsSignallingNaN(num);
- }
-
-
- // Convert the NaN in 'num' to a quiet NaN.
- inline double ToQuietNaN(double num) {
- const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
-- VIXL_ASSERT(std::isnan(num));
-+ VIXL_ASSERT(isnan_(num));
- return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
- }
-
-
- inline float ToQuietNaN(float num) {
- const uint32_t kFP32QuietNaNMask = 0x00400000;
-- VIXL_ASSERT(std::isnan(num));
-+ VIXL_ASSERT(isnan_(num));
- return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
- }
-
---
-1.8.3.1
-
--- /dev/null
+From c480c25cf9265fe8e90c2c26d65c8a2fa174b0ea Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sat, 24 Feb 2018 13:45:25 +0800
+Subject: [PATCH 3/4] disas: fix compilation failure when isnan is a macro
+
+---
+ disas/libvixl/vixl/utils.h | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
+index 5ab134e240..df30663df8 100644
+--- a/disas/libvixl/vixl/utils.h
++++ b/disas/libvixl/vixl/utils.h
+@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
+ // An fpclassify() function for 16-bit half-precision floats.
+ int float16classify(float16 value);
+
++#ifdef isnan
++#define isnan_ isnan
++#else
++#define isnan_ std::isnan
++#endif
++
+ // NaN tests.
+ inline bool IsSignallingNaN(double num) {
+ const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+ uint64_t raw = double_to_rawbits(num);
+- if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
++ if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
+ return true;
+ }
+ return false;
+@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
+ inline bool IsSignallingNaN(float num) {
+ const uint32_t kFP32QuietNaNMask = 0x00400000;
+ uint32_t raw = float_to_rawbits(num);
+- if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
++ if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
+ return true;
+ }
+ return false;
+@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
+
+ template <typename T>
+ inline bool IsQuietNaN(T num) {
+- return std::isnan(num) && !IsSignallingNaN(num);
++ return isnan_(num) && !IsSignallingNaN(num);
+ }
+
+
+ // Convert the NaN in 'num' to a quiet NaN.
+ inline double ToQuietNaN(double num) {
+ const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+- VIXL_ASSERT(std::isnan(num));
++ VIXL_ASSERT(isnan_(num));
+ return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
+ }
+
+
+ inline float ToQuietNaN(float num) {
+ const uint32_t kFP32QuietNaNMask = 0x00400000;
+- VIXL_ASSERT(std::isnan(num));
++ VIXL_ASSERT(isnan_(num));
+ return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
+ }
+
+++ /dev/null
-From b6d4bff30f2bdc3a6f26c9f6c7f32e352270d119 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 3/3] pc-bios: fix compilation when $(AS) is actually gcc
- driver
-
----
- pc-bios/optionrom/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
-index a9a9e5e..f88b3ee 100644
---- a/pc-bios/optionrom/Makefile
-+++ b/pc-bios/optionrom/Makefile
-@@ -34,7 +34,7 @@ endif
- QEMU_INCLUDES += -I$(SRC_PATH)
-
- Wa = -Wa,
--ASFLAGS += -32
-+ASFLAGS += $(Wa)-32
- QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
-
- build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-
-
- %.o: %.S
-- $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
-+ $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
-
- %.img: %.o
- $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
---
-1.8.3.1
-
--- /dev/null
+From e030d1c14119e880a52788dd04325d489cf455ae Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sat, 24 Feb 2018 13:46:31 +0800
+Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
+ driver
+
+---
+ pc-bios/optionrom/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
+index a9a9e5e7eb..f88b3ee446 100644
+--- a/pc-bios/optionrom/Makefile
++++ b/pc-bios/optionrom/Makefile
+@@ -34,7 +34,7 @@ endif
+ QEMU_INCLUDES += -I$(SRC_PATH)
+
+ Wa = -Wa,
+-ASFLAGS += -32
++ASFLAGS += $(Wa)-32
+ QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
+
+ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
+@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
+
+
+ %.o: %.S
+- $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
++ $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
+
+ %.img: %.o
+ $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
PKG_NAME:=screen
PKG_VERSION:=4.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
PKG_SOURCE_URL:=@GNU/screen
+PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
+PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
SUBMENU:=Terminal
DEPENDS:=+libncurses
TITLE:=Full-screen terminal window manager
- URL:=http://www.gnu.org/software/screen/
- MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
+ URL:=https://www.gnu.org/software/screen/
endef
define Package/screen/description
terminal between several processes, typically interactive shells.
endef
-define Build/Configure
- $(call Build/Configure/Default,\
- --with-sys-screenrc=/etc/screenrc \
- --enable-colors256 \
- )
- # XXX: memmove() works well with overlapped memory areas
- echo "#define USEMEMMOVE 1" >>$(PKG_BUILD_DIR)/config.h
-endef
+CONFIGURE_ARGS += \
+ --enable-colors256 \
+ --with-sys-screenrc=/etc/screenrc
define Package/screen/install
$(INSTALL_DIR) $(1)/usr/sbin
--- /dev/null
+From 8c2b4061d16756ee2ed37f08db063b8215656943 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 2 Nov 2017 16:48:15 +0800
+Subject: [PATCH] fix configure failed while build dir name contains "yes"
+
+While build dir name contained "yes", and compiled with
+producing debugging information (-g), the configure failed.
+
+The pattern of AC_EGREP_CPP (string "yes") mismatched with
+dir name. It caused the test of AC_EGREP_CPP incorrect.
+
+Use YES_IS_DEFINED to replace yes which is not often used
+as dir name.
+
+Bug: 52329
+(Fix release v.4.6.2 or above)
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 28237f5..34f9735 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -151,9 +151,9 @@ fi
+
+
+ AC_CHECKING(for Ultrix)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(ultrix) || defined(__ultrix)
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], ULTRIX=1)
+
+@@ -168,9 +168,9 @@ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
+ dnl BBN butterfly is not POSIX, but a MACH BSD system.
+ dnl Do not define POSIX and TERMIO.
+ AC_CHECKING(for butterfly)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(butterfly)
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], butterfly=1)
+
+@@ -179,12 +179,12 @@ if test -n "$ULTRIX"; then
+ test -z "$GCC" && CC="$CC -YBSD"
+ fi
+ AC_CHECKING(for POSIX.1)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#include <sys/types.h>
+ #include <unistd.h>
+ main () {
+ #ifdef _POSIX_VERSION
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], AC_NOTE(- you have a POSIX system) AC_DEFINE(POSIX) posix=1)
+ fi
+@@ -196,9 +196,9 @@ AC_TRY_COMPILE(
+ #include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV))
+
+ AC_CHECKING(for sequent/ptx)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef _SEQUENT_
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+
+@@ -213,9 +213,9 @@ AC_TRY_LINK([#include <utmpx.h>
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+
+ AC_CHECKING(for Solaris 2.x)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(SVR4) && defined(sun)
+- yes
++ YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -lnsl -lkstat")
+
+@@ -699,9 +699,9 @@ else
+ pdir='/dev'
+ fi
+ dnl SCO uses ptyp%d
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef M_UNIX
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
+ dnl if test -c /dev/ptyp19; then
+@@ -878,9 +878,9 @@ fi
+ )
+
+ if test -z "$load" ; then
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(NeXT) || defined(apollo) || defined(linux)
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], load=1)
+ fi
+@@ -1105,9 +1105,9 @@ AC_CHECKING(syslog in libbsd.a)
+ AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
+ AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
+
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef M_UNIX
+- yes;
++ YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -lcrypt_i")
+
+--
+2.17.1
+
--- /dev/null
+From 5c3643fb701cc380ceb02116526ef4f5885295d0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
+Date: Sat, 16 Dec 2017 15:09:57 +0100
+Subject: [PATCH] fix: configure option "--disable-use-locale" is not working
+
+Bug: 52663
+---
+ acconfig.h | 2 +-
+ configure.ac | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/acconfig.h b/src/acconfig.h
+index 4e5cda0..6ff2d32 100644
+--- a/acconfig.h
++++ b/acconfig.h
+@@ -274,7 +274,7 @@
+ * Define USE_LOCALE if you want screen to use the locale names
+ * for the name of the month and day of the week.
+ */
+-#define USE_LOCALE
++#undef USE_LOCALE
+
+ /*
+ * Define USE_PAM if your system supports PAM (Pluggable Authentication
+diff --git a/src/configure.ac b/src/configure.ac
+index 34f9735..d1bc42c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1246,7 +1246,11 @@ if test "$enable_pam" = "yes"; then
+ AC_MSG_RESULT(no);LIBS="$oldlibs")
+ fi
+
+-AC_ARG_ENABLE(use_locale, [ --enable-use-locale use localized month/day names])
++AC_ARG_ENABLE(use-locale,
++ [ --enable-use-locale use localized month/day names (default: yes)],
++ [],
++ [enable_use_locale=yes]
++)
+ if test "$enable_use_locale" = "yes"; then
+ AC_DEFINE(USE_LOCALE)
+ fi
+--
+2.17.1
+
--- /dev/null
+From 6b320186db7df1e58fdd2c836af54c86cc596981 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:09:10 +0100
+Subject: [PATCH] [PATCH 1/4] Remove redundant compiler sanity checks
+
+AC_PROG_CC already performs sanity checks. And unlike the removed
+checks, it does so in a way that supports cross compilation.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 27 ---------------------------
+ 1 file changed, 27 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index d1bc42c..a8208ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
+ AC_ISC_POSIX
+ AC_USE_SYSTEM_EXTENSIONS
+
+-AC_TRY_RUN(main(){exit(0);},,[
+-if test $CC != cc ; then
+-AC_NOTE(Your $CC failed - restarting with CC=cc)
+-AC_NOTE()
+-CC=cc
+-export CC
+-exec $0 $configure_args
+-fi
+-])
+-
+-AC_TRY_RUN(main(){exit(0);},,
+-exec 5>&2
+-eval $ac_link
+-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
+-AC_NOTE($ac_compile)
+-AC_MSG_ERROR(Can't run the compiler - sorry))
+-
+-AC_TRY_RUN([
+-main()
+-{
+- int __something_strange_();
+- __something_strange_(0);
+-}
+-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
+-
+ AC_PROG_AWK
+
+ AC_PROG_INSTALL
+@@ -1278,8 +1253,6 @@ fi
+ dnl Ptx bug workaround -- insert -lc after -ltermcap
+ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
+
+-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
+-
+ ETCSCREENRC=
+ AC_MSG_CHECKING(for the global screenrc file)
+ AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
+--
+2.17.1
+
--- /dev/null
+From abba47ce4206506c49858d944e904fff86ae65cc Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:14:48 +0100
+Subject: [PATCH] [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 32 ++++++++++++++++++++------------
+ 1 file changed, 20 insertions(+), 12 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index a8208ea..74be368 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,7 +348,8 @@ main()
+ exit(0);
+ }
+ ], AC_NOTE(- your fifos are usable) fifo=1,
+-AC_NOTE(- your fifos are not usable))
++AC_NOTE(- your fifos are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
+ rm -f /tmp/conftest*
+
+ if test -n "$fifo"; then
+@@ -396,7 +397,8 @@ main()
+ exit(0);
+ }
+ ], AC_NOTE(- your implementation is ok),
+-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
++AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
+ rm -f /tmp/conftest*
+ fi
+
+@@ -458,7 +460,8 @@ main()
+ exit(0);
+ }
+ ], AC_NOTE(- your sockets are usable) sock=1,
+-AC_NOTE(- your sockets are not usable))
++AC_NOTE(- your sockets are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
+ rm -f /tmp/conftest*
+
+ if test -n "$sock"; then
+@@ -497,7 +500,8 @@ main()
+ }
+ ],AC_NOTE(- you are normal),
+ AC_NOTE(- unix domain sockets are not kept in the filesystem)
+-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
++AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
+ rm -f /tmp/conftest*
+ fi
+
+@@ -598,7 +602,8 @@ main()
+ exit(0);
+ }
+ ],AC_NOTE(- select is ok),
+-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
++AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
++AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
+
+ dnl
+ dnl **** termcap or terminfo ****
+@@ -640,7 +645,8 @@ main()
+ {
+ exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+ }], AC_NOTE(- you use the termcap database),
+-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
++AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
++AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
+ AC_CHECKING(ospeed)
+ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+
+@@ -775,7 +781,8 @@ main()
+ else
+ AC_NOTE(- can't determine - assume ptys are world accessable)
+ fi
+- ]
++ ],
++ AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
+ )
+ rm -f conftest_grp
+ fi
+@@ -859,7 +866,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], load=1)
+ fi
+-if test -z "$load" ; then
++if test -z "$load" && test "$cross_compiling" = no ; then
+ AC_CHECKING(for kernelfile)
+ for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
+ if test -f $core || test -c $core; then
+@@ -1052,7 +1059,7 @@ main()
+ #endif
+ exit(0);
+ }
+-],,AC_DEFINE(SYSVSIGS))
++],,AC_DEFINE(SYSVSIGS),:)
+
+ fi
+
+@@ -1132,7 +1139,7 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEBCOPY))
++}], AC_DEFINE(USEBCOPY),,:)
+
+ AC_TRY_RUN([
+ #define bcopy(s,d,l) memmove(d,s,l)
+@@ -1147,7 +1154,8 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEMEMMOVE))
++}], AC_DEFINE(USEMEMMOVE),,
++ AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
+
+
+ AC_TRY_RUN([
+@@ -1163,7 +1171,7 @@ main() {
+ if (strncmp(buf, "cdedef", 6))
+ exit(1);
+ exit(0); /* libc version works properly. */
+-}], AC_DEFINE(USEMEMCPY))
++}], AC_DEFINE(USEMEMCPY),,:)
+
+ AC_SYS_LONG_FILE_NAMES
+
+--
+2.17.1
+
--- /dev/null
+From c573b89139e7a068f5573abd565605bed60f293f Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:18:33 +0100
+Subject: [PATCH] [PATCH 3/4] Skip host file system checks when cross-compiling
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 74be368..bd748d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
+ dnl
+ dnl **** special unix variants ****
+ dnl
+-if test -n "$ISC"; then
++if test "$cross_compiling" = no && test -n "$ISC" ; then
+ AC_DEFINE(ISC) LIBS="$LIBS -linet"
+ fi
+
+@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again....
+ dnl fi
+ dnl fi
+
+-if test -f /sysV68 ; then
++if test "$cross_compiling" = no && test -f /sysV68 ; then
+ AC_DEFINE(sysV68)
+ fi
+
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for MIPS)
+ if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
+ oldlibs="$LIBS"
+@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
+ ))
+ fi
+ fi
++fi
+
+
+ AC_CHECKING(for Ultrix)
+@@ -132,7 +134,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], ULTRIX=1)
+
+-if test -f /usr/lib/libpyr.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpyr"
+ AC_CHECKING(Pyramid OSX)
+@@ -653,17 +655,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+ dnl
+ dnl **** PTY specific things ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for /dev/ptc)
+ if test -r /dev/ptc; then
+ AC_DEFINE(HAVE_DEV_PTC)
+ fi
++fi
+
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for SVR4 ptys)
+ sysvr4ptys=
+ if test -c /dev/ptmx ; then
+ AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+ sysvr4ptys=1])
+ fi
++fi
+
+ AC_CHECK_FUNCS(getpt)
+
+@@ -673,6 +679,7 @@ AC_CHECK_FUNCS(openpty,,
+ [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+ fi
+
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for ptyranges)
+ if test -d /dev/ptym ; then
+ pdir='/dev/ptym'
+@@ -696,6 +703,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\
+ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+ AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
+ fi
++fi
+
+ dnl **** pty mode/group handling ****
+ dnl
+@@ -843,14 +851,16 @@ fi
+ dnl
+ dnl **** loadav ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for libutil(s))
+ test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
+ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
++fi
+
+ AC_CHECKING(getloadavg)
+ AC_TRY_LINK(,[getloadavg((double *)0, 0);],
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1,
+-if test -f /usr/lib/libkvm.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
+ olibs="$LIBS"
+ LIBS="$LIBS -lkvm"
+ AC_CHECKING(getloadavg with -lkvm)
+@@ -1068,13 +1078,18 @@ dnl **** libraries ****
+ dnl
+
+ AC_CHECKING(for crypt and sec libraries)
++if test "$cross_compiling" = no ; then
+ test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
++fi
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lcrypt"
+ AC_CHECKING(crypt)
+ AC_TRY_LINK(,,,LIBS="$oldlibs")
++if test "$cross_compiling" = no ; then
+ test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
+ test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
++fi
++
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lsun"
+ AC_CHECKING(IRIX sun library)
+--
+2.17.1
+
--- /dev/null
+From ec90292592dd2c9d5c108390841e3df24e377ed5 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:22:05 +0100
+Subject: [PATCH] [PATCH 4/4] Avoid mis-identifying systems as SVR4
+
+Linux can be misdetected as SVR4 because it has
+libelf installed. This leads to linking with libelf, even though no
+symbols from that library were actually used, and to a workaround for
+a buggy getlogin() being enabled.
+
+It is not documented which exact SVR4 system had the bug that the
+workaround was added for, so all I could do is make an educated guess
+at the #defines its compiler would be likely to set.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index bd748d9..ab799d2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,14 +179,24 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+
++AC_CHECKING(SVR4)
++AC_EGREP_CPP(yes,
++[main () {
++#if defined(SVR4) || defined(__SVR4)
++ yes;
++#endif
++], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
++if test -n "$svr4" ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lelf"
+ AC_CHECKING(SVR4)
+ AC_TRY_LINK([#include <utmpx.h>
+ ],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
++[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
++[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
+ ,LIBS="$oldlibs")
++fi
++
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+
+ AC_CHECKING(for Solaris 2.x)
+--
+2.17.1
+
+++ /dev/null
---- a/configure
-+++ b/configure
-@@ -414,7 +414,7 @@ as_fn_error ()
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
-- as_fn_exit $as_status
-+ # as_fn_exit $as_status
- } # as_fn_error
-
- if expr a : '\(a\)' >/dev/null 2>&1 &&
-@@ -5909,8 +5909,6 @@ else
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
--test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
--test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
- oldlibs="$LIBS"
- LIBS="$LIBS -lsun"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIX sun library..." >&5
-@@ -6991,7 +6989,7 @@ as_fn_error ()
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
- fi
- $as_echo "$as_me: error: $2" >&2
-- as_fn_exit $as_status
-+ # as_fn_exit $as_status
- } # as_fn_error
-
-
---- a/pty.c
-+++ b/pty.c
-@@ -39,9 +39,9 @@
- #endif
-
- /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
--#ifdef HAVE_STROPTS_H
--# include <sys/stropts.h>
--#endif
-+//#ifdef HAVE_STROPTS_H
-+//# include <sys/stropts.h>
-+//#endif
-
- #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
- # include <sys/ttold.h>
---- a/sched.h
-+++ b/sched.h
-@@ -27,6 +27,11 @@
- * $Id$ GNU
- */
-
-+#ifndef __SCHED_H
-+#define __SCHED_H
-+
-+#include <sys/time.h>
-+
- struct event
- {
- struct event *next;
-@@ -46,3 +51,5 @@ struct event
- #define EV_READ 1
- #define EV_WRITE 2
- #define EV_ALWAYS 3
-+
-+#endif
+++ /dev/null
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -79,7 +79,7 @@ screen: $(OFILES)
- $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
-
- .c.o:
-- $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
-+ $(CC) -c $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
- $(OPTIONS) $(CFLAGS) $<
-
- install_bin: .version screen installdirs
+++ /dev/null
---- a/configure
-+++ b/configure
-@@ -4155,44 +4155,6 @@ fi
- rm -f conftest*
-
-
--oldlibs="$LIBS"
--LIBS="$LIBS -lelf"
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SVR4..." >&5
--$as_echo "$as_me: checking SVR4..." >&6;}
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <utmpx.h>
--
--int
--main ()
--{
--
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
-- ac_fn_c_check_header_mongrel "$LINENO" "dwarf.h" "ac_cv_header_dwarf_h" "$ac_includes_default"
--if test "x$ac_cv_header_dwarf_h" = xyes; then :
-- $as_echo "#define SVR4 1" >>confdefs.h
-- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h
--
--else
-- ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
--if test "x$ac_cv_header_elf_h" = xyes; then :
-- $as_echo "#define SVR4 1" >>confdefs.h
-- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h
--
--fi
--
--
--fi
--
--
--
--else
-- LIBS="$oldlibs"
--fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- for ac_header in stropts.h string.h strings.h
---- a/utmp.c
-+++ b/utmp.c
-@@ -33,6 +33,7 @@
- #include "config.h"
- #include "screen.h"
- #include "extern.h"
-+#include "os.h"
-
- #ifdef HAVE_UTEMPTER
- #include <utempter.h>
--- /dev/null
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ssdeep
+PKG_VERSION:=2.14.1
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/ssdeep-project/ssdeep/releases/download/release-$(PKG_VERSION)/
+PKG_HASH:=ff2eabc78106f009b4fb2def2d76fb0ca9e12acf624cbbfad9b3eb390d931313
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ssdeep
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=A program to compute and match fuzzy hashes
+ URL:=https://ssdeep-project.github.io/ssdeep
+ DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/ssdeep/description
+ ssdeep is a program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies.
+endef
+
+define Package/ssdeep/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssdeep $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,ssdeep))
PKG_NAME:=sysstat
PKG_VERSION:=12.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
SYSSTAT_CFG="/etc/sysstat/sysstat"
validate_sysstat_section() {
- uci_validate_section sysstat sysstat "${1}" \
+ uci_load_validate sysstat sysstat "$1" "$2" \
'log_history:uinteger' \
'compressafter:uinteger' \
'sadc_options:string' \
'enabled:string'
}
-start_service() {
-
- local log_history compressafter sadc_options sa_dir zip enabled
-
- validate_sysstat_section sysstat || {
+start_sysstat_instance() {
+ [ "$2" = 0 ] || {
echo "validation failed"
return 1
}
procd_close_instance
}
+start_service() {
+ validate_sysstat_section sysstat start_sysstat_instance
+}
+
service_triggers()
{
procd_add_reload_trigger "sysstat"
--- /dev/null
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tang
+PKG_VERSION:=6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=1df78b48a52d2ca05656555cfe52bd4427c884f5a54a2c5e37a7b39da9e155e3
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tang
+ SECTION:=utils
+ TITLE:=tang v$(PKG_VERSION) - daemon for binding data to the presence of a third party
+ DEPENDS:=+libhttp-parser +xinetd +jose +bash
+ URL:=https://github.com/latchset/tang
+ MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/tang/description
+ Tang is a small daemon for binding data to the presence of a third party.
+endef
+
+define Package/tang/conffiles
+/etc/xinetd.d/tangdx
+/usr/share/tang/db/
+endef
+
+define Package/tang/install
+ $(INSTALL_DIR) $(1)/usr/libexec
+ $(INSTALL_DIR) $(1)/etc/xinetd.d/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/tangd* $(1)/usr/libexec/
+ $(INSTALL_BIN) ./files/tangdw $(1)/usr/libexec/
+ $(CP) ./files/tangdx $(1)/etc/xinetd.d/
+endef
+
+define Package/tang/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ mkdir -p /usr/share/tang/db && mkdir -p /usr/share/tang/cache
+ KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l)
+ if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair
+ /usr/libexec/tangd-keygen /usr/share/tang/db/
+ elif [ "${KEYS}" = "1" ]; then # having 1 key should not happen
+ (>&2 echo "Please check the Tang's keys in /usr/share/tang/db \
+and regenate cache using /usr/libexec/tangd-update script.")
+ else
+ /usr/libexec/tangd-update /usr/share/tang/db/ /usr/share/tang/cache/
+ fi
+ (cat /etc/services | grep -E "tangd.*8888\/tcp") > /dev/null \
+ || echo -e "tangd\t\t8888/tcp" >> /etc/services
+fi
+endef
+
+$(eval $(call BuildPackage,tang))
--- /dev/null
+#!/bin/sh
+echo "==================================" >> /var/log/tangd.log
+echo `date`: >> /var/log/tangd.log
+/usr/libexec/tangd $1 2>> /var/log/tangd.log
--- /dev/null
+service tangd
+{
+ port = 8888
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/libexec/tangdw
+ server_args = /usr/share/tang/cache
+ log_on_success += USERID
+ log_on_failure += USERID
+ disable = no
+}
--- /dev/null
+diff --git a/Makefile.am b/Makefile.am
+index 14bf91d..dfa6d07 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+-
+ AM_CFLAGS = @TANG_CFLAGS@ @jose_CFLAGS@
+ LDADD = @jose_LIBS@ @http_parser_LIBS@
+
+@@ -7,21 +5,11 @@ nagiosdir = $(libdir)/nagios/plugins
+ cachedir = $(localstatedir)/cache/$(PACKAGE_NAME)
+ jwkdir = $(localstatedir)/db/$(PACKAGE_NAME)
+
+-nodist_systemdsystemunit_DATA = \
+- units/tangd@.service \
+- units/tangd.socket \
+- units/tangd-update.path \
+- units/tangd-update.service \
+- units/tangd-keygen.service
+-
+ dist_libexec_SCRIPTS = src/tangd-update src/tangd-keygen
+ libexec_PROGRAMS = src/tangd
+-nagios_PROGRAMS = src/tang
+-man1_MANS = doc/tang-nagios.1
+ man8_MANS = doc/tang.8
+
+ src_tangd_SOURCES = src/http.c src/http.h src/tangd.c
+-src_tang_SOURCES = src/nagios.c
+
+ %: %.in
+ $(AM_V_GEN)mkdir -p "`dirname "$@"`"
+@@ -32,11 +20,9 @@ src_tang_SOURCES = src/nagios.c
+ $(srcdir)/$@.in > $@
+
+ AM_TESTS_ENVIRONMENT = SD_ACTIVATE="@SD_ACTIVATE@" PATH=$(srcdir)/src:$(builddir)/src:$(PATH)
+-TESTS = tests/adv tests/rec tests/nagios
++TESTS = tests/adv tests/rec
+
+-CLEANFILES = $(nodist_systemdsystemunit_DATA)
+ EXTRA_DIST = \
+- $(foreach unit,$(nodist_systemdsystemunit_DATA),$(unit).in) \
+ COPYING \
+ $(TESTS) \
+ $(man1_MANS) \
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index b51bb31..4b37d30 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,32 +27,6 @@ AC_CHECK_LIB([http_parser], [http_parser_execute],
+ [AC_MSG_ERROR([http-parser required!])])
+
+ PKG_CHECK_MODULES([jose], [jose >= 8])
+-PKG_CHECK_MODULES([systemd], [systemd])
+-
+-AC_ARG_WITH([systemdsystemunitdir],
+- [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
+- [],
+- [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+-
+-AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+-
+-for ac_prog in systemd-socket-activate systemd-activate; do
+- AC_CHECK_PROG([SD_ACTIVATE], [$ac_prog], [$as_dir/$ac_prog], [],
+- [$PATH$PATH_SEPARATOR$($PKG_CONFIG --variable=systemdutildir systemd)])
+- test -n "$SD_ACTIVATE" && break
+-done
+-
+-test -n "$SD_ACTIVATE" || AC_MSG_ERROR([systemd-socket-activate required!])
+-
+-AC_MSG_CHECKING([systemd-socket-activate inetd flag])
+-if $SD_ACTIVATE --help | grep -q inetd; then
+- SD_ACTIVATE="$SD_ACTIVATE --inetd"
+- AC_MSG_RESULT([--inetd])
+-else
+- AC_MSG_RESULT([(default)])
+-fi
+-
+-AC_SUBST(SD_ACTIVATE)
+
+ TANG_CFLAGS="\
+ -Wall \
--- /dev/null
+diff --git a/src/tangd-update b/src/tangd-update
+index 652dbef..01aa842 100755
+--- a/src/tangd-update
++++ b/src/tangd-update
+@@ -33,8 +33,8 @@ fi
+
+ [ ! -d "$2" ] && mkdir -p -m 0700 "$2"
+
+-src=`realpath "$1"`
+-dst=`realpath "$2"`
++src=`readlink -f "$1"`
++dst=`readlink -f "$2"`
+
+ payl=()
+ sign=()
include $(TOPDIR)/rules.mk
PKG_NAME:=tar
-PKG_VERSION:=1.31
+PKG_VERSION:=1.32
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=37f3ef1ceebd8b7e1ebf5b8cc6c65bb8ebf002c7d049032bf456860f25ec2dc1
+PKG_HASH:=d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=GPL-3.0
--- /dev/null
+#
+# Copyright (C) 2010 Telldus Technologies AB
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=telldus-core
+PKG_VERSION:=2.1.2
+PKG_RELEASE:=1
+
+PKG_LICENSE:=LGPL-2.1
+PKG_BUILD_DEPENDS:=argp-standalone
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download.telldus.com/TellStick/Software/telldus-core/
+PKG_HASH:=a20f6c74814afc23312d2c93ebbb37fdea9deaaee05ae7b6a6275e11e4662014
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/telldus-core
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Telldus TellStick USB interface
+ URL:=http://www.telldus.com
+ MAINTAINER:=Peter Liedholm <PeterFromSwe884@gmail.com>
+ DEPENDS:=+confuse +libftdi +libstdcpp $(ICONV_DEPENDS)
+endef
+
+define Package/telldus-core/description
+ Telldus driver for USB-based 433 MHz RF transceiver for home automation.
+ MUST be built with full language support, (don't know how to DEPEND that)
+endef
+
+CMAKE_OPTIONS+=\
+ -DBUILD_LIBTELLDUS-CORE=1 \
+ -DBUILD_TDTOOL=1 \
+ -DGENERATE_MAN=0 \
+ -DICONV_LIBRARY=-liconv
+
+define Package/telldus-core/conffiles
+/etc/tellstick.conf
+endef
+
+define Package/telldus-core/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tdtool $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/telldusd $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tdadmin $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtelldus* $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/tellstick.conf $(1)/etc
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/telldusd $(1)/etc/init.d
+endef
+
+$(eval $(call BuildPackage,telldus-core))
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/sbin/telldusd
+CONFFILE=/etc/tellstick.conf
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG
+ procd_append_param command --nodaemon # foreground required by procd
+ procd_set_param file $CONFFILE
+ procd_set_param term_timeout 10 # telldusd is slow to exit of some reason
+ procd_set_param respawn # respawn the service if it exits
+ procd_set_param stdout 1 # forward stdout of the command to logd
+ procd_set_param stderr 1 # same for stderr
+ procd_close_instance
+}
--- /dev/null
+user = "root"
+group = "root"
+ignoreControllerConfirmation = "false"
+device {
+ id = 1
+ name = "Example device"
+ protocol = "arctech"
+ model = "codeswitch"
+ parameters {
+ house = "A"
+ unit = "1"
+ }
+}
+
+# Example controller (tellstick duo)
+#controller {
+ #id=1
+ # name=""
+ #type=2
+ #serial="A501IVK7"
+#}
--- /dev/null
+Added missing includes required by openwrt. Expected to be portable.
+--- a/common/Socket_unix.cpp
++++ b/common/Socket_unix.cpp
+@@ -8,6 +8,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <sys/select.h> // POSIX.1-2001
+ #include <sys/un.h>
+ #include <fcntl.h>
+ #include <math.h>
+--- a/service/ConnectionListener_unix.cpp
++++ b/service/ConnectionListener_unix.cpp
+@@ -13,6 +13,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <string>
++#include <cstring> // strcpy
+
+ #include "service/ConnectionListener.h"
+ #include "common/Socket.h"
--- /dev/null
+Added a typecast (signed/unsigned char problem). Should be portable.
+--- a/service/ProtocolIkea.cpp
++++ b/service/ProtocolIkea.cpp
+@@ -23,7 +23,7 @@ int ProtocolIkea::methods() const {
+
+ std::string ProtocolIkea::getStringForMethod(int method, unsigned char level, Controller *) {
+ const char B1[] = {84, 84, 0};
+- const char B0[] = {170, 0};
++ const char B0[] = {(char)170, 0};
+
+ int intSystem = this->getIntParameter(L"system", 1, 16)-1;
+ int intFadeStyle = TelldusCore::comparei(this->getStringParameter(L"fade", L"true"), L"true");
+--- a/service/ProtocolX10.cpp
++++ b/service/ProtocolX10.cpp
+@@ -22,7 +22,7 @@ int ProtocolX10::methods() const {
+ std::string ProtocolX10::getStringForMethod(int method, unsigned char data, Controller *controller) {
+ const unsigned char S = 59, L = 169;
+ const char B0[] = {S, S, 0};
+- const char B1[] = {S, L, 0};
++ const char B1[] = {S, (char)L, 0};
+ const unsigned char START_CODE[] = {'S', 255, 1, 255, 1, 255, 1, 100, 255, 1, 180, 0};
+ const unsigned char STOP_CODE[] = {S, 0};
+
--- /dev/null
+Added a missing initialisation that under special circumstanses causes seg fault.
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -435,6 +435,7 @@ bool readVarConfig(cfg_t **cfg) {
+
+ FILE *fp = fopen(VAR_CONFIG_FILE, "re"); // e for setting O_CLOEXEC on the file handle
+ if (!fp) {
++ (*cfg) = 0;
+ Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
+ return false;
+ }
--- /dev/null
+Adopted to OpenWrt target. Most likely these changes go elsewhere when done right.
+--- a/service/CMakeLists.txt
++++ b/service/CMakeLists.txt
+@@ -98,7 +98,7 @@ IF (UNIX AND NOT APPLE)
+ IF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ SET(DEFAULT_STATE_INSTALL_DIR "/var/spool")
+ ELSE ()
+- SET(DEFAULT_STATE_INSTALL_DIR "/var/state")
++ SET(DEFAULT_STATE_INSTALL_DIR "/tmp/state") # OpenWrt has var as symlink to tmp
+ ENDIF ()
+ SET(STATE_INSTALL_DIR "${DEFAULT_STATE_INSTALL_DIR}" CACHE PATH "The directory to store state information of the devices")
+
+--- a/tdadmin/CMakeLists.txt
++++ b/tdadmin/CMakeLists.txt
+@@ -38,8 +38,11 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeB
+ ${ARGP_LIBRARY}
+ )
+ ELSE (WIN32)
++ # Linux, in this case openwrt that requires argp-standalone
++ FIND_LIBRARY(ARGP_LIBRARY argp)
+ TARGET_LINK_LIBRARIES(tdadmin
+ ${CMAKE_BINARY_DIR}/client/libtelldus-core.so
++ ${ARGP_LIBRARY}
+ )
+ ENDIF (WIN32)
+
+--- a/common/CMakeLists.txt
++++ b/common/CMakeLists.txt
+@@ -66,12 +66,16 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeB
+ )
+ ELSE (APPLE)
+ #### Linux ####
++ #FIND_LIBRARY(ICONV_LIBRARY iconv) Does not work
+ ADD_DEFINITIONS( -D_LINUX )
+ LIST(APPEND telldus-common_SRCS
+ Event_unix.cpp
+ EventHandler_unix.cpp
+ Socket_unix.cpp
+ )
++ LIST(APPEND telldus-common_LIBRARIES
++ ${ICONV_LIBRARY}
++ )
+ ENDIF (APPLE)
+
+
--- /dev/null
+On OpenWrt targets the tmp filesystem is wiped upon power cycle, so files
+requires to be created.
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -436,6 +436,13 @@ bool readVarConfig(cfg_t **cfg) {
+ FILE *fp = fopen(VAR_CONFIG_FILE, "re"); // e for setting O_CLOEXEC on the file handle
+ if (!fp) {
+ (*cfg) = 0;
++ fp = fopen(VAR_CONFIG_FILE, "we"); // If missing, create file if possible
++ if(fp) {
++ fclose(fp);
++ }
++ else {
++ Log::warning("Unable to create var config file, %s", VAR_CONFIG_FILE);
++ }
+ Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
+ return false;
+ }
PKG_NAME:=ttyd
PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE_VERSION=$(PKG_VERSION)
-PKG_HASH=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
+PKG_HASH:=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
+PKG_BUILD_DEPENDS:=vim/host
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/rules.mk
PKG_NAME:=unrar
-PKG_VERSION:=5.6.8
+PKG_VERSION:=5.7.3
PKG_RELEASE:=1
PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.rarlab.com/rar
-PKG_HASH:=a4cc0ac14a354827751912d2af4a0a09e2c2129df5766576fa7e151791dd3dff
+PKG_HASH:=40e856b78374f258d8a1f5f02c02f828c5392a0118c9300fd169a300b520a444
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
Ted Hess <thess@kitschensync.net>
include $(INCLUDE_DIR)/uclibc++.mk
include $(INCLUDE_DIR)/package.mk
+ifeq ($(CONFIG_USE_UCLIBCXX),y)
+TARGET_LDFLAGS +=-nodefaultlibs
+endif
+TARGET_CXXFLAGS +=-fno-rtti -flto
+TARGET_LDFLAGS +=$(FPIC) -Wl,--gc-sections
+
define Package/unrar/Default
TITLE:=UnRAR
SUBMENU:=Compression
archives
endef
-MAKE_FLAGS += \
- LDFLAGS="$(TARGET_LDFLAGS) -lpthread"
-
ifeq ($(BUILD_VARIANT),lib)
define Build/Compile
$(call Build/Compile/Default,lib)
--- a/makefile
+++ b/makefile
-@@ -2,13 +2,13 @@
+@@ -2,14 +2,14 @@
# Makefile for UNIX - unrar
# Linux using GCC
-CXX=c++
-CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
-+#CXX=c++
-+#CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
- LIBFLAGS=-fPIC
+-LIBFLAGS=-fPIC
++CXX?=c++
++CXXFLAGS?=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
++LIBFLAGS?=-fPIC
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
- STRIP=strip
- AR=ar
+-STRIP=strip
+-AR=ar
-LDFLAGS=-pthread
-+LDFLAGS=-lpthread
- DESTDIR=/usr
+-DESTDIR=/usr
++STRIP?=strip
++AR?=ar
++LDFLAGS?=-lpthread
++DESTDIR?=/usr
# Linux using LCC
+ #CXX=lcc
@@ -166,7 +166,7 @@ uninstall-unrar:
rm -f $(DESTDIR)/bin/unrar
PKG_NAME:=vim
PKG_VERSION:=8.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
VIMVER:=81
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
PKG_BUILD_PARALLEL:=1
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(VIMVER)
+HOST_BUILD_PARALLEL:=1
+
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
define Package/vim/Default
SECTION:=utils
$(eval $(call BuildPackage,vim-runtime))
$(eval $(call BuildPackage,vim-help))
$(eval $(call BuildPackage,xxd))
+$(eval $(call HostBuild))
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Enable the configuration of programed reboots
+ PKGARCH:=all
endef
define Package/watchcat/description
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Script to toggle Wi-Fi with a button and UCI config
+ PKGARCH:=all
endef
define Package/wifitoggle/description
include $(TOPDIR)/rules.mk
PKG_NAME:=yara
-PKG_VERSION:=3.8.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.9.0
+PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/VirusTotal/yara/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=283527711269354d3c60e2705f7f74b1f769d2d35ddba8f7f9ce97d0fd5cb1ca
+PKG_HASH:=ebe7fab0abadb90449a62afbd24e196e18b177efe71ffd8bf22df95c5386f64d
+PKG_CPE_ID:=cpe:/a:virustotal:yara
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
+++ /dev/null
-From cd73c968e896b8ba364510abdcd3dcc63d017110 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 8 Nov 2018 14:57:49 -0800
-Subject: [PATCH] libyara: Switch to OpenSSL's THREADID API
-
-The non THREADID API was deprecated back in OpenSSL 1.0.0
----
- libyara/libyara.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libyara/libyara.c b/libyara/libyara.c
-index f05d1f9..6f20488 100644
---- a/libyara/libyara.c
-+++ b/libyara/libyara.c
-@@ -87,9 +87,9 @@ char yr_altercase[256];
- static YR_MUTEX *openssl_locks;
-
-
--static unsigned long _thread_id(void)
-+static void _thread_id(CRYPTO_THREADID *id)
- {
-- return (unsigned long) yr_current_thread_id();
-+ CRYPTO_THREADID_set_numeric(id, (unsigned long) yr_current_thread_id());
- }
-
-
-@@ -155,7 +155,7 @@ YR_API int yr_initialize(void)
- for (i = 0; i < CRYPTO_num_locks(); i++)
- yr_mutex_create(&openssl_locks[i]);
-
-- CRYPTO_set_id_callback(_thread_id);
-+ CRYPTO_THREADID_set_callback(_thread_id);
- CRYPTO_set_locking_callback(_locking_function);
-
- #elif defined(HAVE_WINCRYPT_H)
-@@ -226,7 +226,7 @@ YR_API int yr_finalize(void)
- yr_mutex_destroy(&openssl_locks[i]);
-
- OPENSSL_free(openssl_locks);
-- CRYPTO_set_id_callback(NULL);
-+ CRYPTO_THREADID_set_callback(NULL);
- CRYPTO_set_locking_callback(NULL);
-
- #elif defined(HAVE_WINCRYPT_H)
---
-2.19.1
-
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ykclient
+PKG_VERSION:=2.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ykclient-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c-client/Releases/
+PKG_HASH:=f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+PKG_BUILD_DEPENDS:=curl
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ykclient-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ykclient
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=The Yuibco yubikey c client library
+ URL:=https://developers.yubico.com/yubico-c-client/
+ DEPENDS:=curl
+endef
+
+define Package/ykclient/description
+ YubiKey C Client Library (libykclient)
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/ykclient*.h $(STAGING_DIR)/usr/include
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykclient.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static
+
+define Package/ykclient/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykclient $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykclient.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,ykclient))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ykpers
+PKG_VERSION:=1.19.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ykpers-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubikey-personalization/Releases
+PKG_HASH:=2bc8afa16d495a486582bad916d16de1f67c0cce9bb0a35c3123376c2d609480
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ykpers-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libyubikey
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ykpers
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=The Yuibco personalization package
+ URL:=https://developers.yubico.com/yubikey-personalization/
+ DEPENDS:=+curl +libyubikey +libjson-c +libusb-1.0
+endef
+
+define Package/ykpers/description
+ The YubiKey Personalization package contains a library and command
+ line tool used to personalize (i.e., set a AES key) YubiKeys.
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --disable-static
+
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/ykcore/*.h $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/*.h $(STAGING_DIR)/usr/include
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykpers-1.so* $(STAGING_DIR)/usr/lib
+endef
+
+define Package/ykpers/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykchalresp $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykinfo $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykpersonalize $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/.libs/libykpers-1.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,ykpers))
#
-# Copyright (C) 2007-2018 OpenWrt.org
+# Copyright (C) 2007-2019 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:=zoneinfo
-PKG_VERSION:=2018i
+PKG_VERSION:=2019a
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9
+PKG_HASH:=90366ddf4aa03e37a16cd49255af77f801822310b213f195e2206ead48c59772
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
- HASH:=aaacdb876ca6fb9d58e244b462cbc7578a496b1b10994381b4b32b9f2ded32dc
+ HASH:=8739f162bc30cdfb482435697f969253abea49595541a0afd5f443fbae433ff5
endef
$(eval $(call Download,tzcode))
--- /dev/null
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zstd
+PKG_VERSION:=1.3.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=90d902a1282cc4e197a8023b6d6e8d331c1fd1dfe60f7f8e4ee9da40da886dc3
+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILE:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=build/cmake
+CMAKE_INSTALL:=1
+
+ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
+ TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+ TARGET_CFLAGS += -O3
+ TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS))
+ TARGET_CXXFLAGS += -O3
+endif
+
+define Package/zstd/Default
+ SUBMENU:=Compression
+ URL:=https://github.com/facebook/zstd
+ MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/libzstd
+$(call Package/zstd/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=zstd library.
+endef
+
+define Package/libzstd/description
+ Zstandard - Fast real-time compression algorithm.
+ This package provides libzstd library.
+endef
+
+define Package/libzstd/config
+ config ZSTD_OPTIMIZE_O3
+ bool "Use all optimizations (-O3)"
+ default y
+ help
+ This enables additional optmizations using the -O3 compilation flag.
+endef
+
+define Package/zstd
+$(call Package/zstd/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libzstd
+ TITLE:=Fast real-time compression algorithm.
+endef
+
+define Package/zstd/description
+ Zstandard - Fast real-time compression algorithm.
+ This package provides the zstd binaries.
+endef
+
+define Package/libzstd/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib/
+endef
+
+define Package/zstd/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{unzstd,zstd,zstdcat,zstdmt} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libzstd))
+$(eval $(call BuildPackage,zstd))
+$(eval $(call HostBuild))