Merge pull request #8569 from bluewavenet/patch-3
authorRosen Penev <rosenp@gmail.com>
Mon, 15 Apr 2019 16:44:36 +0000 (09:44 -0700)
committerGitHub <noreply@github.com>
Mon, 15 Apr 2019 16:44:36 +0000 (09:44 -0700)
libmicrohttpd: Revert to Named no-ssl Version

212 files changed:
CONTRIBUTING.md
admin/sudo/Makefile
admin/zabbix/Makefile
admin/zabbix/patches/010-change-agentd-config.patch
admin/zabbix/patches/110-reproducible-builds.patch
devel/lttng-tools/Makefile
devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch [new file with mode: 0644]
devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch [new file with mode: 0644]
devel/lttng-tools/patches/100-musl-compat.patch [deleted file]
devel/lttng-tools/patches/200-use-extern.patch [deleted file]
lang/golang/golang-version.mk
lang/golang/golang/Makefile
lang/luasec/Makefile
lang/luasec/patches/100-fix-compilation.patch
lang/luasocket/Makefile
lang/luasocket/patches/040-remove-fpic-and-warnings.patch [new file with mode: 0644]
lang/node-arduino-firmata/Makefile
lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js
lang/node-cylon/Makefile
lang/node-hid/Makefile
lang/node-homebridge/Makefile
lang/node-serialport/Makefile
lang/node/Makefile
lang/node/patches/005-powerpc32_musl_support.patch [new file with mode: 0644]
lang/perl-cgi/Makefile
lang/php7/Makefile
lang/php7/files/php7-fastcgi.init
lang/python/README.md
lang/python/python-cryptodome/Makefile
lang/python/python-cryptodome/patches/002-omit-tests.patch
lang/python/python-cryptodomex/Makefile
lang/python/python-cryptodomex/patches/002-omit-tests.patch
lang/python/python-curl/Makefile
lang/python/python-curl/patches/0001-support-for-mbedTLS.patch [new file with mode: 0644]
lang/python/python-package-install.sh
lang/python/python-package.mk
lang/python/python-pytz/Makefile
lang/python/python-voluptuous-serialize/Makefile
lang/python/python-yaml/Makefile
lang/python/python/Makefile
lang/python/python/files/python-config.in [new file with mode: 0644]
lang/python/python/patches/021-compileall-add-recursion-option.patch [new file with mode: 0644]
lang/python/python3-package.mk
lang/python/python3/Makefile
lang/python/ruamel-yaml/Makefile
libs/botan/Makefile [new file with mode: 0644]
libs/file/Makefile
libs/hiredis/Makefile
libs/hiredis/patches/010-fix_pkconfig_file.patch [new file with mode: 0644]
libs/icu/Makefile
libs/icu/patches/001-change_optimization_option.patch [new file with mode: 0644]
libs/icu/patches/010-add-big-endian-arm-support.patch [new file with mode: 0644]
libs/jose/Makefile [new file with mode: 0644]
libs/jose/patches/Fix_minor_leak_upstream_198f720.patch [new file with mode: 0644]
libs/ldns/Makefile
libs/libdouble-conversion/Makefile
libs/libglog/Makefile
libs/libglog/patches/100-fix-musl-compilation.patch [new file with mode: 0644]
libs/libhttp-parser/Makefile
libs/libmodbus/Makefile
libs/libmodbus/patches/0001-Only-set-SER_RS485_ENABLED-bit-of-existing-RS485-set.patch [new file with mode: 0644]
libs/libmodbus/patches/0002-Oops-fix-OR-on-RS485-settings-1c5d969.patch [new file with mode: 0644]
libs/libssh2/Makefile
libs/libstrophe/Makefile
libs/log4cplus/Makefile [new file with mode: 0644]
libs/lttng-ust/Makefile
libs/lttng-ust/patches/001-no_docs_tests.patch
libs/lttng-ust/patches/002-examples.patch [deleted file]
libs/nspr/Makefile [new file with mode: 0644]
libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch [new file with mode: 0644]
libs/nspr/patches/002-Add-ARC-support.patch [new file with mode: 0644]
libs/nspr/patches/003-native_and_musl_fix.patch [new file with mode: 0644]
libs/nss/Makefile [new file with mode: 0644]
libs/nss/files/blank-cert9.db [new file with mode: 0644]
libs/nss/files/blank-key4.db [new file with mode: 0644]
libs/nss/files/system-pkcs11.txt [new file with mode: 0644]
libs/nss/patches/001-nss_standalone.patch [new file with mode: 0644]
libs/nss/patches/002-os_test.patch [new file with mode: 0644]
libs/nss/patches/003-openwrt_fix.patch [new file with mode: 0644]
libs/opencv/Makefile
libs/opencv/patches/010-fix-url.patch [new file with mode: 0644]
libs/openldap/Makefile
libs/pcre/Makefile
libs/pixman/Makefile
libs/protobuf-c/Makefile
libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch [new file with mode: 0644]
libs/protobuf/Makefile
libs/tiff/Makefile
libs/tiff/patches/020-CVE-2019-7663.patch [new file with mode: 0644]
libs/tiff/patches/021-CVE-2019-6128.patch [new file with mode: 0644]
mail/dovecot/Makefile
mail/dovecot/patches/100-openssl-deprecated.patch
mail/dovecot/patches/110-openssl-engine.patch
mail/mutt/Makefile
multimedia/ffmpeg/Makefile
multimedia/mjpg-streamer/Makefile
multimedia/mjpg-streamer/files/mjpg-streamer.config
multimedia/mjpg-streamer/files/mjpg-streamer.init
multimedia/mjpg-streamer/patches/010-optional-plugins-selection.patch
multimedia/mjpg-streamer/patches/020-remove-auto-lib-selection.patch
multimedia/youtube-dl/Makefile
multimedia/youtube-dl/patches/dont-use-pandoc.patch [deleted file]
net/aircrack-ng/Makefile
net/apcupsd/Makefile
net/apcupsd/files/apccontrol
net/apcupsd/patches/015-drop-doc.patch [new file with mode: 0644]
net/clamav/Makefile
net/ddns-scripts/Makefile
net/ddns-scripts/samples/slaac_sample.sh [new file with mode: 0755]
net/fping/Makefile
net/freeradius3/Makefile
net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch
net/freeradius3/patches/004-tls.c-allow-build-with-no-openssl-engine-support.patch [deleted file]
net/gnunet/Makefile
net/gnunet/patches/0001-fix-dist-for-experimental.patch [deleted file]
net/gnunet/patches/0002-credential-include-headers-in-dist-sources.patch [deleted file]
net/gnunet/patches/0003-reclaim-attribute-include-header-in-dist-sources.patch [deleted file]
net/gnunet/patches/0004-reclaim-include-reclaim.conf-in-source-dist.patch [deleted file]
net/gnunet/patches/0005-rest-plugins-include-headers-in-dist-sources.patch [deleted file]
net/gnunet/patches/001-fix-libgnunetabe-build.patch [new file with mode: 0644]
net/kea/Makefile [new file with mode: 0644]
net/kea/patches/001-fix-cross-compile.patch [new file with mode: 0644]
net/kea/patches/002-fix-host-compile.patch [new file with mode: 0644]
net/kea/patches/003-no-test-compile.patch [new file with mode: 0644]
net/keepalived/Config.in [new file with mode: 0644]
net/keepalived/Makefile
net/keepalived/files/keepalived.config
net/keepalived/files/keepalived.init
net/knot/Makefile
net/krb5/Makefile
net/krb5/files/krb5kdc
net/libreswan/Makefile [new file with mode: 0644]
net/libreswan/files/ipsec.conf [new file with mode: 0644]
net/libreswan/files/ipsec.init [new file with mode: 0755]
net/libreswan/files/ipsec.secrets [new file with mode: 0644]
net/mosquitto/Makefile
net/mosquitto/files/etc/init.d/mosquitto
net/net-snmp/Makefile
net/nginx/Makefile
net/ola/Makefile
net/ola/patches/100-protobuf-3.7.patch [new file with mode: 0644]
net/ola/patches/110-add-missing-config.h-incluude.patch [new file with mode: 0644]
net/ola/patches/120-compile-fix.patch [new file with mode: 0644]
net/openssh/Makefile
net/pptpd/Makefile
net/pptpd/files/pptpd.init
net/prosody/Makefile
net/ptunnel-ng/Makefile
net/rosy-file-server/Makefile [new file with mode: 0644]
net/rosy-file-server/files/rosyfs.config [new file with mode: 0644]
net/rosy-file-server/files/rosyfs.init [new file with mode: 0755]
net/samba4/Config.in
net/samba4/Makefile
net/samba4/files/samba.init
net/snort/files/snort.init
net/snort3/Makefile
net/stunnel/Makefile
net/stunnel/files/stunnel.init
net/tgt/Makefile
net/tor/Makefile
net/travelmate/Makefile
net/travelmate/files/travelmate.conf
net/travelmate/files/travelmate.sh
net/udptunnel/Makefile [new file with mode: 0644]
net/udptunnel/patches/001-multicast.patch [new file with mode: 0644]
net/udptunnel/patches/002-main_code_fix.patch [new file with mode: 0644]
net/unbound/Makefile
net/wget/Makefile
net/wifidog-ng/Makefile
net/wifidog-ng/files/wifidog-ng.init
net/znc/Makefile
net/znc/patches/120-openssl-deprecated.patch
utils/btrfs-progs/Config.in [new file with mode: 0644]
utils/btrfs-progs/Makefile
utils/collectd/Makefile
utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch [new file with mode: 0644]
utils/collectd/patches/052-correcting-all-the-wrongs.patch [new file with mode: 0644]
utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch [new file with mode: 0644]
utils/device-observatory/Makefile
utils/gpsd/Makefile
utils/gpsd/files/gpsd.init
utils/i2c-tools/Makefile
utils/pciutils/Makefile
utils/powertop/Makefile [new file with mode: 0644]
utils/powertop/patches/001-musl-fix-headers.patch [new file with mode: 0644]
utils/powertop/patches/002-strerror_r.patch [new file with mode: 0644]
utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch [new file with mode: 0644]
utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch [new file with mode: 0644]
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/conntrack.lua
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch [new file with mode: 0644]
utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch [deleted file]
utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch [new file with mode: 0644]
utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch [deleted file]
utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch [new file with mode: 0644]
utils/rtty/Makefile
utils/rtty/files/rtty.init
utils/tang/Makefile [new file with mode: 0644]
utils/tang/files/tangdw [new file with mode: 0755]
utils/tang/files/tangdx [new file with mode: 0644]
utils/tang/patches/Makefile_am.patch [new file with mode: 0644]
utils/tang/patches/rm-systemd-from-configure.patch [new file with mode: 0644]
utils/tang/patches/use-readlink-in-tangd-update.patch [new file with mode: 0644]
utils/ttyd/Makefile
utils/unrar/Makefile
utils/unrar/patches/100-makefile_fixes.patch
utils/vim/Makefile
utils/yara/Makefile
utils/yara/patches/010-libyara-Switch-to-OpenSSL-s-THREADID-API.patch [deleted file]

index 75d8bc2dc2781aabada91437dc4eacb52343d0b0..ef47a6391f562dadbdf9d30c7e969e8fe48ced6a 100644 (file)
@@ -42,7 +42,7 @@ All packages you commit or submit by pull-request should follow these simple gui
 * 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:
 
index ab130ec21d358c014ef03845ce71f67aa317d13b..aaf4934f64704e9aaaf541cc23a14121155af0a8 100644 (file)
@@ -8,13 +8,14 @@
 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
@@ -31,7 +32,6 @@ define Package/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
index ec78c26afd0ae30c75204bdaa53ac63a0a0e5aab..8dadb21a674502de0e04004a179927f44e177ad4 100644 (file)
@@ -8,13 +8,14 @@
 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
