Merge pull request #8214 from dddaniel/master
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Wed, 24 Apr 2019 12:07:08 +0000 (14:07 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Apr 2019 12:07:08 +0000 (14:07 +0200)
Adding awscli to python packages

251 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/lzmq/Makefile
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-mozilla-iot-gateway/Makefile
lang/node-serialport/Makefile
lang/node/Makefile
lang/node/patches/004-openssl-deprecated.patch
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/Jinja2/Makefile
lang/python/README.md
lang/python/python-cffi/Makefile
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-hyperlink/Makefile
lang/python/python-package.mk
lang/python/python-pytz/Makefile
lang/python/python-slugify/Makefile
lang/python/python-twisted/Makefile
lang/python/python-twisted/patches/001-omit-tkconch.patch
lang/python/python-twisted/patches/002-omit-tests.patch
lang/python/python-urllib3/Makefile
lang/python/python-voluptuous-serialize/Makefile
lang/python/python-yaml/Makefile
lang/python/python3-netifaces/Makefile [new file with mode: 0644]
lang/python/python3-package.mk
lang/python/python3-pyroute2/Makefile [new file with mode: 0644]
lang/python/python3-unidecode/Makefile [new file with mode: 0644]
lang/python/ruamel-yaml/Makefile
libs/boost/Makefile
libs/botan/Makefile
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/010-add-big-endian-arm-support.patch [new file with mode: 0644]
libs/jose/Makefile
libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch [new file with mode: 0644]
libs/jose/patches/020-openssl-deprecated.patch [new file with mode: 0644]
libs/jose/patches/Fix_minor_leak_upstream_198f720.patch [deleted file]
libs/ldns/Makefile
libs/libgpiod/Makefile
libs/libhttp-parser/Makefile
libs/libmicrohttpd/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/libsndfile/Makefile
libs/libssh2/Makefile
libs/libstrophe/Makefile
libs/libxerces-c/Makefile
libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch
libs/lttng-ust/Makefile
libs/lttng-ust/patches/001-no_docs_tests.patch
libs/lttng-ust/patches/002-examples.patch [deleted file]
libs/measurement-kit/Makefile
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/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/sqlite3/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]
libs/zmq/Makefile
libs/zmq/patches/020-map_with_const_string_with_ublic++.patch
libs/zmq/patches/100-fix-cxx-include-order.patch [deleted file]
mail/dovecot/Makefile
mail/dovecot/patches/100-openssl-deprecated.patch
mail/dovecot/patches/110-openssl-engine.patch
mail/mutt/Makefile
multimedia/ffmpeg/Makefile
multimedia/gst1-libav/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/files/radiusd.init
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
net/kea/patches/001-fix-cross-compile.patch
net/keepalived/Makefile
net/keepalived/patches/001-fix-systemd.patch [deleted file]
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/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch [new file with mode: 0644]
net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch [new file with mode: 0644]
net/miniupnpc/Makefile
net/miniupnpc/patches/100-no-fPIC.patch [new file with mode: 0644]
net/miniupnpc/patches/100-no_minixml_test.patch [deleted file]
net/miniupnpc/patches/300-add-listdevices-to-cmake.patch [new file with mode: 0644]
net/miniupnpd/Makefile
net/miniupnpd/patches/100-build-on-OpenWrt.patch
net/miniupnpd/patches/200-remove-default-cflags.patch [new file with mode: 0644]
net/mosquitto/Makefile
net/mosquitto/files/etc/init.d/mosquitto
net/net-snmp/Makefile
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/200-idmapd-add-missing-libgen-header.patch [new file with mode: 0644]
net/nginx/Makefile
net/obfs4proxy/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/openssh/patches/0000-CVE-2018-20685.patch [deleted file]
net/openssh/patches/0001-fix-key-type-check.patch [deleted file]
net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch [deleted file]
net/openssh/patches/0003-sanitize-scp-filenames-via-snmprintf.patch [deleted file]
net/openssh/patches/0004-have-progressmeter-force-update-at-beginning-and-end-transfer.patch [deleted file]
net/openssh/patches/0005-check-filenames-in-scp-client.patch [deleted file]
net/openssh/patches/0006-scp-handle-braces.patch [deleted file]
net/openssh/patches/1001-fix-compilation-with-openssl-built-without-ECC.patch [deleted file]
net/openssh/patches/1002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch [deleted file]
net/p910nd/Makefile
net/p910nd/files/p910nd.config
net/p910nd/files/p910nd.init
net/prosody/Makefile
net/ptunnel-ng/Makefile
net/samba4/Config.in
net/samba4/Makefile
net/samba4/files/samba.init
net/shorewall-core/Makefile
net/shorewall-lite/Makefile
net/shorewall/Makefile
net/shorewall6-lite/Makefile
net/shorewall6/Makefile
net/snort/files/snort.init
net/snort3/Makefile
net/snort3/patches/002-ignore-liblzma.patch [new file with mode: 0644]
net/softethervpn5/Makefile
net/stunnel/Makefile
net/stunnel/files/stunnel.init
net/tgt/Makefile
net/tor/Makefile
net/transmission/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/unbound/files/README.md
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/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/micrond/Makefile [new file with mode: 0644]
utils/micrond/files/etc/init.d/micrond [new file with mode: 0755]
utils/micrond/files/usr/lib/micron.d/.keep [new file with mode: 0644]
utils/micrond/src/Makefile [new file with mode: 0644]
utils/micrond/src/micrond.c [new file with mode: 0644]
utils/mmc-utils/Makefile
utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch [new file with mode: 0644]
utils/mmc-utils/patches/0001-Check-calloc-s-return-value-before-using-the-pointer.patch [new file with mode: 0644]
utils/mmc-utils/patches/0002-Cleanup-memory-in-error-case.patch [new file with mode: 0644]
utils/mmc-utils/patches/0003-Fix-parsing-of-character-in-to_binstr.patch [new file with mode: 0644]
utils/mmc-utils/patches/0004-Optimize-to_binstr-function.patch [new file with mode: 0644]
utils/mmc-utils/patches/0005-Add-eMMC-vendor-Micron-to-table.patch [new file with mode: 0644]
utils/mmc-utils/patches/0006-Fix-parsing-of-Product-Revision-and-Serial-Number.patch [new file with mode: 0644]
utils/mmc-utils/patches/0007-Add-various-SD-eMMC-vendors-to-table.patch [new file with mode: 0644]
utils/mmc-utils/patches/0008-Various-fixes.patch [new file with mode: 0644]
utils/mmc-utils/patches/0009-mmc-utils-let-FFU-mode-use-CMD23-and-CMD25.patch [new file with mode: 0644]
utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch [deleted file]
utils/nano/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/rtty/Makefile
utils/rtty/files/rtty.init
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]
utils/zstd/Makefile

index ef47a6391f562dadbdf9d30c7e969e8fe48ced6a..0e4b4ce636e5c2e84aa9da8b52af22927908bd0f 100644 (file)
@@ -18,7 +18,7 @@ All packages you commit or submit by pull-request should follow these simple gui
 * Convenience macros for popular mirrors are defined. Using these macros will make your package downloads more robust by mapping to a list of possible source mirrors for archive availability.
     - @SF - Sourceforge (downloads.sourceforge.net) with 5 retries due to re-directs
     - @GITHUB - Github (raw.githubusercontent.com) with 5 retries due to re-directs
-    - @GNU - 8 regional servers 
+    - @GNU - 8 regional servers
     - @GNOME - 8 regional servers
     - @SAVANNAH - 8 regional servers
     - @APACHE - 8 regional servers
@@ -30,7 +30,7 @@ All packages you commit or submit by pull-request should follow these simple gui
 * Provide an up-to-date Copyright notice or **none**. Copyright should not be assigned to OpenWrt unless you are explicitly requested by or working under contract to OpenWrt. Assigning a Copyright to yourself or organization you represent is acceptable.
 * A (PKG_)MAINTAINER definition listing either yourself and/or another person responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker `<jdh@jdhs-email-provider.org`>). Listing multiple maintainers is encouraged in order to keep the package active and up-to-date. Leaving this blank will also be accepted, however the review process may not be as quick as one with a maintainer.
 * A PKG_LICENSE tag declaring the main license of the package.
-    (E.g.: PKG_LICENSE:=GPL-2.0+) Please use SPDX identifiers if possible (see list at the bottom).
+    (E.g.: PKG_LICENSE:=GPL-2.0-or-later) Please use SPDX identifiers if possible (see list at the bottom).
 * An optional PKG_LICENSE_FILES tag including the filenames of the license-files in the source-package.
     (E.g.: PKG_LICENSE_FILES:=COPYING)
 * PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
@@ -87,7 +87,7 @@ Pull requests are the easiest way to contribute changes to git repos at Github.
 * If you are unsure if your change is suitable, please use a pull request.
 
 ### Common LICENSE tags (short list)  
-(Complete list can be found at: <http://spdx.org/licenses>)
+(Complete list can be found at: <https://spdx.org/licenses>)
 
 | Full Name | Identifier  |
 |---|:---|
@@ -95,30 +95,30 @@ Pull requests are the easiest way to contribute changes to git repos at Github.
 |Apache License 1.1|Apache-1.1|
 |Apache License 2.0|Apache-2.0|
 |Artistic License 1.0|Artistic-1.0|
-|Artistic License 1.0 (Perl)|Artistic-1.0-Perl|
 |Artistic License 1.0 w/clause 8|Artistic-1.0-cl8|
+|Artistic License 1.0 (Perl)|Artistic-1.0-Perl|
 |Artistic License 2.0|Artistic-2.0|
-|BSD 2-clause "Simplified" License|BSD-2-Clause|
-|BSD 2-clause FreeBSD License|BSD-2-Clause-FreeBSD|
-|BSD 2-clause NetBSD License|BSD-2-Clause-NetBSD|
-|BSD 3-clause "New" or "Revised" License|BSD-3-Clause|
-|BSD 3-clause Clear License|BSD-3-Clause-Clear|
-|BSD 4-clause "Original" or "Old" License|BSD-4-Clause|
-|BSD Protection License|BSD-Protection|
+|BSD 2-Clause "Simplified" License|BSD-2-Clause|
+|BSD 2-Clause FreeBSD License|BSD-2-Clause-FreeBSD|
+|BSD 2-Clause NetBSD License|BSD-2-Clause-NetBSD|
+|BSD 3-Clause "New" or "Revised" License|BSD-3-Clause|
 |BSD with attribution|BSD-3-Clause-Attribution|
+|BSD 3-Clause Clear License|BSD-3-Clause-Clear|
+|BSD 4-Clause "Original" or "Old" License|BSD-4-Clause|
 |BSD-4-Clause (University of California-Specific)|BSD-4-Clause-UC|
-|GNU General Public License v1.0 only|GPL-1.0|
-|GNU General Public License v1.0 or later|GPL-1.0+|
-|GNU General Public License v2.0 only|GPL-2.0|
-|GNU General Public License v2.0 or later|GPL-2.0+|
-|GNU General Public License v3.0 only|GPL-3.0|
-|GNU General Public License v3.0 or later|GPL-3.0+|
-|GNU Lesser General Public License v2.1 only|LGPL-2.1|
-|GNU Lesser General Public License v2.1 or later|LGPL-2.1+|
-|GNU Lesser General Public License v3.0 only|LGPL-3.0|
-|GNU Lesser General Public License v3.0 or later|LGPL-3.0+|
-|GNU Library General Public License v2 only|LGPL-2.0|
-|GNU Library General Public License v2 or later|LGPL-2.0+|
+|BSD Protection License|BSD-Protection|
+|GNU General Public License v1.0 only|GPL-1.0-only|
+|GNU General Public License v1.0 or later|GPL-1.0-or-later|
+|GNU General Public License v2.0 only|GPL-2.0-only|
+|GNU General Public License v2.0 or later|GPL-2.0-or-later|
+|GNU General Public License v3.0 only|GPL-3.0-only|
+|GNU General Public License v3.0 or later|GPL-3.0-or-later|
+|GNU Lesser General Public License v2.1 only|LGPL-2.1-only|
+|GNU Lesser General Public License v2.1 or later|LGPL-2.1-or-later|
+|GNU Lesser General Public License v3.0 only|LGPL-3.0-only|
+|GNU Lesser General Public License v3.0 or later|LGPL-3.0-or-later|
+|GNU Library General Public License v2 only|LGPL-2.0-only|
+|GNU Library General Public License v2 or later|LGPL-2.0-or-later|
 |Fair License|Fair|
 |ISC License|ISC|
 |MIT License|MIT|
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..e758ad2e1a96c29ad5b1e110e494191420d9c715 100644 (file)
@@ -11,4 +11,4 @@ endif
 
 
 GO_VERSION_MAJOR_MINOR:=1.12
-GO_VERSION_PATCH:=1
+GO_VERSION_PATCH:=4
index 94522055347c4888bc0cc64177f0a78ade1bf1d0..92714d3a0a056197a3bc81bb186c59a8bb869782 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:=4affc3e610cd8182c47abbc5b0c0e4e3c6a2b945b55aaa2ba952964ad9df1467
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 560a22e6366e00bfb85a62592291f9ead54f92a5..210b88ed3c715f2ac954a18e284c26833c34827e 100644 (file)
@@ -25,7 +25,7 @@ define Package/lzmq
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Lua ZeroMQ binding
-  URL:=https://github.com/moteus/lzmq/
+  URL:=https://github.com/zeromq/lzmq
   DEPENDS:= +lua +libzmq
 endef
 
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..6cd500467422d895f30d6666722187c15d2ebdf8 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_NPM_NAME:=node-hid
+PKG_NAME:=$(PKG_NPM_NAME)
+PKG_VERSION:=0.7.7
 PKG_RELEASE:=2
 
-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,50 @@ 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)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC) -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-$(TMPNPM) \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+       rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
 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..ba5133a0dc63378bdfe5a6fc104424415d1551de 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_RELEASE:=1
+PKG_VERSION:=0.4.48
+PKG_RELEASE:=2
 
 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,9 @@ 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)
+
+TARGET_CFLAGS+=$(FPIC)
 
 define Build/Prepare
        $(INSTALL_DIR) $(PKG_BUILD_DIR)
@@ -50,11 +53,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 c555edbd54c2fc9547252fce463f980901518568..9f0d75469729fd8fa2ffa5e6d7a1e9b68b12834f 100644 (file)
@@ -9,16 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=mozilla-iot-gateway
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.6.1
-PKG_RELEASE:=1
-PKG_REV:=2bcdf4866872b1e8992ee70ff6fc65566d6288d8
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mozilla-iot/gateway.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=2
+
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=c424b6f5f011c0cceb455458c855854395d47e902fd4ec2d63564c5e736d4fcd
+PKG_SOURCE_URL:=https://codeload.github.com/mozilla-iot/gateway/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=a5ff36942b686ea39f6d1e5d369cd783d6e2265f19262856647de7e596aa1a77
 
 PKG_BUILD_DEPENDS:=node/host openzwave
 
@@ -53,6 +49,8 @@ endef
 
 CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
+TARGET_CFLAGS+=$(FPIC)
+
 define Build/Compile
        $(MAKE_VARS) \
        $(MAKE_FLAGS) \
index 2c75acf0679e69959f17f5e41f480b896f6fa7ea..3c77f177ad7320c79bf707b2d4cb906634b131fc 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_VERSION:=7.1.4
 PKG_RELEASE:=2
 
 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,37 @@ 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
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+TARGET_CFLAGS+=$(FPIC)
 
 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-$(TMPNPM) \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+       npm install -g --build-from-source $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+       rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
 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..b807cc9ef90e80b2b7bab89620574535e6161ff9 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v8.14.1
+PKG_VERSION:=v8.16.0
 PKG_RELEASE:=1
 PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=b1df87803ddffb76fc6739f025f69f6b8288514fcd2f278f0d675ac3d52a6b9b
+PKG_HASH:=3515e8e01568a5dc4dff3d91a76ebc6724f5fa2fbb58b4b0c5da7b178a2f7340
 
 HOST_BUILD_DEPENDS:=python/host
 PKG_BUILD_DEPENDS:=python/host