@@ -70,10 +71,9 @@ endef
 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
@@ -159,6 +159,7 @@ CONFIGURE_ARGS+= \
        $(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")
 
index 31134204342571eafa8d6b8104e338ef46431300..284ff05524adc6721e943928f6a9c575efdb90aa 100644 (file)
@@ -27,7 +27,7 @@
  ### 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
@@ -35,7 +35,7 @@
  
  ##### Active checks related
  
-@@ -131,8 +129,6 @@ Server=127.0.0.1
+@@ -132,8 +130,6 @@ Server=127.0.0.1
  # Default:
  # ServerActive=
  
@@ -44,7 +44,7 @@
  ### 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=
  
@@ -53,7 +53,7 @@
  ### 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
index 2c223ad1ce158898b88f7c5aa1f3683ed3ee48cc..764417a209b50d90d8fadc8b90bcfb87713cf84e 100644 (file)
@@ -1,11 +1,11 @@
 --- 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");
index dfce72c8491240ff6547e1b73601653ce04efc0d..eb40f60272ad367e4b6bb4dc052ccf54998dc8b3 100644 (file)
@@ -8,18 +8,17 @@
 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
@@ -34,11 +33,12 @@ define Package/lttng-tools
   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
diff --git a/devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch b/devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch
new file mode 100644 (file)
index 0000000..becb433
--- /dev/null
@@ -0,0 +1,45 @@
+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)
+ {
diff --git a/devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch b/devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch
new file mode 100644 (file)
index 0000000..5437de2
--- /dev/null
@@ -0,0 +1,345 @@
+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
+
diff --git a/devel/lttng-tools/patches/100-musl-compat.patch b/devel/lttng-tools/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index 8813f83..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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);
diff --git a/devel/lttng-tools/patches/200-use-extern.patch b/devel/lttng-tools/patches/200-use-extern.patch
deleted file mode 100644 (file)
index 180c061..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
---- 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 */
index e25894865ac51f135ff2fc7a35fdd84e54a7e66d..bf794fadb3a1f44c8910f9d9fddb8650d8802d31 100644 (file)
@@ -11,4 +11,4 @@ endif
 
 
 GO_VERSION_MAJOR_MINOR:=1.12
-GO_VERSION_PATCH:=1
+GO_VERSION_PATCH:=3
index 94522055347c4888bc0cc64177f0a78ade1bf1d0..bb7fcb1a74d0ba3644b1b7638ccdfd7b4f7acbd8 100644 (file)
@@ -18,7 +18,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \
 
 PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
 PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=0be127684df4b842a64e58093154f9d15422f1405f1fcff4b2c36ffc6a15818a
+PKG_HASH:=5c507abe8818429d74ebb650a4155d36bc3f9a725e59e76f5d6aca9690be2373
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 4690ddd4be3f1864a7598d2bb2fd87573588fb56..621cb7af69a3684e56cf4ef600f12ea141ef9e98 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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)?
@@ -41,9 +41,13 @@ endef
 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"
 
index fbd6ab3b60058afd016926badfa47b6090470207..61f0490a35992446ebd1e95b87fa363519de85f9 100644 (file)
@@ -1,7 +1,16 @@
-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:
  
index ba8ca2a6ee64100ece395785a06ee1421688e4ab..9264788f35427c2ef66e3d9a1f1451cd05f5c0a3 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 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
@@ -42,7 +42,7 @@ endef
 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
diff --git a/lang/luasocket/patches/040-remove-fpic-and-warnings.patch b/lang/luasocket/patches/040-remove-fpic-and-warnings.patch
new file mode 100644 (file)
index 0000000..95c17b1
--- /dev/null
@@ -0,0 +1,14 @@
+--- 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
index 84629ac8d41a5d35d4b36539537b4dd200d22e68..fd2b3f4c1884c0d2b1621437e7fa04ed9392d1a2 100644 (file)
@@ -10,19 +10,16 @@ include $(TOPDIR)/rules.mk
 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
 
@@ -32,47 +29,44 @@ define Package/node-arduino-firmata
   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))
-
index 578bd402b1733785898324b752d68bd7ce03ba3a..2f9bcf7c1a9a16750bb61b110bfce07d7ee36694 100644 (file)
 (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);
index 6e2fa3c58554b72cbdaf176e8d5fbe332e7b91d2..2e5da4e39b53ade8528ab815a0cc2e0bb1387d22 100644 (file)
@@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk
 
 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
 
@@ -33,7 +32,7 @@ define Package/node-cylon/default
   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
 
@@ -54,52 +53,55 @@ define Package/node-cylon-firmata
 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))
-
index ec5b19fe703ac60c5656542bbed1e9bf9ac04f09..be75cc49d2e3a15c60c577cf2d0b2bfeb71cb78e 100644 (file)
@@ -7,23 +7,20 @@
 
 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
@@ -34,43 +31,49 @@ define Package/node-hid
   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))
-
index 967506efd3215369f7bc7159f995378df106861a..250945e160fc5f128d115b0b4e3532816f70843d 100644 (file)
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=homebridge
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.4.47
+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:=c4a77a360f99fbf16247f5f229d29c748c4c54ed790b962ec3dfd5d4cf20a0f0
+PKG_HASH:=020a4d882c04ed26a3c96b8a5e82768b29309cf461aa9a17f330887ed12e3e6b
 
 PKG_BUILD_DEPENDS:=node/host
 PKG_USE_MIPS16:=0
@@ -37,6 +37,7 @@ define Package/node-homebridge/description
 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)
@@ -50,11 +51,11 @@ define Build/Compile
        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_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
-       rm -rf $(TMP_DIR)/npm-cache
+       rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+       rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
 endef
 
 define Package/node-homebridge/install
index 2c75acf0679e69959f17f5e41f480b896f6fa7ea..87dda6e1f41c5a1d8e5bc1b8a21b23ce8941a3b6 100644 (file)
@@ -9,18 +9,18 @@ include $(TOPDIR)/rules.mk
 
 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
@@ -29,8 +29,8 @@ define Package/node-serialport
   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
 
@@ -38,39 +38,34 @@ define Package/node-serialport/description
  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))
-
index cd3e149ec04b1f4b34eca653c80ddfed1322b6a8..849e17d912a15c197ce6f4d8b24119c716a8f5d7 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v8.14.1
-PKG_RELEASE:=1
+PKG_VERSION:=v8.15.1
+PKG_RELEASE:=2
 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
diff --git a/lang/node/patches/005-powerpc32_musl_support.patch b/lang/node/patches/005-powerpc32_musl_support.patch
new file mode 100644 (file)
index 0000000..ba8be05
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/deps/v8/src/libsampler/sampler.cc
++++ b/deps/v8/src/libsampler/sampler.cc
+@@ -456,8 +456,12 @@
+       reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R1]);
+   state->fp =
+       reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R31]);
+-#else
++#elif V8_TARGET_ARCH_32_BIT
+   // Some C libraries, notably Musl, define the regs member as a void pointer
++  state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[32]);
++  state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[1]);
++  state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[31]);
++#else
+   state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[32]);
+   state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[1]);
+   state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[31]);
index 724374227b2301ee830d170d9cea2455ce60bb48..832e8b93f76f56b1aec27e75dafbd9bcddf77cff 100644 (file)
@@ -8,14 +8,14 @@
 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>
 
@@ -32,7 +32,7 @@ define Package/perl-cgi
   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
 
index 92709c33b2591094dec3f8be431e4e62feb8a1e5..f5ce4e49a8535a441156ecdcb0db720eff228fd1 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.2.16
+PKG_VERSION:=7.2.17
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -17,7 +17,7 @@ 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:=7d91ed3c1447c6358a3d53f84599ef854aca4c3622de7435e2df115bf196e482
+PKG_HASH:=a3e5f51a9ae08813b3925bea3a4de02cd4906fcccf75646e267a213bb63bcf84
 
 PKG_FIXUP:=libtool autoreconf
 PKG_BUILD_PARALLEL:=1
index 21f5b09e1545c1d158f1a585194b7a1831e27e90..6106b4f81b7820a97a613b562b57bc348fdf088a 100644 (file)
@@ -11,12 +11,12 @@ start_instance() {
        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() {
index 14d90c00c0c57ccff054c10d18a874124f6ca422..fee9ee31a6f05791ea8dbda218d1c98be35b142e 100644 (file)
@@ -209,13 +209,73 @@ The name `*-src` must be the Python package name; so for `python-lxml-src` a equ
 
 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
 
index 030fd9391f9d8e3d20ee29ccf0df4e4a4876a69a..02e8966623b2bb1fa71a7cceeeb7156d550b1c37 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptodome
-PKG_VERSION:=3.7.3
+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:=1a222250e43f3c659b4ebd5df3e11c2f112aab6aef58e38af55ef5678b9f0636
+PKG_HASH:=68ad0ce4a374577a26bb7f458575abe3c2a342818b5280de6e5738870b7761b3
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodome-$(PKG_VERSION)
 
index 6f16b2175150f2ca49cfa6345f10bb9943390fed..cbaf70f25b367a5c05ba35fab31a3c2278301531 100644 (file)
@@ -1,50 +1,12 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -245,16 +245,6 @@
-     "Crypto.Signature",
-     "Crypto.Util",
-     "Crypto.Math",
--    "Crypto.SelfTest",
--    "Crypto.SelfTest.Cipher",
--    "Crypto.SelfTest.Hash",
--    "Crypto.SelfTest.IO",
--    "Crypto.SelfTest.Protocol",
--    "Crypto.SelfTest.PublicKey",
--    "Crypto.SelfTest.Random",
--    "Crypto.SelfTest.Signature",
--    "Crypto.SelfTest.Util",
--    "Crypto.SelfTest.Math",
- ]
- package_dir = {"Crypto": "lib/Crypto"}
- package_data = {
-@@ -268,30 +258,6 @@
-     "Crypto.Signature" : [ "*.pyi" ],
-     "Crypto.IO" : [ "*.pyi" ],
-     "Crypto.Util" : [ "*.pyi" ],
--    "Crypto.SelfTest.Cipher" : [
--        "test_vectors/AES/*.rsp",
--        "test_vectors/TDES/*.rsp",
--        "test_vectors/wycheproof/*.json",
--    ],
--    "Crypto.SelfTest.Hash" : [
--        "test_vectors/SHA1/*.rsp",
--        "test_vectors/SHA2/*.rsp",
--        "test_vectors/SHA3/*.txt",
--        "test_vectors/keccak/*.txt",
--        "test_vectors/BLAKE2s/*.txt",
--        "test_vectors/BLAKE2b/*.txt",
--        "test_vectors/wycheproof/*.json",
--    ],
--    "Crypto.SelfTest.Signature" : [
--        "test_vectors/DSA/*.*",
--        "test_vectors/ECDSA/*.*",
--        "test_vectors/PKCS1-v1.5/*.*",
--        "test_vectors/PKCS1-PSS/*.*",
--        "test_vectors/wycheproof/*.json",
--    ],
--    "Crypto.SelfTest.PublicKey" : [
--        "test_vectors/ECC/*.*",
--    ],
+@@ -293,6 +293,9 @@ package_data = {
+     ],
  }
  
- system_bits = 8 * struct.calcsize("P")
++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",
index 6691b7f04d89d881881d539eb4378710965fafdc..ec748204347850897cfcc12ecbd1c262608633ad 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptodomex
-PKG_VERSION:=3.7.3
+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:=b70fe991564e178af02ccf89435a8f9e8d052707a7c4b95bf6027cb785da3175
+PKG_HASH:=9251b3f6254d4274caa21b79bd432bf07afa3567c6f02f11861659fb6245139a
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
 
index 23e264ae3d2e361e9473efc88cc77bee12201ce2..cbaf70f25b367a5c05ba35fab31a3c2278301531 100644 (file)
@@ -1,50 +1,12 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -245,16 +245,6 @@
-     "Crypto.Signature",
-     "Crypto.Util",
-     "Crypto.Math",
--    "Crypto.SelfTest",
--    "Crypto.SelfTest.Cipher",
--    "Crypto.SelfTest.Hash",
--    "Crypto.SelfTest.IO",
--    "Crypto.SelfTest.Protocol",
--    "Crypto.SelfTest.PublicKey",
--    "Crypto.SelfTest.Random",
--    "Crypto.SelfTest.Signature",
--    "Crypto.SelfTest.Util",
--    "Crypto.SelfTest.Math",
- ]
- package_dir = {"Crypto": "lib/Crypto"}
- package_data = {
-@@ -268,30 +258,6 @@
-     "Crypto.Signature" : [ "*.pyi" ],
-     "Crypto.IO" : [ "*.pyi" ],
-     "Crypto.Util" : [ "*.pyi" ],
--    "Crypto.SelfTest.Cipher" : [
--        "test_vectors/AES/*.*",
--        "test_vectors/TDES/*.*",
--        "test_vectors/wycheproof/*.*",
--    ],
--    "Crypto.SelfTest.Hash" : [
--        "test_vectors/SHA1/*.*",
--        "test_vectors/SHA2/*.*",
--        "test_vectors/SHA3/*.*",
--        "test_vectors/keccak/*.*",
--        "test_vectors/BLAKE2s/*.*",
--        "test_vectors/BLAKE2b/*.*",
--        "test_vectors/wycheproof/*.*",
--    ],
--    "Crypto.SelfTest.Signature" : [
--        "test_vectors/DSA/*.*",
--        "test_vectors/ECDSA/*.*",
--        "test_vectors/PKCS1-v1.5/*.*",
--        "test_vectors/PKCS1-PSS/*.*",
--        "test_vectors/wycheproof/*.*",
--    ],
--    "Crypto.SelfTest.PublicKey" : [
--        "test_vectors/ECC/*.*",
--    ],
+@@ -293,6 +293,9 @@ package_data = {
+     ],
  }
  