index 8b27ab578115e1f3c7a8a6f26d656e7078e3b5e8..7fae22343866114bb356e07d2253de35d67d40dc 100644 (file)
@@ -55,7 +55,7 @@ index c3779c0..611fb43 100644
    BIO_get_mem_ptr(bio, &mem);
    info->Set(context, env->valid_to_string(),
              String::NewFromUtf8(env->isolate(), mem->data,
-@@ -6194,8 +6208,12 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) {
+@@ -6191,8 +6205,12 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) {
  }
  
  void InitCryptoOnce() {
@@ -68,7 +68,7 @@ index c3779c0..611fb43 100644
  
    // --openssl-config=...
    if (!openssl_config.empty()) {
-@@ -6217,10 +6235,10 @@ void InitCryptoOnce() {
+@@ -6214,10 +6232,10 @@ void InitCryptoOnce() {
      }
    }
  
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 c9007df7cca147dbc51ae19a86892fa9caca87cb..4151c2b24ad4ac7029b33550bc5e7467755bec07 100644 (file)
@@ -5,19 +5,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Jinja2
-PKG_VERSION:=2.10
+PKG_VERSION:=2.10.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/J/Jinja2
-PKG_HASH:=f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4
-PKG_BUILD_DEPENDS:=python3
+PKG_HASH:=065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013
+
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-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 ../python3-package.mk
@@ -26,8 +23,8 @@ define Package/python3-jinja2
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Jinja2
   URL:=http://jinja.pocoo.org/
-  TITLE:=python3-jinja2
   DEPENDS:=+python3-light +python3-markupsafe
   VARIANT:=python3
 endef
@@ -40,3 +37,4 @@ endef
 
 $(eval $(call Py3Package,python3-jinja2))
 $(eval $(call BuildPackage,python3-jinja2))
+$(eval $(call BuildPackage,python3-jinja2-src))
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 70ea42d9cd30d979a0b4ec0b60f5e837a06491f4..b450d17aada42595d3d8fd4c33ab23fce0931905 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cffi
-PKG_VERSION:=1.12.2
+PKG_VERSION:=1.12.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cffi
-PKG_HASH:=e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7
+PKG_HASH:=041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
 
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 80b2b44d330fe4f90f4bf0528a5d5c274aa42181..fafe5b0f2e6620726761ca19d82617d674631815 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-hyperlink
-PKG_VERSION:=18.0.0
+PKG_VERSION:=19.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=hyperlink-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/h/hyperlink
-PKG_HASH:=f01b4ff744f14bc5d0a22a6b9f1525ab7d6312cb0ff967f59414bbac52f0a306
+PKG_HASH:=4288e34705da077fada1111a24a0aa08bb1e76699c9ce49876af722441845654
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-hyperlink-$(PKG_VERSION)
 
index e1196bbb82010b1e96099de84c9e553351cfd83e..c594f614ed34c240fe027f1da4e91eff2fe5d07c 100644 (file)
@@ -116,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 ?=
 
@@ -125,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 c7442e29cdb6c0a2c5b915a2a4c07110901cec3f..4ec4baeb7441d2387344df4529d1abe9f6f96d3a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-slugify
-PKG_VERSION:=3.0.1
+PKG_VERSION:=3.0.2
 PKG_RELEASE:=1
 
-PKG_SOURCE:=python-slugify-$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-slugify/
-PKG_HASH:=492b27e5a12495340e50652ab4eab3a229ef7167c44b66b3a2861450e68b269a
+PKG_HASH:=57163ffb345c7e26063435a27add1feae67fa821f1ef4b2f292c25847575d758
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
@@ -30,6 +30,8 @@ define Package/python3-slugify
   URL:=https://github.com/un33k/python-slugify
   DEPENDS+= \
       +python3-light \
+      +python3-codecs \
+      +python3-setuptools \
       +python3-text-unidecode
   VARIANT:=python3
 endef
index 7f50c52047fdd2cea9febd70ab6b72b78635cdbb..d9f81091ca7c49b492eeec6d81c4ffd6a75d4e95 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-twisted
-PKG_VERSION:=18.9.0
-PKG_RELEASE:=4
+PKG_VERSION:=19.2.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
-PKG_HASH:=294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395
+PKG_HASH:=1708e1928ae84ec9d3ebab0d427e20e1e38ff721b15bbced476d047d4a43abbe
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
 PKG_BUILD_DEPENDS:=libtirpc
index 1ec4baf0fdb63275fb68caa21b091b264dc65b17..a5bddaaec81d897437857930a60faf4fe41a8e8f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/twisted/python/_setup.py
 +++ b/src/twisted/python/_setup.py
-@@ -144,7 +144,6 @@ _CONSOLE_SCRIPTS = [
+@@ -147,7 +147,6 @@ _CONSOLE_SCRIPTS = [
      "conch = twisted.conch.scripts.conch:run",
      "mailmail = twisted.mail.scripts.mailmail:run",
      "pyhtmlizer = twisted.scripts.htmlizer:run",
index 33ba77a0f8266d5f103662177440727a6bc2f55c..83ca2cd76b5c156496b07d79e882fee97d6afa3f 100644 (file)
@@ -1,18 +1,18 @@
 --- a/src/twisted/python/_setup.py
 +++ b/src/twisted/python/_setup.py
-@@ -169,11 +169,6 @@ class ConditionalExtension(Extension, object):
+@@ -173,11 +173,6 @@ class ConditionalExtension(Extension, ob
  # The C extensions used for Twisted.
  _EXTENSIONS = [
--    ConditionalExtension(
+     ConditionalExtension(
 -        "twisted.test.raiser",
 -        sources=["src/twisted/test/raiser.c"],
 -        condition=lambda _: _isCPython),
 -
-     ConditionalExtension(
+-    ConditionalExtension(
          "twisted.internet.iocpreactor.iocpsupport",
          sources=[
-@@ -238,12 +233,11 @@ def getSetupArgs(extensions=_EXTENSIONS):
+             "src/twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
+@@ -241,12 +236,11 @@ def getSetupArgs(extensions=_EXTENSIONS)
          "incremental >= 16.10.1",
          "Automat >= 0.3.0",
          "hyperlink >= 17.1.1",
@@ -26,7 +26,7 @@
          use_incremental=True,
          setup_requires=["incremental >= 16.10.1"],
          install_requires=requirements,
-@@ -253,7 +247,7 @@ def getSetupArgs(extensions=_EXTENSIONS):
+@@ -256,7 +250,7 @@ def getSetupArgs(extensions=_EXTENSIONS)
          cmdclass=command_classes,
          include_package_data=True,
          exclude_package_data={
index 40b147c9532f55e4878bb5275d12c6c7929fd426..512140e10b0fe23c117279e3fa2030bca8c794fc 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-urllib3
-PKG_VERSION:=1.24.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.24.2
+PKG_RELEASE:=1
+
 PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
 
 PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
-PKG_HASH:=de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22
+PKG_HASH:=9a247273df709c4fedb38c711e44292304f73f39ab01beda9f6b9fc375669ac3
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-urllib3-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
-
 include ../python-package.mk
 include ../python3-package.mk
 
@@ -28,7 +30,7 @@ define Package/python-urllib3/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=HTTP library with thread-safe connection pooling, file post, and more.
+  TITLE:=Sanity-friendly HTTP client
   URL:=https://urllib3.readthedocs.io/
 endef
 
@@ -57,6 +59,7 @@ endef
 $(eval $(call PyPackage,python-urllib3))
 $(eval $(call BuildPackage,python-urllib3))
 $(eval $(call BuildPackage,python-urllib3-src))
+
 $(eval $(call Py3Package,python3-urllib3))
 $(eval $(call BuildPackage,python3-urllib3))
 $(eval $(call BuildPackage,python3-urllib3-src))
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))
diff --git a/lang/python/python3-netifaces/Makefile b/lang/python/python3-netifaces/Makefile
new file mode 100644 (file)
index 0000000..eac04cc
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-netifaces
+PKG_VERSION:=0.10.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=netifaces-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/n/netifaces/
+PKG_HASH:=2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/netifaces-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-netifaces
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Portable network interface information
+  URL:=https://github.com/al45tair/netifaces
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-netifaces/description
+  Portable network interface information.
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
index 40feef420c52df2ded5c08f0ecb7300d9e4b2ded..4a3dddd6439bb867d69d5340157e0ab2aeac5b5e 100644 (file)
@@ -115,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 ?=
 
@@ -124,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) \
diff --git a/lang/python/python3-pyroute2/Makefile b/lang/python/python3-pyroute2/Makefile
new file mode 100644 (file)
index 0000000..83c28b0
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-pyroute2
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyroute2-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyroute2
+PKG_HASH:=ad679a91d453fe8426c4076d0da3a67265e5ccfe641879d75c9bc7660d075dfa
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pyroute2-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Martin Matějek <martin.matejek@nic.cz>
+PKG_LICENSE:=GPL-2.0-or-later Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.GPL.v2 LICENSE.Apache.v2
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyroute2
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Python netlink library
+  URL:=http://github.com/svinota/pyroute2
+  DEPENDS:= \
+         +python3-light \
+         +python3-distutils \
+         +python3-logging \
+         +python3-multiprocessing \
+         +python3-sqlite3 \
+         +python3-ctypes
+  VARIANT:=python3
+endef
+
+define Package/python3-pyroute2/description
+  Pyroute2 is a pure Python netlink library.
+  The library was started as an RTNL protocol implementation,
+  but now it supports many netlink protocols.
+endef
+
+PYTHON3_PKG_SETUP_ARGS:=
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
diff --git a/lang/python/python3-unidecode/Makefile b/lang/python/python3-unidecode/Makefile
new file mode 100644 (file)
index 0000000..caac016
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-unidecode
+PKG_VERSION:=1.0.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Unidecode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/unidecode/
+PKG_HASH:=8b85354be8fd0c0e10adbf0675f6dc2310e56fda43fa8fe049123b6c475e52fb
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Unidecode-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-unidecode
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=ASCII transliterations of Unicode text
+  URL:=https://github.com/avian2/unidecode
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-unidecode/description
+Unidecode, lossy ASCII transliterations of Unicode text
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
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
index 670b385a55bd911f36bd41f0d6a478b023b00465..2426efe34b7180f0aff04bfc4766a245398f1f0f 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=boost
-PKG_VERSION:=1.69.0
-PKG_SOURCE_VERSION:=1_69_0
-PKG_RELEASE:=3
+PKG_VERSION:=1.70.0
+PKG_SOURCE_VERSION:=1_70_0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_HASH:=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
+PKG_HASH:=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
 PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
 PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
 
@@ -38,7 +38,7 @@ define Package/boost/Default
 endef
 
 define Package/boost/description
-This package provides the Boost v1.69.0 libraries.
+This package provides the Boost v1.70.0 libraries.
 Boost is a set of free, peer-reviewed, portable C++ source libraries.
 
 -----------------------------------------------------------------------------
@@ -84,7 +84,7 @@ This package provides the following run-time libraries:
  - wave
 
 There are many more header-only libraries supported by Boost.
-See more at http://www.boost.org/doc/libs/1_69_0/
+See more at http://www.boost.org/doc/libs/1_70_0/
 endef
 
 PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
@@ -374,7 +374,7 @@ TARGET_LDFLAGS += -pthread -lrt
 TARGET_CFLAGS += \
        $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
 
-EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
+EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_USE_VERSION_5),-std=gnu++14,-std=gnu++17)
 
 ifneq ($(findstring mips,$(ARCH)),)
     BOOST_ABI = o32
@@ -392,14 +392,14 @@ endif
 comma := ,
 
 define Build/Compile
-       $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
+       $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu type $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
        ( cd $(PKG_BUILD_DIR) ; \
-               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                        tools/build/src/user-config.jam ; \
                b2 \
                        $(CONFIGURE_ARGS) \
                        --ignore-site-config \
-                       --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+                       --toolset=gcc abi=$(BOOST_ABI) \
                        --disable-long-double \
                        $(if $(CONFIG_boost-compile-visibility-global), visibility=global,) \
                        $(if $(CONFIG_boost-compile-visibility-protected), visibility=protected,) \
@@ -435,14 +435,14 @@ define Build/Compile
                                -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
                        install ;\
                        $(if $(CONFIG_PACKAGE_boost-python), \
-                               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+                               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                                        tools/build/src/user-config.jam ; \
                                echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
                                        tools/build/src/user-config.jam; \
                                b2 -a \
                                        $(CONFIGURE_ARGS) \
                                        --ignore-site-config \
-                                       --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+                                       --toolset=gcc abi=$(BOOST_ABI) \
                                        --disable-long-double \
                                        $(if $(CONFIG_boost-variant-release), variant=release,) \
                                        $(if $(CONFIG_boost-variant-debug), variant=debug,) \
@@ -461,14 +461,14 @@ define Build/Compile
                                install ;\
                        ,) \
                        $(if $(CONFIG_PACKAGE_boost-python3), \
-                               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+                               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                                        tools/build/src/user-config.jam ; \
                                echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
                                        tools/build/src/user-config.jam; \
                                b2 -a \
                                        $(CONFIGURE_ARGS) \
                                        --ignore-site-config \
-                                       --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+                                       --toolset=gcc abi=$(BOOST_ABI) \
                                        --disable-long-double \
                                        $(if $(CONFIG_boost-variant-release), variant=release,) \
                                        $(if $(CONFIG_boost-variant-debug), variant=debug,) \
index 2b5c8af849c91c329d132aa44bc995f4a4a47f79..1a82f4fb19fde76ed3a7fe132d90558065414475 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=botan
 PKG_VERSION:=2.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
 
 PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
@@ -68,6 +68,9 @@ CONFIGURE_ARGS = \
        --optimize-for-size \
        $(DISABLE_IPV6)
 
+ifeq ($(CONFIG_SOFT_FLOAT),y)
+CONFIGURE_ARGS += --disable-neon
+endif
 
 TARGET_LDFLAGS += \
        -Wl,--gc-sections,--as-needed \
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 f7a0986f70bd6ac40fd7a711f298696212a52254..9b2d20b72748cab471fa400e599a4a35a05014a9 100644 (file)
@@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=icu4c
 MAJOR_VERSION:=64
-MINOR_VERSION:=1
+MINOR_VERSION:=2
 PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
 PKG_RELEASE:=1
 
 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_HASH:=627d5d8478e6d96fc8c90fed4851239079a561a6a8b9e48b0892f24e82d31d6c
 
 PKG_LICENSE:=ICU-1.8.1+
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:icu-project:international_components_for_unicode
 
 PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
 
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__) || \
index f515cf85b6cba3a6a8066f1f2ef81081dd96c559..20b9c2f7ee30518e2fd4e2e4047749e4d9126d7c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jose
 PKG_VERSION:=10
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
diff --git a/libs/jose/patches/010-fix_minor_leak_upstream_198f720.patch b/libs/jose/patches/010-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
diff --git a/libs/jose/patches/020-openssl-deprecated.patch b/libs/jose/patches/020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..bcee0df
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/lib/openssl/compat.h
++++ b/lib/openssl/compat.h
+@@ -17,6 +17,7 @@
+ #pragma once
++#include <openssl/bn.h>
+ #include <openssl/hmac.h>
+ #include <openssl/ec.h>
+ #include <openssl/ecdsa.h>
+--- a/lib/openssl/misc.c
++++ b/lib/openssl/misc.c
+@@ -185,6 +185,8 @@ add_entity(json_t *root, json_t *obj, const char *plural, ...)
+ static void __attribute__((constructor))
+ constructor(void)
+ {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+     OpenSSL_add_all_algorithms();
++#endif
+     RAND_poll();
+ }
diff --git a/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch b/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch
deleted file mode 100644 (file)
index 5075760..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-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 e8e8205e5fd604874ddc6688931eb1c94d24c352..643ff9b7a1677122970f3b2f6e69efd0b9e6bef7 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgpiod
-PKG_VERSION:=1.2
+PKG_VERSION:=1.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
-PKG_HASH:=b6b9079c933f7c8524815437937dda6b795a16141bca202a9eec70ba5844b5ba
+PKG_HASH:=6ec837f23e8f2196e5976dec4ac81403170830075e7f33ede1394eaf67f2e962
 
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING
index fa8860531ff156a4edf7d78f21e96544dffbf5eb..9e9a85ff328c0a492542493f5aa16f6bd488e6d3 100644 (file)
@@ -8,17 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libhttp-parser
-PKG_VERSION:=2.8.1
+PKG_VERSION:=2.9.2
 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:=5199500e352584852c95c13423edc5f0cb329297c81dd69c3c8f52a75496da08
 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 23aa0a96f4c276b852a8b62e4c12b606317a8aed..cf3e9a97a86136708e5d2b21fefbfdac7962f58f 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libmicrohttpd
 PKG_VERSION:=0.9.62
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=COPYING
@@ -30,10 +30,11 @@ define Package/libmicrohttpd/default
   URL:=http://www.gnu.org/software/libmicrohttpd/
 endef
 
-define Package/libmicrohttpd
+define Package/libmicrohttpd-no-ssl
 $(call Package/libmicrohttpd/default)
   VARIANT:=nossl
-  CONFLICTS:=libmicrohttpd-ssl
+  DEFAULT_VARIANT:=1
+  PROVIDES:=libmicrohttpd
 endef
 
 define Package/libmicrohttpd-ssl
@@ -76,7 +77,7 @@ define Build/InstallDev
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmicrohttpd.pc $(1)/usr/lib/pkgconfig/
 endef
 
-define Package/libmicrohttpd/install
+define Package/libmicrohttpd-no-ssl/install
        $(INSTALL_DIR) $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
 endef
@@ -86,5 +87,5 @@ define Package/libmicrohttpd-ssl/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmicrohttpd.so* $(1)/usr/lib/
 endef
 
-$(eval $(call BuildPackage,libmicrohttpd))
+$(eval $(call BuildPackage,libmicrohttpd-no-ssl))
 $(eval $(call BuildPackage,libmicrohttpd-ssl))
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 7d9ee48e98af51fe9572bc3354cca996cd09c021..cae33e3da9a76abd991b6f3cf0daef9f8275d65b 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/erikd/libsndfile.git
-PKG_SOURCE_DATE:=2019-03-08
-PKG_SOURCE_VERSION:=5056a77fdae85f96eee4dff82af462db5a5c341e
-PKG_MIRROR_HASH:=5a695b64885ed3c41910029116de8b713118be6349554685fe53997316c369ea
+PKG_SOURCE_DATE:=2019-04-21
+PKG_SOURCE_VERSION:=25824cb914fb3b79e18f31fb861e218c84be7d34
+PKG_MIRROR_HASH:=9b3beef70003456ff297ce50ecd5cb1d066ca98f10f6363562431d773b3fcb3d
 
 PKG_LICENSE:=LGPLv2.1
 PKG_LICENSE_FILES:=COPYING
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
index bf25e520358c374c334e238779716b12d781073b..23c1d196f2902d9a5c195edd0bdccafd8dbc04ea 100644 (file)
@@ -8,9 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xerces-c
-PKG_MAIN_VER:=3.2
 PKG_VERSION:=3.2.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
@@ -24,33 +23,25 @@ PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
-include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/package.mk
 
-CONFIGURE_ARGS += \
-       --disable-pretty-make \
-       --enable-transcoder-iconv \
-       --enable-netaccessor-socket \
-       --enable-msgloader-inmemory
-
-TARGET_LDFLAGS += \
-       -lm
-
-define Package/libxerces-c
+define Package/libxerces-c/Default
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Validating XML parser library for C++
-  URL:=http://xerces.apache.org/
-  DEPENDS:=$(CXX_DEPENDS) $(ICONV_DEPENDS) +libc +libpthread
+  URL:=https://xerces.apache.org/
+endef
+
+define Package/libxerces-c
+$(call Package/libxerces-c/Default)
+  DEPENDS:=$(ICONV_DEPENDS) +libstdcpp
 endef
 
 define Package/libxerces-c-samples
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=Validating XML parser library for C++ (samples)
-  URL:=http://xerces.apache.org/
-  DEPENDS:=+libxerces-c
+$(call Package/libxerces-c/Default)
+  TITLE+= (samples)
+  DEPENDS+=+libxerces-c
 endef
 
 define Package/libxerces-c/description
@@ -69,18 +60,28 @@ define Package/libxerces-c-samples/description
   Validating XML parser library for C++ (samples)
 endef
 
+CONFIGURE_ARGS += \
+       --disable-rpath \
+       --enable-msgloader-inmemory \
+       --enable-netaccessor-socket \
+       --enable-transcoder-iconv \
+       --without-pic
+
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/xercesc/
        $(CP) $(PKG_INSTALL_DIR)/usr/include/xercesc/* $(1)/usr/include/xercesc/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c.a,libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{*.a,*.so} $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xerces-c.pc $(1)/usr/lib/pkgconfig/xerces-c.pc
 endef
 
 define Package/libxerces-c/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
 endef
 
 define Package/libxerces-c-samples/install
index 9e639acb5b131b7b6b14694b63f932f764540946..33832701441baf6b7465e6da2695d527c06fd6f6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -194,7 +194,7 @@ AC_COMPILE_IFELSE(  [AC_LANG_PROGRAM([[#
+@@ -228,7 +228,7 @@ AC_COMPILE_IFELSE(  [AC_LANG_PROGRAM([[#
                      ]
                   )
  AC_MSG_CHECKING([for wcsrtombs])
@@ -9,7 +9,7 @@
  #include <string.h>]],
                                   [[
  mbstate_t st;
-@@ -216,7 +216,7 @@ else
+@@ -250,7 +250,7 @@ else
                      ]
                   )
  AC_MSG_CHECKING([for mbsrtowcs])
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([
index c345e814a622982f931d5ad71c1dca6716e710a9..7b60452512edb235e4051a741982c966b390ca53 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=measurement-kit
-PKG_VERSION:=0.10.0
+PKG_VERSION:=0.10.1
 PKG_RELEASE=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c31ff8a457dfdbb2d42ef60f82646e508f6649107f15eec31fc22bc140ceb8e6
+PKG_HASH:=4caf856ebbb28633c7593a9b5b8ee79f0c0436d05ae7391cc59e8d72b260911a
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/measurement-kit
   SECTION:=libs
   CATEGORY:=Libraries
-  TITLE:=C++14 library that implements open network measurement methodologies
+  TITLE:=library for open network measurement
   URL:=https://measurement-kit.github.io/
   DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +ca-bundle
 endef
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 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 6bdabb58550c76b88f5418e97fe07d0d05d7dde2..1ceffa03602211ea3bb1826985a50e808b70afea 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqlite
-PKG_VERSION:=3260000
-PKG_RELEASE:=3
+PKG_VERSION:=3270200
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_HASH:=5daa6a3fb7d1e8c767cd59c4ded8da6e4b00c61d3b466d0685e35c4dd6d7bf5d
-PKG_SOURCE_URL:=https://www.sqlite.org/2018/
+PKG_HASH:=50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e
+PKG_SOURCE_URL:=https://www.sqlite.org/2019/
 
 PKG_LICENSE:=PUBLICDOMAIN
 PKG_LICENSE_FILES:=
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 290eef50d21a15e8067d2e08516b04f355bb0bf9..2d21be000ffdc583339b54db3ec731225568239a 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zeromq
 PKG_VERSION:=4.1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=LICENCE.txt
index d97a3eb46566717a9eaec5d3cbc5ec2040713103..8a47aa1ad05378be6d17a9e41b14f1b325eaacbd 100644 (file)
@@ -1,11 +1,14 @@
 --- a/src/metadata.hpp
 +++ b/src/metadata.hpp
-@@ -41,7 +41,7 @@ namespace zmq
+@@ -41,7 +41,11 @@ namespace zmq
      {
          public:
  
--            typedef std::map <std::string, const std::string> dict_t;
++#ifdef __UCLIBCXX_MAJOR__
 +            typedef std::map <std::string, std::string> dict_t;
++#else
+             typedef std::map <std::string, const std::string> dict_t;
++#endif
  
              metadata_t (const dict_t &dict);
              virtual ~metadata_t ();
  
 --- a/src/stream_engine.cpp
 +++ b/src/stream_engine.cpp
-@@ -208,7 +208,7 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
+@@ -208,7 +208,11 @@ void zmq::stream_engine_t::plug (io_thread_t *io_thread_,
              //  Compile metadata.
              typedef metadata_t::dict_t properties_t;
              properties_t properties;
--            properties.insert(std::make_pair("Peer-Address", peer_address));
++#ifdef __UCLIBCXX_MAJOR__
 +            properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
++#else
+             properties.insert(std::make_pair("Peer-Address", peer_address));
++#endif
              zmq_assert (metadata == NULL);
              metadata = new (std::nothrow) metadata_t (properties);
          }
-@@ -815,7 +815,7 @@ void zmq::stream_engine_t::mechanism_ready ()
+@@ -815,7 +815,11 @@ void zmq::stream_engine_t::mechanism_ready ()
  
      //  If we have a peer_address, add it to metadata
      if (!peer_address.empty()) {
--        properties.insert(std::make_pair("Peer-Address", peer_address));
++#ifdef __UCLIBCXX_MAJOR__
 +        properties.insert(std::make_pair<std::string, std::string>("Peer-Address", peer_address));
++#else
+         properties.insert(std::make_pair("Peer-Address", peer_address));
++#endif
      }
  
      //  Add ZAP properties.
diff --git a/libs/zmq/patches/100-fix-cxx-include-order.patch b/libs/zmq/patches/100-fix-cxx-include-order.patch
deleted file mode 100644 (file)
index 120e965..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
---- a/src/mtrie.cpp
-+++ b/src/mtrie.cpp
-@@ -27,11 +27,11 @@
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
--#include <stdlib.h>
--
- #include <new>
- #include <algorithm>
-+#include <stdlib.h>
-+
- #include "platform.hpp"
- #if defined ZMQ_HAVE_WINDOWS
- #include "windows.hpp"
---- a/src/raw_encoder.cpp
-+++ b/src/raw_encoder.cpp
-@@ -27,6 +27,11 @@
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-+#include <basic_definitions>
-+#include <exception>
-+#include <cstddef>
-+#include <algorithm>
-+
- #include "encoder.hpp"
- #include "raw_encoder.hpp"
- #include "likely.hpp"
---- a/src/trie.cpp
-+++ b/src/trie.cpp
-@@ -27,11 +27,11 @@
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
--#include <stdlib.h>
--
- #include <new>
- #include <algorithm>
-+#include <stdlib.h>
-+
- #include "platform.hpp"
- #if defined ZMQ_HAVE_WINDOWS
- #include "windows.hpp"
---- a/src/encoder.hpp
-+++ b/src/encoder.hpp
-@@ -39,7 +39,6 @@
- #include <stddef.h>
- #include <string.h>
- #include <stdlib.h>
--#include <algorithm>
- #include "err.hpp"
- #include "msg.hpp"
---- a/src/v1_encoder.cpp
-+++ b/src/v1_encoder.cpp
-@@ -27,6 +27,11 @@
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-+#include <basic_definitions>
-+#include <exception>
-+#include <cstddef>
-+#include <algorithm>
-+
- #include "encoder.hpp"
- #include "v1_encoder.hpp"
- #include "likely.hpp"
---- a/src/v2_encoder.cpp
-+++ b/src/v2_encoder.cpp
-@@ -27,6 +27,11 @@
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-+#include <basic_definitions>
-+#include <exception>
-+#include <cstddef>
-+#include <algorithm>
-+
- #include "v2_protocol.hpp"
- #include "v2_encoder.hpp"
- #include "likely.hpp"
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 b10d050ec09b5d0a8a6bf90229bf1f427b3fe8f0..24cd0ac5c6a228ffadb59c7b10cd004ad1d20a39 100644 (file)
@@ -142,8 +142,13 @@ LIBAV_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(LIBAV_DEMUXERS)
 LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS))
 LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS))
 
-# Strip off FPU notation
-REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+#hack to build on mips64
+ifeq ($(CONFIG_CPU_TYPE),octeonplus)
+  REAL_CPU_TYPE:=octeon+
+else
+  # Strip off FPU notation
+  REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+endif
 
 CONFIGURE_ARGS += \
        --disable-Bsymbolic \
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..12820aa222ecb3eca84999ff318ae2e400d017f4 100644 (file)
@@ -8,46 +8,47 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.03.01
+PKG_VERSION:=2019.4.17
 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:=ea0824ae9a166059ec754c267480198a074bd899c20b2ba497809bac099cde2e
+
+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 11b448150511f10874d763000d5fac74442c8c96..52c904632bcdda63e68ac993307a22cff7c4e506 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_18
+PKG_VERSION:=release_3_0_19
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=c6802e3ec675b1cf59c850b0f01ed088e2983c5c4daa7f64cc22be4e6ad13ae5
+PKG_HASH:=34c50ac47a683b13eae1a02f2d0263c0bd51a83f01b99c02c5fe25df07a1ee77
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
@@ -35,7 +35,7 @@ endef
 define Package/freeradius3/Default
   SECTION:=net
   CATEGORY:=Network
-  URL:=http://freeradius.org/
+  URL:=https://freeradius.org/
   SUBMENU:=FreeRADIUS (version 3)
 endef
 
@@ -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 +libatomic
+  DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +libpcre +libreadline +libtalloc +libatomic
 endef
 
 define Package/freeradius3-default
index f9ad433a7b6a9b521db0fecc1baf2c9af035be2a..effb2aee6bf8a7f47a131d4a3b877de93d8f1a62 100644 (file)
@@ -19,7 +19,7 @@ start_service()
        mkdir -p /var/db/radacct
 
        procd_open_instance
-       procd_set_param command $PROG -f
+       procd_set_param command $PROG -s
        procd_set_param env LD_LIBRARY_PATH=/usr/lib/freeradius3
        [ -n "$IPADDR" ] && procd_append_param command -i $IPADDR
        [ -n "$OPTIONS" ] && procd_append_param command $OPTIONS
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) \
index e66aedd62705049e4bae6d9bc8c3c4e220f9eafb..ec7e92fb865afb25675e1b6a3d44a08f594e08cd 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kea
 PKG_VERSION:=1.5.0
-PKG_RELEASE:=1
+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
@@ -99,6 +99,7 @@ endef
 
 CONFIGURE_ARGS += \
        --with-log4cplus="$(STAGING_DIR)/usr" \
+       --with-openssl="$(STAGING_DIR)/usr" \
        $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,)
 
 CONFIGURE_VARS += \
@@ -108,12 +109,15 @@ HOST_CONFIGURE_ARGS += \
        --enable-static-link \
        --enable-boost-headers-only \
        --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
-       --with-boost-include="$(STAGING_DIR)/usr/include"
+       --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
 
index 40a47501a04825d4d5afd1424b7fc3c5e4415ab5..d3a1521a954a762643c116943736b1664a511b75 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -594,10 +594,10 @@ AC_TRY_COMPILE([
+@@ -580,10 +580,10 @@ AC_TRY_COMPILE([
          AC_MSG_RESULT(no))
  
  AC_MSG_CHECKING(for usuable C++11 regex)
index 8933b881045526edd1787b9dc6cabfe250550402..73196dd8283701566a3eaee4c239cfdb08236845 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=2.0.14
+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:=1bf586e56ee38b47b82f2a27b27e04d0e5b23f1810db6a8e801bde9d3eb8617b
+PKG_SOURCE_URL:=https://www.keepalived.org/software
+PKG_HASH:=933ee01bc6346aa573453b998f87510d3cce4aba4537c9642b24e6dbfba5c6f4
 
 PKG_CPE_ID:=cpe:/a:keepalived:keepalived
 PKG_LICENSE:=GPL-2.0+
diff --git a/net/keepalived/patches/001-fix-systemd.patch b/net/keepalived/patches/001-fix-systemd.patch
deleted file mode 100644 (file)
index 51f36fb..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
---- a/configure.ac     2019-03-30 12:47:15.935627522 +0000
-+++ b/configure.ac     2019-03-30 12:47:55.590028792 +0000
-@@ -272,8 +272,7 @@ AC_ARG_ENABLE(Werror,
-   [AS_HELP_STRING([--enable-Werror], [compile with warnings being errors])])
- AC_ARG_WITH([systemdsystemunitdir],
--      AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
--      [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-+      AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])])
- # Set the kernel headers path
- if test -n "$kernel_src_path"; then
-@@ -551,7 +550,7 @@ do
-       eval $LOCAL_WARN_VAR=yes
-       add_to_var([KA_CFLAGS], [-W$WARN])
-       AC_DEFINE_UNQUOTED([$WARN_VAR], [ 1 ])
--      AS_IF([test -z $WARN_VAR_SHORT], [],
-+      AS_IF([test -z "$WARN_VAR_SHORT"], [],
-           [AC_DEFINE_UNQUOTED([$WARN_VAR_SHORT], [ 1 ])]
-          )
-     ],
-@@ -2451,41 +2450,39 @@ AM_CONDITIONAL([RPM_BIP], [test $RPM_NO_
- dnl ----[ Determine system init type]----
- INIT_TYPE=
--if test -z $init_type; then
-+AS_IF(
-+  [test -n "$init_type"], [INIT_TYPE=$init_type],
-+  [test -n "$with_systemdsystemunitdir"], [INIT_TYPE=systemd],
-+  [
-   /sbin/init --version 2>/dev/null | grep -q upstart
--  if test $? -eq 0; then
--    INIT_TYPE=upstart
--  else
-+    AS_IF(
-+      [test $? -eq 0], [INIT_TYPE=upstart],
-+      [
-     init_path=`which systemctl 2>/dev/null`
--    if test \( $? -eq 0 -a -x "$init_path" \); then
-+        AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
-+        [
-       systemctl | grep -q -- "-\.mount"
--      if test $? -eq 0; then
--      INIT_TYPE=systemd
--      fi
--    fi
--    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then
-+          AS_IF([test $? -eq 0], [INIT_TYPE=systemd])
-+          ])
-+        AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \)],
-+        [
-       init_path=`which openrc-run 2>/dev/null`
--      if test \( $? -eq 0 -a -x "$init_path" \); then
-+          AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
-+            [
-       head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
--      if test $? -eq 0; then
--        INIT_TYPE=openrc
--      fi
--      fi
--    fi
--    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then
--      INIT_TYPE=SYSV
--    fi
--  fi
--else
--  INIT_TYPE=$init_type
--fi
-+              AS_IF([test $? -eq 0], [INIT_TYPE=openrc])
-+            ])
-+          ])
-+        AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \)], [INIT_TYPE=SYSV])
-+      ])
-+  ])
-+AS_IF([test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \)], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
- dnl ----[Default keepalived configuration file]----
- AS_IF([test $default_config_file],
-   [
-     AS_IF([test $default_config_file = yes -o $default_config_file = no],
--          AC_MSG_ERROR([A filename must be specified for default-config-file])
--      ])
-+        [AC_MSG_ERROR([A filename must be specified for default-config-file])])
-     CONFIG_FILE=$default_config_file
-     add_config_opt([DEFAULT_CONFIG_FILE=${default_config_file}])
-   ],
-@@ -2493,7 +2490,7 @@ AS_IF([test $default_config_file],
- AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], ["$default_config_file"], [The default configuration file])
- AC_SUBST([DEFAULT_CONFIG_FILE], [$default_config_file])
--if test -z $INIT_TYPE; then
-+if test -z "$INIT_TYPE"; then
-   INIT_TYPE=undetected
- elif test $INIT_TYPE = systemd; then
-   AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
---- a/configure        2019-03-30 12:47:25.313485929 +0000
-+++ b/configure        2019-03-30 12:48:08.009841269 +0000
-@@ -1631,7 +1631,7 @@ Optional Packages:
-   --with-default-config-file=FILE
-                           Default configuration file
-   --with-systemdsystemunitdir=DIR
--                          Directory for systemd service files
-+                          Directory for systemd service files]
- Some influential environment variables:
-   PKG_CONFIG  path to pkg-config utility
-@@ -3858,8 +3858,6 @@ fi
- # Check whether --with-systemdsystemunitdir was given.
- if test "${with_systemdsystemunitdir+set}" = set; then :
-   withval=$with_systemdsystemunitdir;
--else
--  with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
- fi
-@@ -5931,7 +5929,7 @@ $as_echo "yes" >&6; }
- #define $WARN_VAR  1
- _ACEOF
--      if test -z $WARN_VAR_SHORT; then :
-+      if test -z "$WARN_VAR_SHORT"; then :
- else
-   cat >>confdefs.h <<_ACEOF
-@@ -12520,44 +12518,58 @@ fi
- INIT_TYPE=
--if test -z $init_type; then
-+if test -n "$init_type"; then :
-+  INIT_TYPE=$init_type
-+elif test -n "$with_systemdsystemunitdir"; then :
-+  INIT_TYPE=systemd
-+else
-+
-   /sbin/init --version 2>/dev/null | grep -q upstart
--  if test $? -eq 0; then
-+    if test $? -eq 0; then :
-     INIT_TYPE=upstart
--  else
-+else
-+
-     init_path=`which systemctl 2>/dev/null`
--    if test \( $? -eq 0 -a -x "$init_path" \); then
-+        if test \( $? -eq 0 -a -x "$init_path" \); then :
-+
-       systemctl | grep -q -- "-\.mount"
--      if test $? -eq 0; then
-+          if test $? -eq 0; then :
-       INIT_TYPE=systemd
--      fi
--    fi
--    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then
-+fi
-+
-+fi
-+        if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then :
-+
-       init_path=`which openrc-run 2>/dev/null`
--      if test \( $? -eq 0 -a -x "$init_path" \); then
-+          if test \( $? -eq 0 -a -x "$init_path" \); then :
-+
-       head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
--      if test $? -eq 0; then
-+              if test $? -eq 0; then :
-         INIT_TYPE=openrc
--      fi
--      fi
--    fi
--    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then
-+fi
-+
-+fi
-+
-+fi
-+        if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then :
-       INIT_TYPE=SYSV
--    fi
--  fi
--else
--  INIT_TYPE=$init_type
-+fi
-+
-+fi
-+
-+fi
-+if test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \); then :
-+  with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
- fi
- if test $default_config_file; then :
-     if test $default_config_file = yes -o $default_config_file = no; then :
-   as_fn_error $? "A filename must be specified for default-config-file" "$LINENO" 5
--
- fi
-     CONFIG_FILE=$default_config_file
-     CONFIG_OPTIONS="$CONFIG_OPTIONS DEFAULT_CONFIG_FILE=${default_config_file}"
--  ]
-+
- else
-   default_config_file="/etc/$PACKAGE/$PACKAGE.conf"
- fi
-@@ -12569,7 +12581,7 @@ _ACEOF
- DEFAULT_CONFIG_FILE=$default_config_file
--if test -z $INIT_TYPE; then
-+if test -z "$INIT_TYPE"; then
-   INIT_TYPE=undetected
- elif test $INIT_TYPE = systemd; then
-   systemdsystemunitdir=$with_systemdsystemunitdir
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..606e4c1
--- /dev/null
@@ -0,0 +1,110 @@
+#
+# 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:=3
+
+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
+
+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:= +libnss +librt +libevent2 +libevent2-pthreads +kmod-crypto-authenc \
+       +kmod-crypto-hash +kmod-ipt-ipsec +iptables-mod-ipsec +ip-full +kmod-ip-vti \
+       +kmod-ipsec +kmod-ipsec4 +kmod-crypto-rng +IPV6:kmod-ipsec6 +IPV6:kmod-ip6-vti
+  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 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,all)
+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))
diff --git a/net/libreswan/files/ipsec.conf b/net/libreswan/files/ipsec.conf
new file mode 100644 (file)
index 0000000..8b7493b
--- /dev/null
@@ -0,0 +1,25 @@
+config setup
+    # needed when using PSK only. Not needed for X.509 based servers
+    uniqueids=no
+    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,%v4:!100.64.0.0/24
+
+conn ikev1
+    authby=secret
+    pfs=no
+    auto=add
+    rekey=no
+    left=%defaultroute
+    right=%any
+    ikev2=never
+    type=transport
+    leftprotoport=17/1701
+    rightprotoport=17/%any
+    dpddelay=15
+    dpdtimeout=30
+    dpdaction=clear
+
+conn ikev1-nat
+    also=ikev1
+    rightsubnet=vhost:%priv
+
+# include /etc/ipsec.d/*.conf
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..5ef87b0
--- /dev/null
@@ -0,0 +1,10 @@
+# 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
+
+# A.B.C.D %any : PSK "SsEeCcRrEeTt"
+: PSK "SsEeCcRrEeTt"
+# include /etc/ipsec.d/*.secrets
diff --git a/net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch b/net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch
new file mode 100644 (file)
index 0000000..0cca6c3
--- /dev/null
@@ -0,0 +1,973 @@
+From 010a9f2bbdaa97024933be04eff1a48ff1f9b657 Mon Sep 17 00:00:00 2001
+From: Andrew Cagney <cagney@gnu.org>
+Date: Thu, 25 Oct 2018 21:00:59 -0400
+Subject: [PATCH] building: move kernel (klips) rules to mk/kernel.mk
+
+---
+ Makefile     | 448 +-----------------------------------------------
+ mk/kernel.mk | 468 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 474 insertions(+), 442 deletions(-)
+ create mode 100644 mk/kernel.mk
+
+diff --git a/Makefile b/Makefile
+index b706defd0f..0b070966e6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -97,119 +97,14 @@ KERNELREL=$(shell ${KVSHORTUTIL} ${KERNELSRC}/Makefile)
+ # directories visited by all recursion
+-# declaration for make's benefit
+-.PHONY:       def insert kpatch patches _patches _patches2.4 \
+-      klipsdefaults programs man install \
+-      precheck verset confcheck kernel \
+-      module module24 module26 kinstall minstall minstall24 minstall26 \
+-      moduleclean mod24clean module24clean mod26clean module26clean \
+-      backup unpatch uninstall \
+-      check \
+-
+-kpatch: unapplypatch applypatch klipsdefaults
+-npatch: unapplynpatch applynpatch
+-sarefpatch: unapplysarefpatch applysarefpatch
+-
+-unapplypatch:
+-      @echo "info: making unapplypatch in `pwd` and KERNELSRC=\"${KERNELSRC}\";"
+-      -@if [ -f ${KERNELSRC}/libreswan.patch ]; then \
+-              echo Undoing previous patches; \
+-              cat ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
+-      fi
+-
+-applypatch:
+-      @echo "info: Now performing forward patches in `pwd`";
+-      ${MAKE} kernelpatch${KERNELREL} | tee ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
+-
+-unapplynpatch:
+-      @echo "info: making unapplynpatch (note the second N) in `pwd`";
+-      -@if [ -f ${KERNELSRC}/natt.patch ]; then \
+-              echo Undoing previous NAT patches; \
+-              cat ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
+-      fi
+-
+-applynpatch:
+-      @echo "info: Now performing forward NAT patches in `pwd`";
+-      ${MAKE} nattpatch${KERNELREL} | tee ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
+-
+-unapplysarefpatch:
+-      @echo "info: making unapplysarefpatch in `pwd`";
+-      -@if [ -f ${KERNELSRC}/saref.patch ]; then \
+-              echo Undoing previous saref patches; \
+-              cat ${KERNELSRC}/saref.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preng --reverse --ignore-whitespace ); \
+-      fi
+-
+-applysarefpatch:
+-      @echo "info: Now performing SAref patches in `pwd`";
+-      ${MAKE} sarefpatch${KERNELREL} | tee ${KERNELSRC}/klipsng.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preng --forward --ignore-whitespace )
+-
+-# patch kernel
+-PATCHER=packaging/utils/patcher
+-
+-_patches:
+-      echo "===============" >>out.kpatch
+-      echo "`date` `cd $(KERNELSRC) ; pwd`" >>out.kpatch
+-      $(MAKE) __patches$(KERNELREL) >>out.kpatch
+-
+-# Linux-2.4.0 version
+-__patches2.4:
+-      @$(PATCHER) -v -c $(KERNELSRC) Documentation/Configure.help \
+-              'CONFIG_KLIPS' $(PATCHES)/Documentation/Configure.help.fs2_2.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/Config.in \
+-              'CONFIG_KLIPS' $(PATCHES)/net/Config.in.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/Makefile \
+-              'CONFIG_KLIPS' $(PATCHES)/net/Makefile.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/ipv4/af_inet.c \
+-              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/af_inet.c.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/ipv4/udp.c \
+-              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/udp.c.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) include/net/sock.h \
+-              'CONFIG_KLIPS' $(PATCHES)/include/net/sock.h.fs2_4.patch
+-# Removed patches, will unpatch automatically.
+-      @$(PATCHER) -v $(KERNELSRC) include/linux/proc_fs.h
+-      @$(PATCHER) -v $(KERNELSRC) net/core/dev.c
+-      @$(PATCHER) -v $(KERNELSRC) net/ipv4/protocol.c
+-      @$(PATCHER) -v $(KERNELSRC) drivers/net/Space.c
+-      @$(PATCHER) -v $(KERNELSRC) include/linux/netlink.h
+-      @$(PATCHER) -v $(KERNELSRC) net/netlink/af_netlink.c
+-      @$(PATCHER) -v $(KERNELSRC) net/netlink/netlink_dev.c
+-      @$(PATCHER) -v $(KERNELSRC) drivers/isdn/isdn_net.c
+-
+-klipsdefaults:
+-      @KERNELDEFCONFIG=$(KERNELSRC)/arch/$(ARCH)/defconfig ; \
+-      KERNELCONFIG=$(KCFILE) ; \
+-      if ! egrep -q 'CONFIG_KLIPS' $$KERNELDEFCONFIG ; \
+-      then \
+-              set -x ; \
+-              cp -a $$KERNELDEFCONFIG $$KERNELDEFCONFIG.orig ; \
+-              chmod u+w $$KERNELDEFCONFIG ; \
+-              cat $$KERNELDEFCONFIG $(KERNELKLIPS)/defconfig \
+-                      >$$KERNELDEFCONFIG.tmp ; \
+-              rm -f $$KERNELDEFCONFIG ; \
+-              cp -a $$KERNELDEFCONFIG.tmp $$KERNELDEFCONFIG ; \
+-              rm -f $$KERNELDEFCONFIG.tmp ; \
+-      fi ; \
+-      if ! egrep -q 'CONFIG_KLIPS' $$KERNELCONFIG ; \
+-      then \
+-              set -x ; \
+-              cp -a $$KERNELCONFIG $$KERNELCONFIG.orig ; \
+-              chmod u+w $$KERNELCONFIG ; \
+-              cat $$KERNELCONFIG $(KERNELKLIPS)/defconfig \
+-                      >$$KERNELCONFIG.tmp ; \
+-              rm -f $$KERNELCONFIG ; \
+-              cp -a $$KERNELCONFIG.tmp $$KERNELCONFIG ; \
+-              rm -f $$KERNELCONFIG.tmp ; \
+-      fi
+-
+-
+-
+ # programs
+ ABSOBJDIR:=$(shell mkdir -p ${OBJDIR}; cd ${OBJDIR} && pwd)
+ OBJDIRTOP=${ABSOBJDIR}
+ # Recursive clean dealt with elsewhere.
+-local-clean-base: moduleclean
++.PHONY: local-clean-base
++local-clean-base:
+       $(foreach file,$(RPMTMPDIR) $(RPMDEST) out.*build out.*install, \
+               rm -rf $(file) ; )      # but leave out.kpatch
+@@ -219,339 +114,13 @@ local-clean-base: moduleclean
+ # $(OBJDIR), "distclean" does not depend on it.  If it did, "make
+ # distclean" would have the quirky behaviour of first creating
+ # $(OBJDIR) only to then delete it.
+-distclean: moduleclean module24clean module26clean clean-kvm-keys
++.PHONY: distclean
++distclean: clean-kvm-keys
+       rm -f $(RPMTMPDIR) $(RPMDEST) out.*
+       rm -rf testing/pluto/*/OUTPUT*
+       rm -rf OBJ.* $(OBJDIR)
+       rm -rf BACKUP
+-# proxies for major kernel make operations
+-
+-# do-everything entries
+-KINSERT_PRE=precheck verset insert
+-PRE=precheck verset kpatch
+-POST=confcheck programs kernel install
+-MPOST=confcheck programs module install
+-
+-# preliminaries
+-precheck:
+-      @if test ! -d $(KERNELSRC) -a ! -L $(KERNELSRC) ; \
+-      then \
+-              echo '*** cannot find directory "$(KERNELSRC)"!!' ; \
+-              echo '*** may be necessary to add symlink to kernel source' ; \
+-              exit 1 ; \
+-      fi
+-      @if ! cd $(KERNELSRC) ; \
+-      then \
+-              echo '*** cannot "cd $(KERNELSRC)"!!' ; \
+-              echo '*** may be necessary to add symlink to kernel source' ; \
+-              exit 1 ; \
+-      fi
+-      @if test ! -f $(KCFILE) ; \
+-      then \
+-              echo '*** cannot find "$(KCFILE)"!!' ; \
+-              echo '*** perhaps kernel has never been configured?' ; \
+-              echo '*** please do that first; the results are necessary.' ; \
+-              exit 1 ; \
+-      fi
+-      @if test ! -f $(VERFILE) ; \
+-      then \
+-              echo '*** cannot find "$(VERFILE)"!!' ; \
+-              echo '*** perhaps kernel has never been compiled?' ; \
+-              echo '*** please do that first; the results are necessary.' ; \
+-              exit 1 ; \
+-      fi
+-
+-# configuring (exit statuses disregarded, something fishy here sometimes)
+-xcf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) xconfig
+-mcf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) menuconfig
+-pcf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) config
+-
+-ocf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig
+-
+-rcf:
+-      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) ${NONINTCONFIG} </dev/null
+-      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) dep >/dev/null
+-
+-kclean:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) clean
+-
+-confcheck:
+-      @if test ! -f $(KCFILE) ; \
+-      then echo '*** no kernel configuration file written!!' ; exit 1 ; \
+-      fi
+-      @if ! egrep -q '^CONFIG_KLIPS=[my]' $(KCFILE) ; \
+-      then echo '*** IPsec not in kernel config ($(KCFILE))!!' ; exit 1 ; \
+-      fi
+-      @if ! egrep -q 'CONFIG_KLIPS[   ]+1' $(ACFILE) && \
+-              ! egrep -q 'CONFIG_KLIPS_MODULE[        ]+1' $(ACFILE) ; \
+-      then echo '*** IPsec in kernel config ($(KCFILE)),' ; \
+-              echo '***       but not in config header file ($(ACFILE))!!' ; \
+-              exit 1 ; \
+-      fi
+-      @if egrep -q '^CONFIG_KLIPS=m' $(KCFILE) && \
+-              ! egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
+-      then echo '*** IPsec configured as module in kernel with no module support!!' ; exit 1 ; \
+-      fi
+-      @if ! egrep -q 'CONFIG_KLIPS_AH[        ]+1' $(ACFILE) && \
+-              ! egrep -q 'CONFIG_KLIPS_ESP[   ]+1' $(ACFILE) ; \
+-      then echo '*** IPsec configuration must include AH or ESP!!' ; exit 1 ; \
+-      fi
+-
+-# kernel building, with error checks
+-kernel:
+-      rm -f out.kbuild out.kinstall
+-      # undocumented kernel folklore: clean BEFORE dep.
+-      # we run make dep separately, because there is no point in running ERRCHECK
+-      # on the make dep output.
+-      # see LKML thread "clean before or after dep?"
+-      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNCLEAN) $(KERNDEP) )
+-      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNEL) ) 2>&1 | tee out.kbuild
+-      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
+-      then set -x ; \
+-              ( cd $(KERNELSRC) ; \
+-              $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
+-      fi
+-      ${ERRCHECK} out.kbuild
+-
+-# module-only building, with error checks
+-ifneq ($(strip $(MOD24BUILDDIR)),)
+-${MOD24BUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make
+-      mkdir -p ${MOD24BUILDDIR}
+-      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make ${MOD24BUILDDIR}/Makefile
+-
+-module:
+-      @if [ -f ${KERNELSRC}/README.libreswan-2 ] ; then \
+-                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with libreswan-2, out of tree build might fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/README.openswan ] ; then \
+-                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan, out of tree build might fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/README.openswan-2 ] ; then \
+-                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan-2, out of tree build might fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/README.freeswan ] ; then \
+-                echo "ERROR: Kernel source ${KERNELSRC} has already been patched with freeswan, out of tree build will fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
+-                echo "Building module for a 2.4 kernel"; ${MAKE} module24 ; \
+-        else echo "Building module for a 2.6 kernel"; ${MAKE} module26; \
+-        fi;
+-
+-modclean moduleclean:
+-      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
+-              echo "Cleaning module for a 2.4 kernel"; ${MAKE} module24clean ; \
+-      else echo "Cleaning module for a 2.6 kernel"; ${MAKE} module26clean; \
+-      fi;
+-
+-module24:
+-      @if [ ! -f ${KERNELSRC}/Rules.make ] ; then \
+-                echo "Warning: Building for a 2.4 kernel in what looks like a 2.6 tree"; \
+-        fi ; \
+-        ${MAKE} ${MOD24BUILDDIR}/Makefile
+-      ${MAKE} -C ${MOD24BUILDDIR}  LIBRESWANSRCDIR=${LIBRESWANSRCDIR} ARCH=${ARCH} V=${V} ${MODULE_FLAGS} MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} TOPDIR=${KERNELSRC} -f Makefile ipsec.o
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-      @echo 'KLIPS24 module built successfully. '
+-      @echo ipsec.o is in ${MOD24BUILDDIR}
+-      @echo
+-      @(cd ${MOD24BUILDDIR}; ls -l ipsec.o)
+-      @(cd ${MOD24BUILDDIR}; size ipsec.o)
+-      @echo
+-      @echo 'use make minstall as root to install it'
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-
+-mod24clean module24clean:
+-      rm -rf ${MOD24BUILDDIR}
+-
+-#autoodetect 2.4 and 2.6
+-module_install minstall install-module:
+-      @if [ -f $(KERNELSRC)/Rules.make ] ; then \
+-                $(MAKE) minstall24 ; \
+-      else \
+-              $(MAKE) minstall26 ; \
+-        fi;
+-
+-# Extract the value of MODLIB from the output of $(MAKE).  Also hide
+-# the sup-process $(MAKE) so that GNU Make doesn't always invoke the
+-# target ("make -n" ignored).
+-#
+-# If $(MAKE) directly appears in a target (for instance in minstall26)
+-# then GNU Make will assume that it is a recursive make invocation and
+-# invoke the target regardless of -n.
+-#
+-# XXX: minstall24 should also use this.
+-
+-osmodlib-from-make = \
+-      OSMODLIB=$$($(MAKE) $(1) 2>/dev/null | sed -n -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/p' | head -1) ; \
+-      test -z "$$OSMODLIB" || echo "OSMODLIB=$$OSMODLIB ($(MAKE) $(1))"
+-
+-# module-only install, with error checks
+-minstall24:
+-      ( OSMODLIB=`${MAKE} -C $(KERNELSRC) -p dummy | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              OSMODLIB=`${MAKE} -C $(KERNELSRC) -n -p modules_install | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
+-      fi ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              echo "No known place to install module. Aborting." ; \
+-              exit 93 ; \
+-      fi ; \
+-      set -x ; \
+-      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      cp $(MOD24BUILDDIR)/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      if [ -f /sbin/depmod ] ; then /sbin/depmod -a ; fi; \
+-      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
+-        mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-                if [ -f $$OSMODLIB/kernel/ipsec.o -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ] ; then \
+-                        echo "WARNING: two ipsec.o modules found in $$OSMODLIB/kernel:" ; \
+-                        ls -l $$OSMODLIB/kernel/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ; \
+-                        exit 1; \
+-                fi ; \
+-        fi ; \
+-        set -x ) ;
+-
+-
+-else
+-module:
+-      echo 'Building in place is no longer supported. Please set MOD24BUILDDIR='
+-      exit 1
+-
+-endif
+-
+-# module-only building, with error checks
+-ifneq ($(strip $(MODBUILDDIR)),)
+-${MODBUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module.make
+-      mkdir -p ${MODBUILDDIR}
+-      echo ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/*.S ${MODBUILDDIR}
+-      (rm -f ${MODBUILDDIR}/des; mkdir -p ${MODBUILDDIR}/des && cd ${MODBUILDDIR}/des && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/* . && ln -s -f Makefile.fs2_6 Makefile)
+-      (rm -f ${MODBUILDDIR}/aes; mkdir -p ${MODBUILDDIR}/aes && cd ${MODBUILDDIR}/aes && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/aes/* . && ln -s -f Makefile.fs2_6 Makefile)
+-      mkdir -p ${MODBUILDDIR}/aes
+-      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module.make ${MODBUILDDIR}/Makefile
+-      ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/match*.S ${MODBUILDDIR}
+-
+-module26:
+-      @if [ -f ${KERNELSRC}/Rules.make ] ; then \                 echo "Warning: Building for a 2.6+ kernel in what looks like a 2.4 tree"; \
+-        fi ; \
+-        ${MAKE}  ${MODBUILDDIR}/Makefile
+-      ${MAKE} -C ${KERNELSRC} ${KERNELBUILDMFLAGS} BUILDDIR=${MODBUILDDIR} SUBDIRS=${MODBUILDDIR} INITSYSTEM=$(INITSYSTEM) MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} MODULE_DEFCONFIG=${MODULE_DEFCONFIG}  MODULE_EXTRA_INCLUDE=${MODULE_EXTRA_INCLUDE} ARCH=${ARCH} V=${V} modules
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-      @echo 'KLIPS module built successfully. '
+-      @echo ipsec.ko is in ${MODBUILDDIR}
+-      @echo
+-      @(cd ${MODBUILDDIR}; ls -l ipsec.ko)
+-      @(cd ${MODBUILDDIR}; size ipsec.ko)
+-      @echo
+-      @echo 'use make minstall as root to install it'
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-
+-mod26clean module26clean:
+-      rm -rf ${MODBUILDDIR}
+-
+-# module-only install, with error checks
+-minstall26:
+-      $(call osmodlib-from-make,-C $(KERNELSRC) -p help) ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              $(call osmodlib-from-make,-C $(KERNELSRC) -n -p modules_install) ; \
+-      fi ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              echo "No known place to install module. Aborting." ; \
+-              exit 93 ; \
+-      fi ; \
+-      set -x ; \
+-      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      cp $(MODBUILDDIR)/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      if [ -f /sbin/depmod ] ; then \
+-              /sbin/depmod -a ; \
+-      fi ; \
+-      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
+-              mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-              if [ -f $$OSMODLIB/kernel/ipsec.ko -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ] ; then \
+-                      echo "WARNING: two ipsec.ko modules found in $$OSMODLIB/kernel:" ; \
+-                      ls -l $$OSMODLIB/kernel/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ; \
+-                      exit 1; \
+-              fi ; \
+-      fi
+-
+-
+-else
+-module26:
+-      echo 'Building in place is no longer supported. Please set MODBUILDDIR='
+-      exit 1
+-
+-endif
+-
+-# kernel install, with error checks
+-kinstall:
+-      rm -f out.kinstall
+-      >out.kinstall
+-      # undocumented kernel folklore: modules_install must precede install (observed on RHL8.0)
+-      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
+-      then set -x ; \
+-              ( cd $(KERNELSRC) ; \
+-              $(MAKE) $(KERNMAKEOPTS) modules_install 2>&1 ) | tee -a out.kinstall ; \
+-      fi
+-      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) install ) 2>&1 | tee -a out.kinstall
+-      ${ERRCHECK} out.kinstall
+-
+-kernelpatch3 kernelpatch3.5 kernelpatch2.6 kernelpatch:
+-      packaging/utils/kernelpatch 2.6
+-
+-kernelpatch2.4:
+-      packaging/utils/kernelpatch 2.4
+-
+-nattpatch:
+-      if [ -f ${KERNELSRC}/Makefile ]; then \
+-              ${MAKE} nattpatch${KERNELREL}; \
+-      else    echo "Cannot determine Linux kernel version. Perhaps you need to set KERNELSRC? (eg: export KERNELSRC=/usr/src/linux-`uname -r`/)"; exit 1; \
+-      fi;
+-
+-sarefpatch2.6:
+-      #cat patches/kernel/2.6.38/0001-SAREF-add-support-for-SA-selection-through-sendmsg.patch
+-      #packaging/utils/sarefpatch 2.6
+-      echo ""
+-
+-nattpatch2.6:
+-      packaging/utils/nattpatch 2.6
+-
+-nattpatch2.4:
+-      packaging/utils/nattpatch 2.4
+-
+-nattupdate:
+-      (cd UMLPOOL && diff -u plain26/net/ipv4/udp.c.orig plain26/net/ipv4/udp.c; exit 0) >nat-t/net/ipv4/udp.c.os2_6.patch
+-
+-# take all the patches out of the kernel
+-# (Note, a couple of files are modified by non-patch means; they are
+-# included in "make backup".)
+-unpatch:
+-      @echo \"make unpatch\" is obsolete. See make unapplypatch.
+-      exit 1
+-
+-_unpatch:
+-      for f in `find $(KERNELSRC)/. -name '*.preipsec' -print` ; \
+-      do \
+-              echo "restoring $$f:" ; \
+-              dir=`dirname $$f` ; \
+-              core=`basename $$f .preipsec` ; \
+-              cd $$dir ; \
+-              mv -f $$core.preipsec $$core ; \
+-              rm -f $$core.wipsec $$core.ipsecmd5 ; \
+-      done
+-
+-# at the moment there is no difference between snapshot and release build
+-snapready:    buildready
+-relready:     buildready
+-ready:                devready
+ # set up for build
+ buildready:
+@@ -604,13 +173,6 @@ deb:
+       #debuild -S -sa
+       @echo "to build optional KLIPS kernel module, run make deb-klips"
+-deb-klips:
+-      sudo module-assistant prepare -u .
+-      sudo dpkg -i ../libreswan-modules-source_`make -s showdebversion`_all.deb
+-      sudo module-assistant -u . prepare
+-      sudo module-assistant -u . build libreswan
+-
+-
+ release:
+       packaging/utils/makerelease
+@@ -654,3 +216,5 @@ install-fipshmac:
+ include ${LIBRESWANSRCDIR}/mk/docker-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/kvm-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/web-targets.mk
++include ${LIBRESWANSRCDIR}/mk/kernel.mk
++
+diff --git a/mk/kernel.mk b/mk/kernel.mk
+new file mode 100644
+index 0000000000..187167d440
+--- /dev/null
++++ b/mk/kernel.mk
+@@ -0,0 +1,468 @@
++# Libreswan master makefile
++#
++# Copyright (C) 1998-2002  Henry Spencer.
++# Copyright (C) 2003-2004  Xelerance Corporation
++# Copyright (C) 2017, Richard Guy Briggs <rgb@tricolour.ca>
++# Copyright (C) 2015-2018  Andrew Cagney
++#
++# This program is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by the
++# Free Software Foundation; either version 2 of the License, or (at your
++# option) any later version.  See <https://www.gnu.org/licenses/gpl2.txt>.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++# for more details.
++#
++
++PATCHES=linux
++# where KLIPS goes in the kernel
++# note, some of the patches know the last part of this path
++KERNELKLIPS=$(KERNELSRC)/net/ipsec
++KERNELCRYPTODES=$(KERNELSRC)/crypto/ciphers/des
++KERNELLIBFREESWAN=$(KERNELSRC)/lib/libfreeswan
++KERNELLIBZLIB=$(KERNELSRC)/lib/zlib
++KERNELINCLUDE=$(KERNELSRC)/include
++
++MAKEUTILS=packaging/utils
++ERRCHECK=${MAKEUTILS}/errcheck
++KVUTIL=${MAKEUTILS}/kernelversion
++KVSHORTUTIL=${MAKEUTILS}/kernelversion-short
++
++# kernel details
++# what variant of our patches should we use, and where is it
++KERNELREL=$(shell ${KVSHORTUTIL} ${KERNELSRC}/Makefile)
++
++# directories visited by all recursion
++
++# declaration for make's benefit
++.PHONY:       def insert kpatch patches _patches _patches2.4 \
++      klipsdefaults programs man install \
++      precheck verset confcheck kernel \
++      module module24 module26 kinstall minstall minstall24 minstall26 \
++      moduleclean mod24clean module24clean mod26clean module26clean \
++      backup unpatch uninstall \
++      check \
++
++kpatch: unapplypatch applypatch klipsdefaults
++npatch: unapplynpatch applynpatch
++sarefpatch: unapplysarefpatch applysarefpatch
++
++unapplypatch:
++      @echo "info: making unapplypatch in `pwd` and KERNELSRC=\"${KERNELSRC}\";"
++      -@if [ -f ${KERNELSRC}/libreswan.patch ]; then \
++              echo Undoing previous patches; \
++              cat ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
++      fi
++
++applypatch:
++      @echo "info: Now performing forward patches in `pwd`";
++      ${MAKE} kernelpatch${KERNELREL} | tee ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
++
++unapplynpatch:
++      @echo "info: making unapplynpatch (note the second N) in `pwd`";
++      -@if [ -f ${KERNELSRC}/natt.patch ]; then \
++              echo Undoing previous NAT patches; \
++              cat ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
++      fi
++
++applynpatch:
++      @echo "info: Now performing forward NAT patches in `pwd`";
++      ${MAKE} nattpatch${KERNELREL} | tee ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
++
++unapplysarefpatch:
++      @echo "info: making unapplysarefpatch in `pwd`";
++      -@if [ -f ${KERNELSRC}/saref.patch ]; then \
++              echo Undoing previous saref patches; \
++              cat ${KERNELSRC}/saref.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preng --reverse --ignore-whitespace ); \
++      fi
++
++applysarefpatch:
++      @echo "info: Now performing SAref patches in `pwd`";
++      ${MAKE} sarefpatch${KERNELREL} | tee ${KERNELSRC}/klipsng.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preng --forward --ignore-whitespace )
++
++# patch kernel
++PATCHER=packaging/utils/patcher
++
++_patches:
++      echo "===============" >>out.kpatch
++      echo "`date` `cd $(KERNELSRC) ; pwd`" >>out.kpatch
++      $(MAKE) __patches$(KERNELREL) >>out.kpatch
++
++# Linux-2.4.0 version
++__patches2.4:
++      @$(PATCHER) -v -c $(KERNELSRC) Documentation/Configure.help \
++              'CONFIG_KLIPS' $(PATCHES)/Documentation/Configure.help.fs2_2.patch
++      @$(PATCHER) -v $(KERNELSRC) net/Config.in \
++              'CONFIG_KLIPS' $(PATCHES)/net/Config.in.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) net/Makefile \
++              'CONFIG_KLIPS' $(PATCHES)/net/Makefile.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) net/ipv4/af_inet.c \
++              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/af_inet.c.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) net/ipv4/udp.c \
++              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/udp.c.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) include/net/sock.h \
++              'CONFIG_KLIPS' $(PATCHES)/include/net/sock.h.fs2_4.patch
++# Removed patches, will unpatch automatically.
++      @$(PATCHER) -v $(KERNELSRC) include/linux/proc_fs.h
++      @$(PATCHER) -v $(KERNELSRC) net/core/dev.c
++      @$(PATCHER) -v $(KERNELSRC) net/ipv4/protocol.c
++      @$(PATCHER) -v $(KERNELSRC) drivers/net/Space.c
++      @$(PATCHER) -v $(KERNELSRC) include/linux/netlink.h
++      @$(PATCHER) -v $(KERNELSRC) net/netlink/af_netlink.c
++      @$(PATCHER) -v $(KERNELSRC) net/netlink/netlink_dev.c
++      @$(PATCHER) -v $(KERNELSRC) drivers/isdn/isdn_net.c
++
++klipsdefaults:
++      @KERNELDEFCONFIG=$(KERNELSRC)/arch/$(ARCH)/defconfig ; \
++      KERNELCONFIG=$(KCFILE) ; \
++      if ! egrep -q 'CONFIG_KLIPS' $$KERNELDEFCONFIG ; \
++      then \
++              set -x ; \
++              cp -a $$KERNELDEFCONFIG $$KERNELDEFCONFIG.orig ; \
++              chmod u+w $$KERNELDEFCONFIG ; \
++              cat $$KERNELDEFCONFIG $(KERNELKLIPS)/defconfig \
++                      >$$KERNELDEFCONFIG.tmp ; \
++              rm -f $$KERNELDEFCONFIG ; \
++              cp -a $$KERNELDEFCONFIG.tmp $$KERNELDEFCONFIG ; \
++              rm -f $$KERNELDEFCONFIG.tmp ; \
++      fi ; \
++      if ! egrep -q 'CONFIG_KLIPS' $$KERNELCONFIG ; \
++      then \
++              set -x ; \
++              cp -a $$KERNELCONFIG $$KERNELCONFIG.orig ; \
++              chmod u+w $$KERNELCONFIG ; \
++              cat $$KERNELCONFIG $(KERNELKLIPS)/defconfig \
++                      >$$KERNELCONFIG.tmp ; \
++              rm -f $$KERNELCONFIG ; \
++              cp -a $$KERNELCONFIG.tmp $$KERNELCONFIG ; \
++              rm -f $$KERNELCONFIG.tmp ; \
++      fi
++
++
++local-clean-base: moduleclean
++distclean: moduleclean module24clean module26clean clean-kvm-keys
++
++# proxies for major kernel make operations
++
++# do-everything entries
++KINSERT_PRE=precheck verset insert
++PRE=precheck verset kpatch
++POST=confcheck programs kernel install
++MPOST=confcheck programs module install
++
++# preliminaries
++precheck:
++      @if test ! -d $(KERNELSRC) -a ! -L $(KERNELSRC) ; \
++      then \
++              echo '*** cannot find directory "$(KERNELSRC)"!!' ; \
++              echo '*** may be necessary to add symlink to kernel source' ; \
++              exit 1 ; \
++      fi
++      @if ! cd $(KERNELSRC) ; \
++      then \
++              echo '*** cannot "cd $(KERNELSRC)"!!' ; \
++              echo '*** may be necessary to add symlink to kernel source' ; \
++              exit 1 ; \
++      fi
++      @if test ! -f $(KCFILE) ; \
++      then \
++              echo '*** cannot find "$(KCFILE)"!!' ; \
++              echo '*** perhaps kernel has never been configured?' ; \
++              echo '*** please do that first; the results are necessary.' ; \
++              exit 1 ; \
++      fi
++      @if test ! -f $(VERFILE) ; \
++      then \
++              echo '*** cannot find "$(VERFILE)"!!' ; \
++              echo '*** perhaps kernel has never been compiled?' ; \
++              echo '*** please do that first; the results are necessary.' ; \
++              exit 1 ; \
++      fi
++
++# configuring (exit statuses disregarded, something fishy here sometimes)
++xcf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) xconfig
++mcf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) menuconfig
++pcf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) config
++
++ocf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig
++
++rcf:
++      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) ${NONINTCONFIG} </dev/null
++      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) dep >/dev/null
++
++kclean:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) clean
++
++confcheck:
++      @if test ! -f $(KCFILE) ; \
++      then echo '*** no kernel configuration file written!!' ; exit 1 ; \
++      fi
++      @if ! egrep -q '^CONFIG_KLIPS=[my]' $(KCFILE) ; \
++      then echo '*** IPsec not in kernel config ($(KCFILE))!!' ; exit 1 ; \
++      fi
++      @if ! egrep -q 'CONFIG_KLIPS[   ]+1' $(ACFILE) && \
++              ! egrep -q 'CONFIG_KLIPS_MODULE[        ]+1' $(ACFILE) ; \
++      then echo '*** IPsec in kernel config ($(KCFILE)),' ; \
++              echo '***       but not in config header file ($(ACFILE))!!' ; \
++              exit 1 ; \
++      fi
++      @if egrep -q '^CONFIG_KLIPS=m' $(KCFILE) && \
++              ! egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++      then echo '*** IPsec configured as module in kernel with no module support!!' ; exit 1 ; \
++      fi
++      @if ! egrep -q 'CONFIG_KLIPS_AH[        ]+1' $(ACFILE) && \
++              ! egrep -q 'CONFIG_KLIPS_ESP[   ]+1' $(ACFILE) ; \
++      then echo '*** IPsec configuration must include AH or ESP!!' ; exit 1 ; \
++      fi
++
++# kernel building, with error checks
++kernel:
++      rm -f out.kbuild out.kinstall
++      # undocumented kernel folklore: clean BEFORE dep.
++      # we run make dep separately, because there is no point in running ERRCHECK
++      # on the make dep output.
++      # see LKML thread "clean before or after dep?"
++      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNCLEAN) $(KERNDEP) )
++      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNEL) ) 2>&1 | tee out.kbuild
++      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++      then set -x ; \
++              ( cd $(KERNELSRC) ; \
++              $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
++      fi
++      ${ERRCHECK} out.kbuild
++
++# module-only building, with error checks
++ifneq ($(strip $(MOD24BUILDDIR)),)
++${MOD24BUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make
++      mkdir -p ${MOD24BUILDDIR}
++      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make ${MOD24BUILDDIR}/Makefile
++
++module:
++      @if [ -f ${KERNELSRC}/README.libreswan-2 ] ; then \
++                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with libreswan-2, out of tree build might fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/README.openswan ] ; then \
++                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan, out of tree build might fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/README.openswan-2 ] ; then \
++                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan-2, out of tree build might fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/README.freeswan ] ; then \
++                echo "ERROR: Kernel source ${KERNELSRC} has already been patched with freeswan, out of tree build will fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
++                echo "Building module for a 2.4 kernel"; ${MAKE} module24 ; \
++        else echo "Building module for a 2.6 kernel"; ${MAKE} module26; \
++        fi;
++
++modclean moduleclean:
++      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
++              echo "Cleaning module for a 2.4 kernel"; ${MAKE} module24clean ; \
++      else echo "Cleaning module for a 2.6 kernel"; ${MAKE} module26clean; \
++      fi;
++
++module24:
++      @if [ ! -f ${KERNELSRC}/Rules.make ] ; then \
++                echo "Warning: Building for a 2.4 kernel in what looks like a 2.6 tree"; \
++        fi ; \
++        ${MAKE} ${MOD24BUILDDIR}/Makefile
++      ${MAKE} -C ${MOD24BUILDDIR}  LIBRESWANSRCDIR=${LIBRESWANSRCDIR} ARCH=${ARCH} V=${V} ${MODULE_FLAGS} MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} TOPDIR=${KERNELSRC} -f Makefile ipsec.o
++      @echo
++      @echo '========================================================='
++      @echo
++      @echo 'KLIPS24 module built successfully. '
++      @echo ipsec.o is in ${MOD24BUILDDIR}
++      @echo
++      @(cd ${MOD24BUILDDIR}; ls -l ipsec.o)
++      @(cd ${MOD24BUILDDIR}; size ipsec.o)
++      @echo
++      @echo 'use make minstall as root to install it'
++      @echo
++      @echo '========================================================='
++      @echo
++
++mod24clean module24clean:
++      rm -rf ${MOD24BUILDDIR}
++
++#autoodetect 2.4 and 2.6
++module_install minstall install-module:
++      @if [ -f $(KERNELSRC)/Rules.make ] ; then \
++                $(MAKE) minstall24 ; \
++      else \
++              $(MAKE) minstall26 ; \
++        fi;
++
++# Extract the value of MODLIB from the output of $(MAKE).  Also hide
++# the sup-process $(MAKE) so that GNU Make doesn't always invoke the
++# target ("make -n" ignored).
++#
++# If $(MAKE) directly appears in a target (for instance in minstall26)
++# then GNU Make will assume that it is a recursive make invocation and
++# invoke the target regardless of -n.
++#
++# XXX: minstall24 should also use this.
++
++osmodlib-from-make = \
++      OSMODLIB=$$($(MAKE) $(1) 2>/dev/null | sed -n -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/p' | head -1) ; \
++      test -z "$$OSMODLIB" || echo "OSMODLIB=$$OSMODLIB ($(MAKE) $(1))"
++
++# module-only install, with error checks
++minstall24:
++      ( OSMODLIB=`${MAKE} -C $(KERNELSRC) -p dummy | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              OSMODLIB=`${MAKE} -C $(KERNELSRC) -n -p modules_install | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
++      fi ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              echo "No known place to install module. Aborting." ; \
++              exit 93 ; \
++      fi ; \
++      set -x ; \
++      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      cp $(MOD24BUILDDIR)/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      if [ -f /sbin/depmod ] ; then /sbin/depmod -a ; fi; \
++      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
++        mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++                if [ -f $$OSMODLIB/kernel/ipsec.o -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ] ; then \
++                        echo "WARNING: two ipsec.o modules found in $$OSMODLIB/kernel:" ; \
++                        ls -l $$OSMODLIB/kernel/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ; \
++                        exit 1; \
++                fi ; \
++        fi ; \
++        set -x ) ;
++
++
++else
++module:
++      echo 'Building in place is no longer supported. Please set MOD24BUILDDIR='
++      exit 1
++
++endif
++
++# module-only building, with error checks
++ifneq ($(strip $(MODBUILDDIR)),)
++${MODBUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module.make
++      mkdir -p ${MODBUILDDIR}
++      echo ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/*.S ${MODBUILDDIR}
++      (rm -f ${MODBUILDDIR}/des; mkdir -p ${MODBUILDDIR}/des && cd ${MODBUILDDIR}/des && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/* . && ln -s -f Makefile.fs2_6 Makefile)
++      (rm -f ${MODBUILDDIR}/aes; mkdir -p ${MODBUILDDIR}/aes && cd ${MODBUILDDIR}/aes && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/aes/* . && ln -s -f Makefile.fs2_6 Makefile)
++      mkdir -p ${MODBUILDDIR}/aes
++      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module.make ${MODBUILDDIR}/Makefile
++      ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/match*.S ${MODBUILDDIR}
++
++module26:
++      @if [ -f ${KERNELSRC}/Rules.make ] ; then \                 echo "Warning: Building for a 2.6+ kernel in what looks like a 2.4 tree"; \
++        fi ; \
++        ${MAKE}  ${MODBUILDDIR}/Makefile
++      ${MAKE} -C ${KERNELSRC} ${KERNELBUILDMFLAGS} BUILDDIR=${MODBUILDDIR} SUBDIRS=${MODBUILDDIR} INITSYSTEM=$(INITSYSTEM) MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} MODULE_DEFCONFIG=${MODULE_DEFCONFIG}  MODULE_EXTRA_INCLUDE=${MODULE_EXTRA_INCLUDE} ARCH=${ARCH} V=${V} modules
++      @echo
++      @echo '========================================================='
++      @echo
++      @echo 'KLIPS module built successfully. '
++      @echo ipsec.ko is in ${MODBUILDDIR}
++      @echo
++      @(cd ${MODBUILDDIR}; ls -l ipsec.ko)
++      @(cd ${MODBUILDDIR}; size ipsec.ko)
++      @echo
++      @echo 'use make minstall as root to install it'
++      @echo
++      @echo '========================================================='
++      @echo
++
++mod26clean module26clean:
++      rm -rf ${MODBUILDDIR}
++
++# module-only install, with error checks
++minstall26:
++      $(call osmodlib-from-make,-C $(KERNELSRC) -p help) ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              $(call osmodlib-from-make,-C $(KERNELSRC) -n -p modules_install) ; \
++      fi ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              echo "No known place to install module. Aborting." ; \
++              exit 93 ; \
++      fi ; \
++      set -x ; \
++      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      cp $(MODBUILDDIR)/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      if [ -f /sbin/depmod ] ; then \
++              /sbin/depmod -a ; \
++      fi ; \
++      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
++              mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++              if [ -f $$OSMODLIB/kernel/ipsec.ko -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ] ; then \
++                      echo "WARNING: two ipsec.ko modules found in $$OSMODLIB/kernel:" ; \
++                      ls -l $$OSMODLIB/kernel/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ; \
++                      exit 1; \
++              fi ; \
++      fi
++
++
++else
++module26:
++      echo 'Building in place is no longer supported. Please set MODBUILDDIR='
++      exit 1
++
++endif
++
++# kernel install, with error checks
++kinstall:
++      rm -f out.kinstall
++      >out.kinstall
++      # undocumented kernel folklore: modules_install must precede install (observed on RHL8.0)
++      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++      then set -x ; \
++              ( cd $(KERNELSRC) ; \
++              $(MAKE) $(KERNMAKEOPTS) modules_install 2>&1 ) | tee -a out.kinstall ; \
++      fi
++      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) install ) 2>&1 | tee -a out.kinstall
++      ${ERRCHECK} out.kinstall
++
++kernelpatch3 kernelpatch3.5 kernelpatch2.6 kernelpatch:
++      packaging/utils/kernelpatch 2.6
++
++kernelpatch2.4:
++      packaging/utils/kernelpatch 2.4
++
++nattpatch:
++      if [ -f ${KERNELSRC}/Makefile ]; then \
++              ${MAKE} nattpatch${KERNELREL}; \
++      else    echo "Cannot determine Linux kernel version. Perhaps you need to set KERNELSRC? (eg: export KERNELSRC=/usr/src/linux-`uname -r`/)"; exit 1; \
++      fi;
++
++sarefpatch2.6:
++      #cat patches/kernel/2.6.38/0001-SAREF-add-support-for-SA-selection-through-sendmsg.patch
++      #packaging/utils/sarefpatch 2.6
++      echo ""
++
++nattpatch2.6:
++      packaging/utils/nattpatch 2.6
++
++nattpatch2.4:
++      packaging/utils/nattpatch 2.4
++
++nattupdate:
++      (cd UMLPOOL && diff -u plain26/net/ipv4/udp.c.orig plain26/net/ipv4/udp.c; exit 0) >nat-t/net/ipv4/udp.c.os2_6.patch
++
++# take all the patches out of the kernel
++# (Note, a couple of files are modified by non-patch means; they are
++# included in "make backup".)
++unpatch:
++      @echo \"make unpatch\" is obsolete. See make unapplypatch.
++      exit 1
++
++_unpatch:
++      for f in `find $(KERNELSRC)/. -name '*.preipsec' -print` ; \
++      do \
++              echo "restoring $$f:" ; \
++              dir=`dirname $$f` ; \
++              core=`basename $$f .preipsec` ; \
++              cd $$dir ; \
++              mv -f $$core.preipsec $$core ; \
++              rm -f $$core.wipsec $$core.ipsecmd5 ; \
++      done
diff --git a/net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch b/net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch
new file mode 100644 (file)
index 0000000..f07f0ed
--- /dev/null
@@ -0,0 +1,22 @@
+From fa00316e8c5151747f3e80895e6afd9ee1a9c0cd Mon Sep 17 00:00:00 2001
+From: Andrew Cagney <cagney@gnu.org>
+Date: Thu, 25 Oct 2018 21:02:45 -0400
+Subject: [PATCH] building: when !USE_KLIPS=true cripple klips kernel module
+ rules
+
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 0b070966e6..2fcf0229fd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -216,5 +216,6 @@ install-fipshmac:
+ include ${LIBRESWANSRCDIR}/mk/docker-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/kvm-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/web-targets.mk
++ifeq ($(USE_KLIPS),true)
+ include ${LIBRESWANSRCDIR}/mk/kernel.mk
+-
++endif
index 63e55ca9ad4d0cb65f1f0031d274e5dbdfbf1132..7e7fddab5dbf11cb80987a686d0372fc4d23a9fd 100644 (file)
@@ -8,17 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpc
-PKG_VERSION:=2.1
-PKG_RELEASE:=1
+PKG_VERSION:=2.1.20190408
+PKG_RELEASE:=2
 
-PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=e19fb5e01ea5a707e2a8cb96f537fbd9f3a913d53d804a3265e3aeab3d2064c6
+PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
+PKG_HASH:=a0c46bcf6065d6351a8fa6a0a18dc57d10a16908dbb470908fd2e423511514ec
+
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
+PKG_LICENSE:=BSD-3c
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/miniupnpc/Default
   TITLE:=Lightweight UPnP
@@ -41,10 +45,10 @@ define Package/libminiupnpc
   TITLE+= library
 endef
 
-TARGET_CFLAGS += $(FPIC)
+CMAKE_OPTIONS += -DUPNPC_BUILD_TESTS=OFF
 
-MAKE_FLAGS += \
-       OS="Linux" \
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/miniupnpc
@@ -59,15 +63,13 @@ endef
 
 define Package/miniupnpc/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upnpc $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/upnpc-shared $(1)/usr/bin/upnpc
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/listdevices $(1)/usr/bin/
 endef
 
 define Package/libminiupnpc/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) \
-               $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* \
-               $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,miniupnpc))
diff --git a/net/miniupnpc/patches/100-no-fPIC.patch b/net/miniupnpc/patches/100-no-fPIC.patch
new file mode 100644 (file)
index 0000000..1e8b964
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,12 +38,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
+ endif ()
+-# Set compiler specific build flags
+-if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
+-  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+-  target_compile_options(miniupnpc-private INTERFACE -Wall)
+-endif ()
+-
+ # Suppress noise warnings
+ if (MSVC)
+   target_compile_definitions(miniupnpc-private INTERFACE _CRT_SECURE_NO_WARNINGS)
diff --git a/net/miniupnpc/patches/100-no_minixml_test.patch b/net/miniupnpc/patches/100-no_minixml_test.patch
deleted file mode 100644 (file)
index dd1d016..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -186,8 +186,8 @@ installpythonmodule3:      pythonmodule3
-       MAKE=$(MAKE) python3 setup.py install
- validateminixml:      minixmlvalid
--      @echo "minixml validation test"
--      ./minixmlvalid
-+      @echo "(skipping) minixml validation test"
-+#     ./minixmlvalid
-       touch $@
- validateminiwget:     testminiwget minihttptestserver testminiwget.sh
diff --git a/net/miniupnpc/patches/300-add-listdevices-to-cmake.patch b/net/miniupnpc/patches/300-add-listdevices-to-cmake.patch
new file mode 100644 (file)
index 0000000..e8d7900
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -66,6 +66,7 @@ set (MINIUPNPC_SOURCES
+   connecthostport.c
+   portlistingparse.c
+   receivedata.c
++  listdevices.c
+   connecthostport.h
+   igd_desc_parse.h
+   minisoap.h
+@@ -142,6 +143,10 @@ if (UPNPC_BUILD_SHARED)
+     add_executable (upnpc-shared upnpc.c)
+     target_link_libraries (upnpc-shared PRIVATE libminiupnpc-shared)
+     target_include_directories(upnpc-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
++
++    add_executable (listdevices listdevices.c)
++    target_link_libraries (listdevices PRIVATE libminiupnpc-shared)
++    target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+   endif ()
+ endif ()
index 6d20d5a5901709acb05137ad9091acc030e79051..be7f4343ec26b32cda70e4a67b4bd6f64f19e71d 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpd
-PKG_VERSION:=2.1.20180706
+PKG_VERSION:=2.1.20190408
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=fc2d2fd044d8c3f8d02b63d70489bb35ece836a4fc1b6386865ac8fbe8d8b006
+PKG_HASH:=4175d588f600e2877503c781c5d75320dfce572669fcab7604434b07ec5c0d5d
 
 PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/version.mk
@@ -38,9 +39,9 @@ define Build/Prepare
        echo "$(VERSION_NUMBER)" | tr '() ' '_' >$(PKG_BUILD_DIR)/os.openwrt
 endef
 
-TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
-TARGET_CFLAGS += -flto -ffunction-sections -fdata-sections -O2
-TARGET_LDFLAGS += $(FPIC) -flto -Wl,--gc-sections
+TARGET_CFLAGS += $(FPIC) -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 MAKE_FLAGS += \
        TARGET_OPENWRT=1 TEST=0 LIBS="" \
        CC="$(TARGET_CC) -DIPTABLES_143 -lip4tc -luuid \
index b19b8520e383270549bed6ccff5c9f734807963a..a07ed38242be5e045f31fd42cfdc2c5f3ede2152 100644 (file)
 +              if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
 +                      echo "#define LIB_UUID" >> ${CONFIGFILE}
 +              fi
-+              ;;
++      ;;
 +esac
  
  # set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
  if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
 --- a/Makefile.linux
 +++ b/Makefile.linux
-@@ -74,7 +74,10 @@ CPPFLAGS += -DIPTABLES_143
+@@ -77,7 +77,10 @@ CPPFLAGS += -DIPTABLES_143
  endif
  
  CFLAGS  += $(shell $(PKG_CONFIG) --cflags libiptc)
@@ -39,7 +39,7 @@
  LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
  LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
  else
-@@ -154,6 +157,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -157,6 +160,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
  LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
  endif # ($(TEST),1)
  
  LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
  
  TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
-@@ -162,6 +167,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
+@@ -165,6 +170,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
  else
  $(info please install uuid-dev package / libuuid)
  endif # ($(TEST),1)
 +endif # ($(TARGET_OPENWRT,)
  
- TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
+ GLIBC_VERSION := $(shell ldd --version | head -n 1 | sed 's/^.* //')
+ GLIBC_VERSION_MAJOR = $(shell echo $(GLIBC_VERSION) | cut -f 1 -d . )
diff --git a/net/miniupnpd/patches/200-remove-default-cflags.patch b/net/miniupnpd/patches/200-remove-default-cflags.patch
new file mode 100644 (file)
index 0000000..9efa8bb
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -23,16 +23,16 @@
+ #
+ #CFLAGS = -O -g -DDEBUG
+ CFLAGS ?= -Os
+-CFLAGS += -fno-strict-aliasing
+-CFLAGS += -fno-common
+-CFLAGS += -fstack-protector -fPIE
+-CFLAGS += -D_FORTIFY_SOURCE=2
+-CPPFLAGS += -D_GNU_SOURCE
+-CFLAGS += -Wall
+-CFLAGS += -Wextra -Wstrict-prototypes -Wdeclaration-after-statement
++#CFLAGS += -fno-strict-aliasing
++#CFLAGS += -fno-common
++#CFLAGS += -fstack-protector -fPIE
++#CFLAGS += -D_FORTIFY_SOURCE=2
++#CPPFLAGS += -D_GNU_SOURCE
++#CFLAGS += -Wall
++#CFLAGS += -Wextra -Wstrict-prototypes -Wdeclaration-after-statement
+ #CFLAGS += -Wno-missing-field-initializers
+ #CFLAGS += -ansi      # iptables headers does use typeof which is a gcc extension
+-LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
++LDFLAGS ?= -Wl,-z,now -Wl,-z,relro -pie
+ CC ?= gcc
+ RM = rm -f
+ INSTALL = install
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 4cdfc136975697c04ba88a7cd322899ca42f66e5..6ad405aac7d51b4d97953d920f5641cb8894584f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2016 OpenWrt.org
+# Copyright (C) 2009-2019 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
 PKG_VERSION:=2.3.3
-PKG_RELEASE:=5
+PKG_RELEASE:=7
 PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
 
 PKG_SOURCE_URL:=@SF/nfs
@@ -29,36 +29,37 @@ include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/nfs-kernel-server/Default
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Filesystem
-  DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
-  URL:=http://nfs.sourceforge.net/
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+       SECTION:=net
+       CATEGORY:=Network
+       SUBMENU:=Filesystem
+       DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
+       URL:=http://nfs.sourceforge.net/
+       MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
 
 define Package/nfs-kernel-server
-  $(call Package/nfs-kernel-server/Default)
-  TITLE:=Kernel NFS server support
-  DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+       $(call Package/nfs-kernel-server/Default)
+       TITLE:=Kernel NFS server support
+       DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+       USERID:=nfs:nfs
 endef
 
 define Package/nfs-kernel-server/description
-  Kernel NFS server support
+Kernel NFS server support
 endef
 
 define Package/nfs-kernel-server/config
-  source "$(SOURCE)/Config.in"
+       source "$(SOURCE)/Config.in"
 endef
 
 define Package/nfs-kernel-server-utils
-  $(call Package/nfs-kernel-server/Default)
-  TITLE:=NFS server utils
-  DEPENDS:=nfs-kernel-server
+       $(call Package/nfs-kernel-server/Default)
+       TITLE:=NFS server utils
+       DEPENDS:=nfs-kernel-server
 endef
 
 define Package/nfs-kernel-server-utils/description
-  NFS server utils
+NFS server utils
 endef
 
 define Package/nfs-kernel-server/conffiles
@@ -66,30 +67,30 @@ define Package/nfs-kernel-server/conffiles
 endef
 
 define Package/nfs-utils/Default
-  $(call Package/nfs-kernel-server/Default)
-  SECTION:=utils
-  CATEGORY:=Utilities
-  DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
-  URL:=http://nfs.sourceforge.net/
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+       $(call Package/nfs-kernel-server/Default)
+       SECTION:=utils
+       CATEGORY:=Utilities
+       DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+       URL:=http://nfs.sourceforge.net/
+       MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
 
 define Package/nfs-utils
-  $(call Package/nfs-utils/Default)
-  TITLE:=updated mount utility (includes nfs4)
+       $(call Package/nfs-utils/Default)
+       TITLE:=updated mount utility (includes nfs4)
 endef
 
 define Package/nfs-utils/description
-  Updated mount.nfs command - allows mounting nfs4 volumes
+Updated mount.nfs command - allows mounting nfs4 volumes
 endef
 
 define Package/nfs-utils-libs
-  $(call Package/nfs-utils/Default)
-  TITLE:=libraries provided by nfs-utils
+       $(call Package/nfs-utils/Default)
+       TITLE:=libraries provided by nfs-utils
 endef
 
 define Package/nfs-utils-libs/description
-  Libraries provided by nfs-utils
+Libraries provided by nfs-utils
 endef
 
 TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
@@ -113,7 +114,7 @@ CONFIGURE_ARGS += \
        $(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv41
 
 ifeq ($(CONFIG_IPV6),n)
-CONFIGURE_ARGS += --disable-ipv6
+       CONFIGURE_ARGS += --disable-ipv6
 endif
 
 CONFIGURE_VARS += \
diff --git a/net/nfs-kernel-server/patches/200-idmapd-add-missing-libgen-header.patch b/net/nfs-kernel-server/patches/200-idmapd-add-missing-libgen-header.patch
new file mode 100644 (file)
index 0000000..1dd6b88
--- /dev/null
@@ -0,0 +1,29 @@
+From: Rosen Penev <rosenp@gmail.com>\r
+To: linux-nfs@vger.kernel.org\r
+Subject: [PATCH] idmapd: Add missing libgen header\r
+Date: Sun, 14 Apr 2019 19:11:40 -0700\r
+Message-Id: <20190415021140.1388-1-rosenp@gmail.com>\r
+X-Mailer: git-send-email 2.17.1\r
+\r
+Otherwise compilation can fail with an implicit declaration of basename.\r
+\r
+Signed-off-by: Rosen Penev <rosenp@gmail.com>\r
+---\r
+ utils/idmapd/idmapd.c | 1 +\r
+ 1 file changed, 1 insertion(+)\r
+\r
+diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c\r
+index 91c0253..62e37b8 100644\r
+--- a/utils/idmapd/idmapd.c\r
++++ b/utils/idmapd/idmapd.c\r
+@@ -59,6 +59,7 @@\r
+ #include <grp.h>\r
+ #include <limits.h>\r
+ #include <ctype.h>\r
++#include <libgen.h>\r
+ #include <nfsidmap.h>\r
\r
+ #ifdef HAVE_CONFIG_H\r
+-- \r
+2.17.1\r
+\r
index 4a52720594b1d427cc957cd1a46f0a7704ef8532..68ade8ccb0e06448eb5ae09106bbd730697a6e42 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
-PKG_VERSION:=1.15.8
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.10
+PKG_RELEASE:=2
 
 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,8 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
        CONFIG_NGINX_RTMP_MODULE \
        CONFIG_NGINX_TS_MODULE \
+       CONFIG_OPENSSL_ENGINE \
+       CONFIG_OPENSSL_WITH_NPN
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -80,7 +82,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 +106,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 +118,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 9b4c4332f9d8a67303b5d7ef39dfece25c55be12..d5796618e00af4abfd3bf7797e0a2e3b9b7385b5 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=obfs4proxy
-PKG_VERSION:=0.0.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.0.10
+PKG_RELEASE:=1
 
 PKG_SOURCE:=obfs4-$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4/-/archive/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=ab2608014fae15b4e0dad2f8128e81f912ab27277539004b759180c1fb5007dd
+PKG_HASH:=0de856a33502005661f0491dc695dcaa1a7eb3f6cafbe689b99301a0d6762639
 PKG_BUILD_DIR:=$(BUILD_DIR)/obfs4-$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_LICENSE:=BSD-2-Clause
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..04b2d0e9e79d0bc86508c8bba34bae4aeb77c4d7 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
-PKG_VERSION:=7.9p1
-PKG_RELEASE:=6
+PKG_VERSION:=8.0p1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
                https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
                https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/
-PKG_HASH:=6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad
+PKG_HASH:=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
 
 PKG_LICENSE:=BSD ISC
 PKG_LICENSE_FILES:=LICENCE
@@ -130,8 +130,6 @@ endef
 define Package/openssh-sftp-server
        $(call Package/openssh/Default)
        TITLE+= SFTP server
-       # Strip dependencies to avoid pulling in OpenSSL etc.
-       DEPENDS:=
 endef
 
 define Package/openssh-sftp-server/description
@@ -180,7 +178,7 @@ CONFIGURE_ARGS += \
        --without-pam
 endif
 
-ifeq ($(CONFIG_OPENSSL_ENGINE_CRYPTO),y)
+ifeq ($(CONFIG_OPENSSL_ENGINE),y)
 CONFIGURE_ARGS+= \
        --with-ssl-engine
 endif
@@ -197,10 +195,6 @@ TARGET_LDFLAGS += -lpthread
 endif
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               LIBS="" \
-               sftp-server
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                STRIP_OPT="" \
diff --git a/net/openssh/patches/0000-CVE-2018-20685.patch b/net/openssh/patches/0000-CVE-2018-20685.patch
deleted file mode 100644 (file)
index f2f1ecf..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6010c0303a422a9c5fa8860c061bf7105eb7f8b2 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Fri, 16 Nov 2018 03:03:10 +0000
-Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer
- to the
-
-current directory; based on report/patch from Harry Sintonen
-
-OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9
----
- scp.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/scp.c b/scp.c
-index 60682c687..4f3fdcd3d 100644
---- a/scp.c
-+++ b/scp.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
-+/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */
- /*
-  * scp - secure remote copy.  This is basically patched BSD rcp which
-  * uses ssh to do the data transfer (instead of using rcmd).
-@@ -1106,7 +1106,8 @@ sink(int argc, char **argv)
-                       SCREWUP("size out of range");
-               size = (off_t)ull;
--              if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
-+              if (*cp == '\0' || strchr(cp, '/') != NULL ||
-+                  strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
-                       run_err("error: unexpected filename: %s", cp);
-                       exit(1);
-               }
diff --git a/net/openssh/patches/0001-fix-key-type-check.patch b/net/openssh/patches/0001-fix-key-type-check.patch
deleted file mode 100644 (file)
index c5b9f0e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 5e021158aa22cc64da4fca1618ee0bfd2d031049 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Fri, 16 Nov 2018 02:43:56 +0000
-Subject: upstream: fix bug in HostbasedAcceptedKeyTypes and
-
-PubkeyAcceptedKeyTypes options. If only RSA-SHA2 siganture types were
-specified, then authentication would always fail for RSA keys as the monitor
-checks only the base key (not the signature algorithm) type against
-*AcceptedKeyTypes. bz#2746; reported by Jakub Jelen; ok dtucker
-
-OpenBSD-Commit-ID: 117bc3dc54578dbdb515a1d3732988cb5b00461b
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=cd9467318b56e6e93ff9575c906ff8350af9b8a2
-Last-Update: 2019-02-28
-
-Patch-Name: fix-key-type-check.patch
----
- monitor.c | 39 ++++++++++++++++++++++++++++++++++-----
- 1 file changed, 34 insertions(+), 5 deletions(-)
-
-diff --git a/monitor.c b/monitor.c
-index 08fddabd7..037d6d333 100644
---- a/monitor.c
-+++ b/monitor.c
-@@ -892,6 +892,35 @@ mm_answer_authrole(int sock, struct sshbuf *m)
-       return (0);
- }
-+/*
-+ * Check that the key type appears in the supplied pattern list, ignoring
-+ * mismatches in the signature algorithm. (Signature algorithm checks are
-+ * performed in the unprivileged authentication code).
-+ * Returns 1 on success, 0 otherwise.
-+ */
-+static int
-+key_base_type_match(const char *method, const struct sshkey *key,
-+    const char *list)
-+{
-+      char *s, *l, *ol = xstrdup(list);
-+      int found = 0;
-+
-+      l = ol;
-+      for ((s = strsep(&l, ",")); s && *s != '\0'; (s = strsep(&l, ","))) {
-+              if (sshkey_type_from_name(s) == key->type) {
-+                      found = 1;
-+                      break;
-+              }
-+      }
-+      if (!found) {
-+              error("%s key type %s is not in permitted list %s", method,
-+                  sshkey_ssh_name(key), list);
-+      }
-+
-+      free(ol);
-+      return found;
-+}
-+
- int
- mm_answer_authpassword(int sock, struct sshbuf *m)
- {
-@@ -1197,8 +1226,8 @@ mm_answer_keyallowed(int sock, struct sshbuf *m)
-                               break;
-                       if (auth2_key_already_used(authctxt, key))
-                               break;
--                      if (match_pattern_list(sshkey_ssh_name(key),
--                          options.pubkey_key_types, 0) != 1)
-+                      if (!key_base_type_match(auth_method, key,
-+                          options.pubkey_key_types))
-                               break;
-                       allowed = user_key_allowed(ssh, authctxt->pw, key,
-                           pubkey_auth_attempt, &opts);
-@@ -1209,8 +1238,8 @@ mm_answer_keyallowed(int sock, struct sshbuf *m)
-                               break;
-                       if (auth2_key_already_used(authctxt, key))
-                               break;
--                      if (match_pattern_list(sshkey_ssh_name(key),
--                          options.hostbased_key_types, 0) != 1)
-+                      if (!key_base_type_match(auth_method, key,
-+                          options.hostbased_key_types))
-                               break;
-                       allowed = hostbased_key_allowed(authctxt->pw,
-                           cuser, chost, key);
diff --git a/net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch b/net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch
deleted file mode 100644 (file)
index 2c876be..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-From d94226d4fcefbc398c5583e12b5d07ca33884ba4 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Thu, 27 Dec 2018 23:02:11 +0000
-Subject: upstream: Request RSA-SHA2 signatures for
-
-rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@
-
-OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=f429c1b2ef631f2855e51a790cf71761d752bbca
-Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2944
-Bug-Debian: https://bugs.debian.org/923419
-Last-Update: 2019-02-28
-
-Patch-Name: request-rsa-sha2-cert-signatures.patch
----
- authfd.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/authfd.c b/authfd.c
-index ecdd869ab..62cbf8c19 100644
---- a/authfd.c
-+++ b/authfd.c
-@@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl)
- static u_int
- agent_encode_alg(const struct sshkey *key, const char *alg)
- {
--      if (alg != NULL && key->type == KEY_RSA) {
--              if (strcmp(alg, "rsa-sha2-256") == 0)
-+      if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) {
-+              if (strcmp(alg, "rsa-sha2-256") == 0 ||
-+                  strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0)
-                       return SSH_AGENT_RSA_SHA2_256;
--              else if (strcmp(alg, "rsa-sha2-512") == 0)
-+              if (strcmp(alg, "rsa-sha2-512") == 0 ||
-+                  strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0)
-                       return SSH_AGENT_RSA_SHA2_512;
-       }
-       return 0;
diff --git a/net/openssh/patches/0003-sanitize-scp-filenames-via-snmprintf.patch b/net/openssh/patches/0003-sanitize-scp-filenames-via-snmprintf.patch
deleted file mode 100644 (file)
index 347382b..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-From 11b88754cadcad0ba79b4ffcc127223248dccb54 Mon Sep 17 00:00:00 2001
-From: "dtucker@openbsd.org" <dtucker@openbsd.org>
-Date: Wed, 23 Jan 2019 08:01:46 +0000
-Subject: upstream: Sanitize scp filenames via snmprintf. To do this we move
-
-the progressmeter formatting outside of signal handler context and have the
-atomicio callback called for EINTR too.  bz#2434 with contributions from djm
-and jjelen at redhat.com, ok djm@
-
-OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8
-
-CVE-2019-6109
-
-Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=8976f1c4b2721c26e878151f52bdf346dfe2d54c
-Bug-Debian: https://bugs.debian.org/793412
-Last-Update: 2019-02-08
-
-Patch-Name: sanitize-scp-filenames-via-snmprintf.patch
----
- atomicio.c      | 20 ++++++++++++++-----
- progressmeter.c | 53 ++++++++++++++++++++++---------------------------
- progressmeter.h |  3 ++-
- scp.c           |  1 +
- sftp-client.c   | 16 ++++++++-------
- 5 files changed, 51 insertions(+), 42 deletions(-)
-
-diff --git a/atomicio.c b/atomicio.c
-index f854a06f5..d91bd7621 100644
---- a/atomicio.c
-+++ b/atomicio.c
-@@ -65,9 +65,14 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n,
-               res = (f) (fd, s + pos, n - pos);
-               switch (res) {
-               case -1:
--                      if (errno == EINTR)
-+                      if (errno == EINTR) {
-+                              /* possible SIGALARM, update callback */
-+                              if (cb != NULL && cb(cb_arg, 0) == -1) {
-+                                      errno = EINTR;
-+                                      return pos;
-+                              }
-                               continue;
--                      if (errno == EAGAIN || errno == EWOULDBLOCK) {
-+                      } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
- #ifndef BROKEN_READ_COMPARISON
-                               (void)poll(&pfd, 1, -1);
- #endif
-@@ -122,9 +127,14 @@ atomiciov6(ssize_t (*f) (int, const struct iovec *, int), int fd,
-               res = (f) (fd, iov, iovcnt);
-               switch (res) {
-               case -1:
--                      if (errno == EINTR)
-+                      if (errno == EINTR) {
-+                              /* possible SIGALARM, update callback */
-+                              if (cb != NULL && cb(cb_arg, 0) == -1) {
-+                                      errno = EINTR;
-+                                      return pos;
-+                              }
-                               continue;
--                      if (errno == EAGAIN || errno == EWOULDBLOCK) {
-+                      } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
- #ifndef BROKEN_READV_COMPARISON
-                               (void)poll(&pfd, 1, -1);
- #endif
-diff --git a/progressmeter.c b/progressmeter.c
-index fe9bf52e4..add462dde 100644
---- a/progressmeter.c
-+++ b/progressmeter.c
-@@ -31,6 +31,7 @@
- #include <errno.h>
- #include <signal.h>
-+#include <stdarg.h>
- #include <stdio.h>
- #include <string.h>
- #include <time.h>
-@@ -39,6 +40,7 @@
- #include "progressmeter.h"
- #include "atomicio.h"
- #include "misc.h"
-+#include "utf8.h"
- #define DEFAULT_WINSIZE 80
- #define MAX_WINSIZE 512
-@@ -61,7 +63,7 @@ static void setscreensize(void);
- void refresh_progress_meter(void);
- /* signal handler for updating the progress meter */
--static void update_progress_meter(int);
-+static void sig_alarm(int);
- static double start;          /* start progress */
- static double last_update;    /* last progress update */
-@@ -74,6 +76,7 @@ static long stalled;         /* how long we have been stalled */
- static int bytes_per_second;  /* current speed in bytes per second */
- static int win_size;          /* terminal window size */
- static volatile sig_atomic_t win_resized; /* for window resizing */
-+static volatile sig_atomic_t alarm_fired;
- /* units for format_size */
- static const char unit[] = " KMGT";
-@@ -126,9 +129,17 @@ refresh_progress_meter(void)
-       off_t bytes_left;
-       int cur_speed;
-       int hours, minutes, seconds;
--      int i, len;
-       int file_len;
-+      if ((!alarm_fired && !win_resized) || !can_output())
-+              return;
-+      alarm_fired = 0;
-+
-+      if (win_resized) {
-+              setscreensize();
-+              win_resized = 0;
-+      }
-+
-       transferred = *counter - (cur_pos ? cur_pos : start_pos);
-       cur_pos = *counter;
-       now = monotime_double();
-@@ -158,16 +169,11 @@ refresh_progress_meter(void)
-       /* filename */
-       buf[0] = '\0';
--      file_len = win_size - 35;
-+      file_len = win_size - 36;
-       if (file_len > 0) {
--              len = snprintf(buf, file_len + 1, "\r%s", file);
--              if (len < 0)
--                      len = 0;
--              if (len >= file_len + 1)
--                      len = file_len;
--              for (i = len; i < file_len; i++)
--                      buf[i] = ' ';
--              buf[file_len] = '\0';
-+              buf[0] = '\r';
-+              snmprintf(buf+1, sizeof(buf)-1 , &file_len, "%*s",
-+                  file_len * -1, file);
-       }
-       /* percent of transfer done */
-@@ -228,22 +234,11 @@ refresh_progress_meter(void)
- /*ARGSUSED*/
- static void
--update_progress_meter(int ignore)
-+sig_alarm(int ignore)
- {
--      int save_errno;
--
--      save_errno = errno;
--
--      if (win_resized) {
--              setscreensize();
--              win_resized = 0;
--      }
--      if (can_output())
--              refresh_progress_meter();
--
--      signal(SIGALRM, update_progress_meter);
-+      signal(SIGALRM, sig_alarm);
-+      alarm_fired = 1;
-       alarm(UPDATE_INTERVAL);
--      errno = save_errno;
- }
- void
-@@ -259,10 +254,9 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr)
-       bytes_per_second = 0;
-       setscreensize();
--      if (can_output())
--              refresh_progress_meter();
-+      refresh_progress_meter();
--      signal(SIGALRM, update_progress_meter);
-+      signal(SIGALRM, sig_alarm);
-       signal(SIGWINCH, sig_winch);
-       alarm(UPDATE_INTERVAL);
- }
-@@ -286,6 +280,7 @@ stop_progress_meter(void)
- static void
- sig_winch(int sig)
- {
-+      signal(SIGWINCH, sig_winch);
-       win_resized = 1;
- }
-diff --git a/progressmeter.h b/progressmeter.h
-index bf179dca6..8f6678060 100644
---- a/progressmeter.h
-+++ b/progressmeter.h
-@@ -24,4 +24,5 @@
-  */
- void  start_progress_meter(const char *, off_t, off_t *);
-+void  refresh_progress_meter(void);
- void  stop_progress_meter(void);
-diff --git a/scp.c b/scp.c
-index 7163d33dc..80308573c 100644
---- a/scp.c
-+++ b/scp.c
-@@ -593,6 +593,7 @@ scpio(void *_cnt, size_t s)
-       off_t *cnt = (off_t *)_cnt;
-       *cnt += s;
-+      refresh_progress_meter();
-       if (limit_kbps > 0)
-               bandwidth_limit(&bwlimit, s);
-       return 0;
-diff --git a/sftp-client.c b/sftp-client.c
-index 4986d6d8d..2bc698f86 100644
---- a/sftp-client.c
-+++ b/sftp-client.c
-@@ -101,7 +101,9 @@ sftpio(void *_bwlimit, size_t amount)
- {
-       struct bwlimit *bwlimit = (struct bwlimit *)_bwlimit;
--      bandwidth_limit(bwlimit, amount);
-+      refresh_progress_meter();
-+      if (bwlimit != NULL)
-+              bandwidth_limit(bwlimit, amount);
-       return 0;
- }
-@@ -121,8 +123,8 @@ send_msg(struct sftp_conn *conn, struct sshbuf *m)
-       iov[1].iov_base = (u_char *)sshbuf_ptr(m);
-       iov[1].iov_len = sshbuf_len(m);
--      if (atomiciov6(writev, conn->fd_out, iov, 2,
--          conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_out) !=
-+      if (atomiciov6(writev, conn->fd_out, iov, 2, sftpio,
-+          conn->limit_kbps > 0 ? &conn->bwlimit_out : NULL) !=
-           sshbuf_len(m) + sizeof(mlen))
-               fatal("Couldn't send packet: %s", strerror(errno));
-@@ -138,8 +140,8 @@ get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
-       if ((r = sshbuf_reserve(m, 4, &p)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
--      if (atomicio6(read, conn->fd_in, p, 4,
--          conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_in) != 4) {
-+      if (atomicio6(read, conn->fd_in, p, 4, sftpio,
-+          conn->limit_kbps > 0 ? &conn->bwlimit_in : NULL) != 4) {
-               if (errno == EPIPE || errno == ECONNRESET)
-                       fatal("Connection closed");
-               else
-@@ -157,8 +159,8 @@ get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
-       if ((r = sshbuf_reserve(m, msg_len, &p)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
--      if (atomicio6(read, conn->fd_in, p, msg_len,
--          conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_in)
-+      if (atomicio6(read, conn->fd_in, p, msg_len, sftpio,
-+          conn->limit_kbps > 0 ? &conn->bwlimit_in : NULL)
-           != msg_len) {
-               if (errno == EPIPE)
-                       fatal("Connection closed");
diff --git a/net/openssh/patches/0004-have-progressmeter-force-update-at-beginning-and-end-transfer.patch b/net/openssh/patches/0004-have-progressmeter-force-update-at-beginning-and-end-transfer.patch
deleted file mode 100644 (file)
index f89ee17..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From 2a8f710447442e9a03e71c022859112ec2d77d17 Mon Sep 17 00:00:00 2001
-From: "dtucker@openbsd.org" <dtucker@openbsd.org>
-Date: Thu, 24 Jan 2019 16:52:17 +0000
-Subject: upstream: Have progressmeter force an update at the beginning and
-
-end of each transfer.  Fixes the problem recently introduces where very quick
-transfers do not display the progressmeter at all.  Spotted by naddy@
-
-OpenBSD-Commit-ID: 68dc46c259e8fdd4f5db3ec2a130f8e4590a7a9a
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=bdc6c63c80b55bcbaa66b5fde31c1cb1d09a41eb
-Last-Update: 2019-02-08
-
-Patch-Name: have-progressmeter-force-update-at-beginning-and-end-transfer.patch
----
- progressmeter.c | 13 +++++--------
- progressmeter.h |  4 ++--
- scp.c           |  2 +-
- sftp-client.c   |  2 +-
- 4 files changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/progressmeter.c b/progressmeter.c
-index add462dde..e385c1254 100644
---- a/progressmeter.c
-+++ b/progressmeter.c
-@@ -59,9 +59,6 @@ static void format_rate(char *, int, off_t);
- static void sig_winch(int);
- static void setscreensize(void);
--/* updates the progressmeter to reflect the current state of the transfer */
--void refresh_progress_meter(void);
--
- /* signal handler for updating the progress meter */
- static void sig_alarm(int);
-@@ -120,7 +117,7 @@ format_size(char *buf, int size, off_t bytes)
- }
- void
--refresh_progress_meter(void)
-+refresh_progress_meter(int force_update)
- {
-       char buf[MAX_WINSIZE + 1];
-       off_t transferred;
-@@ -131,7 +128,7 @@ refresh_progress_meter(void)
-       int hours, minutes, seconds;
-       int file_len;
--      if ((!alarm_fired && !win_resized) || !can_output())
-+      if ((!force_update && !alarm_fired && !win_resized) || !can_output())
-               return;
-       alarm_fired = 0;
-@@ -254,7 +251,7 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr)
-       bytes_per_second = 0;
-       setscreensize();
--      refresh_progress_meter();
-+      refresh_progress_meter(1);
-       signal(SIGALRM, sig_alarm);
-       signal(SIGWINCH, sig_winch);
-@@ -271,7 +268,7 @@ stop_progress_meter(void)
-       /* Ensure we complete the progress */
-       if (cur_pos != end_pos)
--              refresh_progress_meter();
-+              refresh_progress_meter(1);
-       atomicio(vwrite, STDOUT_FILENO, "\n", 1);
- }
-diff --git a/progressmeter.h b/progressmeter.h
-index 8f6678060..1703ea75b 100644
---- a/progressmeter.h
-+++ b/progressmeter.h
-@@ -24,5 +24,5 @@
-  */
- void  start_progress_meter(const char *, off_t, off_t *);
--void  refresh_progress_meter(void);
-+void  refresh_progress_meter(int);
- void  stop_progress_meter(void);
-diff --git a/scp.c b/scp.c
-index 80308573c..1971c80cd 100644
---- a/scp.c
-+++ b/scp.c
-@@ -593,7 +593,7 @@ scpio(void *_cnt, size_t s)
-       off_t *cnt = (off_t *)_cnt;
-       *cnt += s;
--      refresh_progress_meter();
-+      refresh_progress_meter(0);
-       if (limit_kbps > 0)
-               bandwidth_limit(&bwlimit, s);
-       return 0;
-diff --git a/sftp-client.c b/sftp-client.c
-index 2bc698f86..cf2887a40 100644
---- a/sftp-client.c
-+++ b/sftp-client.c
-@@ -101,7 +101,7 @@ sftpio(void *_bwlimit, size_t amount)
- {
-       struct bwlimit *bwlimit = (struct bwlimit *)_bwlimit;
--      refresh_progress_meter();
-+      refresh_progress_meter(0);
-       if (bwlimit != NULL)
-               bandwidth_limit(bwlimit, amount);
-       return 0;
diff --git a/net/openssh/patches/0005-check-filenames-in-scp-client.patch b/net/openssh/patches/0005-check-filenames-in-scp-client.patch
deleted file mode 100644 (file)
index 519358c..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-From 125924e47db3713a85a70e0f8d6c23818d2ea054 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Sat, 26 Jan 2019 22:41:28 +0000
-Subject: upstream: check in scp client that filenames sent during
-
-remote->local directory copies satisfy the wildcard specified by the user.
-
-This checking provides some protection against a malicious server
-sending unexpected filenames, but it comes at a risk of rejecting wanted
-files due to differences between client and server wildcard expansion rules.
-
-For this reason, this also adds a new -T flag to disable the check.
-
-reported by Harry Sintonen
-fix approach suggested by markus@;
-has been in snaps for ~1wk courtesy deraadt@
-
-OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda
-
-CVE-2019-6111
-
-Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=391ffc4b9d31fa1f4ad566499fef9176ff8a07dc
-Last-Update: 2019-02-08
-
-Patch-Name: check-filenames-in-scp-client.patch
----
- scp.1 | 12 +++++++++++-
- scp.c | 37 +++++++++++++++++++++++++++++--------
- 2 files changed, 40 insertions(+), 9 deletions(-)
-
-diff --git a/scp.1 b/scp.1
-index 0e5cc1b2d..397e77091 100644
---- a/scp.1
-+++ b/scp.1
-@@ -18,7 +18,7 @@
- .Nd secure copy (remote file copy program)
- .Sh SYNOPSIS
- .Nm scp
--.Op Fl 346BCpqrv
-+.Op Fl 346BCpqrTv
- .Op Fl c Ar cipher
- .Op Fl F Ar ssh_config
- .Op Fl i Ar identity_file
-@@ -208,6 +208,16 @@ to use for the encrypted connection.
- The program must understand
- .Xr ssh 1
- options.
-+.It Fl T
-+Disable strict filename checking.
-+By default when copying files from a remote host to a local directory
-+.Nm
-+checks that the received filenames match those requested on the command-line
-+to prevent the remote end from sending unexpected or unwanted files.
-+Because of differences in how various operating systems and shells interpret
-+filename wildcards, these checks may cause wanted files to be rejected.
-+This option disables these checks at the expense of fully trusting that
-+the server will not send unexpected filenames.
- .It Fl v
- Verbose mode.
- Causes
-diff --git a/scp.c b/scp.c
-index 1971c80cd..035037bcc 100644
---- a/scp.c
-+++ b/scp.c
-@@ -94,6 +94,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <fnmatch.h>
- #include <limits.h>
- #include <locale.h>
- #include <pwd.h>
-@@ -383,14 +384,14 @@ void verifydir(char *);
- struct passwd *pwd;
- uid_t userid;
- int errs, remin, remout;
--int pflag, iamremote, iamrecursive, targetshouldbedirectory;
-+int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory;
- #define       CMDNEEDS        64
- char cmd[CMDNEEDS];           /* must hold "rcp -r -p -d\0" */
- int response(void);
- void rsource(char *, struct stat *);
--void sink(int, char *[]);
-+void sink(int, char *[], const char *);
- void source(int, char *[]);
- void tolocal(int, char *[]);
- void toremote(int, char *[]);
-@@ -429,8 +430,9 @@ main(int argc, char **argv)
-       addargs(&args, "-oRemoteCommand=none");
-       addargs(&args, "-oRequestTTY=no");
--      fflag = tflag = 0;
--      while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
-+      fflag = Tflag = tflag = 0;
-+      while ((ch = getopt(argc, argv,
-+          "dfl:prtTvBCc:i:P:q12346S:o:F:")) != -1) {
-               switch (ch) {
-               /* User-visible flags. */
-               case '1':
-@@ -509,9 +511,13 @@ main(int argc, char **argv)
-                       setmode(0, O_BINARY);
- #endif
-                       break;
-+              case 'T':
-+                      Tflag = 1;
-+                      break;
-               default:
-                       usage();
-               }
-+      }
-       argc -= optind;
-       argv += optind;
-@@ -542,7 +548,7 @@ main(int argc, char **argv)
-       }
-       if (tflag) {
-               /* Receive data. */
--              sink(argc, argv);
-+              sink(argc, argv, NULL);
-               exit(errs != 0);
-       }
-       if (argc < 2)
-@@ -800,7 +806,7 @@ tolocal(int argc, char **argv)
-                       continue;
-               }
-               free(bp);
--              sink(1, argv + argc - 1);
-+              sink(1, argv + argc - 1, src);
-               (void) close(remin);
-               remin = remout = -1;
-       }
-@@ -976,7 +982,7 @@ rsource(char *name, struct stat *statp)
-        (sizeof(type) != 4 && sizeof(type) != 8))
- void
--sink(int argc, char **argv)
-+sink(int argc, char **argv, const char *src)
- {
-       static BUF buffer;
-       struct stat stb;
-@@ -992,6 +998,7 @@ sink(int argc, char **argv)
-       unsigned long long ull;
-       int setimes, targisdir, wrerrno = 0;
-       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
-+      char *src_copy = NULL, *restrict_pattern = NULL;
-       struct timeval tv[2];
- #define       atime   tv[0]
-@@ -1016,6 +1023,17 @@ sink(int argc, char **argv)
-       (void) atomicio(vwrite, remout, "", 1);
-       if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
-               targisdir = 1;
-+      if (src != NULL && !iamrecursive && !Tflag) {
-+              /*
-+               * Prepare to try to restrict incoming filenames to match
-+               * the requested destination file glob.
-+               */
-+              if ((src_copy = strdup(src)) == NULL)
-+                      fatal("strdup failed");
-+              if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) {
-+                      *restrict_pattern++ = '\0';
-+              }
-+      }
-       for (first = 1;; first = 0) {
-               cp = buf;
-               if (atomicio(read, remin, cp, 1) != 1)
-@@ -1120,6 +1138,9 @@ sink(int argc, char **argv)
-                       run_err("error: unexpected filename: %s", cp);
-                       exit(1);
-               }
-+              if (restrict_pattern != NULL &&
-+                  fnmatch(restrict_pattern, cp, 0) != 0)
-+                      SCREWUP("filename does not match request");
-               if (targisdir) {
-                       static char *namebuf;
-                       static size_t cursize;
-@@ -1157,7 +1178,7 @@ sink(int argc, char **argv)
-                                       goto bad;
-                       }
-                       vect[0] = xstrdup(np);
--                      sink(1, vect);
-+                      sink(1, vect, src);
-                       if (setimes) {
-                               setimes = 0;
-                               if (utimes(vect[0], tv) < 0)
diff --git a/net/openssh/patches/0006-scp-handle-braces.patch b/net/openssh/patches/0006-scp-handle-braces.patch
deleted file mode 100644 (file)
index 0cbdcfd..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-From 7a3fa37583d4abf128f7f4c6eb1e7ffc90115eab Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Sun, 10 Feb 2019 11:15:52 +0000
-Subject: upstream: when checking that filenames sent by the server side
-
-match what the client requested, be prepared to handle shell-style brace
-alternations, e.g. "{foo,bar}".
-
-"looks good to me" millert@ + in snaps for the last week courtesy
-deraadt@
-
-OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=3d896c157c722bc47adca51a58dca859225b5874
-Bug-Debian: https://bugs.debian.org/923486
-Last-Update: 2019-03-01
-
-Patch-Name: scp-handle-braces.patch
----
- scp.c | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 269 insertions(+), 11 deletions(-)
-
-diff --git a/scp.c b/scp.c
-index 035037bcc..3888baab0 100644
---- a/scp.c
-+++ b/scp.c
-@@ -635,6 +635,253 @@ parse_scp_uri(const char *uri, char **userp, char **hostp, int *portp,
-       return r;
- }
-+/* Appends a string to an array; returns 0 on success, -1 on alloc failure */
-+static int
-+append(char *cp, char ***ap, size_t *np)
-+{
-+      char **tmp;
-+
-+      if ((tmp = reallocarray(*ap, *np + 1, sizeof(*tmp))) == NULL)
-+              return -1;
-+      tmp[(*np)] = cp;
-+      (*np)++;
-+      *ap = tmp;
-+      return 0;
-+}
-+
-+/*
-+ * Finds the start and end of the first brace pair in the pattern.
-+ * returns 0 on success or -1 for invalid patterns.
-+ */
-+static int
-+find_brace(const char *pattern, int *startp, int *endp)
-+{
-+      int i;
-+      int in_bracket, brace_level;
-+
-+      *startp = *endp = -1;
-+      in_bracket = brace_level = 0;
-+      for (i = 0; i < INT_MAX && *endp < 0 && pattern[i] != '\0'; i++) {
-+              switch (pattern[i]) {
-+              case '\\':
-+                      /* skip next character */
-+                      if (pattern[i + 1] != '\0')
-+                              i++;
-+                      break;
-+              case '[':
-+                      in_bracket = 1;
-+                      break;
-+              case ']':
-+                      in_bracket = 0;
-+                      break;
-+              case '{':
-+                      if (in_bracket)
-+                              break;
-+                      if (pattern[i + 1] == '}') {
-+                              /* Protect a single {}, for find(1), like csh */
-+                              i++; /* skip */
-+                              break;
-+                      }
-+                      if (*startp == -1)
-+                              *startp = i;
-+                      brace_level++;
-+                      break;
-+              case '}':
-+                      if (in_bracket)
-+                              break;
-+                      if (*startp < 0) {
-+                              /* Unbalanced brace */
-+                              return -1;
-+                      }
-+                      if (--brace_level <= 0)
-+                              *endp = i;
-+                      break;
-+              }
-+      }
-+      /* unbalanced brackets/braces */
-+      if (*endp < 0 && (*startp >= 0 || in_bracket))
-+              return -1;
-+      return 0;
-+}
-+
-+/*
-+ * Assembles and records a successfully-expanded pattern, returns -1 on
-+ * alloc failure.
-+ */
-+static int
-+emit_expansion(const char *pattern, int brace_start, int brace_end,
-+    int sel_start, int sel_end, char ***patternsp, size_t *npatternsp)
-+{
-+      char *cp;
-+      int o = 0, tail_len = strlen(pattern + brace_end + 1);
-+
-+      if ((cp = malloc(brace_start + (sel_end - sel_start) +
-+          tail_len + 1)) == NULL)
-+              return -1;
-+
-+      /* Pattern before initial brace */
-+      if (brace_start > 0) {
-+              memcpy(cp, pattern, brace_start);
-+              o = brace_start;
-+      }
-+      /* Current braced selection */
-+      if (sel_end - sel_start > 0) {
-+              memcpy(cp + o, pattern + sel_start,
-+                  sel_end - sel_start);
-+              o += sel_end - sel_start;
-+      }
-+      /* Remainder of pattern after closing brace */
-+      if (tail_len > 0) {
-+              memcpy(cp + o, pattern + brace_end + 1, tail_len);
-+              o += tail_len;
-+      }
-+      cp[o] = '\0';
-+      if (append(cp, patternsp, npatternsp) != 0) {
-+              free(cp);
-+              return -1;
-+      }
-+      return 0;
-+}
-+
-+/*
-+ * Expand the first encountered brace in pattern, appending the expanded
-+ * patterns it yielded to the *patternsp array.
-+ *
-+ * Returns 0 on success or -1 on allocation failure.
-+ *
-+ * Signals whether expansion was performed via *expanded and whether
-+ * pattern was invalid via *invalid.
-+ */
-+static int
-+brace_expand_one(const char *pattern, char ***patternsp, size_t *npatternsp,
-+    int *expanded, int *invalid)
-+{
-+      int i;
-+      int in_bracket, brace_start, brace_end, brace_level;
-+      int sel_start, sel_end;
-+
-+      *invalid = *expanded = 0;
-+
-+      if (find_brace(pattern, &brace_start, &brace_end) != 0) {
-+              *invalid = 1;
-+              return 0;
-+      } else if (brace_start == -1)
-+              return 0;
-+
-+      in_bracket = brace_level = 0;
-+      for (i = sel_start = brace_start + 1; i < brace_end; i++) {
-+              switch (pattern[i]) {
-+              case '{':
-+                      if (in_bracket)
-+                              break;
-+                      brace_level++;
-+                      break;
-+              case '}':
-+                      if (in_bracket)
-+                              break;
-+                      brace_level--;
-+                      break;
-+              case '[':
-+                      in_bracket = 1;
-+                      break;
-+              case ']':
-+                      in_bracket = 0;
-+                      break;
-+              case '\\':
-+                      if (i < brace_end - 1)
-+                              i++; /* skip */
-+                      break;
-+              }
-+              if (pattern[i] == ',' || i == brace_end - 1) {
-+                      if (in_bracket || brace_level > 0)
-+                              continue;
-+                      /* End of a selection, emit an expanded pattern */
-+
-+                      /* Adjust end index for last selection */
-+                      sel_end = (i == brace_end - 1) ? brace_end : i;
-+                      if (emit_expansion(pattern, brace_start, brace_end,
-+                          sel_start, sel_end, patternsp, npatternsp) != 0)
-+                              return -1;
-+                      /* move on to the next selection */
-+                      sel_start = i + 1;
-+                      continue;
-+              }
-+      }
-+      if (in_bracket || brace_level > 0) {
-+              *invalid = 1;
-+              return 0;
-+      }
-+      /* success */
-+      *expanded = 1;
-+      return 0;
-+}
-+
-+/* Expand braces from pattern. Returns 0 on success, -1 on failure */
-+static int
-+brace_expand(const char *pattern, char ***patternsp, size_t *npatternsp)
-+{
-+      char *cp, *cp2, **active = NULL, **done = NULL;
-+      size_t i, nactive = 0, ndone = 0;
-+      int ret = -1, invalid = 0, expanded = 0;
-+
-+      *patternsp = NULL;
-+      *npatternsp = 0;
-+
-+      /* Start the worklist with the original pattern */
-+      if ((cp = strdup(pattern)) == NULL)
-+              return -1;
-+      if (append(cp, &active, &nactive) != 0) {
-+              free(cp);
-+              return -1;
-+      }
-+      while (nactive > 0) {
-+              cp = active[nactive - 1];
-+              nactive--;
-+              if (brace_expand_one(cp, &active, &nactive,
-+                  &expanded, &invalid) == -1) {
-+                      free(cp);
-+                      goto fail;
-+              }
-+              if (invalid)
-+                      fatal("%s: invalid brace pattern \"%s\"", __func__, cp);
-+              if (expanded) {
-+                      /*
-+                       * Current entry expanded to new entries on the
-+                       * active list; discard the progenitor pattern.
-+                       */
-+                      free(cp);
-+                      continue;
-+              }
-+              /*
-+               * Pattern did not expand; append the finename component to
-+               * the completed list
-+               */
-+              if ((cp2 = strrchr(cp, '/')) != NULL)
-+                      *cp2++ = '\0';
-+              else
-+                      cp2 = cp;
-+              if (append(xstrdup(cp2), &done, &ndone) != 0) {
-+                      free(cp);
-+                      goto fail;
-+              }
-+              free(cp);
-+      }
-+      /* success */
-+      *patternsp = done;
-+      *npatternsp = ndone;
-+      done = NULL;
-+      ndone = 0;
-+      ret = 0;
-+ fail:
-+      for (i = 0; i < nactive; i++)
-+              free(active[i]);
-+      free(active);
-+      for (i = 0; i < ndone; i++)
-+              free(done[i]);
-+      free(done);
-+      return ret;
-+}
-+
- void
- toremote(int argc, char **argv)
- {
-@@ -998,7 +1245,8 @@ sink(int argc, char **argv, const char *src)
-       unsigned long long ull;
-       int setimes, targisdir, wrerrno = 0;
-       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
--      char *src_copy = NULL, *restrict_pattern = NULL;
-+      char **patterns = NULL;
-+      size_t n, npatterns = 0;
-       struct timeval tv[2];
- #define       atime   tv[0]
-@@ -1028,16 +1276,13 @@ sink(int argc, char **argv, const char *src)
-                * Prepare to try to restrict incoming filenames to match
-                * the requested destination file glob.
-                */
--              if ((src_copy = strdup(src)) == NULL)
--                      fatal("strdup failed");
--              if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) {
--                      *restrict_pattern++ = '\0';
--              }
-+              if (brace_expand(src, &patterns, &npatterns) != 0)
-+                      fatal("%s: could not expand pattern", __func__);
-       }
-       for (first = 1;; first = 0) {
-               cp = buf;
-               if (atomicio(read, remin, cp, 1) != 1)
--                      return;
-+                      goto done;
-               if (*cp++ == '\n')
-                       SCREWUP("unexpected <newline>");
-               do {
-@@ -1063,7 +1308,7 @@ sink(int argc, char **argv, const char *src)
-               }
-               if (buf[0] == 'E') {
-                       (void) atomicio(vwrite, remout, "", 1);
--                      return;
-+                      goto done;
-               }
-               if (ch == '\n')
-                       *--cp = 0;
-@@ -1138,9 +1383,14 @@ sink(int argc, char **argv, const char *src)
-                       run_err("error: unexpected filename: %s", cp);
-                       exit(1);
-               }
--              if (restrict_pattern != NULL &&
--                  fnmatch(restrict_pattern, cp, 0) != 0)
--                      SCREWUP("filename does not match request");
-+              if (npatterns > 0) {
-+                      for (n = 0; n < npatterns; n++) {
-+                              if (fnmatch(patterns[n], cp, 0) == 0)
-+                                      break;
-+                      }
-+                      if (n >= npatterns)
-+                              SCREWUP("filename does not match request");
-+              }
-               if (targisdir) {
-                       static char *namebuf;
-                       static size_t cursize;
-@@ -1299,7 +1549,15 @@ bad:                    run_err("%s: %s", np, strerror(errno));
-                       break;
-               }
-       }
-+done:
-+      for (n = 0; n < npatterns; n++)
-+              free(patterns[n]);
-+      free(patterns);
-+      return;
- screwup:
-+      for (n = 0; n < npatterns; n++)
-+              free(patterns[n]);
-+      free(patterns);
-       run_err("protocol error: %s", why);
-       exit(1);
- }
diff --git a/net/openssh/patches/1001-fix-compilation-with-openssl-built-without-ECC.patch b/net/openssh/patches/1001-fix-compilation-with-openssl-built-without-ECC.patch
deleted file mode 100644 (file)
index e430dfe..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 91b777c7064d9d91a1433a42b0bb31592388d1b4 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Tue, 9 Oct 2018 16:17:42 -0300
-Subject: [PATCH] fix compilation with openssl built without ECC
-
-ECDSA code in openssh-compat.h and libressl-api-compat.c needs to be
-guarded by OPENSSL_HAS_ECC
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
-index de3e64a6..ae00ff59 100644
---- a/openbsd-compat/libressl-api-compat.c
-+++ b/openbsd-compat/libressl-api-compat.c
-@@ -152,7 +152,9 @@
- #include <openssl/dsa.h>
- #include <openssl/rsa.h>
- #include <openssl/evp.h>
-+#ifdef OPENSSL_HAS_ECC
- #include <openssl/ecdsa.h>
-+#endif
- #include <openssl/dh.h>
- #ifndef HAVE_DSA_GET0_PQG
-@@ -417,6 +419,7 @@ DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
- }
- #endif /* HAVE_DSA_SIG_SET0 */
-+#ifdef OPENSSL_HAS_ECC
- #ifndef HAVE_ECDSA_SIG_GET0
- void
- ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
-@@ -442,6 +445,7 @@ ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
-       return 1;
- }
- #endif /* HAVE_ECDSA_SIG_SET0 */
-+#endif /* OPENSSL_HAS_ECC */
- #ifndef HAVE_DH_GET0_PQG
- void
-diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
-index 9e0264c0..6a525f28 100644
---- a/openbsd-compat/openssl-compat.h
-+++ b/openbsd-compat/openssl-compat.h
-@@ -24,7 +24,9 @@
- #include <openssl/evp.h>
- #include <openssl/rsa.h>
- #include <openssl/dsa.h>
-+#ifdef OPENSSL_HAS_ECC
- #include <openssl/ecdsa.h>
-+#endif
- #include <openssl/dh.h>
- int ssh_compatible_openssl(long, long);
-@@ -161,6 +163,7 @@ void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
- #endif /* DSA_SIG_SET0 */
-+#ifdef OPENSSL_HAS_ECC
- #ifndef HAVE_ECDSA_SIG_GET0
- void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- #endif /* HAVE_ECDSA_SIG_GET0 */
-@@ -168,6 +171,7 @@ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- #ifndef HAVE_ECDSA_SIG_SET0
- int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
- #endif /* HAVE_ECDSA_SIG_SET0 */
-+#endif /* OPENSSL_HAS_ECC */
- #ifndef HAVE_DH_GET0_PQG
- void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
diff --git a/net/openssh/patches/1002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch b/net/openssh/patches/1002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch
deleted file mode 100644 (file)
index 7c1e15d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-From edfc2e18ef069ba600c8f4632ce1e3dc94a0669a Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Fri, 19 Oct 2018 10:04:24 -0300
-Subject: [PATCH 2/2] Fix OPENSSL_init_crypto call for openssl < 1.1
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
-index 8b4a3627..590b66d1 100644
---- a/openbsd-compat/openssl-compat.c
-+++ b/openbsd-compat/openssl-compat.c
-@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
-       ENGINE_load_builtin_engines();
-       ENGINE_register_all_complete();
--#if OPENSSL_VERSION_NUMBER < 0x10001000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       OPENSSL_config(NULL);
- #else
-       OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
index 806748aec8a39f08c1baf3fa97b5e7c4c6cef635..12b4e86374d7e34f20db839ffed9eb0f8ebc5f46 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p910nd
 PKG_VERSION:=0.97
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/p910nd
index d5090359b6b82c82bba474252fab6e703aec26cd..b8257b77c9b8d77066c745c9a8e97bd345dfa839 100644 (file)
@@ -1,5 +1,24 @@
 config p910nd
        option device        /dev/usb/lp0
+       # Actual TCP port is 9100 plus this value
+       # Valid values are 0,1,2
        option port          0
        option bidirectional 1
        option enabled       0
+
+       # mDNS support - see Bonjour Printing Specification for details concerning the values
+       # Be aware that you can only advertise one printer on this host via mDNS
+       # Set to 1 to enable
+       option mdns          0
+       # Human-readable printer make and model
+       option mdns_ty       'My Printer Manufacturer/Model'
+       # Human-readable location
+       option mdns_note     'Basement'
+       # Post-Script product string, including parenthesis
+       option mdns_product  ''
+       # IEEE-1284 Device ID MANUFACTURER/MFG string
+       option mdns_mfg      ''
+       # IEEE-1284 Device ID MODEL/MDL string
+       option mdns_mdl      ''
+       # IEEE-1284 Device ID COMMAND SET/CMD string
+       option mdns_cmd      ''
index 57e4c5209480781ac5b607d5b76c93b18bbd7d4c..479b8410feda4e95d9a9269a32bb60353f53f835 100644 (file)
@@ -41,6 +41,16 @@ start_p910nd() {
                procd_open_instance $name
                procd_set_param command /usr/sbin/p910nd $args
                procd_set_param respawn
+
+               config_get_bool "mdns" "$section" "mdns" '0'
+               config_get mdns_note "$section" mdns_note
+               config_get mdns_ty "$section" mdns_ty
+               config_get mdns_product "$section" mdns_product
+               config_get mdns_mfg "$section" mdns_mfg
+               config_get mdns_mdl "$section" mdns_mdl
+               config_get mdns_cmd "$section" mdns_cmd
+               [ "$mdns" -gt 0 ] && procd_add_mdns "pdl-datastream" "tcp" "$((port+9100))" "note=$mdns_note" "ty=$mdns_ty" "product=$mdns_product" "usb_MFG=$mdns_mfg" "usb_MDL=$mdns_mdl" "usb_CMD=$mdns_cmd"
+
                procd_close_instance
        fi
 }
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
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..b0f24f1415470b08b5f4c1ee0b8b53b9b653a4c1 100644 (file)
@@ -2,19 +2,25 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
-PKG_VERSION:=4.9.4
-PKG_RELEASE:=3
+PKG_VERSION:=4.9.6
+PKG_RELEASE:=2
 
 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://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
+               https://ftp.gwdg.de/pub/samba/stable/ \
+               https://ftp.riken.jp/net/samba/samba/stable/ \
+               http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
+               http://samba.mirror.bit.nl/samba/ftp/stable/ \
+               https://download.samba.org/pub/samba/stable/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6d98a8d8bcccbe788e4bbb406362e6676311aca711a3f3cc9b3a404bb9ff0b4f
+PKG_HASH:=c9205a651a83d69e200fec9dd65e9fa360f0c75ab3275b3dcb74e5cbaec60807
 
-# 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)
+HOST_BUILD_DEPENDS:=nfs-kernel-server/host e2fsprogs/host
+PKG_BUILD_DEPENDS:=samba4/host
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_SAMBA4_SERVER_NETBIOS \
@@ -29,6 +35,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 +57,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 +70,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 +129,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 +182,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 +225,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 +241,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 +261,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 +321,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 +329,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 +376,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 +397,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 +422,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 +432,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 +468,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 bc07b3b8becd24f4abad025eaa2587ef0ea901ca..965633088f69eb23ed23cf2883a9ef2cf768f5bc 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall-core
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.2
+PKG_BUGFIX_MINOR_VERSION:=.3
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
 PKG_RELEASE:=1
@@ -22,7 +22,7 @@ PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION
        http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=fa71e435ba3ffa3b424c3fe4dfb405c536e4c8d837e8f0936486f7673478ce5b
+PKG_HASH:=e516c56b416181c325dfee68d0bbf38685f89ec0b6bc9c25c6c98ffabbf3e2bd
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index 649eacddaf428fc661e934e54aaf1ee2fc7c1a8c..cb68afc79965519cb046c410a5153b4db405619c 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.2
+PKG_BUGFIX_MINOR_VERSION:=.3
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -22,7 +22,7 @@ PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION
        http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=0469486e8087502b59f8a4531bb476d3a929e4e59b4a0492f54e85ae2a8bebff
+PKG_HASH:=3ac7affab434a7bc39d229aeadbefc845d5568d7402ad3546e0c1e429acc2de9
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index d404e1d3f40e9dc82e2e8f978be58d7143826096..98311d890c8ac63ef466871c062043ae693d3649 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.2
+PKG_BUGFIX_MINOR_VERSION:=.3
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -22,7 +22,7 @@ PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION
        http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=58615c40598d3f2f71e6aab286ebd281c9018dea584ee658e5609ea0e434b242
+PKG_HASH:=6bb832d557f9646b62af1b60db6d8b693756403ea5d23c10db96013dd40547cd
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index 425bdcdc7f547ff396693dcfd2e2808203358db5..5c11de83ddb5dcbc5db21597f0c0363137958399 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall6-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.2
+PKG_BUGFIX_MINOR_VERSION:=.3
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -22,7 +22,7 @@ PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION
        http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=82cbb075d7575400d859b59142f1e36ac8c575d35f19bf3a263278c67be5a3ea
+PKG_HASH:=34c7ddb7f9901f7a74374f17cd1740a4059195a560401a461363e24c7e55b99f
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index 7aa3d26c978fe07c57418406ecfe1a0c0a668bc9..0231a97be7292468a00bf04fc99e3ea740339a30 100644 (file)
@@ -11,10 +11,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=shorewall6
 PKG_MAJOR_MINOR_VERSION:=5.2
 PKG_BUGFIX_MAJOR_VERSION:=3
-PKG_BUGFIX_MINOR_VERSION:=.2
+PKG_BUGFIX_MINOR_VERSION:=.3
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -22,7 +22,7 @@ PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION
        http://shorewall.de/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www.shorewall.com.au/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=43d48d47929fdef29023ff2659550f0b2289064d54b7abe64f79efeb1613146a
+PKG_HASH:=f620107bd19f8df573ca249720506bcc5fa99db72f191ba04060f2a74c251a56
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
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..73c6ce825fa2458c4aaa1fcc3167e6ceee3a7cb0 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:=3
 
 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
diff --git a/net/snort3/patches/002-ignore-liblzma.patch b/net/snort3/patches/002-ignore-liblzma.patch
new file mode 100644 (file)
index 0000000..fbd0599
--- /dev/null
@@ -0,0 +1,11 @@
+diff -u --recursive snort-3.0.0-vanilla/cmake/include_libraries.cmake snort-3.0.0/cmake/include_libraries.cmake
+--- snort-3.0.0-vanilla/cmake/include_libraries.cmake  2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/cmake/include_libraries.cmake  2019-04-18 21:25:25.627070082 -0400
+@@ -14,7 +14,6 @@
+ endif (ENABLE_UNIT_TESTS)
+ # optional libraries
+-find_package(LibLZMA QUIET)
+ find_package(Asciidoc QUIET)
+ find_package(DBLATEX QUIET)
+ find_package(Ruby QUIET 1.8.7)
index 8eaba1dcdd2adf3da88d7336c977d01f38583e33..929e14d298f881fdeca4d4f6db7f76b8389266dd 100644 (file)
@@ -3,6 +3,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softethervpn5
+PKG_VERSION:=5.01.9670
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
@@ -11,9 +12,8 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN.git
-PKG_SOURCE_DATE:=2019-02-27
-PKG_SOURCE_VERSION:=beef8d68924916d0834c87ceb9ae8eef2c9b1d6c
-PKG_MIRROR_HASH:=8cd27ee1d768c00f816501be925bb971fd62b9cef145e4ac5c731456a86d782c
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+PKG_MIRROR_HASH:=a7de5cf5e109450297af1bf79bc5f9ae15229d24da86b134b6251f8354b3dfb8
 
 HOST_BUILD_DEPENDS:=ncurses/host readline/host
 PKG_BUILD_DEPENDS:=softethervpn5/host
@@ -23,7 +23,6 @@ include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-
 define Package/softethervpn5/Default
   SECTION:=net
   CATEGORY:=Network
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 87a6ed406ff1a32f6fe1fb8cbe58b1b3c7993ebf..3ce72d831436f0e7509d71207445cb8e01cd1e0d 100644 (file)
@@ -86,6 +86,7 @@ define Package/transmission-web
   $(call Package/transmission/template)
   TITLE+= (webinterface)
   DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
+  PKGARCH:=all
 endef
 
 
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 6576b2c85e25521695538cb782bf098286ef74c5..24cf1f242b7bfa3698fe7fc67070ad447691019e 100644 (file)
@@ -168,7 +168,7 @@ config zone
 ## HOW TO: TLS Over DNS
 Unbound can use TLS as a client or server. UCI supports Unbound as a forwarding client with TLS. Servers are more complex and need manual configuration. This may be desired for privacy against stealth tracking. Some public DNS servers seem to advertise help in this quest. If your looking for a better understanding, then some information can be found at [Cloudflare](https://www.cloudflare.com/) DNS [1.1.1.1](https://1.1.1.1/). The following is a generic example. You can mix providers by using complete server specificaiton to override the zones common port and certificate domain index.
 
-**NOTICE:** Unbound requires openssl-1.1.0 to verify host certificates. OpenWrt at present is configured with openssl-1.0.2. Connections will be over TLS, but theoretically, certificates may not be from a trusted source. See report [Unbound #658](https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=658). When this is resolved, it will be recommended again to install `ca-bundle`, maintain it, and be sure to include the TLS certificate domain index with the host addresses.
+Update as of Unbound 1.9.1, all TLS functions work correctly with either OpenSSL 1.0.2 or 1.1.0. Please be sure to install `ca-bundle` package and use `opkg` to get updates regularly.
 
 **/etc/config/unbound**:
 ```
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();
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))
diff --git a/utils/micrond/Makefile b/utils/micrond/Makefile
new file mode 100644 (file)
index 0000000..ba063b6
--- /dev/null
@@ -0,0 +1,23 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=micrond
+PKG_VERSION:=1
+PKG_RELEASE:=1
+PKG_LICENSE:=BSD-2-clause
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/micrond
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Small Cron daemon providing a cron.d directory other packages can install their crontabs into
+  DEPENDS:=
+endef
+
+define Package/micrond/install
+       $(CP) ./files/* $(1)/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/micrond $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,micrond))
diff --git a/utils/micrond/files/etc/init.d/micrond b/utils/micrond/files/etc/init.d/micrond
new file mode 100755 (executable)
index 0000000..1eef2ef
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=50
+USE_PROCD=1
+
+CRONDIR=/usr/lib/micron.d
+
+start_service() {
+       procd_open_instance
+       procd_set_param command /usr/sbin/micrond "$CRONDIR"
+       procd_set_param respawn
+       procd_close_instance
+}
diff --git a/utils/micrond/files/usr/lib/micron.d/.keep b/utils/micrond/files/usr/lib/micron.d/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/utils/micrond/src/Makefile b/utils/micrond/src/Makefile
new file mode 100644 (file)
index 0000000..40059ef
--- /dev/null
@@ -0,0 +1,3 @@
+all: micrond
+
+micrond: micrond.c
diff --git a/utils/micrond/src/micrond.c b/utils/micrond/src/micrond.c
new file mode 100644 (file)
index 0000000..cb16c12
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+  Copyright (c) 2013, Matthias Schiffer <mschiffer@universe-factory.net>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation
+       and/or other materials provided with the distribution.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <dirent.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <syslog.h>
+#include <time.h>
+#include <unistd.h>
+
+
+typedef struct job {
+       struct job *next;
+
+       uint64_t minutes;
+       uint32_t hours;
+       uint32_t doms;
+       uint16_t months;
+       uint8_t dows;
+
+       char *command;
+} job_t;
+
+
+static const char const *const MONTHS[12] = {
+       "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"
+};
+
+static const char const *const WEEKDAYS[7] = {
+       "sun", "mon", "tue", "wed", "thu", "fri", "sat"
+};
+
+
+static const char *crondir;
+
+static job_t *jobs = NULL;
+
+
+static void usage(void) {
+       fprintf(stderr, "Usage: micrond <crondir>\n");
+}
+
+
+static inline uint64_t bit(unsigned b) {
+       return ((uint64_t)1) << b;
+}
+
+static int strict_atoi(const char *s) {
+       char *end;
+       int ret = strtol(s, &end, 10);
+
+       if (*end)
+               return -1;
+       else
+               return ret;
+}
+
+static uint64_t parse_strings(const char *input, const char *const *strings, size_t n) {
+       size_t i;
+       for (i = 0; i < n; i++) {
+               if (strcasecmp(input, strings[i]) == 0)
+                       return bit(i);
+       }
+
+       return 0;
+}
+
+static uint64_t parse_times(char *input, int min, int n) {
+       uint64_t ret = 0;
+       int step = 1;
+
+       char *comma = strchr(input, ',');
+       if (comma) {
+               *comma = 0;
+               ret = parse_times(comma+1, min, n);
+
+               if (!ret)
+                       return 0;
+       }
+
+       char *slash = strchr(input, '/');
+       if (slash) {
+               *slash = 0;
+               step = strict_atoi(slash+1);
+
+               if (step <= 0)
+                       return 0;
+       }
+
+       int begin, end;
+       char *minus = strchr(input, '-');
+       if (minus) {
+               *minus = 0;
+               begin = strict_atoi(input);
+               end = strict_atoi(minus+1);
+       }
+       else if (strcmp(input, "*") == 0) {
+               begin = min;
+               end = min+n-1;
+       }
+       else {
+               begin = end = strict_atoi(input);
+       }
+
+       if (begin < min || end < min)
+               return 0;
+
+       int i;
+       for (i = begin-min; i <= end-min; i += step)
+               ret |= bit(i % n);
+
+       return ret;
+}
+
+static int handle_line(const char *line) {
+       job_t job = {};
+       int ret = -1;
+       char *columns[5];
+       int i;
+       int len;
+
+       int matches = sscanf(line, "%ms %ms %ms %ms %ms %n", &columns[0], &columns[1], &columns[2], &columns[3], &columns[4], &len);
+       if (matches != 5 && matches != 6) {
+               if (matches <= 0)
+                       ret = 0;
+
+               goto end;
+       }
+
+       job.minutes = parse_times(columns[0], 0, 60);
+       if (!job.minutes)
+               goto end;
+
+       job.hours = parse_times(columns[1], 0, 24);
+       if (!job.hours)
+               goto end;
+
+       job.doms = parse_times(columns[2], 1, 31);
+       if (!job.doms)
+               goto end;
+
+
+       job.months = parse_strings(columns[3], MONTHS, 12);
+
+       if (!job.months)
+               job.months = parse_times(columns[3], 1, 12);
+       if (!job.months)
+               goto end;
+
+       job.dows = parse_strings(columns[4], WEEKDAYS, 7);
+       if (!job.dows)
+               job.dows = parse_times(columns[4], 0, 7);
+       if (!job.dows)
+               goto end;
+
+       job.command = strdup(line+len);
+
+       job_t *jobp = malloc(sizeof(job_t));
+       *jobp = job;
+
+       jobp->next = jobs;
+       jobs = jobp;
+
+       ret = 0;
+
+  end:
+       for (i = 0; i < matches && i < 5; i++)
+               free(columns[i]);
+
+       return ret;
+}
+
+
+static void read_crontab(const char *name) {
+       FILE *file = fopen(name, "r");
+       if (!file) {
+               syslog(LOG_WARNING, "unable to read crontab `%s'", name);
+               return;
+       }
+
+       char line[16384];
+       unsigned lineno = 0;
+
+       while (fgets(line, sizeof(line), file)) {
+               lineno++;
+
+               char *comment = strchr(line, '#');
+               if (comment)
+                       *comment = 0;
+
+               if (handle_line(line))
+                       syslog(LOG_WARNING, "syntax error in `%s', line %u", name, lineno);
+       }
+
+       fclose(file);
+}
+
+
+static void read_crondir(void) {
+       DIR *dir;
+
+       if (chdir(crondir) || ((dir = opendir(".")) == NULL)) {
+               fprintf(stderr, "Unable to read crondir `%s'\n", crondir);
+               usage();
+               exit(1);
+       }
+
+       struct dirent *ent;
+       while ((ent = readdir(dir)) != NULL) {
+               if (ent->d_name[0] == '.')
+                       continue;
+
+               read_crontab(ent->d_name);
+       }
+
+       closedir(dir);
+}
+
+
+static void run_job(const job_t *job) {
+       pid_t pid = fork();
+       if (pid == 0) {
+               execl("/bin/sh", "/bin/sh", "-c", job->command, (char*)NULL);
+               syslog(LOG_ERR, "unable to run job: exec failed");
+               _exit(1);
+       }
+       else if (pid < 0) {
+               syslog(LOG_ERR, "unable to run job: fork failed");
+       }
+}
+
+
+static void check_job(const job_t *job, const struct tm *tm) {
+       if (!(job->minutes & bit(tm->tm_min)))
+               return;
+
+       if (!(job->hours & bit(tm->tm_hour)))
+               return;
+
+       if (!(job->doms & bit(tm->tm_mday-1)))
+               return;
+
+       if (!(job->months & bit(tm->tm_mon)))
+               return;
+
+       if (!(job->dows & bit(tm->tm_wday)))
+               return;
+
+       run_job(job);
+}
+
+
+int main(int argc, char *argv[]) {
+       if (argc != 2) {
+               usage();
+
+               exit(argc < 2 ? 0 : 1);
+       }
+
+       crondir = argv[1];
+
+       signal(SIGCHLD, SIG_IGN);
+
+       read_crondir();
+
+       time_t t = time(NULL);
+       struct tm *tm = localtime(&t);
+       int minute = tm->tm_min;
+
+       while (1) {
+               sleep(60 - t%60);
+
+               t = time(NULL);
+               tm = localtime(&t);
+
+               minute = (minute+1)%60;
+               if (tm->tm_min != minute) {
+                       /* clock has moved, don't execute jobs */
+                       minute = tm->tm_min;
+                       continue;
+               }
+
+               job_t *job;
+               for (job = jobs; job; job = job->next)
+                       check_job(job, tm);
+       }
+}
index 5ceec2a8e3cf5e3082d0fd0f73fb3620ac31fb27..9783f54a5ccb11bb718ab5b16bc0a2c9549a82f0 100644 (file)
@@ -13,16 +13,14 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git
 PKG_SOURCE_DATE:=2018-12-09
-PKG_SOURCE_VERSION:=485b05ec40031a06077db9c84ae75a36ebd3db25
-PKG_MIRROR_HASH:=043d706a5bb7c206ccfdc1a5e604bf03bd744f8dcfaeccba1a7ef845a18fbd26
+PKG_SOURCE_VERSION:=aef913e31b659462fe6b9320d241676cba97f67b
+PKG_MIRROR_HASH:=8c3d872be1392b7a140a36ce75ed48ef300ee6b6f1ce1b37dad1ad263d338dc3
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
-PKG_BUILD_PARALLEL:=1
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/mmc-utils
diff --git a/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch
new file mode 100644 (file)
index 0000000..1a20813
--- /dev/null
@@ -0,0 +1,9 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ CC ?= gcc
+-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
++AM_CFLAGS = -D_FILE_OFFSET_BITS=64
+ CFLAGS ?= -g -O2
+ objects = \
+       mmc.o \
diff --git a/utils/mmc-utils/patches/0001-Check-calloc-s-return-value-before-using-the-pointer.patch b/utils/mmc-utils/patches/0001-Check-calloc-s-return-value-before-using-the-pointer.patch
new file mode 100644 (file)
index 0000000..004cfb7
--- /dev/null
@@ -0,0 +1,30 @@
+From bf96e1b2f48eab26c4a0c2a0903d9d7b9a311a1d Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 14:47:16 +0100
+Subject: [PATCH 1/9] Check calloc's return value before using the pointer
+
+If calloc fails, bail out immediately instead of trying to
+use the NULL pointer.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 9737b37..e514c83 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -374,6 +374,8 @@ char *to_binstr(char *hexstr)
+       char *binstr;
+       binstr = calloc(strlen(hexstr) * 4 + 1, sizeof(char));
++      if (!binstr)
++              return NULL;
+       while (hexstr && *hexstr != '\0') {
+               if (!isxdigit(*hexstr))
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0002-Cleanup-memory-in-error-case.patch b/utils/mmc-utils/patches/0002-Cleanup-memory-in-error-case.patch
new file mode 100644 (file)
index 0000000..689d693
--- /dev/null
@@ -0,0 +1,33 @@
+From 9214f2a4002bafef73c9593464ab3841ba7bac12 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 14:49:37 +0100
+Subject: [PATCH 2/9] Cleanup memory in error case
+
+In case that we leave due to malformed string,
+free the allocated memory before returning.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index e514c83..a53bc57 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -378,8 +378,10 @@ char *to_binstr(char *hexstr)
+               return NULL;
+       while (hexstr && *hexstr != '\0') {
+-              if (!isxdigit(*hexstr))
++              if (!isxdigit(*hexstr)) {
++                      free(binstr);
+                       return NULL;
++              }
+               if (isdigit(*hexstr))
+                       strcat(binstr, bindigits[*hexstr - '0']);
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0003-Fix-parsing-of-character-in-to_binstr.patch b/utils/mmc-utils/patches/0003-Fix-parsing-of-character-in-to_binstr.patch
new file mode 100644 (file)
index 0000000..3a5780d
--- /dev/null
@@ -0,0 +1,33 @@
+From a59d98003c0b2364929ee23ed331d610029c6dcf Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 14:52:12 +0100
+Subject: [PATCH 3/9] Fix parsing of character in to_binstr()
+
+When a hex-digit > 'a' or 'A' is read, we have to add an offset of 10
+to access the valid symbol in our mapping table.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index a53bc57..e64117c 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -386,9 +386,9 @@ char *to_binstr(char *hexstr)
+               if (isdigit(*hexstr))
+                       strcat(binstr, bindigits[*hexstr - '0']);
+               else if (islower(*hexstr))
+-                      strcat(binstr, bindigits[*hexstr - 'a']);
++                      strcat(binstr, bindigits[*hexstr - 'a' + 10]);
+               else
+-                      strcat(binstr, bindigits[*hexstr - 'A']);
++                      strcat(binstr, bindigits[*hexstr - 'A' + 10]);
+               hexstr++;
+       }
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0004-Optimize-to_binstr-function.patch b/utils/mmc-utils/patches/0004-Optimize-to_binstr-function.patch
new file mode 100644 (file)
index 0000000..6ac8606
--- /dev/null
@@ -0,0 +1,56 @@
+From f1fc04d7609ab074647aa00e96d4c66d5135b155 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 15:02:25 +0100
+Subject: [PATCH 4/9] Optimize to_binstr() function
+
+Appending multiple times to same string is slow since strcat() needs
+to determine the end during each run. So manually maintain a pointer
+to the end to speed-up things.
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index e64117c..86713f7 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -371,12 +371,14 @@ char *to_binstr(char *hexstr)
+               "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
+               "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111",
+       };
+-      char *binstr;
++      char *binstr, *tail;
+       binstr = calloc(strlen(hexstr) * 4 + 1, sizeof(char));
+       if (!binstr)
+               return NULL;
++      tail = binstr;
++
+       while (hexstr && *hexstr != '\0') {
+               if (!isxdigit(*hexstr)) {
+                       free(binstr);
+@@ -384,13 +386,14 @@ char *to_binstr(char *hexstr)
+               }
+               if (isdigit(*hexstr))
+-                      strcat(binstr, bindigits[*hexstr - '0']);
++                      strcat(tail, bindigits[*hexstr - '0']);
+               else if (islower(*hexstr))
+-                      strcat(binstr, bindigits[*hexstr - 'a' + 10]);
++                      strcat(tail, bindigits[*hexstr - 'a' + 10]);
+               else
+-                      strcat(binstr, bindigits[*hexstr - 'A' + 10]);
++                      strcat(tail, bindigits[*hexstr - 'A' + 10]);
+               hexstr++;
++              tail += 4;
+       }
+       return binstr;
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0005-Add-eMMC-vendor-Micron-to-table.patch b/utils/mmc-utils/patches/0005-Add-eMMC-vendor-Micron-to-table.patch
new file mode 100644 (file)
index 0000000..7c2630f
--- /dev/null
@@ -0,0 +1,30 @@
+From c0375ecea6f3731c0f65ff6abd2c194b90153b26 Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <michael.heimpold@i2se.com>
+Date: Tue, 18 Dec 2018 15:09:42 +0100
+Subject: [PATCH 5/9] Add eMMC vendor Micron to table
+
+Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
+Cc: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 86713f7..4f687ac 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -194,6 +194,11 @@ struct ids_database database[] = {
+               .id = 0x11,
+               .manufacturer = "Toshiba",
+       },
++      {
++              .type = "mmc",
++              .id = 0x13,
++              .manufacturer = "Micron",
++      },
+       {
+               .type = "mmc",
+               .id = 0x15,
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0006-Fix-parsing-of-Product-Revision-and-Serial-Number.patch b/utils/mmc-utils/patches/0006-Fix-parsing-of-Product-Revision-and-Serial-Number.patch
new file mode 100644 (file)
index 0000000..882b8a7
--- /dev/null
@@ -0,0 +1,29 @@
+From 6bcf573f9056c6a4fb2ace5aece08a53dc5dceca Mon Sep 17 00:00:00 2001
+From: Stephane Fillod <f8cfe@free.fr>
+Date: Mon, 14 Jan 2019 17:50:50 +0100
+Subject: [PATCH 6/9] Fix parsing of Product Revision and Serial Number
+
+According to MMC Standard (similar to SDCard Standard).
+
+Signed-off-by: Stephane Fillod <f8cfe@free.fr>
+Acked-by: Avri Altman <avri.altman@wdc.com>
+---
+ lsmmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 4f687ac..b627b79 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -562,7 +562,7 @@ void print_mmc_cid(struct config *config, char *cid)
+       unsigned int crc;
+       parse_bin(cid, "8u6r2u8u48a4u4u32u4u4u7u1r",
+-              &mid, &cbx, &oid, &pnm[0], &psn, &prv_major, &prv_minor,
++              &mid, &cbx, &oid, &pnm[0], &prv_major, &prv_minor, &psn,
+               &mdt_year, &mdt_month, &crc);
+       pnm[6] = '\0';
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0007-Add-various-SD-eMMC-vendors-to-table.patch b/utils/mmc-utils/patches/0007-Add-various-SD-eMMC-vendors-to-table.patch
new file mode 100644 (file)
index 0000000..ff331b7
--- /dev/null
@@ -0,0 +1,97 @@
+From c9c90f4f74ee5318ee9a2f581b665d474f6f90c5 Mon Sep 17 00:00:00 2001
+From: Stephane Fillod <f8cfe@free.fr>
+Date: Tue, 15 Jan 2019 14:56:15 +0100
+Subject: [PATCH 7/9] Add various SD/eMMC vendors to table
+
+Part if this list update comes from a compilation of this web site[1].
+
+[1] https://www.cameramemoryspeed.com/sd-memory-card-faq/reading-sd-card-cid-serial-psn-internal-numbers/
+
+Signed-off-by: Stephane Fillod <f8cfe@free.fr>
+---
+ lsmmc.c | 34 ++++++++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index b627b79..63504d2 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -112,7 +112,7 @@ struct ids_database database[] = {
+       {
+               .type = "sd",
+               .id = 0x1b,
+-              .manufacturer = "Transcend",
++              .manufacturer = "Transcend/Samsung",
+       },
+       {
+               .type = "sd",
+@@ -122,7 +122,7 @@ struct ids_database database[] = {
+       {
+               .type = "sd",
+               .id = 0x1d,
+-              .manufacturer = "Corsair",
++              .manufacturer = "Corsair/AData",
+       },
+       {
+               .type = "sd",
+@@ -134,6 +134,11 @@ struct ids_database database[] = {
+               .id = 0x1f,
+               .manufacturer = "Kingston",
+       },
++      {
++              .type = "sd",
++              .id = 0x27,
++              .manufacturer = "Delkin/Phison",
++      },
+       {
+               .type = "sd",
+               .id = 0x28,
+@@ -144,6 +149,11 @@ struct ids_database database[] = {
+               .id = 0x30,
+               .manufacturer = "SanDisk",
+       },
++      {
++              .type = "sd",
++              .id = 0x31,
++              .manufacturer = "Silicon Power",
++      },
+       {
+               .type = "sd",
+               .id = 0x33,
+@@ -159,6 +169,21 @@ struct ids_database database[] = {
+               .id = 0x6f,
+               .manufacturer = "STMicroelectronics",
+       },
++      {
++              .type = "sd",
++              .id = 0x74,
++              .manufacturer = "Transcend",
++      },
++      {
++              .type = "sd",
++              .id = 0x76,
++              .manufacturer = "Patriot",
++      },
++      {
++              .type = "sd",
++              .id = 0x82,
++              .manufacturer = "Gobe/Sony",
++      },
+       {
+               .type = "sd",
+               .id = 0x89,
+@@ -224,6 +249,11 @@ struct ids_database database[] = {
+               .id = 0x70,
+               .manufacturer = "Kingston",
+       },
++      {
++              .type = "mmc",
++              .id = 0xfe,
++              .manufacturer = "Micron",
++      },
+ };
+ /* Command line parsing functions */
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0008-Various-fixes.patch b/utils/mmc-utils/patches/0008-Various-fixes.patch
new file mode 100644 (file)
index 0000000..42d69be
--- /dev/null
@@ -0,0 +1,276 @@
+From 6ace4329870d9d7b2a2c3603af316b3f1a75e9f2 Mon Sep 17 00:00:00 2001
+From: Stephane Fillod <f8cfe@free.fr>
+Date: Tue, 15 Jan 2019 15:06:03 +0100
+Subject: [PATCH 8/9] Various fixes
+
+These warnings were mainly found using cppcheck.
+
+Signed-off-by: Stephane Fillod <f8cfe@free.fr>
+Reviewed-by: Michael Heimpold <mhei@heimpold.de>
+---
+ lsmmc.c    | 42 +++++++++++++++++++++---------------------
+ mmc_cmds.c | 14 ++++++++++++--
+ 2 files changed, 33 insertions(+), 23 deletions(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index 63504d2..06cc0b8 100644
+--- a/lsmmc.c
++++ b/lsmmc.c
+@@ -554,9 +554,9 @@ void print_sd_cid(struct config *config, char *cid)
+               printf("\tOID: %s\n", oid);
+               printf("\tPNM: %s\n", pnm);
+               printf("\tPRV: 0x%01x%01x ", prv_major, prv_minor);
+-              printf("(%d.%d)\n", prv_major, prv_minor);
++              printf("(%u.%u)\n", prv_major, prv_minor);
+               printf("\tPSN: 0x%08x\n", psn);
+-              printf("\tMDT: 0x%02x%01x %d %s\n", mdt_year, mdt_month,
++              printf("\tMDT: 0x%02x%01x %u %s\n", mdt_year, mdt_month,
+                      2000 + mdt_year, months[mdt_month]);
+               printf("\tCRC: 0x%02x\n", crc);
+       } else {
+@@ -566,9 +566,9 @@ void print_sd_cid(struct config *config, char *cid)
+               else
+                       printf("manufacturer: 'Unlisted' '%s'\n", oid);
+-              printf("product: '%s' %d.%d\n", pnm, prv_major, prv_minor);
++              printf("product: '%s' %u.%u\n", pnm, prv_major, prv_minor);
+               printf("serial: 0x%08x\n", psn);
+-              printf("manfacturing date: %d %s\n", 2000 + mdt_year,
++              printf("manufacturing date: %u %s\n", 2000 + mdt_year,
+                      months[mdt_month]);
+       }
+ }
+@@ -625,9 +625,9 @@ void print_mmc_cid(struct config *config, char *cid)
+               printf("\tOID: 0x%01x\n", oid);
+               printf("\tPNM: %s\n", pnm);
+               printf("\tPRV: 0x%01x%01x ", prv_major, prv_minor);
+-              printf("(%d.%d)\n", prv_major, prv_minor);
++              printf("(%u.%u)\n", prv_major, prv_minor);
+               printf("\tPSN: 0x%08x\n", psn);
+-              printf("\tMDT: 0x%01x%01x %d %s\n", mdt_month, mdt_year,
++              printf("\tMDT: 0x%01x%01x %u %s\n", mdt_month, mdt_year,
+                      1997 + mdt_year, months[mdt_month]);
+               printf("\tCRC: 0x%02x\n", crc);
+       } else {
+@@ -637,9 +637,9 @@ void print_mmc_cid(struct config *config, char *cid)
+               else
+                       printf("manufacturer: 'Unlisted' '%c'\n", oid);
+-              printf("product: '%s' %d.%d\n", pnm, prv_major, prv_minor);
++              printf("product: '%s' %u.%u\n", pnm, prv_major, prv_minor);
+               printf("serial: 0x%08x\n", psn);
+-              printf("manfacturing date: %d %s\n", 1997 + mdt_year,
++              printf("manufacturing date: %u %s\n", 1997 + mdt_year,
+                      months[mdt_month]);
+       }
+ }
+@@ -729,7 +729,7 @@ void print_sd_csd(struct config *config, char *csd)
+               printf("======SD/CSD======\n");
+-              printf("\tCSD_STRUCTURE: %d\n", csd_structure);
++              printf("\tCSD_STRUCTURE: %u\n", csd_structure);
+               printf("\tTAAC: 0x%02x (", taac);
+               switch (taac_timevalue) {
+@@ -816,7 +816,7 @@ void print_sd_csd(struct config *config, char *csd)
+               if (csd_structure == 1 && taac != 0x0e)
+                       printf("Warn: Invalid TAAC (should be 0x0e)\n");
+-              printf("\tNSAC: %d clocks\n", nsac);
++              printf("\tNSAC: %u clocks\n", nsac);
+               if (csd_structure == 1 && nsac != 0x00)
+                       printf("Warn: Invalid NSAC (should be 0x00)\n");
+@@ -1103,12 +1103,12 @@ void print_sd_csd(struct config *config, char *csd)
+                       if (erase_blk_en != 0x01)
+                               printf("Warn: Invalid ERASE_BLK_EN (should be 0x01)\n");
+-                      printf("\tSECTOR_SIZE: 0x%02x (Erasable sector: %d blocks)\n",
++                      printf("\tSECTOR_SIZE: 0x%02x (Erasable sector: %u blocks)\n",
+                              sector_size, sector_size + 1);
+                       if (sector_size != 0x7f)
+                               printf("Warn: Invalid SECTOR_SIZE (should be 0x7f)\n");
+-                      printf("\tWP_GRP_SIZE: 0x%02x (Write protect group: %d blocks)\n",
++                      printf("\tWP_GRP_SIZE: 0x%02x (Write protect group: %u blocks)\n",
+                              wp_grp_size, wp_grp_size + 1);
+                       if (wp_grp_size != 0x00)
+                               printf("Warn: Invalid WP_GRP_SIZE (should be 0x00)\n");
+@@ -1117,7 +1117,7 @@ void print_sd_csd(struct config *config, char *csd)
+                       if (wp_grp_enable != 0x00)
+                               printf("Warn: Invalid WP_GRP_ENABLE (should be 0x00)\n");
+-                      printf("\tR2W_FACTOR: 0x%01x (Write %d times read)\n",
++                      printf("\tR2W_FACTOR: 0x%01x (Write %u times read)\n",
+                              r2w_factor, r2w_factor);
+                       if (r2w_factor != 0x02)
+                               printf("Warn: Invalid R2W_FACTOR (should be 0x02)\n");
+@@ -1199,7 +1199,7 @@ void print_sd_csd(struct config *config, char *csd)
+               else
+                       printf("%.2fbyte", memory_capacity * 1.0);
+-              printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++              printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+                      memory_capacity, blocks, block_size);
+       } else {
+               unsigned long long blocks = 0;
+@@ -1262,7 +1262,7 @@ void print_sd_csd(struct config *config, char *csd)
+               else
+                       printf("%.2fbyte", memory_capacity * 1.0);
+-              printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++              printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+                      memory_capacity, blocks, block_size);
+       }
+ }
+@@ -1456,7 +1456,7 @@ void print_mmc_csd(struct config *config, char *csd)
+                       break;
+               }
+-              printf("\tNSAC: %d clocks\n", nsac);
++              printf("\tNSAC: %u clocks\n", nsac);
+               printf("\tTRAN_SPEED: 0x%02x (", tran_speed);
+               switch (tran_speed_timevalue) {
+               case 0x0:
+@@ -1764,10 +1764,10 @@ void print_mmc_csd(struct config *config, char *csd)
+               printf("\tC_SIZE_MULT: 0x%01x\n", c_size_mult);
+               printf("\tERASE_GRP_SIZE: 0x%02x\n", erase_grp_size);
+-              printf("\tERASE_GRP_MULT: 0x%02x (%d write blocks/erase group)\n",
++              printf("\tERASE_GRP_MULT: 0x%02x (%u write blocks/erase group)\n",
+                      erase_grp_mult, (erase_grp_size + 1) *
+                      (erase_grp_mult + 1));
+-              printf("\tWP_GRP_SIZE: 0x%02x (%d blocks/write protect group)\n",
++              printf("\tWP_GRP_SIZE: 0x%02x (%u blocks/write protect group)\n",
+                      wp_grp_size, wp_grp_size + 1);
+               printf("\tWP_GRP_ENABLE: 0x%01x\n", wp_grp_enable);
+@@ -1784,7 +1784,7 @@ void print_mmc_csd(struct config *config, char *csd)
+                       break;
+               }
+-              printf("\tR2W_FACTOR: 0x%01x (Write %d times read)\n",
++              printf("\tR2W_FACTOR: 0x%01x (Write %u times read)\n",
+                      r2w_factor, r2w_factor);
+               printf("\tWRITE_BL_LEN: 0x%01x (", write_bl_len);
+@@ -1914,7 +1914,7 @@ void print_mmc_csd(struct config *config, char *csd)
+               else
+                       printf("%.2fbyte", memory_capacity * 1.0);
+-              printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++              printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+                      memory_capacity, blocks, block_size);
+       } else {
+               int mult;
+@@ -1991,7 +1991,7 @@ void print_mmc_csd(struct config *config, char *csd)
+                       printf("%.2fKbyte", memory_capacity / (1024.0));
+               else
+                       printf("%.2fbyte", memory_capacity * 1.0);
+-              printf(" (%lld bytes, %lld sectors, %d bytes each)\n",
++              printf(" (%llu bytes, %llu sectors, %d bytes each)\n",
+                      memory_capacity, blocks, block_size);
+       }
+ }
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index 19a9da1..9402112 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -252,6 +252,7 @@ int do_writeprotect_boot_get(int nargs, char **argv)
+       print_writeprotect_boot_status(ext_csd);
++      close(fd);
+       return ret;
+ }
+@@ -290,6 +291,7 @@ int do_writeprotect_boot_set(int nargs, char **argv)
+               exit(1);
+       }
++      close(fd);
+       return ret;
+ }
+@@ -378,6 +380,7 @@ int do_writeprotect_user_get(int nargs, char **argv)
+       if (last_wpblk != (x + y - 1))
+               print_wp_status(wp_sizeblks, last_wpblk, cnt - 1, last_prot);
++      close(fd);
+       return ret;
+ }
+@@ -524,6 +527,7 @@ int do_disable_512B_emulation(int nargs, char **argv)
+               printf("MMC does not support disabling 512B emulation mode.\n");
+       }
++      close(fd);
+       return ret;
+ }
+@@ -595,6 +599,7 @@ int do_write_boot_en(int nargs, char **argv)
+                       value, EXT_CSD_PART_CONFIG, device);
+               exit(1);
+       }
++      close(fd);
+       return ret;
+ }
+@@ -716,6 +721,7 @@ int do_hwreset(int value, int nargs, char **argv)
+               exit(1);
+       }
++      close(fd);
+       return ret;
+ }
+@@ -766,6 +772,7 @@ int do_write_bkops_en(int nargs, char **argv)
+               exit(1);
+       }
++      close(fd);
+       return ret;
+ }
+@@ -796,6 +803,7 @@ int do_status_get(int nargs, char **argv)
+       printf("SEND_STATUS response: 0x%08x\n", response);
++      close(fd);
+       return ret;
+ }
+@@ -1615,11 +1623,11 @@ int do_read_extcsd(int nargs, char **argv)
+               printf("Write reliability setting register"
+                       " [WR_REL_SET]: 0x%02x\n", reg);
+-              printf(" user area: %s\n", reg & (1<<0) ? reliable : fast);
++              printf(" user area: %s\n", (reg & (1<<0)) ? reliable : fast);
+               int i;
+               for (i = 1; i <= 4; i++) {
+                       printf(" partition %d: %s\n", i,
+-                              reg & (1<<i) ? reliable : fast);
++                              (reg & (1<<i)) ? reliable : fast);
+               }
+               reg = ext_csd[EXT_CSD_WR_REL_PARAM];
+@@ -1805,6 +1813,7 @@ int do_sanitize(int nargs, char **argv)
+               exit(1);
+       }
++      close(fd);
+       return ret;
+ }
+@@ -2390,6 +2399,7 @@ int do_cache_ctrl(int value, int nargs, char **argv)
+               exit(1);
+       }
++      close(fd);
+       return ret;
+ }
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/0009-mmc-utils-let-FFU-mode-use-CMD23-and-CMD25.patch b/utils/mmc-utils/patches/0009-mmc-utils-let-FFU-mode-use-CMD23-and-CMD25.patch
new file mode 100644 (file)
index 0000000..a51d1c3
--- /dev/null
@@ -0,0 +1,188 @@
+From 5425e4e96559b29b36459080190e8bcc1c92f7c2 Mon Sep 17 00:00:00 2001
+From: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@micron.com>
+Date: Wed, 10 Apr 2019 13:38:08 +0000
+Subject: [PATCH 9/9] mmc-utils: let FFU mode use CMD23 and CMD25
+
+As per specification, the host can use either CMD24 or CMD25 in
+closed-ended or open-ended way.
+CMD25 is better option as it can flash the firmware image in one go.
+
+Signed-off-by: Shivamurthy Shastri <sshivamurthy@micron.com>
+Reviewed-by: Avri Altman <avri.altman@wdc.com>
+---
+ mmc.h      |  2 ++
+ mmc_cmds.c | 70 ++++++++++++++++++++++++++++++------------------------
+ 2 files changed, 41 insertions(+), 31 deletions(-)
+
+diff --git a/mmc.h b/mmc.h
+index 285c1f1..a4cbba4 100644
+--- a/mmc.h
++++ b/mmc.h
+@@ -25,10 +25,12 @@
+ /* From kernel linux/mmc/mmc.h */
+ #define MMC_SWITCH            6       /* ac   [31:0] See below        R1b */
+ #define MMC_SEND_EXT_CSD      8       /* adtc                         R1  */
++#define MMC_STOP_TRANSMISSION    12   /* ac                      R1b */
+ #define MMC_SEND_STATUS               13      /* ac   [31:16] RCA        R1  */
+ #define R1_SWITCH_ERROR   (1 << 7)  /* sx, c */
+ #define MMC_SWITCH_MODE_WRITE_BYTE    0x03    /* Set target to value */
+ #define MMC_READ_MULTIPLE_BLOCK  18   /* adtc [31:0] data addr   R1  */
++#define MMC_SET_BLOCK_COUNT      23   /* adtc [31:0] data addr   R1  */
+ #define MMC_WRITE_BLOCK               24      /* adtc [31:0] data addr        R1  */
+ #define MMC_WRITE_MULTIPLE_BLOCK 25   /* adtc                    R1  */
+ #define MMC_SET_WRITE_PROT    28    /* ac   [31:0] data addr   R1b */
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index 9402112..0a3788a 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -2424,12 +2424,13 @@ int do_ffu(int nargs, char **argv)
+       int sect_done = 0, retry = 3, ret = -EINVAL;
+       unsigned int sect_size;
+       __u8 ext_csd[512];
+-      __u8 *buf;
++      __u8 *buf = NULL;
+       __u32 arg;
+       off_t fw_size;
+       ssize_t chunk_size;
+       char *device;
+-      struct mmc_ioc_multi_cmd *multi_cmd;
++      struct mmc_ioc_multi_cmd *multi_cmd = NULL;
++      __u32 blocks = 1;
+       if (nargs != 3) {
+               fprintf(stderr, "Usage: ffu <image name> </path/to/mmcblkX> \n");
+@@ -2449,14 +2450,6 @@ int do_ffu(int nargs, char **argv)
+               exit(1);
+       }
+-      buf = malloc(512);
+-      multi_cmd = calloc(1, sizeof(struct mmc_ioc_multi_cmd) +
+-                              3 * sizeof(struct mmc_ioc_cmd));
+-      if (!buf || !multi_cmd) {
+-              perror("failed to allocate memory");
+-              goto out;
+-      }
+-
+       ret = read_extcsd(dev_fd, ext_csd);
+       if (ret) {
+               fprintf(stderr, "Could not read EXT_CSD from %s\n", device);
+@@ -2481,9 +2474,17 @@ int do_ffu(int nargs, char **argv)
+       }
+       fw_size = lseek(img_fd, 0, SEEK_END);
++      if (fw_size > MMC_IOC_MAX_BYTES || fw_size == 0) {
++              fprintf(stderr, "Wrong firmware size");
++              goto out;
++      }
+-      if (fw_size == 0) {
+-              fprintf(stderr, "Firmware image is empty");
++      /* allocate maximum required */
++      buf = malloc(fw_size);
++      multi_cmd = calloc(1, sizeof(struct mmc_ioc_multi_cmd) +
++                              4 * sizeof(struct mmc_ioc_cmd));
++      if (!buf || !multi_cmd) {
++              perror("failed to allocate memory");
+               goto out;
+       }
+@@ -2493,14 +2494,19 @@ int do_ffu(int nargs, char **argv)
+               goto out;
+       }
++      /* calculate required fw blocks for CMD25 */
++      blocks = fw_size / sect_size;
++
+       /* set CMD ARG */
+       arg = ext_csd[EXT_CSD_FFU_ARG_0] |
+               ext_csd[EXT_CSD_FFU_ARG_1] << 8 |
+               ext_csd[EXT_CSD_FFU_ARG_2] << 16 |
+               ext_csd[EXT_CSD_FFU_ARG_3] << 24;
++      /* prepare multi_cmd for FFU based on cmd to be used */
++
+       /* prepare multi_cmd to be sent */
+-      multi_cmd->num_of_cmds = 3;
++      multi_cmd->num_of_cmds = 4;
+       /* put device into ffu mode */
+       multi_cmd->cmds[0].opcode = MMC_SWITCH;
+@@ -2511,37 +2517,42 @@ int do_ffu(int nargs, char **argv)
+       multi_cmd->cmds[0].flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
+       multi_cmd->cmds[0].write_flag = 1;
++      /* send block count */
++      multi_cmd->cmds[1].opcode = MMC_SET_BLOCK_COUNT;
++      multi_cmd->cmds[1].arg = blocks;
++      multi_cmd->cmds[1].flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
++
+       /* send image chunk */
+-      multi_cmd->cmds[1].opcode = MMC_WRITE_BLOCK;
+-      multi_cmd->cmds[1].blksz = sect_size;
+-      multi_cmd->cmds[1].blocks = 1;
+-      multi_cmd->cmds[1].arg = arg;
+-      multi_cmd->cmds[1].flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
+-      multi_cmd->cmds[1].write_flag = 1;
+-      mmc_ioc_cmd_set_data(multi_cmd->cmds[1], buf);
++      multi_cmd->cmds[2].opcode = MMC_WRITE_MULTIPLE_BLOCK;
++      multi_cmd->cmds[2].blksz = sect_size;
++      multi_cmd->cmds[2].blocks = blocks;
++      multi_cmd->cmds[2].arg = arg;
++      multi_cmd->cmds[2].flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
++      multi_cmd->cmds[2].write_flag = 1;
++      mmc_ioc_cmd_set_data(multi_cmd->cmds[2], buf);
+       /* return device into normal mode */
+-      multi_cmd->cmds[2].opcode = MMC_SWITCH;
+-      multi_cmd->cmds[2].arg = (MMC_SWITCH_MODE_WRITE_BYTE << 24) |
++      multi_cmd->cmds[3].opcode = MMC_SWITCH;
++      multi_cmd->cmds[3].arg = (MMC_SWITCH_MODE_WRITE_BYTE << 24) |
+                       (EXT_CSD_MODE_CONFIG << 16) |
+                       (EXT_CSD_NORMAL_MODE << 8) |
+                       EXT_CSD_CMD_SET_NORMAL;
+-      multi_cmd->cmds[2].flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
+-      multi_cmd->cmds[2].write_flag = 1;
++      multi_cmd->cmds[3].flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
++      multi_cmd->cmds[3].write_flag = 1;
+ do_retry:
+       /* read firmware chunk */
+       lseek(img_fd, 0, SEEK_SET);
+-      chunk_size = read(img_fd, buf, 512);
++      chunk_size = read(img_fd, buf, fw_size);
+-      while (chunk_size > 0) {
++      if (chunk_size > 0) {
+               /* send ioctl with multi-cmd */
+               ret = ioctl(dev_fd, MMC_IOC_MULTI_CMD, multi_cmd);
+               if (ret) {
+                       perror("Multi-cmd ioctl");
+                       /* In case multi-cmd ioctl failed before exiting from ffu mode */
+-                      ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[2]);
++                      ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[3]);
+                       goto out;
+               }
+@@ -2568,9 +2579,6 @@ do_retry:
+               } else {
+                       fprintf(stderr, "Programmed %d/%jd bytes\r", sect_done * sect_size, (intmax_t)fw_size);
+               }
+-
+-              /* read the next firmware chunk (if any) */
+-              chunk_size = read(img_fd, buf, 512);
+       }
+       if ((sect_done * sect_size) == fw_size) {
+@@ -2607,7 +2615,7 @@ do_retry:
+               if (ret) {
+                       perror("Multi-cmd ioctl failed setting install mode");
+                       /* In case multi-cmd ioctl failed before exiting from ffu mode */
+-                      ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[2]);
++                      ioctl(dev_fd, MMC_IOC_CMD, &multi_cmd->cmds[3]);
+                       goto out;
+               }
+-- 
+2.17.1
+
diff --git a/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch
deleted file mode 100644 (file)
index 1a20813..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -1,5 +1,5 @@
- CC ?= gcc
--AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
-+AM_CFLAGS = -D_FILE_OFFSET_BITS=64
- CFLAGS ?= -g -O2
- objects = \
-       mmc.o \
index 181419b0900b6666bf69314eac856b13f8beee42..ccf3a9dfd7c36a1b11a07c76790a3d0888075866 100644 (file)
@@ -8,14 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=4.0
+PKG_VERSION:=4.1
 PKG_RELEASE:=1
-PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=1e2fcfea35784624a7d86785768b772d58bb3995d1aec9176a27a113b1e9bac3
+PKG_HASH:=86bde596a038d6fde619b49d785c0ebf0b3eaa7001a39dbe9316bd5392d221d0
+
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>, Hannu Nyman <hannu.nyman@iki.fi>
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
@@ -27,9 +29,7 @@ define Package/nano
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=An enhanced clone of the Pico text editor
-  URL:=http://www.nano-editor.org/
-  MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>, \
-               Hannu Nyman <hannu.nyman@iki.fi>
+  URL:=https://www.nano-editor.org/
   DEPENDS:=+libncurses
 endef
 
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 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
+}
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
-
index 2f956a211b38d5b0b4ca86ca95916708c3fe3793..42ef77b418e8750957b5353f1f757bf8d5302f8f 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zstd
-PKG_VERSION:=1.3.8
+PKG_VERSION:=1.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=90d902a1282cc4e197a8023b6d6e8d331c1fd1dfe60f7f8e4ee9da40da886dc3
+PKG_HASH:=63be339137d2b683c6d19a9e34f4fb684790e864fee13c7dd40e197a64c705c1
 
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILE:=COPYING