- system_bits = 8 * struct.calcsize("P")
++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",
index 3986b14abbad0ebd5237d69d6248762f486b4dd2..a5b4f54d407c7b4d1d9b9bea54a322e0a502999a 100644 (file)
@@ -6,40 +6,62 @@ include $(TOPDIR)/rules.mk
 
 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))
diff --git a/lang/python/python-curl/patches/0001-support-for-mbedTLS.patch b/lang/python/python-curl/patches/0001-support-for-mbedTLS.patch
new file mode 100644 (file)
index 0000000..58112ee
--- /dev/null
@@ -0,0 +1,263 @@
+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
+
index a1b21e49f47c24efaf3443e373e9ed0f011bdf95..2ca2abc16e13e77daf5b9848d2e493084a90d688 100644 (file)
@@ -43,11 +43,7 @@ process_filespec() {
 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
 }
 
@@ -58,7 +54,9 @@ python="$4"
 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"
@@ -68,12 +66,12 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
 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
@@ -81,6 +79,8 @@ fi
 
 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.
@@ -88,14 +88,14 @@ legacy=
 #       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"
 
index 9990d5340ae0347313c08a5e15280384026ae477..c594f614ed34c240fe027f1da4e91eff2fe5d07c 100644 (file)
@@ -69,6 +69,7 @@ define PyPackage
 
   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)" \
@@ -115,6 +116,7 @@ define Build/Compile/PyMod
 endef
 
 PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
 PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON_PKG_SETUP_VARS ?=
 
@@ -124,6 +126,7 @@ define PyBuild/Compile/Default
        )
        $(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) \
index 069f75ba6e456e2f25c54407aa7ef538b6cb400e..1fec0d5492984729018ce8999bfc4c11dc70380b 100644 (file)
@@ -8,15 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytz
-PKG_VERSION:=2018.9
+PKG_VERSION:=2019.1
 PKG_RELEASE:=1
-PKG_LICENSE:=MIT
 
 PKG_SOURCE:=pytz-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
-PKG_HASH:=d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c
+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
@@ -31,8 +35,7 @@ define Package/python-pytz/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-  URL:=https://sourceforge.net/projects/pytz/
+  URL:=https://pythonhosted.org/pytz/
 endef
 
 define Package/python-pytz
index 401ed25a34567f9a2578fc7c8bfdaf537be5b097..d29db7e671c27ee7d5e705aea76fabd050342a8f 100644 (file)
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=voluptuous-serialize
 PKG_VERSION:=2.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
-PKG_SOURCE:=voluptuous-serialize-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous-serialize/
 PKG_HASH:=d30fef4f1aba251414ec0b315df81a06da7bf35201dcfb1f6db5253d738a154f
 
@@ -28,7 +28,9 @@ define Package/python3-voluptuous-serialize
   SUBMENU:=Python
   TITLE:=Python Voluptuous Serialize
   URL:=https://github.com/balloob/voluptuous-serialize
-  DEPENDS:=+python3-light
+  DEPENDS:= \
+       +python3-light \
+       +python3-voluptuous
   VARIANT:=python3
 endef
 
index 4a4245bb21f1f71d7a0cc51ea6f49a308b88a169..ed568ca96ab22311c5ba7172ee2a564ede55fcbb 100644 (file)
@@ -8,59 +8,68 @@
 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))
index 453220b9ba8c582e58011b197f0d9a84401a7675..6eec6bd362ae850dc7ad640198682766d4da9397 100644 (file)
@@ -12,7 +12,7 @@ include ../python-version.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@ -195,6 +195,8 @@ endef
 
 define Build/InstallDev
        $(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/
@@ -205,6 +207,15 @@ define Build/InstallDev
        $(CP) \
                $(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)/_sysconfigdata.py \
+               $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
 endef
 
 PYTHON_BASE_LIB_FILES:= \
diff --git a/lang/python/python/files/python-config.in b/lang/python/python/files/python-config.in
new file mode 100644 (file)
index 0000000..46f6c9c
--- /dev/null
@@ -0,0 +1,81 @@
+#!@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)
+
diff --git a/lang/python/python/patches/021-compileall-add-recursion-option.patch b/lang/python/python/patches/021-compileall-add-recursion-option.patch
new file mode 100644 (file)
index 0000000..fa75a42
--- /dev/null
@@ -0,0 +1,33 @@
+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
index e52a15233ae466391dbdeef720a87cd6be776058..4a3dddd6439bb867d69d5340157e0ab2aeac5b5e 100644 (file)
@@ -68,6 +68,7 @@ define Py3Package
 
   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)" \
@@ -114,6 +115,7 @@ define Build/Compile/Py3Mod
 endef
 
 PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
 PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON3_PKG_SETUP_VARS ?=
 
@@ -123,6 +125,7 @@ define Py3Build/Compile/Default
        )
        $(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) \
index bbb90e13ce7e625b1670164935ebf888e8d812f7..60fe7c69f737aae6a98731cfcb57d8d25b97281d 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -199,6 +199,7 @@ endef
 
 define Build/InstallDev
        $(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/
@@ -209,6 +210,9 @@ define Build/InstallDev
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
                $(1)/usr/lib/pkgconfig
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
+               $(1)/usr/bin/
 endef
 
 PYTHON3_BASE_LIB_FILES:= \
index b363ce6a4f967fd94486363b864ffce11e8e8ef6..5fd44305201f771c666dc82e2f19ec9d38f2d41d 100644 (file)
@@ -8,18 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruamel-yaml
-PKG_VERSION:=0.15.89
+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:=86d034aa9e2ab3eacc5f75f5cd6a469a2af533b6d9e60ea92edbba540d21b9b7
+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
-PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
diff --git a/libs/botan/Makefile b/libs/botan/Makefile
new file mode 100644 (file)
index 0000000..2b5c8af
--- /dev/null
@@ -0,0 +1,89 @@
+#
+# 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))
index 04a498f7539b5d7e62ef39d9e5ecd8fb965e6ccf..8fceca7e8838b9df3baf04913b205a52870f2ecd 100644 (file)
@@ -8,14 +8,14 @@
 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
@@ -47,15 +47,19 @@ $(call Package/file/Default)
   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 \
index 090339278440341f18a27781aa7d5e30f5698eb9..1ec13921b0a21afb77452a2ce37a6f989de3928e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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)?
diff --git a/libs/hiredis/patches/010-fix_pkconfig_file.patch b/libs/hiredis/patches/010-fix_pkconfig_file.patch
new file mode 100644 (file)
index 0000000..9557776
--- /dev/null
@@ -0,0 +1,34 @@
+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. >> $@
index 43f30d510f34935d669a0022385cab41816ed510..c6c87ff612b5c791d69cc7c3e66840ae32d86b7e 100644 (file)
@@ -8,12 +8,14 @@
 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
@@ -109,6 +111,11 @@ HOST_CONFIGURE_ARGS:= \
        --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
diff --git a/libs/icu/patches/001-change_optimization_option.patch b/libs/icu/patches/001-change_optimization_option.patch
new file mode 100644 (file)
index 0000000..6914a07
--- /dev/null
@@ -0,0 +1,13 @@
+--- 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'
+         ;;
diff --git a/libs/icu/patches/010-add-big-endian-arm-support.patch b/libs/icu/patches/010-add-big-endian-arm-support.patch
new file mode 100644 (file)
index 0000000..2c4dee8
--- /dev/null
@@ -0,0 +1,23 @@
+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__) || \
diff --git a/libs/jose/Makefile b/libs/jose/Makefile
new file mode 100644 (file)
index 0000000..f515cf8
--- /dev/null
@@ -0,0 +1,74 @@
+#
+# 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))
diff --git a/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch b/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch
new file mode 100644 (file)
index 0000000..5075760
--- /dev/null
@@ -0,0 +1,33 @@
+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
index 86088cda13b1042059ca3917a9a9518067cd69a0..1a6369ba4ca804ae3f48a39a2a25571c25c2fd1e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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
@@ -70,6 +70,8 @@ define Build/InstallDev
        $(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
index 5bb3faf90b692c4dff3c7c36b3f95759aaff4a17..ac7e4f93407e4b590587c59a0688318df8d44437 100644 (file)
@@ -9,11 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdouble-conversion
 PKG_VERSION:=3.1.4
-PKG_RELEASE:=1
+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:=95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
 
 PKG_MAINTAINER:=
@@ -21,6 +23,7 @@ PKG_LICENSE:=BSD-3c
 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
@@ -67,3 +70,4 @@ define Package/libdouble-conversion/install
 endef
 
 $(eval $(call BuildPackage,libdouble-conversion))
+$(eval $(call HostBuild))
index 98b1970f05a98d94fb0c4213b1e8f26b1fb339f5..dcaab6afb6193e4f8b3646d6f897351c85fe31ba 100644 (file)
@@ -1,12 +1,12 @@
 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
diff --git a/libs/libglog/patches/100-fix-musl-compilation.patch b/libs/libglog/patches/100-fix-musl-compilation.patch
new file mode 100644 (file)
index 0000000..dab64be
--- /dev/null
@@ -0,0 +1,13 @@
+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.
index fa8860531ff156a4edf7d78f21e96544dffbf5eb..87838725aa11b92a5380786b351a8a457ee29567 100644 (file)
@@ -8,17 +8,21 @@
 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
@@ -29,7 +33,7 @@ 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,
@@ -37,26 +41,18 @@ define Package/libhttp-parser/description
   (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))
index e35e4d53e2dfb4276273be179d57ce1bced8a331..bfa1d73e14baf75b2cc5f62fee1e9e07b7b6507d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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
diff --git a/libs/libmodbus/patches/0001-Only-set-SER_RS485_ENABLED-bit-of-existing-RS485-set.patch b/libs/libmodbus/patches/0001-Only-set-SER_RS485_ENABLED-bit-of-existing-RS485-set.patch
new file mode 100644 (file)
index 0000000..d24ef27
--- /dev/null
@@ -0,0 +1,43 @@
+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
+
diff --git a/libs/libmodbus/patches/0002-Oops-fix-OR-on-RS485-settings-1c5d969.patch b/libs/libmodbus/patches/0002-Oops-fix-OR-on-RS485-settings-1c5d969.patch
new file mode 100644 (file)
index 0000000..3742457
--- /dev/null
@@ -0,0 +1,25 @@
+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
+
index 90e4d5b3024226d5b9e110effa90e328193dced7..c2d29ae3a3e75eea4959fd8550bd70a2d23fb379 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libssh2
-PKG_VERSION:=1.8.1
+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:=40b517f35b1bb869d0075b15125c7a015557f53a5a3a6a8bffb89b69fd70f159
+PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
 
 PKG_FIXUP:=autoreconf
 
@@ -21,6 +21,7 @@ PKG_INSTALL:=1
 
 PKG_LICENSE:=BSD
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libssh2:libssh2
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_LIBSSH2_MBEDTLS \
index 091835f33b998d444328d60c48c361db265de3fa..ffb99d0b69d891e6e09cd57cb98f68027eacf928 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libstrophe
 PKG_VERSION:=0.9.2
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
@@ -56,7 +56,11 @@ define Build/InstallDev
        $(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
diff --git a/libs/log4cplus/Makefile b/libs/log4cplus/Makefile
new file mode 100644 (file)
index 0000000..9167da7
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# 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))
index 7b88f0ce4b7a2c8ead6c966ef202a087bbf1b3a9..2fe3740400f7adb6aac493419164e09f93e42811 100644 (file)
@@ -8,16 +8,16 @@
 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
@@ -34,11 +34,19 @@ define Package/lttng-ust
   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
index e1c20c6e5601c4d817f53697777c4ae07cb6462a..6dee8034107ae7ce009d65812e3f9521c4ffcd95 100644 (file)
@@ -1,7 +1,7 @@
 --- 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
diff --git a/libs/lttng-ust/patches/002-examples.patch b/libs/lttng-ust/patches/002-examples.patch
deleted file mode 100644 (file)
index 46449b7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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([
diff --git a/libs/nspr/Makefile b/libs/nspr/Makefile
new file mode 100644 (file)
index 0000000..a01ba13
--- /dev/null
@@ -0,0 +1,86 @@
+#
+# 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))
diff --git a/libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch b/libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch
new file mode 100644 (file)
index 0000000..4ab1df5
--- /dev/null
@@ -0,0 +1,103 @@
+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
+
diff --git a/libs/nspr/patches/002-Add-ARC-support.patch b/libs/nspr/patches/002-Add-ARC-support.patch
new file mode 100644 (file)
index 0000000..92785cc
--- /dev/null
@@ -0,0 +1,88 @@
+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
+
diff --git a/libs/nspr/patches/003-native_and_musl_fix.patch b/libs/nspr/patches/003-native_and_musl_fix.patch
new file mode 100644 (file)
index 0000000..c5485db
--- /dev/null
@@ -0,0 +1,23 @@
+--- 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
diff --git a/libs/nss/Makefile b/libs/nss/Makefile
new file mode 100644 (file)
index 0000000..c2d57f1
--- /dev/null
@@ -0,0 +1,142 @@
+#
+# 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))
diff --git a/libs/nss/files/blank-cert9.db b/libs/nss/files/blank-cert9.db
new file mode 100644 (file)
index 0000000..7d4bcf2
Binary files /dev/null and b/libs/nss/files/blank-cert9.db differ
diff --git a/libs/nss/files/blank-key4.db b/libs/nss/files/blank-key4.db
new file mode 100644 (file)
index 0000000..d47f08d
Binary files /dev/null and b/libs/nss/files/blank-key4.db differ
diff --git a/libs/nss/files/system-pkcs11.txt b/libs/nss/files/system-pkcs11.txt
new file mode 100644 (file)
index 0000000..1a264e9
--- /dev/null
@@ -0,0 +1,5 @@
+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})
+
diff --git a/libs/nss/patches/001-nss_standalone.patch b/libs/nss/patches/001-nss_standalone.patch
new file mode 100644 (file)
index 0000000..eb3b6fd
--- /dev/null
@@ -0,0 +1,247 @@
+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
diff --git a/libs/nss/patches/002-os_test.patch b/libs/nss/patches/002-os_test.patch
new file mode 100644 (file)
index 0000000..ce2b683
--- /dev/null
@@ -0,0 +1,18 @@
+--- 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
diff --git a/libs/nss/patches/003-openwrt_fix.patch b/libs/nss/patches/003-openwrt_fix.patch
new file mode 100644 (file)
index 0000000..d4af642
--- /dev/null
@@ -0,0 +1,86 @@
+--- 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
index 0a6f9ade8fd287336ebec9d436f9b21a03955998..b110787a28d43b0d756307db26db385f1496bb22 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 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)/
diff --git a/libs/opencv/patches/010-fix-url.patch b/libs/opencv/patches/010-fix-url.patch
new file mode 100644 (file)
index 0000000..cad061b
--- /dev/null
@@ -0,0 +1,11 @@
+--- 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()
index 8b459642901ee6be8f9557c3219775d4759950a3..f667d76703e586cd068f68fcdaf88407a8bcf237 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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/ \
@@ -24,6 +24,7 @@ PKG_FIXUP:=autoreconf
 
 PKG_CONFIG_DEPENDS := \
         CONFIG_OPENLDAP_DEBUG \
+        CONFIG_OPENLDAP_CRYPT \
         CONFIG_OPENLDAP_MONITOR \
         CONFIG_OPENLDAP_DB47 \
         CONFIG_OPENLDAP_ICU
@@ -53,6 +54,25 @@ define Package/libopenldap/config
        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
@@ -121,6 +141,12 @@ CONFIGURE_ARGS += \
        --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
index 945819e4cbc1b4ad3816108774586701ff3fd11b..1f141ebd252cc824b9a78f6359c55ccdccde56fa 100644 (file)
@@ -30,6 +30,7 @@ define Package/libpcre/default
   SECTION:=libs
   CATEGORY:=Libraries
   URL:=https://www.pcre.org/
+  DEPENDS:=$(CXX_DEPENDS)
 endef
 
 define Package/libpcre
@@ -45,7 +46,7 @@ endef
 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)
index d04e13a48aa16a4bd6f39fa0871c1c7343a5b9ba..8a6cae27628ddd0b1f93e14d1519fb269bc11baf 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pixman
-PKG_VERSION:=0.38.0
+PKG_VERSION:=0.38.4
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=a7592bef0156d7c27545487a52245669b00cf7e70054505381cff2136d890ca8
+PKG_HASH:=da66d6fd6e40aee70f7bd02e4f8f76fc3f006ec879d346bae6a723025cfbdde7
 PKG_SOURCE_URL:=https://www.cairographics.org/releases
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index 6199766c37859676ef757b731b7d692a7e35fbba..e044833180870145c2386e07401c7d9b455dcf8b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.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)
diff --git a/libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch b/libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch
new file mode 100644 (file)
index 0000000..2d83cec
--- /dev/null
@@ -0,0 +1,13 @@
+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
index c93527f054d66208a8918a3f49086d95cd146fb4..3d0a16f2807c158243beacab63724ca7644ade18 100644 (file)
@@ -8,19 +8,19 @@
 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
@@ -31,7 +31,7 @@ define Package/protobuf/Default
   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
 
index 0c272382b31af8a42cfebda2f6f7da09df7029ec..29d6998390a57034014316c3fe61a88320d040a0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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
diff --git a/libs/tiff/patches/020-CVE-2019-7663.patch b/libs/tiff/patches/020-CVE-2019-7663.patch
new file mode 100644 (file)
index 0000000..607b6de
--- /dev/null
@@ -0,0 +1,37 @@
+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
+
diff --git a/libs/tiff/patches/021-CVE-2019-6128.patch b/libs/tiff/patches/021-CVE-2019-6128.patch
new file mode 100644 (file)
index 0000000..cd42595
--- /dev/null
@@ -0,0 +1,49 @@
+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
+
index 1a0896244d4babb02e24aeb6f9a6fce3dfedc665..c32b6cf65ce715d9130262984b78897ed008dfe3 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.5
-PKG_RELEASE:=1
+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:=bfe112ec6d11f7d6c6f7f0440e3b6e2c840c15cec1e99466b5495765d54aaaff
+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>
@@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS:= \
 
 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
@@ -122,7 +123,8 @@ CONFIGURE_VARS += \
        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
index ecb00a77bf5a8a220f09c0db19324de47fabc770..72d447425bfc9b4d04da8ee006f0c23cc7b341dc 100644 (file)
  
 --- 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;
        }
@@ -18,7 +30,7 @@
        /* 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
index 9859c7328be32310774b92af6c1c2a57c3bc8a74..19326fb13b891ea6718cf01bc9f59079aed0cd41 100644 (file)
@@ -47,7 +47,7 @@
  
  #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;
  
@@ -60,7 +60,7 @@
  #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
@@ -70,7 +70,7 @@
        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)
  {
@@ -78,7 +78,7 @@
        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;
        }
index f9282394ae3642ac704335873281bb246059bd67..f11951225937ab93e20c8ada0a9c9859caee43c2 100644 (file)
@@ -8,13 +8,13 @@
 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+
index 9dffa515010205fb1e484544f8a7f4a1bdcbb62c..bffb9c3d8937abd0dd56da3132566c213665b9e6 100644 (file)
@@ -9,12 +9,12 @@
 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>
 
index ee014f431b40a3a355574fa2e9d7660eb190abe9..d39fd7fd615443d84ddd427acd477acf4edfb288 100644 (file)
@@ -6,17 +6,17 @@
 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
index a40d7873cf7b6a0f49ddb6cecff148f20f7e6374..1e57799103f22ee63980a1f8fd2af182ee779150 100644 (file)
@@ -11,5 +11,6 @@ config mjpg-streamer 'core'
        option led 'auto'
        option www '/www/webcam'
        option port '8080'
+       #option listen_ip '192.168.1.1'
        option username 'openwrt'
        option password 'openwrt'
index b7c7ec38f0c13afcee0fe6542cce9bfae8f4fed4..17fbf9b3ad364343acda70b0320c12ae95ab8599 100644 (file)
@@ -69,6 +69,9 @@ start_instance() {
                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"
 
index 4b7dd597f7321db3780195d83ef0f5d2bfcc30d4..f695389a37a27eba8fa73f105657ec9e459b636f 100644 (file)
@@ -19,6 +19,7 @@
  add_subdirectory(plugins/output_udp)
 -add_subdirectory(plugins/output_viewer)
 +#add_subdirectory(plugins/output_viewer)
+ add_subdirectory(plugins/output_zmqserver)
+
  #
  # mjpg_streamer executable
index 74c2ead67a75e2958463e06ec6169c56b10a7adf..0e5a1513896663b7dd430da5794a197c4a53aa15 100644 (file)
@@ -3,27 +3,27 @@
 @@ -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)
index 433c3b92f09c2bfeb57ac8bfc7f23ef2e4465f94..05289b83df05ddacbc65568a584c452d30b2efc9 100644 (file)
@@ -8,46 +8,47 @@
 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))
diff --git a/multimedia/youtube-dl/patches/dont-use-pandoc.patch b/multimedia/youtube-dl/patches/dont-use-pandoc.patch
deleted file mode 100644 (file)
index 51b3dd5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-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
index 51ce5e998ddf1dbf223ca921962b5c3a9f04fe87..c4f5d8dab5b73b7dacf958bbb6ecc86f149714d8 100644 (file)
@@ -9,13 +9,16 @@ include $(TOPDIR)/rules.mk
 
 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
@@ -33,12 +36,13 @@ PKG_CONFIG_DEPENDS:= \
        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
@@ -69,6 +73,11 @@ define Package/airmon-ng/description
   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 \
@@ -79,10 +88,10 @@ CONFIGURE_ARGS += \
        \
        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
 
index da18a0e165a4e6672146cc1d2a6eb3f0d2806444..5e4974c950e44dec3840bf9074585e586ae816ce 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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
@@ -39,6 +39,8 @@ define Package/apcupsd-cgi
   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, \
index 254935418b848052c2ef0a33633f1e02df800beb..740298f3b869196498ee0833261df302a61df32c 100644 (file)
@@ -20,7 +20,7 @@ exec_prefix=/usr
 
 APCPID=/var/run/apcupsd.pid
 APCUPSD=/usr/sbin/apcupsd
-SHUTDOWN=/sbin/shutdown
+SHUTDOWN=/sbin/halt
 SCRIPTSHELL=/bin/sh
 SCRIPTDIR=/etc/apcupsd
 WALL=true
@@ -101,11 +101,11 @@ case "$1" in
     ;;
     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}
diff --git a/net/apcupsd/patches/015-drop-doc.patch b/net/apcupsd/patches/015-drop-doc.patch
new file mode 100644 (file)
index 0000000..fb90b22
--- /dev/null
@@ -0,0 +1,10 @@
+--- 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/
index ba45fff84a25930b4971e6f894f879e818fd086a..b8d0625a973847531a2b036783f13eaf701197d6 100644 (file)
@@ -8,8 +8,8 @@
 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> \
@@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:clamav:clamav
 
 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
index bc3784dc0ac34def25234de70009a79f50765a2a..86c52dce27b86d408040bc00162ffbf450747f0e 100755 (executable)
@@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts
 PKG_VERSION:=2.7.8
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=
diff --git a/net/ddns-scripts/samples/slaac_sample.sh b/net/ddns-scripts/samples/slaac_sample.sh
new file mode 100755 (executable)
index 0000000..ea8f24d
--- /dev/null
@@ -0,0 +1,59 @@
+#!/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
+
index d3bdedde0f9f2e4accab439f695927f55bbefa13..34bfdd3be209821bfcbae979a000fa4db0e6ae96 100644 (file)
@@ -8,12 +8,12 @@
 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
@@ -27,7 +27,7 @@ define Package/fping
   SECTION:=net
   CATEGORY:=Network
   TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
-  URL:=http://fping.org/
+  URL:=https://fping.org/
 endef
 
 
index 4c8a658dee8fea058a4f37db8736561fb290841b..11b448150511f10874d763000d5fac74442c8c96 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_17
-PKG_RELEASE:=3
+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
 
@@ -54,7 +54,7 @@ endef
 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
@@ -349,7 +349,75 @@ define Package/freeradius3-mod-realm/conffiles
 /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)
@@ -427,22 +495,17 @@ CONFIGURE_ARGS+= \
        --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 \
@@ -491,6 +554,44 @@ else
   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
@@ -641,5 +742,12 @@ $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
 $(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))
index b909e1df4bfb321cf6a4dff8a353954cd51d993e..801550b06680c73375ad769407507efdc6f5550f 100644 (file)
@@ -27,7 +27,7 @@ Last-Update: 2017-05-30
  
        return state;
  }
-@@ -3151,7 +3151,7 @@ post_ca:
+@@ -3277,7 +3277,7 @@ post_ca:
        /*
         *      Callbacks, etc. for session resumption.
         */
@@ -36,7 +36,7 @@ Last-Update: 2017-05-30
                /*
                 *      Cache sessions on disk if requested.
                 */
-@@ -3221,7 +3221,7 @@ post_ca:
+@@ -3347,7 +3347,7 @@ post_ca:
        /*
         *      Setup session caching
         */
diff --git a/net/freeradius3/patches/004-tls.c-allow-build-with-no-openssl-engine-support.patch b/net/freeradius3/patches/004-tls.c-allow-build-with-no-openssl-engine-support.patch
deleted file mode 100644 (file)
index 6c14dea..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From 0b17cf6e39064b008792811a6babf4cd75ac7744 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Mon, 25 Feb 2019 10:48:48 -0300
-Subject: [PATCH] tls.c: allow build with no openssl engine support
-
-This avoids an ENGINE_cleanup call if openssl was compiled without
-engine support.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/src/main/tls.c b/src/main/tls.c
-index 73f0e3a3e8..9726953234 100644
---- a/src/main/tls.c
-+++ b/src/main/tls.c
-@@ -2743,7 +2743,9 @@ void tls_global_cleanup(void)
- #elif OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-       ERR_remove_thread_state(NULL);
- #endif
-+#ifndef OPENSSL_NO_ENGINE
-       ENGINE_cleanup();
-+#endif
-       CONF_modules_unload(1);
-       ERR_free_strings();
-       EVP_cleanup();
index 48f2a8f4f3d37cd1131d13bcadd2c75a24c22ac3..6cf315a9576647eb9d1a97f898a19729feaa0648 100644 (file)
@@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk
 
 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
@@ -131,26 +131,26 @@ define Package/gnunet/install
        $(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 \
@@ -158,9 +158,9 @@ define Package/gnunet/install
                $(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 )
 
@@ -182,6 +182,11 @@ define Build/InstallDev
        $(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
@@ -208,6 +213,7 @@ PLUGIN_transport-http_client:=transport_http_client transport_https_client
 
 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
 
@@ -216,9 +222,6 @@ PLUGIN_transport-udp:=transport_udp
 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
@@ -229,7 +232,7 @@ PLUGIN_dv:=transport_dv
 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
@@ -238,7 +241,7 @@ CONF_fs:=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
@@ -256,21 +259,12 @@ LIB_datastore:=datastore
 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
@@ -290,7 +284,6 @@ CONFLICTS_dhtcache-heap:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
 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
@@ -328,7 +321,7 @@ DEPENDS_gns-sqlite:=+gnunet-gns +gnunet-sqlite
 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
 
@@ -395,6 +388,7 @@ $(eval $(call PostInstFixSUIDPerms,gnunet-transport-wlan))
 $(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,))
@@ -405,7 +399,6 @@ $(eval $(call BuildComponent,fs,file-sharing 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))
@@ -431,7 +424,5 @@ $(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,)
 $(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))
diff --git a/net/gnunet/patches/0001-fix-dist-for-experimental.patch b/net/gnunet/patches/0001-fix-dist-for-experimental.patch
deleted file mode 100644 (file)
index 4fdde5a..0000000
+++ /dev/null
@@ -1,777 +0,0 @@
-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 */
diff --git a/net/gnunet/patches/0002-credential-include-headers-in-dist-sources.patch b/net/gnunet/patches/0002-credential-include-headers-in-dist-sources.patch
deleted file mode 100644 (file)
index 967b3db..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-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 = \
diff --git a/net/gnunet/patches/0003-reclaim-attribute-include-header-in-dist-sources.patch b/net/gnunet/patches/0003-reclaim-attribute-include-header-in-dist-sources.patch
deleted file mode 100644 (file)
index 2188c2c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-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
diff --git a/net/gnunet/patches/0004-reclaim-include-reclaim.conf-in-source-dist.patch b/net/gnunet/patches/0004-reclaim-include-reclaim.conf-in-source-dist.patch
deleted file mode 100644 (file)
index 7417aef..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-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
diff --git a/net/gnunet/patches/0005-rest-plugins-include-headers-in-dist-sources.patch b/net/gnunet/patches/0005-rest-plugins-include-headers-in-dist-sources.patch
deleted file mode 100644 (file)
index bbe5d5a..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-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);
diff --git a/net/gnunet/patches/001-fix-libgnunetabe-build.patch b/net/gnunet/patches/001-fix-libgnunetabe-build.patch
new file mode 100644 (file)
index 0000000..ed7474a
--- /dev/null
@@ -0,0 +1,33 @@
+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) \
diff --git a/net/kea/Makefile b/net/kea/Makefile
new file mode 100644 (file)
index 0000000..ec7e92f
--- /dev/null
@@ -0,0 +1,205 @@
+#
+# 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))
diff --git a/net/kea/patches/001-fix-cross-compile.patch b/net/kea/patches/001-fix-cross-compile.patch
new file mode 100644 (file)
index 0000000..d3a1521
--- /dev/null
@@ -0,0 +1,16 @@
+--- 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);
diff --git a/net/kea/patches/002-fix-host-compile.patch b/net/kea/patches/002-fix-host-compile.patch
new file mode 100644 (file)
index 0000000..01f20d1
--- /dev/null
@@ -0,0 +1,11 @@
+--- 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(
diff --git a/net/kea/patches/003-no-test-compile.patch b/net/kea/patches/003-no-test-compile.patch
new file mode 100644 (file)
index 0000000..9b484d5
--- /dev/null
@@ -0,0 +1,328 @@
+--- 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)
diff --git a/net/keepalived/Config.in b/net/keepalived/Config.in
new file mode 100644 (file)
index 0000000..0cddf09
--- /dev/null
@@ -0,0 +1,164 @@
+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
index a7acb6b166d99462a3c2c05109412cc05560c816..73196dd8283701566a3eaee4c239cfdb08236845 100644 (file)
@@ -8,12 +8,12 @@
 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+
@@ -21,30 +21,61 @@ PKG_LICENSE_FILES:=COPYING
 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
@@ -54,31 +85,182 @@ 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))
index 5fde1f89d5d2b521480f3e06b0e635782bfa1b5f..7c1975ad5a616f768c5a607e9ba07c4625af755a 100644 (file)
@@ -10,6 +10,7 @@ config global_defs
 #      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"
index 70e0b7310b979f96e1c68d3c82052393c2346455..4e63711f480ee9458308b478f72c04441d206a5d 100644 (file)
@@ -105,8 +105,14 @@ global_defs() {
        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() {
index ed740f06c4e48b170690b009322c330c3762936e..0d74f6868f9d620bd4dac87c96b757e24b60b58d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knot
-PKG_VERSION:=2.8.0
+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:=494ad926705018bd754d96711dc2129f3173f326a0b57d33978090ba4eef87ef
+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
@@ -144,6 +144,8 @@ define Package/knot-tests/description
        Usage: /usr/share/knot/runtests.sh
 endef
 
+export KNOT_VERSION_FORMAT=release
+
 CONFIGURE_ARGS +=                      \
        --enable-recvmmsg=no            \
        --disable-fastparser            \
index fd1e86b37d630bb375c330eec17b9581b7f5cee1..d72e29d2e77a380bba8503d8801f2a17ed05a864 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=krb5
 PKG_VERSION:=1.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -50,6 +50,12 @@ define Package/krb5-server
        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
@@ -124,22 +130,25 @@ endef
 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))
index dec7188e9b01e32f03b5fafbd300ce7780a182e4..fd428c933e46f235246905ad1f0a41b5f2511edc 100644 (file)
@@ -10,10 +10,10 @@ start() {
        [ -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
 }
diff --git a/net/libreswan/Makefile b/net/libreswan/Makefile
new file mode 100644 (file)
index 0000000..514c349
--- /dev/null
@@ -0,0 +1,126 @@
+#
+# 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))
diff --git a/net/libreswan/files/ipsec.conf b/net/libreswan/files/ipsec.conf
new file mode 100644 (file)
index 0000000..affa5b0
--- /dev/null
@@ -0,0 +1,46 @@
+# /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
diff --git a/net/libreswan/files/ipsec.init b/net/libreswan/files/ipsec.init
new file mode 100755 (executable)
index 0000000..6e30263
--- /dev/null
@@ -0,0 +1,207 @@
+#!/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 $?
+}
diff --git a/net/libreswan/files/ipsec.secrets b/net/libreswan/files/ipsec.secrets
new file mode 100644 (file)
index 0000000..a43754c
--- /dev/null
@@ -0,0 +1,17 @@
+# 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
index 2a1ee5914a639f69994126d02a9fccf9d1f63206..59323d68fd7d597f2c1c73343268e384e2a816b2 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mosquitto
 PKG_VERSION:=1.5.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
 PKG_CPE_ID:=cpe:/a:eclipse:mosquitto
index e7c1110c1034e1956e7d9f8223d837df67e6eb0c..b42fa8866c39df5e3fabfd55c979bb18b475163e 100755 (executable)
@@ -82,7 +82,7 @@ convert_mosq_general() {
        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
index 2180bfa5a8eba260a570dcf1f3641c9f4dc1d6fb..bfcaa90661728c3a57cd2287adc00fa007f34984 100644 (file)
@@ -40,7 +40,7 @@ define Package/libnetsnmp
 $(call Package/net-snmp/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libnl-tiny
+  DEPENDS:=+libnl-tiny +libpci
   TITLE:=Open source SNMP implementation (libraries)
 endef
 
index 4a52720594b1d427cc957cd1a46f0a7704ef8532..17794f87f4e7e47ec498a3d3dae2927b7b00ba0b 100644 (file)
@@ -8,12 +8,12 @@
 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>
@@ -71,6 +71,7 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
        CONFIG_NGINX_RTMP_MODULE \
        CONFIG_NGINX_TS_MODULE \
+       CONFIG_OPENSSL_ENGINE \
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -80,7 +81,7 @@ define Package/nginx/default
   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
 
@@ -104,7 +105,7 @@ define Package/nginx-ssl
 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
@@ -116,7 +117,7 @@ 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"
index fec430f9f83d40fb636a48691e35bc8a802df45f..a76ea79a9326744b6a809ea554040deacafe4cfc 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 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)?
diff --git a/net/ola/patches/100-protobuf-3.7.patch b/net/ola/patches/100-protobuf-3.7.patch
new file mode 100644 (file)
index 0000000..6979ced
--- /dev/null
@@ -0,0 +1,45 @@
+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.
+ //
diff --git a/net/ola/patches/110-add-missing-config.h-incluude.patch b/net/ola/patches/110-add-missing-config.h-incluude.patch
new file mode 100644 (file)
index 0000000..2453bd9
--- /dev/null
@@ -0,0 +1,25 @@
+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
diff --git a/net/ola/patches/120-compile-fix.patch b/net/ola/patches/120-compile-fix.patch
new file mode 100644 (file)
index 0000000..61ff1d3
--- /dev/null
@@ -0,0 +1,14 @@
+--- 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"
index d71cee690345ae04619018138480eadeeffa9730..39b02758f084d5049ffb08f9c0c0fb0d42b51855 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
 PKG_VERSION:=7.9p1
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@@ -180,7 +180,7 @@ CONFIGURE_ARGS += \
        --without-pam
 endif
 
-ifeq ($(CONFIG_OPENSSL_ENGINE_CRYPTO),y)
+ifeq ($(CONFIG_OPENSSL_ENGINE),y)
 CONFIGURE_ARGS+= \
        --with-ssl-engine
 endif
index e9f0d62c807dd2945951c1618da1938c2190e714..083254b834bcf0553650009b1c9b12954fcd8abf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptpd
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/poptop
@@ -18,8 +18,6 @@ PKG_HASH:=8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/pptpd
index dc945c4e8ce848ee057cee92426e414c71d96e54..322eaaf1b5ef3f0db786a1caab4cc1ce41653429 100644 (file)
@@ -12,7 +12,8 @@ OPTIONS_PPTP=/var/etc/options.pptpd
 validate_login_section() {
        uci_load_validate pptpd login "$1" "$2" \
                'username:string' \
-               'password:string'
+               'password:string' \
+               'remoteip:string'
 }
 
 validate_pptpd_section() {
@@ -32,8 +33,9 @@ setup_login() {
 
        [ -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() {
index f102735de633528644156a6725b4d2555cb7eba0..c5c0d89138d91f7d35c06eb5e7941186c17aee09 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
 PKG_VERSION:=0.11.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://prosody.im/downloads/source
@@ -30,7 +30,7 @@ define Package/prosody
   SUBMENU:=Instant Messaging
   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
 
@@ -44,10 +44,10 @@ define Package/prosody/conffiles
 /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
@@ -57,17 +57,11 @@ define Build/Configure
                --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
@@ -124,7 +118,7 @@ define Package/prosody/postinst
                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
                }
        }
index 3e1e2a479af6cdd977f33569dff196528b3d176b..cb71a7df8f4c9a3826a18132a29895b467b8f1f6 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.40
-PKG_RELEASE:=2
+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:=ad2f2032a79ad41e871c00d28c94670c10ed74920de54d977fe0a33a65fcac76
+PKG_HASH:=b61855dcffe920fd188e5239464b049231f83e550e24e76669eb49d59991baff
 
 PKG_LICENSE:=BSD-3
 PKG_LICENSE_FILES:=COPYING
@@ -30,11 +30,8 @@ endef
 
 CONFIGURE_ARGS += \
        --disable-pcap \
-       --disable-selinux
-
-CONFIGURE_VARS += \
-       ac_cv_header_bsd_stdlib_h=no \
-       ac_cv_search_arc4random=no
+       --disable-selinux \
+       --with-rngdev=/dev/urandom
 
 define Package/ptunnel-ng/install
        $(INSTALL_DIR) $(1)/usr/sbin
diff --git a/net/rosy-file-server/Makefile b/net/rosy-file-server/Makefile
new file mode 100644 (file)
index 0000000..c1a097d
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# 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))
diff --git a/net/rosy-file-server/files/rosyfs.config b/net/rosy-file-server/files/rosyfs.config
new file mode 100644 (file)
index 0000000..53ad71a
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# 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'
diff --git a/net/rosy-file-server/files/rosyfs.init b/net/rosy-file-server/files/rosyfs.init
new file mode 100755 (executable)
index 0000000..ebcd19d
--- /dev/null
@@ -0,0 +1,29 @@
+#!/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
+}
index f56bc4e6f8023621eafb3b2cec43b4dd6c5f38ff..99157702a468b6560397ade1993d788453f99653 100644 (file)
@@ -1,7 +1,6 @@
 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
@@ -12,13 +11,9 @@ config SAMBA4_SERVER_ACL
 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
@@ -31,7 +26,6 @@ config SAMBA4_SERVER_AVAHI
        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
@@ -81,7 +75,6 @@ config SAMBA4_SERVER_NETBIOS
 config SAMBA4_SERVER_WINBIND
        bool "Winbind support"
        depends on PACKAGE_samba4-server
-       depends on SAMBA4_SERVER_AD_DC
        help
                installs: winbindd (daemon) wbinfo
 
index e520c1059b0a2b76039b8b7fcba4c7974c977e70..4270be5dbf918ad5901ac63a1f28c8e042ff2377 100644 (file)
@@ -2,19 +2,22 @@
 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 \
@@ -29,6 +32,7 @@ PKG_CONFIG_DEPENDS:= \
        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
 
@@ -50,7 +54,7 @@ endef
 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 \
@@ -63,15 +67,17 @@ define Package/samba4-server
   $(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"
@@ -120,16 +126,33 @@ CONFIGURE_VARS += \
        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 \
@@ -156,6 +179,35 @@ CONFIGURE_ARGS += \
                --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
@@ -170,13 +222,6 @@ CONFIGURE_ARGS += \
                --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
@@ -193,10 +238,11 @@ 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=""
@@ -212,46 +258,55 @@ SAMBA4_IDMAP_MODULES_SHARED :=
 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
@@ -263,7 +318,7 @@ ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
        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
@@ -271,20 +326,35 @@ endif
 # 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)
@@ -303,15 +373,16 @@ define Build/Configure
        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
 
@@ -323,6 +394,21 @@ define Package/samba4-libs/install
        $(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
@@ -333,6 +419,8 @@ endef
 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
@@ -341,27 +429,15 @@ 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/
@@ -389,8 +465,10 @@ define Package/samba4-server/conffiles
 /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))
index 09714f0167fd0860c16ca6fc66527780b7c0065c..7e74a0c45b0908358ee5460603c62c47c57db410 100644 (file)
@@ -59,7 +59,12 @@ smb_header() {
 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() {
index c3d962902bc8e79f4a9ce5f966628bb8362236da..7905c6ff30c2fecc26d042fc29fd5a23f7d85261 100644 (file)
@@ -8,26 +8,29 @@ USE_PROCD=1
 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}
index f5f3d880723c1d4e45aedcf82e0b1a81200d1b4d..34efb7a9d843b26386e714b2bdad5152207a5eba 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=snort3
 PKG_VERSION:=3.0.0-beta
 PKG_VERSION_SHORT:=3.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -50,6 +50,7 @@ CMAKE_OPTIONS += \
        -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
index c5337777d5bd89bb9514a61457e7db5aa40460da..fb43335f60e671291ddf79140493a11264303f60 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stunnel
-PKG_VERSION:=5.50
+PKG_VERSION:=5.51
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0+
@@ -23,7 +23,7 @@ PKG_SOURCE_URL:= \
        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:=951d92502908b852a297bd9308568f7c36598670b84286d3e05d4a3a550c0149
+PKG_HASH:=77437cdd1aef1a621824bb3607e966534642fe90c69f4d2279a9da9fa36c3253
 
 PKG_FIXUP:=autoreconf
 PKG_FIXUP:=patch-libtool
index 0a2dfa41690d3c995598d760a257683e63cf3b80..739e16b94c4b7a5bff9522b4f376e148bc0bf7a3 100644 (file)
@@ -52,12 +52,13 @@ validate_service_options() {
                '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' \
@@ -232,7 +233,6 @@ print_service_options() {
                cert \
                CRLfile \
                CRLpath \
-               curve \
                debug \
                logId \
                engineId \
@@ -294,6 +294,8 @@ print_service_options() {
 
        print_lists_reduce : \
                ciphers \
+               curves \
+               ciphersuites \
                ;
 
        print_host_port \
index 97f47037245b4d05c860fd2b541230b6da49741d..fa65f3c752a242bc86485be44fe02fddcaa88ee6 100644 (file)
@@ -4,26 +4,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tgt
-PKG_VERSION:=1.0.75
-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:=1c719fdccc6ddc8e5de57a6e546aa64f41056a2fb1d710b8b2a22f65e08f5b90
+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
@@ -34,12 +35,7 @@ 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
@@ -50,7 +46,7 @@ define Package/tgt/install
        $(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/tgtd $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgt{d,adm} $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,tgt))
index 2e52975014b55bfb2acf21f67adf2e541420b9ff..ae4cb962cdd58cf4a4275082beb0d18464e9f04a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
 PKG_VERSION:=0.3.5.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
@@ -100,6 +100,7 @@ CONFIGURE_ARGS += \
        --disable-libscrypt \
        --disable-unittests \
        --disable-lzma \
+       --disable-zstd \
        --with-tor-user=tor \
        --with-tor-group=tor
 
index 0937f656f14630ea4c0fd090fd8eefa782a14352..55423b028d0fe71cecbedc0442316ed25b8f3c33 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=1.4.4
+PKG_VERSION:=1.4.5
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 7a8763a53909abb970cf6cdc1f0444692b5d15e5..1833b92a7a59f50ae989bbb8763a23bc865e0800 100644 (file)
@@ -5,10 +5,12 @@ config travelmate 'global'
        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'
index f541963166ac7f7a3b1e8fce27c630d3543de286..61095a4686520effc7d5baea02a4137d76591f4d 100755 (executable)
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.4.4"
+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"
@@ -100,9 +102,13 @@ f_envload()
        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
@@ -168,13 +174,16 @@ f_prep()
 #
 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)"
@@ -204,86 +213,83 @@ f_check()
                                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} ]
-                                       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}" ]
+                                       if [ ${trm_captive} -eq 1 ]
                                        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
-                               else
-                                       if [ "${trm_ifstatus}" != "${status}" ]
+                                       if [ ${trm_ifquality} -ge ${trm_minquality} ] && ([ ${trm_captive} -eq 0 ] || [ ${trm_netcheck} -eq 0 ] || [ "${result%/*}" != "net nok" ])
                                        then
-                                               trm_ifstatus="${status}"
-                                       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}')"
-                                       cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
-                                       if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ] || [ -n "${cp_domain}" ])
-                                       then
-                                               if [ "${trm_rebind:-0}" -eq 1 ] && [ -x "/etc/init.d/dnsmasq" ]
+                                               trm_ifstatus="$(ubus -S call network.interface dump 2>/dev/null | jsonfilter -l1 -e "@.interface[@.device=\"${ifname}\"].up")"
+                                               if [ "${trm_ifstatus}" = "true" ]
                                                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}')"
+                                                       if [ ${trm_captive} -eq 1 ]
+                                                       then
                                                                cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
-                                                       done
+                                                               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 IFS 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}" ]
@@ -298,7 +304,37 @@ f_jsnup()
                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}")" ]
@@ -311,10 +347,10 @@ f_jsnup()
        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
diff --git a/net/udptunnel/Makefile b/net/udptunnel/Makefile
new file mode 100644 (file)
index 0000000..e228261
--- /dev/null
@@ -0,0 +1,39 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=udptunnel
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cs.columbia.edu/~lennox/udptunnel
+PKG_HASH:=45c0e12045735bc55734076ebbdc7622c746d1fe4e6f7267fa122e2421754670
+
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYRIGHT
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/udptunnel
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Tunnel UDP packets over a TCP connection
+  URL:=http://www.cs.columbia.edu/~lennox/udptunnel/
+endef
+
+define Package/udptunnel/description 
+  UDPTunnel is a small program which can tunnel UDP packets bi-directionally
+  over a TCP connection. Its primary purpose (and original motivation) is to
+  allow multi-media conferences to traverse a firewall which allows only outgoing
+  TCP connections.
+endef
+
+define Package/udptunnel/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udptunnel $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,udptunnel))
diff --git a/net/udptunnel/patches/001-multicast.patch b/net/udptunnel/patches/001-multicast.patch
new file mode 100644 (file)
index 0000000..d69d139
--- /dev/null
@@ -0,0 +1,14 @@
+Description: Fix issue where udptunnel was failing to receive packets sent to a multicast address. (See #254834).
+Author: singh_chinmay@extenprise.net
+
+--- udptunnel-1.1.orig/udptunnel.c
++++ udptunnel-1.1/udptunnel.c
+@@ -217,7 +217,7 @@
+     (*relays)[i].udpaddr.sin_port = htons(udpport + i);
+     (*relays)[i].udpaddr.sin_family = AF_INET;
+     (*relays)[i].udp_ttl = udpttl;
+-    (*relays)[i].multicast_udp = IN_MULTICAST(htons(udpaddr.s_addr));
++    (*relays)[i].multicast_udp = IN_MULTICAST(htonl(udpaddr.s_addr));
+     (*relays)[i].tcpaddr.sin_addr = tcpaddr;
+     (*relays)[i].tcpaddr.sin_port = htons(tcpport + i);
diff --git a/net/udptunnel/patches/002-main_code_fix.patch b/net/udptunnel/patches/002-main_code_fix.patch
new file mode 100644 (file)
index 0000000..93043df
--- /dev/null
@@ -0,0 +1,67 @@
+Description: remove yp host lookup and fix some types
+Author: Jan Delgado <jdelgado@gmx.net>
+
+Index: udptunnel-1.1/host2ip.c
+===================================================================
+--- udptunnel-1.1.orig/host2ip.c
++++ udptunnel-1.1/host2ip.c
+@@ -4,7 +4,6 @@
+ #include <netdb.h>           /* gethostbyname() */
+ #include <netinet/in.h>      /* sockaddr_in */
+ #include <arpa/inet.h>       /* inet_addr() */
+-#include <rpcsvc/ypclnt.h>   /* YP */
+ #include <ctype.h>           /* isspace() */
+ #include "host2ip.h"
+@@ -37,19 +36,9 @@ struct in_addr host2ip(char *host)
+   else if ((hep = gethostbyname(host))) {
+     in = *(struct in_addr *)(hep->h_addr_list[0]);
+   }
+-  /* As a last resort, try YP. */
+   else {
+-    static char *domain = 0;  /* YP domain */
+-    char *value;              /* key value */
+-    int value_len;            /* length of returned value */
+-
+-    if (!domain) yp_get_default_domain(&domain);
+-    if (yp_match(domain, "hosts.byname", host, strlen(host), &value, &value_len) == 0) {
+-      in.s_addr = inet_addr(value);
+-    } else {
+       /* Everything failed */
+       in.s_addr = INADDR_ANY;
+-    }
+   }
+   return in;
+ } /* host2ip */
+Index: udptunnel-1.1/udptunnel.c
+===================================================================
+--- udptunnel-1.1.orig/udptunnel.c
++++ udptunnel-1.1/udptunnel.c
+@@ -423,7 +423,7 @@ static void await_incoming_connections(s
+     for (i = 0; i < relay_count; i++) {
+       if (FD_ISSET(relays[i].tcp_listen_sock, &readfds)) {
+         struct sockaddr_in client_addr;
+-        int addrlen = sizeof(client_addr);
++        socklen_t addrlen = sizeof(client_addr);
+         
+         if ((relays[i].tcp_sock =
+              accept(relays[i].tcp_listen_sock,
+@@ -478,7 +478,7 @@ static int udp_to_tcp(struct relay *rela
+   struct out_packet p;
+   int buflen;
+   struct sockaddr_in remote_udpaddr;
+-  int addrlen = sizeof(remote_udpaddr);
++  socklen_t addrlen = sizeof(remote_udpaddr);
+   if ((buflen = recvfrom(relay->udp_recv_sock, p.buf, UDPBUFFERSIZE, 0,
+                          (struct sockaddr *) &remote_udpaddr,
+@@ -555,7 +555,8 @@ static int tcp_to_udp(struct relay *rela
+       /* There isn't a UDP listener waiting on the other end, but
+        * that's okay, it's probably just not up at the moment or something.
+        * Use getsockopt(SO_ERROR) to clear the error state. */
+-      int err, len = sizeof(err);
++      int err;
++      socklen_t len = sizeof(err);
+       if (debug > 1) {
+         fprintf(stderr, "ECONNREFUSED on udp_send_sock; clearing.\n");
index 030c5ff1ea5077ad6c688bd04be0691a2c21596b..22c13051fb4c769bac3c523c8b741570bd742d68 100644 (file)
@@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.9.1
-PKG_RELEASE:=1
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.unbound.net/downloads
+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_CPE_ID:=cpe:/a:nlnetlabs:unbound
+
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -27,8 +28,8 @@ include $(INCLUDE_DIR)/package.mk
 
 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
@@ -113,6 +114,7 @@ CONFIGURE_ARGS += \
        --disable-dsa \
        --disable-gost \
        --enable-allsymbols \
+       --enable-ecdsa \
        --enable-tfo-client \
        --enable-tfo-server \
        --with-libexpat="$(STAGING_DIR)/usr" \
index ad6e93e779ccab04023070d9535f13de0822e754..62aed759d0387a5b1066f7d511b099b1dd17a392 100644 (file)
@@ -8,16 +8,18 @@
 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
index ecaf540445daaca0a51c2261fb59fb8d59c13cea..3909e2a13c9a766c88712f3f4bd7d340878ddfb0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.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)
 
index f39373278aea29071b895ada8c7ca826e6698ad9..d88acb5eafc51a0166d02478f86addc5db8ed92c 100644 (file)
@@ -5,117 +5,131 @@ START=95
 
 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
 }
index 1d325735d7d358acce14fd0d714eeda13ceca197..bbaba22130503e2266cc5458ca899ea1933ee2c8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
 PKG_VERSION:=1.7.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://znc.in/releases \
index c8fdda85561748ecd808c9ae42cdd7e1d98867cb..66a1731076aba6fee77061f4ee203f92ff4905df 100644 (file)
@@ -1,3 +1,14 @@
+--- a/src/Utils.cpp
++++ b/src/Utils.cpp
+@@ -29,7 +29,7 @@
+ #include <openssl/ssl.h>
+ #include <openssl/bn.h>
+ #include <openssl/rsa.h>
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (LIBRESSL_VERSION_NUMBER < 0x20700000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ #define X509_getm_notBefore X509_get_notBefore
+ #define X509_getm_notAfter X509_get_notAfter
+ #endif
 --- a/third_party/Csocket/Csocket.cc
 +++ b/third_party/Csocket/Csocket.cc
 @@ -47,10 +47,16 @@
  #define HAVE_ERR_REMOVE_STATE
  #ifdef OPENSSL_VERSION_NUMBER
  # if OPENSSL_VERSION_NUMBER >= 0x10000000
-@@ -594,9 +600,11 @@ void ShutdownCsocket()
- #ifndef OPENSSL_IS_BORINGSSL
-       CONF_modules_unload( 1 );
- #endif
+@@ -583,6 +589,7 @@ bool InitCsocket()
+ void ShutdownCsocket()
+ {
+ #ifdef HAVE_LIBSSL
 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ #if defined( HAVE_ERR_REMOVE_THREAD_STATE )
+       ERR_remove_thread_state( NULL );
+ #elif defined( HAVE_ERR_REMOVE_STATE )
+@@ -597,6 +604,7 @@ void ShutdownCsocket()
        ERR_free_strings();
        EVP_cleanup();
        CRYPTO_cleanup_all_ex_data();
diff --git a/utils/btrfs-progs/Config.in b/utils/btrfs-progs/Config.in
new file mode 100644 (file)
index 0000000..88cd869
--- /dev/null
@@ -0,0 +1,9 @@
+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
index d7c008c94327662a539e7460c0f74309f6ed01ba..6da2bff6e141757bfce77bfced1fccca7173c3a7 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
 PKG_VERSION:=4.20.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
@@ -28,7 +28,7 @@ define Package/btrfs-progs
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Filesystem
-  DEPENDS:=+libattr +libuuid +zlib +zstd +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
@@ -40,6 +40,10 @@ define Package/btrfs-progs/description
  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
 
@@ -53,6 +57,9 @@ CONFIGURE_ARGS += \
        --disable-convert \
        --disable-documentation \
        --disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
index 71dee42850976c06ab30d5287d8c189c1b34fc93..fea646dd9c26aa34f43af3ca0b0a4a157c5f481b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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/ \
diff --git a/utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch b/utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch
new file mode 100644 (file)
index 0000000..f95df9d
--- /dev/null
@@ -0,0 +1,81 @@
+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) {
diff --git a/utils/collectd/patches/052-correcting-all-the-wrongs.patch b/utils/collectd/patches/052-correcting-all-the-wrongs.patch
new file mode 100644 (file)
index 0000000..b56fe3d
--- /dev/null
@@ -0,0 +1,120 @@
+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) {
diff --git a/utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch b/utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch
new file mode 100644 (file)
index 0000000..752689e
--- /dev/null
@@ -0,0 +1,114 @@
+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. */
index 8a88c3ddbfdf920f2c88b802df48d653c24e2ddf..6970dad089df7e2e107950397fb8d8ca16ad2339 100644 (file)
@@ -2,14 +2,15 @@ include $(TOPDIR)/rules.mk
 
 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
index f6433ac38623b5006e92b1116a3f1762338f7e18..4272034128da29746f156e2ab9b93be8717774b4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 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)
index c4b709c94d9a4c37a63a83bdd1b3e0807069deb7..3271d43fdc1cfaebf26c3d8238ce2e2487a77c6a 100644 (file)
@@ -8,7 +8,7 @@ NAME=gpsd
 
 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' \
@@ -17,21 +17,19 @@ validate_section_gpsd()
 
 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
@@ -39,6 +37,11 @@ gpsd_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
 }
index 87df54aa95278daa379838555efd99e7005524ce..3e8a2b3d7eaca40eff1557b0e9f3db9dc65a55fb 100644 (file)
@@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk
 
 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)
@@ -123,6 +123,7 @@ define Package/i2c-tools/install
        $(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))
index e945d302fcf4a2b839870e9c403196bc672ad531..b5661c407d6317d2aeae84062d86b1c9c63b9579 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 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
 
@@ -30,7 +30,7 @@ define Package/pciutils
   CATEGORY:=Utilities
   TITLE:=Linux PCI Utilities
   URL:=http://mj.ucw.cz/pciutils.shtml
-  DEPENDS:=+libkmod +zlib
+  DEPENDS:=+libkmod +libpci
 endef
 
 define Package/pciutils/description
@@ -38,6 +38,15 @@ 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
@@ -54,12 +63,15 @@ define Build/Prepare
        $(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
@@ -67,7 +79,11 @@ endif
 
 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
@@ -77,7 +93,14 @@ define Package/pciutils/install
        $(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))
diff --git a/utils/powertop/Makefile b/utils/powertop/Makefile
new file mode 100644 (file)
index 0000000..430ce69
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# 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))
diff --git a/utils/powertop/patches/001-musl-fix-headers.patch b/utils/powertop/patches/001-musl-fix-headers.patch
new file mode 100644 (file)
index 0000000..9839d15
--- /dev/null
@@ -0,0 +1,22 @@
+--- ./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" {
diff --git a/utils/powertop/patches/002-strerror_r.patch b/utils/powertop/patches/002-strerror_r.patch
new file mode 100644 (file)
index 0000000..cf8659e
--- /dev/null
@@ -0,0 +1,20 @@
+--- 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;
+       }
diff --git a/utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch b/utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch
new file mode 100644 (file)
index 0000000..e01f0d5
--- /dev/null
@@ -0,0 +1,38 @@
+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
+
diff --git a/utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch b/utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch
new file mode 100644 (file)
index 0000000..46d0170
--- /dev/null
@@ -0,0 +1,30 @@
+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
+
index bab0fde1256d1c6f63c1f25a71532f3530ad5762..d00bc4686465350899eeb5e7778a61dbded57680 100644 (file)
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 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
index 93b26c266769c36e3d50cd4449ebaeb8e6fe49c9..1abb7a19136edc5722a1d7f0ecc3755c454107bc 100644 (file)
@@ -1,8 +1,12 @@
 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 }
index 19b5b1eab2a614437088d6d9b0e892d836202b49..25c144f023cf00ff6055945c02ea21784118036f 100644 (file)
@@ -2,9 +2,10 @@ local ubus = require "ubus"
 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", {})
@@ -13,6 +14,7 @@ local function scrape()
     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
@@ -23,7 +25,9 @@ local function scrape()
         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
index 681e3cadb846631e93063ce748d3b310fbe5fb06..0dc4d5c5f829e421411347156c2acfc662e27768 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 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/
@@ -193,68 +193,74 @@ CONFIGURE_ARGS +=                 \
        --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)
index 8c11f00ad6e15ea77fd3401c0c76eb38f7549500..9759cfa57bd50c45dcae00caff4d2006280d1ced 100644 (file)
@@ -1,7 +1,7 @@
-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
@@ -10,18 +10,15 @@ 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
-
diff --git a/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch b/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
new file mode 100644 (file)
index 0000000..4a42957
--- /dev/null
@@ -0,0 +1,25 @@
+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"
+   ;;
+   *)
diff --git a/utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
deleted file mode 100644 (file)
index bd1ac2d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-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
-
diff --git a/utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
new file mode 100644 (file)
index 0000000..ece3670
--- /dev/null
@@ -0,0 +1,66 @@
+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);
+ }
diff --git a/utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
deleted file mode 100644 (file)
index 374afc2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-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
-
diff --git a/utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
new file mode 100644 (file)
index 0000000..f63f015
--- /dev/null
@@ -0,0 +1,32 @@
+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)$@")
index f157251da774aa47012efbbd55bb02a0483cb102..480ce32051cef9f7204599fc0ced495afb77e3f1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtty
 PKG_VERSION:=6.5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
index 175e124246b39587d55549e81257f2d19ff34d7f..f18497af8acc2493847b2ecfd94eb1855417362f 100644 (file)
@@ -5,55 +5,60 @@ START=99
 
 BIN=/usr/sbin/rtty
 
+validate_rtty_section() {
+       uci_load_validate rtty rtty "$1" "$2" \
+               'interface:uci("network", "@interface"):lan' \
+               'id:maxlength(63)' \
+               'description:maxlength(126)' \
+               'host:host' \
+               'port:port' \
+               'ssl:bool:0' \
+               'keepalive:uinteger:5'
+}
+
 start_rtty() {
-    . /lib/functions/network.sh
-
-    local cfg="$1"
-    local interface ifname id description host port ssl
-
-    uci_validate_section rtty rtty "${1}" \
-        'interface:uci("network", "@interface"):lan' \
-        'id:maxlength(63)' \
-        'description:maxlength(126)' \
-        'host:host' \
-        'port:port' \
-        'ssl:bool:0' \
-        'keepalive:uinteger:5'
-    
-    [ $? -ne 0 ] && {
-        echo "validation failed" >&2
-        return 1
-    }
-
-    [ -n "$interface" ] && network_get_device ifname "$interface"
-
-    [ -z "$ifname" -a -z "$id" ] && {
-        echo "You must specify an interface or ID" >&2
-        return 1
-    }
-
-    [ -z "$host" ] && {
-        echo "host required" >&2
-        return 1
-    }
-    
-    [ -z "$port" ] && {
-        echo "port required" >&2
-        return 1
-    }
-
-    procd_open_instance
-    procd_set_param command $BIN -h $host -p $port -a -k $keepalive
-    [ -n "$ifname" ] && procd_append_param command -i "$ifname"
-    [ -n "$id" ] && procd_append_param command -I "$id"
-    [ -n "$description" ] && procd_append_param command -d "$description"
-    [ "$ssl" = "1" ] && procd_append_param command -s
-    procd_set_param respawn
-    procd_close_instance
+       . /lib/functions/network.sh
+
+       local ifname
+
+       [ "$2" = 0 ] || {
+               echo "validation failed" >&2
+               return 1
+       }
+
+       [ -n "$interface" ] && network_get_device ifname "$interface"
+
+       [ -z "$ifname" -a -z "$id" ] && {
+               echo "You must specify an interface or ID" >&2
+               return 1
+       }
+
+       [ -z "$host" ] && {
+               echo "host required" >&2
+               return 1
+       }
+
+       [ -z "$port" ] && {
+               echo "port required" >&2
+               return 1
+       }
+
+       procd_open_instance
+       procd_set_param command $BIN -h $host -p $port -a -k $keepalive
+       [ -n "$ifname" ] && procd_append_param command -i "$ifname"
+       [ -n "$id" ] && procd_append_param command -I "$id"
+       [ -n "$description" ] && procd_append_param command -d "$description"
+       [ "$ssl" = "1" ] && procd_append_param command -s
+       procd_set_param respawn
+       procd_close_instance
 }
 
 start_service() {
-    config_load rtty
-    config_foreach start_rtty rtty
+       config_load rtty
+       config_foreach validate_rtty_section rtty start_rtty
 }
 
+service_triggers() {
+       procd_add_reload_trigger "rtty"
+       procd_add_validation validate_rtty_section
+}
diff --git a/utils/tang/Makefile b/utils/tang/Makefile
new file mode 100644 (file)
index 0000000..0bc686d
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# 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))
diff --git a/utils/tang/files/tangdw b/utils/tang/files/tangdw
new file mode 100755 (executable)
index 0000000..91c8a89
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo "==================================" >> /var/log/tangd.log
+echo `date`: >> /var/log/tangd.log
+/usr/libexec/tangd $1 2>> /var/log/tangd.log
diff --git a/utils/tang/files/tangdx b/utils/tang/files/tangdx
new file mode 100644 (file)
index 0000000..2b15eb0
--- /dev/null
@@ -0,0 +1,12 @@
+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
+}
diff --git a/utils/tang/patches/Makefile_am.patch b/utils/tang/patches/Makefile_am.patch
new file mode 100644 (file)
index 0000000..647aca5
--- /dev/null
@@ -0,0 +1,45 @@
+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) \
diff --git a/utils/tang/patches/rm-systemd-from-configure.patch b/utils/tang/patches/rm-systemd-from-configure.patch
new file mode 100644 (file)
index 0000000..50dc68c
--- /dev/null
@@ -0,0 +1,37 @@
+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 \
diff --git a/utils/tang/patches/use-readlink-in-tangd-update.patch b/utils/tang/patches/use-readlink-in-tangd-update.patch
new file mode 100644 (file)
index 0000000..7c07b1d
--- /dev/null
@@ -0,0 +1,15 @@
+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=()
index 21efa69135ea5269e3db0b3627127ac8b99bbd39..5ec444e4d9d1be5e6bb4c18b53fba79e6e954ebd 100644 (file)
@@ -9,17 +9,16 @@ include $(TOPDIR)/rules.mk
 
 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
index 1ae48ed4ffe0bbd84e69d80c86582351c05b8a8f..528a585f55474b115a189e8ada71a47d607b9c11 100644 (file)
@@ -6,12 +6,12 @@
 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>
 
@@ -25,6 +25,12 @@ PKG_INSTALL:=1
 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
@@ -58,9 +64,6 @@ define Package/libunrar/description
   archives
 endef
 
-MAKE_FLAGS += \
-       LDFLAGS="$(TARGET_LDFLAGS) -lpthread"
-
 ifeq ($(BUILD_VARIANT),lib)
 define Build/Compile
        $(call Build/Compile/Default,lib)
index 9729612201efe285f737980e6c04ff31963fb651..65d06efc77b39f5da0278d6978e652e6d735d6e1 100644 (file)
@@ -1,22 +1,27 @@
 --- 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
  
index 8e9e3f3f0936079f9af062499a9d50277835eaa7..e4ab2682f251ddd41d18957ae4a88e35071afb1d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vim
 PKG_VERSION:=8.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 VIMVER:=81
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -21,7 +21,11 @@ PKG_CPE_ID:=cpe:/a:vim:vim
 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
@@ -242,3 +246,4 @@ $(eval $(call BuildPackage,vim-fuller))
 $(eval $(call BuildPackage,vim-runtime))
 $(eval $(call BuildPackage,vim-help))
 $(eval $(call BuildPackage,xxd))
+$(eval $(call HostBuild))
index e3f8727f60f138daeaff4924789696a733ce259e..81b93e65f9706023d7ccc7c579b6baf096143260 100644 (file)
@@ -8,14 +8,15 @@
 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
diff --git a/utils/yara/patches/010-libyara-Switch-to-OpenSSL-s-THREADID-API.patch b/utils/yara/patches/010-libyara-Switch-to-OpenSSL-s-THREADID-API.patch
deleted file mode 100644 (file)
index 3db191e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-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
-