Merge pull request #8855 from mwarning/smcroute
authorRosen Penev <rosenp@gmail.com>
Mon, 13 May 2019 20:41:57 +0000 (13:41 -0700)
committerGitHub <noreply@github.com>
Mon, 13 May 2019 20:41:57 +0000 (13:41 -0700)
smcroute: add new package

505 files changed:
CONTRIBUTING.md
admin/atop/patches/010-makefile-missing-cflags.patch [new file with mode: 0644]
admin/netdata/Makefile
admin/netdata/patches/002-force-python3.patch
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/erlang/Makefile
lang/erlang/patches/010-openssl-deprecated.patch [new file with mode: 0644]
lang/erlang/patches/010-openssl-engine.patch [deleted file]
lang/golang/golang-github-agl-ed25519/Makefile [deleted file]
lang/golang/golang-github-dchest-siphash/Makefile [deleted file]
lang/golang/golang-golang-x-crypto/Makefile [deleted file]
lang/golang/golang-golang-x-net/Makefile [deleted file]
lang/golang/golang-golang-x-sys/Makefile [deleted file]
lang/golang/golang-golang-x-text/Makefile [deleted file]
lang/golang/golang-torproject-pluggable-transports-goptlib/Makefile [deleted file]
lang/golang/golang-version.mk
lang/golang/golang/Makefile
lang/lua-ev/Makefile [new file with mode: 0644]
lang/luafilesystem/Makefile
lang/luasec/Makefile
lang/luasec/patches/010-Using-const-SSL_METHOD.patch [deleted file]
lang/luasec/patches/020-Removing-SSLv3-support.patch [deleted file]
lang/luasec/patches/030-Removing-deprecated-methods-to-select-the-protocol.patch [deleted file]
lang/lzmq/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/node/patches/006-mips64_support.patch [new file with mode: 0644]
lang/perl-device-usb/Makefile
lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff [deleted file]
lang/perl-device-usb/patches/110-just_assume_libusb_is_there.patch [new file with mode: 0644]
lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch
lang/perl-inline/Makefile
lang/php7-pecl-redis/Makefile [new file with mode: 0644]
lang/php7/Makefile
lang/php7/files/php7-fastcgi.init
lang/php7/patches/0032-Use-system-timezone.patch
lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch
lang/php7/patches/0050-remove-build-timestamps.patch
lang/php7/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch
lang/php7/patches/1004-disable-phar-command.patch
lang/php7/patches/1006-multiline-syslog.patch
lang/php7/patches/1012-php_iconv_string-null-out-pointer.patch
lang/php7/patches/1020-openssl-deprecated.patch [new file with mode: 0644]
lang/python/Jinja2/Makefile
lang/python/README.md
lang/python/Werkzeug/Makefile
lang/python/django-appconf/Makefile
lang/python/django-compressor/Makefile
lang/python/django-constance/Makefile
lang/python/django-jsonfield/Makefile
lang/python/django-picklefield/Makefile
lang/python/django-postoffice/Makefile
lang/python/django-restframework/Makefile
lang/python/django-simple-captcha/Makefile
lang/python/django-statici18n/Makefile
lang/python/django/Makefile
lang/python/et_xmlfile/Makefile [deleted file]
lang/python/flup/Makefile
lang/python/gunicorn/Makefile
lang/python/jdcal/Makefile [deleted file]
lang/python/openpyxl/Makefile
lang/python/pillow/Makefile
lang/python/python-awscli/Makefile [new file with mode: 0644]
lang/python/python-boto3/Makefile [new file with mode: 0644]
lang/python/python-botocore/Makefile [new file with mode: 0644]
lang/python/python-cffi/Makefile
lang/python/python-colorama/Makefile [new file with mode: 0644]
lang/python/python-dateutil/Makefile
lang/python/python-docutils/Makefile [new file with mode: 0644]
lang/python/python-evdev/Makefile
lang/python/python-futures/Makefile [new file with mode: 0644]
lang/python/python-hyperlink/Makefile
lang/python/python-ifaddr/Makefile [new file with mode: 0644]
lang/python/python-jmespath/Makefile [new file with mode: 0644]
lang/python/python-mysql/Makefile
lang/python/python-netdisco/Makefile [new file with mode: 0644]
lang/python/python-packages/Makefile
lang/python/python-pyasn1-modules/Makefile
lang/python/python-pytz/Makefile
lang/python/python-requests/Makefile
lang/python/python-requests/patches/0001-Allow-urllib3-125x.patch [new file with mode: 0644]
lang/python/python-rsa/Makefile [new file with mode: 0644]
lang/python/python-s3transfer/Makefile [new file with mode: 0644]
lang/python/python-six/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-zeroconf/Makefile [new file with mode: 0644]
lang/python/python3-netifaces/Makefile [new file with mode: 0644]
lang/python/python3-packages/Makefile [new file with mode: 0644]
lang/python/python3-packages/README.md [new file with mode: 0644]
lang/python/python3-pyroute2/Makefile [new file with mode: 0644]
lang/python/python3-unidecode/Makefile [new file with mode: 0644]
lang/python/rcssmin/Makefile [deleted file]
lang/python/ruamel-yaml/Makefile
lang/python/xmltodict/Makefile [new file with mode: 0644]
lang/ruby/Makefile
libs/boost/Makefile
libs/boost/patches/010-uclibc-ng.patch [new file with mode: 0644]
libs/boost/patches/100-fix-apply_visitor-on-lvalue-variant.patch [new file with mode: 0644]
libs/boost/patches/uclibc-ng-2.patch [new file with mode: 0644]
libs/botan/Makefile
libs/faad2/Makefile
libs/getdns/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/icu/patches/020-uClibc-ng.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/libartnet/Makefile
libs/libartnet/patches/002-gcc7.patch
libs/libdmapsharing/Makefile
libs/libevhtp/Makefile
libs/libevhtp/patches/020-openssl-1.1-compatibility.patch
libs/libevhtp/patches/021-openssl-thread.patch
libs/libevhtp/patches/030-uclibc.patch [new file with mode: 0644]
libs/libfizz/Makefile [new file with mode: 0644]
libs/libfolly/Makefile [new file with mode: 0644]
libs/libfolly/patches/100-cmake-fix-regex-match-path.patch [new file with mode: 0644]
libs/libfolly/patches/101-remove-undefined-dcheck.patch [new file with mode: 0644]
libs/libfolly/patches/102-uclibc-patches.patch [new file with mode: 0644]
libs/libfolly/patches/103-openssl-compatibility.patch [new file with mode: 0644]
libs/libgflags/Makefile [new file with mode: 0644]
libs/libglog/Makefile
libs/libgpiod/Makefile
libs/libhttp-parser/Makefile
libs/libimobiledevice/Makefile
libs/libimobiledevice/patches/010-openssl-deprecated.patch [new file with mode: 0644]
libs/libjpeg/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/libmstch/Makefile [new file with mode: 0644]
libs/libndpi/Makefile
libs/libp11/Makefile
libs/libp11/patches/001-fix-install.patch
libs/libpng/Makefile
libs/libpsl/Makefile
libs/libre2/Makefile [new file with mode: 0644]
libs/librsocket-cpp/Makefile [new file with mode: 0644]
libs/librsocket-cpp/patches/100-fix-momit-leaf-frame-pointer-error.patch [new file with mode: 0644]
libs/librsocket-cpp/patches/101-do-not-use-gold.patch [new file with mode: 0644]
libs/libsearpc/Makefile
libs/libsigar/Makefile [new file with mode: 0644]
libs/libsndfile/Makefile
libs/libssh/Makefile
libs/libssh/patches/010-openssl-11-deprecated.patch [new file with mode: 0644]
libs/libssh/patches/020-openssl-threads.patch [new file with mode: 0644]
libs/libusbmuxd/Makefile
libs/libuwsc/Makefile
libs/libvpx/Makefile
libs/libwangle/Makefile [new file with mode: 0644]
libs/libx264/Makefile
libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch [new file with mode: 0644]
libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch [new file with mode: 0644]
libs/libxerces-c/Makefile
libs/libxerces-c/patches/0001-fix-configure-cross-compiling.patch
libs/libxslt/Makefile
libs/libxslt/patches/100-fix-cve-2019-11068.patch [new file with mode: 0644]
libs/log4cplus/Makefile
libs/loudmouth/Makefile
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/measurement-kit/patches/003-fix-openssl-depredecated-api.patch [new file with mode: 0644]
libs/nss/Makefile
libs/opencv/Makefile
libs/opencv/patches/010-fix-url.patch [new file with mode: 0644]
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/sqlite3/Makefile
libs/tcp_wrappers/Makefile
libs/tcp_wrappers/patches/006-compilation-warnings.patch [new file with mode: 0644]
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/bogofilter/Makefile
mail/dovecot/Makefile
mail/dovecot/patches/100-openssl-deprecated.patch
mail/dovecot/patches/110-openssl-engine.patch
mail/msmtp/Makefile
mail/postfix/Makefile
mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch [new file with mode: 0644]
mail/ssmtp/Makefile
mail/ssmtp/patches/020-openssl-deprecated.patch [new file with mode: 0644]
multimedia/gst1-libav/Makefile
multimedia/gst1-plugins-bad/Makefile
multimedia/gst1-plugins-base/Makefile
multimedia/gst1-plugins-good/Makefile
multimedia/gst1-plugins-ugly/Makefile
multimedia/gstreamer1/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/tvheadend/Makefile
multimedia/tvheadend/patches/020-strncpy-issue.patch [new file with mode: 0644]
multimedia/youtube-dl/Makefile
net/ariang/Makefile
net/cifs-utils/Makefile
net/ddns-scripts/Makefile
net/ddns-scripts/samples/slaac_sample.sh [new file with mode: 0755]
net/dmapd/Makefile
net/freeradius3/Makefile
net/freeradius3/files/radiusd.init
net/geth/Makefile
net/gnurl/Makefile
net/haproxy/Makefile
net/haproxy/get-latest-patches.sh
net/haproxy/patches/000-BUG-MAJOR-listener-Make-sure-the-listener-exist-before-using-it.patch [deleted file]
net/haproxy/patches/000-BUG-MINOR-http-Call-stream_inc_be_http_req_ctr-only-one-time-per-request.patch [new file with mode: 0644]
net/haproxy/patches/001-BUG-MEDIUM-spoe-arg-len-encoded-in-previous-frag-frame-but-len-changed.patch [new file with mode: 0644]
net/haproxy/patches/001-BUG-MINOR-listener-keep-accept-rate-counters-accurate-under-saturation.patch [deleted file]
net/haproxy/patches/002-BUG-MEDIUM-logs-Only-attempt-to-free-startup_logs-once.patch [deleted file]
net/haproxy/patches/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch [new file with mode: 0644]
net/haproxy/patches/003-BUG-MEDIUM-51d-fix-possible-segfault-on-deinit_51degrees.patch [deleted file]
net/haproxy/patches/003-DOC-contrib-modsecurity-Typos-and-fix-the-reject-example.patch [new file with mode: 0644]
net/haproxy/patches/004-BUG-MEDIUM-contrib-modsecurity-If-host-header-is-NULL-dont-try-to-strdup-it.patch [new file with mode: 0644]
net/haproxy/patches/004-BUG-MINOR-ssl-fix-warning-about-ssl-min-max-ver-support.patch [deleted file]
net/haproxy/patches/005-MEDIUM-threads-Use-__ATOMIC_SEQ_CST-when-using-the-newer-atomic-API.patch [deleted file]
net/haproxy/patches/005-MINOR-examples-Use-right-locale-for-the-last-changelog-date-in-haproxy-spec.patch [new file with mode: 0644]
net/haproxy/patches/006-BUG-MAJOR-map-acl-real-fix-segfault-during-show-map-acl-on-CLI.patch [new file with mode: 0644]
net/haproxy/patches/006-BUG-MEDIUM-threads-fd-do-not-forget-to-take-into-account-epoll_fd-pipes.patch [deleted file]
net/haproxy/patches/007-BUG-MAJOR-spoe-Fix-initialization-of-thread-dependent-fields.patch [deleted file]
net/haproxy/patches/007-BUG-MEDIUM-listener-Fix-how-unlimited-number-of-consecutive-accepts-is-handled.patch [new file with mode: 0644]
net/haproxy/patches/008-MINOR-config-Test-validity-of-tune-maxaccept-during-the-config-parsing.patch [new file with mode: 0644]
net/haproxy/patches/008-deprecated-openssl.patch [deleted file]
net/haproxy/patches/009-CLEANUP-config-Dont-alter-listener--maxaccept-when-nbproc-is-set-to-1.patch [new file with mode: 0644]
net/haproxy/patches/010-MINOR-threads-Implement-HA_ATOMIC_LOAD.patch [new file with mode: 0644]
net/haproxy/patches/011-BUG-MEDIUM-port_range-Make-the-ring-buffer-lock-free.patch [new file with mode: 0644]
net/haproxy/patches/012-deprecated-openssl.patch [new file with mode: 0644]
net/i2pd/Makefile
net/iodine/Makefile
net/iodine/patches/100-musl-compatibility.patch
net/kea/Makefile
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
net/libreswan/files/ipsec.conf
net/libreswan/files/ipsec.secrets
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/lighttpd/Makefile
net/linuxptp/Makefile
net/lora-gateway-hal/Config.in [new file with mode: 0644]
net/lora-gateway-hal/Makefile [new file with mode: 0644]
net/lora-gateway-hal/patches/0001-add-cmake-support.patch [new file with mode: 0644]
net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch [new file with mode: 0644]
net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.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/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/0001-don-t-free-ai-ai_canonname.patch [deleted file]
net/nfs-kernel-server/patches/0002-define-and-use-wrapper-function-nfs_freeaddrin.patch [deleted file]
net/nfs-kernel-server/patches/102-limits.patch [deleted file]
net/nginx/Makefile
net/noddos/Makefile
net/noddos/patches/020-Ipset.cxx-update-libipset-API-to-version-7.patch [new file with mode: 0644]
net/noddos/patches/030-getnoddosdeviceprofiles-wget-timestamping-check.patch [new file with mode: 0644]
net/ntpclient/Makefile
net/ntpclient/files/ntpclient.hotplug
net/nut/Makefile
net/nut/files/nut-monitor.init
net/nut/files/nutshutdown
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/oor/Makefile
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/openvswitch/Makefile
net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch
net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch
net/openvswitch/patches/0004-build-disable-building-tests.patch
net/openvswitch/patches/0005-datapath-conntrack-fix-include-for-IP6_DEFRAG_CONNTR.patch [new file with mode: 0644]
net/p910nd/Makefile
net/p910nd/files/p910nd.config
net/p910nd/files/p910nd.init
net/port-mirroring/Makefile
net/port-mirroring/patches/010-convert-to-unix.patch [deleted file]
net/port-mirroring/patches/020-fix-musl.patch [deleted file]
net/ptunnel-ng/Makefile
net/rpcbind/Makefile
net/rpcbind/patches/002-fix_stack_buffer_overflow.patch [new file with mode: 0644]
net/rsyslog/Makefile
net/samba4/Config.in
net/samba4/Makefile
net/samba4/files/samba.init
net/scapy/Makefile
net/seafile-ccnet/Makefile
net/seafile-seahub/Makefile
net/seafile-server/Makefile
net/ser2net/Makefile
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/README.md
net/shadowsocks-libev/files/shadowsocks-libev.init
net/shorewall-core/Makefile
net/shorewall-lite/Makefile
net/shorewall/Makefile
net/shorewall6-lite/Makefile
net/shorewall6/Makefile
net/snort3/Makefile
net/snort3/patches/002-ignore-liblzma.patch [new file with mode: 0644]
net/socat/Makefile
net/softethervpn5/Makefile
net/squid/Makefile
net/squid/patches/001-cross_compile.patch
net/squid/patches/010-openssl-engine.patch [deleted file]
net/stubby/Makefile
net/stubby/files/README.md
net/stubby/files/stubby.conf
net/stubby/files/stubby.init
net/stunnel/Makefile
net/stunnel/files/stunnel.init
net/subversion/Makefile
net/subversion/patches/301-cross-compilation-macos.patch
net/sysrepo/Makefile
net/tac_plus/Makefile [new file with mode: 0644]
net/tac_plus/files/tac_plus.conf [new file with mode: 0644]
net/tac_plus/files/tac_plus.init [new file with mode: 0755]
net/tac_plus/patches/010-configure-remove-libnsl.patch [new file with mode: 0644]
net/tgt/Makefile
net/tgt/files/tgt.config
net/tgt/files/tgt.init
net/tgt/patches/110-iscsi_tcp-Replace-deprecated-valloc-function.patch [new file with mode: 0644]
net/tgt/patches/111-iscsi_tcp-fix-compile-warning.patch [new file with mode: 0644]
net/tinyproxy/Makefile
net/tinyproxy/files/tinyproxy.init
net/tor/Makefile
net/transmission-web-control/Makefile [new file with mode: 0644]
net/transmission-web-control/patches/001-remove-ui-original-link.patch [new file with mode: 0644]
net/transmission/Makefile
net/transmission/files/transmission.init
net/transmission/patches/070-uClibc-ng-since-1.0.18-has-sys-quota.h-synced-with-G.patch [new file with mode: 0644]
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/unbound/files/odhcpd.awk
net/unbound/files/unbound.sh
net/uwsgi-cgi/Makefile
net/uwsgi-cgi/patches/010-uclibc-ng.patch [new file with mode: 0644]
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/files/collectd.conf [deleted file]
utils/collectd/files/collectd.init
utils/collectd/files/collectd.uci [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/conntrack.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/contextswitch.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/cpu.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/cpufreq.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/csv.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/df.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/disk.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/dns.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/email.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/entropy.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/exec.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/interface.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/irq.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/iwinfo.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/load.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/lua.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/memory.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/netlink.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/nut.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/olsrd.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/openvpn.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/ping.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/processes.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/rrdtool.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/sensors.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/tcpconns.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/thermal.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/unixsock.json [new file with mode: 0644]
utils/collectd/files/usr/share/collectd/plugin/uptime.json [new file with mode: 0644]
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/collectd/patches/930-fix-lua-callback-registration.patch [new file with mode: 0644]
utils/device-observatory/Makefile
utils/device-observatory/patches/010-uClibc-ng.patch [new file with mode: 0644]
utils/domoticz/Makefile
utils/domoticz/patches/010-boost-170-fix.patch [new file with mode: 0644]
utils/flent-tools/Makefile
utils/gawk/Makefile
utils/gpsd/Makefile
utils/gpsd/files/gpsd.init
utils/hashdeep/Makefile [new file with mode: 0644]
utils/hfsprogs/Makefile
utils/hfsprogs/patches/010-valloc-to-memalign.patch [new file with mode: 0644]
utils/hplip/Makefile
utils/hplip/patches/040-fix_bool.patch [deleted file]
utils/hplip/patches/060-fix-uclibc.patch [new file with mode: 0644]
utils/i2c-tools/Makefile
utils/mariadb/Makefile
utils/mariadb/files/mysqld.init
utils/mariadb/patches/100-fix_hostname.patch
utils/mariadb/patches/170-ppc-remove-glibc-dep.patch
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/ntfs-3g/Makefile
utils/open-vm-tools/Makefile
utils/open-vm-tools/patches/0012-Fix-some-bad-derefs-in-primary-NIC-gathering-code.patch [deleted file]
utils/owfs/Makefile
utils/pcsc-lite/Makefile
utils/pcsc-tools/Makefile
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
utils/rtty/Makefile
utils/rtty/files/rtty.config
utils/rtty/files/rtty.init
utils/sane-backends/Makefile
utils/sane-backends/files/etc/xinetd.d/sane-port [new file with mode: 0644]
utils/sane-backends/files/usr/sbin/saned [new file with mode: 0755]
utils/sane-backends/files/xinet.d_sane-port [deleted file]
utils/slide-switch/Makefile
utils/sumo/Makefile
utils/sumo/patches/100-configure_fix.patch
utils/temperusb/Makefile
utils/tmux/Makefile
utils/ttyd/Makefile
utils/usbmuxd/Makefile
utils/vim/Makefile
utils/xz/Makefile
utils/xz/patches/001-relative-pkg-config-paths.patch [new file with mode: 0644]
utils/yara/Makefile
utils/yara/patches/010-libyara-Switch-to-OpenSSL-s-THREADID-API.patch [deleted file]
utils/zstd/Makefile
utils/zstd/patches/010-uClibc-ng.patch [new file with mode: 0644]

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|
diff --git a/admin/atop/patches/010-makefile-missing-cflags.patch b/admin/atop/patches/010-makefile-missing-cflags.patch
new file mode 100644 (file)
index 0000000..6754ff7
--- /dev/null
@@ -0,0 +1,22 @@
+diff --git a/Makefile b/Makefile
+index 3bf5929..e065577 100644
+--- a/Makefile
++++ b/Makefile
+@@ -32,7 +32,7 @@ VERS     = $(shell ./atop -V 2>/dev/null| sed -e 's/^[^ ]* //' -e 's/ .*//')
+ all:          atop atopsar atopacctd atopconvert
+ atop:         atop.o    $(ALLMODS) Makefile
+-              $(CC) -c version.c
++              $(CC) $(CFLAGS) -c version.c
+               $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS)
+ atopsar:      atop
+@@ -45,7 +45,7 @@ atopconvert: atopconvert.o
+               $(CC) atopconvert.o -o atopconvert -lz $(LDFLAGS)
+ netlink.o:    netlink.c
+-              $(CC) -I. -Wall -c netlink.c
++              $(CC) $(CFLAGS) -I. -Wall -c netlink.c
+ clean:
+               rm -f *.o atop atopacctd atopconvert
index 954fd0bf2189e07edd630a4ee8de4169489a2460..0212ad813b0a3bef3101bfd110f0130f633ecfc5 100644 (file)
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netdata
-PKG_VERSION:=1.13.0
+PKG_VERSION:=1.14.0
 PKG_RELEASE:=1
-PKG_MAINTAINER:=
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:my-netdata:netdata
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=258e64a945bf80e91c4bffab35e7f2d8930025246814038f541ff0ac403a666c
+PKG_HASH:=f3768f6927e3712dce73794c6943a12f4454410c872eb3dfd19af4f52296187a
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
 
 PKG_INSTALL:=1
@@ -37,8 +39,8 @@ define Package/netdata/description
   netdata is a highly optimized Linux daemon providing real-time performance
   monitoring for Linux systems, applications and SNMP devices over the web.
 
- If you want to use Python plugins install python3, python3-yaml and
- python3-urllib3
 If you want to use Python plugins install python3, python3-yaml and
 python3-urllib3
 endef
 
 TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
index 756b4d7ec1013945a94d28f3c82efb6666f5801d..84d19259da9893c582bf130acb6d1ee758e43d1b 100644 (file)
@@ -1,10 +1,14 @@
 --- a/collectors/python.d.plugin/python.d.plugin.in
 +++ b/collectors/python.d.plugin/python.d.plugin.in
-@@ -1,6 +1,4 @@
+@@ -1,10 +1,4 @@
 -#!/usr/bin/env bash
--'''':; exec "$(command -v python || command -v python3 || command -v python2 ||
+-'''':;
+-if [[ "$OSTYPE" == "darwin"* ]]; then
+-    export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
+-fi
+-exec "$(command -v python || command -v python3 || command -v python2 ||
 -echo "ERROR python IS NOT AVAILABLE IN THIS SYSTEM")" "$0" "$@" # '''
 +#!/usr/bin/python3
+
  # -*- coding: utf-8 -*-
  # 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 b103b67e7330d95069153a9360c83b1afb1de4c7..bc922f081a75aef76c30790f2aa6f4eb5a0a4eff 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=erlang
 PKG_VERSION:=21.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= http://www.erlang.org/download/
diff --git a/lang/erlang/patches/010-openssl-deprecated.patch b/lang/erlang/patches/010-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..88e268a
--- /dev/null
@@ -0,0 +1,189 @@
+--- a/lib/crypto/c_src/crypto.c
++++ b/lib/crypto/c_src/crypto.c
+@@ -41,6 +41,7 @@
+ #include <openssl/des.h>
+ #endif /* #ifndef OPENSSL_NO_DES */
+ /* #include <openssl/idea.h> This is not supported on the openssl OTP requires */
++#include <openssl/dh.h>
+ #include <openssl/dsa.h>
+ #include <openssl/rsa.h>
+ #include <openssl/aes.h>
+@@ -177,7 +178,7 @@
+ #endif
+ #if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+-# ifndef HAS_LIBRESSL
++# if !defined(OPENSSL_NO_CHACHA) || !defined(OPENSSL_NO_POLY1305)
+ #  define HAVE_CHACHA20_POLY1305
+ # endif
+ #endif
+@@ -197,8 +198,10 @@
+ /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
+    So if EC is disabled, you can't use Engine either....
+ */
++#if !defined(OPENSSL_NO_ENGINE)
+ # define HAS_ENGINE_SUPPORT
+ #endif
++#endif
+ #if defined(HAS_ENGINE_SUPPORT)
+@@ -910,7 +913,11 @@ static void engine_ctx_dtor(ErlNifEnv* env, struct engine_ctx* ctx) {
+ static int verify_lib_version(void)
+ {
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+     const unsigned long libv = SSLeay();
++#else
++    const unsigned long libv = OpenSSL_version_num();
++#endif
+     const unsigned long hdrv = OPENSSL_VERSION_NUMBER;
+ #   define MAJOR_VER(V) ((unsigned long)(V) >> (7*4))
+@@ -1166,12 +1173,14 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
+     funcp = &get_crypto_callbacks;
+ #endif
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+ #ifdef OPENSSL_THREADS
+     enif_system_info(&sys_info, sizeof(sys_info));
+     if (sys_info.scheduler_threads > 1) {
+       nlocks = CRYPTO_num_locks();
+     }
+     /* else no need for locks */
++#endif
+ #endif
+     ccb = (*funcp)(nlocks);
+@@ -1183,15 +1192,21 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
+     CRYPTO_set_mem_functions(ccb->crypto_alloc, ccb->crypto_realloc, ccb->crypto_free);
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+ #ifdef OPENSSL_THREADS
+     if (nlocks > 0) {
+       CRYPTO_set_locking_callback(ccb->locking_function);
++#if OPENSSL_VERSION_NUMBER < 0x10000000
+       CRYPTO_set_id_callback(ccb->id_function);
++#else
++      CRYPTO_THREADID_set_callback(ccb->id_function);
++#endif
+       CRYPTO_set_dynlock_create_callback(ccb->dyn_create_function);
+       CRYPTO_set_dynlock_lock_callback(ccb->dyn_lock_function);
+       CRYPTO_set_dynlock_destroy_callback(ccb->dyn_destroy_function);
+     }
+ #endif /* OPENSSL_THREADS */
++#endif
+     init_digest_types(env);
+     init_cipher_types(env);
+@@ -1391,7 +1406,11 @@ static ERL_NIF_TERM info_lib(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
+     static const char libname[] = "OpenSSL";
+     unsigned name_sz = strlen(libname);
++#if OPENSSL_VERSION_NUMBER < PACKED_OPENSSL_VERSION_PLAIN(1,1,0)
+     const char* ver = SSLeay_version(SSLEAY_VERSION);
++#else
++    const char* ver = OpenSSL_version(OPENSSL_VERSION);
++#endif
+     unsigned ver_sz = strlen(ver);
+     ERL_NIF_TERM name_term, ver_term;
+     int ver_num = OPENSSL_VERSION_NUMBER;
+--- a/lib/crypto/c_src/crypto_callback.c
++++ b/lib/crypto/c_src/crypto_callback.c
+@@ -83,7 +83,7 @@ static void crypto_free(void* ptr CCB_FILE_LINE_ARGS)
+     enif_free(ptr);
+ }
+-
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS /* vvvvvvvvvvvvvvv OPENSSL_THREADS vvvvvvvvvvvvvvvv */
+ static ErlNifRWLock** lock_vec = NULL; /* Static locks used by openssl */
+@@ -115,10 +115,17 @@ static void locking_function(int mode, int n, const char *file, int line)
+     locking(mode, lock_vec[n]);
+ }
++#if OPENSSL_VERSION_NUMBER < 0x10000000
+ static unsigned long id_function(void)
+ {
+     return (unsigned long) enif_thread_self();
+ }
++#else
++static void id_function(CRYPTO_THREADID *id)
++{
++    CRYPTO_THREADID_set_numeric(id, (unsigned long) enif_thread_self());
++}
++#endif
+ /* Dynamic locking, not used by current openssl version (0.9.8)
+  */
+@@ -136,6 +143,7 @@ static void dyn_destroy_function(struct CRYPTO_dynlock_value *ptr, const char *f
+ }
+ #endif /* ^^^^^^^^^^^^^^^^^^^^^^ OPENSSL_THREADS ^^^^^^^^^^^^^^^^^^^^^^ */
++#endif
+ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+ {
+@@ -146,7 +154,8 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+       &crypto_alloc,
+       &crypto_realloc,
+       &crypto_free,
+-        
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS
+       &locking_function,
+       &id_function,
+@@ -154,9 +163,11 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+       &dyn_lock_function,
+       &dyn_destroy_function
+ #endif /* OPENSSL_THREADS */
++#endif
+     };
+     if (!is_initialized) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ #ifdef OPENSSL_THREADS
+       if (nlocks > 0) {
+           int i;
+@@ -169,6 +180,7 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks)
+               if (lock_vec[i]==NULL) return NULL;
+           }
+       }
++#endif
+ #endif
+       is_initialized = 1;
+     }
+--- a/lib/crypto/c_src/crypto_callback.h
++++ b/lib/crypto/c_src/crypto_callback.h
+@@ -34,9 +34,15 @@ struct crypto_callbacks
+     void (*crypto_free)(void* ptr CCB_FILE_LINE_ARGS);
+     /* openssl callbacks */
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+   #ifdef OPENSSL_THREADS
+     void (*locking_function)(int mode, int n, const char *file, int line);
++  #if OPENSSL_VERSION_NUMBER < 0x10000000
+     unsigned long (*id_function)(void);
++  #else
++    void (*id_function)(CRYPTO_THREADID *id);
++  #endif
++#endif
+     struct CRYPTO_dynlock_value* (*dyn_create_function)(const char *file,
+                                                       int line);
+     void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value* ptr,
+--- a/lib/crypto/c_src/otp_test_engine.c
++++ b/lib/crypto/c_src/otp_test_engine.c
+@@ -42,8 +42,10 @@
+       && !defined(OPENSSL_NO_EC) \
+       && !defined(OPENSSL_NO_ECDH) \
+       && !defined(OPENSSL_NO_ECDSA)
++#if !defined(OPENSSL_NO_ENGINE)
+ # define HAVE_EC
+ #endif
++#endif
+ #if defined(HAVE_EC)
+ /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
diff --git a/lang/erlang/patches/010-openssl-engine.patch b/lang/erlang/patches/010-openssl-engine.patch
deleted file mode 100644 (file)
index f05a127..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
---- a/lib/crypto/c_src/crypto.c
-+++ b/lib/crypto/c_src/crypto.c
-@@ -41,6 +41,7 @@
- #include <openssl/des.h>
- #endif /* #ifndef OPENSSL_NO_DES */
- /* #include <openssl/idea.h> This is not supported on the openssl OTP requires */
-+#include <openssl/dh.h>
- #include <openssl/dsa.h>
- #include <openssl/rsa.h>
- #include <openssl/aes.h>
-@@ -197,8 +198,10 @@
- /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
-    So if EC is disabled, you can't use Engine either....
- */
-+#if !defined(OPENSSL_NO_ENGINE)
- # define HAS_ENGINE_SUPPORT
- #endif
-+#endif
- #if defined(HAS_ENGINE_SUPPORT)
-@@ -1186,7 +1189,11 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
- #ifdef OPENSSL_THREADS
-     if (nlocks > 0) {
-       CRYPTO_set_locking_callback(ccb->locking_function);
-+#if OPENSSL_VERSION_NUMBER < 0x10000000
-       CRYPTO_set_id_callback(ccb->id_function);
-+#else
-+      CRYPTO_THREADID_set_callback(ccb->id_function);
-+#endif
-       CRYPTO_set_dynlock_create_callback(ccb->dyn_create_function);
-       CRYPTO_set_dynlock_lock_callback(ccb->dyn_lock_function);
-       CRYPTO_set_dynlock_destroy_callback(ccb->dyn_destroy_function);
---- a/lib/crypto/c_src/crypto_callback.c
-+++ b/lib/crypto/c_src/crypto_callback.c
-@@ -115,10 +115,17 @@ static void locking_function(int mode, int n, const char *file, int line)
-     locking(mode, lock_vec[n]);
- }
-+#if OPENSSL_VERSION_NUMBER < 0x10000000
- static unsigned long id_function(void)
- {
-     return (unsigned long) enif_thread_self();
- }
-+#else
-+static void id_function(CRYPTO_THREADID *id)
-+{
-+    CRYPTO_THREADID_set_numeric(id, (unsigned long) enif_thread_self());
-+}
-+#endif
- /* Dynamic locking, not used by current openssl version (0.9.8)
-  */
---- a/lib/crypto/c_src/crypto_callback.h
-+++ b/lib/crypto/c_src/crypto_callback.h
-@@ -36,7 +36,11 @@ struct crypto_callbacks
-     /* openssl callbacks */
-   #ifdef OPENSSL_THREADS
-     void (*locking_function)(int mode, int n, const char *file, int line);
-+  #if OPENSSL_VERSION_NUMBER < 0x10000000
-     unsigned long (*id_function)(void);
-+  #else
-+    void (*id_function)(CRYPTO_THREADID *id);
-+  #endif
-     struct CRYPTO_dynlock_value* (*dyn_create_function)(const char *file,
-                                                       int line);
-     void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value* ptr,
---- a/lib/crypto/c_src/otp_test_engine.c
-+++ b/lib/crypto/c_src/otp_test_engine.c
-@@ -42,8 +42,10 @@
-       && !defined(OPENSSL_NO_EC) \
-       && !defined(OPENSSL_NO_ECDH) \
-       && !defined(OPENSSL_NO_ECDSA)
-+#if !defined(OPENSSL_NO_ENGINE)
- # define HAVE_EC
- #endif
-+#endif
- #if defined(HAVE_EC)
- /* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h
diff --git a/lang/golang/golang-github-agl-ed25519/Makefile b/lang/golang/golang-github-agl-ed25519/Makefile
deleted file mode 100644 (file)
index 70b500b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-github-agl-ed25519
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/agl/ed25519.git
-PKG_SOURCE_VERSION:=5312a61534124124185d41f09206b9fef1d88403
-PKG_SOURCE_DATE:=20170117
-PKG_MIRROR_HASH:=be9e9223e7a15f4c12d9f652f5a50a59c01fd1f87ee73bea0ebfd661b5a7ca9c
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=github.com/agl/ed25519
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-github-agl-ed25519-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Ed25519 signature algorithm for Go
-  URL:=https://github.com/agl/ed25519
-  DEPENDS:=$(GO_ARCH_DEPENDS) \
-    +golang-golang-x-crypto-dev
-  PKGARCH:=all
-endef
-
-define Package/golang-github-agl-ed25519-dev/description
-Ed25519 is a public-key signature system based on elliptic-curve
-cryptography.
-endef
-
-$(eval $(call GoSrcPackage,golang-github-agl-ed25519-dev))
-$(eval $(call BuildPackage,golang-github-agl-ed25519-dev))
diff --git a/lang/golang/golang-github-dchest-siphash/Makefile b/lang/golang/golang-github-dchest-siphash/Makefile
deleted file mode 100644 (file)
index 1c8404d..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-github-dchest-siphash
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/dchest/siphash/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=90c5e8ba62b64b2f76ed58c87dd50456171610049bef51fd71bc593c1744fad2
-PKG_BUILD_DIR:=$(BUILD_DIR)/siphash-$(PKG_VERSION)
-
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-PKG_LICENSE:=CC0-1.0
-PKG_LICENSE_FILES:=README.md
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=github.com/dchest/siphash
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-github-dchest-siphash-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Go implementation of SipHash-2-4
-  URL:=https://github.com/dchest/siphash
-  DEPENDS:=$(GO_ARCH_DEPENDS)
-  PKGARCH:=all
-endef
-
-define Package/golang-github-dchest-siphash-dev/description
-SipHash-2-4 is a pseudorandom function (a.k.a. keyed hash function)
-optimized for speed on short messages.
-endef
-
-$(eval $(call GoSrcPackage,golang-github-dchest-siphash-dev))
-$(eval $(call BuildPackage,golang-github-dchest-siphash-dev))
diff --git a/lang/golang/golang-golang-x-crypto/Makefile b/lang/golang/golang-golang-x-crypto/Makefile
deleted file mode 100644 (file)
index e787e04..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-crypto
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/crypto.git
-PKG_SOURCE_VERSION:=a49355c7e3f8fe157a85be2f77e6e269a0f89602
-PKG_SOURCE_DATE:=20180620
-PKG_MIRROR_HASH:=80b16b203736ac56883d0610edbc5981eb78f15b7b35d11b5ca639f7c3814214
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/crypto
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-crypto-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Go supplementary cryptography libraries
-  URL:=https://godoc.org/golang.org/x/crypto
-  DEPENDS:=$(GO_ARCH_DEPENDS) \
-    +golang-golang-x-net-dev \
-    +golang-golang-x-sys-dev
-  PKGARCH:=all
-endef
-
-define Package/golang-golang-x-crypto-dev/description
-Supplementary Go cryptography libraries.
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-crypto-dev))
-$(eval $(call BuildPackage,golang-golang-x-crypto-dev))
diff --git a/lang/golang/golang-golang-x-net/Makefile b/lang/golang/golang-golang-x-net/Makefile
deleted file mode 100644 (file)
index 979d9be..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-net
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/net.git
-PKG_SOURCE_VERSION:=afe8f62b1d6bbd81f31868121a50b06d8188e1f9
-PKG_SOURCE_DATE:=20180620
-PKG_MIRROR_HASH:=9a8bb3bf21ea60121d7e87f1bd1af9effbdcd908f758be99457653172d13eb1e
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/net
-# exclude http2/h2i to break circular dependency with golang-golang-x-crypto-dev
-# since there are no other binaries, can skip compilation
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-net-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Go supplementary network libraries
-  URL:=https://godoc.org/golang.org/x/net
-  DEPENDS:=$(GO_ARCH_DEPENDS) +golang-golang-x-text-dev
-  PKGARCH:=all
-endef
-
-define Package/golang-golang-x-net-dev/description
-Supplementary Go networking libraries.
-endef
-
-# http2/testdata/draft-ietf-httpbis-http2.xml is a non-free document
-# http2/z_spec_test.go uses http2/testdata/draft-ietf-httpbis-http2.xml
-define Package/golang-golang-x-net-dev/install
-       $(call GoPackage/Package/Install/Src,$(1))
-
-       rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/draft-ietf-httpbis-http2.xml
-       rmdir $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/testdata/
-
-       rm -f $(1)$(GO_PKG_PATH)/src/$(GO_PKG)/http2/z_spec_test.go
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-net-dev))
-$(eval $(call BuildPackage,golang-golang-x-net-dev))
diff --git a/lang/golang/golang-golang-x-sys/Makefile b/lang/golang/golang-golang-x-sys/Makefile
deleted file mode 100644 (file)
index 5350f3c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-sys
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/sys.git
-PKG_SOURCE_VERSION:=63fc586f45fe72d95d5240a5d5eb95e6503907d3
-PKG_SOURCE_DATE:=20180621
-PKG_MIRROR_HASH:=3afe7936fb9fb291ef9b9cfa88f51576cdc19abbd34240232ce284958ac7dbaf
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/sys
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-sys-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Go packages for interaction with the OS
-  URL:=https://godoc.org/golang.org/x/sys
-  DEPENDS:=$(GO_ARCH_DEPENDS)
-  PKGARCH:=all
-endef
-
-define Package/golang-golang-x-sys-dev/description
-Supplementary Go packages for low-level interactions with the operating
-system.
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-sys-dev))
-$(eval $(call BuildPackage,golang-golang-x-sys-dev))
diff --git a/lang/golang/golang-golang-x-text/Makefile b/lang/golang/golang-golang-x-text/Makefile
deleted file mode 100644 (file)
index e3b1120..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-golang-x-text
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/golang/text.git
-PKG_SOURCE_VERSION:=5cec4b58c438bd98288aeb248bab2c1840713d21
-PKG_SOURCE_DATE:=20180520
-PKG_MIRROR_HASH:=6c541a59f32f57afa54a2216045ddf16a077f8fe2e823fbbe77723eca04ddddb
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=golang.org/x/text
-# exclude gotext (and message/pipeline) to avoid dependency on golang.org/x/tools
-# since there are no other binaries, can skip compilation
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-golang-x-text-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Go text processing support
-  URL:=https://godoc.org/golang.org/x/text
-  DEPENDS:=$(GO_ARCH_DEPENDS)
-  PKGARCH:=all
-endef
-
-define Package/golang-golang-x-text-dev/description
-Supplementary Go libraries for text processing, many involving Unicode.
-endef
-
-$(eval $(call GoSrcPackage,golang-golang-x-text-dev))
-$(eval $(call BuildPackage,golang-golang-x-text-dev))
diff --git a/lang/golang/golang-torproject-pluggable-transports-goptlib/Makefile b/lang/golang/golang-torproject-pluggable-transports-goptlib/Makefile
deleted file mode 100644 (file)
index 6457408..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2018 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=golang-torproject-pluggable-transports-goptlib
-PKG_RELEASE:=1
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/goptlib.git
-PKG_SOURCE_VERSION:=7d56ec4f381e8b1aedfda360594e35a5731b5337
-PKG_SOURCE_DATE:=20180320
-PKG_MIRROR_HASH:=ec28d8882e031046efd561764e1b9119376844a1c3d4941e038cfbe32e60b058
-
-PKG_LICENSE:=CC0-1.0
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_BUILD_DEPENDS:=golang/host
-PKG_BUILD_PARALLEL:=1
-
-GO_PKG:=git.torproject.org/pluggable-transports/goptlib.git
-GO_PKG_SOURCE_ONLY:=1
-
-include $(INCLUDE_DIR)/package.mk
-include ../golang-package.mk
-
-define Package/golang-torproject-pluggable-transports-goptlib-dev
-$(call GoPackage/GoSubMenu)
-  TITLE:=Tor pluggable transports library for Go
-  URL:=https://gitweb.torproject.org/pluggable-transports/goptlib.git/
-  DEPENDS:=$(GO_ARCH_DEPENDS)
-  PKGARCH:=all
-endef
-
-define Package/golang-torproject-pluggable-transports-goptlib-dev/description
-goptlib is a library for writing Tor pluggable transports in Go.
-endef
-
-$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-goptlib-dev))
-$(eval $(call BuildPackage,golang-torproject-pluggable-transports-goptlib-dev))
index bf794fadb3a1f44c8910f9d9fddb8650d8802d31..5c6ce3b4d00e75dd7d8bdc160485a9e3632759bb 100644 (file)
@@ -11,4 +11,4 @@ endif
 
 
 GO_VERSION_MAJOR_MINOR:=1.12
-GO_VERSION_PATCH:=3
+GO_VERSION_PATCH:=5
index bb7fcb1a74d0ba3644b1b7638ccdfd7b4f7acbd8..484abd51978b780f20960433505190b29a5fe90a 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:=5c507abe8818429d74ebb650a4155d36bc3f9a725e59e76f5d6aca9690be2373
+PKG_HASH:=2aa5f088cbb332e73fc3def546800616b38d3bfe6b8713b8a6404060f22503e8
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
diff --git a/lang/lua-ev/Makefile b/lang/lua-ev/Makefile
new file mode 100644 (file)
index 0000000..42d323e
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2019 Jianhui Zhao
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lua-ev
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL=https://github.com/brimworks/lua-ev.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE=2015-8-4
+PKG_SOURCE_VERSION:=339426fbe528f11cb3cd1af69a88f06bba367981
+PKG_MIRROR_HASH:=fe138f05845d549998443628e1b63e07d797977548a30e75305085cca4b25567
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=
+
+PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/lua-ev
+  SUBMENU:=Lua
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=lua-ev
+  URL:=https://github.com/brimworks/lua-ev
+  DEPENDS:=+lua +libev
+endef
+
+define Package/lua-ev/description
+  Lua integration with libev.
+endef
+
+define Package/lua-ev/install
+       $(INSTALL_DIR) $(1)/usr/lib/lua
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ev.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,lua-ev))
index b522b512d12c2b1b01f84f23d9bb1191355ea96c..a54d750f9ae246e86b21c022fad9bf6ba3266cd4 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=1.7.0.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=23b4883aeb4fb90b2d0f338659f33a631f9df7a7e67c54115775a77d4ac3cc59
+PKG_MIRROR_HASH:=f109017711dd77d74a39bd1c0975be7edf726da0265f16496ea468481fac0b85
 PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git
 PKG_SOURCE_VERSION:=de87218e9798c4dd1a40d65403d99e9e82e1cfa0
 PKG_SOURCE_PROTO:=git
index 621cb7af69a3684e56cf4ef600f12ea141ef9e98..e6867aeeeae4a8b952e0a3072b1a2bd2c5c00877 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luasec
-PKG_VERSION:=0.7
-PKG_RELEASE:=3
+PKG_VERSION:=0.8
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)?
-PKG_HASH:=2176e95b1d2a72a3235ede5d2aa9838050feee55dade8fdbde4be7fdc66f3a31
+PKG_HASH:=80ef0f41e146c4c4914c910c992043e46f284b134574061556f040ac738f7d27
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
 
 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
diff --git a/lang/luasec/patches/010-Using-const-SSL_METHOD.patch b/lang/luasec/patches/010-Using-const-SSL_METHOD.patch
deleted file mode 100644 (file)
index ddf4d9a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-From 8212b89f1a04023b431d2fc9bc12aca02394698f Mon Sep 17 00:00:00 2001
-From: Bruno Silvestre <bruno.silvestre@gmail.com>
-Date: Fri, 29 Jun 2018 14:02:39 -0300
-Subject: [PATCH 1/3] Using 'const SSL_METHOD*'
-
-This change was introduced in OpenSSL 1.0.0.
-Start droping 0.9.8 code.
----
- src/context.c | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/src/context.c b/src/context.c
-index a2b5ae5..b9e8cda 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -29,12 +29,6 @@
- #include "ec.h"
- #endif
--#if (OPENSSL_VERSION_NUMBER >= 0x1000000fL)
--typedef const SSL_METHOD LSEC_SSL_METHOD;
--#else
--typedef       SSL_METHOD LSEC_SSL_METHOD;
--#endif
--
- /*--------------------------- Auxiliary Functions ----------------------------*/
- /**
-@@ -68,7 +62,7 @@ static int set_option_flag(const char *opt, unsigned long *flag)
- /**
-  * Find the protocol.
-  */
--static LSEC_SSL_METHOD* str2method(const char *method)
-+static const SSL_METHOD* str2method(const char *method)
- {
-   if (!strcmp(method, "any"))     return SSLv23_method();
-   if (!strcmp(method, "sslv23"))  return SSLv23_method();  // deprecated
-@@ -287,7 +281,7 @@ static int create(lua_State *L)
- {
-   p_context ctx;
-   const char *str_method;
--  LSEC_SSL_METHOD *method;
-+  const SSL_METHOD *method;
-   str_method = luaL_checkstring(L, 1);
-   method = str2method(str_method);
--- 
-2.19.1
-
diff --git a/lang/luasec/patches/020-Removing-SSLv3-support.patch b/lang/luasec/patches/020-Removing-SSLv3-support.patch
deleted file mode 100644 (file)
index ef3dc05..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 89bdc6148cd8cffb1483f4fc0aa14d636f8f5b4f Mon Sep 17 00:00:00 2001
-From: Bruno Silvestre <bruno.silvestre@gmail.com>
-Date: Fri, 29 Jun 2018 14:06:51 -0300
-Subject: [PATCH 2/3] Removing SSLv3 support
-
----
- src/config.c  | 5 -----
- src/context.c | 3 ---
- 2 files changed, 8 deletions(-)
-
-diff --git a/src/config.c b/src/config.c
-index ce74997..6939fca 100644
---- a/src/config.c
-+++ b/src/config.c
-@@ -32,11 +32,6 @@ LSEC_API int luaopen_ssl_config(lua_State *L)
-   lua_pushstring(L, "protocols");
-   lua_newtable(L);
--#ifndef OPENSSL_NO_SSL3
--  lua_pushstring(L, "sslv3");
--  lua_pushboolean(L, 1);
--  lua_rawset(L, -3);
--#endif
-   lua_pushstring(L, "tlsv1");
-   lua_pushboolean(L, 1);
-   lua_rawset(L, -3);
-diff --git a/src/context.c b/src/context.c
-index b9e8cda..d8fc8b6 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -66,9 +66,6 @@ static const SSL_METHOD* str2method(const char *method)
- {
-   if (!strcmp(method, "any"))     return SSLv23_method();
-   if (!strcmp(method, "sslv23"))  return SSLv23_method();  // deprecated
--#ifndef OPENSSL_NO_SSL3
--  if (!strcmp(method, "sslv3"))   return SSLv3_method();
--#endif
-   if (!strcmp(method, "tlsv1"))   return TLSv1_method();
- #if (OPENSSL_VERSION_NUMBER >= 0x1000100fL)
-   if (!strcmp(method, "tlsv1_1")) return TLSv1_1_method();
--- 
-2.19.1
-
diff --git a/lang/luasec/patches/030-Removing-deprecated-methods-to-select-the-protocol.patch b/lang/luasec/patches/030-Removing-deprecated-methods-to-select-the-protocol.patch
deleted file mode 100644 (file)
index 64c4501..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-From 28e247dbc53b95acf9cb716f99f13aadc4d38651 Mon Sep 17 00:00:00 2001
-From: Bruno Silvestre <bruno.silvestre@gmail.com>
-Date: Mon, 2 Jul 2018 10:31:45 -0300
-Subject: [PATCH 3/3] Removing deprecated methods to select the protocol
-
-Using TLS_method(), SSL_set_min_proto_version() and
-SSL_set_max_proto_version().
----
- src/context.c | 46 ++++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 44 insertions(+), 2 deletions(-)
-
-diff --git a/src/context.c b/src/context.c
-index d8fc8b6..d1377f1 100644
---- a/src/context.c
-+++ b/src/context.c
-@@ -59,11 +59,46 @@ static int set_option_flag(const char *opt, unsigned long *flag)
-   return 0;
- }
-+#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL)
-+
- /**
-  * Find the protocol.
-  */
--static const SSL_METHOD* str2method(const char *method)
-+static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax)
- {
-+  if (!strcmp(method, "any") || !strcmp(method, "sslv23")) {
-+    *vmin = TLS1_VERSION;
-+    *vmax = TLS1_2_VERSION;
-+    return TLS_method();
-+  }
-+  else if (!strcmp(method, "tlsv1")) {
-+    *vmin = TLS1_VERSION;
-+    *vmax = TLS1_VERSION;
-+    return TLS_method();
-+  }
-+  else if (!strcmp(method, "tlsv1_1")) {
-+    *vmin = TLS1_1_VERSION;
-+    *vmax = TLS1_1_VERSION;
-+    return TLS_method();
-+  }
-+  else if (!strcmp(method, "tlsv1_2")) {
-+    *vmin = TLS1_2_VERSION;
-+    *vmax = TLS1_2_VERSION;
-+    return TLS_method();
-+  }
-+
-+  return NULL;
-+}
-+
-+#else
-+
-+/**
-+ * Find the protocol.
-+ */
-+static const SSL_METHOD* str2method(const char *method, int *vmin, int *vmax)
-+{
-+  (void)vmin;
-+  (void)vmax;
-   if (!strcmp(method, "any"))     return SSLv23_method();
-   if (!strcmp(method, "sslv23"))  return SSLv23_method();  // deprecated
-   if (!strcmp(method, "tlsv1"))   return TLSv1_method();
-@@ -74,6 +109,8 @@ static const SSL_METHOD* str2method(const char *method)
-   return NULL;
- }
-+#endif
-+
- /**
-  * Prepare the SSL handshake verify flag.
-  */
-@@ -279,9 +316,10 @@ static int create(lua_State *L)
-   p_context ctx;
-   const char *str_method;
-   const SSL_METHOD *method;
-+  int vmin, vmax;
-   str_method = luaL_checkstring(L, 1);
--  method = str2method(str_method);
-+  method = str2method(str_method, &vmin, &vmax);
-   if (!method) {
-     lua_pushnil(L);
-     lua_pushfstring(L, "invalid protocol (%s)", str_method);
-@@ -301,6 +339,10 @@ static int create(lua_State *L)
-       ERR_reason_error_string(ERR_get_error()));
-     return 2;
-   }
-+#if (OPENSSL_VERSION_NUMBER >= 0x1010000fL)
-+  SSL_CTX_set_min_proto_version(ctx->context, vmin);
-+  SSL_CTX_set_max_proto_version(ctx->context, vmax);
-+#endif
-   ctx->mode = LSEC_MODE_INVALID;
-   ctx->L = L;
-   luaL_getmetatable(L, "SSL:Context");
--- 
-2.19.1
-
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 be75cc49d2e3a15c60c577cf2d0b2bfeb71cb78e..6cd500467422d895f30d6666722187c15d2ebdf8 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NPM_NAME:=node-hid
 PKG_NAME:=$(PKG_NPM_NAME)
 PKG_VERSION:=0.7.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
@@ -42,8 +42,9 @@ TAR_OPTIONS+= --strip-components 1
 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
 NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
 
-TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0
 
 define Build/Compile
        git init $(PKG_BUILD_DIR)
@@ -54,11 +55,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 $(PKG_BUILD_DIR)
-       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-hid/install
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..3289a0505c2c8c1b6a9d1a44b1e09dc3b96b385d 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_VERSION:=0.8.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_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:=f407732b9c1d020aa79e9d0b12f1b97e82691d6f58def2df067f790f4f640e30
 
 PKG_BUILD_DEPENDS:=node/host openzwave
 
@@ -32,7 +28,7 @@ define Package/node-mozilla-iot-gateway
   SUBMENU:=Node.js
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=Things Gateway by Mozilla
+  TITLE:=WebThings Gateway by Mozilla
   URL:=https://iot.mozilla.org/gateway/
   DEPENDS:= +libpthread +node +node-npm +libopenzwave +openzwave-config +python +python3-light +python3-pip +openssl-util
   DEPENDS+= +MOIT_enable-plugin-support:git-http
@@ -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) \
@@ -66,16 +64,16 @@ endef
 
 define Package/node-mozilla-iot-gateway/install
        $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/* $(1)/opt/mozilla-iot/gateway
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/webthings-gateway/* $(1)/opt/mozilla-iot/gateway
        $(STAGING_DIR_HOSTPKG)/bin/npm --prefix=$(1)/opt/mozilla-iot/gateway install $(1)/opt/mozilla-iot/gateway
 
        # Clean up of old build files that confuse OpenWrt's dependency checker
        $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-x64
-       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa-optional/build/Release/ursaNative.node
-       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa-optional/build/Release/obj.target/ursaNative.node
+       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa/build/Release/ursaNative.node
+       $(RM) -r $(1)/opt/mozilla-iot/gateway/node_modules/ursa/build/Release/obj.target/ursaNative.node
 
        $(INSTALL_DIR) $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/things-gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/node_sqlite3.node \
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/webthings-gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/node_sqlite3.node \
                $(1)/opt/mozilla-iot/gateway/node_modules/sqlite3/lib/binding/node-v57-linux-$(CPU)/
 
        $(INSTALL_DIR) $(1)/etc/init.d
index 87dda6e1f41c5a1d8e5bc1b8a21b23ce8941a3b6..3c77f177ad7320c79bf707b2d4cb906634b131fc 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NPM_NAME:=serialport
 PKG_NAME:=node-$(PKG_NPM_NAME)
 PKG_VERSION:=7.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
@@ -42,6 +42,9 @@ TAR_OPTIONS+= --strip-components 1
 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
 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/Compile
        $(MAKE_VARS) \
@@ -51,11 +54,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 --build-from-source $(PKG_BUILD_DIR)
-       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-serialport/install
index cd3e149ec04b1f4b34eca653c80ddfed1322b6a8..71b023bd0ad124b177e8c1e034f3bc20f0dc296e 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v8.14.1
-PKG_RELEASE:=1
+PKG_VERSION:=v8.16.0
+PKG_RELEASE:=2
 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
@@ -37,7 +37,9 @@ define Package/node
   SUBMENU:=Node.js
   TITLE:=Node.js is a platform built on Chrome's JavaScript runtime
   URL:=https://nodejs.org/
-  DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) +libstdcpp +libopenssl +zlib +libnghttp2 +libuv +libhttp-parser +USE_UCLIBC:libpthread +USE_UCLIBC:librt +NODEJS_ICU:icu
+  DEPENDS:=@(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR) @!arc @!armeb \
+          +libstdcpp +libopenssl +zlib +libnghttp2 +libuv +libhttp-parser \
+          +NODEJS_ICU:icu
 endef
 
 define Package/node/description
@@ -60,13 +62,13 @@ define Package/node-npm/description
 endef
 
 define Package/node/config
-       menu "Module Selection"
+       if PACKAGE_node
 
        config NODEJS_ICU
                bool "enable i18n features"
                default n
 
-       endmenu
+       endif
 endef
 
 NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
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]);
diff --git a/lang/node/patches/006-mips64_support.patch b/lang/node/patches/006-mips64_support.patch
new file mode 100644 (file)
index 0000000..8006245
--- /dev/null
@@ -0,0 +1,30 @@
+--- a/configure
++++ b/configure
+@@ -60,7 +60,7 @@
+ valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
+             'android', 'aix')
+-valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
++valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc',
+               'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
+ valid_arm_float_abi = ('soft', 'softfp', 'hard')
+ valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
+@@ -795,6 +795,9 @@
+   if rtn == 'mipsel' and '_LP64' in k:
+     rtn = 'mips64el'
++  if rtn == 'mips' and '_LP64' in k:
++    rtn = 'mips64'
++
+   return rtn
+@@ -877,7 +880,7 @@
+   if target_arch == 'arm':
+     configure_arm(o)
+-  elif target_arch in ('mips', 'mipsel', 'mips64el'):
++  elif target_arch in ('mips', 'mipsel', 'mips64', 'mips64el'):
+     configure_mips(o)
+   if flavor == 'aix':
index 754ed074585733e3ea539f96879ddf5be37bdb7a..ac936ba128cfed7ae6c9986073f733f4cbb312b8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-device-usb
-PKG_VERSION:=0.36
+PKG_VERSION:=0.37
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWADEJ/
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/G/GW/GWADEJ/
 PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz
-PKG_HASH:=fac2eb4f9e8db08b46d734ba8a2076598f974c274a91b248613fcecd7c9fc175
+PKG_HASH:=0dd58d9c627b3c539d07263a7b96e1de2adea3a4ddb118cdd45aa638f8702e49
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
@@ -29,7 +29,7 @@ define Package/perl-device-usb
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=libusb library wrapper
-  URL:=http://search.cpan.org/dist/Device-USB/
+  URL:=https://search.cpan.org/dist/Device-USB/
   DEPENDS:=perl +libusb-compat +perl-inline +perl-inline-c +perlbase-essential +perlbase-test
 endef
 
diff --git a/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff b/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff
deleted file mode 100644 (file)
index 9365eb4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Subject: Just assume libusb is out there
- Makefile.PL should not try to check for libusb in a given list of directories
- as the compiler might look in other places as well.
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/639677
-Forwarded: not-needed
-From: Ansgar Burchardt <ansgar@debian.org>
-Reviewed-by: gregor herrmann <gregoa@debian.org>
-Last-Update: 2013-10-28
-
---- libdevice-usb-perl.orig/Makefile.PL
-+++ libdevice-usb-perl/Makefile.PL
-@@ -21,7 +21,7 @@
-     }
- }
--unless(header_found())
-+unless(1 || header_found())
- {
-     die <<"END";
- ERROR: Can't find usb.h header.
-@@ -36,7 +36,7 @@
- END
- }
--unless(lib_found())
-+unless(1 || lib_found())
- {
-     die <<"END";
- ERROR: Can't find libusb library.
diff --git a/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.patch b/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.patch
new file mode 100644 (file)
index 0000000..9365eb4
--- /dev/null
@@ -0,0 +1,30 @@
+Subject: Just assume libusb is out there
+ Makefile.PL should not try to check for libusb in a given list of directories
+ as the compiler might look in other places as well.
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/639677
+Forwarded: not-needed
+From: Ansgar Burchardt <ansgar@debian.org>
+Reviewed-by: gregor herrmann <gregoa@debian.org>
+Last-Update: 2013-10-28
+
+--- libdevice-usb-perl.orig/Makefile.PL
++++ libdevice-usb-perl/Makefile.PL
+@@ -21,7 +21,7 @@
+     }
+ }
+-unless(header_found())
++unless(1 || header_found())
+ {
+     die <<"END";
+ ERROR: Can't find usb.h header.
+@@ -36,7 +36,7 @@
+ END
+ }
+-unless(lib_found())
++unless(1 || lib_found())
+ {
+     die <<"END";
+ ERROR: Can't find libusb library.
index 55e5cc3a3c536f417cd385340da0f5a7156aa916..552306ec47a85c4ccb52bee80a08453f9b237ce3 100644 (file)
@@ -3,7 +3,7 @@
 @@ -15,6 +15,7 @@ use Inline (
          ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ),
          NAME => 'Device::USB',
-         VERSION => '0.36',
+         VERSION => '0.37',
 +        PREFIX => 'deviceusb_',
     );
  
index c6de5b32552be7907b11ec6e8b8e79973648accd..d4189b766ee079c0a960be7db74f6e8a2e114455 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-inline
-PKG_VERSION:=0.80
+PKG_VERSION:=0.82
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY
 PKG_SOURCE:=Inline-$(PKG_VERSION).tar.gz
-PKG_HASH:=7e2bd984b1ebd43e336b937896463f2c6cb682c956cbd2c311a464363d2ccef6
+PKG_SOURCE_URL:=https://cpan.metacpan.org/authors/id/T/TI/TINITA
+PKG_HASH:=1af94a8e95e4ba4545592341c47d8d1dc45b01822b877f7d3095a438566e874b
 
-PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
+PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-$(PKG_VERSION)
@@ -32,7 +33,7 @@ define Package/perl-inline
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Write subroutines in other languages
-  URL:=http://search.cpan.org/dist/Inline/
+  URL:=https://search.cpan.org/dist/Inline/
   DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-digest +perlbase-essential +perlbase-fcntl +perlbase-file
 endef
 
diff --git a/lang/php7-pecl-redis/Makefile b/lang/php7-pecl-redis/Makefile
new file mode 100644 (file)
index 0000000..71f9ee9
--- /dev/null
@@ -0,0 +1,39 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PECL_NAME:=redis
+PECL_LONGNAME:=PHP extension for interfacing with Redis
+
+PKG_VERSION:=4.3.0
+PKG_RELEASE:=1
+PKG_HASH:=c0f04cec349960a842b60920fb8a433656e2e494eaed6e663397d67102a51ba2
+
+PKG_NAME:=php7-pecl-redis
+PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://pecl.php.net/get/
+
+PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
+
+PKG_LICENSE:=PHPv3.01
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include ../php7/pecl.mk
+
+CONFIGURE_ARGS+= \
+       --enable-redis \
+       --disable-redis-igbinary \
+       --disable-redis-lzf
+
+$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+php7-mod-hash +php7-mod-session,25))
+$(eval $(call BuildPackage,$(PKG_NAME)))
index 92709c33b2591094dec3f8be431e4e62feb8a1e5..e2e1252535f30cebb648531635569540f5ad14ba 100644 (file)
@@ -6,8 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.2.16
-PKG_RELEASE:=1
+PKG_VERSION:=7.2.17
+PKG_RELEASE:=2
 
 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 efa1fc7e0e9fa034ff439c2939c62bc5b748b7d3..0ab03fc7cfde6ab8c745db096490caea5a458e3e 100644 (file)
@@ -17,7 +17,7 @@ diff --git a/ext/date/php_date.c b/ext/date/php_date.c
 index cbe6e91..1999c83 100644
 --- a/ext/date/php_date.c
 +++ b/ext/date/php_date.c
-@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
+@@ -1016,6 +1016,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
                DATEG(timezone_valid) = 1;
                return DATEG(default_timezone);
        }
index e05c102b8c3f3fef52966b00dad06704b8e8d190..528e0f51a091d2bd8f3c72f0234ea0e099aa714b 100644 (file)
@@ -47,7 +47,7 @@ Subject: Add patch to remove build timestamps from generated binaries.
    *aix*)
 --- a/sapi/cgi/cgi_main.c
 +++ b/sapi/cgi/cgi_main.c
-@@ -2427,9 +2427,9 @@ consult the installation file that came
+@@ -2442,9 +2442,9 @@ consult the installation file that came
                                                                SG(request_info).no_headers = 1;
                                                        }
  #if ZEND_DEBUG
index 9c7552ddcc2c02e7b2dff4bda840c0edc138b4ab..9632e5762ea2b876dca3713e1d6ff25bc5187282 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ext/opcache/ZendAccelerator.c
 +++ b/ext/opcache/ZendAccelerator.c
-@@ -2456,11 +2456,6 @@ static void accel_gen_system_id(void)
+@@ -2484,11 +2484,6 @@ static void accel_gen_system_id(void)
        PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1);
        PHP_MD5Update(&context, ZEND_EXTENSION_BUILD_ID, sizeof(ZEND_EXTENSION_BUILD_ID)-1);
        PHP_MD5Update(&context, ZEND_BIN_ID, sizeof(ZEND_BIN_ID)-1);
@@ -14,7 +14,7 @@
                c = digest[i] >> 4;
 --- a/sapi/litespeed/lsapi_main.c
 +++ b/sapi/litespeed/lsapi_main.c
-@@ -1034,9 +1034,9 @@ static int cli_main( int argc, char * ar
+@@ -1057,9 +1057,9 @@ static int cli_main( int argc, char * ar
              case 'v':
                  if (php_request_startup() != FAILURE) {
  #if ZEND_DEBUG
index d2a1e91af4311a01fceebe73c00052af02f7b9df..4e50d5ef601532eabca764315ded8f6d8d436d66 100644 (file)
@@ -22,9 +22,9 @@ diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
 index b7e4835..7b6c0aa 100644
 --- a/ext/opcache/config.m4
 +++ b/ext/opcache/config.m4
-@@ -11,127 +11,13 @@ if test "$PHP_OPCACHE" != "no"; then
-     AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
-   ])
+@@ -28,127 +28,13 @@ if test "$PHP_OPCACHE" != "no"; then
+   AC_CHECK_HEADERS([unistd.h sys/uio.h])
  
 -  AC_MSG_CHECKING(for sysvipc shared memory support)
 -  AC_TRY_RUN([
index e6162cdfbbc8c22021611491ed0604c811c1c4c2..02ab057aa7550cc02a5c834f3c58b6a72bdd8f70 100644 (file)
@@ -11,7 +11,7 @@
  
 --- a/configure.ac     2016-09-20 22:26:38.000000000 +0200
 +++ b/configure.ac     2016-09-20 22:42:30.380101556 +0200
-@@ -1448,13 +1448,13 @@
+@@ -1454,13 +1454,13 @@
  INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
  CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
  
index 1346481f2cd7f3bda32d9a919153bf8c57dd5542..5b105069b51a2a50914e652a9381467f17fa2e35 100644 (file)
@@ -23,7 +23,7 @@ diff --git a/configure.ac b/configure.ac
 index cb95d86..a63354f 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1443,7 +1443,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
+@@ -1478,7 +1478,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
         php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
         strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
         network.c php_open_temporary_file.c \
@@ -166,7 +166,7 @@ diff --git a/win32/build/config.w32 b/win32/build/config.w32
 index 6cbb18b..71cf491 100644
 --- a/win32/build/config.w32
 +++ b/win32/build/config.w32
-@@ -244,7 +244,8 @@ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
+@@ -241,7 +241,8 @@ ADD_FLAG("CFLAGS_BD_ZEND", "/D ZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
  ADD_SOURCES("main", "main.c snprintf.c spprintf.c getopt.c fopen_wrappers.c \
        php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
        strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c network.c \
index 6dfbe51ef9f9da0368b34fcf56b8dc46ff94fb3a..e2db2d27ff9e8faaab24ade84c434b94f89c9a39 100644 (file)
@@ -1,26 +1,3 @@
-commit 31e53f07c26e5ac75ec2c2d99497439323dbdaf7
-Author: Philip Prindeville <philipp@redfish-solutions.com>
-Date:   Wed Jan 24 18:47:19 2018 -0700
-
-    Be consistent in clearing out in php_iconv_string()
-    
-    Also, don't bother checking returned point in error case since it
-    will always be NULL (and not require free()ing, obviously).
-
-diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
-index 35dafd4..4289242 100644
---- a/ext/iconv/iconv.c
-+++ b/ext/iconv/iconv.c
-@@ -559,6 +559,8 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
-       size_t result;
-       zend_string *ret, *out_buffer;
-+      *out = NULL;
-+
-       /*
-         This is not the right way to get output size...
-         This is not space efficient for large text.
-
 commit 3763c8f1645983b5abc37c60597e1ecc1bf89019
 Author: Philip Prindeville <philipp@redfish-solutions.com>
 Date:   Thu Jan 25 14:18:00 2018 -0700
@@ -31,7 +8,7 @@ diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
 index 4289242..807bb14 100644
 --- a/ext/iconv/iconv.c
 +++ b/ext/iconv/iconv.c
-@@ -697,6 +697,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
+@@ -699,6 +699,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
        iconv_close(cd);
  
        if (result == (size_t)(-1)) {
@@ -39,7 +16,7 @@ index 4289242..807bb14 100644
                switch (errno) {
                        case EINVAL:
                                retval = PHP_ICONV_ERR_ILLEGAL_CHAR;
-@@ -713,7 +714,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
+@@ -715,7 +716,6 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
  
                        default:
                                /* other error */
@@ -47,7 +24,7 @@ index 4289242..807bb14 100644
                                return PHP_ICONV_ERR_UNKNOWN;
                }
        }
-@@ -986,9 +986,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
+@@ -988,9 +988,6 @@ static php_iconv_err_t _php_iconv_strpos(size_t *pretval,
        err = php_iconv_string(ndl, ndl_nbytes, &ndl_buf, GENERIC_SUPERSET_NAME, enc);
  
        if (err != PHP_ICONV_ERR_SUCCESS) {
@@ -57,7 +34,7 @@ index 4289242..807bb14 100644
                return err;
        }
  
-@@ -2465,9 +2462,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
+@@ -2494,9 +2491,6 @@ PHP_NAMED_FUNCTION(php_if_iconv)
        if (err == PHP_ICONV_ERR_SUCCESS && out_buffer != NULL) {
                RETVAL_STR(out_buffer);
        } else {
diff --git a/lang/php7/patches/1020-openssl-deprecated.patch b/lang/php7/patches/1020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..b61884a
--- /dev/null
@@ -0,0 +1,169 @@
+--- a/ext/ftp/php_ftp.c
++++ b/ext/ftp/php_ftp.c
+@@ -320,12 +320,14 @@ static void ftp_destructor_ftpbuf(zend_resource *rsrc)
+ PHP_MINIT_FUNCTION(ftp)
+ {
+ #ifdef HAVE_FTP_SSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       SSL_library_init();
+       OpenSSL_add_all_ciphers();
+       OpenSSL_add_all_digests();
+       OpenSSL_add_all_algorithms();
+       SSL_load_error_strings();
++#endif
+ #endif
+       le_ftpbuf = zend_register_list_destructors_ex(ftp_destructor_ftpbuf, NULL, le_ftpbuf_name, module_number);
+--- a/ext/openssl/openssl.c
++++ b/ext/openssl/openssl.c
+@@ -683,6 +683,12 @@ static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
+       return M_ASN1_STRING_data(asn1);
+ }
++#define OpenSSL_version               OpenSSL_version
++#define OPENSSL_VERSION               OPENSSL_VERSION
++#define X509_getm_notBefore   X509_get_notBefore
++#define X509_getm_notAfter    X509_get_notAfter
++#define EVP_CIPHER_CTX_reset  EVP_CIPHER_CTX_cleanup
++
+ #if PHP_OPENSSL_API_VERSION < 0x10002
+ static int X509_get_signature_nid(const X509 *x)
+@@ -1587,7 +1593,7 @@ PHP_MINFO_FUNCTION(openssl)
+ {
+       php_info_print_table_start();
+       php_info_print_table_row(2, "OpenSSL support", "enabled");
+-      php_info_print_table_row(2, "OpenSSL Library Version", SSLeay_version(SSLEAY_VERSION));
++      php_info_print_table_row(2, "OpenSSL Library Version", OpenSSL_version(OPENSSL_VERSION));
+       php_info_print_table_row(2, "OpenSSL Header Version", OPENSSL_VERSION_TEXT);
+       php_info_print_table_row(2, "Openssl default config", default_ssl_conf_filename);
+       php_info_print_table_end();
+@@ -2361,11 +2367,11 @@ PHP_FUNCTION(openssl_x509_parse)
+       add_assoc_string(return_value, "serialNumberHex", hex_serial);
+       OPENSSL_free(hex_serial);
+-      php_openssl_add_assoc_asn1_string(return_value, "validFrom",    X509_get_notBefore(cert));
+-      php_openssl_add_assoc_asn1_string(return_value, "validTo",              X509_get_notAfter(cert));
++      php_openssl_add_assoc_asn1_string(return_value, "validFrom",    X509_getm_notBefore(cert));
++      php_openssl_add_assoc_asn1_string(return_value, "validTo",              X509_getm_notAfter(cert));
+-      add_assoc_long(return_value, "validFrom_time_t", php_openssl_asn1_time_to_time_t(X509_get_notBefore(cert)));
+-      add_assoc_long(return_value, "validTo_time_t",  php_openssl_asn1_time_to_time_t(X509_get_notAfter(cert)));
++      add_assoc_long(return_value, "validFrom_time_t", php_openssl_asn1_time_to_time_t(X509_getm_notBefore(cert)));
++      add_assoc_long(return_value, "validTo_time_t",  php_openssl_asn1_time_to_time_t(X509_getm_notAfter(cert)));
+       tmpstr = (char *)X509_alias_get0(cert, NULL);
+       if (tmpstr) {
+@@ -3455,8 +3461,8 @@ PHP_FUNCTION(openssl_csr_sign)
+               php_openssl_store_errors();
+               goto cleanup;
+       }
+-      X509_gmtime_adj(X509_get_notBefore(new_cert), 0);
+-      X509_gmtime_adj(X509_get_notAfter(new_cert), 60*60*24*(long)num_days);
++      X509_gmtime_adj(X509_getm_notBefore(new_cert), 0);
++      X509_gmtime_adj(X509_getm_notAfter(new_cert), 60*60*24*(long)num_days);
+       i = X509_set_pubkey(new_cert, key);
+       if (!i) {
+               php_openssl_store_errors();
+@@ -6072,7 +6078,7 @@ PHP_FUNCTION(openssl_seal)
+       /* allocate one byte extra to make room for \0 */
+       buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx));
+-      EVP_CIPHER_CTX_cleanup(ctx);
++      EVP_CIPHER_CTX_reset(ctx);
+       if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 ||
+                       !EVP_SealUpdate(ctx, buf, &len1, (unsigned char *)data, (int)data_len) ||
+@@ -6622,7 +6628,7 @@ PHP_FUNCTION(openssl_encrypt)
+       if (free_iv) {
+               efree(iv);
+       }
+-      EVP_CIPHER_CTX_cleanup(cipher_ctx);
++      EVP_CIPHER_CTX_reset(cipher_ctx);
+       EVP_CIPHER_CTX_free(cipher_ctx);
+ }
+ /* }}} */
+@@ -6709,7 +6715,7 @@ PHP_FUNCTION(openssl_decrypt)
+       if (base64_str) {
+               zend_string_release(base64_str);
+       }
+-      EVP_CIPHER_CTX_cleanup(cipher_ctx);
++      EVP_CIPHER_CTX_reset(cipher_ctx);
+       EVP_CIPHER_CTX_free(cipher_ctx);
+ }
+ /* }}} */
+--- a/ext/openssl/xp_ssl.c
++++ b/ext/openssl/xp_ssl.c
+@@ -56,8 +56,21 @@
+ #define HAVE_SSL3 1
+ #endif
++#if PHP_OPENSSL_API_VERSION >= 0x10100
++#define HAVE_TLS 1
++#endif
++
++#ifndef OPENSSL_NO_TLS1_METHOD
++#define HAVE_TLS1 1
++#endif
++
++#ifndef OPENSSL_NO_TLS1_1_METHOD
+ #define HAVE_TLS11 1
++#endif
++
++#ifndef OPENSSL_NO_TLS1_2_METHOD
+ #define HAVE_TLS12 1
++#endif
+ #ifndef OPENSSL_NO_ECDH
+ #define HAVE_ECDH 1
+@@ -78,9 +91,10 @@
+ #define STREAM_CRYPTO_IS_CLIENT            (1<<0)
+ #define STREAM_CRYPTO_METHOD_SSLv2         (1<<1)
+ #define STREAM_CRYPTO_METHOD_SSLv3         (1<<2)
+-#define STREAM_CRYPTO_METHOD_TLSv1_0       (1<<3)
+-#define STREAM_CRYPTO_METHOD_TLSv1_1       (1<<4)
+-#define STREAM_CRYPTO_METHOD_TLSv1_2       (1<<5)
++#define STREAM_CRYPTO_METHOD_TLS           (1<<3)
++#define STREAM_CRYPTO_METHOD_TLSv1_0       (1<<4)
++#define STREAM_CRYPTO_METHOD_TLSv1_1       (1<<5)
++#define STREAM_CRYPTO_METHOD_TLSv1_2       (1<<6)
+ /* Simplify ssl context option retrieval */
+ #define GET_VER_OPT(name) \
+@@ -960,9 +974,23 @@ static const SSL_METHOD *php_openssl_select_crypto_method(zend_long method_value
+               php_error_docref(NULL, E_WARNING,
+                               "SSLv3 unavailable in the OpenSSL library against which PHP is linked");
+               return NULL;
++#endif
++      } else if (method_value == STREAM_CRYPTO_METHOD_TLS) {
++#ifdef HAVE_TLS
++              return is_client ? TLS_client_method() : TLS_server_method();
++#else
++              php_error_docref(NULL, E_WARNING,
++                              "TLS unavailable in the OpenSSL library against which PHP is linked");
++              return NULL;
+ #endif
+       } else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_0) {
++#ifdef HAVE_TLS1
+               return is_client ? TLSv1_client_method() : TLSv1_server_method();
++#else
++              php_error_docref(NULL, E_WARNING,
++                              "TLSv1 unavailable in the OpenSSL library against which PHP is linked");
++              return NULL;
++#endif
+       } else if (method_value == STREAM_CRYPTO_METHOD_TLSv1_1) {
+ #ifdef HAVE_TLS11
+               return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
+@@ -1014,9 +1042,11 @@ static int php_openssl_get_crypto_method_ctx_flags(int method_flags) /* {{{ */
+               ssl_ctx_options |= SSL_OP_NO_SSLv3;
+       }
+ #endif
++#ifdef HAVE_TLS1
+       if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_0)) {
+               ssl_ctx_options |= SSL_OP_NO_TLSv1;
+       }
++#endif
+ #ifdef HAVE_TLS11
+       if (!(method_flags & STREAM_CRYPTO_METHOD_TLSv1_1)) {
+               ssl_ctx_options |= SSL_OP_NO_TLSv1_1;
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 fee9ee31a6f05791ea8dbda218d1c98be35b142e..698c09e0187cc8aa231ff411e1aa1566a7caaa4c 100644 (file)
@@ -1,12 +1,17 @@
 # Python packages folder
 
+:warning: **Python 2 will soon be unsupported and removed from the feed - [see below](#python-2-end-of-life)** :warning:
+
 ## Table of contents
 
 1. [Description](#description)
-2. [Introduction](#introduction)
-3. [Build considerations](#build-considerations)
-4. [General folder structure](#general-folder-structure)
-5. [Building a Python[3] package](#building-a-python3-package)
+2. [Python 2 end-of-life](#python-2-end-of-life)
+    1. [Transition policy / schedule](#transition-policy--schedule)
+3. [Introduction](#introduction)
+4. [Using Python[3] in external/other package feeds](#using-python3-in-externalother-package-feeds)
+5. [Build considerations](#build-considerations)
+6. [General folder structure](#general-folder-structure)
+7. [Building a Python[3] package](#building-a-python3-package)
     1. [PKG_BUILD_DIR](#pkg_build_dir)
     2. [PKG_UNPACK](#pkg_unpack)
     3. [Include python[3]-package.mk](#include-python3-packagemk)
@@ -21,6 +26,38 @@ This section describes specifics for the Python packages that are present in thi
 
 In terms of license, contributing guide, etc, all of that information is described in the top [README.md](README.md) file, and it applies here as well. This document attempts to cover only technical aspects of Python/Python3 packages, and maybe some explanations about how things are (and why they are as they are).
 
+## Python 2 end-of-life
+
+Python 2 will not be maintained past [1 January 2020](https://pythonclock.org/). As such, we will be transitioning Python 2 programs and libraries to Python 3, and Python 2 packages will be removed in early 2020.
+
+(Discussion for how to handle this transition can be found in [#8520](https://github.com/openwrt/packages/issues/8520).)
+
+### Transition policy / schedule
+
+A mass removal event ("The Snap") will occur on 31 March 2020, or 2 weeks before the freeze for a 20.x release, whichever is sooner. The exact date will be confirmed when the 20.x release schedule is known, or by 15 March 2020.
+
+All Python 2 packages (the Python 2 interpreter, programs that depend on Python 2, and Python 2-only libraries) will be removed during this event.
+
+Leading up to "The Snap":
+
+* In general, new Python 2 packages are no longer accepted
+  * Exceptions can be made on a case-by-case basis, given extraordinary circumstances or reasons, until 31 May 2019
+  * From 31 May 2019 onward, absolutely no new Python 2 packages will be accepted
+
+* The Python 2 interpreter will remain in the feed until "The Snap"
+  * The interpreter will continue to be updated, including the last release in January 2020 (if there is one)
+
+* Programs that depend on Python 2 will be transitioned to Python 3 (see [#8893](https://github.com/openwrt/packages/issues/8893))
+  * If a program cannot be transitioned, a suitable replacement will be found
+  * If a replacement cannot be found, the program will be removed during "The Snap"
+
+* Python 2 libraries will remain in the feed until "The Snap"
+  * A Python 2-only library will be transitioned to Python 3 (or a suitable replacement found), if its Python 3 version is a dependency of another package in the feed
+  * Python 2 libraries will receive normal updates until 31 October 2019
+  * From 31 October 2019 onward:
+    * Python 2-only libraries will receive security updates only
+    * Python 2 libraries that share the same Makefile as their Python 3 version will continue to receive normal updates
+
 ## Introduction
 
 This sub-tree came to exist after a number of contributions (Python packages) were made to this repo, and the [lang](lang) subtree grew to a point where a decision was made to move all Python packages under [lang/python](lang/python).
@@ -29,6 +66,43 @@ It contains the 2 Python interpreters (Python & Python3) and Python packages. Mo
 
 If more packages (than the ones packaged here) are needed, they can be downloaded via [pip or pip3](https://pip.pypa.io). Note that the versions of `pip` & `setuptools` [available in this repo] are the ones that are packaged inside the Python & Python3 packages (yes, Python & Python3 come packaged with `pip` & `setuptools`).
 
+## Using Python[3] in external/other package feeds
+
+In the feeds.conf (or feeds.conf.default file, whatever is preferred), the packages repo should be present.
+
+Example
+```
+src-git packages https://git.openwrt.org/feed/packages.git
+src-git luci https://git.openwrt.org/project/luci.git
+src-git routing https://git.openwrt.org/feed/routing.git
+src-git telephony https://git.openwrt.org/feed/telephony.git
+#
+#
+src-git someotherfeed https://github.com/<github-user>/<some-other-package>
+```
+
+Assuming that there are Python packages in the `<some-other-package>`, they should include `python[3]-package.mk` like this:
+```
+include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
+include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
+```
+
+Same rules apply for `python[3]-package.mk` as the Python packages in this repo.
+And if only 1 of `python-package.mk` or `python3-package.mk` is needed, then only the needed mk file should be included (though it's not an issue if both are included).
+
+**One important consideration:**: if the local name is not `packages`, it's something else, like `openwrt-packages`. And in `feeds.conf[.default]` it's:
+```
+src-git openwrt-packages https://git.openwrt.org/feed/packages.git
+```
+
+Then, the inclusions also change:
+```
+include $(TOPDIR)/feeds/openwrt-packages/lang/python/python-package.mk
+include $(TOPDIR)/feeds/openwrt-packages/lang/python/python3-package.mk
+```
+
+Each maintainer[s] of external packages feeds is responsible for the local name, and relative inclusion path back to this feed (which is named `packages` by default).
+
 ## Build considerations
 
 In order to build the Python[3] interpreters, a host Python/Python3 interpreter needs to be built, in order to process some of the build for the target Python/Python3 build. The host Python[3] interpreters are also needed so that Python bytecodes are generated, so the host interpreters need to be the exact versions as on the target. And finally, the host Python[3] interpreters also provide pip & pip3, so that they may be used to install some Python[3] packages that are required to build other Python[3] packages.
@@ -152,13 +226,16 @@ endef
 ```
 
 Some considerations here (based on the example above):
-* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` ; that's because `python3-codecs` doesn't exist and is included in `python3-base` ; most of the times they are similar, sometimes they are not
+* be sure to make sure that `DEPENDS` are correct for both variants; as seen in the example above, `python-codecs` is needed only for `python-lxml` (see **[note-encodings](#note-encodings)**)
 * consider adding conditional DEPENDS for each variant ; so for each Python[3] package add `+PACKAGE_python-lxml:<dep>` as seen in the above example ; the reason for this is build-time reduction ; if you want to build Python3 only packages, this won't build Python & Python packages + dependencies ; this is a known functionality of OpenWrt build deps
   * there is an exception to the above consideration: if adding `+PACKAGE_python-lxml` conditional deps creates circular dependencies [for some weird reason], then this can be omitted
 * `VARIANT=python` or `VARIANT=python3` must be added
 * typically each variant package is named `Package/python3-<something>` & `Package/python3-<something>` ; this convention makes things easier to follow, though it could work without naming things this this
 * `TITLE` can be something a bit more verbose/neat ; typically the name is short as seen above
 
+<a name="note-encodings">**note-encodings**</a>: That's because some character encodings are needed, which are present in `python3-base` but not in `python-light` (but are present in `python-codecs`) ; this is because Python3 is designed to be more Unicode friendly than Python2 (it's one of the fundamental differences between the 2), and Python3 won't start without those encodings being present.
+
+
 Following these, 2 more definitions are required:
 ```
 define Package/python-lxml/description
index 0ed2d976ab890b4fa7734c03989375b284b17c00..9c5c6618170a26245097ecdbfab51faa87a1790d 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=Werkzeug
-PKG_VERSION:=0.14.1
+PKG_VERSION:=0.15.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/W/Werkzeug
-PKG_HASH:=c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c
+PKG_HASH:=0a73e8bb2ff2feecfc5d56e6f458f5b99290ef34f565ffb2665801ff7de6af7a
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
index 874e850be118b9e30a6984cea733c500a964bc4c..0f61551f9ce3c59faab86edf6f530bbbd6645bfc 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-appconf
 PKG_VERSION:=1.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/
 PKG_HASH:=6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/django-appconf
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=A helper class for handling configuration defaults of packaged apps gracefully.
   URL:=http://django-appconf.readthedocs.org/
   DEPENDS:=+python +django
index 19e0f3e787d802147edb8e39448f210eb873fa6c..36a9e91b6277aa8e95c9697b0b87387b72efdb00 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-compressor
 PKG_VERSION:=2.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/82/76/1355459f90714517c52f264aa7245b52e59a273ec16e8f8d505fa6c342f8/
 PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/
 PKG_HASH:=9616570e5b08e92fa9eadc7a1b1b49639cce07ef392fc27c74230ab08075b30f
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -24,7 +25,6 @@ define Package/django-compressor
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=Compresses linked and inline JavaScript or CSS into single cached files.
   URL:=http://django-compressor.readthedocs.org/
   DEPENDS:=+python +django
index 228882000d33a71ab8a16c5fde748ad6943f44b9..cefb9167e40ff90beac472bd33a6265da4edc4eb 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-constance
 PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-constance
 PKG_HASH:=a49735063b2c30015d2e52a90609ea9798da722ed070f091de51714758a5d018
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/django-constance
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=Django live settings with pluggable backends, including Redis.
   URL:=https://github.com/jazzband/django-constance
   DEPENDS:=+python +django
index d3796d2c853d6b2b45a5ee8d92e46180a09d3440..cd0117adfcf566a6859840372f2c6f1e3ad1806d 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-jsonfield
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/
 PKG_HASH:=6c0afd5554739365b55d86e285cf966cc3a45682fff963463364ea1f6511ca3e
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/django-jsonfield
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=JSONField for django models
   URL:=https://github.com/bradjasper/django-jsonfield
   DEPENDS:=+python +django
index 5cd813d6116d564a37c17220c2e5fb1fa1a2977d..c9517201fabf9503256ecf49d029a2dcbac34301 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-picklefield
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-picklefield
 PKG_HASH:=ce7fee5c6558fe5dc8924993d994ccde75bb75b91cd82787cbd4c92b95a69f9c
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/django-picklefield
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=Pickled object field for Django
   URL:=https://github.com/gintas/django-picklefield
   DEPENDS:=+python +django
index d97f22d7176b819d467cf95d586b9b1519ef71b4..8d94e9e977826f4a4ba1f662ed1473b75debdc09 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-postoffice
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-post_office
 PKG_HASH:=827937a944fe47cea393853069cd9315d080298c8ddb0faf787955d6aa51a030
 PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -24,7 +25,6 @@ define Package/django-postoffice
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=A Django app to monitor and send mail asynchronously, complete with template support.
   URL:=https://github.com/ui/django-postoffice
   DEPENDS:=+python +django +django-jsonfield
index 223158addf5293fc214a321f9b13cc94eb70e409..1fd3281a01b19c97ce2a3ea12a30cb8c51f9c401 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-restframework
 PKG_VERSION:=3.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/djangorestframework
 PKG_HASH:=607865b0bb1598b153793892101d881466bd5a991de12bd6229abb18b1c86136
 PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -24,7 +25,6 @@ define Package/django-restframework
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=Web APIs for Django, made easy.
   URL:=https://www.django-rest-framework.org
   DEPENDS:=+python +django
index 014f9ca1c55dead67513f9589e1fb229f11ad3c8..a55e266d5a3b7e9e73402f06498f3e82d3df747c 100644 (file)
@@ -8,13 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-simple-captcha
-PKG_VERSION:=0.5.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.5.11
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
 PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/${PKG_NAME}
-PKG_HASH:=0c30a14f02502119fd1a4d308dd5d2b899d0f4284825a396bbb010afd904754a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/$(PKG_NAME)
+PKG_HASH:=e14e5c4b207be3dffb200309e7ac7a48de1a2b3293f09eefedd9ab317c4d9a7f
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +26,6 @@ define Package/django-simple-captcha
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
   TITLE:=A very simple, yet powerful, Django captcha application
   URL:=https://github.com/mbi/django-simple-captcha
   DEPENDS:=+python +python-six +django +pillow +django-ranged-response
index ee0064699885e904af23ce6419b8bfe5b36771be..1c4c918916f6cc8bd8be85748014e2d3d7242c4d 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django-statici18n
 PKG_VERSION:=1.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/django-statici18n
 PKG_HASH:=ba9eeb3c4517027922645999359f8335fbb9fea04c457123cfbd6b4a36cbeda4
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/django-statici18n
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=A Django app that provides helper for generating JavaScript catalog to static files.
   URL:=https://django-statici18n.readthedocs.org/
   DEPENDS:=+python +django
index 180d5e1373a2f19adf38064841f385a9c115d2f4..23a07585ab568cfe1b5766020c70495576a1eeef 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=django
 PKG_VERSION:=1.11.17
-PKG_RELEASE=1
+PKG_RELEASE=3
 
 PKG_SOURCE:=Django-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/D/Django
 PKG_HASH:=a787ee66f4b4cf8ed753661cabcec603989677fa3a107fcb7f15511a44bdb483
 PKG_BUILD_DIR=$(BUILD_DIR)/Django-$(PKG_VERSION)
 
-PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE LICENSE.python
 PKG_CPE_ID:=cpe:/a:djangoproject:django
@@ -30,7 +30,7 @@ define Package/django
     CATEGORY:=Languages
     TITLE:=The web framework for perfectionists with deadlines.
     URL:=https://www.djangoproject.com/
-    DEPENDS:=+python
+    DEPENDS:=+python +python-pytz
 endef
 
 define Package/django/description
diff --git a/lang/python/et_xmlfile/Makefile b/lang/python/et_xmlfile/Makefile
deleted file mode 100644 (file)
index ae70681..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=et_xmlfile
-PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/
-PKG_HASH:=614d9722d572f6246302c4491846d2c393c199cfa4edc9af593437691683335b
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/et_xmlfile
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-  TITLE:=An implementation of lxml.xmlfile for the standard library
-  URL:=https://bitbucket.org/openpyxl/et_xmlfile
-  DEPENDS:=+python
-endef
-
-define Package/et_xmlfile/description
-  An implementation of lxml.xmlfile for the standard library
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/et_xmlfile/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,et_xmlfile))
index aefb6ffe9e0a6cdb9fac2952621219ee9672fa1a..099828dc3ed68e32a222df25271bbbc008e2da76 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flup
 PKG_VERSION:=1.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/flup
 PKG_HASH:=5eb09f26eb0751f8380d8ac43d1dfb20e1d42eca0fa45ea9289fa532a79cd159
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/flup
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=Random assortment of WSGI servers
   URL:=https://www.saddi.com/software/flup/
   DEPENDS:=+python
index 779615d4a774d8e30e715fa75821e9fbb019555a..2aa87f4785942861589d7cea345b776912e6e97e 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gunicorn
 PKG_VERSION:=19.9.0
-PKG_RELEASE=1
+PKG_RELEASE=2
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gunicorn
 PKG_HASH:=fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -24,7 +25,6 @@ define Package/gunicorn
     SECTION:=lang
     CATEGORY:=Languages
     TITLE:=WSGI HTTP Server for UNIX
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://gunicorn.org
     DEPENDS:=+python +python-setuptools
 endef
diff --git a/lang/python/jdcal/Makefile b/lang/python/jdcal/Makefile
deleted file mode 100644 (file)
index e6c5e5f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2007-2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=jdcal
-PKG_VERSION:=1.4
-PKG_RELEASE:=1
-PKG_LICENSE:=BSD-3-Clause
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jdcal
-PKG_HASH:=ea0a5067c5f0f50ad4c7bdc80abad3d976604f6fb026b0b3a17a9d84bb9046c9
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/jdcal
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-  TITLE:=Julian dates from proleptic Gregorian and Julian calendars.
-  URL:=https://github.com/phn/jdcal
-  DEPENDS:=+python
-endef
-
-define Package/jdcal/description
-  Julian dates from proleptic Gregorian and Julian calendars.
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/jdcal/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,jdcal))
index 4d9479348960399bbe8303fe45e8997820b95276..6837def20054a139651196e5575b305080443e93 100644 (file)
@@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openpyxl
 PKG_VERSION:=2.5.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/openpyxl
 PKG_HASH:=022c0f3fa1e873cc0ba20651c54dd5e6276fc4ff150b4060723add4fc448645e
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -23,7 +24,6 @@ define Package/openpyxl
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files
   URL:=https://openpyxl.readthedocs.org/
   DEPENDS:=+python +django
index 831ba8b5f0e1ab028312bb62dce4f29dd0826704..0495579a2b28ee01ba9d5b84d4bc0365e36aa953 100644 (file)
@@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pillow
 PKG_VERSION:=5.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=Pillow-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Pillow
 PKG_HASH:=2ea3517cd5779843de8a759c2349a3cd8d3893e03ab47053b66d5ec6f8bc4f93
 PKG_BUILD_DIR:=$(BUILD_DIR)/Pillow-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 PKG_LICENSE:=CUSTOM
 PKG_LICENSE_FILES:=LICENSE
@@ -26,7 +27,6 @@ define Package/pillow
     SECTION:=lang
     CATEGORY:=Languages
     TITLE:=The friendly PIL fork
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://python-pillow.org/
     DEPENDS:=+python +libfreetype +libjpeg +zlib +libtiff
 endef
diff --git a/lang/python/python-awscli/Makefile b/lang/python/python-awscli/Makefile
new file mode 100644 (file)
index 0000000..d52faac
--- /dev/null
@@ -0,0 +1,71 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=awscli
+PKG_VERSION:=1.16.75
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/awscli
+PKG_HASH:=8d96ec0de325ea8271cc6aa95b7392bbf548ec4aabd3ffbcdc0619b64edd4a45
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-awscli-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-awscli/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=awscli
+  URL:=https://github.com/aws/aws-cli
+endef
+
+define Package/python-awscli
+$(call Package/python-awscli/Default)
+  DEPENDS:=+python \
+       +python-yaml \
+       +python-pyasn1 \
+       +python-botocore \
+       +python-rsa \
+       +python-colorama \
+       +python-docutils \
+       +python-s3transfer
+  VARIANT:=python
+endef
+
+define Package/python3-awscli
+$(call Package/python-awscli/Default)
+  DEPENDS:=+python3 \
+       +python3-yaml \
+       +python3-pyasn1 \
+       +python3-botocore \
+       +python3-rsa \
+       +python3-colorama \
+       +python3-docutils \
+       +python3-s3transfer
+  VARIANT:=python3
+endef
+
+define Package/python-awscli/description
+This package provides a unified command line interface to Amazon Web Services.
+endef
+
+define Package/python3-awscli/description
+$(call Package/python-awscli/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-awscli))
+$(eval $(call BuildPackage,python-awscli))
+$(eval $(call BuildPackage,python-awscli-src))
+
+$(eval $(call Py3Package,python3-awscli))
+$(eval $(call BuildPackage,python3-awscli))
+$(eval $(call BuildPackage,python3-awscli-src))
diff --git a/lang/python/python-boto3/Makefile b/lang/python/python-boto3/Makefile
new file mode 100644 (file)
index 0000000..160cf40
--- /dev/null
@@ -0,0 +1,39 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=boto3
+PKG_VERSION:=1.9.135
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/boto3
+PKG_HASH:=5e5805992e873e5687b5ef3b4c56c386ccb4df1c3364f8b8601d289e2f275be1
+PKG_BUILD_DIR:=$(BUILD_DIR)/boto3-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-boto3
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=AWS SDK for Python (Boto3)
+  URL:=https://aws.amazon.com/sdk-for-python/
+  DEPENDS:=+python3 \
+       +python3-jmespath \
+       +python3-botocore \
+       +python3-s3transfer
+  VARIANT:=python3
+endef
+
+define Package/python3-boto3/description
+Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python,
+which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2.
+endef
+
+$(eval $(call Py3Package,python3-boto3))
+$(eval $(call BuildPackage,python3-boto3))
+$(eval $(call BuildPackage,python3-boto3-src))
diff --git a/lang/python/python-botocore/Makefile b/lang/python/python-botocore/Makefile
new file mode 100644 (file)
index 0000000..6ebc616
--- /dev/null
@@ -0,0 +1,68 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=botocore
+PKG_VERSION:=1.12.66
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/botocore
+PKG_HASH:=25c39ecc71356287cf79d66981ec77deca374e28043b19b2f818d48aa34272a1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-botocore-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-botocore/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=botocore
+  URL:=https://github.com/boto/botocore
+endef
+
+define Package/python-botocore
+$(call Package/python-botocore/Default)
+  DEPENDS:=+python \
+       +python-urllib3 \
+       +python-docutils \
+       +python-dateutil \
+       +python-jmespath \
+       +python-requests
+  VARIANT:=python
+endef
+
+define Package/python3-botocore
+$(call Package/python-botocore/Default)
+  DEPENDS:=+python3 \
+       +python3-urllib3 \
+       +python3-docutils \
+       +python3-dateutil \
+       +python3-jmespath \
+       +python3-requests
+  VARIANT:=python3
+endef
+
+define Package/python-botocore/description
+A low-level interface to a growing number of Amazon Web Services.
+The botocore package is the foundation for the AWS CLI as well as boto3.
+endef
+
+define Package/python3-botocore/description
+$(call Package/python-botocore/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-botocore))
+$(eval $(call BuildPackage,python-botocore))
+$(eval $(call BuildPackage,python-botocore-src))
+
+$(eval $(call Py3Package,python3-botocore))
+$(eval $(call BuildPackage,python3-botocore))
+$(eval $(call BuildPackage,python3-botocore-src))
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)
 
diff --git a/lang/python/python-colorama/Makefile b/lang/python/python-colorama/Makefile
new file mode 100644 (file)
index 0000000..815708c
--- /dev/null
@@ -0,0 +1,58 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=colorama
+PKG_VERSION:=0.4.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/colorama
+PKG_HASH:=05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-colorama-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-colorama/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=colorama
+  URL:=https://github.com/tartley/colorama
+endef
+
+define Package/python-colorama
+$(call Package/python-colorama/Default)
+  DEPENDS:=+python
+  VARIANT:=python
+endef
+
+define Package/python3-colorama
+$(call Package/python-colorama/Default)
+  DEPENDS:=+python3
+  VARIANT:=python3
+endef
+
+define Package/python-colorama/description
+Makes ANSI escape character sequences
+(for producing colored terminal text and cursor positioning) work under MS Windows.
+endef
+
+define Package/python3-colorama/description
+$(call Package/python-colorama/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-colorama))
+$(eval $(call BuildPackage,python-colorama))
+$(eval $(call BuildPackage,python-colorama-src))
+
+$(eval $(call Py3Package,python3-colorama))
+$(eval $(call BuildPackage,python3-colorama))
+$(eval $(call BuildPackage,python3-colorama-src))
index aa90a5c198bb7e24c750ebc4ea399de32f6e545e..7a211e5b0cfcdb3d3a0527fec987473d1c23fff8 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-dateutil
 PKG_VERSION:=2.7.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=BSD-2-Clause
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-dateutil
 PKG_HASH:=88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dateutil-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -28,7 +29,6 @@ define Package/python-dateutil/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=Extensions to the standard Python datetime module
   URL:=https://dateutil.readthedocs.org/
 endef
diff --git a/lang/python/python-docutils/Makefile b/lang/python/python-docutils/Makefile
new file mode 100644 (file)
index 0000000..f7bbe32
--- /dev/null
@@ -0,0 +1,62 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=docutils
+PKG_VERSION:=0.14
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/docutils
+PKG_HASH:=51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-docutils-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-docutils/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=docutils
+  URL:=http://docutils.sourceforge.net
+endef
+
+define Package/python-docutils
+$(call Package/python-docutils/Default)
+  DEPENDS:=+python
+  VARIANT:=python
+endef
+
+define Package/python3-docutils
+$(call Package/python-docutils/Default)
+  DEPENDS:=+python3
+  VARIANT:=python3
+endef
+
+define Package/python-docutils/description
+Docutils is a modular system for processing documentation into useful formats,
+such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText,
+an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax.
+endef
+
+define Package/python3-docutils/description
+$(call Package/python-docutils/description)
+.
+(Variant for Python3)
+endef
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_ARGS:=
+
+$(eval $(call PyPackage,python-docutils))
+$(eval $(call BuildPackage,python-docutils))
+$(eval $(call BuildPackage,python-docutils-src))
+
+$(eval $(call Py3Package,python3-docutils))
+$(eval $(call BuildPackage,python3-docutils))
+$(eval $(call BuildPackage,python3-docutils-src))
index b9d14e887d2b504a3f32909ff29ced942810e22e..6f062d1c55ee28c7020e0ca97cc75924890684d3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=python-evdev
-PKG_VERSION:=1.1.2
+PKG_VERSION:=1.2.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=BSD-3-Clause
@@ -17,7 +17,7 @@ PKG_MAINTAINER:=Paulo Costa <me@paulo.costa.nom.br>, Alexandru Ardelean <ardelea
 
 PKG_SOURCE:=evdev-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/evdev
-PKG_HASH:=2dd67291be20e70643e8ef6f2381efc10e0c6e44a32abb3c1db74996ea3b0351
+PKG_HASH:=b03f5e1be5b4a5327494a981b831d251a142b09e8778eda1a8b53eba91100166
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION)
 
@@ -63,19 +63,14 @@ $(call Package/python-evdev/description)
 (Variant for Python3)
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,, build \
-               build_ecodes  --evdev-headers="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" \
-               build_ext \
-               install --root="$(PKG_INSTALL_DIR)" --prefix="/usr")
-endef
+LINUX_EVDEV_HEADERS="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h"
 
-define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,, build \
-               build_ecodes  --evdev-headers="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h" \
-               build_ext \
-               install --root="$(PKG_INSTALL_DIR)" --prefix="/usr")
-endef
+PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \
+       build build_ecodes \
+       --evdev-headers="$(LINUX_EVDEV_HEADERS)" \
+       build_ext
+
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
 
 $(eval $(call PyPackage,python-evdev))
 $(eval $(call BuildPackage,python-evdev))
diff --git a/lang/python/python-futures/Makefile b/lang/python/python-futures/Makefile
new file mode 100644 (file)
index 0000000..b8b19f5
--- /dev/null
@@ -0,0 +1,38 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=futures
+PKG_VERSION:=3.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/f/futures
+PKG_HASH:=9ec02aa7d674acb8618afb127e27fde7fc68994c0437ad759fa094a574adb265
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-futures-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-futures
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=futures
+  URL:=https://github.com/agronholm/pythonfutures
+  DEPENDS:=+python
+  VARIANT:=python
+endef
+
+define Package/python-futures/description
+  This is a backport of the concurrent.futures standard library module to Python 2.
+  It should not be installed on Python 3, although there should be no harm in doing so,
+  as the standard library takes precedence over third party libraries.
+endef
+
+$(eval $(call PyPackage,python-futures))
+$(eval $(call BuildPackage,python-futures))
+$(eval $(call BuildPackage,python-futures-src))
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)
 
diff --git a/lang/python/python-ifaddr/Makefile b/lang/python/python-ifaddr/Makefile
new file mode 100644 (file)
index 0000000..14fb960
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-ifaddr
+PKG_VERSION:=0.1.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ifaddr-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/ifaddr/
+PKG_HASH:=c19c64882a7ad51a394451dabcbbed72e98b5625ec1e79789924d5ea3e3ecb93
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ifaddr-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-ifaddr
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Enumerate IP addresses on network adapters
+  URL:=https://github.com/pydron/ifaddr
+  DEPENDS:= \
+       +python3-light \
+       +python3-ctypes
+  VARIANT:=python3
+endef
+
+define Package/python3-ifaddr/description
+  ifaddr is a small Python library that allows you to find all the IPv4 and IPv6 addresses of the computer.
+endef
+
+$(eval $(call Py3Package,python3-ifaddr))
+$(eval $(call BuildPackage,python3-ifaddr))
+$(eval $(call BuildPackage,python3-ifaddr-src))
diff --git a/lang/python/python-jmespath/Makefile b/lang/python/python-jmespath/Makefile
new file mode 100644 (file)
index 0000000..0e4c309
--- /dev/null
@@ -0,0 +1,58 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jmespath
+PKG_VERSION:=0.9.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/j/jmespath
+PKG_HASH:=6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-jmespath-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-jmespath/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=jmespath
+  URL:=https://github.com/jmespath/jmespath.py
+endef
+
+define Package/python-jmespath
+$(call Package/python-jmespath/Default)
+  DEPENDS:=+python
+  VARIANT:=python
+endef
+
+define Package/python3-jmespath
+$(call Package/python-jmespath/Default)
+  DEPENDS:=+python3
+  VARIANT:=python3
+endef
+
+define Package/python-jmespath/description
+  JMESPath (pronounced “james path”) allows you to declaratively specify how to extract
+  elements from a JSON document.
+endef
+
+define Package/python3-jmespath/description
+$(call Package/python-jmespath/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-jmespath))
+$(eval $(call BuildPackage,python-jmespath))
+$(eval $(call BuildPackage,python-jmespath-src))
+
+$(eval $(call Py3Package,python3-jmespath))
+$(eval $(call BuildPackage,python3-jmespath))
+$(eval $(call BuildPackage,python3-jmespath-src))
index a56bfc3086e5f60d65e49c714e4bc99840476251..3ad98165d1ee52a0bf4d28122dbe48e477d525db 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-mysql
 PKG_VERSION:=1.3.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
 PKG_HASH:=3981ae9ce545901a36a8b7aed76ed02960a429f75dc53b7ad77fb2f9ab7cd56b
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -30,7 +31,6 @@ define Package/python-mysql/Default
   SECTION:=lang
   CATEGORY:=Languages
   URL:=https://pypi.python.org/project/mysqlclient
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
 endef
 
 define Package/python-mysql
diff --git a/lang/python/python-netdisco/Makefile b/lang/python/python-netdisco/Makefile
new file mode 100644 (file)
index 0000000..fdcee51
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-netdisco
+PKG_VERSION:=2.6.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=netdisco-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/n/netdisco
+PKG_HASH:=2b3aca14a1807712a053f11fd80dc251dd821ee4899aefece515287981817762
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/netdisco-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.md
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-netdisco
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Discover devices on your local network
+  URL:=https://github.com/home-assistant/netdisco
+  DEPENDS:= \
+         +python3-light \
+         +python3-requests \
+         +python3-zeroconf
+  VARIANT:=python3
+endef
+
+define Package/python3-netdisco/description
+  NetDisco is a Python 3 library to discover local devices and services.
+  It allows to scan on demand or offer a service that will scan the network in the background in a set interval.
+endef
+
+$(eval $(call Py3Package,python3-netdisco))
+$(eval $(call BuildPackage,python3-netdisco))
+$(eval $(call BuildPackage,python3-netdisco-src))
index cefc2cb8693f670f6d30d6db69e216fa7ecb0e3f..1cc565f014c27a891b8d12f6166243c18be67c24 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-packages
 PKG_VERSION:=1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
@@ -66,6 +66,7 @@ CONFIG_PACKAGE_python-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python-packa
 CONFIG_PACKAGE_python-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-list-cleanup))
 CONFIG_PACKAGE_python-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-envs))
 CONFIG_PACKAGE_python-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-extra-deps))
+CONFIG_PACKAGE_python-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-index-url))
 CONFIG_PACKAGE_python-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python-packages-pip-opts))
 
 HOST_PYTHON_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON_VERSION)
@@ -88,7 +89,7 @@ HOST_PYTHON_PIP_INSTALL=$(HOST_PYTHON_PIP) install \
        --prefix=$(2) \
        --ignore-installed \
        --no-compile \
-       $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url $(CONFIG_PACKAGE_python-packages-index-url)) \
+       $(if $(CONFIG_PACKAGE_python-packages-index-url), --index-url "$(CONFIG_PACKAGE_python-packages-index-url)") \
        $(if $(CONFIG_PACKAGE_python-packages-pip-opts), $(CONFIG_PACKAGE_python-packages-pip-opts)) \
 
 HOST_PYTHON_PIP_INSTALL_HOST:=$(call HOST_PYTHON_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"")
index 300c7b8b92671d2d47b7807f6bd925b18daed478..8456a55aa27caf70ad0eb473887fa2e693ccdf95 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyasn1-modules
-PKG_VERSION:=0.2.4
-PKG_RELEASE:=2
+PKG_VERSION:=0.2.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1-modules
-PKG_HASH:=a52090e8c5841ebbf08ae455146792d9ef3e8445b21055d3a3b7ed9c712b7c7c
+PKG_HASH:=ef721f68f7951fab9b0404d42590f479e30d9005daccb1699b0a51bb4177db96
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
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 36b7302d60c6638ac38db27158fdd36f3b61643c..1b8b981b03a25236c43704a88e2cebfd373ab13a 100644 (file)
@@ -9,12 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-requests
 PKG_VERSION:=2.21.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:python-requests:requests
 
 PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests
 PKG_HASH:=502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION)
 
 PKG_CPE_ID:=cpe:/a:python-requests:requests
@@ -29,13 +34,12 @@ define Package/python-requests/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
-  URL:=http://python-requests.org/
+  TITLE:=HTTP library for Python
+  URL:=https://2.python-requests.org/
 endef
 
 define Package/python-requests
 $(call Package/python-requests/Default)
-  TITLE:=HTTP library for Python
   DEPENDS:= \
          +PACKAGE_python-requests:python \
          +PACKAGE_python-requests:python-chardet \
@@ -47,7 +51,6 @@ endef
 
 define Package/python3-requests
 $(call Package/python-requests/Default)
-  TITLE:=HTTP library for Python3
   DEPENDS:= \
          +python3-light  \
          +python3-chardet  \
@@ -58,7 +61,7 @@ $(call Package/python-requests/Default)
 endef
 
 define Package/python-requests/description
-  Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
+  Requests is the only Non-GMO HTTP library for Python, safe for human consumption
 endef
 
 define Package/python3-requests/description
diff --git a/lang/python/python-requests/patches/0001-Allow-urllib3-125x.patch b/lang/python/python-requests/patches/0001-Allow-urllib3-125x.patch
new file mode 100644 (file)
index 0000000..e004e66
--- /dev/null
@@ -0,0 +1,33 @@
+Commit in requests repository - urllib1.25 branch: https://github.com/kennethreitz/requests/commit/d6b5b401e8d6141bcefa4a70ff1c836aa085120b
+Pull request: https://github.com/kennethreitz/requests/pull/5063
+
+diff --git a/requests/__init__.py b/requests/__init__.py
+index bc168ee..9a899df 100644
+--- a/requests/__init__.py
++++ b/requests/__init__.py
+@@ -57,10 +57,10 @@ def check_compatibility(urllib3_version, chardet_version):
+     # Check urllib3 for compatibility.
+     major, minor, patch = urllib3_version  # noqa: F811
+     major, minor, patch = int(major), int(minor), int(patch)
+-    # urllib3 >= 1.21.1, <= 1.24
++    # urllib3 >= 1.21.1, <= 1.25
+     assert major == 1
+     assert minor >= 21
+-    assert minor <= 24
++    assert minor <= 25
+
+     # Check chardet for compatibility.
+     major, minor, patch = chardet_version.split('.')[:3]
+diff --git a/setup.py b/setup.py
+index 10ce2c6..0d5d0cc 100755
+--- a/setup.py
++++ b/setup.py
+@@ -44,7 +44,7 @@ packages = ['requests']
+ requires = [
+     'chardet>=3.0.2,<3.1.0',
+     'idna>=2.5,<2.9',
+-    'urllib3>=1.21.1,<1.25',
++    'urllib3>=1.21.1,<1.26,!=1.25.0',
+     'certifi>=2017.4.17'
+
+ ]
diff --git a/lang/python/python-rsa/Makefile b/lang/python/python-rsa/Makefile
new file mode 100644 (file)
index 0000000..cb84dfd
--- /dev/null
@@ -0,0 +1,59 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rsa
+PKG_VERSION:=4.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/rsa
+PKG_HASH:=1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-rsa-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-rsa/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=rsa
+  URL:=https://stuvel.eu/rsa
+endef
+
+define Package/python-rsa
+$(call Package/python-rsa/Default)
+  DEPENDS:=+python +python-pyasn1
+  VARIANT:=python
+endef
+
+define Package/python3-rsa
+$(call Package/python-rsa/Default)
+  DEPENDS:=+python3 +python3-pyasn1
+  VARIANT:=python3
+endef
+
+define Package/python-rsa/description
+  Is a pure-Python RSA implementation. It supports encryption and decryption,
+  signing and verifying signatures, and key generation according to PKCS#1 version 1.5.
+  It can be used as a Python library as well as on the commandline. 
+endef
+
+define Package/python3-rsa/description
+$(call Package/python-rsa/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-rsa))
+$(eval $(call BuildPackage,python-rsa))
+$(eval $(call BuildPackage,python-rsa-src))
+
+$(eval $(call Py3Package,python3-rsa))
+$(eval $(call BuildPackage,python3-rsa))
+$(eval $(call BuildPackage,python3-rsa-src))
diff --git a/lang/python/python-s3transfer/Makefile b/lang/python/python-s3transfer/Makefile
new file mode 100644 (file)
index 0000000..a50f1b4
--- /dev/null
@@ -0,0 +1,57 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=s3transfer
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/s3transfer
+PKG_HASH:=f23d5cb7d862b104401d9021fc82e5fa0e0cf57b7660a1331425aab0c691d021
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-s3transfer-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+PKG_LICENSE:=MIT
+
+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-s3transfer/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=s3transfer
+  URL:=https://github.com/boto/s3transfer
+endef
+
+define Package/python-s3transfer
+$(call Package/python-s3transfer/Default)
+  DEPENDS:=+python +python-botocore +python-futures
+  VARIANT:=python
+endef
+
+define Package/python3-s3transfer
+$(call Package/python-s3transfer/Default)
+  DEPENDS:=+python3 +python3-botocore
+  VARIANT:=python3
+endef
+
+define Package/python-s3transfer/description
+S3transfer is a Python library for managing Amazon S3 transfers.
+endef
+
+define Package/python3-s3transfer/description
+$(call Package/python-s3transfer/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-s3transfer))
+$(eval $(call BuildPackage,python-s3transfer))
+$(eval $(call BuildPackage,python-s3transfer-src))
+
+$(eval $(call Py3Package,python3-s3transfer))
+$(eval $(call BuildPackage,python3-s3transfer))
+$(eval $(call BuildPackage,python3-s3transfer-src))
index 354f720959f3a5495267d280f809928dc7583741..b58c7b84cda9676e7bd827933ee67f0c42649421 100644 (file)
@@ -21,7 +21,7 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
 
-HOST_BUILD_DEPENDS:=python/host
+HOST_BUILD_DEPENDS:=python3/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
@@ -65,7 +65,7 @@ $(call Package/python-six/description)
 endef
 
 define Host/Compile
-       $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
+       $(call Build/Compile/HostPy3Mod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
 endef
 
 Host/Install:=
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..c935a577371165344407d49f74f9ccfee4b8a3dc 100644 (file)
@@ -8,17 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-urllib3
-PKG_VERSION:=1.24.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.25.2
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_CPE_ID:=cpe:/a:urllib3_project:urllib3
 
 PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
-PKG_HASH:=de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22
+PKG_HASH:=a53063d8b9210a7bdec15e7b272776b9d42b2fd6816401a0d43006ad2f9902db
+
 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 +32,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 +61,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))
diff --git a/lang/python/python-zeroconf/Makefile b/lang/python/python-zeroconf/Makefile
new file mode 100644 (file)
index 0000000..8c127ae
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-zeroconf
+PKG_VERSION:=0.22.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=zeroconf-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/z/zeroconf/
+PKG_HASH:=fe66582c7b3ecc229ea4555b6d9da9bc26fc70134811e980b4fbd033e472b825
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/zeroconf-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-zeroconf
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Multicast DNS Service Discovery Library
+  URL:=https://github.com/jstasiak/python-zeroconf
+  DEPENDS:= \
+         +python3-light \
+         +python3-logging \
+         +python3-ifaddr
+  VARIANT:=python3
+endef
+
+define Package/python3-zeroconf/description
+  Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)
+endef
+
+$(eval $(call Py3Package,python3-zeroconf))
+$(eval $(call BuildPackage,python3-zeroconf))
+$(eval $(call BuildPackage,python3-zeroconf-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))
diff --git a/lang/python/python3-packages/Makefile b/lang/python/python3-packages/Makefile
new file mode 100644 (file)
index 0000000..e3c8f62
--- /dev/null
@@ -0,0 +1,134 @@
+#
+# Copyright (C) 2019 Yousong Zhou <yszhou4tech@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:=python3-packages
+PKG_VERSION:=1.0
+PKG_RELEASE:=1
+
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+#
+# NOTE: move the host module installation to Host/Compile when
+# HOST_CONFIG_DEPENDS is supported
+#
+# NOTE: PKG_CONFIG_DEPENDS cannot correctly track changes of string type config
+# options, so you may want to do manual cleanup on config change.
+#
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_PACKAGE_python3-packages-list-host \
+       CONFIG_PACKAGE_python3-packages-list \
+       CONFIG_PACKAGE_python3-packages-list-cleanup \
+       CONFIG_PACKAGE_python3-packages-envs \
+       CONFIG_PACKAGE_python3-packages-extra-deps \
+       CONFIG_PACKAGE_python3-packages-index-url \
+       CONFIG_PACKAGE_python3-packages-pip-opts \
+
+PKG_BUILD_DEPENDS:=python3 python3/host
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-host.mk
+include ../python3-package.mk
+
+define Package/python3-packages
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=A dummy package for packaging python3 modules with pip
+  DEPENDS:=@DEVEL +python3
+endef
+
+define Package/python3-packages/config
+if PACKAGE_python3-packages
+config PACKAGE_python3-packages-list-host
+       string "List of python3 packages to install on host"
+config PACKAGE_python3-packages-list
+       string "List of python3 packages to install on target"
+config PACKAGE_python3-packages-list-cleanup
+       string "List of python3 packages to cleanup to avoid clash with existing packages"
+config PACKAGE_python3-packages-envs
+       string "Extra environment variables to pass on to pip and its children on target build"
+config PACKAGE_python3-packages-extra-deps
+       string "List of deps fulfilled but not tracked by the build system"
+config PACKAGE_python3-packages-index-url
+       string "Index URL passed to pip with --index-url"
+config PACKAGE_python3-packages-pip-opts
+       string "Additional arguments to pip command line"
+endif
+endef
+
+CONFIG_PACKAGE_python3-packages-list-host:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list-host))
+CONFIG_PACKAGE_python3-packages-list:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list))
+CONFIG_PACKAGE_python3-packages-list-cleanup:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-list-cleanup))
+CONFIG_PACKAGE_python3-packages-envs:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-envs))
+CONFIG_PACKAGE_python3-packages-extra-deps:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-extra-deps))
+CONFIG_PACKAGE_python3-packages-index-url:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-index-url))
+CONFIG_PACKAGE_python3-packages-pip-opts:=$(call qstrip,$(CONFIG_PACKAGE_python3-packages-pip-opts))
+
+decr=$(word $(1),0 1 2 3 4 5 6 7 8 9 10)
+recur=$(if $(subst 0,,$(2)),$(call recur,$(1),$(call decr,$(2)),$(call $(1)$(2),$(3))),$(3))
+_req2dir1=$(subst >,gt,$(1))
+_req2dir2=$(subst <,lt,$(1))
+_req2dir3=$(subst >=,geq,$(1))
+_req2dir4=$(subst <=,leq,$(1))
+_req2dir5=$(subst ://,:::,$(1))
+_req2dir6=$(subst *,_,$(1))
+_req2dir7=$(subst ?,_,$(1))
+req2dir=$(call recur,_req2dir,7,$(1))
+
+# --ignore-installed, it may happen that host pip will ignore target install if
+#  it was already installed as host module, e.g. cffi deps of cryptograph
+#
+# --no-build-isolation, this is a new addition in pip3 and is needed when build
+#  depends on host modules
+HOST_PYTHON3_PIP_INSTALL=$(HOST_PYTHON3_PIP) install \
+       --root=$(1) \
+       --prefix=$(2) \
+       --ignore-installed \
+       --no-build-isolation \
+       --no-compile \
+       $(if $(CONFIG_PACKAGE_python3-packages-index-url), --index-url "$(CONFIG_PACKAGE_python3-packages-index-url)") \
+       $(if $(CONFIG_PACKAGE_python3-packages-pip-opts), $(CONFIG_PACKAGE_python3-packages-pip-opts)) \
+
+HOST_PYTHON3_PIP_INSTALL_HOST:=$(call HOST_PYTHON3_PIP_INSTALL,$(STAGING_DIR_HOSTPKG),"")
+HOST_PYTHON3_PIP_INSTALL_TARGET=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg)),/usr)
+HOST_PYTHON3_PIP_INSTALL_CLEANUP:=$(call HOST_PYTHON3_PIP_INSTALL,$(PKG_INSTALL_DIR)/_cleanup,/usr)
+
+define Build/Compile
+       $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-host),
+               $(call Build/Compile/HostPy3RunHost,,$(HOST_PYTHON3_PIP_INSTALL_HOST) $(pkg))
+       )
+       $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list),
+               $(call Build/Compile/HostPy3RunTarget,,$(call HOST_PYTHON3_PIP_INSTALL_TARGET,$(pkg)) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
+       )
+       $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list-cleanup),
+               $(call Build/Compile/HostPy3RunTarget,,$(HOST_PYTHON3_PIP_INSTALL_CLEANUP) $(pkg),$(CONFIG_PACKAGE_python3-packages-envs))
+       )
+endef
+
+define Package/python3-packages/install
+       $(foreach pkg,$(CONFIG_PACKAGE_python3-packages-list),
+               $(CP) "$(PKG_INSTALL_DIR)/$(call req2dir,$(pkg))"/* $(1)
+       )
+
+       find "$(PKG_INSTALL_DIR)/_cleanup" -mindepth 1 -depth | while read sf; do \
+               tf="$$$${sf#$(PKG_INSTALL_DIR)/_cleanup/}"; \
+               tf="$(1)/$$$$tf"; \
+               if [ -f "$$$$tf" -o -L "$$$$tf" ]; then \
+                       rm -vf "$$$$tf"; \
+               elif [ -d "$$$$tf" ]; then \
+                       rmdir -v -p "$$$$tf" || true; \
+               fi \
+       done
+endef
+
+define Package/python3-packages/extra_provides
+       echo $(CONFIG_PACKAGE_python3-packages-extra-deps) | tr ' ' '\n'
+endef
+
+$(eval $(call BuildPackage,python3-packages))
diff --git a/lang/python/python3-packages/README.md b/lang/python/python3-packages/README.md
new file mode 100644 (file)
index 0000000..01508bc
--- /dev/null
@@ -0,0 +1,72 @@
+This package allows users to package python3 modules without creating package
+Makefiles for each individual module and their dependencies.  It provides a
+way making packaging python3 packages faster and may also facilitate the process
+of developing Makefiles for new python3 packages
+
+This is a raw DEVEL only package.  Using it may entails a lot of implementation
+details and you may need to resolve target dependencies and package details on
+your own
+
+- Third party python3 packages may depend on features not included in e.g.
+  python3-light
+- Some python3 modules may require host install of another module to progress,
+  e.g. target cryptography requires host cffi
+- Some python3 modules have external C library dependencies, e.g. pyOpenSSL
+  requires openssl libs
+- Some packages may have an autoconf configure script whose arguments we
+  cannot control with pip and has to be passed on (hacked) by overriding some
+  environment variables
+
+## How it works
+
+1. Install host modules required for building target modules
+2. Install each target module to separate directories
+3. Install another copy of modules for cleanup purposes to make list of
+   installed files to be removed from target modules installed in step 2
+
+Why should it be so
+
+1. Installing target cryptography requires host installation of cffi module
+2. cryptography requires setuptools and pip will install its own copy with
+   --ignore-installed.  When PACKAGE_python3-setuptools is also selected, opkg
+   will complain of data file clashes if it was not removed here.
+
+Pip will handle dependency requirements of python3 modules, but external
+dependencies like c libraries has to be prepared by the build system.  The
+issue is that there is currently no way to express such dependencies, thus may
+cause build failure, e.g. pycrypto requires the presence of libgmp to build
+successfully.
+
+## Tips
+
+If something goes wrong, we can add additional arguments to pip command
+line to check the detailed build process.  Some useful arguments may be
+
+- -v, for verbose output.  Repeat this option if the current level of
+  verbosity is not enough
+- --no-clean, for preserving pip build dir on build failure
+
+## Examples
+
+tornado (python-only module)
+
+       CONFIG_PACKAGE_python3-packages=y
+       CONFIG_PACKAGE_python3-packages-list="tornado==6.0.2"
+
+cryptography (requires installation of host modules and cleanup on target modules)
+
+       CONFIG_PACKAGE_python3-packages=y
+       CONFIG_PACKAGE_python3-packages-list-host="cffi"
+       CONFIG_PACKAGE_python3-packages-list="cryptography"
+       CONFIG_PACKAGE_python3-packages-list-cleanup="setuptools"
+
+pycrypto 2.7a1 (python module with autoconf configure script; depends on
+libgmp; broken wmmintrin.h).  2.6.1 does not work because of a flaw in
+the setup.py hardcoding host include directory
+
+       CONFIG_PACKAGE_libgmp=y
+       CONFIG_PACKAGE_python3-packages=y
+       CONFIG_PACKAGE_python3-packages-list="https://github.com/dlitz/pycrypto/archive/v2.7a1.tar.gz"
+       CONFIG_PACKAGE_python3-packages-envs="ac_cv_header_wmmintrin_h=no build_alias=$(GNU_HOST_NAME) host_alias=$(GNU_TARGET_NAME) target_alias=$(GNU_TARGET_NAME)"
+       CONFIG_PACKAGE_python3-packages-extra-deps="libgmp.so.10"
+
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))
diff --git a/lang/python/rcssmin/Makefile b/lang/python/rcssmin/Makefile
deleted file mode 100644 (file)
index 9b0242b..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Copyright (C) 2007-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=rcssmin
-PKG_VERSION:=1.0.6
-PKG_RELEASE=2
-PKG_LICENSE:=Apache-2.0
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/rcssmin
-PKG_HASH:=ca87b695d3d7864157773a61263e5abb96006e9ff0e021eff90cbe0e1ba18270
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/rcssmin
-    SUBMENU:=Python
-    SECTION:=lang
-    CATEGORY:=Languages
-    TITLE:=Fast CSS minifier for Python
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-    URL:=http://opensource.perlig.de/rcssmin/
-    DEPENDS:=+python
-endef
-
-define Package/rcssmin/description
-    Fast CSS minifier for Python
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-define Package/rcssmin/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,rcssmin))
index b363ce6a4f967fd94486363b864ffce11e8e8ef6..a5f40854188bdf0cdf4a0aa87253c9d079a123bd 100644 (file)
@@ -8,18 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruamel-yaml
-PKG_VERSION:=0.15.89
+PKG_VERSION:=0.15.94
 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:=0939bcb399ad037ef903d74ccf2f8a074f06683bc89133ad19305067d34487c8
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ruamel.yaml-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
diff --git a/lang/python/xmltodict/Makefile b/lang/python/xmltodict/Makefile
new file mode 100644 (file)
index 0000000..77beb2a
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-xmltodict
+PKG_VERSION:=0.12.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=xmltodict-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/x/xmltodict/
+PKG_HASH:=50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/xmltodict-$(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-xmltodict
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Work with XML like JSON
+  URL:=https://github.com/martinblech/xmltodict
+  DEPENDS:= \
+       +python3-light \
+       +python3-xml \
+       +python3-urllib
+  VARIANT:=python3
+endef
+
+define Package/python3-xmltodict/description
+  xmltodict is a Python module that makes working with XML feel like you are working with JSON.
+endef
+
+$(eval $(call Py3Package,python3-xmltodict))
+$(eval $(call BuildPackage,python3-xmltodict))
+$(eval $(call BuildPackage,python3-xmltodict-src))
index f34c4ff293a7298fb7e314067a26c86c53971fee..c5ff99075074963a36d036b59f14f03b7715265b 100644 (file)
@@ -11,7 +11,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruby
-PKG_VERSION:=2.6.2
+PKG_VERSION:=2.6.3
 PKG_RELEASE:=1
 
 # First two numbes
@@ -19,7 +19,7 @@ PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://cache.ruby-lang.org/pub/ruby/$(PKG_ABI_VERSION)/
-PKG_HASH:=91fcde77eea8e6206d775a48ac58450afe4883af1a42e5b358320beb33a445fa
+PKG_HASH:=11a83f85c03d3f0fc9b8a9b6cad1b2674f26c5aaa43ba858d4b0fcc2b54171e1
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=COPYING
index 670b385a55bd911f36bd41f0d6a478b023b00465..ed1b3ebc4a58d7342dd68d097c303bab99164775 100644 (file)
@@ -3,7 +3,7 @@
 # See /LICENSE for more information.
 #
 
-# 
+#
 # Original Boost 1.51 Makefile by Mirko Vogt <mirko@openwrt.org>
 # Dude, this "boost" is really one of the most crude stuff I ported yet.
 #
 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:=5
 
 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.
 
 -----------------------------------------------------------------------------
@@ -57,7 +57,7 @@ This package provides the following run-time libraries:
  - chrono
  - container
  - context
- - contract 
+ - contract
  - coroutine (Deprecated - use Coroutine2)
  - - coroutine2 (Requires GCC v5 and up)
  - date_time
@@ -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
@@ -142,17 +142,17 @@ define Package/boost/config
                                                 cannot be redefined by another shared library or executable. This mode is
                                                 not supported on some platforms, for example OS X.
                                        -> Hidden:
-                                               - Hidden symbols are not exported from shared libraries and cannot be 
+                                               - Hidden symbols are not exported from shared libraries and cannot be
                                                 redefined by a different shared library or executable loaded in a process.
                                                 In this mode, public symbols have to be explicitly marked in the source code
                                                 to be exported from shared libraries. This is the recommended mode.
 
                        config boost-compile-visibility-global
                                bool "Global"
-                       
+
                        config boost-compile-visibility-protected
                                bool "Protected"
-                       
+
                        config boost-compile-visibility-hidden
                                bool "Hidden"
                endchoice
@@ -171,10 +171,10 @@ define Package/boost/config
 
                        config boost-shared-libs
                                bool "Shared"
-                       
+
                        config boost-static-libs
                                bool "Static"
-                       
+
                        config boost-static-and-shared-libs
                                bool "Both"
                endchoice
@@ -189,7 +189,7 @@ define Package/boost/config
                                        - Not available if Shared libs are to be built.
                                -> Use both runtimes.
                                        - Not available if Shared libs are to be built.
-                                       - Two separate versions of Boost are built, linking each to a different runtime. 
+                                       - Two separate versions of Boost are built, linking each to a different runtime.
                                        - This option requires "Use tagged names" option to be active.
 
                        config boost-runtime-shared
@@ -197,7 +197,7 @@ define Package/boost/config
 
                        config boost-runtime-static
                                depends on @(!boost-shared-libs&&!boost-static-and-shared-libs)
-                               bool "Static"                   
+                               bool "Static"
 
                        config boost-runtime-static-and-shared
                                depends on @(boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs)
@@ -211,7 +211,7 @@ define Package/boost/config
                                Chooses which boost variant should be selected:
                                -> Release: Optimizes Boost for release.
                                        - Optimization: Speed;  Debug Symbols: Off; Inlining: Full; Runtime Debugging: Off.
-                               -> Debug: 
+                               -> Debug:
                                        - Optimization: Off; Debug Symbols: On; Inlining: Off; Runtime Debugging: On.
                                -> Profile:
                                        - Profiling: On;  Debug Symbols: On.
@@ -228,7 +228,7 @@ define Package/boost/config
 
                config boost-use-name-tags
                        bool "Use tagged names."
-                       help 
+                       help
                                Add name tags the lib files, to diferentiate each library version:
                                  "-mt" for multi-threading.
                                  "-d" for debugging.
@@ -239,14 +239,14 @@ define Package/boost/config
                config boost-single-thread
                        depends on @boost-use-name-tags
                        bool "Single thread Support."
-                       help 
+                       help
                                Compile Boost libraries in single-thread mode.
                        default n
-                           
+
                config boost-build-type-complete
                        depends on @boost-use-name-tags
                        bool "Complete Boost Build."
-                       help 
+                       help
                                Builds both release and debug libs. It will take much longer to compile.
                        default n
        endmenu
@@ -294,6 +294,16 @@ define Package/boost/config
                )
        endmenu
 
+       menu "Select Boost libraries for Host build"
+               comment  "Libraries for Host build"
+
+               $(foreach lib,$(BOOST_LIBS), \
+               config boost-host-build-$(lib)
+                       bool "Boost $(lib) $(if $(findstring python,$(lib)),$(paren_left)v$(if $(findstring 3,$(lib)),$(BOOST_PYTHON3_VER),$(BOOST_PYTHON_VER))$(paren_right) ,)library."
+                       default n
+               )
+       endmenu
+
 endef
 
 PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_boost-test
@@ -316,6 +326,7 @@ define DefineBoostLibrary
 
   BOOST_DEPENDS+= +$(if $(4),$(4):boost-$(1),boost-$(1))
   PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_boost-$(1)
+  HOST_CONFIG_DEPENDS+= CONFIG_boost-host-build-$(1)
 
   BOOST_LIBS+= $(1)
 
@@ -366,6 +377,14 @@ include $(INCLUDE_DIR)/host-build.mk
 define Host/Compile
        # b2 does not provide a configure-script nor a Makefile
        ( cd $(HOST_BUILD_DIR)/tools/build/src/engine ; ./build.sh gcc )
+
+       ( cd $(HOST_BUILD_DIR) ; \
+               ./bootstrap.sh --prefix=$(STAGING_DIR_HOST) \
+                       --with-libraries=$(subst $() $(),$(comma),$(strip \
+                               headers \
+                               $(foreach lib,$(BOOST_LIBS), \
+                                       $(if $(findstring python,$(lib)),,$(if $(CONFIG_boost-host-build-$(lib)),$(lib)))))) ; \
+               ./b2 install )
 endef
 
 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
@@ -374,7 +393,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 +411,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 +454,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 +480,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,) \
@@ -499,8 +518,8 @@ define Build/InstallDev
                # copies _all_ header files - independent of <--with-library>-argument above
 
        $(INSTALL_DIR) $(1)/usr/lib
-       # copies all compiled archive and shared object files
-       $(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/ || :
+       # copies all cmake files, compiled archive and shared object files
+       $(CP) -v $(PKG_INSTALL_DIR)/lib/{*.{a,so*},cmake} $(1)/usr/lib/ || :
 endef
 
 define Host/Install
@@ -524,7 +543,7 @@ endef
 
 define BuildBoostLibrary
   define Package/boost-$(1)/install
-    $(call Package/boost/Default/install,$$(1),$(1)) 
+    $(call Package/boost/Default/install,$$(1),$(1))
   endef
 
   $$(eval $$(call BuildPackage,boost-$(1)))
diff --git a/libs/boost/patches/010-uclibc-ng.patch b/libs/boost/patches/010-uclibc-ng.patch
new file mode 100644 (file)
index 0000000..27d93b2
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+@@ -23,11 +23,11 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <asm/unistd.h>
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <sys/eventfd.h>
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ #include <boost/asio/detail/cstdint.hpp>
+ #include <boost/asio/detail/eventfd_select_interrupter.hpp>
+ #include <boost/asio/detail/throw_error.hpp>
+@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_select_interrupter()
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+   write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+   if (read_descriptor_ != -1)
+   {
+     ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+     ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+   }
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+   write_descriptor_ = read_descriptor_ =
+     ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_descriptors()
+       ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+     }
+   }
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+   if (read_descriptor_ == -1)
+   {
diff --git a/libs/boost/patches/100-fix-apply_visitor-on-lvalue-variant.patch b/libs/boost/patches/100-fix-apply_visitor-on-lvalue-variant.patch
new file mode 100644 (file)
index 0000000..02623d9
--- /dev/null
@@ -0,0 +1,131 @@
+From cbdb354a274c8ab51a15dd43eafd02c2b6a576f0 Mon Sep 17 00:00:00 2001
+From: Edward Catmur <edward.catmur@mavensecurities.com>
+Date: Wed, 17 Apr 2019 15:05:37 +0100
+Subject: [PATCH 1/2] Copy variant cvref when determining result type
+
+Ensures that we can e.g. call apply_visitor on a lvalue variant
+---
+ boost/variant/detail/apply_visitor_unary.hpp | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/boost/variant/detail/apply_visitor_unary.hpp b/boost/variant/detail/apply_visitor_unary.hpp
+index 71610cb6..c3a741ef 100644
+--- a/boost/variant/detail/apply_visitor_unary.hpp
++++ b/boost/variant/detail/apply_visitor_unary.hpp
+@@ -23,6 +23,7 @@
+ #   include <boost/mpl/size.hpp>
+ #   include <boost/utility/declval.hpp>
+ #   include <boost/core/enable_if.hpp>
++#   include <boost/type_traits/copy_cv_ref.hpp>
+ #   include <boost/type_traits/remove_reference.hpp>
+ #   include <boost/variant/detail/has_result_type.hpp>
+ #endif
+@@ -85,7 +86,7 @@ namespace detail { namespace variant {
+ // This class serves only metaprogramming purposes. none of its methods must be called at runtime!
+ template <class Visitor, class Variant>
+ struct result_multideduce1 {
+-    typedef typename Variant::types                 types;
++    typedef typename remove_reference<Variant>::type::types types;
+     typedef typename boost::mpl::begin<types>::type begin_it;
+     typedef typename boost::mpl::advance<
+         begin_it, boost::mpl::int_<boost::mpl::size<types>::type::value - 1>
+@@ -95,14 +96,14 @@ struct result_multideduce1 {
+     struct deduce_impl {
+         typedef typename boost::mpl::next<It>::type next_t;
+         typedef typename boost::mpl::deref<It>::type value_t;
+-        typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() )
++        typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )
+                               : boost::declval< typename deduce_impl<next_t>::type >()) type;
+     };
+     template <class Dummy>
+     struct deduce_impl<last_it, Dummy> {
+         typedef typename boost::mpl::deref<last_it>::type value_t;
+-        typedef decltype(boost::declval< Visitor& >()( boost::declval< value_t >() )) type;
++        typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type;
+     };
+     typedef typename deduce_impl<begin_it>::type type;
+@@ -132,7 +133,7 @@ inline decltype(auto) apply_visitor(Visitor&& visitor, Visitable&& visitable,
+         boost::detail::variant::has_result_type<Visitor>
+     >::type* = 0)
+ {
+-    boost::detail::variant::result_wrapper1<Visitor, typename remove_reference<Visitable>::type> cpp14_vis(::boost::forward<Visitor>(visitor));
++    boost::detail::variant::result_wrapper1<Visitor, Visitable> cpp14_vis(::boost::forward<Visitor>(visitor));
+     return ::boost::forward<Visitable>(visitable).apply_visitor(cpp14_vis);
+ }
+
+From 7331d648f46b6008138cbd22087b8c5c61ff7926 Mon Sep 17 00:00:00 2001
+From: Ed Catmur <ed@catmur.uk>
+Date: Sun, 21 Apr 2019 00:50:00 +0100
+Subject: [PATCH 2/2] Add test.
+
+---
+ libs/variant/test/const_ref_apply_visitor.cpp | 44 ++++++++++++++++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+
+diff --git a/libs/variant/test/const_ref_apply_visitor.cpp b/libs/variant/test/const_ref_apply_visitor.cpp
+index 0ec77bd4..72afff9e 100644
+--- a/libs/variant/test/const_ref_apply_visitor.cpp
++++ b/libs/variant/test/const_ref_apply_visitor.cpp
+@@ -224,6 +224,44 @@ void test_cpp14_visitor(const variant_type& test_var, const variant_type& test_v
+ #endif
+ }
++void test_cpp14_visitor(variant_type& test_var)
++{
++    std::cout << "Testing lvalue visitable for c++14\n";
++
++    BOOST_TEST(boost::apply_visitor([](auto& v) { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
++}
++
++void test_cpp14_mutable_visitor(variant_type& test_var)
++{
++    std::cout << "Testing lvalue visitable for c++14 with inline mutable lambda\n";
++
++    BOOST_TEST(boost::apply_visitor([](auto& v) mutable -> auto { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
++}
++
++void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2)
++{
++    std::cout << "Testing lvalue visitable for c++14\n";
++
++    BOOST_TEST(boost::apply_visitor([](auto& v, auto& vv) { return lvalue_rvalue_detector()(v, vv); }, test_var, test_var2)
++            == "lvalue reference, lvalue reference");
++}
++
++void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2, variant_type& test_var3)
++{
++#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
++    std::cout << "Testing lvalue visitable for c++14\n";
++
++    auto result = boost::apply_visitor([](auto& v, auto& t, auto& p) { return lvalue_rvalue_detector()(v, t, p); },
++                test_var, test_var2, test_var3);
++    std::cout << "result: " << result << std::endl;
++    BOOST_TEST(result == "lvalue reference, lvalue reference, lvalue reference");
++#else
++    (void)test_var;
++    (void)test_var2;
++    (void)test_var3;
++#endif
++}
++
+ void test_cpp14_visitor(variant_type&& test_var)
+ {
+     std::cout << "Testing rvalue visitable for c++14\n";
+@@ -344,8 +382,14 @@ void run_cpp14_mixed_tests()
+ void run_cpp14_tests()
+ {
+ #ifndef BOOST_NO_CXX14_DECLTYPE_AUTO
++    variant_type const c1(10), c2(20), c3(30);
+     variant_type v1(10), v2(20), v3(30);
++    test_cpp14_visitor(c1);
++    test_cpp14_mutable_visitor(c1);
++    test_cpp14_visitor(c2, c3);
++    test_cpp14_visitor(c1, c2, c3);
++
+     test_cpp14_visitor(v1);
+     test_cpp14_mutable_visitor(v1);
+     test_cpp14_visitor(v2, v3);
diff --git a/libs/boost/patches/uclibc-ng-2.patch b/libs/boost/patches/uclibc-ng-2.patch
new file mode 100644 (file)
index 0000000..0d16686
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/boost/math/tools/roots.hpp
++++ b/boost/math/tools/roots.hpp
+@@ -665,8 +665,8 @@ namespace detail
+     inline T discriminant(T const & a, T const & b, T const & c)
+     {
+         T w = 4*a*c;
+-        T e = std::fma(-c, 4*a, w);
+-        T f = std::fma(b, b, -w);
++        T e = fma(-c, 4*a, w);
++        T f = fma(b, b, -w);
+         return f + e;
+     }
+ }
+@@ -674,7 +674,6 @@ namespace detail
+ template<class T>
+ auto quadratic_roots(T const& a, T const& b, T const& c)
+ {
+-    using std::copysign;
+     using std::sqrt;
+     if constexpr (std::is_integral<T>::value)
+     {
index 2b5c8af849c91c329d132aa44bc995f4a4a47f79..ebd9c6dc96467907bdbb3752a9c8f4f13950ddbf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=botan
 PKG_VERSION:=2.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
 
 PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
@@ -19,7 +19,7 @@ PKG_HASH:=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
 
 PKG_USE_MIPS16:=0
 PKG_LICENSE:=BSD-2-Clause
-PKG_LICENSE_FILE:=license.txt
+PKG_LICENSE_FILES:=license.txt
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -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 9e75283ea4a10834469e5ba9740b53ffca1b7dab..77027b5be063efdfd71fb3c37b9fbb12d2914538 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=faad2
 PKG_VERSION:=2.8.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/faac/faad2-src/$(PKG_NAME)-2.8.0
@@ -64,10 +64,6 @@ ifeq ($(CONFIG_SOFT_FLOAT),y)
        CONFIGURE_ARGS+= -nfp
 endif
 
-ifeq ($(CONFIG_USE_UCLIBC),y)
-       CONFIGURE_VARS+= CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log"
-endif
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
index a7f95761946f9d673afbee1c78c4737895901bee..40e559ef45143c5c7d293b9e0ffe3c1f81374a12 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=getdns
-PKG_VERSION:=1.5.0
+PKG_VERSION:=1.5.2
 PKG_RELEASE:=1
 
 PKG_LICENSE:=BSD-3-Clause
@@ -14,7 +14,7 @@ PKG_MAINTAINER:=Jonathan Underwood <jonathan.underwood@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://getdnsapi.net/dist/
-PKG_HASH:=577182c3ace919ee70cee5629505581a10dc530bd53fe5c241603ea91c84fa84
+PKG_HASH:=1826a6a221ea9e9301f2c1f5d25f6f5588e841f08b967645bf50c53b970694c0
 
 PKG_FIXUP:=autoreconf
 
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..e7ca37bf54c1ee680abf32a43c7bbc52bcfe1c0f 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_RELEASE:=2
 
 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__) || \
diff --git a/libs/icu/patches/020-uClibc-ng.patch b/libs/icu/patches/020-uClibc-ng.patch
new file mode 100644 (file)
index 0000000..2d2a3e7
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/i18n/decimfmt.cpp
++++ b/i18n/decimfmt.cpp
+@@ -1812,7 +1812,7 @@ bool DecimalFormat::fastFormatDouble(double input, UnicodeString& output) const
+         return false;
+     }
+     if (std::isnan(input)
+-            || std::trunc(input) != input
++            || trunc(input) != input
+             || input <= INT32_MIN
+             || input > INT32_MAX) {
+         return false;
+--- a/i18n/number_decimalquantity.cpp
++++ b/i18n/number_decimalquantity.cpp
+@@ -446,7 +446,7 @@ void DecimalQuantity::_setToDoubleFast(double n) {
+         for (; i <= -22; i += 22) n /= 1e22;
+         n /= DOUBLE_MULTIPLIERS[-i];
+     }
+-    auto result = static_cast<int64_t>(std::round(n));
++    auto result = static_cast<int64_t>(round(n));
+     if (result != 0) {
+         _setToLong(result);
+         scale -= fracLength;
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 5e7fc3c88abae806a7c184b32b539305ab534d7f..b2c325aa9fae7dccf90b268ecf5a7eb8257b1b47 100644 (file)
@@ -9,24 +9,25 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libartnet
 PKG_VERSION:=1.1.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/OpenLightingProject/libartnet/releases/download/1.1.2
 PKG_HASH:=19cdda434e208a81ddd138377f11046364438e40e34542ae101d6aa3fcaec696
 
 PKG_MAINTAINER:=Martijn Zilverschoon <martijn@friedzombie.com>
-
 PKG_LICENSE:=GPL-2.1
 PKG_LICENSE_FILES:=COPYING
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libartnet
        SECTION:=libs
        CATEGORY:=Libraries
        TITLE:=Libartnet is an implementation of the ArtNet protocol.
-       URL:=http://www.openlighting.org/libartnet-main/
+       URL:=https://www.openlighting.org/libartnet-main/
 endef
 
 define Package/libartnet/description
@@ -34,16 +35,6 @@ define Package/libartnet/description
        transmission of DMX and related data over IP networks.
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default)
-endef
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-       DESTDIR="$(PKG_INSTALL_DIR)" \
-       all install
-endef
-
 define Build/InstallDev
        mkdir -p $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/artnet $(1)/usr/include/
index 44dde906900a65b89f5d37b47e3dff8733585088..9f0d62ff0ac6047183073d108eaea15068742700 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/artnet/transmit.c b/artnet/transmit.c
-index ce19b11..e882db9 100644
 --- a/artnet/transmit.c
 +++ b/artnet/transmit.c
 @@ -163,7 +163,7 @@ int artnet_tx_tod_data(node n, int id) {
@@ -7,7 +5,7 @@ index ce19b11..e882db9 100644
  
    while (remaining > 0) {
 -    memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT);
-+    memset(&tod.data.toddata.tod,0x00, ARTNET_MAX_UID_COUNT * sizeof(tod.data.toddata.tod));
++    memset(&tod.data.toddata.tod,0x00, sizeof(tod.data.toddata.tod));
      lim = min(ARTNET_MAX_UID_COUNT, remaining);
      tod.data.toddata.blockCount = bloc++;
      tod.data.toddata.uidCount = lim;
index f1925bfb977e945a98e103f8a893d48cbe236825..4954e41569c590f12ae6c3b441e593a2c3fe56a6 100644 (file)
@@ -10,7 +10,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdmapsharing
-PKG_VERSION:=3.9.4
+PKG_VERSION:=3.9.6
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=libdmapsharing-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.flyn.org/projects/libdmapsharing/
-PKG_HASH:=fbb8eb272a3d659f534050cce190a72a02599f892f517de99a8a71984dd16ee2
+PKG_HASH:=1996852f9390a6e7c4254c38eaf020509b157934a83f7b4b52031d84bad5e5d0
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index 10fe79778cf7bab67d28054355eef36c06805552..b1470ca7749b21b18852ea002177f4694c078345 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libevhtp
-PKG_VERSION:=1.1.6
-PKG_RELEASE:=3
-PKG_LICENSE:=BSD-3-Clause
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/criticalstack/libevhtp/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=725dd0a32237b2a097cdc2003d09278a082ccce310aaba7441a5fd8fa8f26635
+PKG_HASH:=d8d98072693f5f68ccd74d327dedfa2f6add4446ac2799689c2f58dd480aa301
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libevhtp
     SECTION:=libs
     CATEGORY:=Libraries
     TITLE:=A more flexible replacement for libevent's httpd API
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-    URL:=https://github.com/ellzey/libevhtp
-    DEPENDS:=+libevent2 +libevent2-openssl +libevent2-pthreads +libopenssl +libpthread
+    URL:=https://github.com/criticalstack/libevhtp
+    DEPENDS:=+libevent2 +libevent2-openssl +libevent2-pthreads
 endef
 
 define Package/libevhtp/description
@@ -38,12 +41,4 @@ define Package/libevhtp/description
    meaning the developer never thought of it being used for creating a full-fledged HTTP service.
 endef
 
-include $(INCLUDE_DIR)/cmake.mk
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/{include,lib}
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
-endef
-
 $(eval $(call BuildPackage,libevhtp))
index 30db96cfbaf636b3bbb8a398fade65e0bc0f006e..70410e319b1a19e9bf7726cb2c6870660af484a4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/evhtp.c
 +++ b/evhtp.c
-@@ -1686,16 +1686,15 @@ _evhtp_ssl_thread_lock(int mode, int typ
+@@ -1817,16 +1817,15 @@ _evhtp_ssl_thread_lock(int mode, int typ
  #endif
  static void
  _evhtp_ssl_delete_scache_ent(evhtp_ssl_ctx_t * ctx, evhtp_ssl_sess_t * sess) {
@@ -22,7 +22,7 @@
  
      if (cfg->scache_del) {
          (cfg->scache_del)(htp, sid, slen);
-@@ -1706,14 +1705,17 @@ static int
+@@ -1837,14 +1836,17 @@ static int
  _evhtp_ssl_add_scache_ent(evhtp_ssl_t * ssl, evhtp_ssl_sess_t * sess) {
      evhtp_connection_t * connection;
      evhtp_ssl_cfg_t    * cfg;
@@ -44,7 +44,7 @@
  
      SSL_set_timeout(sess, cfg->scache_timeout);
  
-@@ -1725,7 +1727,7 @@ _evhtp_ssl_add_scache_ent(evhtp_ssl_t *
+@@ -1856,7 +1858,7 @@ _evhtp_ssl_add_scache_ent(evhtp_ssl_t *
  }
  
  static evhtp_ssl_sess_t *
@@ -53,7 +53,7 @@
      evhtp_connection_t * connection;
      evhtp_ssl_cfg_t    * cfg;
      evhtp_ssl_sess_t   * sess;
-@@ -1767,12 +1769,12 @@ _evhtp_ssl_servername(evhtp_ssl_t * ssl,
+@@ -1898,12 +1900,12 @@ _evhtp_ssl_servername(evhtp_ssl_t * ssl,
          connection->vhost_via_sni = 1;
  
          SSL_set_SSL_CTX(ssl, evhtp_vhost->ssl_ctx);
@@ -69,7 +69,7 @@
          }
  
          return SSL_TLSEXT_ERR_OK;
-@@ -3017,15 +3019,21 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
+@@ -3197,15 +3199,21 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
          return -1;
      }
  
@@ -91,7 +91,7 @@
  
  #if OPENSSL_VERSION_NUMBER >= 0x10000000L
      SSL_CTX_set_options(htp->ssl_ctx, SSL_MODE_RELEASE_BUFFERS);
-@@ -3062,7 +3070,11 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
+@@ -3242,7 +3250,11 @@ evhtp_ssl_init(evhtp_t * htp, evhtp_ssl_
      SSL_CTX_set_verify(htp->ssl_ctx, cfg->verify_peer, cfg->x509_verify_cb);
  
      if (cfg->x509_chk_issued_cb != NULL) {
  #else
  typedef void                      evhtp_ssl_sess_t;
  typedef void                      evhtp_ssl_t;
-@@ -154,9 +159,9 @@ typedef int (*evhtp_headers_iterator)(ev
+@@ -157,9 +162,9 @@ typedef int (*evhtp_headers_iterator)(ev
  typedef int (*evhtp_ssl_verify_cb)(int pre_verify, evhtp_x509_store_ctx_t * ctx);
  typedef int (*evhtp_ssl_chk_issued_cb)(evhtp_x509_store_ctx_t * ctx, evhtp_x509_t * x, evhtp_x509_t * issuer);
  
 +typedef evhtp_ssl_sess_t * (*evhtp_ssl_scache_get)(evhtp_connection_t * connection, evhtp_ssl_data_t * sid, int sid_len);
  typedef void * (*evhtp_ssl_scache_init)(evhtp_t *);
  
- #define EVHTP_VERSION           "1.1.6"
+ #define EVHTP_VERSION           "1.2.0"
index 4e984e5890488d0c6d65c4f0b6e304053f3f6b4b..4c370a1b9f277ad285c80ba35d2f2ed2746ba11f 100644 (file)
@@ -1,21 +1,40 @@
-diff --git a/evhtp.c b/evhtp.c
-index 24687be..b646925 100644
 --- a/evhtp.c
 +++ b/evhtp.c
-@@ -1667,9 +1667,9 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
+@@ -1797,10 +1797,10 @@ _evhtp_accept_cb(evserv_t * serv, int fd, struct sockaddr * s, int sl, void * ar
+ }
  
  #ifndef EVHTP_DISABLE_SSL
- #ifndef EVHTP_DISABLE_EVTHR
+-#ifndef EVHTP_DISABLE_EVTHR
 -static unsigned long
 -_evhtp_ssl_get_thread_id(void) {
 -    return (unsigned long)pthread_self();
++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
 +static void
 +_evhtp_ssl_get_thread_id(CRYPTO_THREADID *id) {
 +    CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
  }
  
  static void
-@@ -2999,7 +2999,7 @@ evhtp_ssl_use_threads(void) {
+@@ -3050,7 +3050,9 @@ evhtp_use_threads(evhtp_t * htp, evhtp_thread_init_cb init_cb, int nthreads, voi
+     htp->thread_init_cbarg = arg;
+ #ifndef EVHTP_DISABLE_SSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+     evhtp_ssl_use_threads();
++#endif
+ #endif
+     if (!(htp->thr_pool = evthr_pool_new(nthreads, _evhtp_thread_init, htp))) {
+@@ -3161,7 +3163,7 @@ evhtp_set_post_accept_cb(evhtp_t * htp, evhtp_post_accept_cb cb, void * arg) {
+ }
+ #ifndef EVHTP_DISABLE_SSL
+-#ifndef EVHTP_DISABLE_EVTHR
++#if !defined(EVHTP_DISABLE_EVTHR) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ int
+ evhtp_ssl_use_threads(void) {
+     int i;
+@@ -3179,7 +3181,7 @@ evhtp_ssl_use_threads(void) {
          pthread_mutex_init(&(ssl_locks[i]), NULL);
      }
  
diff --git a/libs/libevhtp/patches/030-uclibc.patch b/libs/libevhtp/patches/030-uclibc.patch
new file mode 100644 (file)
index 0000000..ae247fc
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/test_proxy.c
++++ b/test_proxy.c
+@@ -5,6 +5,9 @@
+ #include <errno.h>
+ #include <evhtp.h>
++#ifndef SIGTERM
++#define SIGTERM       15
++#endif
+ int
+ make_request(evbase_t         * evbase,
diff --git a/libs/libfizz/Makefile b/libs/libfizz/Makefile
new file mode 100644 (file)
index 0000000..1449fae
--- /dev/null
@@ -0,0 +1,44 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libfizz
+PKG_VERSION:=2019.05.06.00
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebookincubator/fizz/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=80d4089cef655192733a7b0536bd3e2dab9baf143ed99510308064ff4842ae11
+PKG_BUILD_DIR:=$(BUILD_DIR)/fizz-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=fizz
+CMAKE_OPTIONS:= \
+       -DBUILD_EXAMPLES=OFF \
+       -DBUILD_SHARED_LIBS=ON
+CMAKE_INSTALL:=1
+
+define Package/libfizz
+       SECTION:=libs
+       CATEGORY:=Libraries
+       DEPENDS:=+libfolly +boost +libopenssl +glog +gflags +libevent2 \
+               +libdouble-conversion +libsodium
+       TITLE:=C++14 implementation of the TLS-1.3 standard
+       URL:=https://github.com/facebookincubator/fizz
+endef
+
+define Package/libfizz/description
+       C++14 implementation of the TLS-1.3 standard.
+       Fizz currently supports TLS 1.3 drafts 28, 26 (both wire-compatible with the final specification), and 23.
+endef
+
+define Package/libfizz/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfizz.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfizz))
diff --git a/libs/libfolly/Makefile b/libs/libfolly/Makefile
new file mode 100644 (file)
index 0000000..83e4f45
--- /dev/null
@@ -0,0 +1,54 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libfolly
+PKG_VERSION:=2019.05.06.00
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=59e88d792e4c917e2f37ac22c230af0056bce8aa7bacf2d9e94ceb177a7c1079
+PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_OPTIONS:= \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+       -DCXX_STD=gnu++14 \
+       -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=OFF \
+       -DFOLLY_HAVE_LINUX_VDSO_EXITCODE=OFF \
+       -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=OFF \
+       -DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \
+       -DFOLLY_HAVE_XSI_STRERROR_R_EXITCODE=0 \
+       -DBUILD_SHARED_LIBS=ON
+CMAKE_INSTALL:=1
+
+define Package/libfolly
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=An open-source C++ library developed and used at Facebook.
+       URL:=https://github.com/facebook/folly
+       DEPENDS:=+libstdcpp +boost +boost-context +boost-system +boost-thread \
+               +boost-date_time +boost-filesystem +boost-program_options +boost-regex \
+               +libbz2 +libopenssl +libdouble-conversion +libevent2 +glog +zlib +libzstd \
+               +gflags +libsodium +liblzma +libaio +liblz4 +libunwind +libatomic
+endef
+
+define Package/libfolly/description
+       An open-source C++ library developed and used at Facebook.
+       Folly (acronymed loosely after Facebook Open Source Library) is a library of
+       C++14 components designed with practicality and efficiency in mind.
+       Folly contains a variety of core library components used extensively at Facebook.
+       This package includes the shared library.
+endef
+
+define Package/libfolly/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfolly*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfolly))
diff --git a/libs/libfolly/patches/100-cmake-fix-regex-match-path.patch b/libs/libfolly/patches/100-cmake-fix-regex-match-path.patch
new file mode 100644 (file)
index 0000000..ac4adbe
--- /dev/null
@@ -0,0 +1,40 @@
+Index: folly-2019.05.06.00/CMakeLists.txt
+===================================================================
+--- folly-2019.05.06.00.orig/CMakeLists.txt
++++ folly-2019.05.06.00/CMakeLists.txt
+@@ -109,17 +109,19 @@ configure_file(
+ auto_sources(files "*.cpp" "RECURSE" "${FOLLY_DIR}")
+ auto_sources(hfiles "*.h" "RECURSE" "${FOLLY_DIR}")
+
++string(REPLACE + \\+ FOLLY_DIR_ESCAPED ${FOLLY_DIR})
++
+ # Exclude tests, benchmarks, and other standalone utility executables from the
+ # library sources.  Test sources are listed separately below.
+ REMOVE_MATCHES_FROM_LISTS(files hfiles
+   MATCHES
+-    "^${FOLLY_DIR}/build/"
+-    "^${FOLLY_DIR}/experimental/exception_tracer/"
+-    "^${FOLLY_DIR}/experimental/pushmi/"
+-    "^${FOLLY_DIR}/futures/exercises/"
+-    "^${FOLLY_DIR}/logging/example/"
+-    "^${FOLLY_DIR}/(.*/)?test/"
+-    "^${FOLLY_DIR}/tools/"
++    "^${FOLLY_DIR_ESCAPED}/build/"
++    "^${FOLLY_DIR_ESCAPED}/experimental/exception_tracer/"
++    "^${FOLLY_DIR_ESCAPED}/experimental/pushmi/"
++    "^${FOLLY_DIR_ESCAPED}/futures/exercises/"
++    "^${FOLLY_DIR_ESCAPED}/logging/example/"
++    "^${FOLLY_DIR_ESCAPED}/(.*/)?test/"
++    "^${FOLLY_DIR_ESCAPED}/tools/"
+     "Benchmark.cpp$"
+     "Test.cpp$"
+ )
+@@ -169,7 +171,7 @@ list(APPEND hfiles
+ if (NOT FOLLY_USE_SYMBOLIZER)
+   REMOVE_MATCHES_FROM_LISTS(files hfiles
+     MATCHES
+-      "^${FOLLY_DIR}/experimental/symbolizer/"
++      "^${FOLLY_DIR_ESCAPED}/experimental/symbolizer/"
+   )
+   list(REMOVE_ITEM files
+     ${FOLLY_DIR}/SingletonStackTrace.cpp
diff --git a/libs/libfolly/patches/101-remove-undefined-dcheck.patch b/libs/libfolly/patches/101-remove-undefined-dcheck.patch
new file mode 100644 (file)
index 0000000..74cce0a
--- /dev/null
@@ -0,0 +1,12 @@
+Index: folly-2019.05.06.00/folly/stats/detail/BufferedStat-defs.h
+===================================================================
+--- folly-2019.05.06.00.orig/folly/stats/detail/BufferedStat-defs.h
++++ folly-2019.05.06.00/folly/stats/detail/BufferedStat-defs.h
+@@ -74,7 +74,6 @@ void BufferedStat<DigestT, ClockT>::doUp
+     TimePoint now,
+     const std::unique_lock<SharedMutex>& g,
+     UpdateMode updateMode) {
+-  DCHECK(g.owns_lock());
+   // Check that no other thread has performed the slide after the check
+   auto oldExpiry = expiry_.load(std::memory_order_relaxed).tp;
+   if (now > oldExpiry || updateMode == UpdateMode::Now) {
diff --git a/libs/libfolly/patches/102-uclibc-patches.patch b/libs/libfolly/patches/102-uclibc-patches.patch
new file mode 100644 (file)
index 0000000..2dc539e
--- /dev/null
@@ -0,0 +1,114 @@
+diff --git a/folly/CachelinePadded.h b/folly/CachelinePadded.h
+--- a/folly/CachelinePadded.h
++++ b/folly/CachelinePadded.h
+@@ -35,10 +35,6 @@
+  */
+ template <typename T>
+ class CachelinePadded {
+-  static_assert(
+-      alignof(T) <= max_align_v,
+-      "CachelinePadded does not support over-aligned types.");
+-
+  public:
+   template <typename... Args>
+   explicit CachelinePadded(Args&&... args)
+diff --git a/folly/experimental/JSONSchema.cpp b/folly/experimental/JSONSchema.cpp
+--- a/folly/experimental/JSONSchema.cpp
++++ b/folly/experimental/JSONSchema.cpp
+@@ -25,6 +25,7 @@
+ #include <folly/Singleton.h>
+ #include <folly/String.h>
+ #include <folly/json.h>
++#include <folly/portability/Math.h>
+
+ namespace folly {
+ namespace jsonschema {
+@@ -141,7 +142,7 @@
+       return none;
+     }
+     if (schema_.isDouble() || value.isDouble()) {
+-      const auto rem = std::remainder(value.asDouble(), schema_.asDouble());
++      const auto rem = folly::remainder(value.asDouble(), schema_.asDouble());
+       if (std::abs(rem) > std::numeric_limits<double>::epsilon()) {
+         return makeError("a multiple of ", schema_, value);
+       }
+diff --git a/folly/external/farmhash/farmhash.cpp b/folly/external/farmhash/farmhash.cpp
+--- a/folly/external/farmhash/farmhash.cpp
++++ b/folly/external/farmhash/farmhash.cpp
+@@ -181,6 +181,7 @@
+
+ #undef bswap_32
+ #undef bswap_64
++#undef _BYTESWAP_H
+ #include <byteswap.h>
+
+ #endif
+diff --git a/folly/portability/Math.h b/folly/portability/Math.h
+--- a/folly/portability/Math.h
++++ b/folly/portability/Math.h
+@@ -20,21 +20,24 @@
+
+ namespace folly {
+
+-#ifndef __ANDROID__
++#if !defined(__ANDROID__) && !defined(__UCLIBC__)
+
+ /**
+- * Most platforms hopefully provide std::nextafter.
++ * Most platforms hopefully provide std::{nextafter,remainder}.
+  */
+
+ /* using override */ using std::nextafter;
++/* using override */ using std::remainder;
+
+-#else // !__ANDROID__
++#else // !__ANDROID__ && !__UCLIBC__
+
+ /**
+  * On Android, std::nextafter isn't implemented. However, the C functions and
+  * compiler builtins are still provided. Using the GCC builtin is actually
+  * slightly faster, as they're constexpr and the use cases within folly are in
+  * constexpr context.
++ *
++ * UCLIBC doesn't implement std::remainder. Use the builtin versions.
+  */
+
+ #if defined(__GNUC__) && !defined(__clang__)
+@@ -51,6 +54,18 @@
+   return __builtin_nextafterl(x, y);
+ }
+
++constexpr float remainder(float x, float y) {
++  return __builtin_remainderf(x, y);
++}
++
++constexpr double remainder(double x, double y) {
++  return __builtin_remainder(x, y);
++}
++
++constexpr long double remainder(long double x, long double y) {
++  return __builtin_remainderl(x, y);
++}
++
+ #else // __GNUC__
+
+ inline float nextafter(float x, float y) {
+@@ -65,6 +80,18 @@
+   return ::nextafterl(x, y);
+ }
+
++inline float remainder(float x, float y) {
++  return ::remainderf(x, y);
++}
++
++inline double remainder(double x, double y) {
++  return ::remainder(x, y);
++}
++
++inline long double remainder(long double x, long double y) {
++  return ::remainderl(x, y);
++}
++
+ #endif // __GNUC__
+
+ #endif // __ANDROID__
diff --git a/libs/libfolly/patches/103-openssl-compatibility.patch b/libs/libfolly/patches/103-openssl-compatibility.patch
new file mode 100644 (file)
index 0000000..72c3c7a
--- /dev/null
@@ -0,0 +1,147 @@
+diff --git a/folly/io/async/ssl/OpenSSLUtils.cpp b/folly/io/async/ssl/OpenSSLUtils.cpp
+index 0504cf8..a9c2775 100644
+--- a/folly/io/async/ssl/OpenSSLUtils.cpp
++++ b/folly/io/async/ssl/OpenSSLUtils.cpp
+@@ -155,8 +155,12 @@ static std::unordered_map<uint16_t, std::string> getOpenSSLCipherNames() {
+   SSL_CTX* ctx = nullptr;
+   SSL* ssl = nullptr;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+   const SSL_METHOD* meth = SSLv23_server_method();
+   OpenSSL_add_ssl_algorithms();
++#else
++  const SSL_METHOD* meth = TLS_server_method();
++#endif
+
+   if ((ctx = SSL_CTX_new(meth)) == nullptr) {
+     return ret;
+diff --git a/folly/portability/OpenSSL.h b/folly/portability/OpenSSL.h
+index a4f4b04..427bf95 100644
+--- a/folly/portability/OpenSSL.h
++++ b/folly/portability/OpenSSL.h
+@@ -27,6 +27,7 @@
+
+ #include <openssl/asn1.h>
+ #include <openssl/bio.h>
++#include <openssl/bn.h>
+ #include <openssl/crypto.h>
+ #include <openssl/dh.h>
+ #include <openssl/err.h>
+diff --git a/folly/ssl/OpenSSLCertUtils.cpp b/folly/ssl/OpenSSLCertUtils.cpp
+index 544bb4f..423dd2c 100644
+--- a/folly/ssl/OpenSSLCertUtils.cpp
++++ b/folly/ssl/OpenSSLCertUtils.cpp
+@@ -155,12 +155,17 @@ folly::Optional<std::string> OpenSSLCertUtils::toString(X509& x509) {
+   }
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_get0_notAfter X509_get_notAfter
++#define X509_get0_notBefore X509_get_notBefore
++#endif
++
+ std::string OpenSSLCertUtils::getNotAfterTime(X509& x509) {
+-  return getDateTimeStr(X509_get_notAfter(&x509));
++  return getDateTimeStr(X509_get0_notAfter(&x509));
+ }
+
+ std::string OpenSSLCertUtils::getNotBeforeTime(X509& x509) {
+-  return getDateTimeStr(X509_get_notBefore(&x509));
++  return getDateTimeStr(X509_get0_notBefore(&x509));
+ }
+
+ std::string OpenSSLCertUtils::getDateTimeStr(const ASN1_TIME* time) {
+diff --git a/folly/ssl/OpenSSLVersionFinder.h b/folly/ssl/OpenSSLVersionFinder.h
+index d0110d7..9d65580 100644
+--- a/folly/ssl/OpenSSLVersionFinder.h
++++ b/folly/ssl/OpenSSLVersionFinder.h
+@@ -18,6 +18,12 @@
+ #include <folly/Conv.h>
+ #include <folly/portability/OpenSSL.h>
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define OPENSSL_VERSION SSLEAY_VERSION
++#define OpenSSL_version SSLeay_version
++#define OpenSSL_version_num SSLeay
++#endif
++
+ // This is used to find the OpenSSL version at runtime. Just returning
+ // OPENSSL_VERSION_NUMBER is insufficient as runtime version may be different
+ // from the compile-time version
+@@ -25,7 +31,7 @@ namespace folly {
+ namespace ssl {
+ inline std::string getOpenSSLLongVersion() {
+ #ifdef OPENSSL_VERSION_TEXT
+-  return SSLeay_version(SSLEAY_VERSION);
++  return OpenSSL_version(OPENSSL_VERSION);
+ #elif defined(OPENSSL_VERSION_NUMBER)
+   return folly::format("0x{:x}", OPENSSL_VERSION_NUMBER).str();
+ #else
+@@ -35,7 +41,7 @@ inline std::string getOpenSSLLongVersion() {
+
+ inline uint64_t getOpenSSLNumericVersion() {
+ #ifdef OPENSSL_VERSION_NUMBER
+-  return SSLeay();
++  return OpenSSL_version_num();
+ #else
+   return 0;
+ #endif
+diff --git a/folly/ssl/detail/OpenSSLThreading.cpp b/folly/ssl/detail/OpenSSLThreading.cpp
+index 3414fbd..ce345ab 100644
+--- a/folly/ssl/detail/OpenSSLThreading.cpp
++++ b/folly/ssl/detail/OpenSSLThreading.cpp
+@@ -115,6 +115,7 @@ struct SSLLock {
+ // SSLContext runs in such environments.
+ // Instead of declaring a static member we "new" the static
+ // member so that it won't be destructed on exit().
++#if !FOLLY_SSL_DETAIL_OPENSSL_IS_110
+ static std::unique_ptr<SSLLock[]>& locks() {
+   static auto locksInst = new std::unique_ptr<SSLLock[]>();
+   return *locksInst;
+@@ -128,8 +129,8 @@ static void callbackLocking(int mode, int n, const char*, int) {
+   }
+ }
+
+-static unsigned long callbackThreadID() {
+-  return static_cast<unsigned long>(folly::getCurrentThreadID());
++static void callbackThreadID(CRYPTO_THREADID *id) {
++  return CRYPTO_THREADID_set_numeric(id, folly::getCurrentThreadID());
+ }
+
+ static CRYPTO_dynlock_value* dyn_create(const char*, int) {
+@@ -150,28 +151,33 @@ dyn_lock(int mode, struct CRYPTO_dynlock_value* lock, const char*, int) {
+ static void dyn_destroy(struct CRYPTO_dynlock_value* lock, const char*, int) {
+   delete lock;
+ }
++#endif
+
+ void installThreadingLocks() {
++#if !FOLLY_SSL_DETAIL_OPENSSL_IS_110
+   // static locking
+   locks() = std::make_unique<SSLLock[]>(size_t(CRYPTO_num_locks()));
+   for (auto it : lockTypes()) {
+     locks()[size_t(it.first)].lockType = it.second;
+   }
+-  CRYPTO_set_id_callback(callbackThreadID);
++  CRYPTO_THREADID_set_callback(callbackThreadID);
+   CRYPTO_set_locking_callback(callbackLocking);
+   // dynamic locking
+   CRYPTO_set_dynlock_create_callback(dyn_create);
+   CRYPTO_set_dynlock_lock_callback(dyn_lock);
+   CRYPTO_set_dynlock_destroy_callback(dyn_destroy);
++#endif
+ }
+
+ void cleanupThreadingLocks() {
+-  CRYPTO_set_id_callback(nullptr);
++#if !FOLLY_SSL_DETAIL_OPENSSL_IS_110
++  CRYPTO_THREADID_set_callback(nullptr);
+   CRYPTO_set_locking_callback(nullptr);
+   CRYPTO_set_dynlock_create_callback(nullptr);
+   CRYPTO_set_dynlock_lock_callback(nullptr);
+   CRYPTO_set_dynlock_destroy_callback(nullptr);
+   locks().reset();
++#endif
+ }
+
+ } // namespace detail
diff --git a/libs/libgflags/Makefile b/libs/libgflags/Makefile
new file mode 100644 (file)
index 0000000..dbaace6
--- /dev/null
@@ -0,0 +1,46 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gflags
+PKG_VERSION:=2.2.2
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/gflags/gflags/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING.txt
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_OPTIONS:= \
+       -DGFLAGS_BUILD_SHARED_LIBS=ON \
+       -DGFLAGS_BUILD_STATIC_LIBS=ON
+CMAKE_INSTALL:=1
+
+define Package/gflags
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=C++ library that implements commandline flags processing
+       DEPENDS:=+libstdcpp +libpthread
+       URL:=https://github.com/gflags/gflags
+       MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/gflags/description
+       The gflags package contains a C++ library that implements commandline flags
+       processing. It includes built-in support for standard types such as string and
+       the ability to define flags in the source file in which they are used.
+endef
+
+define Package/gflags/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libgflags.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,gflags))
+$(eval $(call HostBuild))
index dcaab6afb6193e4f8b3646d6f897351c85fe31ba..83ff65cb79515daabc019724963b079b5fd9b66e 100644 (file)
@@ -2,27 +2,29 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glog
 PKG_VERSION:=0.4.0
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
 
 PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILE:=COPYING
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
+PKG_BUILD_DEPENDS:=libgflags
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/glog
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=C++ implementation of the Google logging module
-  DEPENDS:= +libstdcpp +libpthread
+  DEPENDS:= +libstdcpp +libpthread +gflags
   URL:=https://github.com/google/glog
   MAINTAINER:=Amir Sabbaghi <amir@pichak.co>
 endef
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 b0d49838e8532ea9412b5f5cb278bf5b47b6ea77..ae33b568ee617be0c5cc0b94995cfeea0ae02721 100644 (file)
@@ -8,30 +8,29 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libimobiledevice
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2019-02-16
+PKG_SOURCE_VERSION:=0584aa90c93ff6ce46927b8d67887cb987ab9545
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
+PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING.LESSER
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=13bf235cac2201747de11652cf14fe2714ca0718
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=4e8892b27f20216f86d69b36ad2229fca87cdf0a10f8d3e145d01841a492562a
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/libimobiledevice/libimobiledevice/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=286e294aad60ef04a39ce70512a0e816415167c982f3e6c2988d9a6b8c5ee29b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
-include ../../lang/python/python-package.mk
 
 define Package/libimobiledevice/Default
   TITLE:=A library that talks to Apple devices.
-  URL:=http://www.libimobiledevice.org/
+  URL:=https://www.libimobiledevice.org/
 endef
 
 define Package/libimobiledevice/Default/description
@@ -62,17 +61,8 @@ define Package/libimobiledevice-utils/description
   This package contains the libimobiledevice utilities.
 endef
 
-CONFIGURE_VARS += \
-       libusbmuxd_CFLAGS="-I$(STAGING_DIR)/usr/include" \
-       libusbmuxd_LIBS="-L$(STAGING_DIR)/usr/lib -lusbmuxd" \
-       openssl_CFLAGS=" " \
-       openssl_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto"
-
-CONFIGURE_ARGS += \
-       --without-cython \
-       --disable-largefile
-
-TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
+CONFIGURE_VARS += ac_cv_sys_file_offset_bits=64
+CONFIGURE_ARGS += --without-cython
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
diff --git a/libs/libimobiledevice/patches/010-openssl-deprecated.patch b/libs/libimobiledevice/patches/010-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..e6a5459
--- /dev/null
@@ -0,0 +1,88 @@
+--- a/common/userpref.c
++++ b/common/userpref.c
+@@ -37,6 +37,7 @@
+ #include <unistd.h>
+ #include <usbmuxd.h>
+ #ifdef HAVE_OPENSSL
++#include <openssl/bn.h>
+ #include <openssl/pem.h>
+ #include <openssl/rsa.h>
+ #include <openssl/x509.h>
+@@ -73,6 +74,11 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = {
+ };
+ #endif
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_set1_notBefore X509_set_notBefore
++#define X509_set1_notAfter X509_set_notAfter
++#endif
++
+ #ifdef WIN32
+ #define DIR_SEP '\\'
+ #define DIR_SEP_S "\\"
+@@ -420,9 +426,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+               /* set key validity */
+               ASN1_TIME* asn1time = ASN1_TIME_new();
+               ASN1_TIME_set(asn1time, time(NULL));
+-              X509_set_notBefore(root_cert, asn1time);
++              X509_set1_notBefore(root_cert, asn1time);
+               ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
+-              X509_set_notAfter(root_cert, asn1time);
++              X509_set1_notAfter(root_cert, asn1time);
+               ASN1_TIME_free(asn1time);
+               /* use root public key for root cert */
+@@ -453,9 +459,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+               /* set key validity */
+               ASN1_TIME* asn1time = ASN1_TIME_new();
+               ASN1_TIME_set(asn1time, time(NULL));
+-              X509_set_notBefore(host_cert, asn1time);
++              X509_set1_notBefore(host_cert, asn1time);
+               ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
+-              X509_set_notAfter(host_cert, asn1time);
++              X509_set1_notAfter(host_cert, asn1time);
+               ASN1_TIME_free(asn1time);
+               /* use host public key for host cert */
+@@ -533,9 +539,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+               ASN1_TIME* asn1time = ASN1_TIME_new();
+               ASN1_TIME_set(asn1time, time(NULL));
+-              X509_set_notBefore(dev_cert, asn1time);
++              X509_set1_notBefore(dev_cert, asn1time);
+               ASN1_TIME_set(asn1time, time(NULL) + (60 * 60 * 24 * 365 * 10));
+-              X509_set_notAfter(dev_cert, asn1time);
++              X509_set1_notAfter(dev_cert, asn1time);
+               ASN1_TIME_free(asn1time);
+               EVP_PKEY* pkey = EVP_PKEY_new();
+--- a/src/idevice.c
++++ b/src/idevice.c
+@@ -36,6 +36,7 @@
+ #include <usbmuxd.h>
+ #ifdef HAVE_OPENSSL
+ #include <openssl/err.h>
++#include <openssl/rsa.h>
+ #include <openssl/ssl.h>
+ #else
+@@ -49,6 +50,10 @@
+ #ifdef HAVE_OPENSSL
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define TLS_method TLSv1_method
++#endif
++
+ #if OPENSSL_VERSION_NUMBER < 0x10002000L
+ static void SSL_COMP_free_compression_methods(void)
+ {
+@@ -721,7 +726,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
+       }
+       BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE);
+-      SSL_CTX *ssl_ctx = SSL_CTX_new(TLSv1_method());
++      SSL_CTX *ssl_ctx = SSL_CTX_new(TLS_method());
+       if (ssl_ctx == NULL) {
+               debug_info("ERROR: Could not create SSL context.");
+               BIO_free(ssl_bio);
index 17f6a0e0765c48c5a0fbd512ad202ccf6389bfc0..cc3c919e4b912d8c4e00bbbef640aadec5c8634e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jpeg
 PKG_VERSION:=9c
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.ijg.org/files
@@ -74,6 +74,8 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libjpeg.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libjpeg/install
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
+
diff --git a/libs/libmstch/Makefile b/libs/libmstch/Makefile
new file mode 100644 (file)
index 0000000..a5d1285
--- /dev/null
@@ -0,0 +1,45 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmstch
+PKG_VERSION:=1.0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/no1msd/mstch/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=811ed61400d4e9d4f9ae0f7679a2ffd590f0b3c06b16f2798e1f89ab917cba6c
+PKG_BUILD_DIR:=$(BUILD_DIR)/mstch-$(PKG_VERSION)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/mstch-$(PKG_VERSION)
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+HOST_BUILD_DEPENDS:=boost boost/host
+
+PKG_BUILD_DEPENDS:=boost
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+CMAKE_OPTIONS:= \
+       -DCMAKE_POSITION_INDEPENDENT_CODE=True
+
+define Package/libmstch
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=Complete implementation of {{mustache}} templates using modern C++
+       DEPENDS:=+boost +boost-container
+       URL:=https://github.com/no1msd/mstch
+       MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/libmstch/description
+       mstch is a complete implementation of {{mustache}} templates using modern C++
+endef
+
+$(eval $(call BuildPackage,libmstch))
+$(eval $(call HostBuild))
index 6d260aa753df0c43176ef286ac3a6deb8574fadc..07fada3c1103d0389d2f5db3d7a4d871a4fc9f74 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libndpi
-PKG_VERSION:=2.6
+PKG_VERSION:=2.8
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ntop/nDPI/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=efdfb68940385b18079920330528978765dc2a90c8163d10f63301bddadbf91e
+PKG_HASH:=f98def4d0e43818317b20e2887ce500b2d6a5a9c8ddb28cf57ae51caae0f33cc
 PKG_BUILD_DIR:=$(BUILD_DIR)/nDPI-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
@@ -21,9 +21,9 @@ PKG_LICENSE:=LGPLv3
 PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh
 PKG_BUILD_DEPENDS:=libpcap
 PKG_BUILD_PARALLEL:=1
-PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
@@ -41,36 +41,37 @@ define Package/libndpi/description
   Based on OpenDPI it includes ntop extensions.
 endef
 
-define Build/Configure
-       ( cd $(PKG_BUILD_DIR); ./autogen.sh )
-       $(call Build/Configure/Default)
+define Build/Prepare
+       $(PKG_UNPACK)
+       $(Build/Patch)
+       mv $(PKG_BUILD_DIR)/configure.seed $(PKG_BUILD_DIR)/configure.ac
+       $(SED) "s/@NDPI_MAJOR@/2/g" \
+               -e "s/@NDPI_MINOR@/8/g" \
+               -e "s/@NDPI_PATCH@/0/g" \
+               -e "s/@NDPI_VERSION_SHORT@/2.8.0/g" \
+               $(PKG_BUILD_DIR)/configure.ac
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/local/include/ndpi \
-               $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/include/ndpi
+       $(CP) $(PKG_BUILD_DIR)/src/include/*.h \
+               $(1)/usr/include/ndpi/
 
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so* \
+       $(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
                $(1)/usr/lib/
 
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/libdata/pkgconfig/libndpi.pc \
+       $(CP) $(PKG_BUILD_DIR)/libndpi.pc \
                $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libndpi/install
        $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/local/lib/libndpi.so* \
+       $(CP) $(PKG_BUILD_DIR)/src/lib/libndpi.so* \
                $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/bin/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/local/bin/ndpiReader \
+       $(CP) $(PKG_BUILD_DIR)/example/ndpiReader \
                $(1)/usr/bin/
 endef
 
index 30fb23b516003d0e2b8972232977632f44dd9036..9c6eda9988535e01f9573687b828d8ddf04d7a5a 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libp11
-PKG_VERSION:=0.4.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.10
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=9d1c76d74c21ca224f96204982097ebc6b956f645b2b0b5f9c502a20e9ffcfd8
+PKG_HASH:=639ea43c3341e267214b712e1e5e12397fd2d350899e673dd1220f3c6b8e3db4
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=LGPL-2.1+
index a062c1b897793c8687d231c9ea7d2801c0008772..0a576c688b3a20683f335f576614be7b9fd09959 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -49,13 +49,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS) $(OPENSSL_LIBS)
+@@ -49,13 +49,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS)
  pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -shrext $(SHARED_EXT) \
        -avoid-version -export-symbols "$(srcdir)/pkcs11.exports"
  
@@ -16,7 +16,7 @@
  mylibdir=$(libdir)
 --- a/src/Makefile.in
 +++ b/src/Makefile.in
-@@ -872,7 +872,7 @@ distdir: $(DISTFILES)
+@@ -899,7 +899,7 @@ distdir-am: $(DISTFILES)
          fi; \
        done
  check-am: all-am
@@ -25,7 +25,7 @@
  check: check-am
  all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
  installdirs:
-@@ -944,7 +944,7 @@ install-dvi-am:
+@@ -988,7 +988,7 @@ install-dvi-am:
  
  install-exec-am: install-enginesexecLTLIBRARIES install-libLTLIBRARIES
        @$(NORMAL_INSTALL)
  install-html: install-html-am
  
  install-html-am:
-@@ -989,7 +989,7 @@ uninstall-am: uninstall-enginesexecLTLIBRARIES \
+@@ -1051,14 +1051,14 @@ uninstall-am: uninstall-enginesexecLTLIB
  .MAKE: all check-am install-am install-exec-am install-strip
  
--.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
-+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-       clean-enginesexecLTLIBRARIES clean-generic \
+ .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
+-      check-local clean clean-enginesexecLTLIBRARIES clean-generic \
++      clean clean-enginesexecLTLIBRARIES clean-generic \
        clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
        ctags-am distclean distclean-compile distclean-generic \
-@@ -997,7 +997,7 @@ uninstall-am: uninstall-enginesexecLTLIBRARIES \
+       distclean-hdr distclean-libtool distclean-tags distdir dvi \
        dvi-am html html-am info info-am install install-am \
        install-data install-data-am install-dvi install-dvi-am \
        install-enginesexecLTLIBRARIES install-exec install-exec-am \
index 283aa94bf8491301faf28e94b9640b2cd8a95a5e..da15375da7c5028beebef7f474173dca7d6d0dac 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpng
-PKG_VERSION:=1.6.36
+PKG_VERSION:=1.6.37
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@SF/libpng
-PKG_HASH:=eceb924c1fa6b79172fdfd008d335f0e59172a86a66481e09d4089df872aa319
+PKG_HASH:=505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
index 5f2d925d671fd5799f9b5a8ef20d9962861115f6..335d91248cf5bc41d02f7ffd32b37b6bdbca59e1 100644 (file)
@@ -6,8 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpsl
-PKG_VERSION:=0.20.2
-PKG_RELEASE:=3
+PKG_VERSION:=0.21.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/rockdaboot/libpsl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=f8fd0aeb66252dfcc638f14d9be1e2362fdaf2ca86bde0444ff4d5cc961b560f
+PKG_HASH:=41bd1c75a375b85c337b59783f5deb93dbb443fb0a52d257f403df7bd653ee12
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
diff --git a/libs/libre2/Makefile b/libs/libre2/Makefile
new file mode 100644 (file)
index 0000000..76cbe84
--- /dev/null
@@ -0,0 +1,64 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=re2
+PKG_VERSION:=2019-04-01
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=2ed94072145272012bb5b7054afcbe707447d49dcd79fd6d1689e6f3dc589def
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_OPTIONS:= \
+       -DBUILD_SHARED_LIBS=$(if $(CONFIG_RE2_SHARED),ON,OFF)
+CMAKE_INSTALL:=1
+
+define Package/re2
+       SECTION:=libs
+       CATEGORY:=Libraries
+       DEPENDS:=+libstdcpp
+       TITLE:=RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
+       URL:=https://github.com/google/re2
+       MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/re2/config
+       choice
+               prompt "Compile RE2 library."
+                       default RE2_SHARED
+                       help
+                               Choose which version to compile.
+                               -> Shared:
+                                       - Only Shared lib will be compiled.
+                               -> Static:
+                                       - Only Static lib will be compiled.
+
+               config RE2_SHARED
+                       bool "Shared"
+
+               config RE2_STATIC
+                       bool "Static"
+       endchoice
+endef
+
+define Package/re2/description
+       RE2 is a fast, safe, thread-friendly alternative to backtracking regular
+       expression engines like those used in PCRE, Perl, and Python.
+       It is a C++ library.
+endef
+
+define Package/re2/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,re2))
+$(eval $(call HostBuild))
diff --git a/libs/librsocket-cpp/Makefile b/libs/librsocket-cpp/Makefile
new file mode 100644 (file)
index 0000000..d64ad42
--- /dev/null
@@ -0,0 +1,61 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=librsocket-cpp
+PKG_SOURCE_DATE:=2019-05-08
+PKG_SOURCE_VERSION:=ddc80392b17a3fadcbea09f82ea5f6936f0fd459
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/rsocket/rsocket-cpp/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=b9b5177be57f6cd23ff3592845b11209167f679b683cb73acbf351e7a3550a76
+PKG_BUILD_DIR:=$(BUILD_DIR)/rsocket-cpp-$(PKG_SOURCE_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_BINARY_SUBDIR:=builddir
+CMAKE_OPTIONS:= \
+       -DBUILD_BENCHMARKS=OFF \
+       -DBUILD_EXAMPLES=OFF \
+       -DBUILD_TESTS=OFF \
+       -DBUILD_SHARED_LIBS=ON
+CMAKE_INSTALL:=1
+
+define Package/librsocket-cpp
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=C++ implementation of RSocket
+       DEPENDS:=+libfolly +gflags +glog +libopenssl +libyarpl
+endef
+
+define Package/libyarpl
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=yarpl: Yet Another Reactive Programming Library
+       DEPENDS:=+libfolly +gflags +glog +libatomic
+endef
+
+define Package/librsocket-cpp/description
+       C++ implementation of RSocket, and Application protocol providing Reactive Streams semantics
+endef
+
+define Package/libyarpl/description
+       C++ implementation of reactive functional programming including both Observable and Flowable types.
+endef
+
+define Package/librsocket-cpp/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libReactiveSocket.so* $(1)/usr/lib/
+endef
+
+define Package/libyarpl/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyarpl*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,librsocket-cpp))
+$(eval $(call BuildPackage,libyarpl))
diff --git a/libs/librsocket-cpp/patches/100-fix-momit-leaf-frame-pointer-error.patch b/libs/librsocket-cpp/patches/100-fix-momit-leaf-frame-pointer-error.patch
new file mode 100644 (file)
index 0000000..24dfe4b
--- /dev/null
@@ -0,0 +1,16 @@
+diff --git a/yarpl/CMakeLists.txt b/yarpl/CMakeLists.txt
+--- a/yarpl/CMakeLists.txt       Fri May 03 07:45:18 2019 -0700
++++ b/yarpl/CMakeLists.txt       Tue May 07 02:03:23 2019 -0700
+@@ -21,7 +21,11 @@
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-weak-vtables -Wno-padded")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -momit-leaf-frame-pointer")
++  include(CheckCXXCompilerFlag)
++  CHECK_CXX_COMPILER_FLAG("-momit-leaf-frame-pointer" HAVE_OMIT_LEAF_FRAME_POINTER)
++  if(HAVE_OMIT_LEAF_FRAME_POINTER)
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -momit-leaf-frame-pointer")
++  endif()
+ endif()
+
+ if(YARPL_WRAP_SHARED_IN_LOCK)
diff --git a/libs/librsocket-cpp/patches/101-do-not-use-gold.patch b/libs/librsocket-cpp/patches/101-do-not-use-gold.patch
new file mode 100644 (file)
index 0000000..c9f3387
--- /dev/null
@@ -0,0 +1,11 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,7 +67,6 @@
+   if (RSOCKET_ASAN)
+     set(ASAN_FLAGS -fsanitize=address,undefined)
+   endif ()
+-  set(EXTRA_LINK_FLAGS ${EXTRA_LINK_FLAGS} -fuse-ld=gold)
+
+ elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
+   if (RSOCKET_ASAN)
index d29838b55f2d19b2444c74bf0b7ebfe51e3d3f40..c52ca822225bb08759e94f2d818fffdeb696cbc8 100644 (file)
@@ -9,11 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsearpc
 PKG_VERSION:=3.1.0
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=cbd86d3c37b54ca2060ca537a07940fe3e98498abf345b2f3e1cec488230231a
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=LICENSE.txt
@@ -30,7 +31,6 @@ define Package/libsearpc
     SECTION:=libs
     CATEGORY:=Libraries
     TITLE:=Seafile RPC Library
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://seafile.com
     DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
 endef
diff --git a/libs/libsigar/Makefile b/libs/libsigar/Makefile
new file mode 100644 (file)
index 0000000..7a332e6
--- /dev/null
@@ -0,0 +1,40 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libsigar
+PKG_SOURCE_DATE:=2017-02-21
+PKG_SOURCE_VERSION:=a6c61edf8c64e013411e8c9d753165cd03102c6e
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/boundary/sigar/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=5232f0fa994ab60ad4622364fad0297c0054e04f0cfec9c586b14e33bbc387da
+PKG_BUILD_DIR:=$(BUILD_DIR)/sigar-$(PKG_SOURCE_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILE:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
+
+define Package/libsigar
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=System Information Gatherer And Reporter
+       URL:=https://github.com/boundary/sigar
+       DEPENDS:=+libtirpc
+       MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/libsigar/description
+       System Information Gatherer And Reporter
+endef
+
+define Package/libsigar/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigar.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libsigar))
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 babc08973bf5ce1e88a96fec58e2e6447dbac6c2..7f85982fb1955865f035e89d5170960ad8146870 100644 (file)
@@ -12,7 +12,7 @@ PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
 PKG_NAME:=libssh
 PKG_VERSION:=0.7.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.libssh.org/files/0.7/
diff --git a/libs/libssh/patches/010-openssl-11-deprecated.patch b/libs/libssh/patches/010-openssl-11-deprecated.patch
new file mode 100644 (file)
index 0000000..2a62d9d
--- /dev/null
@@ -0,0 +1,39 @@
+--- a/src/dh.c
++++ b/src/dh.c
+@@ -131,11 +131,15 @@ int ssh_get_random(void *where, int len, int strong){
+   return 1;
+ #elif defined HAVE_LIBCRYPTO
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+   if (strong) {
+     return RAND_bytes(where,len);
+   } else {
+     return RAND_pseudo_bytes(where,len);
+   }
++#else
++    return RAND_bytes(where,len);
++#endif
+ #endif
+   /* never reached */
+@@ -198,7 +202,9 @@ int ssh_crypto_init(void) {
+     }
+     bignum_bin2bn(p_group14_value, P_GROUP14_LEN, p_group14);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+     OpenSSL_add_all_algorithms();
++#endif
+ #endif
+@@ -219,8 +225,10 @@ void ssh_crypto_finalize(void) {
+ #ifdef HAVE_LIBGCRYPT
+     gcry_control(GCRYCTL_TERM_SECMEM);
+ #elif defined HAVE_LIBCRYPTO
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+     EVP_cleanup();
+     CRYPTO_cleanup_all_ex_data();
++#endif
+ #endif
+     ssh_crypto_initialized=0;
+   }
diff --git a/libs/libssh/patches/020-openssl-threads.patch b/libs/libssh/patches/020-openssl-threads.patch
new file mode 100644 (file)
index 0000000..1a801b3
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/src/threads.c
++++ b/src/threads.c
+@@ -106,6 +106,8 @@ static int libgcrypt_thread_init(void){
+ static void **libcrypto_mutexes;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
+ static void libcrypto_lock_callback(int mode, int i, const char *file, int line){
+       (void)file;
+       (void)line;
+@@ -160,6 +162,16 @@ static void libcrypto_thread_finalize(void){
+ }
++#else
++
++static int libcrypto_thread_init(void){
++      return SSH_OK;
++}
++
++static void libcrypto_thread_finalize(void){
++}
++#endif
++
+ #endif
+ /** @internal
index 36c86120e3e17a26a68fab8ff4a0450800b46463..01b4c704ec6877fbd69b5706f30a8628a8c19263 100644 (file)
@@ -8,28 +8,28 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libusbmuxd
-PKG_VERSION:=1.1.0
-PKG_RELEASE:=2
+PKG_SOURCE_DATE:=2019-03-23
+PKG_SOURCE_VERSION:=873252dc8b4e469c7dc692064ac616104fca5f65
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING.LGPLv2.1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=4397b3376dc4e4cb1c991d0aed61ce6482614196
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=e145b567cdefb1d2536f3eec863769c77474ce9a5d9c4c81ab0a75dc6fe3056a
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/libimobiledevice/libusbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=47e39ce87b05ca873c16efaa517247aa9db137625dd910d566fb3cd99b4a1d18
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libusbmuxd/Default
   TITLE:=USB multiplexing daemon
-  URL:=http://www.libimobiledevice.org/
+  URL:=https://www.libimobiledevice.org/
 endef
 
 define Package/libusbmuxd/Default/description
@@ -66,7 +66,7 @@ define Package/libusbmuxd-utils/description
   This package contains the libusbmuxd utilities.
 endef
 
-TARGET_CFLAGS += $(FPIC)
+CONFIGURE_ARGS += --with-pic
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
index 7f4b46f4e6c46493b01c832340dc4a28356ec456..4800f6de1da0728d2438ad94157b401068bb28b4 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuwsc
-PKG_VERSION:=3.2.1
+PKG_VERSION:=3.2.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/libuwsc/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0dca131a1046327b6020a190ba8e6d46f62a8367ea91f4e85bf5bfde2aa11415
+PKG_HASH:=824a29446ba12171f8f08778667c6b3a0528e18c249f0cf1f89b5f129cd2aadd
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
index cca247856c74b2fe013cf86cec76b4269c3edaef..81ad4cd361f120d57722488046fd9a006c905f05 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libvpx
-PKG_VERSION:=1.7.0
+PKG_VERSION:=1.8.0
 PKG_RELEASE:=1
 
 PKG_REV:=v$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=be50ff18464d614a08726597ecbd72d1f11ec69ec04df2d9acdf646ecd9adcca
+PKG_MIRROR_HASH:=caf53ffff549fefb14d8d054db014c6394e1955d199b80dc985ef6098bd4213d
 PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=$(PKG_REV)
@@ -46,14 +46,14 @@ define Package/libvpx/description
 endef
 
 CONFIGURE_ARGS = \
-               --target=generic-gnu \
-               --prefix=$(CONFIGURE_PREFIX) \
-               --libdir=/usr/lib \
-               --enable-static \
-               --enable-shared \
-        --disable-examples \
-        --disable-docs \
-        --disable-unit-tests \
+       --target=generic-gnu \
+       --prefix=$(CONFIGURE_PREFIX) \
+       --libdir=/usr/lib \
+       --enable-static \
+       --enable-shared \
+       --disable-examples \
+       --disable-docs \
+       --disable-unit-tests \
 
 # Add --enable-small as openwrt gcc flags are overwritten
 ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
@@ -62,12 +62,9 @@ endif
 
 # libvpx expects gcc as linker but uses $LD if provided
 # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
-CONFIGURE_VARS += \
-    CROSS=$(GNU_TARGET_NAME) \
-       LD="$(TARGET_CC)" \
-
-MAKE_FLAGS += \
-       LD="$(TARGET_CC)" \
+CONFIGURE_VARS := $(filter-out LD=%,$(CONFIGURE_VARS)) LD="$(TARGET_CC)" \
+       CROSS=$(GNU_TARGET_NAME)
+MAKE_FLAGS := $(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC)"
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/vpx/
diff --git a/libs/libwangle/Makefile b/libs/libwangle/Makefile
new file mode 100644 (file)
index 0000000..055c3f1
--- /dev/null
@@ -0,0 +1,41 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libwangle
+PKG_VERSION:=2019.05.06.00
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/wangle/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=de145e3748a5f71be1883ad2ea4be37e99f99fcb1838a6a258ca2c4cd0d053e7
+PKG_BUILD_DIR:=$(BUILD_DIR)/wangle-$(PKG_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=wangle
+CMAKE_OPTIONS:= \
+       -DBUILD_SHARED_LIBS=ON
+CMAKE_INSTALL:=1
+
+define Package/libwangle
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=Wangle: C++ networking library
+       DEPENDS:=+libstdcpp +libfolly +libsodium +libfizz
+endef
+
+define Package/libwangle/description
+       Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
+       This package includes the shared library.
+endef
+
+define Package/libwangle/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwangle.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libwangle))
index 480359c1ea65eff7ca72134b6324743e0f3eb728..6bbcf4f885121a3d67d6f470934f533aacd44627 100644 (file)
@@ -8,55 +8,49 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=x264
-PKG_VERSION:=snapshot-20181006-2245
+PKG_VERSION:=snapshot-20190324-2245
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://download.videolan.org/x264/snapshots/
 PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>
-PKG_HASH:=eae60e969958c0759554d5e338dea9b91f1f1fe85d9523c152c2259d8546f469
+PKG_HASH:=68010057edaadffc7593933d13084e8d32e041c42b17c089513d88c917f2ad54
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -std=gnu99 -fPIC -O3 -ffast-math -I.
-MAKE_FLAGS+= LD="$(TARGET_CC) -o"
+TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS))
+MAKE_FLAGS:=$(filter-out LD=%,$(MAKE_FLAGS)) LD="$(TARGET_CC) -o"
 
-# ARM ASM depends on ARM1156 or later, blacklist earlier or incompatible cores
-# AMD Geode LX and i486 do not have SSE
-CPU_ASM_BLACKLIST:=geode i486 arm920t arm926ej-s arm1136j-s arm1176jzf-s fa526 mpcore xscale \
-                  464fp mips32 24kc 34kc 74kc octeon mips64
+# Instead of blacklisting a boatload of platforms just enable
+# optimization where it makes sense (matters) ie ARMv7+ and x86_64
 
-ifneq ($(CONFIG_SOFT_FLOAT)$(findstring $(call qstrip,$(CONFIG_CPU_TYPE)),$(CPU_ASM_BLACKLIST)),)
-  CONFIGURE_VARS+= AS= 
-  MAKE_FLAGS+= AS= 
-  CONFIGURE_ARGS += --disable-asm
-else
+ifneq ($(findstring cortex-a,$(CPU_TYPE)),)
   CONFIGURE_ARGS += --enable-lto
-ifneq ($(CONFIG_TARGET_x86),)
-ifeq ($(CONFIG_NASM),y)
-  CONFIGURE_VARS+= AS=nasm
-  MAKE_FLAGS+= AS=nasm
-else
-  CONFIGURE_VARS+= AS= 
-  MAKE_FLAGS+= AS= 
-  CONFIGURE_ARGS += --disable-asm
-endif
-endif
+  else
+  ifneq ($(CONFIG_TARGET_x86_64),)
+    CONFIGURE_ARGS += --enable-lto
+    ifeq ($(CONFIG_NASM),y)
+      CONFIGURE_VARS+= AS=nasm
+      MAKE_FLAGS+= AS=nasm
+    endif
+    else
+    CONFIGURE_ARGS += --disable-asm
+  endif
 endif
 
 CONFIGURE_ARGS += \
+               --disable-cli \
                --enable-shared \
+               --disable-opencl \
                --enable-pic \
-               --enable-strip \
-               --disable-cli \
                --disable-avs \
                --disable-ffms \
+               --disable-gpac \
                --disable-lsmash
 
 define Package/libx264
diff --git a/libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch b/libs/libx264/patches/001-fix-x32-build-by-disabling-asm.patch
new file mode 100644 (file)
index 0000000..a41d4e7
--- /dev/null
@@ -0,0 +1,48 @@
+From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 14:22:32 -0700
+Subject: [PATCH] Fix X32 build by disabling asm
+
+This applies gentoo's x32 patch, adjusted slightly, which disables asm support
+for x32 as well as correcting -m.
+
+Debian has a different patch which does the same, and there's a superior yet
+out of date patch series on the x264 list which keeps asm support enabled, but
+doesn't successfully build at this time, and my assembly is very rusty.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -736,7 +736,13 @@ case $host_cpu in
+         AS_EXT=".asm"
+         ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+         stack_alignment=16
+-        [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++        if [ $compiler = GNU ]; then
++            if cpp_check "" "" "__ILP32__" ; then
++                CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
++            else
++                CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++            fi
++        fi
+         if [ "$SYS" = MACOSX ]; then
+             ASFLAGS="$ASFLAGS -f macho64 -DPREFIX"
+             if cc_check '' "-arch x86_64"; then
+@@ -755,7 +761,11 @@ case $host_cpu in
+                 RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+             fi
+         else
+-            ASFLAGS="$ASFLAGS -f elf64"
++            if cpp_check "" "" "__ILP32__" ; then
++                asm=no
++            else
++                ASFLAGS="$ASFLAGS -f elf64"
++            fi
+         fi
+         ;;
+     powerpc*)
diff --git a/libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch b/libs/libx264/patches/002-dont-default-to-cortex-a9-with-neon.patch
new file mode 100644 (file)
index 0000000..7062b67
--- /dev/null
@@ -0,0 +1,28 @@
+From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Fri, 2 Feb 2018 15:10:08 +0200
+Subject: [PATCH] dont default to cortex-a9 with neon
+
+-march flag is not in CFLAGS so this will always default to
+ -mcpu=cortex-a8 -mfpu=neon.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -940,9 +940,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $A
+ fi
+ if [ $asm = auto -a $ARCH = ARM ] ; then
+-    # set flags so neon is built by default
+-    [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
+-
+     cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
+     if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
+         define HAVE_ARMV6
index bf25e520358c374c334e238779716b12d781073b..3896a02c6c5570a3679a2637909b2634c718099e 100644 (file)
@@ -8,15 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xerces-c
-PKG_MAIN_VER:=3.2
 PKG_VERSION:=3.2.2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
 PKG_HASH:=6daca3b23364d8d883dc77a73f681242f69389e3564543287ed3d073007e0a8e
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
@@ -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,27 @@ 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 \
+       --with-pic
+
+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 a0663bc9520ce8095743e0979be963763b0ab105..795bf2a56008d9f0338041bdf52729607abcce5d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxslt
 PKG_VERSION:=1.1.33
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
@@ -19,6 +19,7 @@ PKG_HASH:=8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:xmlsoft:libxslt
 
 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
 
diff --git a/libs/libxslt/patches/100-fix-cve-2019-11068.patch b/libs/libxslt/patches/100-fix-cve-2019-11068.patch
new file mode 100644 (file)
index 0000000..260f35d
--- /dev/null
@@ -0,0 +1,120 @@
+From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Sun, 24 Mar 2019 09:51:39 +0100
+Subject: [PATCH] Fix security framework bypass
+
+xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
+don't check for this condition and allow access. With a specially
+crafted URL, xsltCheckRead could be tricked into returning an error
+because of a supposedly invalid URL that would still be loaded
+succesfully later on.
+
+Fixes #12.
+
+Thanks to Felix Wilhelm for the report.
+---
+ libxslt/documents.c | 18 ++++++++++--------
+ libxslt/imports.c   |  9 +++++----
+ libxslt/transform.c |  9 +++++----
+ libxslt/xslt.c      |  9 +++++----
+ 4 files changed, 25 insertions(+), 20 deletions(-)
+
+diff --git a/libxslt/documents.c b/libxslt/documents.c
+index 3f3a7312..4aad11bb 100644
+--- a/libxslt/documents.c
++++ b/libxslt/documents.c
+@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
+       int res;
+       res = xsltCheckRead(ctxt->sec, ctxt, URI);
+-      if (res == 0) {
+-          xsltTransformError(ctxt, NULL, NULL,
+-               "xsltLoadDocument: read rights for %s denied\n",
+-                           URI);
++      if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(ctxt, NULL, NULL,
++                     "xsltLoadDocument: read rights for %s denied\n",
++                                 URI);
+           return(NULL);
+       }
+     }
+@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) {
+       int res;
+       res = xsltCheckRead(sec, NULL, URI);
+-      if (res == 0) {
+-          xsltTransformError(NULL, NULL, NULL,
+-               "xsltLoadStyleDocument: read rights for %s denied\n",
+-                           URI);
++      if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsltLoadStyleDocument: read rights for %s denied\n",
++                                 URI);
+           return(NULL);
+       }
+     }
+diff --git a/libxslt/imports.c b/libxslt/imports.c
+index 874870cc..3783b247 100644
+--- a/libxslt/imports.c
++++ b/libxslt/imports.c
+@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) {
+       int secres;
+       secres = xsltCheckRead(sec, NULL, URI);
+-      if (secres == 0) {
+-          xsltTransformError(NULL, NULL, NULL,
+-               "xsl:import: read rights for %s denied\n",
+-                           URI);
++      if (secres <= 0) {
++            if (secres == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsl:import: read rights for %s denied\n",
++                                 URI);
+           goto error;
+       }
+     }
+diff --git a/libxslt/transform.c b/libxslt/transform.c
+index 13793914..0636dbd0 100644
+--- a/libxslt/transform.c
++++ b/libxslt/transform.c
+@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
+      */
+     if (ctxt->sec != NULL) {
+       ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
+-      if (ret == 0) {
+-          xsltTransformError(ctxt, NULL, inst,
+-               "xsltDocumentElem: write rights for %s denied\n",
+-                           filename);
++      if (ret <= 0) {
++            if (ret == 0)
++                xsltTransformError(ctxt, NULL, inst,
++                     "xsltDocumentElem: write rights for %s denied\n",
++                                 filename);
+           xmlFree(URL);
+           xmlFree(filename);
+           return;
+diff --git a/libxslt/xslt.c b/libxslt/xslt.c
+index 780a5ad7..a234eb79 100644
+--- a/libxslt/xslt.c
++++ b/libxslt/xslt.c
+@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
+       int res;
+       res = xsltCheckRead(sec, NULL, filename);
+-      if (res == 0) {
+-          xsltTransformError(NULL, NULL, NULL,
+-               "xsltParseStylesheetFile: read rights for %s denied\n",
+-                           filename);
++      if (res <= 0) {
++            if (res == 0)
++                xsltTransformError(NULL, NULL, NULL,
++                     "xsltParseStylesheetFile: read rights for %s denied\n",
++                                 filename);
+           return(NULL);
+       }
+     }
+-- 
+2.18.1
+
index 9167da74f2e2e17f3cd25da269c96622138baa54..314d556b423d054fc1711fc824fb456bf4522112 100644 (file)
@@ -10,14 +10,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=log4cplus
 PKG_VERSION:=2.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/
 PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73
 
-PKG_LICENSE_FILE:=LICENSE
+PKG_LICENSE_FILES:=LICENSE
 CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index 9216d7b6bc410d628ce1bc19c92333e51a012004..24c531b65a947a7bcf6cd67dc8d28396d291b159 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=loudmouth
 PKG_VERSION:=1.5.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mcabber/loudmouth/tar.gz/$(PKG_VERSION)?
@@ -24,6 +24,7 @@ PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/loudmouth
   SECTION:=libs
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..f78d24ec82b76f8522eaae49e8b93f4dffcc0d7c 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=measurement-kit
-PKG_VERSION:=0.10.0
+PKG_VERSION:=0.10.3
 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:=04bc1832fbaa54a9fde4923e8f44a2f99610a862c228dd05977c36f54870d80f
 
 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/measurement-kit/patches/003-fix-openssl-depredecated-api.patch b/libs/measurement-kit/patches/003-fix-openssl-depredecated-api.patch
new file mode 100644 (file)
index 0000000..9afc65e
--- /dev/null
@@ -0,0 +1,28 @@
+From 45904ae4548c848d053bea20e2f3e38189043c3a Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Fri, 3 May 2019 23:37:10 -0700
+Subject: [PATCH] Fix compilation without deprecated OpenSSL APIs (#1785)
+
+Initialization is deprecated and causes compile errors with OpenSSL 1.1 when
+deprecated APIs are disabled.
+---
+ src/libmeasurement_kit/net/libssl.hpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libmeasurement_kit/net/libssl.hpp b/src/libmeasurement_kit/net/libssl.hpp
+index eacee86ae..d1cecebbb 100644
+--- a/src/libmeasurement_kit/net/libssl.hpp
++++ b/src/libmeasurement_kit/net/libssl.hpp
+@@ -38,10 +38,12 @@ static inline void libssl_init_once(SharedPtr<Logger> logger) {
+         static bool initialized = false;
+         if (!initialized) {
+             logger->debug2("initializing libssl once");
++#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
+             SSL_library_init();
+             ERR_load_crypto_strings();
+             SSL_load_error_strings();
+             OpenSSL_add_all_algorithms();
++#endif
+             initialized = true;
+         }
+     });
index 724af389345dfe13098692c5ec3ff4f5d69980dd..bec217b227dc11282576201261f6b4abbe3b90f0 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nss
-PKG_VERSION:=3.43
+PKG_VERSION:=3.44
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENCE:=MPL-2.0
@@ -16,7 +16,7 @@ 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_HASH:=a5620e59b6eeedfd5a12c9298b50ad92e9898b223e214eb675e36f4ffb5b6aff
 
 PKG_BUILD_PARALLEL:=0
 
@@ -28,7 +28,7 @@ define Package/libnss
   CATEGORY:=Libraries
   TITLE:=Mozilla's SSL and TLS implementation
   URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
-  DEPENDS:=+libpthread +librt +libsqlite3 +nspr
+  DEPENDS:=+libpthread +libsqlite3 +nspr
 endef
 
 define Package/nss-utils
@@ -61,6 +61,7 @@ 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
@@ -73,6 +74,7 @@ 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
@@ -97,19 +99,21 @@ define Build/InstallDev
         $(1)/usr/include/nss \
         $(1)/usr/lib \
         $(1)/usr/lib/pkgconfig
-       $(FIND) $(PKG_BUILD_DIR)/nss  -type f -name *.h \
-           -exec $(CP) -a {} $(1)/usr/include/nss/ \;
-       $(FIND) $(PKG_BUILD_DIR)/nss -type f -name *.so \
-           -exec $(CP) -a {} $(1)/usr/lib/ \;
-       $(FIND) $(PKG_BUILD_DIR)/nss -type f -name *.pc \
-           -exec $(CP) -a {} $(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)/nss/cmd/certutil/build_dir/certutil $(1)/usr/bin
-       $(CP) $(PKG_BUILD_DIR)/nss/cmd/pk12util/build_dir/pk12util $(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
@@ -119,12 +123,12 @@ define Package/libnss/install
         $(1)/etc/pki/nssdb \
         $(1)/etc/ipsec.d
 
-       $(CP) $(PKG_BUILD_DIR)/nss/lib/nss/build_dir/libnss3.so $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/nss/lib/smime/build_dir/libsmime3.so $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/nss/lib/ssl/build_dir/libssl3.so $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/nss/lib/util/build_dir/libnssutil3.so $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/nss/lib/softoken/build_dir/libsoftokn3.so $(1)/usr/lib/
-       $(CP) $(PKG_BUILD_DIR)/nss/lib/freebl/build_dir/$(OS_TARGET)_SINGLE_SHLIB/libfreeblpriv3.so $(1)/usr/lib/
+       $(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
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 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 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 ca9bfd266bb7d2db163e14b86708248919f29e66..3bfa9d4e507516503418afe1fbbe290efc0c6b03 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tcp_wrappers
 PKG_VERSION:=7.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security
@@ -30,7 +30,7 @@ define Package/libwrap
   MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
 
-TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += $(FPIC) -Wall
 
 ifeq ($(CONFIG_USE_MUSL),)
 TARGET_EXTRA_LIBS:=LIBS=-lnsl
diff --git a/libs/tcp_wrappers/patches/006-compilation-warnings.patch b/libs/tcp_wrappers/patches/006-compilation-warnings.patch
new file mode 100644 (file)
index 0000000..5cbd358
--- /dev/null
@@ -0,0 +1,765 @@
+diff -u tcp_wrappers_7.6.orig/clean_exit.c tcp_wrappers_7.6/clean_exit.c
+--- tcp_wrappers_7.6.orig/clean_exit.c 1994-12-29 03:42:20.000000000 +1100
++++ tcp_wrappers_7.6/clean_exit.c      2017-11-14 22:50:48.000000000 +1100
+@@ -9,10 +9,11 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
++static char sccsid[] __attribute__((__unused__)) = "@(#) clean_exit.c 1.4 94/12/28 17:42:19";
+ #endif
+ #include <stdio.h>
++#include <unistd.h>
+ extern void exit();
+diff -u tcp_wrappers_7.6.orig/diag.c tcp_wrappers_7.6/diag.c
+--- tcp_wrappers_7.6.orig/diag.c       1994-12-29 03:42:20.000000000 +1100
++++ tcp_wrappers_7.6/diag.c    2017-11-14 22:51:09.000000000 +1100
+@@ -10,7 +10,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) diag.c 1.1 94/12/28 17:42:20";
++static char sccsid[] __attribute__((__unused__)) = "@(#) diag.c 1.1 94/12/28 17:42:20";
+ #endif
+ /* System libraries */
+diff -u tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
+--- tcp_wrappers_7.6.orig/eval.c       1995-01-31 05:51:46.000000000 +1100
++++ tcp_wrappers_7.6/eval.c    2017-11-14 22:51:50.000000000 +1100
+@@ -19,7 +19,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) eval.c 1.3 95/01/30 19:51:45";
++static char sccsid[] __attribute__((__unused__)) = "@(#) eval.c 1.3 95/01/30 19:51:45";
+ #endif
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/fakelog.c tcp_wrappers_7.6/fakelog.c
+--- tcp_wrappers_7.6.orig/fakelog.c    1994-12-29 03:42:22.000000000 +1100
++++ tcp_wrappers_7.6/fakelog.c 2017-11-14 22:52:07.000000000 +1100
+@@ -6,7 +6,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
++static char sccsid[] __attribute__((__unused__)) = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
+ #endif
+ #include <stdio.h>
+@@ -17,7 +17,7 @@
+ /* ARGSUSED */
+-openlog(name, logopt, facility)
++void    openlog(name, logopt, facility)
+ char   *name;
+ int     logopt;
+ int     facility;
+@@ -27,7 +27,7 @@
+ /* vsyslog - format one record */
+-vsyslog(severity, fmt, ap)
++void    vsyslog(severity, fmt, ap)
+ int     severity;
+ char   *fmt;
+ va_list ap;
+@@ -43,7 +43,7 @@
+ /* VARARGS */
+-VARARGS(syslog, int, severity)
++void    VARARGS(syslog, int, severity)
+ {
+     va_list ap;
+     char   *fmt;
+@@ -56,7 +56,7 @@
+ /* closelog - dummy */
+-closelog()
++void    closelog()
+ {
+     /* void */
+ }
+diff -u tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
+--- tcp_wrappers_7.6.orig/fix_options.c        2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/fix_options.c     2017-11-14 22:52:22.000000000 +1100
+@@ -6,7 +6,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
++static char sccsid[] __attribute__((__unused__)) = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
+ #endif
+ #include <sys/types.h>
+@@ -29,14 +29,14 @@
+ /* fix_options - get rid of IP-level socket options */
+-fix_options(request)
+-struct request_info *request;
++void    fix_options(request)
++struct  request_info *request;
+ {
+ #ifdef IP_OPTIONS
+     unsigned char optbuf[BUFFER_SIZE / 3], *cp;
+     char    lbuf[BUFFER_SIZE], *lp;
+ #if !defined(__GLIBC__)
+-    int     optsize = sizeof(optbuf), ipproto;
++    unsigned int  optsize = sizeof(optbuf), ipproto;
+ #else /* __GLIBC__ */
+     size_t  optsize = sizeof(optbuf);
+     int     ipproto;
+diff -u tcp_wrappers_7.6.orig/fromhost.c tcp_wrappers_7.6/fromhost.c
+--- tcp_wrappers_7.6.orig/fromhost.c   1994-12-29 03:42:24.000000000 +1100
++++ tcp_wrappers_7.6/fromhost.c        2017-11-14 22:52:33.000000000 +1100
+@@ -11,7 +11,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
++static char sccsid[] __attribute__((__unused__)) = "@(#) fromhost.c 1.17 94/12/28 17:42:23";
+ #endif
+ #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
+diff -u tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c       2017-11-13 09:29:25.000000000 +1100
++++ tcp_wrappers_7.6/hosts_access.c    2017-11-14 22:52:48.000000000 +1100
+@@ -18,7 +18,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
++static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
+ #endif
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/hosts_ctl.c tcp_wrappers_7.6/hosts_ctl.c
+--- tcp_wrappers_7.6.orig/hosts_ctl.c  1994-12-29 03:42:28.000000000 +1100
++++ tcp_wrappers_7.6/hosts_ctl.c       2017-11-14 22:53:01.000000000 +1100
+@@ -12,7 +12,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
++static char sccsid[] __attribute__((__unused__)) = "@(#) hosts_ctl.c 1.4 94/12/28 17:42:27";
+ #endif
+ #include <stdio.h>
+diff -u tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
+--- tcp_wrappers_7.6.orig/inetcf.c     1997-02-12 12:13:24.000000000 +1100
++++ tcp_wrappers_7.6/inetcf.c  2017-11-14 22:53:11.000000000 +1100
+@@ -6,7 +6,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
++static char sccsid[] __attribute__((__unused__)) = "@(#) inetcf.c 1.7 97/02/12 02:13:23";
+ #endif
+ #include <sys/types.h>
+@@ -14,6 +14,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stdlib.h>
+ extern int errno;
+ extern void exit();
+@@ -21,6 +22,8 @@
+ #include "tcpd.h"
+ #include "inetcf.h"
++extern int check_path(char *, struct stat *);
++
+  /*
+   * Network configuration files may live in unusual places. Here are some
+   * guesses. Shorter names follow longer ones.
+diff -u tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
+--- tcp_wrappers_7.6.orig/misc.c       2017-11-13 09:29:25.000000000 +1100
++++ tcp_wrappers_7.6/misc.c    2017-11-14 22:53:23.000000000 +1100
+@@ -5,7 +5,7 @@
+   */
+ #ifndef lint
+-static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29";
++static char sccsid[] __attribute__((__unused__)) = "@(#) misc.c 1.2 96/02/11 17:01:29";
+ #endif
+ #include <sys/types.h>
+diff -u tcp_wrappers_7.6.orig/myvsyslog.c tcp_wrappers_7.6/myvsyslog.c
+--- tcp_wrappers_7.6.orig/myvsyslog.c  1994-12-29 03:42:34.000000000 +1100
++++ tcp_wrappers_7.6/myvsyslog.c       2017-11-14 22:53:35.000000000 +1100
+@@ -8,7 +8,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
++static char sccsid[] __attribute__((__unused__)) = "@(#) myvsyslog.c 1.1 94/12/28 17:42:33";
+ #endif
+ #ifdef vsyslog
+diff -u tcp_wrappers_7.6.orig/options.c tcp_wrappers_7.6/options.c
+--- tcp_wrappers_7.6.orig/options.c    2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/options.c 2017-11-14 22:53:50.000000000 +1100
+@@ -29,7 +29,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) options.c 1.17 96/02/11 17:01:31";
++static char sccsid[] __attribute__((__unused__)) = "@(#) options.c 1.17 96/02/11 17:01:31";
+ #endif
+ /* System libraries. */
+@@ -47,6 +47,8 @@
+ #include <ctype.h>
+ #include <setjmp.h>
+ #include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
+ #ifndef MAXPATHNAMELEN
+ #define MAXPATHNAMELEN  BUFSIZ
+@@ -108,21 +110,21 @@
+ /* List of known keywords. Add yours here. */
+ static struct option option_table[] = {
+-    "user", user_option, NEED_ARG,
+-    "group", group_option, NEED_ARG,
+-    "umask", umask_option, NEED_ARG,
+-    "linger", linger_option, NEED_ARG,
+-    "keepalive", keepalive_option, 0,
+-    "spawn", spawn_option, NEED_ARG | EXPAND_ARG,
+-    "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST,
+-    "rfc931", rfc931_option, OPT_ARG,
+-    "setenv", setenv_option, NEED_ARG | EXPAND_ARG,
+-    "nice", nice_option, OPT_ARG,
+-    "severity", severity_option, NEED_ARG,
+-    "allow", allow_option, USE_LAST,
+-    "deny", deny_option, USE_LAST,
+-    "banners", banners_option, NEED_ARG,
+-    0,
++   { "user", user_option, NEED_ARG },
++   { "group", group_option, NEED_ARG },
++   { "umask", umask_option, NEED_ARG },
++   { "linger", linger_option, NEED_ARG },
++   { "keepalive", keepalive_option, 0 },
++   { "spawn", spawn_option, NEED_ARG | EXPAND_ARG },
++   { "twist", twist_option, NEED_ARG | EXPAND_ARG | USE_LAST },
++   { "rfc931", rfc931_option, OPT_ARG },
++   { "setenv", setenv_option, NEED_ARG | EXPAND_ARG },
++   { "nice", nice_option, OPT_ARG },
++   { "severity", severity_option, NEED_ARG },
++   { "allow", allow_option, USE_LAST },
++   { "deny", deny_option, USE_LAST },
++   { "banners", banners_option, NEED_ARG },
++   { 0 },
+ };
+ /* process_options - process access control options */
+@@ -447,88 +449,88 @@
+ static struct syslog_names log_fac[] = {
+ #ifdef LOG_KERN
+-    "kern", LOG_KERN,
++    { "kern", LOG_KERN },
+ #endif
+ #ifdef LOG_USER
+-    "user", LOG_USER,
++    { "user", LOG_USER },
+ #endif
+ #ifdef LOG_MAIL
+-    "mail", LOG_MAIL,
++    { "mail", LOG_MAIL },
+ #endif
+ #ifdef LOG_DAEMON
+-    "daemon", LOG_DAEMON,
++    { "daemon", LOG_DAEMON },
+ #endif
+ #ifdef LOG_AUTH
+-    "auth", LOG_AUTH,
++    { "auth", LOG_AUTH },
+ #endif
+ #ifdef LOG_LPR
+-    "lpr", LOG_LPR,
++    { "lpr", LOG_LPR },
+ #endif
+ #ifdef LOG_NEWS
+-    "news", LOG_NEWS,
++    { "news", LOG_NEWS },
+ #endif
+ #ifdef LOG_UUCP
+-    "uucp", LOG_UUCP,
++    { "uucp", LOG_UUCP },
+ #endif
+ #ifdef LOG_CRON
+-    "cron", LOG_CRON,
++    { "cron", LOG_CRON },
+ #endif
+ #ifdef LOG_FTP
+-    "ftp", LOG_FTP,
++    { "ftp", LOG_FTP },
+ #endif
+ #ifdef LOG_LOCAL0
+-    "local0", LOG_LOCAL0,
++    { "local0", LOG_LOCAL0 },
+ #endif
+ #ifdef LOG_LOCAL1
+-    "local1", LOG_LOCAL1,
++    { "local1", LOG_LOCAL1 },
+ #endif
+ #ifdef LOG_LOCAL2
+-    "local2", LOG_LOCAL2,
++    { "local2", LOG_LOCAL2 },
+ #endif
+ #ifdef LOG_LOCAL3
+-    "local3", LOG_LOCAL3,
++    { "local3", LOG_LOCAL3 },
+ #endif
+ #ifdef LOG_LOCAL4
+-    "local4", LOG_LOCAL4,
++    { "local4", LOG_LOCAL4 },
+ #endif
+ #ifdef LOG_LOCAL5
+-    "local5", LOG_LOCAL5,
++    { "local5", LOG_LOCAL5 },
+ #endif
+ #ifdef LOG_LOCAL6
+-    "local6", LOG_LOCAL6,
++    { "local6", LOG_LOCAL6 },
+ #endif
+ #ifdef LOG_LOCAL7
+-    "local7", LOG_LOCAL7,
++    { "local7", LOG_LOCAL7 },
+ #endif
+-    0,
++    { 0 },
+ };
+ static struct syslog_names log_sev[] = {
+ #ifdef LOG_EMERG
+-    "emerg", LOG_EMERG,
++    { "emerg", LOG_EMERG },
+ #endif
+ #ifdef LOG_ALERT
+-    "alert", LOG_ALERT,
++    { "alert", LOG_ALERT },
+ #endif
+ #ifdef LOG_CRIT
+-    "crit", LOG_CRIT,
++    { "crit", LOG_CRIT },
+ #endif
+ #ifdef LOG_ERR
+-    "err", LOG_ERR,
++    { "err", LOG_ERR },
+ #endif
+ #ifdef LOG_WARNING
+-    "warning", LOG_WARNING,
++    { "warning", LOG_WARNING },
+ #endif
+ #ifdef LOG_NOTICE
+-    "notice", LOG_NOTICE,
++    { "notice", LOG_NOTICE },
+ #endif
+ #ifdef LOG_INFO
+-    "info", LOG_INFO,
++    { "info", LOG_INFO },
+ #endif
+ #ifdef LOG_DEBUG
+-    "debug", LOG_DEBUG,
++    { "debug", LOG_DEBUG },
+ #endif
+-    0,
++    { 0 },
+ };
+ /* severity_map - lookup facility or severity value */
+@@ -589,7 +591,7 @@
+     if (src[0] == 0)
+       return (0);
+-    while (ch = *src) {
++    while ((ch = *src)) {
+       if (ch == ':') {
+           if (*++src == 0)
+               tcpd_warn("rule ends in \":\"");
+diff -u tcp_wrappers_7.6.orig/patchlevel.h tcp_wrappers_7.6/patchlevel.h
+--- tcp_wrappers_7.6.orig/patchlevel.h 1997-03-22 05:27:24.000000000 +1100
++++ tcp_wrappers_7.6/patchlevel.h      2017-11-14 22:54:15.000000000 +1100
+@@ -1,3 +1,3 @@
+ #ifndef lint
+-static char patchlevel[] = "@(#) patchlevel 7.6 97/03/21 19:27:23";
++static char patchlevel[] __attribute__((__unused__)) = "@(#) patchlevel 7.6 97/03/21 19:27:23";
+ #endif
+diff -u tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
+--- tcp_wrappers_7.6.orig/percent_m.c  2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/percent_m.c       2017-11-14 22:54:31.000000000 +1100
+@@ -5,7 +5,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
++static char sccsid[] __attribute__((__unused__)) = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
+ #endif
+ #include <stdio.h>
+@@ -27,7 +27,7 @@
+     char   *bp = obuf;
+     char   *cp = ibuf;
+-    while (*bp = *cp)
++    while ((*bp = *cp))
+       if (*cp == '%' && cp[1] == 'm') {
+ #ifdef HAVE_STRERROR
+             strcpy(bp, strerror(errno));
+diff -u tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
+--- tcp_wrappers_7.6.orig/percent_x.c  1994-12-29 03:42:38.000000000 +1100
++++ tcp_wrappers_7.6/percent_x.c       2017-11-14 22:54:40.000000000 +1100
+@@ -11,7 +11,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
++static char sccsid[] __attribute__((__unused__)) = "@(#) percent_x.c 1.4 94/12/28 17:42:37";
+ #endif
+ /* System libraries. */
+@@ -19,6 +19,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <unistd.h>
+ extern void exit();
+diff -u tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
+--- tcp_wrappers_7.6.orig/refuse.c     1994-12-29 03:42:40.000000000 +1100
++++ tcp_wrappers_7.6/refuse.c  2017-11-14 22:54:50.000000000 +1100
+@@ -8,7 +8,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
++static char sccsid[] __attribute__((__unused__)) = "@(#) refuse.c 1.5 94/12/28 17:42:39";
+ #endif
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c     2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/rfc931.c  2017-11-14 22:54:58.000000000 +1100
+@@ -10,7 +10,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
++static char sccsid[] __attribute__((__unused__)) = "@(#) rfc931.c 1.10 95/01/02 16:11:34";
+ #endif
+ /* System libraries. */
+@@ -23,6 +23,7 @@
+ #include <setjmp.h>
+ #include <signal.h>
+ #include <string.h>
++#include <unistd.h>
+ /* Local stuff. */
+@@ -152,7 +153,7 @@
+                    * protocol, not part of the data.
+                    */
+-                  if (cp = strchr(user, '\r'))
++                  if ((cp = strchr(user, '\r')))
+                       *cp = 0;
+                   result = user;
+               }
+diff -u tcp_wrappers_7.6.orig/safe_finger.c tcp_wrappers_7.6/safe_finger.c
+--- tcp_wrappers_7.6.orig/safe_finger.c        2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/safe_finger.c     2017-11-14 22:55:08.000000000 +1100
+@@ -15,7 +15,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
++static char sccsid[] __attribute__((__unused__)) = "@(#) safe_finger.c 1.4 94/12/28 17:42:41";
+ #endif
+ /* System libraries */
+@@ -27,6 +27,10 @@
+ #include <ctype.h>
+ #include <pwd.h>
+ #include <syslog.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <sys/wait.h>
++#include <unistd.h>
+ extern void exit();
+@@ -45,6 +49,8 @@
+ int   allow_severity = SEVERITY;
+ int   deny_severity = LOG_WARNING;
++int     pipe_stdin();
++
+ void    cleanup(sig)
+ int     sig;
+ {
+@@ -52,7 +58,7 @@
+     exit(0);
+ }
+-main(argc, argv)
++int     main(argc, argv)
+ int     argc;
+ char  **argv;
+ {
+diff -u tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
+--- tcp_wrappers_7.6.orig/scaffold.c   2017-11-13 09:29:21.000000000 +1100
++++ tcp_wrappers_7.6/scaffold.c        2017-11-14 22:55:32.000000000 +1100
+@@ -5,7 +5,7 @@
+   */
+ #ifndef lint
+-static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
++static char sccsid[] __attribute__((__unused__)) = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
+ #endif
+ /* System libraries. */
+diff -u tcp_wrappers_7.6.orig/shell_cmd.c tcp_wrappers_7.6/shell_cmd.c
+--- tcp_wrappers_7.6.orig/shell_cmd.c  1994-12-29 03:42:44.000000000 +1100
++++ tcp_wrappers_7.6/shell_cmd.c       2017-11-14 22:55:45.000000000 +1100
+@@ -9,7 +9,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
++static char sccsid[] __attribute__((__unused__)) = "@(#) shell_cmd.c 1.5 94/12/28 17:42:44";
+ #endif
+ /* System libraries. */
+@@ -20,6 +20,9 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <fcntl.h>
++#include <sys/wait.h>
++#include <unistd.h>
+ extern void exit();
+diff -u tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
+--- tcp_wrappers_7.6.orig/socket.c     2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/socket.c  2017-11-14 22:55:57.000000000 +1100
+@@ -16,7 +16,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) socket.c 1.15 97/03/21 19:27:24";
++static char sccsid[] __attribute__((__unused__)) = "@(#) socket.c 1.15 97/03/21 19:27:24";
+ #endif
+ /* System libraries. */
+@@ -77,7 +77,7 @@
+     static struct sockaddr_in client;
+     static struct sockaddr_in server;
+ #if !defined (__GLIBC__)
+-    int     len;
++    unsigned int  len;
+ #else /* __GLIBC__ */
+     size_t  len;
+ #endif /* __GLIBC__ */
+@@ -229,7 +229,7 @@
+     char    buf[BUFSIZ];
+     struct sockaddr_in sin;
+ #if !defined(__GLIBC__)
+-    int     size = sizeof(sin);
++    unsigned int  size = sizeof(sin);
+ #else /* __GLIBC__ */
+     size_t  size = sizeof(sin);
+ #endif /* __GLIBC__ */
+diff -u tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
+--- tcp_wrappers_7.6.orig/tcpd.c       1996-02-12 03:01:33.000000000 +1100
++++ tcp_wrappers_7.6/tcpd.c    2017-11-14 22:56:09.000000000 +1100
+@@ -11,7 +11,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpd.c 1.10 96/02/11 17:01:32";
+ #endif
+ /* System libraries. */
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <unistd.h>
+ #ifndef MAXPATHNAMELEN
+ #define MAXPATHNAMELEN        BUFSIZ
+@@ -38,10 +39,12 @@
+ #include "patchlevel.h"
+ #include "tcpd.h"
++extern void fix_options(struct request_info *);
++
+ int     allow_severity = SEVERITY;    /* run-time adjustable */
+ int     deny_severity = LOG_WARNING;  /* ditto */
+-main(argc, argv)
++int     main(argc, argv)
+ int     argc;
+ char  **argv;
+ {
+diff -u tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h       2017-11-13 09:29:25.000000000 +1100
++++ tcp_wrappers_7.6/tcpd.h    2017-11-14 22:36:40.000000000 +1100
+@@ -182,10 +182,10 @@
+ #ifdef __STDC__
+ extern void tcpd_warn(char *, ...);   /* report problem and proceed */
+-extern void tcpd_jump(char *, ...);   /* report problem and jump */
++extern void tcpd_jump(char *, ...) __attribute__((__noreturn__));     /* report problem and jump */
+ #else
+ extern void tcpd_warn();
+-extern void tcpd_jump();
++extern void tcpd_jump() __attribute__((__noreturn__));
+ #endif
+ struct tcpd_context {
+diff -u tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c    2017-11-13 09:29:08.000000000 +1100
++++ tcp_wrappers_7.6/tcpdchk.c 2017-11-14 22:56:21.000000000 +1100
+@@ -15,7 +15,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdchk.c 1.8 97/02/12 02:13:25";
+ #endif
+ /* System libraries. */
+@@ -30,6 +30,7 @@
+ #include <errno.h>
+ #include <netdb.h>
+ #include <string.h>
++#include <unistd.h>
+ extern int errno;
+ extern void exit();
+@@ -199,13 +200,15 @@
+     char    sv_list[BUFLEN];          /* becomes list of daemons */
+     char   *cl_list;                  /* becomes list of requests */
+     char   *sh_cmd;                   /* becomes optional shell command */
++#ifndef PROCESS_OPTIONS
+     char    buf[BUFSIZ];
++#endif
+     int     verdict;
+     struct tcpd_context saved_context;
+     saved_context = tcpd_context;             /* stupid compilers */
+-    if (fp = fopen(table, "r")) {
++    if ((fp = fopen(table, "r"))) {
+       tcpd_context.file = table;
+       tcpd_context.line = 0;
+       while (xgets(sv_list, sizeof(sv_list), fp)) {
+@@ -331,7 +334,7 @@
+           clients = 0;
+       } else {
+           clients++;
+-          if (host = split_at(cp + 1, '@')) { /* user@host */
++          if ((host = split_at(cp + 1, '@'))) {       /* user@host */
+               check_user(cp);
+               check_host(host);
+           } else {
+@@ -446,7 +449,7 @@
+         } else if (errno != ENOENT) {
+             tcpd_warn("open %s: %m", pat);
+         }
+-    } else if (mask = split_at(pat, '/')) {   /* network/netmask */
++    } else if ((mask = split_at(pat, '/'))) { /* network/netmask */
+       if (dot_quad_addr(pat) == INADDR_NONE
+           || dot_quad_addr(mask) == INADDR_NONE)
+           tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
+diff -u tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
+--- tcp_wrappers_7.6.orig/tcpdmatch.c  1996-02-12 03:01:36.000000000 +1100
++++ tcp_wrappers_7.6/tcpdmatch.c       2017-11-14 22:56:40.000000000 +1100
+@@ -14,7 +14,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tcpdmatch.c 1.5 96/02/11 17:01:36";
+ #endif
+ /* System libraries. */
+@@ -29,6 +29,8 @@
+ #include <syslog.h>
+ #include <setjmp.h>
+ #include <string.h>
++#include <stdlib.h>
++#include <unistd.h>
+ extern void exit();
+ extern int optind;
+diff -u tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
+--- tcp_wrappers_7.6.orig/tli.c        1997-03-22 05:27:26.000000000 +1100
++++ tcp_wrappers_7.6/tli.c     2017-11-14 22:56:50.000000000 +1100
+@@ -15,7 +15,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) tli.c 1.15 97/03/21 19:27:25";
++static char sccsid[] __attribute__((__unused__)) = "@(#) tli.c 1.15 97/03/21 19:27:25";
+ #endif
+ #ifdef TLI
+diff -u tcp_wrappers_7.6.orig/try-from.c tcp_wrappers_7.6/try-from.c
+--- tcp_wrappers_7.6.orig/try-from.c   1994-12-29 03:42:55.000000000 +1100
++++ tcp_wrappers_7.6/try-from.c        2017-11-14 22:56:59.000000000 +1100
+@@ -11,7 +11,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) try-from.c 1.2 94/12/28 17:42:55";
++static char sccsid[] __attribute__((__unused__)) = "@(#) try-from.c 1.2 94/12/28 17:42:55";
+ #endif
+ /* System libraries. */
+@@ -37,7 +37,7 @@
+ int     allow_severity = SEVERITY;    /* run-time adjustable */
+ int     deny_severity = LOG_WARNING;  /* ditto */
+-main(argc, argv)
++int     main(argc, argv)
+ int     argc;
+ char  **argv;
+ {
+diff -u tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
+--- tcp_wrappers_7.6.orig/update.c     1994-12-29 03:42:56.000000000 +1100
++++ tcp_wrappers_7.6/update.c  2017-11-14 22:57:09.000000000 +1100
+@@ -14,7 +14,7 @@
+   */
+ #ifndef lint
+-static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56";
++static char sccsid[] __attribute__((__unused__)) = "@(#) update.c 1.1 94/12/28 17:42:56";
+ #endif
+ /* System libraries */
+@@ -22,6 +22,7 @@
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
++#include <unistd.h>
+ /* Local stuff. */
index 0c272382b31af8a42cfebda2f6f7da09df7029ec..d9890f08c02c3c02187fc3bc5f93022c56516cf0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tiff
 PKG_VERSION:=4.0.10
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
@@ -84,8 +84,9 @@ define Build/InstallDev/hxx
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/{lib,include}
+       $(INSTALL_DIR) $(1)/usr/{lib,include} $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
        $(if $(CONFIG_PACKAGE_libtiffxx), $(call Build/InstallDev/hxx,$(1)))
 endef
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 01a5a148f12ebd58f345ad728c75618ae35ef9bd..d921dae47425431aec23f3611bfd8342f86584f0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bogofilter
 PKG_VERSION:=1.2.4
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
@@ -40,6 +40,10 @@ CONFIGURE_ARGS += \
        --with-libdb-prefix=$(STAGING_DIR) \
        --with-included-gsl
 
+define Package/bogofilter/conffiles
+/etc/bogofilter.cf
+endef
+
 define Package/bogofilter/install
        $(INSTALL_DIR)  $(1)/etc/ \
                         $(1)/usr/bin \
index 71768f0cea0ddf8230f0f2779efca38e68253e53..9ac11f00c1d9e066d8d2953072ab7ed1cc135c39 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.5.1
+PKG_VERSION:=2.3.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=d78f9d479e3b2caa808160f86bfec1c9c7b46344d8b14b88f5fa9bbbf8c7c33f
-PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
+PKG_HASH:=ed1d8dc1beeae9c6c73deac73a62ef19fe9262fbffd86604a3f690452f5536c7
+PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
 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
@@ -104,6 +105,7 @@ CONFIGURE_ARGS += \
        --without-lzma \
        --without-lz4 \
        --without-sodium \
+       --without-docs \
        $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
        $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
        $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
@@ -122,7 +124,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
@@ -135,15 +138,12 @@ endef
 define Package/dovecot/install
        $(INSTALL_DIR)  $(1)/etc/init.d \
                        $(1)/etc/dovecot \
-                       $(1)/usr/share/doc/dovecot \
                        $(1)/usr/lib/dovecot \
                        $(1)/usr/libexec/dovecot \
                        $(1)/usr/bin \
                        $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
        $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
        $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
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 dbd7185161a1fe4d6503fc9db00512c5425037ab..6bbabf0214561b5a495553c4397c82c931e4c2b4 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=msmtp
-PKG_VERSION:=1.8.3
-PKG_RELEASE:=1
+PKG_VERSION:=1.8.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
-PKG_HASH:=3cb2eefd33d048f0f82de100ef39a494e44fd1485e376ead31f733d2f36b92b4
+PKG_HASH:=e5dd7fe95bc8e2f5eea3e4894ec9628252f30bd700a7fd1a568b10efa91129f7
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
@@ -103,20 +103,10 @@ CONFIGURE_ARGS += \
        --without-macosx-keyring \
        --without-msmtpd
 
-ifneq ($(CONFIG_USE_UCLIBC),)
-  CONFIGURE_ARGS += --disable-gai-idn
-endif
-
-MAKE_FLAGS :=
-
 ifeq ($(BUILD_VARIANT),ssl)
-       CONFIGURE_ARGS += \
-               --with-tls=gnutls
-endif
-
-ifeq ($(BUILD_VARIANT),nossl)
-       CONFIGURE_ARGS += \
-               --with-tls=no
+       CONFIGURE_ARGS += --with-tls=gnutls
+else
+       CONFIGURE_ARGS += --without-tls
 endif
 
 define Package/msmtp/install
index 3c499c2523d65f4a5abc402b0229e510a29dd941..f25e054a9d875f636b83a46bbd2f2ec65cb08c19 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postfix
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=3.4.4
 PKG_SOURCE_URL:= \
        https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
diff --git a/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch b/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch
new file mode 100644 (file)
index 0000000..2bc874f
--- /dev/null
@@ -0,0 +1,36 @@
+From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 2 May 2019 22:28:57 -0700
+Subject: [PATCH] dns_lookup: Fix compilation with uClibc-ng
+
+uClibc-ng does not have res_send or res_nsend. ifdef the entire function.
+---
+ src/dns/dns_lookup.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c
+index 1ea98b3..d7771d4 100644
+--- a/src/dns/dns_lookup.c
++++ b/src/dns/dns_lookup.c
+@@ -311,6 +311,10 @@ typedef struct DNS_REPLY {
+ static int dns_res_query(const char *name, int class, int type,
+                                unsigned char *answer, int anslen)
+ {
++#ifdef __UCLIBC__
++    msg_info("dns_res_query() is not supported under uClibc");
++    return 0;
++#else
+     unsigned char msg_buf[MAX_DNS_QUERY_SIZE];
+     HEADER *reply_header = (HEADER *) answer;
+     int     len;
+@@ -369,6 +373,7 @@ static int dns_res_query(const char *name, int class, int type,
+       }
+       return (len);
+     }
++#endif
+ }
+ /* dns_res_search - res_search() that can return negative replies */
+-- 
+2.17.1
+
index fb976d5e63439d5a658695b01f6fd3963b669675..f6322cf61927bfe0e668082eb2546e1b21f290ac 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ssmtp
 PKG_VERSION:=2.64
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 PKG_LICENSE:=GPL-2.0+
 
diff --git a/mail/ssmtp/patches/020-openssl-deprecated.patch b/mail/ssmtp/patches/020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..c4cc6b2
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/ssmtp.c
++++ b/ssmtp.c
+@@ -1046,8 +1046,10 @@ int smtp_open(char *host, int port)
+       /* Init SSL stuff */
+       SSL_CTX *ctx = NULL;
+       X509 *server_cert;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       SSL_load_error_strings();
+       SSLeay_add_ssl_algorithms();
++#endif
+       ctx = SSL_CTX_new(SSLv23_client_method());
+       if(!ctx) {
+               log_event(LOG_ERR, "No SSL support initiated\n");
index b10d050ec09b5d0a8a6bf90229bf1f427b3fe8f0..6dc7d9736d272b84383e3ba5468276568f37e251 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-libav
-PKG_VERSION:=1.15.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
 
 PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=96241130cb0067e01925a7cfe084dcf05941f139eb1ab45e5556c3f95120ce49
+PKG_HASH:=dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a
 
 PKG_LICENSE:=GPL-2.0 LGPL-2.0
 PKG_LICENSE_FILES:=COPYING COPYING.LIB
@@ -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.
+ifneq ($(findstring octeonplus,$(CONFIG_CPU_TYPE)),)
+  REAL_CPU_TYPE:=octeon+
+else
+  # Strip off FPU notation.
+  REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
+endif
 
 CONFIGURE_ARGS += \
        --disable-Bsymbolic \
index b3044992ae0941b44e300dd5e29f05aa50372515..cd67f9a19f33d18fa7c50a19b54c6a9972e5e87b 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.15.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING.LIB COPYING
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-bad-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-bad-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-PKG_HASH:=eafbb705190ca6dbf0e5dfbe1bc3d0f217fbc2a828037b5ede12d3611b9f9bd7
+PKG_HASH:=22139de35626ada6090bdfa3423b27b7fc15a0198331d25c95e6b12cb1072b05
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
index d38cbedaf9c7ed983febbf6537abbf6fd6763004..d67006e086562b40167560f63afdb79e3867084e 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.15.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING.LIB COPYING
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-base-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base
-PKG_HASH:=6952be988abe67b5affd46b194e97863b160cd58846199873b4315fe5e1cdbf0
+PKG_HASH:=4093aa7b51e28fb24dfd603893fead8d1b7782f088b05ed0f22a21ef176fb5ae
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_gst1-mod-alsa \
index 729972215af30c759539fe80eb5a3939f5dcde5b..0971ffa9ca48c5da707227eaefa8957c459c75bc 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.15.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-good-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-good-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-good/
-PKG_HASH:=b805962a2d777ff6145f6ca2ca8458499c9e23236cbcc41787c69ac51b02c818
+PKG_HASH:=654adef33380d604112f702c2927574cfc285e31307b79e584113858838bb0fd
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_gst1-mod-lame \
index b1dbf85fa3db337bbe05bc4e452bb0df6756c4f7..1fdbe71e818397c2bf27b3a30526d81aeddb291c 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.15.2
-PKG_RELEASE:=2
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING
 PKG_BUILD_DIR:=$(BUILD_DIR)/gst-plugins-ugly-$(PKG_VERSION)
 PKG_SOURCE:=gst-plugins-ugly-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-ugly
-PKG_HASH:=6e802c63680ac24b6970a35b3001e5c96e57f1b19814cd3916d52a32d33123b2
+PKG_HASH:=e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_gst1-mod-asf \
index 2beaf66d759726564c727dae6de87bf10a4cc43a..f693ec36de5b03743b65be3417350d1d7758fa8a 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gstreamer1
-PKG_VERSION:=1.15.2
+PKG_VERSION:=1.16.0
 PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
@@ -20,7 +20,7 @@ PKG_LICENSE_FILES:=COPYING
 PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
 PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
-PKG_HASH:=27a3211eb5c3f6929c5f123ffecaac0ea6e9ed6b93be879c033a7d5af13ad7e6
+PKG_HASH:=0e8e2f7118be437cba879353970cf83c2acced825ecb9275ba05d9186ef07c00
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
@@ -131,7 +131,6 @@ CONFIGURE_ARGS += \
        --disable-gst-tracer-hooks \
        --disable-gst-debug \
        --disable-gtk-doc-html \
-       --disable-option-parsing \
        --disable-rpath \
        --disable-tests \
        --disable-valgrind \
index ee014f431b40a3a355574fa2e9d7660eb190abe9..dad986f33c7a4bedcc2d746c5d163e1ac397ab1f 100644 (file)
@@ -6,17 +6,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mjpg-streamer
-PKG_VERSION:=2018-04-14
-PKG_RELEASE:=1
+PKG_VERSION:=2018-10-25
+PKG_RELEASE:=2
 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..3b652fa6ea9d6861c4321e8187e84d8dfbb7fe78 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"
 
@@ -77,6 +80,29 @@ start_instance() {
                [ -n "$username" ] && [ -n "$password" ] && output_arg="${output_arg} --credentials $username:$password"
        fi
 
+       if [ "x$output" = 'xfile' ]; then
+               output_arg="output_file.so"
+
+               config_get folder "$s" 'folder'
+               [ -n "$folder" ] && output_arg="${output_arg} --folder $folder"
+
+               config_get delay "$s" 'delay'
+               [ -n "$delay" ] && output_arg="${output_arg} --delay $delay"
+
+               config_get link "$s" 'link'
+               [ -n "$link" ] && output_arg="${output_arg} --link $link"
+
+               config_get ringbuffer "$s" 'ringbuffer'
+               [ -n "$ringbuffer" ] && output_arg="${output_arg} --size $ringbuffer"
+
+               config_get exceed "$s" 'exceed'
+               [ -n "$exceed" ] && output_arg="${output_arg} --exceed $exceed"
+
+               config_get command "$s" 'command'
+               [ -n "$command" ] && output_arg="${output_arg} --command $command"
+
+       fi
+
        if [ -z "$output_arg" ]; then
                error "unsuported output option '$output' in section '$s'"
                return 1
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 4a41a9f38c9a97d27792a179e2226608930b18a0..9108b92963604a9b4c952caa3c27fe96de309956 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tvheadend
 PKG_VERSION:=4.0.10
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/tvheadend/tvheadend/tar.gz/v$(PKG_VERSION)?
@@ -72,8 +72,6 @@ CONFIGURE_ARGS += \
        --disable-libav \
        --enable-bundle
 
-TARGET_CFLAGS += -Wno-error=pointer-compare
-
 define Build/Prepare
        $(call Build/Prepare/Default)
        echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \
diff --git a/multimedia/tvheadend/patches/020-strncpy-issue.patch b/multimedia/tvheadend/patches/020-strncpy-issue.patch
new file mode 100644 (file)
index 0000000..e9dc910
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 8c5e380..baef144 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,7 +28,7 @@ PROG    := $(BUILDDIR)/tvheadend
+ #
+ CFLAGS  += -g -O2 -Wunused-result
+-CFLAGS  += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
++#CFLAGS  += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
+ CFLAGS  += -Wmissing-prototypes
+ CFLAGS  += -fms-extensions -funsigned-char -fno-strict-aliasing
+ CFLAGS  += -D_FILE_OFFSET_BITS=64
index 05289b83df05ddacbc65568a584c452d30b2efc9..62a8c7537c14c485fd8ae3ce57f58b768ae38819 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.4.7
+PKG_VERSION:=2019.5.11
 PKG_RELEASE:=1
 
 PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
-PKG_HASH:=d8250c9fedea3bcf5c2df62012e9814c96db53540a2842b8f8345885adfd0a85
+PKG_HASH:=fe71aa725dc0f86deacdcc91f38492317d53b0ca8ec0f8bddc9961c205b4fea4
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
 
@@ -41,11 +41,11 @@ endef
 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
+       +python3 \
+       +python3-email \
+       +python3-xml \
+       +python3-codecs \
+       +python3-ctypes
   VARIANT:=python3
 endef
 
index 28733e3c6227c51754fe665f580f12f3113eabe2..be57f48b34aebd1100d38402289e3ddf590d40a8 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ariang
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild
-PKG_MIRROR_HASH:=9d1dff6762d61a8a1f26c32d7933248a613c2597de7006d3bdae7e18a86e1d20
-PKG_SOURCE_DATE:=2018-11-21
-PKG_SOURCE_VERSION:=f40f5a7880ba0cb84d3ea93a667287d38eaec93b
+PKG_MIRROR_HASH:=31a41eed1d812956bf0c482b961cc86ab1b9ad2863e9b17f383330d3067c444f
+PKG_SOURCE_VERSION:=ca6f9168bdfbfc1fd3cbb1bac4600010d3725c0c
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
index c63b80b55e99efdfd717a17a13b3108ef211c18e..bdd01974801a758bb4a29db14e2473d2bfc4df13 100644 (file)
@@ -8,19 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cifs-utils
-PKG_VERSION:=6.8
+PKG_VERSION:=6.9
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=e7d1f6050c43f21f82cd77e288eb756755effd22f0c310fc2c525df9d41dff79
+PKG_SOURCE_URL:=https://download.samba.org/pub/linux-cifs/cifs-utils/
+PKG_HASH:=18d8f1bf92c13c4d611502dbd6759e3a766ddc8467ec8a2eda3f589e40b9ac9c
 
 PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=libtool
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/cifsmount
@@ -28,22 +26,23 @@ define Package/cifsmount
   CATEGORY:=Network
   DEPENDS:=+kmod-fs-cifs
   TITLE:=CIFS mount utilities
-  URL:=http://wiki.samba.org/index.php/LinuxCIFS_utils
+  URL:=https://wiki.samba.org/index.php/LinuxCIFS_utils
 endef
 
-TARGET_CFLAGS += -Wno-error
+TARGET_CFLAGS += $(FPIC) -ffunction-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
 CONFIGURE_ARGS += \
-       --exec-prefix=/usr \
-       --prefix=/ \
-       --with-libcap=no \
        --disable-cifsupcall \
        --disable-cifscreds \
        --disable-cifsidmap \
        --disable-cifsacl \
        --disable-pam \
+       --disable-pie \
+       --disable-relro \
        --disable-systemd \
-       --disable-man
+       --disable-man \
+       --without-libcap
 
 define Package/cifsmount/install
        $(INSTALL_DIR) $(1)/usr/sbin
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 916a911bfb5e9b47c3ad442985d6075f4b41e612..b08a83ba5074162d3be1744f4fab604ebf2615fd 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dmapd
-PKG_VERSION:=0.0.79
+PKG_VERSION:=0.0.81
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -18,10 +18,10 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.flyn.org/projects/dmapd
-PKG_HASH:=3edd9e31961751317d35c5d4b1f8c7f52b0d4968c8850fbb03da778c8fcb0ce0
+PKG_HASH:=74b56417eaed4fa6cd3b47465819f1f83caffc621b5da302d3c90e58bfb2a932
 
 PKG_FIXUP:=autoreconf
-PKG_INSTALL:=2
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -43,9 +43,6 @@ define Package/dmapd/conffiles
 /etc/dmapd.conf
 endef
 
-TARGET_LDFLAGS+=\
-       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-
 define Package/dmapd/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_DIR) $(1)/etc/init.d
index 11b448150511f10874d763000d5fac74442c8c96..fa417df5407602f0f440898316b4f2b9dc386775 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_18
-PKG_RELEASE:=1
+PKG_VERSION:=release_3_0_19
+PKG_RELEASE:=2
 
 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
@@ -381,7 +381,7 @@ define Package/freeradius3-mod-sql-postgresql
   TITLE:=Radius PostgreSQL back-end drivers
 endef
 
-define Package/freeradius3-mod-sql-mysql/conffiles
+define Package/freeradius3-mod-sql-postgresql/conffiles
 /etc/freeradius3/mods-config/sql/main/postgresql
 endef
 
@@ -391,7 +391,7 @@ define Package/freeradius3-mod-sql-sqlite
   TITLE:=Radius SQLite back-end drivers
 endef
 
-define Package/freeradius3-mod-sql-mysql/conffiles
+define Package/freeradius3-mod-sql-sqlite/conffiles
 /etc/freeradius3/mods-config/sql/main/sqlite
 endef
 
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 b8e79634b9419e09da222dec2f764be60523f0bf..8c0ba1dea6c7a1080a6a13b7646b16c77ee2d836 100644 (file)
@@ -7,16 +7,17 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_LICENSE:=ASL-2.0
-PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
-
 PKG_NAME:=go-ethereum
-PKG_VERSION:=1.8.21
+PKG_VERSION:=1.8.27
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ethereum/go-ethereum/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=736028b4babd44d67a70a4a7883a06e97263449805c8c067b7dfd77e9fa94299
+PKG_HASH:=45d264106991d0e2a4c34ac5d6539fc9460c768fc70588ea38a25f467039ece8
+
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+PKG_LICENSE:=GPL-3 LGPL-3
+PKG_LICENSE_FILES:=COPYING COPYING.LESSER
 
 PKG_BUILD_DEPENDS:=golang/host
 PKG_BUILD_PARALLEL:=1
index 0a64aca83af512b7a1ae89f8f09c1f58cec8a15a..085e6aad6d5df7ab3d274201a0402b2574055e94 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnurl
-PKG_VERSION:=7.64.0
+PKG_VERSION:=7.64.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://ftp.gnu.org/gnu/gnunet
 
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=68b68a1be6a04f514a863eaac0d6b89f935833aff4e60bc2bcac472a465c755f
+PKG_HASH:=8ea67d505e2576f00d8a09485e6c04396af75388c17d77087a140f05e0ca2a96
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index e01785a9722ea54e5701a12829fe949d724006b3..b42bc595831d6aabfb693dca5f61692df57d0d95 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.8.19
-PKG_RELEASE:=3
+PKG_VERSION:=1.8.20
+PKG_RELEASE:=1
 
 PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
-PKG_HASH:=64f5fbfd4e09ffeaf26cb6667398ba780704a14e96e60000caa8bf69962ba734
+PKG_HASH:=3228f78d5fe1dfbaccf41bf387e36b08eeef6e16330053cafde5fa303e262b16
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_LICENSE:=GPL-2.0
index e6cd59c5552e34266db63d4560add45c299a488e..f4b683ecf0d3c3ba25a55c4ff8d85fe0094b2e1d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 CLONEURL=http://git.haproxy.org/git/haproxy-1.8.git
-BASE_TAG=v1.8.19
+BASE_TAG=v1.8.20
 TMP_REPODIR=tmprepo
 PATCHESDIR=patches
 
diff --git a/net/haproxy/patches/000-BUG-MAJOR-listener-Make-sure-the-listener-exist-before-using-it.patch b/net/haproxy/patches/000-BUG-MAJOR-listener-Make-sure-the-listener-exist-before-using-it.patch
deleted file mode 100644 (file)
index 7d9708e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 7c3fd37724c58cf09359e0d381a9be305dd7869b
-Author: Olivier Houchard <cognet@ci0.org>
-Date:   Mon Feb 25 16:18:16 2019 +0100
-
-    BUG/MAJOR: listener: Make sure the listener exist before using it.
-    
-    In listener_accept(), make sure we have a listener before attempting to
-    use it.
-    An another thread may have closed the FD meanwhile, and set fdtab[fd].owner
-    to NULL.
-    As the listener is not free'd, it is ok to attempt to accept() a new
-    connection even if the listener was closed. At worst the fd has been
-    reassigned to another connection, and accept() will fail anyway.
-    
-    Many thanks to Richard Russo for reporting the problem, and suggesting the
-    fix.
-    
-    This should be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit d16a9dfed80e75d730754b717370515265698cdd)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit a2511ed1fcdfa8047dbe2268fc0259f9b06cf891)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/listener.c b/src/listener.c
-index a30efe03..5f6fafbc 100644
---- a/src/listener.c
-+++ b/src/listener.c
-@@ -441,8 +441,8 @@ void delete_listener(struct listener *listener)
- void listener_accept(int fd)
- {
-       struct listener *l = fdtab[fd].owner;
--      struct proxy *p = l->bind_conf->frontend;
--      int max_accept = l->maxaccept ? l->maxaccept : 1;
-+      struct proxy *p;
-+      int max_accept;
-       int expire;
-       int cfd;
-       int ret;
-@@ -450,6 +450,10 @@ void listener_accept(int fd)
-       static int accept4_broken;
- #endif
-+      if (!l)
-+              return;
-+      p = l->bind_conf->frontend;
-+      max_accept = l->maxaccept ? l->maxaccept : 1;
-       if (HA_SPIN_TRYLOCK(LISTENER_LOCK, &l->lock))
-               return;
diff --git a/net/haproxy/patches/000-BUG-MINOR-http-Call-stream_inc_be_http_req_ctr-only-one-time-per-request.patch b/net/haproxy/patches/000-BUG-MINOR-http-Call-stream_inc_be_http_req_ctr-only-one-time-per-request.patch
new file mode 100644 (file)
index 0000000..4449df1
--- /dev/null
@@ -0,0 +1,40 @@
+commit cf2f1243373be97249567ffd259e975cc87068b8
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Mon Apr 29 13:12:02 2019 +0200
+
+    BUG/MINOR: http: Call stream_inc_be_http_req_ctr() only one time per request
+    
+    The function stream_inc_be_http_req_ctr() is called at the beginning of the
+    analysers AN_REQ_HTTP_PROCESS_FE/BE. It as an effect only on the backend. But we
+    must be careful to call it only once. If the processing of HTTP rules is
+    interrupted in the middle, when the analyser is resumed, we must not call it
+    again. Otherwise, the tracked counters of the backend are incremented several
+    times.
+    
+    This bug was reported in github. See issue #74.
+    
+    This fix should be backported as far as 1.6.
+    
+    (cherry picked from commit 1907ccc2f75b78ace1ee4acdfc60d48a76e3decd)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit 319921866ea9ecc46215fea5679abc8efdfcbea5)
+    [cf: HTX part was removed]
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/proto_http.c b/src/proto_http.c
+index ccacd6a4..556cabad 100644
+--- a/src/proto_http.c
++++ b/src/proto_http.c
+@@ -3420,8 +3420,10 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s
+               req->buf->i,
+               req->analysers);
+-      /* just in case we have some per-backend tracking */
+-      stream_inc_be_http_req_ctr(s);
++      /* just in case we have some per-backend tracking. Only called the first
++       * execution of the analyser. */
++      if (!s->current_rule || s->current_rule_list != &px->http_req_rules)
++              stream_inc_be_http_req_ctr(s);
+       /* evaluate http-request rules */
+       if (!LIST_ISEMPTY(&px->http_req_rules)) {
diff --git a/net/haproxy/patches/001-BUG-MEDIUM-spoe-arg-len-encoded-in-previous-frag-frame-but-len-changed.patch b/net/haproxy/patches/001-BUG-MEDIUM-spoe-arg-len-encoded-in-previous-frag-frame-but-len-changed.patch
new file mode 100644 (file)
index 0000000..9ef9507
--- /dev/null
@@ -0,0 +1,83 @@
+commit c1620a52a3def02b4837376385c416c03ca874c4
+Author: Kevin Zhu <ipandtcp@gmail.com>
+Date:   Fri Apr 26 14:00:01 2019 +0800
+
+    BUG/MEDIUM: spoe: arg len encoded in previous frag frame but len changed
+    
+    Fragmented arg will do fetch at every encode time, each fetch may get
+    different result if SMP_F_MAY_CHANGE, for example res.payload, but
+    the length already encoded in first fragment of the frame, that will
+    cause SPOA decode failed and waste resources.
+    
+    This patch must be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit f7f54280c8106e92a55243f5d60f8587e79602d1)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit 3a838e526cdbc00ded5362e66f1ef3a441abc3c1)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/proto/spoe.h b/include/proto/spoe.h
+index 002cf7d7..2cdca10b 100644
+--- a/include/proto/spoe.h
++++ b/include/proto/spoe.h
+@@ -121,7 +121,7 @@ spoe_decode_buffer(char **buf, char *end, char **str, uint64_t *len)
+  * many bytes has been encoded. If <*off> is zero at the end, it means that all
+  * data has been encoded. */
+ static inline int
+-spoe_encode_data(struct sample *smp, unsigned int *off, char **buf, char *end)
++spoe_encode_data(unsigned int *len, struct sample *smp, unsigned int *off, char **buf, char *end)
+ {
+       char *p = *buf;
+       int   ret;
+@@ -183,15 +183,16 @@ spoe_encode_data(struct sample *smp, unsigned int *off, char **buf, char *end)
+                               ret = spoe_encode_frag_buffer(chk->str, chk->len, &p, end);
+                               if (ret == -1)
+                                       return -1;
++                              *len = chk->len;
+                       }
+                       else {
+                               /* The sample has been fragmented, encode remaining data */
+-                              ret = MIN(chk->len - *off, end - p);
++                              ret = MIN(*len - *off, end - p);
+                               memcpy(p, chk->str + *off, ret);
+                               p += ret;
+                       }
+                       /* Now update <*off> */
+-                      if (ret + *off != chk->len)
++                      if (ret + *off != *len)
+                               *off += ret;
+                       else
+                               *off = 0;
+diff --git a/include/types/spoe.h b/include/types/spoe.h
+index 53e7200c..cfaa42f8 100644
+--- a/include/types/spoe.h
++++ b/include/types/spoe.h
+@@ -304,6 +304,7 @@ struct spoe_context {
+               struct spoe_message *curmsg;      /* SPOE message from which to resume encoding */
+               struct spoe_arg     *curarg;      /* SPOE arg in <curmsg> from which to resume encoding */
+               unsigned int         curoff;      /* offset in <curarg> from which to resume encoding */
++              unsigned int         curlen;      /* length of <curarg> need to be encode, for SMP_F_MAY_CHANGE data */
+               unsigned int         flags;       /* SPOE_FRM_FL_* */
+       } frag_ctx; /* Info about fragmented frames, valid on if SPOE_CTX_FL_FRAGMENTED is set */
+ };
+diff --git a/src/flt_spoe.c b/src/flt_spoe.c
+index f6109778..0c0b3794 100644
+--- a/src/flt_spoe.c
++++ b/src/flt_spoe.c
+@@ -2172,6 +2172,7 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
+       list_for_each_entry(arg, &msg->args, list) {
+               ctx->frag_ctx.curarg = arg;
+               ctx->frag_ctx.curoff = UINT_MAX;
++              ctx->frag_ctx.curlen = 0;
+         encode_argument:
+               if (ctx->frag_ctx.curoff != UINT_MAX)
+@@ -2186,7 +2187,7 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
+               /* Fetch the arguement value */
+               smp = sample_process(s->be, s->sess, s, dir|SMP_OPT_FINAL, arg->expr, NULL);
+-              ret = spoe_encode_data(smp, &ctx->frag_ctx.curoff, buf, end);
++              ret = spoe_encode_data(&ctx->frag_ctx.curlen, smp, &ctx->frag_ctx.curoff, buf, end);
+               if (ret == -1 || ctx->frag_ctx.curoff)
+                       goto too_big;
+       }
diff --git a/net/haproxy/patches/001-BUG-MINOR-listener-keep-accept-rate-counters-accurate-under-saturation.patch b/net/haproxy/patches/001-BUG-MINOR-listener-keep-accept-rate-counters-accurate-under-saturation.patch
deleted file mode 100644 (file)
index 1edac3a..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-commit 78714ea673cefa83d3dff5aa9aa5e97726cfb5cd
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Mon Feb 25 15:02:04 2019 +0100
-
-    BUG/MINOR: listener: keep accept rate counters accurate under saturation
-    
-    The test on l->nbconn forces to exit the loop before updating the freq
-    counters, so the last session which reaches a listener's limit will not
-    be accounted for in the session rate measurement.
-    
-    Let's move the test at the beginning of the loop and mark the listener
-    as saturated on exit.
-    
-    This may be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit 741b4d6b7aad1e4a66dd8584b5eff729b08fade7)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-    (cherry picked from commit 5c7c7e447df84a04bda88c40382b652cdb77a079)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/listener.c b/src/listener.c
-index 5f6fafbc..b94d823c 100644
---- a/src/listener.c
-+++ b/src/listener.c
-@@ -457,11 +457,6 @@ void listener_accept(int fd)
-       if (HA_SPIN_TRYLOCK(LISTENER_LOCK, &l->lock))
-               return;
--      if (unlikely(l->nbconn >= l->maxconn)) {
--              listener_full(l);
--              goto end;
--      }
--
-       if (!(l->options & LI_O_UNLIMITED) && global.sps_lim) {
-               int max = freq_ctr_remain(&global.sess_per_sec, global.sps_lim, 0);
-@@ -520,7 +515,7 @@ void listener_accept(int fd)
-        * worst case. If we fail due to system limits or temporary resource
-        * shortage, we try again 100ms later in the worst case.
-        */
--      while (max_accept--) {
-+      while (l->nbconn < l->maxconn && max_accept--) {
-               struct sockaddr_storage addr;
-               socklen_t laddr = sizeof(addr);
-               unsigned int count;
-@@ -627,11 +622,6 @@ void listener_accept(int fd)
-                       goto transient_error;
-               }
--              if (l->nbconn >= l->maxconn) {
--                      listener_full(l);
--                      goto end;
--              }
--
-               /* increase the per-process number of cumulated connections */
-               if (!(l->options & LI_O_UNLIMITED)) {
-                       count = update_freq_ctr(&global.sess_per_sec, 1);
-@@ -659,6 +649,9 @@ void listener_accept(int fd)
-       limit_listener(l, &global_listener_queue);
-       task_schedule(global_listener_queue_task, tick_first(expire, global_listener_queue_task->expire));
-  end:
-+      if (l->nbconn >= l->maxconn)
-+              listener_full(l);
-+
-       HA_SPIN_UNLOCK(LISTENER_LOCK, &l->lock);
- }
diff --git a/net/haproxy/patches/002-BUG-MEDIUM-logs-Only-attempt-to-free-startup_logs-once.patch b/net/haproxy/patches/002-BUG-MEDIUM-logs-Only-attempt-to-free-startup_logs-once.patch
deleted file mode 100644 (file)
index d726360..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-commit 4c82743abd299f0aa8105e98ec92b76375a7f344
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date:   Thu Mar 7 14:19:24 2019 +0100
-
-    BUG/MEDIUM: logs: Only attempt to free startup_logs once.
-    
-    deinit_log_buffers() can be called once per thread, however startup_logs
-    is common to all threads. So only attempt to free it once.
-    
-    This should be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit 7c49711d6041d1afc42d5b310ddfd7d6f6817c3c)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-    (cherry picked from commit bc3e21b27849275306a0580488613b7dfd4d8eb5)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/log.c b/src/log.c
-index b3f33662..9c112255 100644
---- a/src/log.c
-+++ b/src/log.c
-@@ -1380,11 +1380,15 @@ int init_log_buffers()
- /* Deinitialize log buffers used for syslog messages */
- void deinit_log_buffers()
- {
-+      void *tmp_startup_logs;
-+
-       free(logheader);
-       free(logheader_rfc5424);
-       free(logline);
-       free(logline_rfc5424);
--      free(startup_logs);
-+      tmp_startup_logs = HA_ATOMIC_XCHG(&startup_logs, NULL);
-+      free(tmp_startup_logs);
-+
-       logheader         = NULL;
-       logheader_rfc5424 = NULL;
-       logline           = NULL;
diff --git a/net/haproxy/patches/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch b/net/haproxy/patches/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch
new file mode 100644 (file)
index 0000000..c26629c
--- /dev/null
@@ -0,0 +1,71 @@
+commit 72fdff1fdb5b82685dc3d2db23ece042195a0cbd
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Fri Apr 26 14:30:15 2019 +0200
+
+    MINOR: spoe: Use the sample context to pass frag_ctx info during encoding
+    
+    This simplifies the API and hide the details in the sample. This way, only
+    string and binary are aware of these info, because other types cannot be
+    partially encoded.
+    
+    This patch may be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit 85db3212b87b33f1a39a688546f4f53a5c4ba4da)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit b93366e3ee44f5de93f01569fcdcd602f6d0703f)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/proto/spoe.h b/include/proto/spoe.h
+index 2cdca10b..cce13e50 100644
+--- a/include/proto/spoe.h
++++ b/include/proto/spoe.h
+@@ -117,11 +117,9 @@ spoe_decode_buffer(char **buf, char *end, char **str, uint64_t *len)
+  *
+  * If the value is too big to be encoded, depending on its type, then encoding
+  * failed or the value is partially encoded. Only strings and binaries can be
+- * partially encoded. In this case, the offset <*off> is updated to known how
+- * many bytes has been encoded. If <*off> is zero at the end, it means that all
+- * data has been encoded. */
++ * partially encoded. */
+ static inline int
+-spoe_encode_data(unsigned int *len, struct sample *smp, unsigned int *off, char **buf, char *end)
++spoe_encode_data(struct sample *smp, char **buf, char *end)
+ {
+       char *p = *buf;
+       int   ret;
+@@ -164,12 +162,16 @@ spoe_encode_data(unsigned int *len, struct sample *smp, unsigned int *off, char
+               case SMP_T_STR:
+               case SMP_T_BIN: {
++                      /* If defined, get length and offset of the sample by reading the sample
++                       * context. ctx.a[0] is the pointer to the length and ctx.a[1] is the
++                       * pointer to the offset. If the offset is greater than 0, it means the
++                       * sample is partially encoded. In this case, we only need to encode the
++                       * reamining. When all the sample is encoded, the offset is reset to 0.
++                       * So the caller know it can try to encode the next sample. */
+                       struct chunk *chk = &smp->data.u.str;
++                      unsigned int *len  = (smp->ctx.a[0] ? smp->ctx.a[0] : 0);
++                      unsigned int *off  = (smp->ctx.a[1] ? smp->ctx.a[1] : 0);
+-                      /* Here, we need to know if the sample has already been
+-                       * partially encoded. If yes, we only need to encode the
+-                       * remaining, <*off> reprensenting the number of bytes
+-                       * already encoded. */
+                       if (!*off) {
+                               /* First evaluation of the sample : encode the
+                                * type (string or binary), the buffer length
+diff --git a/src/flt_spoe.c b/src/flt_spoe.c
+index 0c0b3794..66d8b045 100644
+--- a/src/flt_spoe.c
++++ b/src/flt_spoe.c
+@@ -2187,7 +2187,9 @@ spoe_encode_message(struct stream *s, struct spoe_context *ctx,
+               /* Fetch the arguement value */
+               smp = sample_process(s->be, s->sess, s, dir|SMP_OPT_FINAL, arg->expr, NULL);
+-              ret = spoe_encode_data(&ctx->frag_ctx.curlen, smp, &ctx->frag_ctx.curoff, buf, end);
++              smp->ctx.a[0] = &ctx->frag_ctx.curlen;
++              smp->ctx.a[1] = &ctx->frag_ctx.curoff;
++              ret = spoe_encode_data(smp, buf, end);
+               if (ret == -1 || ctx->frag_ctx.curoff)
+                       goto too_big;
+       }
diff --git a/net/haproxy/patches/003-BUG-MEDIUM-51d-fix-possible-segfault-on-deinit_51degrees.patch b/net/haproxy/patches/003-BUG-MEDIUM-51d-fix-possible-segfault-on-deinit_51degrees.patch
deleted file mode 100644 (file)
index 3c9078f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-commit 63f5dbf1b9fcdc5b10537d733b0e0798905ff1dc
-Author: Dragan Dosen <ddosen@haproxy.com>
-Date:   Thu Mar 7 15:24:23 2019 +0100
-
-    BUG/MEDIUM: 51d: fix possible segfault on deinit_51degrees()
-    
-    When haproxy is built with 51Degrees support, but not configured to use
-    51Degrees database, a segfault can occur when deinit_51degrees()
-    function is called, eg. during soft-stop on SIGUSR1 signal.
-    
-    Only builds that use Pattern algorithm are affected.
-    
-    This fix must be backported to all stable branches where 51Degrees
-    support is available. Additional adjustments are required for some
-    branches due to API and naming changes.
-    
-    (cherry picked from commit bc6218e1b02860c6cdad0d2bb4dc8874557087f8)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-    (cherry picked from commit 4e0363e84cb3f6ca341e1f83c6fd490c76c9ae6b)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/51d.c b/src/51d.c
-index a36333ef..03101136 100644
---- a/src/51d.c
-+++ b/src/51d.c
-@@ -639,7 +639,8 @@ static void deinit_51degrees(void)
-       free(global_51degrees.header_names);
- #ifdef FIFTYONEDEGREES_H_PATTERN_INCLUDED
--      fiftyoneDegreesWorksetPoolFree(global_51degrees.pool);
-+      if (global_51degrees.pool)
-+              fiftyoneDegreesWorksetPoolFree(global_51degrees.pool);
- #endif
- #ifdef FIFTYONEDEGREES_H_TRIE_INCLUDED
-       free(global_51degrees.device_offsets.firstOffset);
diff --git a/net/haproxy/patches/003-DOC-contrib-modsecurity-Typos-and-fix-the-reject-example.patch b/net/haproxy/patches/003-DOC-contrib-modsecurity-Typos-and-fix-the-reject-example.patch
new file mode 100644 (file)
index 0000000..514c4c5
--- /dev/null
@@ -0,0 +1,38 @@
+commit dfc3718f0a302ea3deb5f1a325d35fce0e4cfa48
+Author: Yann Cézard <ycezard@viareport.com>
+Date:   Thu Apr 25 14:48:38 2019 +0200
+
+    DOC: contrib/modsecurity: Typos and fix the reject example
+    
+    Thanks to https://www.mail-archive.com/haproxy@formilux.org/msg30056.html
+    
+    This patch may be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit 494ddbff478d880e48de490f2689607addac70bc)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit 850896603086877641272d6e4075e66bd91f2e50)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/contrib/modsecurity/README b/contrib/modsecurity/README
+index e6cb305e..8031389d 100644
+--- a/contrib/modsecurity/README
++++ b/contrib/modsecurity/README
+@@ -88,15 +88,15 @@ HAProxy configuration. For example:
+       balance roundrobin
+       timeout connect 5s
+       timeout server  3m
+-      server iprep1 127.0.0.1:12345
++      server modsec1 127.0.0.1:12345
+ The modsecurity action is returned in a variable called txn.modsec.code. It
+ contains the HTTP returned code. If the variable contains 0, the request is
+ clean.
+-   tcp-request content reject if { var(txn.modsec.code) -m int gt 0 }
++   http-request deny if { var(txn.modsec.code) -m int gt 0 }
+-With this rule, all the request not clean are reected.
++With this rule, all the request not clean are rejected.
+   Known bugs, limitations and TODO list
diff --git a/net/haproxy/patches/004-BUG-MEDIUM-contrib-modsecurity-If-host-header-is-NULL-dont-try-to-strdup-it.patch b/net/haproxy/patches/004-BUG-MEDIUM-contrib-modsecurity-If-host-header-is-NULL-dont-try-to-strdup-it.patch
new file mode 100644 (file)
index 0000000..af49cc2
--- /dev/null
@@ -0,0 +1,36 @@
+commit 95cf225d099dcb49eefcf4f5b648be604414ae0c
+Author: Yann Cézard <ycezard@viareport.com>
+Date:   Thu Apr 25 14:30:23 2019 +0200
+
+    BUG/MEDIUM: contrib/modsecurity: If host header is NULL, don't try to strdup it
+    
+    I discovered this bug when running OWASP regression tests against HAProxy +
+    modsecurity-spoa (it's a POC to evaluate how it is working).  I found out that
+    modsecurity spoa will crash when the request doesn't have any Host header.
+    
+    See the pull request #86 on github for details.
+    
+    This patch must be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit bf60f6b8033deddc86de5357d6099c7593fe44cc)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit d988e3dddcbe1f48f3b24d1bb529fc9ecefde180)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/contrib/modsecurity/modsec_wrapper.c b/contrib/modsecurity/modsec_wrapper.c
+index 271ec15d..2f3987b4 100644
+--- a/contrib/modsecurity/modsec_wrapper.c
++++ b/contrib/modsecurity/modsec_wrapper.c
+@@ -325,7 +325,11 @@ int modsecurity_process(struct worker *worker, struct modsecurity_parameters *pa
+       req->content_type = apr_table_get(req->headers_in, "Content-Type");
+       req->content_encoding = apr_table_get(req->headers_in, "Content-Encoding");
+       req->hostname = apr_table_get(req->headers_in, "Host");
+-      req->parsed_uri.hostname = chunk_strdup(req, req->hostname, strlen(req->hostname));
++      if (req->hostname != NULL) {
++              req->parsed_uri.hostname = chunk_strdup(req, req->hostname, strlen(req->hostname));
++      } else {
++              req->parsed_uri.hostname = NULL;
++      }
+       lang = apr_table_get(req->headers_in, "Content-Languages");
+       if (lang != NULL) {
diff --git a/net/haproxy/patches/004-BUG-MINOR-ssl-fix-warning-about-ssl-min-max-ver-support.patch b/net/haproxy/patches/004-BUG-MINOR-ssl-fix-warning-about-ssl-min-max-ver-support.patch
deleted file mode 100644 (file)
index 6c1fac8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-commit 57e2606f70fa8d26fe4b5563ba72a6c7f2a25655
-Author: Lukas Tribus <lukas@ltri.eu>
-Date:   Tue Mar 5 23:14:32 2019 +0100
-
-    BUG/MINOR: ssl: fix warning about ssl-min/max-ver support
-    
-    In 84e417d8 ("MINOR: ssl: support Openssl 1.1.1 early callback for
-    switchctx") the code was extended to also support OpenSSL 1.1.1
-    (code already supported BoringSSL). A configuration check warning
-    was updated but with the wrong logic, the #ifdef needs a && instead
-    of an ||.
-    
-    Reported in #54.
-    
-    Should be backported to 1.8.
-    
-    (cherry picked from commit 1aabc939780d5eab1f88089d01fb077ad9315c65)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-    (cherry picked from commit f407d16b8f4cf2afb148668a23a1ba1cc4dd942a)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 7736c324..afdb1fce 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -7418,7 +7418,7 @@ static int parse_tls_method_minmax(char **args, int cur_arg, struct tls_version_
- static int ssl_bind_parse_tls_method_minmax(char **args, int cur_arg, struct proxy *px, struct ssl_bind_conf *conf, char **err)
- {
--#if (OPENSSL_VERSION_NUMBER < 0x10101000L) || !defined(OPENSSL_IS_BORINGSSL)
-+#if (OPENSSL_VERSION_NUMBER < 0x10101000L) && !defined(OPENSSL_IS_BORINGSSL)
-       ha_warning("crt-list: ssl-min-ver and ssl-max-ver are not supported with this Openssl version (skipped).\n");
- #endif
-       return parse_tls_method_minmax(args, cur_arg, &conf->ssl_methods, err);
diff --git a/net/haproxy/patches/005-MEDIUM-threads-Use-__ATOMIC_SEQ_CST-when-using-the-newer-atomic-API.patch b/net/haproxy/patches/005-MEDIUM-threads-Use-__ATOMIC_SEQ_CST-when-using-the-newer-atomic-API.patch
deleted file mode 100644 (file)
index 4acae7d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-commit 62aec002ccd6a7129b4f5e2e88be1957a6b2308b
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date:   Thu Mar 7 18:48:22 2019 +0100
-
-    MEDIUM: threads: Use __ATOMIC_SEQ_CST when using the newer atomic API.
-    
-    When using the new __atomic* API, ask the compiler to generate barriers.
-    A variant of those functions that don't generate barriers will be added later.
-    Before that, using HA_ATOMIC* would not generate any barrier, and some parts
-    of the code should be reviewed and missing barriers should be added.
-    
-    This should probably be backported to 1.8 and 1.9.
-    
-    (cherry picked from commit 113537967c8680f94977473e18c9e14dc09c3356)
-    [wt: this is in fact a real bug fix : all these atomics do not provide
-     the slightest sequential consistency by default as the value 0 is
-     __ATOMIC_RELAXED, which will definitely cause random issues with
-     threads on non-x86 platforms].
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit e5d1670f5fa95972fed6391201c0da8982bb9f94)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/include/common/hathreads.h b/include/common/hathreads.h
-index 24fb1d1a..8a738aaf 100644
---- a/include/common/hathreads.h
-+++ b/include/common/hathreads.h
-@@ -213,14 +213,14 @@ static inline unsigned long thread_isolated()
-       })
- #else
- /* gcc >= 4.7 */
--#define HA_ATOMIC_CAS(val, old, new) __atomic_compare_exchange_n(val, old, new, 0, 0, 0)
--#define HA_ATOMIC_ADD(val, i)        __atomic_add_fetch(val, i, 0)
--#define HA_ATOMIC_XADD(val, i)       __atomic_fetch_add(val, i, 0)
--#define HA_ATOMIC_SUB(val, i)        __atomic_sub_fetch(val, i, 0)
--#define HA_ATOMIC_AND(val, flags)    __atomic_and_fetch(val, flags, 0)
--#define HA_ATOMIC_OR(val, flags)     __atomic_or_fetch(val,  flags, 0)
--#define HA_ATOMIC_XCHG(val, new)     __atomic_exchange_n(val, new, 0)
--#define HA_ATOMIC_STORE(val, new)    __atomic_store_n(val, new, 0)
-+#define HA_ATOMIC_CAS(val, old, new) __atomic_compare_exchange_n(val, old, new, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_ADD(val, i)        __atomic_add_fetch(val, i, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_XADD(val, i)       __atomic_fetch_add(val, i, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_SUB(val, i)        __atomic_sub_fetch(val, i, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_AND(val, flags)    __atomic_and_fetch(val, flags, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_OR(val, flags)     __atomic_or_fetch(val,  flags, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_XCHG(val, new)     __atomic_exchange_n(val, new, __ATOMIC_SEQ_CST)
-+#define HA_ATOMIC_STORE(val, new)    __atomic_store_n(val, new, __ATOMIC_SEQ_CST)
- #endif
- #define HA_ATOMIC_UPDATE_MAX(val, new)                                        \
diff --git a/net/haproxy/patches/005-MINOR-examples-Use-right-locale-for-the-last-changelog-date-in-haproxy-spec.patch b/net/haproxy/patches/005-MINOR-examples-Use-right-locale-for-the-last-changelog-date-in-haproxy-spec.patch
new file mode 100644 (file)
index 0000000..310dc0f
--- /dev/null
@@ -0,0 +1,23 @@
+commit 86860896dc1841eb59cb95832d76a8093e8dc8c5
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Tue Apr 30 10:55:38 2019 +0200
+
+    MINOR: examples: Use right locale for the last changelog date in haproxy.spec
+    
+    The last changelog entry was stamped with the wrong locale.
+    
+    No need to backport, it is specific to 1.8
+
+diff --git a/examples/haproxy.spec b/examples/haproxy.spec
+index f3e0c7e0..fe5215d7 100644
+--- a/examples/haproxy.spec
++++ b/examples/haproxy.spec
+@@ -74,7 +74,7 @@ fi
+ %attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
+ %changelog
+-* jeu. avril 25 2019 Christopher Faulet <cfaulet@haproxy.com>
++* Thu Apr 25 2019 Christopher Faulet <cfaulet@haproxy.com>
+ - updated to 1.8.20
+ * Mon Feb 11 2019 Willy Tarreau <w@1wt.eu>
diff --git a/net/haproxy/patches/006-BUG-MAJOR-map-acl-real-fix-segfault-during-show-map-acl-on-CLI.patch b/net/haproxy/patches/006-BUG-MAJOR-map-acl-real-fix-segfault-during-show-map-acl-on-CLI.patch
new file mode 100644 (file)
index 0000000..e961294
--- /dev/null
@@ -0,0 +1,67 @@
+commit 83af1f6b65806982640679823228976deebf5202
+Author: Willy Tarreau <w@1wt.eu>
+Date:   Tue Apr 30 11:43:43 2019 +0200
+
+    BUG/MAJOR: map/acl: real fix segfault during show map/acl on CLI
+    
+    A previous commit 8d85aa44d ("BUG/MAJOR: map: fix segfault during
+    'show map/acl' on cli.") was provided to address a concurrency issue
+    between "show acl" and "clear acl" on the CLI. Sadly the code placed
+    there was copy-pasted without changing the element type (which was
+    struct stream in the original code) and not tested since the crash
+    is still present.
+    
+    The reproducer is simple : load a large ACL file (e.g. geolocation
+    addresses), issue "show acl #0" in loops in one window and issue a
+    "clear acl #0" in the other one, haproxy crashes.
+    
+    This fix was also tested with threads enabled and looks good since
+    the locking seems to work correctly in these areas though. It will
+    have to be backported as far as 1.6 since the commit above went
+    that far as well...
+    
+    (cherry picked from commit 49ee3b2f9a9e5d0b8d394938df527aa645ce72b4)
+    Signed-off-by: Willy Tarreau <w@1wt.eu>
+    (cherry picked from commit ac4be10f62ef72962d9cf0e6f2619e1e1c370d62)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/pattern.c b/src/pattern.c
+index 7eea9d96..21639569 100644
+--- a/src/pattern.c
++++ b/src/pattern.c
+@@ -1651,7 +1651,7 @@ int pat_ref_delete_by_id(struct pat_ref *ref, struct pat_ref_elt *refelt)
+                               LIST_DEL(&bref->users);
+                               LIST_INIT(&bref->users);
+                               if (elt->list.n != &ref->head)
+-                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
++                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
+                               bref->ref = elt->list.n;
+                       }
+                       list_for_each_entry(expr, &ref->pat, list)
+@@ -1691,7 +1691,7 @@ int pat_ref_delete(struct pat_ref *ref, const char *key)
+                               LIST_DEL(&bref->users);
+                               LIST_INIT(&bref->users);
+                               if (elt->list.n != &ref->head)
+-                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
++                                      LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
+                               bref->ref = elt->list.n;
+                       }
+                       list_for_each_entry(expr, &ref->pat, list)
+@@ -2086,7 +2086,7 @@ void pat_ref_reload(struct pat_ref *ref, struct pat_ref *replace)
+                       LIST_DEL(&bref->users);
+                       LIST_INIT(&bref->users);
+                       if (elt->list.n != &ref->head)
+-                              LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
++                              LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
+                       bref->ref = elt->list.n;
+               }
+               LIST_DEL(&elt->list);
+@@ -2175,7 +2175,7 @@ void pat_ref_prune(struct pat_ref *ref)
+                       LIST_DEL(&bref->users);
+                       LIST_INIT(&bref->users);
+                       if (elt->list.n != &ref->head)
+-                              LIST_ADDQ(&LIST_ELEM(elt->list.n, struct stream *, list)->back_refs, &bref->users);
++                              LIST_ADDQ(&LIST_ELEM(elt->list.n, typeof(elt), list)->back_refs, &bref->users);
+                       bref->ref = elt->list.n;
+               }
+               LIST_DEL(&elt->list);
diff --git a/net/haproxy/patches/006-BUG-MEDIUM-threads-fd-do-not-forget-to-take-into-account-epoll_fd-pipes.patch b/net/haproxy/patches/006-BUG-MEDIUM-threads-fd-do-not-forget-to-take-into-account-epoll_fd-pipes.patch
deleted file mode 100644 (file)
index 68cd98a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-commit 1dfa4fd4be313a87f2a4861e81d0ad8ea8214223
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Thu Mar 14 19:10:55 2019 +0100
-
-    BUG/MEDIUM: threads/fd: do not forget to take into account epoll_fd/pipes
-    
-    Each thread uses one epoll_fd or kqueue_fd, and a pipe (thus two FDs).
-    These ones have to be accounted for in the maxsock calculation, otherwise
-    we can reach maxsock before maxconn. This is difficult to observe but it
-    in fact happens when a server connects back to the frontend and has checks
-    enabled : the check uses its FD and serves to fill the loop. In this case
-    all FDs planed for the datapath are used for this.
-    
-    This needs to be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit 2c58b41c96e70f567d0f9ae876a80770630c06ee)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 26d110ba04cba02b337beff53a83847320e4fcdb)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/src/haproxy.c b/src/haproxy.c
-index 68367627..5c3febdd 100644
---- a/src/haproxy.c
-+++ b/src/haproxy.c
-@@ -1828,6 +1828,9 @@ static void init(int argc, char **argv)
-       global.hardmaxconn = global.maxconn;  /* keep this max value */
-       global.maxsock += global.maxconn * 2; /* each connection needs two sockets */
-       global.maxsock += global.maxpipes * 2; /* each pipe needs two FDs */
-+      global.maxsock += global.nbthread;     /* one epoll_fd/kqueue_fd per thread */
-+      global.maxsock += 2 * global.nbthread; /* one wake-up pipe (2 fd) per thread */
-+
-       /* compute fd used by async engines */
-       if (global.ssl_used_async_engines) {
-               int sides = !!global.ssl_used_frontend + !!global.ssl_used_backend;
diff --git a/net/haproxy/patches/007-BUG-MAJOR-spoe-Fix-initialization-of-thread-dependent-fields.patch b/net/haproxy/patches/007-BUG-MAJOR-spoe-Fix-initialization-of-thread-dependent-fields.patch
deleted file mode 100644 (file)
index f4d448c..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-commit a3cfe8f4bc2ec98fdbe25c49f2c21699b6d09d2b
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Mon Mar 18 13:57:42 2019 +0100
-
-    BUG/MAJOR: spoe: Fix initialization of thread-dependent fields
-    
-    A bug was introduced in the commit b0769b ("BUG/MEDIUM: spoe: initialization
-    depending on nbthread must be done last"). The code depending on global.nbthread
-    was moved from cfg_parse_spoe_agent() to spoe_check() but the pointer on the
-    agent configuration was not updated to use the filter's one. The variable
-    curagent is a global variable only valid during the configuration parsing. In
-    spoe_check(), conf->agent must be used instead.
-    
-    This patch must be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit fe261551b9980fe33990eb34d2153bf1de24b20f)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-    (cherry picked from commit 7a93d271d549144a8ed8c816f5694a51ab62b90c)
-    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
-diff --git a/src/flt_spoe.c b/src/flt_spoe.c
-index e4453882..66d26f34 100644
---- a/src/flt_spoe.c
-+++ b/src/flt_spoe.c
-@@ -2937,20 +2937,20 @@ spoe_check(struct proxy *px, struct flt_conf *fconf)
-       if (global.nbthread == 1)
-               conf->agent->flags |= SPOE_FL_ASYNC;
--      if ((curagent->rt = calloc(global.nbthread, sizeof(*curagent->rt))) == NULL) {
-+      if ((conf->agent->rt = calloc(global.nbthread, sizeof(*conf->agent->rt))) == NULL) {
-               ha_alert("Proxy %s : out of memory initializing SPOE agent '%s' declared at %s:%d.\n",
-                        px->id, conf->agent->id, conf->agent->conf.file, conf->agent->conf.line);
-               return 1;
-       }
-       for (i = 0; i < global.nbthread; ++i) {
--              curagent->rt[i].frame_size   = curagent->max_frame_size;
--              curagent->rt[i].applets_act  = 0;
--              curagent->rt[i].applets_idle = 0;
--              curagent->rt[i].sending_rate = 0;
--              LIST_INIT(&curagent->rt[i].applets);
--              LIST_INIT(&curagent->rt[i].sending_queue);
--              LIST_INIT(&curagent->rt[i].waiting_queue);
--              HA_SPIN_INIT(&curagent->rt[i].lock);
-+              conf->agent->rt[i].frame_size   = conf->agent->max_frame_size;
-+              conf->agent->rt[i].applets_act  = 0;
-+              conf->agent->rt[i].applets_idle = 0;
-+              conf->agent->rt[i].sending_rate = 0;
-+              LIST_INIT(&conf->agent->rt[i].applets);
-+              LIST_INIT(&conf->agent->rt[i].sending_queue);
-+              LIST_INIT(&conf->agent->rt[i].waiting_queue);
-+              HA_SPIN_INIT(&conf->agent->rt[i].lock);
-       }
-       free(conf->agent->b.name);
diff --git a/net/haproxy/patches/007-BUG-MEDIUM-listener-Fix-how-unlimited-number-of-consecutive-accepts-is-handled.patch b/net/haproxy/patches/007-BUG-MEDIUM-listener-Fix-how-unlimited-number-of-consecutive-accepts-is-handled.patch
new file mode 100644 (file)
index 0000000..e54c530
--- /dev/null
@@ -0,0 +1,79 @@
+commit 7bd7a8d2b8889f604b807c21190d2e70328d6674
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Tue Apr 30 12:17:13 2019 +0200
+
+    BUG/MEDIUM: listener: Fix how unlimited number of consecutive accepts is handled
+    
+    There is a bug when global.tune.maxaccept is set to -1 (no limit). It is pretty
+    visible with one process (nbproc sets to 1). The functions listener_accept() and
+    accept_queue_process() don't expect to handle negative maxaccept values. So
+    instead of accepting incoming connections without any limit, none are never
+    accepted and HAProxy loop infinitly in the scheduler.
+    
+    When there are 2 or more processes, the bug is a bit more subtile. The limit for
+    a listener is set to 1. So only one connection is accepted at a time by a given
+    listener. This happens because the listener's maxaccept value is an unsigned
+    integer. In check_config_validity(), it is first set to UINT_MAX (-1 casted in
+    an unsigned integer), and then some calculations on it leads to an integer
+    overflow.
+    
+    To fix the bug, the listener's maxaccept value is now a signed integer. So, if a
+    negative value is set for global.tune.maxaccept, we keep it untouched for the
+    listener and no calculation is made on it. Then, in the listener code, this
+    signed value is casted to a unsigned one. It simplifies all tests instead of
+    dealing with negative values. So, it limits the number of connections accepted
+    at a time to UINT_MAX at most. But, honestly, it not an issue.
+    
+    This patch must be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit 102854cbbaa4d22466dddec9035d411db244082f)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit bca4fb2d9d7f2966d9f8270fa1796fdc0dfc866d)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/types/listener.h b/include/types/listener.h
+index ea2eadb5..16ef6d7a 100644
+--- a/include/types/listener.h
++++ b/include/types/listener.h
+@@ -196,7 +196,7 @@ struct listener {
+       int nbconn;                     /* current number of connections on this listener */
+       int maxconn;                    /* maximum connections allowed on this listener */
+       unsigned int backlog;           /* if set, listen backlog */
+-      unsigned int maxaccept;         /* if set, max number of connections accepted at once */
++      int maxaccept;         /* if set, max number of connections accepted at once (-1 when disabled) */
+       struct list proto_list;         /* list in the protocol header */
+       int (*accept)(struct listener *l, int fd, struct sockaddr_storage *addr); /* upper layer's accept() */
+       enum obj_type *default_target;  /* default target to use for accepted sessions or NULL */
+diff --git a/src/listener.c b/src/listener.c
+index 821c931a..74990c45 100644
+--- a/src/listener.c
++++ b/src/listener.c
+@@ -406,7 +406,7 @@ void listener_accept(int fd)
+ {
+       struct listener *l = fdtab[fd].owner;
+       struct proxy *p;
+-      int max_accept;
++      unsigned int max_accept;
+       int next_conn = 0;
+       int next_feconn = 0;
+       int next_actconn = 0;
+@@ -420,6 +420,10 @@ void listener_accept(int fd)
+       if (!l)
+               return;
+       p = l->bind_conf->frontend;
++
++      /* if l->maxaccept is -1, then max_accept is UINT_MAX. It is not really
++       * illimited, but it is probably enough.
++       */
+       max_accept = l->maxaccept ? l->maxaccept : 1;
+       if (!(l->options & LI_O_UNLIMITED) && global.sps_lim) {
+@@ -480,7 +484,7 @@ void listener_accept(int fd)
+        * worst case. If we fail due to system limits or temporary resource
+        * shortage, we try again 100ms later in the worst case.
+        */
+-      for (; max_accept-- > 0; next_conn = next_feconn = next_actconn = 0) {
++      for (; max_accept; next_conn = next_feconn = next_actconn = 0, max_accept--) {
+               struct sockaddr_storage addr;
+               socklen_t laddr = sizeof(addr);
+               unsigned int count;
diff --git a/net/haproxy/patches/008-MINOR-config-Test-validity-of-tune-maxaccept-during-the-config-parsing.patch b/net/haproxy/patches/008-MINOR-config-Test-validity-of-tune-maxaccept-during-the-config-parsing.patch
new file mode 100644 (file)
index 0000000..5c5d889
--- /dev/null
@@ -0,0 +1,44 @@
+commit 6e580b6e744011e87c337ebe2c082acfd5ca835a
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Tue Apr 30 14:03:56 2019 +0200
+
+    MINOR: config: Test validity of tune.maxaccept during the config parsing
+    
+    Only -1 and positive integers from 0 to INT_MAX are accepted. An error is
+    triggered during the config parsing for any other values.
+    
+    This patch may be backported to all supported versions.
+    
+    (cherry picked from commit 6b02ab87348090efec73b1dd24f414239669f279)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit 2bbc40f8bc9a52ba0d03b25270ac0129cca29bba)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/cfgparse.c b/src/cfgparse.c
+index c178538b..8e325416 100644
+--- a/src/cfgparse.c
++++ b/src/cfgparse.c
+@@ -789,6 +789,8 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
+               global.tune.maxpollevents = atol(args[1]);
+       }
+       else if (!strcmp(args[0], "tune.maxaccept")) {
++              long max;
++
+               if (alertif_too_many_args(1, file, linenum, args, &err_code))
+                       goto out;
+               if (global.tune.maxaccept != 0) {
+@@ -801,7 +803,13 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
+                       err_code |= ERR_ALERT | ERR_FATAL;
+                       goto out;
+               }
+-              global.tune.maxaccept = atol(args[1]);
++              max = atol(args[1]);
++              if (/*max < -1 || */max > INT_MAX) {
++                      ha_alert("parsing [%s:%d] : '%s' expects -1 or an integer from 0 to INT_MAX.\n", file, linenum, args[0]);
++                      err_code |= ERR_ALERT | ERR_FATAL;
++                      goto out;
++              }
++              global.tune.maxaccept = max;
+       }
+       else if (!strcmp(args[0], "tune.chksize")) {
+               if (alertif_too_many_args(1, file, linenum, args, &err_code))
diff --git a/net/haproxy/patches/008-deprecated-openssl.patch b/net/haproxy/patches/008-deprecated-openssl.patch
deleted file mode 100644 (file)
index 8dd011e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -39,6 +39,7 @@
- #include <netdb.h>
- #include <netinet/tcp.h>
-+#include <openssl/bn.h>
- #include <openssl/crypto.h>
- #include <openssl/ssl.h>
- #include <openssl/x509.h>
-@@ -60,6 +61,17 @@
- #include <openssl/async.h>
- #endif
-+#ifndef OPENSSL_VERSION
-+#define OPENSSL_VERSION               SSLEAY_VERSION
-+#define OpenSSL_version(x)    SSLeay_version(x)
-+#define OpenSSL_version_num   SSLeay
-+#endif
-+
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- #include <import/lru.h>
- #include <import/xxhash.h>
-@@ -217,7 +229,7 @@ static struct {
-       .capture_cipherlist = 0,
- };
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
- static HA_RWLOCK_T *ssl_rwlocks;
-@@ -1716,8 +1728,8 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
-       ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
-       /* Set duration for the certificate */
--      if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
--          !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
-+      if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
-+          !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
-               goto mkcert_error;
-       /* set public key in the certificate */
-@@ -6299,7 +6311,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
-               goto out;
-       smp_trash = get_trash_chunk();
--      if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
-+      if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
-               goto out;
-       smp->data.u.str = *smp_trash;
-@@ -6399,7 +6411,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
-               goto out;
-       smp_trash = get_trash_chunk();
--      if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
-+      if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
-               goto out;
-       smp->data.u.str = *smp_trash;
-@@ -8976,10 +8988,12 @@ static void __ssl_sock_init(void)
- #endif
-       xprt_register(XPRT_SSL, &ssl_sock);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       SSL_library_init();
-+#endif
-       cm = SSL_COMP_get_compression_methods();
-       sk_SSL_COMP_zero(cm);
--#ifdef USE_THREAD
-+#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
-       ssl_locking_init();
- #endif
- #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
-@@ -9008,8 +9022,8 @@ static void __ssl_sock_init(void)
- #else /* OPENSSL_IS_BORINGSSL */
-               OPENSSL_VERSION_TEXT
-               "\nRunning on OpenSSL version : %s%s",
--             SSLeay_version(SSLEAY_VERSION),
--             ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
-+             OpenSSL_version(OPENSSL_VERSION),
-+             ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
- #endif
-       memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
- #if OPENSSL_VERSION_NUMBER < 0x00907000L
-@@ -9100,12 +9114,14 @@ static void __ssl_sock_deinit(void)
-       }
- #endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-         ERR_remove_state(0);
-         ERR_free_strings();
-         EVP_cleanup();
-+#endif
--#if OPENSSL_VERSION_NUMBER >= 0x00907000L
-+#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
-         CRYPTO_cleanup_all_ex_data();
- #endif
- }
diff --git a/net/haproxy/patches/009-CLEANUP-config-Dont-alter-listener--maxaccept-when-nbproc-is-set-to-1.patch b/net/haproxy/patches/009-CLEANUP-config-Dont-alter-listener--maxaccept-when-nbproc-is-set-to-1.patch
new file mode 100644 (file)
index 0000000..4bcae44
--- /dev/null
@@ -0,0 +1,34 @@
+commit c6e03c1495fa51f9a98ed0bbe3230313c7c7201c
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Tue Apr 30 14:08:41 2019 +0200
+
+    CLEANUP: config: Don't alter listener->maxaccept when nbproc is set to 1
+    
+    This patch only removes a useless calculation on listener->maxaccept when nbproc
+    is set to 1. Indeed, the following formula has no effet in such case:
+    
+      listener->maxaccept = (listener->maxaccept + nbproc - 1) / nbproc;
+    
+    This patch may be backported as far as 1.5.
+    
+    (cherry picked from commit 02f3cf19ed803d20aff9294ce7cb732489951ff5)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit 14203e3cf9404e57de5e274b453f0fe4f2174924)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/cfgparse.c b/src/cfgparse.c
+index 8e325416..3f6ea352 100644
+--- a/src/cfgparse.c
++++ b/src/cfgparse.c
+@@ -9018,9 +9018,8 @@ out_uri_auth_compat:
+                        * is bound to. Rememeber that maxaccept = -1 must be kept as it is
+                        * used to disable the limit.
+                        */
+-                      if (listener->maxaccept > 0) {
+-                              if (nbproc > 1)
+-                                      listener->maxaccept = (listener->maxaccept + 1) / 2;
++                      if (listener->maxaccept > 0 && nbproc > 1) {
++                              listener->maxaccept = (listener->maxaccept + 1) / 2;
+                               listener->maxaccept = (listener->maxaccept + nbproc - 1) / nbproc;
+                       }
diff --git a/net/haproxy/patches/010-MINOR-threads-Implement-HA_ATOMIC_LOAD.patch b/net/haproxy/patches/010-MINOR-threads-Implement-HA_ATOMIC_LOAD.patch
new file mode 100644 (file)
index 0000000..30e8cd4
--- /dev/null
@@ -0,0 +1,54 @@
+commit f95cf6ad70565ee2322cf23bc519b7bb0b3831b2
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date:   Tue Apr 30 13:38:02 2019 +0200
+
+    MINOR: threads: Implement HA_ATOMIC_LOAD().
+    
+    The same way we have HA_ATOMIC_STORE(), implement HA_ATOMIC_LOAD().
+    
+    This should be backported to 1.8 and 1.9, as we need it for a bug fix
+    in port ranges.
+    
+    (cherry picked from commit 9ce62b5498b27fbf4217d9c25779d5b2ceca23f2)
+    Signed-off-by: Olivier Houchard <cognet@ci0.org>
+    (cherry picked from commit 358c979611370fa2bc3b8e47ed50a325cf9126cf)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/common/hathreads.h b/include/common/hathreads.h
+index 8134839a..11d7cab6 100644
+--- a/include/common/hathreads.h
++++ b/include/common/hathreads.h
+@@ -62,6 +62,7 @@ enum { tid = 0 };
+               *(val) = new;                                           \
+               __old_xchg;                                             \
+       })
++#define HA_ATOMIC_LOAD(val)          *(val)
+ #define HA_ATOMIC_STORE(val, new)    ({*(val) = new;})
+ #define HA_ATOMIC_UPDATE_MAX(val, new)                                        \
+       ({                                                              \
+@@ -203,6 +204,16 @@ static inline unsigned long thread_isolated()
+               } while (!__sync_bool_compare_and_swap(__val_xchg, __old_xchg, __new_xchg)); \
+               __old_xchg;                                             \
+       })
++
++#define HA_ATOMIC_LOAD(val)                                             \
++        ({                                                              \
++              typeof(*(val)) ret;                                     \
++              __sync_synchronize();                                   \
++              ret = *(volatile typeof(val))val;                       \
++              __sync_synchronize();                                   \
++              ret;                                                    \
++      })
++
+ #define HA_ATOMIC_STORE(val, new)                                     \
+       ({                                                              \
+               typeof((val)) __val_store = (val);                      \
+@@ -221,6 +232,8 @@ static inline unsigned long thread_isolated()
+ #define HA_ATOMIC_OR(val, flags)     __atomic_or_fetch(val,  flags, __ATOMIC_SEQ_CST)
+ #define HA_ATOMIC_XCHG(val, new)     __atomic_exchange_n(val, new, __ATOMIC_SEQ_CST)
+ #define HA_ATOMIC_STORE(val, new)    __atomic_store_n(val, new, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_LOAD(val)          __atomic_load_n(val, __ATOMIC_SEQ_CST)
++
+ #endif
+ #define HA_ATOMIC_UPDATE_MAX(val, new)                                        \
diff --git a/net/haproxy/patches/011-BUG-MEDIUM-port_range-Make-the-ring-buffer-lock-free.patch b/net/haproxy/patches/011-BUG-MEDIUM-port_range-Make-the-ring-buffer-lock-free.patch
new file mode 100644 (file)
index 0000000..68332fd
--- /dev/null
@@ -0,0 +1,116 @@
+commit 31470e2ba2aabb4c6340fbc15cb5486ceb8c69c8
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date:   Mon Apr 29 18:52:06 2019 +0200
+
+    BUG/MEDIUM: port_range: Make the ring buffer lock-free.
+    
+    Port range uses a ring buffer, and unfortunately, when making haproxy
+    multithreaded, it's been overlooked, and the ring buffer is not thread-safe.
+    When specifying a source range, 2 or more threads could pick the same
+    port, and of course only one of them could use the port, the others would
+    always fail the connection.
+    To fix this, make it a lock-free ring buffer. This is easier than usual
+    because we know the ring buffer can never be full.
+    
+    This should be backported to 1.8 and 1.9.
+    
+    (cherry picked from commit 07425de71777b688e77a9c70a7088c13e66e41e9)
+    Signed-off-by: Olivier Houchard <cognet@ci0.org>
+    (cherry picked from commit bffb51147a4a5939e344b3c838628f9a944febef)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/proto/port_range.h b/include/proto/port_range.h
+index 8c63faca..f7e3f1d5 100644
+--- a/include/proto/port_range.h
++++ b/include/proto/port_range.h
+@@ -24,18 +24,22 @@
+ #include <types/port_range.h>
++#define GET_NEXT_OFF(range, off) ((off) == (range)->size - 1 ? 0 : (off) + 1)
++
+ /* return an available port from range <range>, or zero if none is left */
+ static inline int port_range_alloc_port(struct port_range *range)
+ {
+       int ret;
++      int get;
++      int put;
+-      if (!range->avail)
+-              return 0;
+-      ret = range->ports[range->get];
+-      range->get++;
+-      if (range->get >= range->size)
+-              range->get = 0;
+-      range->avail--;
++      get = HA_ATOMIC_LOAD(&range->get);
++      do {
++              put = HA_ATOMIC_LOAD(&range->put_t);
++              if (unlikely(put == get))
++                      return 0;
++              ret = range->ports[get];
++      } while (!(HA_ATOMIC_CAS(&range->get, &get, GET_NEXT_OFF(range, get))));
+       return ret;
+ }
+@@ -45,14 +49,28 @@ static inline int port_range_alloc_port(struct port_range *range)
+  */
+ static inline void port_range_release_port(struct port_range *range, int port)
+ {
++      int put;
++
+       if (!port || !range)
+               return;
+-      range->ports[range->put] = port;
+-      range->avail++;
+-      range->put++;
+-      if (range->put >= range->size)
+-              range->put = 0;
++      put = range->put_h;
++      /* put_h is reserved for producers, so that they can each get a
++       * free slot, put_t is what is used by consumers to know if there's
++       * elements available or not
++       */
++      /* First reserve or slot, we know the ring buffer can't be full,
++       * as we will only ever release port we allocated before
++       */
++      while (!(HA_ATOMIC_CAS(&range->put_h, &put, GET_NEXT_OFF(range, put))));
++      HA_ATOMIC_STORE(&range->ports[put], port);
++      /* Wait until all the threads that got a slot before us are done */
++      while ((volatile int)range->put_t != put)
++              __ha_compiler_barrier();
++      /* Let the world know we're done, and any potential consumer they
++       * can use that port.
++       */
++      HA_ATOMIC_STORE(&range->put_t, GET_NEXT_OFF(range, put));
+ }
+ /* return a new initialized port range of N ports. The ports are not
+@@ -62,8 +80,10 @@ static inline struct port_range *port_range_alloc_range(int n)
+ {
+       struct port_range *ret;
+       ret = calloc(1, sizeof(struct port_range) +
+-                   n * sizeof(((struct port_range *)0)->ports[0]));
+-      ret->size = ret->avail = n;
++                   (n + 1) * sizeof(((struct port_range *)0)->ports[0]));
++      ret->size = n + 1;
++      /* Start at the first free element */
++      ret->put_h = ret->put_t = n;
+       return ret;
+ }
+diff --git a/include/types/port_range.h b/include/types/port_range.h
+index 1d010f77..33455d2d 100644
+--- a/include/types/port_range.h
++++ b/include/types/port_range.h
+@@ -25,8 +25,7 @@
+ #include <netinet/in.h>
+ struct port_range {
+-      int size, get, put;             /* range size, and get/put positions */
+-      int avail;                      /* number of available ports left */
++      int size, get, put_h, put_t;    /* range size, and get/put positions */
+       uint16_t ports[0];              /* array of <size> ports, in host byte order */
+ };
diff --git a/net/haproxy/patches/012-deprecated-openssl.patch b/net/haproxy/patches/012-deprecated-openssl.patch
new file mode 100644 (file)
index 0000000..8dd011e
--- /dev/null
@@ -0,0 +1,107 @@
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -39,6 +39,7 @@
+ #include <netdb.h>
+ #include <netinet/tcp.h>
++#include <openssl/bn.h>
+ #include <openssl/crypto.h>
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
+@@ -60,6 +61,17 @@
+ #include <openssl/async.h>
+ #endif
++#ifndef OPENSSL_VERSION
++#define OPENSSL_VERSION               SSLEAY_VERSION
++#define OpenSSL_version(x)    SSLeay_version(x)
++#define OpenSSL_version_num   SSLeay
++#endif
++
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define X509_getm_notBefore X509_get_notBefore
++#define X509_getm_notAfter X509_get_notAfter
++#endif
++
+ #include <import/lru.h>
+ #include <import/xxhash.h>
+@@ -217,7 +229,7 @@ static struct {
+       .capture_cipherlist = 0,
+ };
+-#ifdef USE_THREAD
++#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ static HA_RWLOCK_T *ssl_rwlocks;
+@@ -1716,8 +1728,8 @@ ssl_sock_do_create_cert(const char *servername, struct bind_conf *bind_conf, SSL
+       ASN1_INTEGER_set(X509_get_serialNumber(newcrt), HA_ATOMIC_ADD(&ssl_ctx_serial, 1));
+       /* Set duration for the certificate */
+-      if (!X509_gmtime_adj(X509_get_notBefore(newcrt), (long)-60*60*24) ||
+-          !X509_gmtime_adj(X509_get_notAfter(newcrt),(long)60*60*24*365))
++      if (!X509_gmtime_adj(X509_getm_notBefore(newcrt), (long)-60*60*24) ||
++          !X509_gmtime_adj(X509_getm_notAfter(newcrt),(long)60*60*24*365))
+               goto mkcert_error;
+       /* set public key in the certificate */
+@@ -6299,7 +6311,7 @@ smp_fetch_ssl_x_notafter(const struct arg *args, struct sample *smp, const char
+               goto out;
+       smp_trash = get_trash_chunk();
+-      if (ssl_sock_get_time(X509_get_notAfter(crt), smp_trash) <= 0)
++      if (ssl_sock_get_time(X509_getm_notAfter(crt), smp_trash) <= 0)
+               goto out;
+       smp->data.u.str = *smp_trash;
+@@ -6399,7 +6411,7 @@ smp_fetch_ssl_x_notbefore(const struct arg *args, struct sample *smp, const char
+               goto out;
+       smp_trash = get_trash_chunk();
+-      if (ssl_sock_get_time(X509_get_notBefore(crt), smp_trash) <= 0)
++      if (ssl_sock_get_time(X509_getm_notBefore(crt), smp_trash) <= 0)
+               goto out;
+       smp->data.u.str = *smp_trash;
+@@ -8976,10 +8988,12 @@ static void __ssl_sock_init(void)
+ #endif
+       xprt_register(XPRT_SSL, &ssl_sock);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       SSL_library_init();
++#endif
+       cm = SSL_COMP_get_compression_methods();
+       sk_SSL_COMP_zero(cm);
+-#ifdef USE_THREAD
++#if defined(USE_THREAD) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+       ssl_locking_init();
+ #endif
+ #if (OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined OPENSSL_NO_TLSEXT && !defined OPENSSL_IS_BORINGSSL && !defined LIBRESSL_VERSION_NUMBER)
+@@ -9008,8 +9022,8 @@ static void __ssl_sock_init(void)
+ #else /* OPENSSL_IS_BORINGSSL */
+               OPENSSL_VERSION_TEXT
+               "\nRunning on OpenSSL version : %s%s",
+-             SSLeay_version(SSLEAY_VERSION),
+-             ((OPENSSL_VERSION_NUMBER ^ SSLeay()) >> 8) ? " (VERSIONS DIFFER!)" : "");
++             OpenSSL_version(OPENSSL_VERSION),
++             ((OPENSSL_VERSION_NUMBER ^ OpenSSL_version_num()) >> 8) ? " (VERSIONS DIFFER!)" : "");
+ #endif
+       memprintf(&ptr, "%s\nOpenSSL library supports TLS extensions : "
+ #if OPENSSL_VERSION_NUMBER < 0x00907000L
+@@ -9100,12 +9114,14 @@ static void __ssl_sock_deinit(void)
+       }
+ #endif
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+         ERR_remove_state(0);
+         ERR_free_strings();
+         EVP_cleanup();
++#endif
+-#if OPENSSL_VERSION_NUMBER >= 0x00907000L
++#if OPENSSL_VERSION_NUMBER >= 0x00907000L && OPENSSL_VERSION_NUMBER < 0x10100000L
+         CRYPTO_cleanup_all_ex_data();
+ #endif
+ }
index c2e484cec836f434ffed1b753e96e506b5a1b197..20708c02744134862f866f9f2085ba9c9b68f66a 100644 (file)
@@ -9,14 +9,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2pd
-PKG_VERSION:=2.23.0
+PKG_VERSION:=2.24.0
 PKG_RELEASE:=1
 PKG_BUILD_PARALLEL:=1
 
-PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=19e8573b44b94ce83bd5705569934049cb1dc39db11449abcb9e4b36afe5a279
-PKG_LICENSE:=BSD-3-clause
+PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=809b37100f0f176432b01ab6edee96dc62b0f65d5bf7531e008a87117e742566
+
+PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -28,7 +31,6 @@ define Package/i2pd
        TITLE:=full-featured C++ implementation of I2P client
        URL:=https://github.com/PurpleI2P/i2pd
        USERID:=i2pd:i2pd
-       MAINTAINER:=David Yang <mmyangfl@gmail.com>
 endef
 
 define Package/i2pd/description
index e6cf46c398ae772ed16ced2a82f6a63e988ea1c1..bf4d2f50b798b85d6defb2250ec091de91861338 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iodine
 PKG_VERSION:=0.7.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://code.kryo.se/iodine/
index 17ddc04836367cfead8544eed3fea78874cc36b7..ef55c3c52c31dc2df1c02ded9c238e9d7e3b41df 100644 (file)
@@ -20,7 +20,7 @@ index 2715979..5f0e370 100644
  
  /* daemon(3) exists only in 4.4BSD or later, and in GNU libc */
 -#if !defined(ANDROID) && !defined(WINDOWS32) && !(defined(BSD) && (BSD >= 199306)) && !defined(__GLIBC__)
-+#ifdef __UCLIBC__
++#ifdef __NO_DAEMON__
  static int daemon(int nochdir, int noclose)
  {
        int fd, i;
index 36c035db9527bb42d0d2cfaca9d3fcecec40c4ec..ec7e92fb865afb25675e1b6a3d44a08f594e08cd 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kea
 PKG_VERSION:=1.5.0
-PKG_RELEASE:=2
+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
@@ -110,6 +110,7 @@ HOST_CONFIGURE_ARGS += \
        --enable-boost-headers-only \
        --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
        --with-boost-include="$(STAGING_DIR)/usr/include" \
+       --with-openssl="$(STAGING_DIR)/usr" \
        --without-pic
 
 HOST_LDFLAGS += \
index 8933b881045526edd1787b9dc6cabfe250550402..24da2bc246f27e1c717e323637d72b751db8b9c9 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=2.0.14
+PKG_VERSION:=2.0.16
 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:=f0c7dc86147a286913c1c2c918f557735016285d25779d4d2fce5732fcb888df
 
 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
 }
index 556e20fdaaf9ab6d66ba4a9e5b467b54b2e8a973..606e4c1c91e908aae729a7664969713539e90fe6 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libreswan
 PKG_VERSION:=3.27
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.libreswan.org/
@@ -21,7 +21,6 @@ PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/kernel.mk
 
 define Package/libreswan/Default
   TITLE:=Libreswan
@@ -40,8 +39,9 @@ $(call Package/libreswan/Default)
   SUBMENU:=VPN
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:= +kmod-libreswan +libnss +librt +libevent2 +libevent2-pthreads \
-           +ip-full
+  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
@@ -55,20 +55,6 @@ $(call Package/libreswan/Default/description)
  Engineering Task Force ("IETF").
 endef
 
-define KernelPackage/libreswan
-$(call Package/libreswan/Default)
-  SUBMENU:=Network Support
-  TITLE+= (kernel module)
-  FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
-  DEPENDS:= +kmod-crypto-authenc +kmod-crypto-hash +kmod-ipt-ipsec +iptables-mod-ipsec \
-           +kmod-ipsec +kmod-ipsec4 +kmod-crypto-rng +IPV6:kmod-ipsec6
-endef
-
-define KernelPackage/libreswan/description
-$(call Package/libreswan/Default/description)
- This package contains the Libreswan kernel module.
-endef
-
 define Package/libreswan/conffiles
 /etc/ipsec.d
 /etc/ipsec.conf
@@ -90,6 +76,7 @@ MAKE_FLAGS+= \
     USE_SYSTEMD_WATCHDOG=false \
     INC_USRLOCAL="/usr" \
     FINALRUNDIR="/var/run/pluto" \
+    ARCH="$(LINUX_KARCH)" \
     KERNELSRC="$(LINUX_DIR)"
 
 define Build/Prepare
@@ -99,8 +86,7 @@ define Build/Prepare
 endef
 
 define Build/Compile
-       $(call Build/Compile/Default,base)
-       $(call Build/Compile/Default,module)
+       $(call Build/Compile/Default,all)
 endef
 
 define Package/libreswan/install
@@ -122,4 +108,3 @@ define Package/libreswan/install
 endef
 
 $(eval $(call BuildPackage,libreswan))
-$(eval $(call KernelPackage,libreswan))
index affa5b0a6ef9b32d4b5db329530b67dac160016c..8b7493b865208121208bf196254ead0876de2b28 100644 (file)
@@ -1,46 +1,25 @@
-# /etc/ipsec.conf - Libreswan IPsec configuration file
-#
-# see 'man ipsec.conf' and 'man pluto' for more information
-#
-# For example configurations and documentation, see https://libreswan.org/wiki/
-
 config setup
-        # Normally, pluto logs via syslog.
-        #logfile=/var/log/pluto.log
-        #
-        # Do not enable debug options to debug configuration issues!
-        #
-        # plutodebug="control parsing"
-        # plutodebug="all crypt"
-        plutodebug=none
-        #
-        # NAT-TRAVERSAL support
-        # exclude networks used on server side by adding %v4:!a.b.c.0/24
-        # It seems that T-Mobile in the US and Rogers/Fido in Canada are
-        # using 25/8 as "private" address space on their wireless networks.
-        # This range has never been announced via BGP (at least up to 2015)
-        virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10
-
-# if it exists, include system wide crypto-policy defaults
-# include /etc/crypto-policies/back-ends/libreswan.config
-
-# It is best to add your IPsec connections as separate files in /etc/ipsec.d/
-
-conn L2TP-PSK-NAT
-    rightsubnet=vhost:%priv
-    also=L2TP-PSK-noNAT
+    # 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 L2TP-PSK-noNAT
+conn ikev1
     authby=secret
     pfs=no
     auto=add
-    keyingtries=8
-    ikelifetime=8h
-    keylife=1h
+    rekey=no
+    left=%defaultroute
+    right=%any
+    ikev2=never
     type=transport
-    left=A.B.C.D
     leftprotoport=17/1701
-    right=%any
     rightprotoport=17/%any
+    dpddelay=15
+    dpdtimeout=30
+    dpdaction=clear
+
+conn ikev1-nat
+    also=ikev1
+    rightsubnet=vhost:%priv
 
-include /etc/ipsec.d/*.conf
\ No newline at end of file
+# include /etc/ipsec.d/*.conf
index a43754ca964ec83e9624ac79b172a9b499487f3a..5ef87b09c8ac4ad492e7117bbbf501d4a454ca66 100644 (file)
@@ -1,17 +1,10 @@
-# This file holds shared secrets (PSK) and XAUTH user passwords used for
-# authentication.  See pluto(8) manpage or the libreswan website.
-
 # Unlike older openswan, this file does NOT contain any X.509 related
 # information such as private key :RSA statements as these now reside
 # in the NSS database. See:
 #
 # https://libreswan.org/wiki/Using_NSS_with_libreswan
 # https://libreswan.org/wiki/Migrating_from_Openswan
-#
-# The preferred method for adding secrets is to create a new file in
-# the /etc/ipsec.d/ directory, so it will be included via the include
-# line below
-
-#A.B.C.D %any : PSK "SsEeCcRrEeTt"
 
-include /etc/ipsec.d/*.secrets
+# 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 7500259638b0ac856dc183cc9a4058b7d606bac0..d85610bbb76751767e2ddfc27f205bdbf63b9740 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
 PKG_VERSION:=1.4.53
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
@@ -174,6 +174,10 @@ define BuildPlugin
     TITLE:=$(2) module
   endef
 
+  define Package/lighttpd-mod-$(1)/conffiles
+/etc/lighttpd/conf.d/$(4)-$(1).conf
+  endef
+
  ifneq ($(SDK)$(CONFIG_PACKAGE_lighttpd-mod-$(1)),)
   define Package/lighttpd-mod-$(1)/install
        $(INSTALL_DIR) $$(1)/usr/lib/lighttpd
index 2ba3643e203f102877aa6667d8dab2510008d1f2..d968081594b562e36d4ed99defcfaa71c7fd774e 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linuxptp
 PKG_VERSION:=2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
-PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/v$(PKG_VERSION)
 PKG_HASH:=0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d
 
+PKG_MAINTAINER:=Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
@@ -27,7 +27,6 @@ define Package/linuxptp
   SUBMENU:=Time Synchronization
   TITLE:=Linux Precision Time Protocol (PTP) daemon
   URL:=http://linuxptp.sourceforge.net/
-  DEPENDS:=@!USE_UCLIBC +librt
 endef
 
 define Package/linuxptp/description
diff --git a/net/lora-gateway-hal/Config.in b/net/lora-gateway-hal/Config.in
new file mode 100644 (file)
index 0000000..3fc61d1
--- /dev/null
@@ -0,0 +1,13 @@
+# libloragw configuration
+
+if PACKAGE_libloragw
+
+config SX1301_SPI_PATH
+       string "SPI Dev Path"
+       default /dev/spidev0.0
+
+config SX1301_SPI_SPEED
+       string "SPI Speed (Hz)"
+       default 8000000
+
+endif
diff --git a/net/lora-gateway-hal/Makefile b/net/lora-gateway-hal/Makefile
new file mode 100644 (file)
index 0000000..d71d181
--- /dev/null
@@ -0,0 +1,95 @@
+#
+# Copyright (C) 2019 Xue Liu <liuxuenetmail@gmail>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lora-gateway-hal
+PKG_VERSION:=5.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/Lora-net/lora_gateway/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=1a0447d5e8183d08e6dce5f739f6872b9c57824b98f4078830d5ee21b15782c1
+PKG_MAINTAINER:=Xue Liu <liuxuenetmail@gmail.com>
+PKG_LICENSE_FILES:=LICENSE
+PKG_BUILD_DIR:=$(BUILD_DIR)/lora_gateway-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libloragw
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Driver/HAL library for Semtech SX1301
+  URL:=https://www.semtech.com/products/wireless-rf/lora-gateways/sx1301
+  DEPENDS:=+kmod-spi-dev @(!PACKAGE_lora-picogw-hal)
+endef
+
+define Package/libloragw/description
+  Driver/HAL library for Semtech SX1301 multi-channel modem and
+  SX1257/SX1255 RF transceivers.
+endef
+
+define Package/libloragw/config
+       source "$(SOURCE)/Config.in"
+endef
+
+define Package/libloragw-tests
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=LoRaWAN
+  TITLE:=Test programs for libloragw to check functionality
+  DEPENDS:=+libloragw
+endef
+
+define Package/libloragw-utils
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=LoRaWAN
+  TITLE:=Utility programs for libloragw
+  DEPENDS:=+libloragw
+endef
+
+CMAKE_OPTIONS += \
+               -DSPI_DEV_PATH:FILEPATH=$(CONFIG_SX1301_SPI_PATH) \
+               -DSPI_SPEED:STRING=$(CONFIG_SX1301_SPI_SPEED) \
+               -Dlora_gateway_build_shared_libs=ON
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/libloragw
+       $(CP) $(PKG_BUILD_DIR)/libloragw/inc/loragw_* $(1)/usr/include/libloragw
+       $(CP) $(PKG_BUILD_DIR)/libloragw/config.h $(1)/usr/include/libloragw
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/
+       $(LN) libloragw.so.0 $(1)/usr/lib/libloragw.so
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/loragw.pc  $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libloragw/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/
+endef
+
+define Package/libloragw-tests/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/test* $(1)/usr/sbin
+endef
+
+define Package/libloragw-utils/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_lbt_test $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_pkt_logger $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_spectral_scan $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_tx_continuous $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_spi_stress $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/util_tx_test $(1)/usr/sbin
+endef
+
+$(eval $(call BuildPackage,libloragw))
+$(eval $(call BuildPackage,libloragw-tests))
+$(eval $(call BuildPackage,libloragw-utils))
diff --git a/net/lora-gateway-hal/patches/0001-add-cmake-support.patch b/net/lora-gateway-hal/patches/0001-add-cmake-support.patch
new file mode 100644 (file)
index 0000000..e41e2dd
--- /dev/null
@@ -0,0 +1,496 @@
+From d49e5ea2988b2086c7deaa40d3e077531e449844 Mon Sep 17 00:00:00 2001
+From: Xue Liu <liuxuenetmail@gmail.com>
+Date: Thu, 21 Feb 2019 00:27:42 +0100
+Subject: [PATCH 1/3] - add cmake support
+
+Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
+---
+ CMakeLists.txt                    |  77 +++++++++++++++
+ cmake/loragw-config.cmake         |   1 +
+ libloragw/CMakeLists.txt          | 150 ++++++++++++++++++++++++++++++
+ libloragw/loragw.pc.in            |  10 ++
+ libloragw/loragw_config.h.in      |  14 +++
+ util_lbt_test/CMakeLists.txt      |  23 +++++
+ util_pkt_logger/CMakeLists.txt    |  29 ++++++
+ util_spectral_scan/CMakeLists.txt |  23 +++++
+ util_spi_stress/CMakeLists.txt    |  23 +++++
+ util_tx_continuous/CMakeLists.txt |  23 +++++
+ util_tx_test/CMakeLists.txt       |  23 +++++
+ 11 files changed, 396 insertions(+)
+ create mode 100644 CMakeLists.txt
+ create mode 100644 cmake/loragw-config.cmake
+ create mode 100644 libloragw/CMakeLists.txt
+ create mode 100644 libloragw/loragw.pc.in
+ create mode 100644 libloragw/loragw_config.h.in
+ create mode 100644 util_lbt_test/CMakeLists.txt
+ create mode 100644 util_pkt_logger/CMakeLists.txt
+ create mode 100644 util_spectral_scan/CMakeLists.txt
+ create mode 100644 util_spi_stress/CMakeLists.txt
+ create mode 100644 util_tx_continuous/CMakeLists.txt
+ create mode 100644 util_tx_test/CMakeLists.txt
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..b112150
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,77 @@
++# -- Minimum required version
++cmake_minimum_required (VERSION 3.2)
++
++# -- Project name
++project (lora_gateway)
++
++# -- Various includes
++include (CMakePackageConfigHelpers)
++include (GNUInstallDirs)
++include (CheckFunctionExists)
++
++# -- set c99 standard default
++set(CMAKE_C_STANDARD 99)
++
++# -- options for shared lib (defaults off)
++option(lora_gateway_build_shared_libs "build as a shared library" OFF)
++set(BUILD_SHARED_LIBS ${lora_gateway_build_shared_libs})
++
++# -- Required to build
++set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
++set(THREADS_PREFER_PTHREAD_FLAG TRUE)
++find_package(Threads REQUIRED)
++
++# -- Versioning with git tag
++if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
++  execute_process(
++    COMMAND git describe --tags --always
++    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
++    OUTPUT_VARIABLE "lora_gateway_VERSION"
++    ERROR_QUIET
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++  if(lora_gateway_VERSION STREQUAL "")
++    set(lora_gateway_VERSION 0)
++  endif(lora_gateway_VERSION STREQUAL "")
++  message( STATUS "Git full version: ${lora_gateway_VERSION}" )
++  execute_process(
++    COMMAND /bin/bash -c "git describe --tags --abbrev=0 | cut --delimiter='v' --fields=2"
++    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
++    OUTPUT_VARIABLE "lora_gateway_VERSION_SHORT"
++    ERROR_QUIET
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++  if(lora_gateway_VERSION_SHORT STREQUAL "")
++    set(lora_gateway_VERSION_SHORT 0)
++  endif(lora_gateway_VERSION_SHORT STREQUAL "")
++  message( STATUS "Git version: ${lora_gateway_VERSION_SHORT}" )
++else(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
++  set(lora_gateway_VERSION_SHORT 0)
++  set(lora_gateway_VERSION 0)
++endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
++
++# when building, don't use the install RPATH already
++# (but later on when installing)
++SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
++if (NOT (${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" ) )
++   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
++endif()
++
++# -- add the core library
++add_subdirectory(libloragw)
++
++# -- add util_lbt_test
++add_subdirectory(util_lbt_test)
++
++# -- add util_pkt_logger
++add_subdirectory(util_pkt_logger)
++
++# -- add util_pkt_logger
++add_subdirectory(util_spectral_scan)
++
++# -- add util_spi_stress
++add_subdirectory(util_spi_stress)
++
++# -- add util_tx_continuous
++add_subdirectory(util_tx_continuous)
++
++# -- add util_tx_test
++add_subdirectory(util_tx_test)
+diff --git a/cmake/loragw-config.cmake b/cmake/loragw-config.cmake
+new file mode 100644
+index 0000000..ee8687b
+--- /dev/null
++++ b/cmake/loragw-config.cmake
+@@ -0,0 +1 @@
++include("${CMAKE_CURRENT_LIST_DIR}/loragw-targets.cmake")
+diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt
+new file mode 100644
+index 0000000..b2102ae
+--- /dev/null
++++ b/libloragw/CMakeLists.txt
+@@ -0,0 +1,150 @@
++set(TARGET loragw)
++
++add_library(${TARGET} "")
++
++# -- add additional debug options
++# Set the DEBUG_* to 1 to activate debug mode in individual modules.
++# Warning: that makes the module *very verbose*, do not use for production
++option(DEBUG_AUX "Active debug mode in AUX module" OFF)
++option(DEBUG_SPI "Active debug mode in SPI module" OFF)
++option(DEBUG_REG "Active debug mode in REG module" OFF)
++option(DEBUG_HAL "Active debug mode in HAL module" OFF)
++option(DEBUG_GPIO "Active debug mode in GPIO module" OFF)
++option(DEBUG_LBT "Active debug mode in LBT module" OFF)
++option(DEBUG_GPS "Active debug mode in GPS module" OFF)
++
++message("-- Build with debug AUX: ${DEBUG_AUX}")
++message("-- Build with debug SPI: ${DEBUG_SPI}")
++message("-- Build with debug REG: ${DEBUG_REG}")
++message("-- Build with debug HAL: ${DEBUG_HAL}")
++message("-- Build with debug GPIO: ${DEBUG_GPIO}")
++message("-- Build with debug LBT: ${DEBUG_LBT}")
++message("-- Build with debug GPS: ${DEBUG_GPS}")
++
++# --  add the compile options
++target_compile_options(
++      ${TARGET}
++      PRIVATE
++      -Werror
++      -Wall
++      -Wextra
++)
++
++target_sources(${TARGET}
++      PRIVATE
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_aux.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_fpga.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_gps.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_hal.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_lbt.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_radio.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_reg.c
++              ${CMAKE_CURRENT_LIST_DIR}/src/loragw_spi.native.c
++)
++
++# --  add the public headers
++set (${TARGET}_PUBLIC_HEADERS
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_aux.h
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_fpga.h
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_gps.h
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_hal.h
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_lbt.h
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_radio.h
++      ${CMAKE_CURRENT_LIST_DIR}/inc/loragw_reg.h
++)
++
++target_include_directories(${TARGET}
++      PRIVATE
++              ${CMAKE_CURRENT_LIST_DIR}
++              ${CMAKE_CURRENT_LIST_DIR}/inc
++      PUBLIC
++              $<INSTALL_INTERFACE:include>
++              $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
++              $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
++)
++
++configure_file(${CMAKE_CURRENT_LIST_DIR}/${TARGET}_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
++
++target_link_libraries(${TARGET}
++      PUBLIC
++              Threads::Threads
++              m
++)
++
++set_target_properties(${TARGET} PROPERTIES VERSION ${lora_gateway_VERSION_SHORT})
++set_target_properties(${TARGET} PROPERTIES SOVERSION ${lora_gateway_VERSION_SHORT})
++set_target_properties(${TARGET} PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/config.h;${${TARGET}_PUBLIC_HEADERS}")
++
++# --  add the install targets
++install (TARGETS ${TARGET}
++      EXPORT ${TARGET}_targets
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TARGET}
++      INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${TARGET}
++)
++
++# -- add pkg config file
++configure_file ("${CMAKE_CURRENT_LIST_DIR}/${TARGET}.pc.in" "${PROJECT_BINARY_DIR}/${TARGET}.pc" @ONLY)
++install (FILES ${PROJECT_BINARY_DIR}/${TARGET}.pc DESTINATION lib/pkgconfig)
++
++# -- write cmake package config file
++write_basic_package_version_file(
++      "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config-version.cmake"
++      VERSION ${lora_gateway_VERSION}
++      COMPATIBILITY AnyNewerVersion
++)
++
++export(EXPORT ${TARGET}_targets
++      FILE "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-targets.cmake"
++      NAMESPACE Semtech::
++)
++
++configure_file(${PROJECT_SOURCE_DIR}/cmake/${TARGET}-config.cmake
++      "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config.cmake"
++      COPYONLY
++)
++
++set(ConfigPackageLocation lib/cmake/${TARGET})
++
++install(EXPORT ${TARGET}_targets
++      FILE ${TARGET}-targets.cmake
++      NAMESPACE Semtech::
++      DESTINATION ${ConfigPackageLocation}
++)
++
++install(
++      FILES ${PROJECT_SOURCE_DIR}/cmake/${TARGET}-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}/${TARGET}-config-version.cmake"
++      DESTINATION ${ConfigPackageLocation}
++      COMPONENT Devel
++)
++
++# -- add test programs
++foreach(TEST test_loragw_spi test_loragw_gps test_loragw_reg test_loragw_hal test_loragw_cal)
++      add_executable(${TEST} "")
++
++      target_sources(${TEST}
++              PRIVATE
++                      ${CMAKE_CURRENT_LIST_DIR}/tst/${TEST}.c
++      )
++
++      target_include_directories(${TEST}
++              PRIVATE
++                      $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
++                      $<INSTALL_INTERFACE:include>
++                      ${CMAKE_CURRENT_LIST_DIR}/inc
++                      ${CMAKE_CURRENT_BINARY_DIR}
++      )
++
++      target_link_libraries(${TEST}
++              PRIVATE
++                      loragw
++      )
++
++      install (
++              TARGETS ${TEST}
++              RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++      )
++
++endforeach()
++
+diff --git a/libloragw/loragw.pc.in b/libloragw/loragw.pc.in
+new file mode 100644
+index 0000000..01bb3cf
+--- /dev/null
++++ b/libloragw/loragw.pc.in
+@@ -0,0 +1,10 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=${prefix}/bin
++includedir=${prefix}/include/libloragw
++libdir=${prefix}/lib
++
++Name: LIBLORAGW
++Description: BLANK_TEXT
++Version: @lora_gateway_VERSION@
++Cflags: -I${includedir}
++Libs: -L${libdir} -lloragw
+diff --git a/libloragw/loragw_config.h.in b/libloragw/loragw_config.h.in
+new file mode 100644
+index 0000000..76ad35a
+--- /dev/null
++++ b/libloragw/loragw_config.h.in
+@@ -0,0 +1,14 @@
++#ifndef _LORAGW_CONFIGURATION_H
++#define _LORAGW_CONFIGURATION_H
++
++#define LIBLORAGW_VERSION "@lora_gateway_VERSION_SHORT@"
++
++#cmakedefine01 DEBUG_AUX
++#cmakedefine01 DEBUG_SPI
++#cmakedefine01 DEBUG_REG
++#cmakedefine01 DEBUG_HAL
++#cmakedefine01 DEBUG_GPS
++#cmakedefine01 DEBUG_GPIO
++#cmakedefine01 DEBUG_LBT
++
++#endif
+diff --git a/util_lbt_test/CMakeLists.txt b/util_lbt_test/CMakeLists.txt
+new file mode 100644
+index 0000000..f184b82
+--- /dev/null
++++ b/util_lbt_test/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_lbt_test "")
++target_sources(util_lbt_test
++        PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/src/util_lbt_test.c
++)
++
++target_link_libraries(util_lbt_test
++      PUBLIC
++              loragw
++)
++
++set_target_properties(util_lbt_test PROPERTIES
++        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++        TARGETS util_lbt_test
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_pkt_logger/CMakeLists.txt b/util_pkt_logger/CMakeLists.txt
+new file mode 100644
+index 0000000..82cfc86
+--- /dev/null
++++ b/util_pkt_logger/CMakeLists.txt
+@@ -0,0 +1,29 @@
++
++add_executable(util_pkt_logger "")
++target_sources(util_pkt_logger
++      PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/src/util_pkt_logger.c
++        ${CMAKE_CURRENT_LIST_DIR}/src/parson.c
++)
++
++target_include_directories(util_pkt_logger
++      PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/inc
++)
++
++target_link_libraries(util_pkt_logger
++      PUBLIC
++              loragw
++)
++
++set_target_properties(util_pkt_logger PROPERTIES
++    RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++        TARGETS util_pkt_logger
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_spectral_scan/CMakeLists.txt b/util_spectral_scan/CMakeLists.txt
+new file mode 100644
+index 0000000..3cec2a9
+--- /dev/null
++++ b/util_spectral_scan/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_spectral_scan "")
++target_sources(util_spectral_scan
++        PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/src/util_spectral_scan.c
++)
++
++target_link_libraries(util_spectral_scan
++      PUBLIC
++              loragw
++)
++
++set_target_properties(util_spectral_scan PROPERTIES
++        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++        TARGETS util_spectral_scan
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_spi_stress/CMakeLists.txt b/util_spi_stress/CMakeLists.txt
+new file mode 100644
+index 0000000..d5f0eea
+--- /dev/null
++++ b/util_spi_stress/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_spi_stress "")
++target_sources(util_spi_stress
++        PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/src/util_spi_stress.c
++)
++
++target_link_libraries(util_spi_stress
++      PUBLIC
++              loragw
++)
++
++set_target_properties(util_spi_stress PROPERTIES
++        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++        TARGETS util_spi_stress
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_tx_continuous/CMakeLists.txt b/util_tx_continuous/CMakeLists.txt
+new file mode 100644
+index 0000000..97c70e5
+--- /dev/null
++++ b/util_tx_continuous/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_tx_continuous "")
++target_sources(util_tx_continuous
++        PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/src/util_tx_continuous.c
++)
++
++target_link_libraries(util_tx_continuous
++      PUBLIC
++              loragw
++)
++
++set_target_properties(util_tx_continuous PROPERTIES
++        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++        TARGETS util_tx_continuous
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+diff --git a/util_tx_test/CMakeLists.txt b/util_tx_test/CMakeLists.txt
+new file mode 100644
+index 0000000..6cc0e04
+--- /dev/null
++++ b/util_tx_test/CMakeLists.txt
+@@ -0,0 +1,23 @@
++
++add_executable(util_tx_test "")
++target_sources(util_tx_test
++        PRIVATE
++        ${CMAKE_CURRENT_LIST_DIR}/src/util_tx_test.c
++)
++
++target_link_libraries(util_tx_test
++      PUBLIC
++              loragw
++)
++
++set_target_properties(util_tx_test PROPERTIES
++        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
++)
++
++# add the install targets
++install (
++        TARGETS util_tx_test
++      LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT shlib
++      ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++      RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++)
+-- 
+2.20.1
+
diff --git a/net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch b/net/lora-gateway-hal/patches/0002-add-preprocessing-for-SPI_DEV_PATH-and-SPI_SPEED.patch
new file mode 100644 (file)
index 0000000..084a114
--- /dev/null
@@ -0,0 +1,35 @@
+From ea2a7752295ab734464c2877e1f484a9bf08d58d Mon Sep 17 00:00:00 2001
+From: Xue Liu <liuxuenetmail@gmail.com>
+Date: Sun, 24 Feb 2019 01:03:48 +0100
+Subject: [PATCH 2/3] - add preprocessing for SPI_DEV_PATH and SPI_SPEED
+
+Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
+---
+ libloragw/src/loragw_spi.native.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c
+index c01ed1c..fe251e3 100644
+--- a/libloragw/src/loragw_spi.native.c
++++ b/libloragw/src/loragw_spi.native.c
+@@ -53,8 +53,15 @@ Maintainer: Sylvain Miermont
+ #define READ_ACCESS     0x00
+ #define WRITE_ACCESS    0x80
+-#define SPI_SPEED       8000000
+-#define SPI_DEV_PATH    "/dev/spidev0.0"
++
++#ifndef SPI_SPEED
++#error SPI_SPEED is not defined
++#endif
++
++#ifndef SPI_DEV_PATH
++#error SPI_DEV_PATH is not defined
++#endif
++
+ //#define SPI_DEV_PATH    "/dev/spidev32766.0"
+ /* -------------------------------------------------------------------------- */
+-- 
+2.20.1
+
diff --git a/net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch b/net/lora-gateway-hal/patches/0003-add-SPI_DEV_PATH-and-SPI_SPEED-to-cmake.patch
new file mode 100644 (file)
index 0000000..f80dde0
--- /dev/null
@@ -0,0 +1,45 @@
+From 81cd227c04ccb615cffaaa7b6372affb7964df2e Mon Sep 17 00:00:00 2001
+From: Xue Liu <liuxuenetmail@gmail.com>
+Date: Sun, 24 Feb 2019 01:04:29 +0100
+Subject: [PATCH 3/3] - add SPI_DEV_PATH and SPI_SPEED to cmake
+
+Signed-off-by: Xue Liu <liuxuenetmail@gmail.com>
+---
+ libloragw/CMakeLists.txt | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/libloragw/CMakeLists.txt b/libloragw/CMakeLists.txt
+index b2102ae..32abf51 100644
+--- a/libloragw/CMakeLists.txt
++++ b/libloragw/CMakeLists.txt
+@@ -13,6 +13,9 @@ option(DEBUG_GPIO "Active debug mode in GPIO module" OFF)
+ option(DEBUG_LBT "Active debug mode in LBT module" OFF)
+ option(DEBUG_GPS "Active debug mode in GPS module" OFF)
++set(SPI_DEV_PATH "/dev/spidev0.0" CACHE FILEPATH "Path of spi-dev")
++set(SPI_SPEED 8000000 CACHE STRING "SPI clock frequency")
++
+ message("-- Build with debug AUX: ${DEBUG_AUX}")
+ message("-- Build with debug SPI: ${DEBUG_SPI}")
+ message("-- Build with debug REG: ${DEBUG_REG}")
+@@ -20,6 +23,8 @@ message("-- Build with debug HAL: ${DEBUG_HAL}")
+ message("-- Build with debug GPIO: ${DEBUG_GPIO}")
+ message("-- Build with debug LBT: ${DEBUG_LBT}")
+ message("-- Build with debug GPS: ${DEBUG_GPS}")
++message("-- Build with SPI_DEV_PATH: ${SPI_DEV_PATH}")
++message("-- Build with SPI_SPEED: ${SPI_SPEED}")
+ # --  add the compile options
+ target_compile_options(
+@@ -28,6 +33,8 @@ target_compile_options(
+       -Werror
+       -Wall
+       -Wextra
++      -DSPI_DEV_PATH="${SPI_DEV_PATH}"
++      -DSPI_SPEED=${SPI_SPEED}
+ )
+ target_sources(${TARGET}
+-- 
+2.20.1
+
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..822a297dab552a797f6b340be98526a7c08f05f6 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpd
-PKG_VERSION:=2.1.20180706
-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:=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..8ee8bf9
--- /dev/null
@@ -0,0 +1,24 @@
+--- 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
++#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 4cdfc136975697c04ba88a7cd322899ca42f66e5..371b5c94a21b152bed96e00d8d6b4e008b9d1db9 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.
@@ -7,9 +7,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=2.3.3
-PKG_RELEASE:=5
-PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
+PKG_VERSION:=2.3.4
+PKG_RELEASE:=1
+PKG_HASH:=8a6bafd5a33c4259e6e5093d126384cbe33acb10135578b5faa60c40f2f5e995
 
 PKG_SOURCE_URL:=@SF/nfs
 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.xz
@@ -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/0001-don-t-free-ai-ai_canonname.patch b/net/nfs-kernel-server/patches/0001-don-t-free-ai-ai_canonname.patch
deleted file mode 100644 (file)
index 98f7c04..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-From 4bc0dcae0b64eccd63f753d05b505b0becdcb2c8 Mon Sep 17 00:00:00 2001
-From: Peter Wagner <tripolar@gmx.at>
-Date: Tue, 19 Feb 2019 19:50:03 +0100
-Subject: [PATCH 1/2] don't free ai->ai_canonname
-
----
- support/export/hostname.c | 58 ++++++++-------------------------------
- utils/mountd/auth.c       | 16 +++++------
- 2 files changed, 20 insertions(+), 54 deletions(-)
-
-diff --git a/support/export/hostname.c b/support/export/hostname.c
-index 5c4c824..96c5449 100644
---- a/support/export/hostname.c
-+++ b/support/export/hostname.c
-@@ -264,9 +264,9 @@ host_canonname(const struct sockaddr *sap)
-  * Reverse and forward lookups are performed to ensure the address has
-  * matching forward and reverse mappings.
-  *
-- * Returns addrinfo structure with just the provided address with
-- * ai_canonname filled in. If there is a problem with resolution or
-- * the resolved records don't match up properly then it returns NULL
-+ * Returns addrinfo structure with just the provided address. If there
-+ * is a problem with resolution or the resolved records don't match up
-+ * properly then returns NULL.
-  *
-  * Caller must free the returned structure with freeaddrinfo(3).
-  */
-@@ -277,13 +277,15 @@ host_reliable_addrinfo(const struct sockaddr *sap)
-       struct addrinfo *ai, *a;
-       char *hostname;
-+      ai = NULL;
-       hostname = host_canonname(sap);
-       if (hostname == NULL)
--              return NULL;
-+              goto out;
-       ai = host_addrinfo(hostname);
-+      free(hostname);
-       if (!ai)
--              goto out_free_hostname;
-+              goto out;
-       /* make sure there's a matching address in the list */
-       for (a = ai; a; a = a->ai_next)
-@@ -291,22 +293,15 @@ host_reliable_addrinfo(const struct sockaddr *sap)
-                       break;
-       freeaddrinfo(ai);
-+      ai = NULL;
-       if (!a)
--              goto out_free_hostname;
-+              goto out;
-       /* get addrinfo with just the original address */
-       ai = host_numeric_addrinfo(sap);
--      if (!ai)
--              goto out_free_hostname;
--      /* and populate its ai_canonname field */
--      free(ai->ai_canonname);
--      ai->ai_canonname = hostname;
-+out:
-       return ai;
--
--out_free_hostname:
--      free(hostname);
--      return NULL;
- }
- /**
-@@ -323,7 +318,6 @@ host_numeric_addrinfo(const struct sockaddr *sap)
- {
-       socklen_t salen = nfs_sockaddr_length(sap);
-       char buf[INET6_ADDRSTRLEN];
--      struct addrinfo *ai;
-       int error;
-       if (salen == 0) {
-@@ -348,21 +342,7 @@ host_numeric_addrinfo(const struct sockaddr *sap)
-               return NULL;
-       }
--      ai = host_pton(buf);
--
--      /*
--       * getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname
--       */
--      if (ai != NULL) {
--              free(ai->ai_canonname);         /* just in case */
--              ai->ai_canonname = strdup(buf);
--              if (ai->ai_canonname == NULL) {
--                      freeaddrinfo(ai);
--                      ai = NULL;
--              }
--      }
--
--      return ai;
-+      return host_pton(buf);
- }
- #else /* !HAVE_GETNAMEINFO */
- __attribute__((__malloc__))
-@@ -372,7 +352,6 @@ host_numeric_addrinfo(const struct sockaddr *sap)
-       const struct sockaddr_in *sin = (const struct sockaddr_in *)sap;
-       const struct in_addr *addr = &sin->sin_addr;
-       char buf[INET_ADDRSTRLEN];
--      struct addrinfo *ai;
-       if (sap->sa_family != AF_INET)
-               return NULL;
-@@ -382,19 +361,6 @@ host_numeric_addrinfo(const struct sockaddr *sap)
-                                       (socklen_t)sizeof(buf)) == NULL)
-               return NULL;
--      ai = host_pton(buf);
--
--      /*
--       * getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname
--       */
--      if (ai != NULL) {
--              ai->ai_canonname = strdup(buf);
--              if (ai->ai_canonname == NULL) {
--                      freeaddrinfo(ai);
--                      ai = NULL;
--              }
--      }
--
--      return ai;
-+      return host_pton(buf);
- }
- #endif        /* !HAVE_GETNAMEINFO */
-diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
-index 8299256..cb4848c 100644
---- a/utils/mountd/auth.c
-+++ b/utils/mountd/auth.c
-@@ -261,40 +261,40 @@ auth_authenticate(const char *what, const struct sockaddr *caller,
-               *p = '\0';
-       }
-+      host_ntop(caller, buf, sizeof(buf));
-       switch (error) {
-       case bad_path:
-               xlog(L_WARNING, "bad path in %s request from %s: \"%s\"",
--                   what, host_ntop(caller, buf, sizeof(buf)), path);
-+                   what, buf, path);
-               break;
-       case unknown_host:
-               xlog(L_WARNING, "refused %s request from %s for %s (%s): unmatched host",
--                   what, host_ntop(caller, buf, sizeof(buf)), path, epath);
-+                   what, buf, path, epath);
-               break;
-       case no_entry:
-               xlog(L_WARNING, "refused %s request from %s for %s (%s): no export entry",
--                   what, ai->ai_canonname, path, epath);
-+                   what, buf, path, epath);
-               break;
-       case not_exported:
-               xlog(L_WARNING, "refused %s request from %s for %s (%s): not exported",
--                   what, ai->ai_canonname, path, epath);
-+                   what, buf, path, epath);
-               break;
-       case illegal_port:
-               xlog(L_WARNING, "refused %s request from %s for %s (%s): illegal port %u",
--                   what, ai->ai_canonname, path, epath, nfs_get_port(caller));
-+                   what, buf, path, epath, nfs_get_port(caller));
-               break;
-       case success:
-               xlog(L_NOTICE, "authenticated %s request from %s:%u for %s (%s)",
--                   what, ai->ai_canonname, nfs_get_port(caller), path, epath);
-+                   what, buf, nfs_get_port(caller), path, epath);
-               break;
-       default:
-               xlog(L_NOTICE, "%s request from %s:%u for %s (%s) gave %d",
--                   what, ai->ai_canonname, nfs_get_port(caller),
--                      path, epath, error);
-+                   what, buf, nfs_get_port(caller), path, epath, error);
-       }
-       freeaddrinfo(ai);
--- 
-2.20.1
-
diff --git a/net/nfs-kernel-server/patches/0002-define-and-use-wrapper-function-nfs_freeaddrin.patch b/net/nfs-kernel-server/patches/0002-define-and-use-wrapper-function-nfs_freeaddrin.patch
deleted file mode 100644 (file)
index 49d3630..0000000
+++ /dev/null
@@ -1,566 +0,0 @@
-From 877184f733d13d7db0ec9265a53ede9c30d03ba4 Mon Sep 17 00:00:00 2001
-From: Peter Wagner <tripolar@gmx.at>
-Date: Tue, 19 Feb 2019 20:00:22 +0100
-Subject: [PATCH 2/2] define and use wrapper function nfs_freeaddrinfo
- to handle freeaddrinfo versions that don't tolerate NULL pointers
-
-Signed-off-by: Peter Wagner <tripolar@gmx.at>
----
- support/export/client.c       |  6 +++---
- support/export/hostname.c     |  4 ++--
- support/include/exportfs.h    | 11 +++++++++++
- support/nfs/getport.c         |  7 ++++---
- support/nfs/svc_create.c      |  8 +++++---
- support/nfsidmap/umich_ldap.c |  2 +-
- tests/nsm_client/nsm_client.c |  2 +-
- utils/exportfs/exportfs.c     | 10 +++++-----
- utils/gssd/gssd.c             |  4 ++--
- utils/gssd/krb5_util.c        |  2 +-
- utils/mount/network.c         |  7 ++++---
- utils/mount/stropts.c         |  3 ++-
- utils/mountd/auth.c           |  2 +-
- utils/mountd/cache.c          | 10 +++++-----
- utils/mountd/mountd.c         |  4 ++--
- utils/mountd/rmtab.c          |  2 +-
- utils/nfsd/nfssvc.c           |  4 ++--
- utils/statd/hostname.c        | 11 ++++++-----
- utils/statd/sm-notify.c       | 14 +++++++-------
- 19 files changed, 65 insertions(+), 48 deletions(-)
-
-diff --git a/support/export/client.c b/support/export/client.c
-index baf59c8..a1fba01 100644
---- a/support/export/client.c
-+++ b/support/export/client.c
-@@ -210,7 +210,7 @@ init_subnetwork(nfs_client *clp)
-       set_addrlist(clp, 0, ai->ai_addr);
-       family = ai->ai_addr->sa_family;
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       switch (family) {
-       case AF_INET:
-@@ -309,7 +309,7 @@ client_lookup(char *hname, int canonical)
-               init_addrlist(clp, ai);
- out:
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return clp;
- }
-@@ -674,7 +674,7 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
-       tmp = host_pton(hname);
-       if (tmp != NULL) {
-               char *cname = host_canonname(tmp->ai_addr);
--              freeaddrinfo(tmp);
-+              nfs_freeaddrinfo(tmp);
-               /* The resulting FQDN may be in our netgroup. */
-               if (cname != NULL) {
-diff --git a/support/export/hostname.c b/support/export/hostname.c
-index 96c5449..be4d7f6 100644
---- a/support/export/hostname.c
-+++ b/support/export/hostname.c
-@@ -130,7 +130,7 @@ host_pton(const char *paddr)
-               if (!inet4 && ai->ai_addr->sa_family == AF_INET) {
-                       xlog(D_GENERAL, "%s: failed to convert %s",
-                                       __func__, paddr);
--                      freeaddrinfo(ai);
-+                      nfs_freeaddrinfo(ai);
-                       break;
-               }
-               return ai;
-@@ -292,7 +292,7 @@ host_reliable_addrinfo(const struct sockaddr *sap)
-               if (nfs_compare_sockaddr(a->ai_addr, sap))
-                       break;
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       ai = NULL;
-       if (!a)
-               goto out;
-diff --git a/support/include/exportfs.h b/support/include/exportfs.h
-index 4e0d9d1..b81f963 100644
---- a/support/include/exportfs.h
-+++ b/support/include/exportfs.h
-@@ -47,6 +47,17 @@ typedef struct mclient {
-       int                     m_count;
- } nfs_client;
-+/*
-+ * Some versions of freeaddrinfo(3) do not tolerate being
-+ * passed a NULL pointer.
-+ */
-+static inline void nfs_freeaddrinfo(struct addrinfo *ai)
-+{
-+      if (ai) {
-+              freeaddrinfo(ai);
-+      }
-+}
-+
- static inline const struct sockaddr *
- get_addrlist(const nfs_client *clp, const int i)
- {
-diff --git a/support/nfs/getport.c b/support/nfs/getport.c
-index 081594c..26ec85e 100644
---- a/support/nfs/getport.c
-+++ b/support/nfs/getport.c
-@@ -47,6 +47,7 @@
- #include "sockaddr.h"
- #include "nfsrpc.h"
-+#include "exportfs.h"
- /*
-  * Try a local socket first to access the local rpcbind daemon
-@@ -109,7 +110,7 @@ static int nfs_gp_loopback_address(struct sockaddr *sap, socklen_t *salen)
-               ret = 1;
-       }
--      freeaddrinfo(gai_results);
-+      nfs_freeaddrinfo(gai_results);
-       return ret;
- }
-@@ -134,8 +135,8 @@ static in_port_t nfs_gp_getservbyname(const char *service,
-       sin = (const struct sockaddr_in *)gai_results->ai_addr;
-       port = sin->sin_port;
--      
--      freeaddrinfo(gai_results);
-+
-+      nfs_freeaddrinfo(gai_results);
-       return port;
- }
-diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c
-index ef7ff05..d0b747b 100644
---- a/support/nfs/svc_create.c
-+++ b/support/nfs/svc_create.c
-@@ -39,6 +39,8 @@
- #include <rpc/rpc.h>
- #include <rpc/svc.h>
-+#include "exportfs.h"
-+
- #ifdef HAVE_TCP_WRAPPER
- #include "tcpwrapper.h"
- #endif
-@@ -273,7 +275,7 @@ svc_create_nconf_rand_port(const char *name, const rpcprog_t program,
-       bindaddr.qlen = SOMAXCONN;
-       xprt = svc_tli_create(RPC_ANYFD, nconf, &bindaddr, 0, 0);
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       if (xprt == NULL) {
-               xlog(L_ERROR, "Failed to create listener xprt "
-                       "(%s, %u, %s)", name, version, nconf->nc_netid);
-@@ -364,11 +366,11 @@ svc_create_nconf_fixed_port(const char *name, const rpcprog_t program,
-       svc_create_cache_xprt(xprt);
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return 1;
- out_free:
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return 0;
- }
-diff --git a/support/nfsidmap/umich_ldap.c b/support/nfsidmap/umich_ldap.c
-index b661110..b8ee184 100644
---- a/support/nfsidmap/umich_ldap.c
-+++ b/support/nfsidmap/umich_ldap.c
-@@ -1089,7 +1089,7 @@ get_canonical_hostname(const char *inname)
-       return_name = strdup (tmphost);
- out_free:
--      freeaddrinfo(ap);
-+      nfs_freeaddrinfo(ap);
- out_err:
-       return return_name;
- }
-diff --git a/tests/nsm_client/nsm_client.c b/tests/nsm_client/nsm_client.c
-index 0fa3422..8dc0591 100644
---- a/tests/nsm_client/nsm_client.c
-+++ b/tests/nsm_client/nsm_client.c
-@@ -243,7 +243,7 @@ nsm_client_get_rpcclient(const char *node)
-               printf("RPC client creation failed\n");
-       }
- out:
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return client;
- }
-diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
-index cd3c979..333eadc 100644
---- a/utils/exportfs/exportfs.c
-+++ b/utils/exportfs/exportfs.c
-@@ -282,7 +282,7 @@ exportfs_parsed(char *hname, char *path, char *options, int verbose)
-       validate_export(exp);
- out:
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
- }
- static int exportfs_generic(char *arg, char *options, int verbose)
-@@ -395,7 +395,7 @@ unexportfs_parsed(char *hname, char *path, int verbose)
-       if (!success)
-               xlog(L_ERROR, "Could not find '%s:%s' to unexport.", hname, path);
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
- }
- static int unexportfs_generic(char *arg, int verbose)
-@@ -588,7 +588,7 @@ address_list(const char *hostname)
-       if (ai != NULL) {
-               /* @hostname was a presentation address */
-               cname = host_canonname(ai->ai_addr);
--              freeaddrinfo(ai);
-+              nfs_freeaddrinfo(ai);
-               if (cname != NULL)
-                       goto out;
-       }
-@@ -639,8 +639,8 @@ matchhostname(const char *hostname1, const char *hostname2)
-                       }
- out:
--      freeaddrinfo(results1);
--      freeaddrinfo(results2);
-+      nfs_freeaddrinfo(results1);
-+      nfs_freeaddrinfo(results2);
-       return result;
- }
-diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
-index 2e92f28..7eeb05f 100644
---- a/utils/gssd/gssd.c
-+++ b/utils/gssd/gssd.c
-@@ -172,14 +172,14 @@ gssd_addrstr_to_sockaddr(struct sockaddr *sa, const char *node, const char *port
-               if (sin6->sin6_scope_id) {
-                       printerr(0, "ERROR: address %s has non-zero "
-                                   "sin6_scope_id!\n", node);
--                      freeaddrinfo(res);
-+                      nfs_freeaddrinfo(res);
-                       return false;
-               }
-       }
- #endif /* IPV6_SUPPORTED */
-       memcpy(sa, res->ai_addr, res->ai_addrlen);
--      freeaddrinfo(res);
-+      nfs_freeaddrinfo(res);
-       return true;
- }
-diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
-index eba1aac..adbde93 100644
---- a/utils/gssd/krb5_util.c
-+++ b/utils/gssd/krb5_util.c
-@@ -587,7 +587,7 @@ get_full_hostname(const char *inhost, char *outhost, int outhostlen)
-               goto out;
-       }
-       strncpy(outhost, addrs->ai_canonname, outhostlen);
--      freeaddrinfo(addrs);
-+      nfs_freeaddrinfo(addrs);
-       for (c = outhost; *c != '\0'; c++)
-           *c = tolower(*c);
-diff --git a/utils/mount/network.c b/utils/mount/network.c
-index 356f663..fcb0b9f 100644
---- a/utils/mount/network.c
-+++ b/utils/mount/network.c
-@@ -53,6 +53,7 @@
- #include <net/if.h>
- #include <ifaddrs.h>
-+#include "exportfs.h"
- #include "sockaddr.h"
- #include "xcommon.h"
- #include "mount.h"
-@@ -250,7 +251,7 @@ int nfs_lookup(const char *hostname, const sa_family_t family,
-               break;
-       }
--      freeaddrinfo(gai_results);
-+      nfs_freeaddrinfo(gai_results);
-       return ret;
- }
-@@ -307,7 +308,7 @@ int nfs_string_to_sockaddr(const char *address, struct sockaddr *sap,
-                       }
-                       break;
-               }
--              freeaddrinfo(gai_results);
-+              nfs_freeaddrinfo(gai_results);
-       }
-       return ret;
-@@ -1180,7 +1181,7 @@ static int nfs_ca_gai(const struct sockaddr *sap,
-       *buflen = gai_results->ai_addrlen;
-       memcpy(buf, gai_results->ai_addr, *buflen);
--      freeaddrinfo(gai_results);
-+      nfs_freeaddrinfo(gai_results);
-       return 1;
- }
-diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
-index 0a25b1f..b170552 100644
---- a/utils/mount/stropts.c
-+++ b/utils/mount/stropts.c
-@@ -35,6 +35,7 @@
- #include <netinet/in.h>
- #include <arpa/inet.h>
-+#include "exportfs.h"
- #include "sockaddr.h"
- #include "xcommon.h"
- #include "mount.h"
-@@ -1268,7 +1269,7 @@ int nfsmount_string(const char *spec, const char *node, char *type,
-       } else
-               nfs_error(_("%s: internal option parsing error"), progname);
--      freeaddrinfo(mi.address);
-+      nfs_freeaddrinfo(mi.address);
-       free(mi.hostname);
-       return retval;
- }
-diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
-index cb4848c..67627f7 100644
---- a/utils/mountd/auth.c
-+++ b/utils/mountd/auth.c
-@@ -297,7 +297,7 @@ auth_authenticate(const char *what, const struct sockaddr *caller,
-                    what, buf, nfs_get_port(caller), path, epath, error);
-       }
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return exp;
- }
-diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
-index 7e8d403..2cb370f 100644
---- a/utils/mountd/cache.c
-+++ b/utils/mountd/cache.c
-@@ -113,7 +113,7 @@ static void auth_unix_ip(int f)
-               ai = client_resolve(tmp->ai_addr);
-               if (ai) {
-                       client = client_compose(ai);
--                      freeaddrinfo(ai);
-+                      nfs_freeaddrinfo(ai);
-               }
-       }
-       bp = buf; blen = sizeof(buf);
-@@ -133,7 +133,7 @@ static void auth_unix_ip(int f)
-       xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT");
-       free(client);
--      freeaddrinfo(tmp);
-+      nfs_freeaddrinfo(tmp);
- }
-@@ -667,7 +667,7 @@ static struct addrinfo *lookup_client_addr(char *dom)
-       if (tmp == NULL)
-               return NULL;
-       ret = client_resolve(tmp->ai_addr);
--      freeaddrinfo(tmp);
-+      nfs_freeaddrinfo(tmp);
-       return ret;
- }
-@@ -834,7 +834,7 @@ static void nfsd_fh(int f)
- out:
-       if (found_path)
-               free(found_path);
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       free(dom);
-       xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
- }
-@@ -1355,7 +1355,7 @@ static void nfsd_export(int f)
-       xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
-       if (dom) free(dom);
-       if (path) free(path);
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
- }
-diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
-index 086c39b..fb7bba4 100644
---- a/utils/mountd/mountd.c
-+++ b/utils/mountd/mountd.c
-@@ -578,10 +578,10 @@ static void prune_clients(nfs_export *exp, struct exportnode *e)
-                               *cp = c->gr_next;
-                               xfree(c->gr_name);
-                               xfree(c);
--                              freeaddrinfo(ai);
-+                              nfs_freeaddrinfo(ai);
-                               continue;
-                       }
--                      freeaddrinfo(ai);
-+                      nfs_freeaddrinfo(ai);
-               }
-               cp = &(c->gr_next);
-       }
-diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c
-index 3ae0dbb..c896243 100644
---- a/utils/mountd/rmtab.c
-+++ b/utils/mountd/rmtab.c
-@@ -226,7 +226,7 @@ mountlist_list(void)
-                               ai = host_pton(rep->r_client);
-                               if (ai != NULL) {
-                                       m->ml_hostname = host_canonname(ai->ai_addr);
--                                      freeaddrinfo(ai);
-+                                      nfs_freeaddrinfo(ai);
-                               }
-                       }
-                       if (m->ml_hostname == NULL)
-diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
-index 1e6ffd6..47b1882 100644
---- a/utils/nfsd/nfssvc.c
-+++ b/utils/nfsd/nfssvc.c
-@@ -25,6 +25,7 @@
- #include "nfslib.h"
- #include "xlog.h"
- #include "nfssvc.h"
-+#include "exportfs.h"
- #include "../mount/version.h"
- #ifndef NFSD_FS_DIR
-@@ -246,8 +247,7 @@ error:
-               close(fd);
-       if (sockfd >= 0)
-               close(sockfd);
--      if (addrhead)
--              freeaddrinfo(addrhead);
-+      nfs_freeaddrinfo(addrhead);
-       return (bounded ? 0 : rc);
- }
-diff --git a/utils/statd/hostname.c b/utils/statd/hostname.c
-index 8cccdb8..c9e22d3 100644
---- a/utils/statd/hostname.c
-+++ b/utils/statd/hostname.c
-@@ -35,6 +35,7 @@
- #include <netdb.h>
- #include <arpa/inet.h>
-+#include "exportfs.h"
- #include "sockaddr.h"
- #include "statd.h"
- #include "xlog.h"
-@@ -203,7 +204,7 @@ statd_canonical_name(const char *hostname)
-               _Bool result;
-               result = get_nameinfo(ai->ai_addr, ai->ai_addrlen,
-                                       buf, (socklen_t)sizeof(buf));
--              freeaddrinfo(ai);
-+              nfs_freeaddrinfo(ai);
-               if (!result || buf[0] == '\0')
-                       /* OK to use presentation address,
-                        * if no reverse map exists */
-@@ -217,7 +218,7 @@ statd_canonical_name(const char *hostname)
-       if (ai == NULL)
-               return NULL;
-       strcpy(buf, ai->ai_canonname);
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return strdup(buf);
- }
-@@ -253,7 +254,7 @@ statd_canonical_list(const char *hostname)
-               _Bool result;
-               result = get_nameinfo(ai->ai_addr, ai->ai_addrlen,
-                                       buf, (socklen_t)sizeof(buf));
--              freeaddrinfo(ai);
-+              nfs_freeaddrinfo(ai);
-               if (result)
-                       goto out;
-       }
-@@ -308,8 +309,8 @@ statd_matchhostname(const char *hostname1, const char *hostname2)
-                       }
- out:
--      freeaddrinfo(results2);
--      freeaddrinfo(results1);
-+      nfs_freeaddrinfo(results2);
-+      nfs_freeaddrinfo(results1);
-       xlog(D_CALL, "%s: hostnames %s and %s %s", __func__,
-                       hostname1, hostname2,
-diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c
-index 29dad38..05d72a3 100644
---- a/utils/statd/sm-notify.c
-+++ b/utils/statd/sm-notify.c
-@@ -37,6 +37,7 @@
- #include "xlog.h"
- #include "nsm.h"
- #include "nfsrpc.h"
-+#include "exportfs.h"
- /* glibc before 2.3.4 */
- #ifndef AI_NUMERICSERV
-@@ -179,7 +180,7 @@ smn_verify_my_name(const char *name)
-       case 0:
-               /* @name was a presentation address */
-               retval = smn_get_hostname(ai->ai_addr, ai->ai_addrlen, name);
--              freeaddrinfo(ai);
-+              nfs_freeaddrinfo(ai);
-               if (retval == NULL)
-                       return NULL;
-               break;
-@@ -253,8 +254,7 @@ static void smn_forget_host(struct nsm_host *host)
-       free((void *)host->my_name);
-       free((void *)host->mon_name);
-       free(host->name);
--      if (host->ai)
--              freeaddrinfo(host->ai);
-+      nfs_freeaddrinfo(host->ai);
-       free(host);
- }
-@@ -430,7 +430,7 @@ retry:
-       if (srcport) {
-               if (bind(sock, ai->ai_addr, ai->ai_addrlen) == -1) {
-                       xlog(L_ERROR, "Failed to bind RPC socket: %m");
--                      freeaddrinfo(ai);
-+                      nfs_freeaddrinfo(ai);
-                       (void)close(sock);
-                       return -1;
-               }
-@@ -440,7 +440,7 @@ retry:
-               if (smn_bindresvport(sock, ai->ai_addr) == -1) {
-                       xlog(L_ERROR,
-                               "bindresvport on RPC socket failed: %m");
--                      freeaddrinfo(ai);
-+                      nfs_freeaddrinfo(ai);
-                       (void)close(sock);
-                       return -1;
-               }
-@@ -449,13 +449,13 @@ retry:
-               se = getservbyport((int)nfs_get_port(ai->ai_addr), "udp");
-               if (se != NULL && retry_cnt < 100) {
-                       retry_cnt++;
--                      freeaddrinfo(ai);
-+                      nfs_freeaddrinfo(ai);
-                       (void)close(sock);
-                       goto retry;
-               }
-       }
--      freeaddrinfo(ai);
-+      nfs_freeaddrinfo(ai);
-       return sock;
- }
--- 
-2.20.1
-
diff --git a/net/nfs-kernel-server/patches/102-limits.patch b/net/nfs-kernel-server/patches/102-limits.patch
deleted file mode 100644 (file)
index 67701c3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/support/misc/file.c
-+++ b/support/misc/file.c
-@@ -27,6 +27,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <stdbool.h>
-+#include <limits.h>
- #include "xlog.h"
- #include "misc.h"
index 17794f87f4e7e47ec498a3d3dae2927b7b00ba0b..85f97bc9ded3839745952978157db445d825f6e5 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
-PKG_VERSION:=1.15.10
+PKG_VERSION:=1.16.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=b865743abd52bce4745d0f7e7fedde3cafbaaab617b022c105e3e4e456537c3c
+PKG_HASH:=4fd376bad78797e7f18094a00f0f1088259326436b537eb5af69b01be2ca1345
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
                                Ansuel Smith <ansuelsmth@gmail.com>
@@ -72,6 +72,7 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_RTMP_MODULE \
        CONFIG_NGINX_TS_MODULE \
        CONFIG_OPENSSL_ENGINE \
+       CONFIG_OPENSSL_WITH_NPN
 
 include $(INCLUDE_DIR)/package.mk
 
index b066caee70f69efe05abb7d623fe31935819cbb1..cdd0e313db9c95db585090d06c91bb419f391808 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 # Name and release number of this package
 PKG_NAME:=noddos
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPLv3
 PKG_MAINTAINER:=Steven Hessing <steven.hessing@gmail.com>
 
diff --git a/net/noddos/patches/020-Ipset.cxx-update-libipset-API-to-version-7.patch b/net/noddos/patches/020-Ipset.cxx-update-libipset-API-to-version-7.patch
new file mode 100644 (file)
index 0000000..5f7bc3a
--- /dev/null
@@ -0,0 +1,431 @@
+From 5200105f412ceefa0784bf914aa215146fd067b0 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Wed, 26 Dec 2018 16:45:47 -0200
+Subject: [PATCH] Ipset.cxx: update libipset API to version 7
+
+Old API compatibility was kept with a compatibility shim.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+diff --git a/src/Ipset.cxx b/src/Ipset.cxx
+index 9333fe6..da97f93 100644
+--- a/src/Ipset.cxx
++++ b/src/Ipset.cxx
+@@ -90,23 +90,19 @@ void Ipset::Open (const std::string inIpsetName, std::string inIpsetType, bool i
+     isIpsetv4 = inisIpsetv4;
+     ipset_load_types();
+-    struct ipset_session *session = ipset_session_init(printf);
++    struct ipset_session *session = noddos_ipset_session_init();
+     if (session == nullptr) {
+         syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+         ipset_session_fini(session);
+         throw std::runtime_error ("Cannot initialize ipset session.");
+     }
+-    if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set environment option.");
+-        ipset_session_fini(session);
+-        throw std::runtime_error ("Can't set environment option.");
+-    }
++    ipset_envopt_set(session, IPSET_ENV_EXIST);
+     int r = ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str());
+     if ( r < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+     } else if (r > 0) {
+         if (Debug == true) {
+             syslog (LOG_DEBUG, "Ipset: Not creating set %s as it already exists", ipsetName.c_str());
+@@ -115,27 +111,27 @@ void Ipset::Open (const std::string inIpsetName, std::string inIpsetType, bool i
+         return;
+     }
+     if (ipset_session_data_set(session, IPSET_OPT_TYPENAME, ipsetType.c_str()) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s to type %s: %s", ipsetName.c_str(), ipsetType.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s to type %s: %s", ipsetName.c_str(), ipsetType.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set type " + ipsetType + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set type " + ipsetType + ": " + ipset_session_report_msg(session));
+     }
+     const struct ipset_type *type = ipset_type_get(session, IPSET_CMD_CREATE);
+     if (type == NULL) {
+-        syslog (LOG_ERR, "Ipset: Can't set create ip %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set create ip %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't create ipset " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't create ipset " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     uint32_t timeout = 0; /* default to infinity */
+     if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s to timeout %d: %s", ipsetName.c_str(), timeout, ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s to timeout %d: %s", ipsetName.c_str(), timeout, ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set time-out " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set time-out " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_session_data_set(session, IPSET_OPT_TYPE, type)) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s option type: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s option type: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set ipset type: " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set ipset type: " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     uint8_t family = 0;
+     if (ipsetType == "hash:ip" && isIpsetv4 == true) {
+@@ -149,20 +145,20 @@ void Ipset::Open (const std::string inIpsetName, std::string inIpsetType, bool i
+         throw std::invalid_argument("Unknown ipset data type " + ipsetType);
+     }
+     if (ipset_session_data_set(session, IPSET_OPT_FAMILY, &family) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s address family %d: %s", ipsetName.c_str(), family, ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s address family %d: %s", ipsetName.c_str(), family, ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Cannot set ipset family: " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Cannot set ipset family: " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_cmd(session, IPSET_CMD_CREATE, /*lineno*/ 0) != 0) {
+-        syslog (LOG_ERR, "Ipset: Can't create setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't create setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Failed to create ipset " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Failed to create ipset " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_commit(session) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     ipset_session_fini(session);
+ }
+@@ -173,33 +169,29 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd) {
+     if (Debug == true) {
+         syslog(LOG_DEBUG, "Ipset: received command %d for ipset %s", cmd, ipsetName.c_str());
+     }
+-    struct ipset_session *session = ipset_session_init(printf);
++    struct ipset_session *session = noddos_ipset_session_init();
+     if (session == nullptr) {
+         syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+         ipset_session_fini(session);
+         throw std::runtime_error ("Cannot initialize ipset session.");
+     }
+-    if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set environment option.");
+-        ipset_session_fini(session);
+-        throw std::runtime_error ("Can't set environment option.");
+-    }
++    ipset_envopt_set(session, IPSET_ENV_EXIST);
+     if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_cmd(session, cmd, 0) != 0) {
+         ipset_session_fini(session);
+-        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
+-        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
++        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_commit(session) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     ipset_session_fini(session);
+     return true;
+@@ -210,61 +202,57 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd,  const Tins::IPv4Address &inIpAddress
+     if (Debug == true) {
+         syslog(LOG_DEBUG, "Ipset: received command %d for IP address %s for ipset %s", cmd, inIpAddress.to_string().c_str(), ipsetName.c_str());
+     }
+-    struct ipset_session *session = ipset_session_init(printf);
++    struct ipset_session *session = noddos_ipset_session_init();
+     if (session == nullptr) {
+         syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+         ipset_session_fini(session);
+         throw std::runtime_error ("Cannot initialize ipset session.");
+     }
+-    if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set environment option.");
+-        ipset_session_fini(session);
+-        throw std::runtime_error ("Can't set environment option.");
+-    }
++    ipset_envopt_set(session, IPSET_ENV_EXIST);
+     if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     const struct ipset_type *type = ipset_type_get(session, cmd);
+     if (type == NULL) {
+-        syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     uint8_t family = NFPROTO_IPV4;
+     if (ipset_session_data_set(session, IPSET_OPT_FAMILY, &family) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set session data to IPv4 family for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set session data to IPv4 family for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv4 family, error: " + ipset_session_error(session));
++        throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv4 family, error: " + ipset_session_report_msg(session));
+     }
+     struct in_addr sin;
+     inet_aton (inIpAddress.to_string().c_str(), &sin);
+     if (ipset_session_data_set(session, IPSET_OPT_IP, &sin) < 0) {
+-        syslog (LOG_ERR, "Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_error(session));
++        throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_report_msg(session));
+     }
+     if (timeout) {
+         if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) != 0) {
+-            syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++            syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+             ipset_session_fini(session);
+-            throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_error(session));
++            throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_report_msg(session));
+             return false;
+         }
+     }
+     if (ipset_cmd(session, cmd, 0) != 0) {
+         ipset_session_fini(session);
+-        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
+-        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
++        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_commit(session) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     ipset_session_fini(session);
+     return true;
+@@ -274,61 +262,57 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd,  const Tins::IPv6Address &inIpAddress
+     if (Debug == true) {
+         syslog(LOG_DEBUG, "Ipset: received command %d for IP address %s for ipset %s", cmd, inIpAddress.to_string().c_str(), ipsetName.c_str());
+     }
+-    struct ipset_session *session = ipset_session_init(printf);
++    struct ipset_session *session = noddos_ipset_session_init();
+     if (session == nullptr) {
+         syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+         ipset_session_fini(session);
+         throw std::runtime_error ("Cannot initialize ipset session.");
+     }
+-    if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set environment option.");
+-        ipset_session_fini(session);
+-        throw std::runtime_error ("Can't set environment option.");
+-    }
++    ipset_envopt_set(session, IPSET_ENV_EXIST);
+     if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     const struct ipset_type *type = ipset_type_get(session, cmd);
+     if (type == NULL) {
+-        syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     uint8_t family = NFPROTO_IPV6;
+     if (ipset_session_data_set(session, IPSET_OPT_FAMILY, &family) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set session data to IPv6 family for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set session data to IPv6 family for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv6 family, error: " + ipset_session_error(session));
++        throw std::runtime_error("Can't set session data for " + ipsetName + " to the IPv6 family, error: " + ipset_session_report_msg(session));
+     }
+     unsigned char buf[sizeof(struct in6_addr)];
+     int s = inet_pton(AF_INET6, inIpAddress.to_string().c_str(), buf);
+     if (ipset_session_data_set(session, IPSET_OPT_IP, &buf) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set session data to the IPv4 address for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_error(session));
++        throw std::runtime_error("Can't set session data to the IPv4 address for setname " + ipsetName + ", error: " + ipset_session_report_msg(session));
+     }
+     if (timeout) {
+         if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) != 0) {
+-            syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++            syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+             ipset_session_fini(session);
+-            throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_error(session));
++            throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_report_msg(session));
+         }
+     }
+     if (ipset_cmd(session, cmd, 0) != 0) {
+-        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_commit(session) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     ipset_session_fini(session);
+     return true;
+@@ -338,50 +322,46 @@ bool Ipset::ipset_exec(enum ipset_cmd cmd, const std::string Mac, time_t timeout
+     if (Debug == true) {
+         syslog(LOG_DEBUG, "Ipset: received command %d for MAC address %s for ipset %s", cmd, Mac.c_str(), ipsetName.c_str());
+     }
+-    struct ipset_session *session = ipset_session_init(printf);
++    struct ipset_session *session = noddos_ipset_session_init();
+     if (session == nullptr) {
+         syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+         ipset_session_fini(session);
+         throw std::runtime_error ("Cannot initialize ipset session.");
+     }
+-    if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set environment option.");
+-        ipset_session_fini(session);
+-        throw std::runtime_error ("Can't set environment option.");
+-    }
++    ipset_envopt_set(session, IPSET_ENV_EXIST);
+     if (ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str()) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't set setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't set setname " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     const struct ipset_type *type = ipset_type_get(session, cmd);
+     if (type == NULL) {
+-        syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't get type for set %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't get type for set " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_parse_elem(session, (ipset_opt)type->last_elem_optional, Mac.c_str()) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't call ipset_parse_elem for %s: %s ", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't call ipset_parse_elem for %s: %s ", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't call ipset_parse_elem for ipset " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't call ipset_parse_elem for ipset " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (timeout) {
+         if (ipset_session_data_set(session, IPSET_OPT_TIMEOUT, &timeout) != 0) {
+-            syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++            syslog (LOG_ERR, "Ipset: Can't set timeout for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+             ipset_session_fini(session);
+-            throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_error(session));
++            throw std::runtime_error("Can't set timeout for " + ipsetName + ": " + ipset_session_report_msg(session));
+         }
+     }
+     if (ipset_cmd(session, cmd, 0) != 0) {
+-        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't exec ipset cmd for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't exec ipset cmd for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     if (ipset_commit(session) < 0) {
+-        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++        syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+         ipset_session_fini(session);
+-        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++        throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+     }
+     ipset_session_fini(session);
+     return true;
+diff --git a/src/Ipset.h b/src/Ipset.h
+index 2c5f7b2..eb180da 100644
+--- a/src/Ipset.h
++++ b/src/Ipset.h
+@@ -41,6 +41,31 @@
+ #include "MacAddress.h"
++#if IPSET_PROTOCOL < 7
++/* compatibility shims */
++
++inline void ipset_envopt_set(struct ipset_session *session, enum ipset_envopt opt)
++{
++    ipset_envopt_parse(session, opt, NULL);
++}
++
++inline const char * ipset_session_report_msg(const struct ipset_session *session)
++{
++  return ipset_session_error(session);
++}
++
++static inline struct ipset_session *noddos_ipset_session_init(void)
++{
++  return ipset_session_init(printf);
++}
++
++#else
++
++static inline struct ipset_session *noddos_ipset_session_init(void)
++{
++  return ipset_session_init(NULL, NULL);
++}
++#endif
+ std::string getIpsetUuid (std::string inUuid);
+ std::string getIpsetName (std::string inUuid, bool inSrc, bool inIpv4 = true);
+@@ -99,23 +124,19 @@ public:
+     }
+     bool Exists() {
+         try {
+-            struct ipset_session *session = ipset_session_init(printf);
++            struct ipset_session *session = noddos_ipset_session_init();
+             if (session == nullptr) {
+                 syslog (LOG_ERR, "Ipset: Cannot initialize ipset session.");
+                 ipset_session_fini(session);
+                 throw std::runtime_error ("Cannot initialize ipset session.");
+             }
+-            if (ipset_envopt_parse(session, IPSET_ENV_EXIST, NULL) < 0) {
+-                syslog (LOG_ERR, "Ipset: Can't set environment option.");
+-                ipset_session_fini(session);
+-                throw std::runtime_error ("Can't set environment option.");
+-            }
++            ipset_envopt_set(session, IPSET_ENV_EXIST);
+             int r = ipset_session_data_set(session, IPSET_SETNAME, ipsetName.c_str());
+             if (ipset_commit(session) < 0) {
+-                syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_error(session));
++                syslog (LOG_ERR, "Ipset: Can't commit for setname %s: %s", ipsetName.c_str(), ipset_session_report_msg(session));
+                 ipset_session_fini(session);
+-                throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_error(session));
++                throw std::runtime_error("Can't call ipset_commit for " + ipsetName + ": " + ipset_session_report_msg(session));
+             }
+             ipset_session_fini(session);
+             return r == 0;
diff --git a/net/noddos/patches/030-getnoddosdeviceprofiles-wget-timestamping-check.patch b/net/noddos/patches/030-getnoddosdeviceprofiles-wget-timestamping-check.patch
new file mode 100644 (file)
index 0000000..ad4c0c3
--- /dev/null
@@ -0,0 +1,28 @@
+From eb1730afff9377a5f167d0738ad0b3aeba9634d0 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cote2004-github@yahoo.com>
+Date: Tue, 19 Mar 2019 18:27:10 -0300
+Subject: [PATCH] getnoddosdeviceprofiles: wget timestamping check
+
+Check if the --timestamping option is available to avoid an error in
+openwrt when wget is handled by uclient-fetch.
+
+Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
+
+diff --git a/tools/getnoddosdeviceprofiles b/tools/getnoddosdeviceprofiles
+index 337e351..174034f 100755
+--- a/tools/getnoddosdeviceprofiles
++++ b/tools/getnoddosdeviceprofiles
+@@ -86,7 +86,12 @@ fi
+ # That's also why we don't delete the downloaded file
+ if [ "$WGET" != "" ]
+ then
+-    GETURL="$WGET --quiet --timestamping"
++    GETURL="$WGET --quiet"
++    # Make sure wget accepts --timestamping
++    if wget --help 2>&1 | egrep timestamping > /dev/null
++    then
++        GETURL="$GETURL --timestamping"
++    fi
+ else
+     if [ "$CURL" != "" ]
+     then
index 59f1e67d60e6477a73563bec9b84e6c6603b4fde..3ddf0cdba8ca88719090d0f05503fcf932efa525 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntpclient
 PKG_VERSION:=2015_365
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient
index cdf18eefdc3848a9c170c0642515e39c1b12bf05..3a622b2b3881ee03d7226ed21557fd71832a0428 100644 (file)
@@ -9,7 +9,7 @@ unset INTERVAL
 unset COUNT
 unset INTERFACE_GLOBAL
 
-NTPC=`which ntpclient`
+NTPC=$(command -v ntpclient)
 
 check_server() {
        local hostname
@@ -52,12 +52,12 @@ stop_ntpclient() {
 load_settings() {
        local interval
        local count
-       local iface
-       
+       local interface
+
        config_get interval $1 interval
        config_get count $1 count
        config_get interface $1 interface
-       
+
        [ -n "$count" ] && COUNT=$count
        [ -n "$interval" ] && INTERVAL=$interval
        [ -n "$interface" ] && INTERFACE_GLOBAL=$interface
@@ -66,13 +66,13 @@ load_settings() {
 config_load ntpclient
 config_foreach load_settings ntpclient
 
-NTP_RUNNING=`ps  | grep $NTPC | grep -v grep`
+NTP_RUNNING=$(busybox ps | grep $NTPC | grep -v grep)
 
 case "${ACTION:-ifup}" in
        ifup)
-               [ -z "$NTP_RUNNING" ] && start_ntpclient 
+               [ -z "$NTP_RUNNING" ] && start_ntpclient
        ;;
        ifdown)
-               [ -n "$NTP_RUNNING" ] && stop_ntpclient 
+               [ -n "$NTP_RUNNING" ] && stop_ntpclient
        ;;
 esac
index 555f973575e312fac332c3ba9f9bb11eba8b62d7..9f84ed26e626f85932f92a3138ae95df0c3390de 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nut
 PKG_VERSION:=2.7.4
-PKG_RELEASE:=15
+PKG_RELEASE:=16
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
index bc463d7f583046cfbda8b3595c8a1d834c807440..e57a2870bccbcd168c3dac639e113059e9f8dfd2 100755 (executable)
@@ -148,7 +148,6 @@ nut_upsmon_add() {
 }
 
 build_config() {
-       local runas=nutmon
        mkdir -m 0750 -p "$(dirname "$UPSMON_C")"
 
        config_load nut_monitor
@@ -193,6 +192,7 @@ interface_triggers() {
 }
 
 start_service() {
+       local runas=nutmon
        local havemon havems
        build_config
 
@@ -210,16 +210,9 @@ start_service() {
        return 0
 }
 
-restart() {
-       trap '' TERM
-       stop "$@"
-       sleep 2
-       trap - TERM
-       start "$@"
-}
-
 reload_service() {
        if pgrep upsmon >/dev/null 2>/dev/null; then
+               local runas=nutmon
                build_config
                /usr/sbin/upsmon -c reload
        else
@@ -227,6 +220,10 @@ reload_service() {
        fi
 }
 
+stop_service() {
+       upsmon -c stop
+}
+
 service_triggers() {
        config_load nut_monitor
        interface_triggers "add_trigger"
index 8400c9a6ec7997798591069854a28dd26d24f292..86fe01bb957e0eaad442830e21f5f16014f451f8 100755 (executable)
@@ -47,3 +47,5 @@ do_fsd() {
                poweroff
        fi
 }
+
+do_fsd
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 93329b0ea12cd87161cab03e35c22ff2a2720e77..62c3fa5dd509727cf331d117c3267bb904dd9243 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=oor
-PKG_VERSION:=1.2.2
+PKG_VERSION:=1.3.0
 PKG_RELEASE:=1
 
 
 PKG_SOURCE_URL=https://github.com/OpenOverlayRouter/oor/releases/download/$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=6702348fa314c2691f28c7e71337bb84
+PKG_HASH:=e2bee73611984f0412798f4b72145f4f00037a9e874d3c2168a49e1bf49e4809
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
index 39b02758f084d5049ffb08f9c0c0fb0d42b51855..04b2d0e9e79d0bc86508c8bba34bae4aeb77c4d7 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
-PKG_VERSION:=7.9p1
-PKG_RELEASE:=7
+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
@@ -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 9dfe83277b2ffb8fdff17d139fadebff98418b6e..57942fe42b2c10ac90464c3709779912563eb42b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Copyright (C) 2013 Julius Schulz-Zander <julius@net.t-labs.tu-berlin.de>
 # Copyright (C) 2014-2017 OpenWrt.org
-# Copyright (C) 2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2018-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/kernel.mk
 #
 PKG_NAME:=openvswitch
 PKG_VERSION:=2.11.0
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
 PKG_HASH:=f4b01d7376d7298bc6e7fa7a6067229ca7c7e299394e5ea9aff651d52edfdbee
@@ -24,7 +24,7 @@ PKG_HASH:=f4b01d7376d7298bc6e7fa7a6067229ca7c7e299394e5ea9aff651d52edfdbee
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_DEPENDS:=python/host python-six/host
+PKG_BUILD_DEPENDS+=python3/host python-six/host
 PKG_USE_MIPS16:=0
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
@@ -33,8 +33,9 @@ PKG_INSTALL:=1
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-host.mk
+include ../../lang/python/python3-host.mk
 include ../../lang/python/python-package.mk
+include ../../lang/python/python3-package.mk
 
 
 ovs_kmod_packages:=
@@ -283,6 +284,16 @@ endef
 $(eval $(call OvsPackageTemplate,python))
 
 
+ovs_python3_title:=Open vSwitch (Python3 library)
+ovs_python3_hidden:=
+ovs_python3_depends:=+PACKAGE_openvswitch-python3:python3 +PACKAGE_openvswitch-python3:python3-six
+define ovs_python3_install
+       $$(INSTALL_DIR) $$(1)$$(PYTHON3_PKG_DIR)
+       $$(CP) $$(PKG_INSTALL_DIR)/usr/share/openvswitch/python/ovs $$(1)$$(PYTHON3_PKG_DIR)
+endef
+$(eval $(call OvsPackageTemplate,python3))
+
+
 CONFIGURE_ARGS+= \
        --enable-ndebug \
        --enable-shared \
@@ -290,10 +301,10 @@ CONFIGURE_ARGS+= \
 
 CONFIGURE_VARS += \
        ovs_cv_flake8=no \
-       ovs_cv_python3=no \
+       ovs_cv_python=$(PYTHON3) \
+       ovs_cv_python_host=$(HOST_PYTHON3_BIN) \
        ovs_cv_sphinx=no \
-       ovs_cv_python=$(PYTHON) \
-       ovs_cv_python_host=$(HOST_PYTHON_BIN) \
+       ovs_cv_python2=no \
        KARCH=$(LINUX_KARCH) \
 
 ovs_intree_kmod_configs:=CONFIG_PACKAGE_kmod-openvswitch-intree
@@ -304,7 +315,7 @@ ifneq ($(ovs_intree_kmod_enabled),)
 endif
 
 TARGET_CFLAGS += -flto -std=gnu99
-MAKE_VARS += PYTHONPATH="$(HOST_PYTHONPATH)"
+MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)"
 
 $(foreach p,$(ovs_kmod_packages),\
   $(eval $(call KernelPackage,$(p)))\
index 52ad7c742eb468b563478f65a8e6870794f979b9..33af680592a1c4429e809e6e9d0f7ee12f795ef0 100644 (file)
@@ -1,7 +1,7 @@
-From c7247a20c7779dbeafda7767f4a3c090da37c0c0 Mon Sep 17 00:00:00 2001
+From bfcee43923a4bb07954f6648bde1abdcbfa5d95f Mon Sep 17 00:00:00 2001
 From: Helmut Schaa <helmut.schaa@googlemail.com>
 Date: Wed, 8 Jan 2014 13:48:49 +0100
-Subject: [PATCH 1/4] netdev-linux: Let interface flag survive internal port
+Subject: [PATCH 1/5] netdev-linux: Let interface flag survive internal port
  setup
 
 Due to a race condition when bringing up an internal port on Linux
index 404e22cc5783e47a2466e227fccaed4791b5af9c..5cfbecb25235a70c53b619d3ec6c504fd1d131ed 100644 (file)
@@ -1,7 +1,7 @@
-From 38d142005a0b582efdad5580e311d815ad1f34a4 Mon Sep 17 00:00:00 2001
+From e881c50ff537d4b34c10227360589f83d90ce373 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <zhouyousong@yunionyun.com>
 Date: Tue, 21 Aug 2018 12:21:05 +0000
-Subject: [PATCH 2/4] python: separate host/target python for cross-compile
+Subject: [PATCH 2/5] python: separate host/target python for cross-compile
 
 At the moment, python-six is a requirement for openvswitch python
 library on target machine.
index f09f6e9f0969e7de1b643d849afcdff94f654204..667f38e0f729447aff08199c6be456c57882bbb3 100644 (file)
@@ -1,7 +1,7 @@
-From b476094a64213da20f88976d7562cb4e8d9f2101 Mon Sep 17 00:00:00 2001
+From b65652ff441c4236b51f037a76147331c1ffd5fd Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Wed, 14 Mar 2018 16:44:13 +0800
-Subject: [PATCH 3/4] ovs-lib: fix install_dir()
+Subject: [PATCH 3/5] ovs-lib: fix install_dir()
 
 The command "install" is not available in OpenWrt by default
 
index 8f8d96053bfe9d6511443a02af9bb637a2af90d6..6d552ac08611293f18de1871b9ea03fbe9ba12f2 100644 (file)
@@ -1,7 +1,7 @@
-From d0ffc7cc1a0eb217963099fd90bd437b09b6068d Mon Sep 17 00:00:00 2001
+From 2f9075aca5f54b8d0c14517c408f162985fb1b18 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <zhouyousong@yunionyun.com>
 Date: Tue, 21 Aug 2018 13:02:21 +0000
-Subject: [PATCH 4/4] build: disable building tests
+Subject: [PATCH 4/5] build: disable building tests
 
 Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
 ---
diff --git a/net/openvswitch/patches/0005-datapath-conntrack-fix-include-for-IP6_DEFRAG_CONNTR.patch b/net/openvswitch/patches/0005-datapath-conntrack-fix-include-for-IP6_DEFRAG_CONNTR.patch
new file mode 100644 (file)
index 0000000..1f77ab5
--- /dev/null
@@ -0,0 +1,46 @@
+From b89f391203c4420eb454cb321e799a64de809f52 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <zhouyousong@yunionyun.com>
+Date: Fri, 3 May 2019 15:03:24 +0000
+Subject: [PATCH 5/5] datapath: conntrack: fix include for
+ IP6_DEFRAG_CONNTRACK_IN
+
+The enum definition is now inside include/net/ipv6_frag.h since upstream commit
+70b095c ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module") which was
+backported to stable trees (4.9, 4.14, 4.19) only these days.
+
+The error message
+
+         CC [M]  /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.o
+       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c: In function 'handle_fragments':
+       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:8: error: variable 'user' has initializer but incomplete type
+          enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
+               ^~~~~~~~~~~~~~~~
+       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:32: error: 'IP6_DEFRAG_CONNTRACK_IN' undeclared (first use in this function); did you mean 'IP_DEFRAG_CONNTRACK_IN'?
+          enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
+                                       ^~~~~~~~~~~~~~~~~~~~~~~
+                                       IP_DEFRAG_CONNTRACK_IN
+       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:32: note: each undeclared identifier is reported only once for each function it appears in
+       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:25: error: storage size of 'user' isn't known
+          enum ip6_defrag_users user = IP6_DEFRAG_CONNTRACK_IN + zone;
+                                ^~~~
+       /opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.c:554:25: warning: unused variable 'user' [-Wunused-variable]
+       scripts/Makefile.build:326: recipe for target '/opt/buildbot/slaves/lede-slave-tah/mipsel_24kc/build/sdk/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/openvswitch-2.11.0/datapath/linux/conntrack.o' failed
+
+Reference: https://github.com/openwrt/packages/issues/8548#issuecomment-488871090
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ datapath/conntrack.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/datapath/conntrack.c b/datapath/conntrack.c
+index a7dc9e0c3..69bda5a9c 100644
+--- a/datapath/conntrack.c
++++ b/datapath/conntrack.c
+@@ -31,6 +31,7 @@
+ #include <net/netfilter/nf_conntrack_seqadj.h>
+ #include <net/netfilter/nf_conntrack_zones.h>
+ #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
++#include <net/ipv6_frag.h>
+ #ifdef CONFIG_NF_NAT_NEEDED
+ #include <linux/netfilter/nf_nat.h>
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 cb9b60141bf9a7136936fb4a5cd509bc8770826d..6c32174ee945f3085185056a44d6b4d4dd49888c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015 OpenWrt.org
+# Copyright (c) 2019 OpenWrt.org
 #
 # This is free software, licensed under the BSD 2-Clause License.
 #
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=port-mirroring
-PKG_VERSION:=1.4.3
+PKG_VERSION:=1.4.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mmaraya/port-mirroring/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=90603163fb086cc586a711e066360ccfa5b4735f67586e8f9254e93f3bebb97e
+PKG_HASH:=9fb259d24cee4fe1bed1a51c49e52a8eb05b692ba1b5debb75fdf54957cc8ed1
 
 PKG_MAINTAINER:=Mike Maraya <mike.maraya@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
diff --git a/net/port-mirroring/patches/010-convert-to-unix.patch b/net/port-mirroring/patches/010-convert-to-unix.patch
deleted file mode 100644 (file)
index e0a6330..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-diff --git a/include/config.h b/include/config.h
-index 5212c69..ac948ba 100644
---- a/include/config.h
-+++ b/include/config.h
-@@ -1,69 +1,69 @@
--/* \r
-- * Copyright (c) 2015 Mike Maraya <mike[dot]maraya[at]gmail[dot]com>\r
-- * All rights reserved.\r
-- *\r
-- * This file is subject to the terms and conditions defined in\r
-- * https://github.com/mmaraya/port-mirroring/blob/master/LICENSE,\r
-- * which is part of this software package.\r
-- *\r
-- */\r
--\r
--#ifndef PORT_MIRRORING_UTIL_H_\r
--#define PORT_MIRRORING_UTIL_H_\r
--\r
--#include <errno.h>\r
--#include <net/if.h>\r
--#include <netinet/in.h>\r
--#include <stdint.h>\r
--#include <stdio.h>\r
--#include <stdlib.h>\r
--#include <string.h>\r
--#include <syslog.h>\r
--#include <linux/limits.h>\r
--\r
--#define OPTION_MAX  254     /* max value for program options                */\r
--#define TIMEBUF     32      /* max timestamp length RFC3339                 */\r
--#define SRC_MAX     4       /* maxium number of source network interfaces   */\r
--#define PFE_MAX     80      /* maximum length of packet filter expression   */\r
--#define MACADDRLEN  6       /* length of a MAC address                      */\r
--\r
--// port-mirroring configuration bit flags\r
--#define PM_DAEMON   0x01    /* run as background process                    */\r
--#define PM_DEBUG    0x02    /* display debugging messages to console        */\r
--#define PM_TZSP     0x04    /* send packets using TaZmen Sniffer Protocol   */\r
--#define PM_DST_IF   0x08    /* destination is a network interface           */\r
--#define PM_DST_IP   0x10    /* destination is an internet protocol address  */\r
--#define PM_PROMISC  0x20    /* place source interface in promiscuous mode   */\r
--#define PM_SYSLOG   0x40    /* log messages to syslog facility              */\r
--\r
--// if no configuration file is specified, look through these in order\r
--#define CFG_PATH_1  "/etc/config/port-mirroring"\r
--#define CFG_PATH_2  "/etc/port-mirroring"\r
--#define CFG_PATH_3  "port-mirroring.conf"\r
--\r
--// default program id file\r
--#define PID_PATH    "/var/run/port-mirroring.pid"\r
--\r
--// program-wide configuration settings and variables\r
--struct pm_cfg\r
--{\r
--    char        *cfg_file;              /* path to configuration file       */\r
--    uint8_t     flags;                  /* boolean setting bitmask          */\r
--    char        src[SRC_MAX][IFNAMSIZ]; /* source network interfaces        */\r
--    char        dst_if[IFNAMSIZ];       /* destination network interface    */\r
--    in_addr_t   dst_ip;                 /* destination IP address           */\r
--    char        pfe[PFE_MAX];           /* tcpdump packet filter expression */\r
--    char        *pid_file;              /* path to process id file          */\r
--    int         src_count;              /* number of source ports           */\r
--    char        src_mac[MACADDRLEN];    /* source MAC address               */\r
--    char        dst_mac[MACADDRLEN];    /* destination MAC address          */\r
--    time_t      init_time;              /* used to check for timeouts       */\r
--    int         packet_count;           /* number of packets processed      */\r
--};\r
--\r
--void find_cfg(struct pm_cfg *cfg);\r
--char * printMACStr(const char *mac);\r
--char * getUCIItem(char *buf, char *item);\r
--int getUCIConf(char *buf, char *option, char *value);\r
--\r
--#endif  // PORT_MIRRORING_UTIL_H_\r
-+/* 
-+ * Copyright (c) 2015 Mike Maraya <mike[dot]maraya[at]gmail[dot]com>
-+ * All rights reserved.
-+ *
-+ * This file is subject to the terms and conditions defined in
-+ * https://github.com/mmaraya/port-mirroring/blob/master/LICENSE,
-+ * which is part of this software package.
-+ *
-+ */
-+
-+#ifndef PORT_MIRRORING_UTIL_H_
-+#define PORT_MIRRORING_UTIL_H_
-+
-+#include <errno.h>
-+#include <net/if.h>
-+#include <netinet/in.h>
-+#include <stdint.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <syslog.h>
-+#include <linux/limits.h>
-+
-+#define OPTION_MAX  254     /* max value for program options                */
-+#define TIMEBUF     32      /* max timestamp length RFC3339                 */
-+#define SRC_MAX     4       /* maxium number of source network interfaces   */
-+#define PFE_MAX     80      /* maximum length of packet filter expression   */
-+#define MACADDRLEN  6       /* length of a MAC address                      */
-+
-+// port-mirroring configuration bit flags
-+#define PM_DAEMON   0x01    /* run as background process                    */
-+#define PM_DEBUG    0x02    /* display debugging messages to console        */
-+#define PM_TZSP     0x04    /* send packets using TaZmen Sniffer Protocol   */
-+#define PM_DST_IF   0x08    /* destination is a network interface           */
-+#define PM_DST_IP   0x10    /* destination is an internet protocol address  */
-+#define PM_PROMISC  0x20    /* place source interface in promiscuous mode   */
-+#define PM_SYSLOG   0x40    /* log messages to syslog facility              */
-+
-+// if no configuration file is specified, look through these in order
-+#define CFG_PATH_1  "/etc/config/port-mirroring"
-+#define CFG_PATH_2  "/etc/port-mirroring"
-+#define CFG_PATH_3  "port-mirroring.conf"
-+
-+// default program id file
-+#define PID_PATH    "/var/run/port-mirroring.pid"
-+
-+// program-wide configuration settings and variables
-+struct pm_cfg
-+{
-+    char        *cfg_file;              /* path to configuration file       */
-+    uint8_t     flags;                  /* boolean setting bitmask          */
-+    char        src[SRC_MAX][IFNAMSIZ]; /* source network interfaces        */
-+    char        dst_if[IFNAMSIZ];       /* destination network interface    */
-+    in_addr_t   dst_ip;                 /* destination IP address           */
-+    char        pfe[PFE_MAX];           /* tcpdump packet filter expression */
-+    char        *pid_file;              /* path to process id file          */
-+    int         src_count;              /* number of source ports           */
-+    char        src_mac[MACADDRLEN];    /* source MAC address               */
-+    char        dst_mac[MACADDRLEN];    /* destination MAC address          */
-+    time_t      init_time;              /* used to check for timeouts       */
-+    int         packet_count;           /* number of packets processed      */
-+};
-+
-+void find_cfg(struct pm_cfg *cfg);
-+char * printMACStr(const char *mac);
-+char * getUCIItem(char *buf, char *item);
-+int getUCIConf(char *buf, char *option, char *value);
-+
-+#endif  // PORT_MIRRORING_UTIL_H_
diff --git a/net/port-mirroring/patches/020-fix-musl.patch b/net/port-mirroring/patches/020-fix-musl.patch
deleted file mode 100644 (file)
index fc9288a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/include/config.h b/include/config.h
-index ac948ba..da93160 100644
---- a/include/config.h
-+++ b/include/config.h
-@@ -19,6 +19,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
-+#include <time.h>
- #include <linux/limits.h>
- #define OPTION_MAX  254     /* max value for program options                */
index cb71a7df8f4c9a3826a18132a29895b467b8f1f6..1513fb7a518b73c2c1b9a89cc92367efccd665fa 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.41
+PKG_VERSION:=1.42
 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:=b61855dcffe920fd188e5239464b049231f83e550e24e76669eb49d59991baff
+PKG_HASH:=5ee6b101e4e252ea98e3337da6542d73b7f33de49a89014276cc98a70142ab10
 
 PKG_LICENSE:=BSD-3
 PKG_LICENSE_FILES:=COPYING
index 39cb60c3729a477549296c071cdd91abe990e7e4..a3edecea5884fb84a0f09e5a7cf85d3af512f2e8 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcbind
 PKG_VERSION:=1.2.5
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=@SF/rpcbind
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -17,7 +17,8 @@ PKG_REMOVE_FILES:=autogen.sh aclocal.m4
 PKG_INSTALL:=1
 
 PKG_CONFIG_DEPENDS:= \
-       CONFIG_RPCBIND_LIBWRAP
+       CONFIG_RPCBIND_LIBWRAP \
+       CONFIG_RPCBIND_RMTCALLS
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -43,6 +44,13 @@ if PACKAGE_rpcbind
        config RPCBIND_LIBWRAP
                bool "Enable libwrap (TCP wrappers) support."
                default y
+       config RPCBIND_RMTCALLS
+               bool "Enable broadcast discovery support of rpc services."
+               help
+                       Services such as Kodi (via libnfs) use this functionality to discover available NFS shares on the network.
+               default y
+               
+               
 endif
 endef
 
@@ -57,6 +65,13 @@ else
        CONFIGURE_ARGS += --disable-libwrap
 endif
 
+ifeq ($(CONFIG_RPCBIND_RMTCALLS),y)
+       CONFIGURE_ARGS += --enable-rmtcalls
+else
+       CONFIGURE_ARGS += --disable-rmtcalls
+endif
+
+
 define Package/rpcbind/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rpcinfo $(1)/usr/bin/
diff --git a/net/rpcbind/patches/002-fix_stack_buffer_overflow.patch b/net/rpcbind/patches/002-fix_stack_buffer_overflow.patch
new file mode 100644 (file)
index 0000000..1a43dac
--- /dev/null
@@ -0,0 +1,69 @@
+From 0bc1c0ae7ce61a7ac8a8e9a9b2086268f011abf0 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Tue, 9 Oct 2018 09:19:50 -0400
+Subject: [PATCH 1/1] rpcinfo: Fix stack buffer overflow
+
+*** buffer overflow detected ***: rpcinfo terminated
+======= Backtrace: =========
+/lib64/libc.so.6(+0x721af)[0x7ff24c4451af]
+/lib64/libc.so.6(__fortify_fail+0x37)[0x7ff24c4ccdc7]
+/lib64/libc.so.6(+0xf8050)[0x7ff24c4cb050]
+rpcinfo(+0x435f)[0xef3be2635f]
+rpcinfo(+0x1c62)[0xef3be23c62]
+/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ff24c3f36e5]
+rpcinfo(+0x2739)[0xef3be24739]
+======= Memory map: ========
+...
+The patch below fixes it.
+
+Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: Thomas Blume <thomas.blume@suse.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcinfo.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/src/rpcinfo.c b/src/rpcinfo.c
+index 9b46864..cfdba88 100644
+--- a/src/rpcinfo.c
++++ b/src/rpcinfo.c
+@@ -973,6 +973,7 @@ rpcbdump (dumptype, netid, argc, argv)
+       ("   program version(s) netid(s)                         service     owner\n");
+       for (rs = rs_head; rs; rs = rs->next)
+       {
++        size_t netidmax = sizeof(buf) - 1;
+         char *p = buf;
+         printf ("%10ld  ", rs->prog);
+@@ -985,12 +986,22 @@ rpcbdump (dumptype, netid, argc, argv)
+           }
+         printf ("%-10s", buf);
+         buf[0] = '\0';
+-        for (nl = rs->nlist; nl; nl = nl->next)
+-          {
+-            strcat (buf, nl->netid);
+-            if (nl->next)
+-              strcat (buf, ",");
+-          }
++
++          for (nl = rs->nlist; nl; nl = nl->next)
++            {
++              strncat (buf, nl->netid, netidmax);
++              if (strlen (nl->netid) < netidmax)
++                netidmax -= strlen(nl->netid);
++              else
++                break;
++
++              if (nl->next && netidmax > 1)
++                {
++                  strncat (buf, ",", netidmax);
++                  netidmax --;
++                }
++            }
++
+         printf ("%-32s", buf);
+         rpc = getrpcbynumber (rs->prog);
+         if (rpc)
+-- 
+1.8.3.1
+
index 3d4afffe2d5802c318f819e93e6abeea68e33775..78a26d136892567a8395b622f3bbb6488c83d3c0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rsyslog
 PKG_VERSION:=8.39.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.rsyslog.com/files/download/rsyslog/
@@ -29,7 +29,7 @@ define Package/rsyslog
   CATEGORY:=Network
   TITLE:=Enhanced system logging and kernel message trapping daemons
   URL:=https://www.rsyslog.com/
-  DEPENDS:=+libestr +libfastjson +libuuid +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt
+  DEPENDS:=+libestr +libfastjson +libuuid +zlib
 endef
 
 define Package/rsyslog/conffiles
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..0baaa70ba2a82725ad804c1ed8ac130ab936e380 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.7
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-3.0-only
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/
+PKG_SOURCE_URL:=https://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:=44e5bc58dcae6d86ca8d5f269fa927f20ff91bce97cde86fe4e83addcb89c001
 
-# 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..b61f4bbe0712425ac86abbb6f1c1c15666496c8d 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() {
@@ -77,6 +82,8 @@ smb_add_share() {
        local timemachine
        local timemachine_maxsize
        local force_root
+       local write_list
+       local read_list
 
        config_get name $1 name
        config_get path $1 path
@@ -92,6 +99,8 @@ smb_add_share() {
        config_get_bool timemachine     $1 timemachine  0
        config_get timemachine_maxsize $1 timemachine_maxsize
        config_get_bool force_root      $1 force_root   0
+       config_get write_list $1 write_list
+       config_get read_list $1 read_list
 
        [ -z "$name" -o -z "$path" ] && return
 
@@ -112,7 +121,10 @@ smb_add_share() {
        [ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf
        [ -n "$guest_only" ] && echo -e "\tguest only = $guest_only" >> /var/etc/smb.conf
        [ -n "$inherit_owner" ] && echo -e "\tinherit owner = $inherit_owner" >> /var/etc/smb.conf
-       
+
+       [ -n "$write_list" ] && echo -e "\twrite list = $write_list" >> /var/etc/smb.conf
+       [ -n "$read_list" ] && echo -e "\tread list = $read_list" >> /var/etc/smb.conf
+
        if [ "$MACOS" -eq 1 ]; then
                vfs_objects="catia fruit streams_xattr $vfs_objects"
                echo -e "\tfruit:encoding = native" >> /var/etc/smb.conf
index 972d94e68439a57abd916db7a15b336d2e7f279c..c6b8ce61624cc7829654ef5b00dbe68cf3387981 100644 (file)
@@ -8,17 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=scapy
-PKG_VERSION:=2.4.0
+PKG_VERSION:=2.4.2
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=PKG-INFO
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/secdev/scapy/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3836c62c33dd3f7c1ae30f5c2c1ab8078e4e32f5bf9c8be758dbaafe1c6a580e
+PKG_HASH:=141ee386cf6f296e8c9fae94a40a5386ac2d9bfa43a3870b13f575200c46b5f8
 
 include $(INCLUDE_DIR)/package.mk
-include ../../lang/python/python-package.mk
+include ../../lang/python/python3-package.mk
 
 define Package/scapy
   SECTION:=net
@@ -26,7 +26,7 @@ define Package/scapy
   TITLE:=Interactive packet manipulation tool and network scanner
   MAINTAINER:=W. Michael Petullo <mike@flyn.org>
   URL:=https://scapy.net/
-  DEPENDS:=+python
+  DEPENDS:=+python3
 endef
 
 define Package/scapy/description
@@ -37,17 +37,17 @@ define Package/scapy/description
 endef
 
 define Build/Compile
-       $(call Build/Compile/PyMod,., \
+       $(call Build/Compile/Py3Mod,., \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
        )
 endef
 
 define Package/scapy/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+       $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) \
-               $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-               $(1)$(PYTHON_PKG_DIR)/
+               $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/* \
+               $(1)$(PYTHON3_PKG_DIR)/
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
 endef
 
index 6278089e0e28fbccce6a9d965bf6a25b368e16af..f7c96399d3a58bba7c8d65388d78cc1db6cb6816 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-ccnet
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/ccnet-server/tar.gz/v$(PKG_VERSION)-server?
 PKG_HASH:=ab3d5bda728f87c71929a6247c9f74c5209b9b8e44bafa77db91e8de590ec6ef
 PKG_BUILD_DIR:=$(BUILD_DIR)/ccnet-server-$(PKG_VERSION)-server
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -28,7 +29,6 @@ define Package/seafile-ccnet
     SECTION:=net
     CATEGORY:=Network
     TITLE:=Seafile server - ccnet component
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=http://seafile.com/
     DEPENDS:=+libsearpc +libevent2 +libopenssl \
                +glib2 +python +libzdb +libuuid \
index 9278ddd0b4b8e99e0be39e96d34850100d6473c1..0666d4944c41e5aed28854b5159c8de0c7dbd478 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-seahub
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=Apache-2.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,14 +26,13 @@ define Package/seafile-seahub
     SECTION:=net
     CATEGORY:=Network
     TITLE:=Seafile server - seahub component
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://seafile.com/
     DEPENDS:=+python-simplejson +python +pillow +python-chardet +django +django-appconf \
                +django-compressor +django-constance +django-formtools +django-jsonfield \
                +django-picklefield +django-postoffice +django-restframework \
-               +django-simple-captcha +django-statici18n +django-webpack-loader +et_xmlfile \
-               +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql \
-               +python-qrcode +python-requests +python-requests-oauthlib +python-pytz +rcssmin
+               +django-simple-captcha +django-statici18n +django-webpack-loader \
+               +flup +gunicorn +openpyxl +python-dateutil +python-mysql \
+               +python-qrcode +python-requests +python-requests-oauthlib +python-pytz
 endef
 
 define Build/Configure
index 78fd3069f7ca5e95bd6b81ce7887a34c9768c819..cdb6d8984472d42ad0093d57fb44144a7c234ee5 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-server
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server?
 PKG_HASH:=1ba4c641bad8d7592fd2592827e81470c88b8e802707d2b1e6d551c16d0da100
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-server
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -37,7 +38,6 @@ define Package/seafile-server
     SECTION:=net
     CATEGORY:=Network
     TITLE:=Seafile server
-    MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://seafile.com/
     DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
                +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
index 52590d233ad007454c0fcb80c68a1228e1636759..aaa99065bc362f73023e50811946a97c29d49ee7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ser2net
 PKG_VERSION:=3.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ser2net
@@ -28,8 +28,7 @@ define Package/ser2net
   SECTION:=net
   CATEGORY:=Network
   TITLE:=Serial to Network Proxy
-  URL:=http://sourceforge.net/projects/ser2net/
-  DEPENDS:=+USE_UCLIBC:libpthread +USE_UCLIBC:librt
+  URL:=https://sourceforge.net/projects/ser2net/
 endef
 
 define Package/ser2net/description
index 3214a3cc597829ff6eff63927f326925a23ae2e6..0374e7ece5abfb506e1887f9430f66741484422a 100644 (file)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index 30181ce25af1bfce136e6a5a7719c1b76fb692c4..8ac08713d144dbc8f9c93357566c0ade9c122071 100644 (file)
@@ -32,6 +32,8 @@ Section type `server` is for definition of remote shadowsocks servers.  They wil
 
 Section type `ss_local`, `ss_redir`, `ss_tunnel` are for specification of shadowsocks-libev components.  They share mostly a common set of options like `local_port`, `verbose`, `fast_open`, `timeout`, etc.
 
+Plugin options should be specified in `server` section and will be inherited by other compoenents referring to it.
+
 We can have multiple instances of component and `server` sections.  The relationship between them is many-to-one.  This will have the following implications
 
  - It's possible to have both `ss_local` and `ss_redir` referring to the same `server` definition
@@ -75,6 +77,13 @@ ss-rules uses kernel ipset mechanism for storing addresses/networks.  Those ipse
 
 Note also that `src_ips_xx` and `dst_ips_xx` actually also accepts cidr network representation.  Option names are retained in its current form for backward compatibility coniderations
 
+# incompatible changes
+
+| Commit date | Commit ID | Subject | Comment |
+| ----------- | --------- | ------- | ------- |
+| 2019-05-09  | afe7d3424 | shadowsocks-libev: move plugin options to server section | This is a revision against c19e949 committed 2019-05-06 |
+| 2017-07-02  | b61af9703 | shadowsocks-libev: rewrite | Packaging of shadowsocks-libev was rewritten from scratch |
+
 # notes and faq
 
 Useful paths and commands for debugging
index 42ffe9e0ddd5d8f27da41f07d52bf4e16c3be251..79ec2e8b3acc95f61adc38632838619bff76710c 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh /etc/rc.common
 #
-# Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v3.
 # See /LICENSE for more information.
@@ -30,6 +30,8 @@ ss_mkjson_server_conf_() {
        [ -z "$method" ] || json_add_string method "$method"
        [ -z "$key" ] || json_add_string key "$key"
        [ -z "$password" ] || json_add_string password "$password"
+       [ -z "$plugin" ] || json_add_string plugin "$plugin"
+       [ -z "$plugin_opts" ] || json_add_string plugin_opts "$plugin_opts"
 }
 
 ss_mkjson_ss_local_conf() {
@@ -212,7 +214,9 @@ validate_common_server_options_() {
                'server_port:port' \
                'password:string' \
                'key:string' \
-               "method:or($stream_methods, $aead_methods)"
+               "method:or($stream_methods, $aead_methods)" \
+               'plugin:string' \
+               'plugin_opts:string'
 }
 
 validate_common_client_options_() {
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 34efb7a9d843b26386e714b2bdad5152207a5eba..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:=2
+PKG_RELEASE:=3
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
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 7a822490c662a41bd24621432c362e0b8d55edb8..4fac5f8ae94ee99facfc91d2e40c480041e1f518 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=socat
-PKG_VERSION:=1.7.3.2
-PKG_RELEASE:=5
+PKG_VERSION:=1.7.3.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
-PKG_HASH:=e3561f808739383eb10fada1e5d4f26883f0311b34fd0af7837d0c95ef379251
+PKG_HASH:=0dd63ffe498168a4aac41d307594c5076ff307aa0ac04b141f8f1cec6594d04a
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
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 bd56d067fc88f452839966bb08fe0f68d3d62d5d..008ad4b3b698ee773c77399a3c9d4229bf1972b3 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squid
-PKG_VERSION:=4.4
-PKG_RELEASE:=3
+PKG_VERSION:=4.6
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
@@ -18,7 +18,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v4/ \
        http://www2.pl.squid-cache.org/Versions/v4/ \
        http://www.squid-cache.org/Versions/v4/
-PKG_HASH:=4905e6da7f5574d2583ba36f398bb062a12d51e70d67035078b6e85b09e9ee82
+PKG_HASH:=015bade5d3a4905142c4c605df5c4216471e3d8338079955e0e44b0ae0303d41
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index 6b2ed9f2b9d27045466d2133e4b766f3661d0c02..e392dba718e80a6d46cac40d6596014f5a1ae250 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
 
 --- a/src/Makefile.in
 +++ b/src/Makefile.in
-@@ -8383,7 +8383,8 @@
+@@ -8385,7 +8385,8 @@
  
  # cf_gen builds the configuration files.
  cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci
diff --git a/net/squid/patches/010-openssl-engine.patch b/net/squid/patches/010-openssl-engine.patch
deleted file mode 100644 (file)
index e7f97ee..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/ssl/support.cc
-+++ b/src/ssl/support.cc
-@@ -485,7 +485,7 @@ Ssl::Initialize(void)
-     SQUID_OPENSSL_init_ssl();
--#if HAVE_OPENSSL_ENGINE_H
-+#ifndef OPENSSL_NO_ENGINE
-     if (::Config.SSL.ssl_engine) {
-         ENGINE_load_builtin_engines();
-         ENGINE *e;
index afda53ed8cb964197055c45ebb54ad34326f765f..20e60ad6ca500e2411bc0c4593b0972d22a31e7a 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stubby
-PKG_VERSION:=0.2.4
+PKG_VERSION:=0.2.6
 PKG_RELEASE:=1
 
 PKG_LICENSE:=BSD-3-Clause
@@ -13,10 +13,9 @@ PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Jonathan Underwood <jonathan.underwood@gmail.com>
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/getdnsapi/$(PKG_NAME)
-PKG_SOURCE_VERSION:=58200cadec6371f95e31a7f3735225c5a46ecf75
-PKG_MIRROR_HASH:=28c46f4464cb41cf59264d10da63dc25ece9a1d00b4dfb05a9276594658e5eb9
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_MIRROR_HASH:=af896c471ac67b31c2263d11fcdfcdb32a213621c2f8789f4b0a4ceca4437108
 
 PKG_FIXUP:=autoreconf
 
index 800e9545ebb38035d8f5630595f7827a3d7d67f7..bc5344cd807dc05b0417b1f76d50e784fc33171b 100644 (file)
@@ -372,7 +372,33 @@ The possible levels are:
 
 This option specifies additional command line arguments for
 stubby daemon. By default, this is an empty string.
-       
+
+#### `option tls_cipher_list`
+
+If set, this specifies the acceptable ciphers for DNS over TLS. With OpenSSL
+1.1.1 this list is for TLS1.2 and older only. Ciphers for TLS1.3 should be set
+with the `tls_ciphersuites` option. This option can also be given per upstream
+resolver. By default, this option is not set.
+
+#### `option tls_ciphersuites`
+
+If set, this specifies the acceptable cipher for DNS over TLS1.3. OpenSSL
+version 1.1.1 or greater is required for this option. This option can also be
+given per upstream resolver. By default, this option is not set.
+
+#### `option tls_min_version`
+
+If set, this specifies the minimum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. This option can also be given per upstream resolver. By
+default, this option is not set.
+
+#### `option tls_max_version`
+
+If set, this specifies the maximum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. This option can also be given per upstream resolver. By
+default, this option is not set.
+
+
 ### `resolver` section options
 
 #### `option address`
@@ -385,6 +411,36 @@ IPv6 address.
 This option specifies the upstream domain name used for TLS authentication with
 the supplied server certificate
 
+#### `option tls_port`
+
+This option specifies the TLS port for the upstream resolver. If not specified,
+this defaults to 853.
+
+#### `option tls_cipher_list`
+
+If set, this specifies the acceptable ciphers for DNS over TLS. With OpenSSL
+1.1.1 this list is for TLS1.2 and older only. Ciphers for TLS1.3 should be set
+with the `tls_ciphersuites` option. By default, this option is not set. If set,
+this overrides the global value.
+
+#### `option tls_ciphersuites`
+
+If set, this specifies the acceptable cipher for DNS over TLS1.3. OpenSSL
+version 1.1.1 or greater is required for this option. By default, this option is
+not set. If set, this overrides the global value.
+
+#### `option tls_min_version`
+
+If set, this specifies the minimum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. By default, this option is not set. If set, this
+overrides the global value.
+
+#### `option tls_max_version`
+
+If set, this specifies the maximum acceptable TLS version. Works with OpenSSL
+1.1.1 or greater only. By default, this options is not set. If set, this
+overrides the global value.
+
 #### `list spki`
 
 This list specifies the SPKI pinset which is verified against the keys in the
index a02936da13900c52b1f7bd0a1423bcd1c83034be..f722a43046ae662cb1c37a0d8238f7a9132802fc 100644 (file)
@@ -19,24 +19,48 @@ config stubby 'global'
        list listen_address '0::1@5453'
        # option log_level '7'
        # option command_line_arguments ''
+       # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+       # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+       # option tls_min_version '1.2'
+       # option tls_max_version '1.3'
 
 # Upstream resolvers are specified using 'resolver' sections.
 config resolver
        option address '2606:4700:4700::1111'
        option tls_auth_name 'cloudflare-dns.com'
+       # option tls_port 853
        # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+       # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+       # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+       # option tls_min_version '1.2'
+       # option tls_max_version '1.3'
 
 config resolver
        option address '2606:4700:4700::1001'
        option tls_auth_name 'cloudflare-dns.com'
+       # option tls_port 853
        # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+       # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+       # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+       # option tls_min_version '1.2'
+       # option tls_max_version '1.3'
 
 config resolver
        option address '1.1.1.1'
        option tls_auth_name 'cloudflare-dns.com'
+       # option tls_port 853
        # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+       # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+       # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+       # option tls_min_version '1.2'
+       # option tls_max_version '1.3'
 
 config resolver
        option address '1.0.0.1'
        option tls_auth_name 'cloudflare-dns.com'
+       # option tls_port 853
        # list spki 'sha256/yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='
+       # option tls_cipher_list 'EECDH+AESGCM:EECDH+CHACHA20'
+       # option tls_ciphersuites 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'
+       # option tls_min_version '1.2'
+       # option tls_max_version '1.3'
index 4a975e39d58114f70c8a82f74e626a279f75ba89..cf051a1404f1171ff832b2c2767e1f0e8fe11285 100755 (executable)
@@ -38,6 +38,10 @@ generate_config()
     local upstream_recursive_servers_section=0
     local command_line_arguments
     local log_level
+    local tls_cipher_list
+    local tls_ciphersuites
+    local tls_min_version
+    local tls_max_version
 
     # Generate configuration. See: https://github.com/getdnsapi/stubby/blob/develop/stubby.yml.example
     echo "# Autogenerated configuration from uci data" > "$config_file"
@@ -93,6 +97,26 @@ generate_config()
     config_get idle_timeout "global" idle_timeout "10000"
     echo "idle_timeout: $idle_timeout" >> "$config_file"
 
+    config_get tls_cipher_list "global" tls_cipher_list ""
+    if [ -n "$tls_cipher_list" ]; then
+        echo "tls_cipher_list: \"$tls_cipher_list\"" >> "$config_file"
+    fi
+
+    config_get tls_ciphersuites "global" tls_ciphersuites ""
+    if [ -n "$tls_ciphersuites" ]; then
+        echo "tls_ciphersuites: \"$tls_ciphersuites\"" >> "$config_file"
+    fi
+
+    config_get tls_min_version "global" tls_min_version ""
+    if [ -n "$tls_min_version" ]; then
+        echo "tls_min_version: GETDNS_TLS${tls_min_version/\./_}" >> "$config_file"
+    fi
+
+    config_get tls_max_version "global" tls_max_version ""
+    if [ -n "$tls_max_version" ]; then
+        echo "tls_max_version: GETDNS_TLS${tls_max_version/\./_}" >> "$config_file"
+    fi
+
     handle_listen_address_value()
     {
         local value="$1"
@@ -122,21 +146,52 @@ generate_config()
         local config=$1
         local address
         local tls_auth_name
+        local tls_port
         local tls_pubkey_pinset_section=0
+        local tls_cipher_list
+        local tls_ciphersuites
+        local tls_min_version
+        local tls_max_version
 
         if [ "$upstream_recursive_servers_section" = 0 ]; then
             echo "upstream_recursive_servers:" >> "$config_file"
             upstream_recursive_servers_section=1
         fi
         config_get address "$config" address
-        config_get tls_auth_name "$config" tls_auth_name
         echo "  - address_data: $address" >> "$config_file"
+
+        config_get tls_auth_name "$config" tls_auth_name
         echo "    tls_auth_name: \"$tls_auth_name\"" >> "$config_file"
 
+        config_get tls_auth_port "$config" tls_port ""
+        if [ -n "$tls_port" ]; then
+            echo "    tls_port: $tls_port"  >> "$config_file"
+        fi
+
+        config_get tls_cipher_list "$config" tls_cipher_list ""
+        if [ -n "$tls_cipher_list" ]; then
+            echo "    tls_cipher_list: \"$tls_cipher_list\"" >> "$config_file"
+        fi
+
+        config_get tls_ciphersuites "$config" tls_ciphersuites ""
+        if [ -n "$tls_ciphersuites" ]; then
+            echo "    tls_ciphersuites: \"$tls_ciphersuites\"" >> "$config_file"
+        fi
+
+        config_get tls_min_version "$config" tls_min_version ""
+        if [ -n "$tls_min_version" ]; then
+            echo "    tls_min_version: GETDNS_TLS${tls_min_version/\./_}" >> "$config_file"
+        fi
+
+        config_get tls_max_version "$config" tls_max_version ""
+        if [ -n "$tls_max_version" ]; then
+            echo "    tls_max_version: GETDNS_TLS${tls_max_version/\./_}" >> "$config_file"
+        fi
+
         handle_resolver_spki()
         {
             local val="$1"
-            local digest="${val%/*}"
+            local digest="${val%%/*}"
             local value="${val#*/}"
 
             if [ "$tls_pubkey_pinset_section" = 0 ]; then
index c5337777d5bd89bb9514a61457e7db5aa40460da..a49e090b79e868c4ee4c87f7d38949b3789501ff 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stunnel
-PKG_VERSION:=5.50
+PKG_VERSION:=5.53
 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:=80439896ee14269eb70bc8bc669433c7d619018a62c9f9c5c760a24515302585
 
 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 22f774b65378735940b864987d3b43f047acfd6c..d8c6820de31cd498e07e62a4ab877d85470a0662 100644 (file)
@@ -1,6 +1,4 @@
 #
-# Copyright (C) 2007-2017 OpenWrt.org
-#
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
@@ -9,10 +7,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=subversion
 PKG_RELEASE:=1
-PKG_VERSION:=1.11.1
+PKG_VERSION:=1.12.0
 PKG_SOURCE_URL:=@APACHE/subversion
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=9efd2750ca4d72ec903431a24b9c732b6cbb84aad9b7563f59dd96dea5be60bb
+PKG_HASH:=7fae7c73d8a007c107c0ae5eb372bc0bb013dbfe966fcd5c59cd5a195a5e2edf
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
@@ -20,6 +18,8 @@ PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
 PKG_FIXUP:=autoreconf
 PKG_MACRO_PATHS:=build/ac-macros
 PKG_BUILD_DEPENDS:=apr-util
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -30,9 +30,8 @@ define Package/subversion/Default
   CATEGORY:=Network
   SUBMENU:=Version Control Systems
   TITLE:=A compelling replacement for CVS
-  DEPENDS:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \
-       $(ICONV_DEPENDS) $(INTL_DEPENDS)
-  URL:=http://subversion.apache.org/
+  DEPENDS:=+PACKAGE_unixodbc:unixodbc +libaprutil +libmagic $(ICONV_DEPENDS) $(INTL_DEPENDS)
+  URL:=https://subversion.apache.org/
 endef
 
 define Package/subversion/Default/description
@@ -80,8 +79,6 @@ define Package/subversion-server/conffiles
 endef
 
 TARGET_CFLAGS += $(FPIC)
-TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs)
 
 CONFIGURE_ARGS += \
        --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
@@ -104,17 +101,6 @@ else
        CONFIGURE_ARGS += --disable-nls
 endif
 
-CONFIGURE_VARS += \
-       LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \
-               -lz -lpthread $(if $(INTL_FULL),-lintl)"
-       CPPFLAGS="$(TARGET_CPPFLAGS)"
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all local-install
-endef
-
 define Package/subversion-libs/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
index b964949ae406cad8b1174a09d8c155de1de84cd1..db25f68e65b30e2b482fb59ca256d49e0fe601ed 100644 (file)
@@ -1,10 +1,8 @@
---- a/build/ac-macros/macosx.m4        2016-02-09 01:24:13.181409245 -0500
-+++ b/build/ac-macros/macosx.m4        2016-02-09 01:25:15.873408288 -0500
-@@ -17,94 +17,4 @@ dnl   specific language governing permis
- dnl   under the License.
- dnl ===================================================================
+--- a/build/ac-macros/macosx.m4
++++ b/build/ac-macros/macosx.m4
+@@ -19,80 +19,3 @@ dnl ====================================
  dnl
--dnl  Mac OS X specific checks
+ dnl  Mac OS X specific checks
  
 -dnl SVN_LIB_MACHO_ITERATE
 -dnl Check for _dyld_image_name and _dyld_image_header availability
 -    #error ProperyList API unavailable.
 -    #endif
 -  ]],[[]])],[
--    dnl ### Hack.  We should only need to pass the -framework options when
--    dnl linking libsvn_subr, since it is the only library that uses Keychain.
--    dnl
--    dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
--    dnl OS X frameworks like it does for normal libraries, so we need to
--    dnl explicitly pass the option to all the users of libsvn_subr to allow
--    dnl static builds to link successfully.
--    dnl
--    dnl This does mean that all executables we link will be linked directly
--    dnl to these frameworks - even when building shared libraries - but that
--    dnl shouldn't cause any problems.
--
--    LIBS="$LIBS -framework CoreFoundation"
+-    SVN_MACOS_PLIST_LIBS="-framework CoreFoundation"
+-    AC_SUBST(SVN_MACOS_PLIST_LIBS)
 -    AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1],
 -              [Is Mac OS property list API available?])
 -    AC_MSG_RESULT([yes])
@@ -84,9 +71,8 @@
 -      #error KeyChain API unavailable.
 -      #endif
 -    ]],[[]])],[
--      dnl ### Hack, see SVN_LIB_MACOS_PLIST
--      LIBS="$LIBS -framework Security"
--      LIBS="$LIBS -framework CoreServices"
+-      SVN_MACOS_KEYCHAIN_LIBS="-framework Security -framework CoreServices"
+-      AC_SUBST(SVN_MACOS_KEYCHAIN_LIBS)
 -      AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?])
 -      AC_MSG_RESULT([yes])
 -    ],[
 -    ])
 -  fi
 -])
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -56,8 +56,8 @@ SVN_XML_LIBS = @SVN_XML_LIBS@
+ SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@
+ SVN_LZ4_LIBS = @SVN_LZ4_LIBS@
+ SVN_UTF8PROC_LIBS = @SVN_UTF8PROC_LIBS@
+-SVN_MACOS_PLIST_LIBS = @SVN_MACOS_PLIST_LIBS@
+-SVN_MACOS_KEYCHAIN_LIBS = @SVN_MACOS_KEYCHAIN_LIBS@
++SVN_MACOS_PLIST_LIBS =
++SVN_MACOS_KEYCHAIN_LIBS =
+ LIBS = @LIBS@
index a9fb24fdb8541ec667ce362603ce955dbbf35d0f..2b91abba81c160525eb640edf6d2b9b60856d3a2 100644 (file)
@@ -12,7 +12,7 @@ PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 
 PKG_NAME:=sysrepo
 PKG_VERSION:=0.7.7
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/sysrepo/sysrepo/tar.gz/v$(PKG_VERSION)?
@@ -33,7 +33,7 @@ define Package/libsysrepo/config
        source "$(SOURCE)/Config_libsysrepo.in"
 endef
 
-PKG_BUILD_DEPENDS:=+SYSREPO_BINDINGS:swig/host
+PKG_BUILD_DEPENDS:=SYSREPO_BINDINGS:swig/host
 
 define Package/libsysrepo
   SECTION:=utils
@@ -109,7 +109,8 @@ ifeq ($(CONFIG_SYSREPO_BINDINGS),y)
 CMAKE_OPTIONS += \
        -DCMAKE_DISABLE_FIND_PACKAGE_SWIG=FALSE \
        -DGEN_LANGUAGE_BINDINGS:BOOL=TRUE \
-       -DSWIG_DIR=$(STAGING_DIR)/host/share/swig \
+       -DSWIG_DIR=$(STAGING_DIR_HOSTPKG)/share/swig \
+       -DSWIG_EXECUTABLE=$(STAGING_DIR_HOSTPKG)/bin/swig \
        -DCALL_TARGET_BINS_DIRECTLY=OFF
 endif
 
diff --git a/net/tac_plus/Makefile b/net/tac_plus/Makefile
new file mode 100644 (file)
index 0000000..381a044
--- /dev/null
@@ -0,0 +1,95 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tac_plus
+PKG_VERSION:=4.0.4.28
+PKG_REV:=259251e6f1c2d5c98081a43c6f66d9eb2989cfd8
+PKG_RELEASE:=2
+
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_DATE:=2019.02.11
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/tac_plus/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_DATE)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_HASH:=3c37d6a8acf66cac4a95558bf3e29686ef3be505a1638e2ef788a7ece41d1b01
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)
+PKG_BUILD_SUBDIR:=tacacs-F$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+MAKE_PATH:=$(PKG_BUILD_SUBDIR)
+CONFIGURE_PATH:=$(PKG_BUILD_SUBDIR)
+
+CONFIGURE_ARGS += \
+       --disable-shared \
+       --without-libwrap
+
+ifeq ($(BUILD_VARIANT),without-pam)
+CONFIGURE_VARS += \
+       ac_cv_lib_pam_pam_start=no
+endif
+
+define Package/tac_plus/Default
+       SECTION:=net
+       CATEGORY:=Network
+       TITLE:=TACACS+ daemon
+       URL:=https://github.com/facebook/tac_plus/
+endef
+
+define Package/tac_plus
+$(call Package/tac_plus/Default)
+       TITLE+= (without PAM support)
+       VARIANT:=without-pam
+endef
+
+define Package/tac_plus-pam
+$(call Package/tac_plus/Default)
+       TITLE+= (with PAM support)
+       DEPENDS+= +libpam
+       VARIANT:=with-pam
+endef
+
+define Package/tac_plus/Default/description
+TACACS+ is a protocol (not TACACS or XTACACS) for authentication,
+authorization and accounting (AAA) services for routers and network devices.
+endef
+
+define Package/tac_plus/description
+$(call Package/tac_plus/Default/description)
+This package is built without PAM support.
+endef
+
+define Package/tac_plus-pam/description
+$(call Package/tac_plus/Default/description)
+This package is built with PAM support.
+endef
+
+define Package/tac_plus/Default/conffiles
+/etc/tac_plus.conf
+endef
+
+define Package/tac_plus/conffiles
+$(call Package/tac_plus/Default/conffiles)
+endef
+
+define Package/tac_plus-pam/conffiles
+$(call Package/tac_plus/Default/conffiles)
+endef
+
+define Package/tac_plus/install
+       $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
+       $(INSTALL_CONF) ./files/tac_plus.conf $(1)/etc/tac_plus.conf
+       $(INSTALL_BIN) ./files/tac_plus.init $(1)/etc/init.d/tac_plus
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_BUILD_SUBDIR)/tac_plus $(1)/usr/sbin/
+endef
+
+define Package/tac_plus-pam/install
+       $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
+       $(INSTALL_CONF) ./files/tac_plus.conf $(1)/etc/tac_plus.conf
+       $(INSTALL_BIN) ./files/tac_plus.init $(1)/etc/init.d/tac_plus
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_BUILD_SUBDIR)/tac_plus $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,tac_plus))
+$(eval $(call BuildPackage,tac_plus-pam))
diff --git a/net/tac_plus/files/tac_plus.conf b/net/tac_plus/files/tac_plus.conf
new file mode 100644 (file)
index 0000000..5b9ce6c
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# An example tac_plus configuration. You should change this
+# before using it.
+#
+
+# Define where to log accounting data, this is the default.
+accounting file = /var/log/tac_plus.acct
+
+# This is the key that clients have to use to access Tacacs+
+key = testing123
+
+# Use /etc/passwd file to do authentication
+#default authentication = file /etc/passwd
+
+# You can use feature like per host key with different enable passwords
+#host = 127.0.0.1 {
+#        key = test 
+#        type = cisco
+#        enable = <des|cleartext> enablepass
+#        prompt = "Welcome XXX ISP Access Router \n\nUsername:"
+#}
+
+# We also can define local users and specify a file where data is stored.
+# That file may be filled using tac_pwd
+#user = test1 {
+#    name = "Test User"
+#    member = staff
+#    login = file /etc/tacacs/tacacs_passwords
+#}
+
+# We can also specify rules valid per group of users.
+#group = group1 {
+#      cmd = conf {
+#              deny
+#      }
+#}
+
+# Another example : forbid configure command for some hosts
+# for a define range of clients
+#group = group1 {
+#      login = file /etc/passwd
+#      service = ppp
+#      protocol = ip {
+#              addr = 10.10.0.0/24
+#      }
+#      cmd = conf {
+#              deny .*
+#      }
+#}
+
+user = DEFAULT {
+       login = file /etc/passwd
+       service = ppp protocol = ip {}
+}
+
+# Much more features are availables, like ACL, more service compatibilities,
+# commands authorization, scripting authorization.
+# See the man page for those features.
diff --git a/net/tac_plus/files/tac_plus.init b/net/tac_plus/files/tac_plus.init
new file mode 100755 (executable)
index 0000000..42cae8c
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/sbin/tac_plus
+
+start_service() {
+       procd_open_instance
+       procd_set_param command "$PROG" -G -C /etc/tac_plus.conf
+       procd_close_instance
+}
diff --git a/net/tac_plus/patches/010-configure-remove-libnsl.patch b/net/tac_plus/patches/010-configure-remove-libnsl.patch
new file mode 100644 (file)
index 0000000..01ac6aa
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/tacacs-F4.0.4.28/configure       2015-01-06 22:55:35.000000000 +0100
++++ b/tacacs-F4.0.4.28/configure       2019-01-31 14:44:28.679272504 +0100
+@@ -3285,11 +3285,9 @@
+     ;;
+     *linux* )
+       # XXX: not sure if /usr/local is necessary.
+-      # XXX: linux libwrap needs -lnsl. configure should check for
+-      #      existence of libnsl instead of hard-coding
+       CPPFLAGS="$CFLAGS -I/usr/local/include"; export CPPFLAGS
+       LDFLAGS="$LDFLAGS -L/usr/local/lib -L/lib"; export LDFLAGS
+-      LIBS="-lnsl -lcrypt $LIBS"; export LIBS
++      LIBS="-lcrypt $LIBS"; export LIBS
+       $as_echo "#define LINUX 1" >>confdefs.h
index 97f47037245b4d05c860fd2b541230b6da49741d..1c4c6522d2897739ca819b4788138e07263d7317 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.77
+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:=7eab72f47e69102c709be2b48b11228470d7a84c88e64f5c354b83ed84d2d04e
 
 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 de5239d3618fe9566272230a8486cdba8e5a2049..e226f65860f5f7b2066188e2810bca3263140311 100644 (file)
@@ -44,6 +44,8 @@ config target 1
 #      option 'removable' '0'
 #  0 = Classic sense format, 1 = Support descriptor format.
 #      option 'sense_format' '0'
+# Rotaion rate: 0: not reported, 1: non-rotational medium (SSD), 2-1024: reserverd, 1025+: "Nominal rotation rate"
+#      option 'rotation_rate' '0'
 
 #config lun 2_1
 #      option device /mnt/iscsi.img
index b627d5dbd44e02b7fc050d7f1fedc4669149343c..c10057d6502a58701a66ea7e10e0ff708956d8f5 100755 (executable)
@@ -28,7 +28,8 @@ validate_lun_section() {
                'scsi_id:string' \
                'scsi_sn:string' \
                'sense_format:range(0, 1)' \
-               'vendor_id:string'
+               'vendor_id:string' \
+               'rotation_rate:uinteger'
 }
 
 handle_lun() {
@@ -36,7 +37,7 @@ handle_lun() {
        local my_tgtid=${tgt_lun%_*}
        local lun=${tgt_lun#*_}
 
-       [ $my_tgtid -eq $tgtid ] || return 0
+       [ "$my_tgtid" -eq "$tgtid" ] || return 0
 
        [ "$2" = 0 ] || {
                $logger "Validation failed for LUN $tgt_lun"
@@ -47,22 +48,22 @@ handle_lun() {
                return 1
        }
 
-       if [ $sync -ne 0 -o $direct -ne 0 ]; then
+       if [ "$sync" -ne 0 ] || [ "$direct" -ne 0 ]; then
                local bsoflags
-               [ $sync -ne 0 ] && bsoflags="sync"
-               [ $direct -ne 0 ] && bsoflags="direct"
-               [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct"
+               [ "$sync" -ne 0 ] && bsoflags="sync"
+               [ "$direct" -ne 0 ] && bsoflags="direct"
+               [ "$sync" -ne 0 ] && [ "$direct" -ne 0 ] && bsoflags="sync:direct"
                bsoflags="--bsoflags $bsoflags"
        fi
 
        blocksize=${blocksize+--blocksize=$blocksize}
        local params='' i
-       for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do
+       for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id rotation_rate; do
                eval params=\${$i+$i=\$$i,}\$params
        done
 
        local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
-       $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype $bsoflags $blocksize || {
+       $_tgtadm --op new --backing-store "$device" --device-type "$type" --bstype "$bstype" $bsoflags $blocksize || {
                $logger "Failed to create lun $tgt_lun"
                return 1
        }
@@ -117,7 +118,7 @@ bind_account_to_target() {
        local t
        for t in $target; do
                [ "$t" -eq "$tgtid" ] && {
-                       $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || {
+                       $_tgtadm --op bind --tid "$tgtid" --user "$user" $outgoing || {
                                $logger "Failed to bind user $username to target $tgtid"
                                return 1
                        }
@@ -137,24 +138,24 @@ handle_target() {
        local tgtid=$1
        local _tgtadm="$tgtadm --mode target"
 
-       [ $tgtid -ge 0 ] || return 1
+       [ "$tgtid" -ge 0 ] || return 1
        [ "$2" = 0 ] || {
                $logger "Validation failed for target $tgtid"
                return 1
        }
-       $_tgtadm --op new --tid $tgtid --targetname $name || {
+       $_tgtadm --op new --tid "$tgtid" --targetname "$name" || {
                $logger "Failed to create target $tgtid"
                return 1
        }
        local i
        for i in $allow_address; do
-               $_tgtadm --op bind --tid $tgtid --initiator-address $i || {
+               $_tgtadm --op bind --tid "$tgtid" --initiator-address "$i" || {
                        $logger "Failed to set allow $i to connect to target $tgtid"
                        return 1
                }
        done
        for i in $allow_name; do
-               $_tgtadm --op bind --tid $tgtid --initiator-name $i || {
+               $_tgtadm --op bind --tid "$tgtid" --initiator-name "$i" || {
                        $logger "Failed to set allow $i to connect to target $tgtid"
                        return 1
                }
@@ -193,7 +194,7 @@ start_tgt_instance() {
        }
        procd_open_instance
        procd_set_param command $PROG -f
-       [ "$iothreads" ] && procd_append_param command -t $iothreads
+       [ "$iothreads" ] && procd_append_param command -t "$iothreads"
        [ "$portal$nop_interval$nop_count" ] && {
                local iscsi="" i
                for i in nop_interval nop_count; do
@@ -202,11 +203,11 @@ start_tgt_instance() {
                for i in $portal; do
                        iscsi="portal=$i,$iscsi"
                done
-               procd_append_param command --iscsi $iscsi
+               procd_append_param command --iscsi "$iscsi"
        }
        procd_set_param respawn
        procd_close_instance
-       logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds"
+       logger -p daemon.info -t "$NAME" -s "Configuration will be loaded in seconds"
        ( sleep 5; configure || { stop_service; exit 1; } ) &
 }
 
diff --git a/net/tgt/patches/110-iscsi_tcp-Replace-deprecated-valloc-function.patch b/net/tgt/patches/110-iscsi_tcp-Replace-deprecated-valloc-function.patch
new file mode 100644 (file)
index 0000000..0c7c461
--- /dev/null
@@ -0,0 +1,31 @@
+From ced49c99ef0b120d32bcbb3bb6985ff90833052e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Tue, 30 Apr 2019 22:34:45 -0700
+Subject: [PATCH 1/2] iscsi_tcp: Replace deprecated valloc function
+
+Replaced with posix_memalign as valloc is not available on uClibc.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ usr/iscsi/iscsi_tcp.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/usr/iscsi/iscsi_tcp.c b/usr/iscsi/iscsi_tcp.c
+index 536f22e..5762c23 100644
+--- a/usr/iscsi/iscsi_tcp.c
++++ b/usr/iscsi/iscsi_tcp.c
+@@ -578,7 +578,10 @@ static void iscsi_tcp_free_task(struct iscsi_task *task)
+ static void *iscsi_tcp_alloc_data_buf(struct iscsi_connection *conn, size_t sz)
+ {
+-      return valloc(sz);
++      void *addr = NULL;
++
++      posix_memalign(&addr, sysconf(_SC_PAGESIZE), sz);
++      return addr;
+ }
+ static void iscsi_tcp_free_data_buf(struct iscsi_connection *conn, void *buf)
+-- 
+2.21.0
+
diff --git a/net/tgt/patches/111-iscsi_tcp-fix-compile-warning.patch b/net/tgt/patches/111-iscsi_tcp-fix-compile-warning.patch
new file mode 100644 (file)
index 0000000..8555cc2
--- /dev/null
@@ -0,0 +1,36 @@
+From 23f3bb1ab8311601db03757a6d4538e747364454 Mon Sep 17 00:00:00 2001
+From: FUJITA Tomonori <fujita.tomonori@gmail.com>
+Date: Fri, 3 May 2019 19:30:07 +0900
+Subject: [PATCH 2/2] iscsi_tcp: fix compile warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+iscsi/iscsi_tcp.c: In function ‘iscsi_tcp_alloc_data_buf’:
+iscsi/iscsi_tcp.c:583:2: error: ignoring return value of ‘posix_memalign’, declared with attribute warn_unused_result [-Werror=unused-result]
+  posix_memalign(&addr, sysconf(_SC_PAGESIZE), sz);
+    ^
+
+Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
+---
+ usr/iscsi/iscsi_tcp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/usr/iscsi/iscsi_tcp.c b/usr/iscsi/iscsi_tcp.c
+index 5762c23..0a076b0 100644
+--- a/usr/iscsi/iscsi_tcp.c
++++ b/usr/iscsi/iscsi_tcp.c
+@@ -579,8 +579,8 @@ static void iscsi_tcp_free_task(struct iscsi_task *task)
+ static void *iscsi_tcp_alloc_data_buf(struct iscsi_connection *conn, size_t sz)
+ {
+       void *addr = NULL;
+-
+-      posix_memalign(&addr, sysconf(_SC_PAGESIZE), sz);
++      if (posix_memalign(&addr, sysconf(_SC_PAGESIZE), sz) != 0)
++              return addr;
+       return addr;
+ }
+-- 
+2.21.0
+
index 27467a40beb8249c14469198a60cddee0222d8a9..a7865c96e862d23e22caa27428a2fc332f9a2314 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tinyproxy
 PKG_VERSION:=1.8.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.banu.com/pub/tinyproxy/1.8/
index 73f38c63d4acc1fbcb8ac4cd87f8b5e215f2bdce..046783073a5aa7af260c1ee2bd945aea8bbd27ed 100644 (file)
@@ -50,7 +50,7 @@ start_proxy() {
 
        proxy_atom "$1" LogLevel >> $CFGFILE
 
-       proxy_list "$1" XTinyproxy >> $CFGFILE
+       proxy_flag "$1" XTinyproxy >> $CFGFILE
 
        proxy_atom "$1" MaxClients >> $CFGFILE
        proxy_atom "$1" MinSpareServers >> $CFGFILE
index ae4cb962cdd58cf4a4275082beb0d18464e9f04a..752dd66111d76b6c2d60785d8b3f5473c9e8e095 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
-PKG_VERSION:=0.3.5.8
-PKG_RELEASE:=3
+PKG_VERSION:=0.4.0.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
        https://archive.torproject.org/tor-package-archive
-PKG_HASH:=d5c56603942a8927670f50a4a469fb909e29d3571fdd013389d567e57abc0b47
+PKG_HASH:=b5a2cbf0dcd3f1df2675dbd5ec10bbe6f8ae995c41b68cebe2bc95bffc90696e
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
                Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE_FILES:=LICENSE
diff --git a/net/transmission-web-control/Makefile b/net/transmission-web-control/Makefile
new file mode 100644 (file)
index 0000000..7547dbd
--- /dev/null
@@ -0,0 +1,41 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=transmission-web-control
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/ronggang/transmission-web-control
+PKG_SOURCE_DATE:=2019-04-16
+PKG_SOURCE_VERSION:=a747a87babb246b0d3e6dd108ad7b4c19462cfe6
+PKG_MIRROR_HASH:=90a2e33bd799a13504881e26980823fa181b47918900fc4ef03ae3daf0625f14
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/transmission-web-control
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=BitTorrent
+  DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
+  CONFLICTS:=transmission-web
+  TITLE:=Transmission Web Control
+  URL:=https://github.com/ronggang/transmission-web-control
+  PKGARCH:=all
+endef
+
+define Package/transmission-web-control/description
+ Transmission Web Control is a custom Web UI for Transmission.
+endef
+
+define Build/Compile
+endef
+
+define Package/transmission-web-control/install
+       $(INSTALL_DIR) $(1)/usr/share/transmission/web
+       $(CP) $(PKG_BUILD_DIR)/src/* $(1)/usr/share/transmission/web
+endef
+
+$(eval $(call BuildPackage,transmission-web-control))
diff --git a/net/transmission-web-control/patches/001-remove-ui-original-link.patch b/net/transmission-web-control/patches/001-remove-ui-original-link.patch
new file mode 100644 (file)
index 0000000..171d9bf
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/src/index.html
++++ b/src/index.html
+@@ -61,9 +61,6 @@
+                                               <!-- 切换到移动版 -->
+                                               <a id="toolbar_mobile" href="javascript:location.href = 'index.mobile.html';" class="easyui-linkbutton" data-options="iconCls:'icon-mobile',plain:true" system-tip-lang="toolbar.tip['ui-mobile']"><span system-lang="toolbar['ui-mobile']"></span></a>
+                                               <span class="button-split">|</span>
+-                                              <!-- 切换到原版 -->
+-                                              <a id="" href="javascript:location.href = 'index.original.html';" class="easyui-linkbutton" data-options="iconCls:'icon-transmission',plain:true" system-tip-lang="toolbar.tip['ui-original']"><span system-lang="toolbar['ui-original']"></span></a>
+-                                              <span class="button-split">|</span>
+                                               <!-- 关于 -->
+                                               <a id="toolbar_about" href="javascript:void(0);" onclick="javascript:system.openDialogFromTemplate({id: 'dialog-about',options: {title: system.lang.toolbar['about'],width: 420,height: 370}});" class="easyui-linkbutton" data-options="iconCls:'icon-about',plain:true" system-tip-lang="toolbar.about"><span system-lang="toolbar.about"></span></a>
+                                       </div>
+--- a/src/index.mobile.html
++++ b/src/index.mobile.html
+@@ -69,7 +69,6 @@
+                       <ul data-role="listview" data-divider-theme="a" data-theme="c" data-icon="false" style="margin-top:15px;">
+                               <li data-role='list-divider'>UI</li>
+                               <li><a href="#" onclick="location.href = 'index.html?devicetype=computer';"><img src="tr-web-control/style/images/computer.png" class="ui-li-icon"/><span system-lang="toolbar['ui-computer']"></span></a></li>
+-                              <li><a href="#" onclick="location.href = 'index.original.html';"><img src="tr-web-control/style/images/transmission.png" class="ui-li-icon"/><span system-lang="toolbar['ui-original']"></span></a></li>
+                       </ul>
+                       <ul data-role="listview" data-divider-theme="a" data-theme="c" data-icon="false" style="margin-top:15px;">
+                               <li data-role='list-divider'><span system-lang="title.status"></span></li>
index 87a6ed406ff1a32f6fe1fb8cbe58b1b3c7993ebf..bbe073e698ad20d8d49544ae8767e617007493f9 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=2.94
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
@@ -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
 
 
@@ -133,14 +134,12 @@ CONFIGURE_ARGS += \
        --without-systemd-daemon
 
 ifeq ($(BUILD_VARIANT),mbedtls)
-  CONFIGURE_ARGS += \
-       --with-crypto=polarssl
+  CONFIGURE_ARGS += --with-crypto=polarssl
   CONFIGURE_VARS += \
        MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
        MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
 else
-  CONFIGURE_ARGS += \
-       --with-crypto=openssl
+  CONFIGURE_ARGS += --with-crypto=openssl
 endif
 
 define Package/transmission-daemon-openssl/install
index 521fe20b83ed0bc95933ab9a5f9d781872003aea..2a25214a7d2e4ed8439097cbf7e130443b485dba 100644 (file)
@@ -65,9 +65,11 @@ transmission() {
        config_get nice "$cfg" nice 0
        config_get web_home "$cfg" 'web_home'
 
-       local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
+       local MEM
+
+       MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo)
        if test "$MEM" -gt 1;then
-               USE=$(expr $MEM \* $mem_percentage \* 10)
+               USE=$((MEM * mem_percentage * 10))
        fi
 
        config_file="$config_dir/settings.json"
@@ -78,7 +80,7 @@ transmission() {
                [ -z "$user" ] || chown -R "$user:$group" $config_dir
        }
 
-       [ "$config_overwrite" == 0 ] || {
+       [ "$config_overwrite" = 0 ] || {
 
                echo "{" > $config_file
 
diff --git a/net/transmission/patches/070-uClibc-ng-since-1.0.18-has-sys-quota.h-synced-with-G.patch b/net/transmission/patches/070-uClibc-ng-since-1.0.18-has-sys-quota.h-synced-with-G.patch
new file mode 100644 (file)
index 0000000..5dfd20f
--- /dev/null
@@ -0,0 +1,25 @@
+From e24f7c6653ec385c8af7eb6499d924994e78e42d Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Wed, 19 Oct 2016 19:33:35 +0200
+Subject: [PATCH] uClibc-ng since 1.0.18 has sys/quota.h synced with GNU libc
+
+---
+ libtransmission/platform-quota.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
+index e7d1f6d4f..bb1f9d9b9 100644
+--- a/libtransmission/platform-quota.c
++++ b/libtransmission/platform-quota.c
+@@ -285,7 +285,7 @@ getquota (const char * device)
+       spaceused = (int64_t) dq.dqb_curblocks >> 1;
+ #elif defined(__APPLE__)
+       spaceused = (int64_t) dq.dqb_curbytes;
+-#elif defined(__UCLIBC__)
++#elif defined (__UCLIBC__) && !TR_UCLIBC_CHECK_VERSION (1, 0, 18)
+       spaceused = (int64_t) btodb(dq.dqb_curblocks);
+ #elif defined(__sun) || (defined(_LINUX_QUOTA_VERSION) && _LINUX_QUOTA_VERSION < 2)
+       spaceused = (int64_t) dq.dqb_curblocks >> 1;
+-- 
+2.17.1
+
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 22c13051fb4c769bac3c523c8b741570bd742d68..3b48a4e8cc3b8466a357bcbc25c455f8dbae80ef 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.9.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.unbound.net/downloads
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 85c15c2f2cf7e83e08dfe2e486d1331c587df91f..f8912dfe617aa79eb42a84a59246cb4046717dc7 100644 (file)
   sub( /.*\//, "", cdr ) ;
   sub( /\/.*/, "", adr2 ) ;
   sub( /.*\//, "", cdr2 ) ;
+  gsub( /_/, "-", hst ) ;
 
 
   if ( hst !~ /^[[:alnum:]]([-[:alnum:]]*[[:alnum:]])?$/ ) {
     # that is not a valid host name (RFC1123)
+    # above replaced common error of "_" in host name with "-"
     hst = "-" ;
   }
 
@@ -48,7 +50,7 @@
     # TODO: this might be better with a substituion option,
     # or per DHCP pool do-not-DNS option, but its getting busy here.
     fqdn = net
-    fqdn = sub( /\./, "-", fqdn ) ;
+    gsub( /\./, "-", fqdn ) ;
     fqdn = tolower( hst "." fqdn "." domain ) ;
   }
 
@@ -86,6 +88,7 @@
 
       while ( ( cmd | getline adr ) > 0 ) {
         if (( substr( adr, 1, 5 ) <= "fdff:" ) \
+        && ( index( adr, "::/" ) != 0 ) \
         && ( index( adr, "anycast" ) == 0 ) \
         && ( index( adr, "via" ) == 0 )) {
           # GA or ULA routed addresses only (not LL or MC)
index 759616136f34faf3f4489261cd168efe3283db22..87b632952a57abe1cdc5564b0dbb644450296888 100644 (file)
@@ -112,10 +112,11 @@ bundle_all_networks() {
 
 bundle_lan_networks() {
   local cfg="$1"
-  local ifsubnet ifname ifdashname ignore
+  local interface ifsubnet ifname ifdashname ignore
 
   config_get_bool    ignore "$cfg" ignore 0
-  network_get_device ifname "$cfg"
+  config_get         interface "$cfg" interface ""
+  network_get_device ifname "$interface"
   ifdashname="${ifname//./-}"
 
 
index f57476eea32f805a0cbeacdb7466469538239922..06041f2b68a0441d0f658c2b9f5383288b8752cd 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uwsgi-cgi
 PKG_VERSION:=2.0.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL= \
        https://projects.unbit.it/downloads \
@@ -16,7 +16,6 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/feeds/packages/lang/python/python-package.mk
 
 define Package/uwsgi-cgi
   SECTION:=net
diff --git a/net/uwsgi-cgi/patches/010-uclibc-ng.patch b/net/uwsgi-cgi/patches/010-uclibc-ng.patch
new file mode 100644 (file)
index 0000000..e967320
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/core/uwsgi.c
++++ b/core/uwsgi.c
+@@ -1820,7 +1820,7 @@ void uwsgi_plugins_atexit(void) {
+ void uwsgi_backtrace(int depth) {
+-#if defined(__GLIBC__) || (defined(__APPLE__) && !defined(NO_EXECINFO)) || defined(UWSGI_HAS_EXECINFO)
++#if (!defined(__UCLIBC__) && defined(__GLIBC__)) || (defined(__APPLE__) && !defined(NO_EXECINFO)) || defined(UWSGI_HAS_EXECINFO)
+ #include <execinfo.h>
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..efc98059984a15a5ab674655070369754cb684a3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
 PKG_VERSION:=1.7.3
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://znc.in/releases \
@@ -37,7 +37,7 @@ endef
 
 define Package/znc
   $(Package/znc/default)
-  DEPENDS:=+libopenssl +libpthread +libstdcpp +ZNC_ICU:icu +zlib
+  DEPENDS:=+libopenssl +libstdcpp +ZNC_ICU:icu +zlib
   MENU:=1
 endef
 
@@ -279,12 +279,6 @@ PKG_CONFIG_DEPENDS += $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES))
 
 include $(INCLUDE_DIR)/package.mk
 
-CONFIGURE_VARS += \
-       CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin" \
-       CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
-       LDFLAGS="-nodefaultlibs -lc -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
-       LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc"
-
 CONFIGURE_ARGS += \
        $(if $(CONFIG_ZNC_ICU), --enable-charset, --disable-charset) \
        --disable-cyrus \
@@ -299,11 +293,6 @@ CONFIGURE_ARGS += \
        --enable-tdns \
        --enable-zlib
 
-define Build/Configure
-       $(call Build/Configure/Default,)
-       $(call libtool_disable_rpath)
-endef
-
 define Build/Compile
        $(call Build/Compile/Default,znc)
        +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/modules \
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..232225e45adb4a494969463252e9ad5b37339a47 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=5.8.1
-PKG_RELEASE:=3
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://collectd.org/files/ \
@@ -53,7 +53,6 @@ COLLECTD_PLUGINS_DISABLED:= \
        ipvs \
        java \
        log_logstash \
-       lua \
        lvm \
        lpar \
        madwifi \
@@ -138,6 +137,7 @@ COLLECTD_PLUGINS_SELECTED:= \
        iwinfo \
        load \
        logfile \
+       lua \
        match_empty_counter \
        match_hashed \
        match_regex \
@@ -196,7 +196,12 @@ endef
 
 define Package/collectd
 $(call Package/collectd/Default)
-  DEPENDS:= +libpthread +zlib +libltdl +libip4tc
+  DEPENDS:= +libpthread \
+         +zlib \
+         +libltdl \
+         +libip4tc \
+         +jshn \
+         +PACKAGE_collectd-mod-lua:liblua
   MENU:=1
 endef
 
@@ -226,7 +231,12 @@ CONFIGURE_ARGS+= \
 CONFIGURE_VARS+= \
        CFLAGS="$$$$CFLAGS $(FPIC)" \
        LDFLAGS="$$$$LDFLAGS -lm -lz" \
-       KERNEL_DIR="$(LINUX_DIR)" \
+       KERNEL_DIR="$(LINUX_DIR)"
+
+ifneq ($(CONFIG_PACKAGE_collectd-mod-lua),)
+CONFIGURE_VARS+= \
+       LDFLAGS="$$$$LDFLAGS -llua"
+endif
 
 ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),)
 CONFIGURE_ARGS+= \
@@ -289,18 +299,21 @@ endif
 
 define Package/collectd/conffiles
 /etc/collectd.conf
+/etc/config/collectd
 endef
 
 define Package/collectd/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/
+
        $(INSTALL_DIR) $(1)/usr/share/collectd
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/collectd/types.db $(1)/usr/share/collectd/
-       $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/collectd.conf $(1)/etc/
+
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/collectd.init $(1)/etc/init.d/collectd
-       $(INSTALL_DIR) $(1)/etc/collectd/conf.d
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) files/collectd.uci $(1)/etc/config/collectd
 endef
 
 # 1: plugin name
@@ -324,6 +337,11 @@ define BuildPlugin
                        $(PKG_INSTALL_DIR)/usr/lib/collectd/$$$$$$$${m}.so \
                        $$(1)/usr/lib/collectd/ ; \
        done
+       if [ -f ./files/usr/share/collectd/plugin/$(1).json ]; then \
+               $(INSTALL_DIR) $$(1)/usr/share/collectd/plugin ; \
+               $(INSTALL_DATA) ./files/usr/share/collectd/plugin/$(1).json \
+                       $$(1)/usr/share/collectd/plugin/$(1).json ; \
+       fi
   endef
 
   $$(eval $$(call BuildPackage,collectd-mod-$(1)))
@@ -360,6 +378,7 @@ $(eval $(call BuildPlugin,irq,interrupt usage input,irq,))
 $(eval $(call BuildPlugin,iwinfo,libiwinfo wireless statistics,iwinfo,+PACKAGE_collectd-mod-iwinfo:libiwinfo))
 $(eval $(call BuildPlugin,load,system load input,load,))
 $(eval $(call BuildPlugin,logfile,log files output,logfile,))
+$(eval $(call BuildPlugin,lua,lua input/output,lua,+PACKAGE_collectd-mod-lua:liblua))
 $(eval $(call BuildPlugin,match-empty-counter,empty-counter match,match_empty_counter,))
 $(eval $(call BuildPlugin,match-hashed,hashed match,match_hashed,))
 $(eval $(call BuildPlugin,match-regex,regex match,match_regex,))
diff --git a/utils/collectd/files/collectd.conf b/utils/collectd/files/collectd.conf
deleted file mode 100644 (file)
index 3afbfad..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# Config file for collectd. More info: https://collectd.org/
-# Note: Luci statistics will generate a new config and overwrite this file.
-
-#Hostname   "localhost"
-#FQDNLookup  true
-BaseDir "/var/run/collectd"
-Include "/etc/collectd/conf.d"
-PIDFile "/var/run/collectd.pid"
-PluginDir "/usr/lib/collectd"
-TypesDB "/usr/share/collectd/types.db"
-Interval    30
-ReadThreads 2
-
-LoadPlugin interface
-LoadPlugin load
-#LoadPlugin ping
-LoadPlugin rrdtool
-
-<Plugin rrdtool>
-       DataDir "/tmp/rrd"
-       RRARows 100
-       RRASingle true
-       RRATimespan 3600
-       RRATimespan 86400
-       RRATimespan 604800
-       RRATimespan 2678400
-       RRATimespan 31622400
-</Plugin>
-
-<Plugin interface>
-       IgnoreSelected false
-       Interface "br-lan"
-</Plugin>
-
-#<Plugin ping>
-#      Host "host.foo.bar"
-#      Interval 30
-#      TTL 127
-#</Plugin>
index 668858b90266c24f97c4109ce7aab908eb782632..a0029267a7aafc6acd70213e114cdce2e06c7a1a 100644 (file)
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2016 OpenWrt.org
 
+. "/usr/share/libubox/jshn.sh"
+
 START=80
 STOP=10
 
 USE_PROCD=1
+COLLECTD_CONF="/tmp/collectd.conf"
+LOG="logger -t collectd[$$] -p"
 NICEPRIO=5
 
+CONFIG_STRING=""
+
+process_exec() {
+       printf "<Plugin exec>\n" >> "$COLLECTD_CONF"
+       config_foreach process_exec_sections exec_input "Exec"
+       config_foreach process_exec_sections exec_notify "NotificationExec"
+       printf "</Plugin>\n\n" >> "$COLLECTD_CONF"
+}
+
+process_exec_sections() {
+       local cfg="$1"
+       local section="$2"
+
+       local cmdline cmduser cmdgroup
+
+       config_get cmdline "$cfg" cmdline
+       [ -z "$cmdline" ] && {
+               $LOG notice "No cmdline option in config $cfg defined"
+               return 0
+       }
+
+       config_get cmduser "$cfg" cmduser
+       [ -z "$cmduser" ] && {
+               $LOG notice "No cmduser option in config $cfg defined"
+               return 0
+       }
+
+       config_get cmdgroup "$cfg" cmdgroup
+       if [ -z "$cmdgroup" ]; then
+               printf "\\t%s \"%s\" \"%s\"\n" "${section}" "${cmduser}" "${cmdline}" >> "$COLLECTD_CONF"
+       else
+               printf "\\t%s \"%s:%s\" \"%s\"\n" "${section}" "${cmduser}" "${cmdgroup}" "${cmdline}" >> "$COLLECTD_CONF"
+       fi
+}
+
+CONFIG_LIST=""
+add_list_option() {
+       local value="$1"
+       local option="$2"
+       local indent="$3"
+
+       CONFIG_LIST="${CONFIG_LIST}${indent}${option} \"$value\"\n"
+}
+
+process_generic() {
+       local cfg="$1"
+       local indent="$2"
+       local json="$3"
+
+       local config=""
+
+       json_init
+       json_load_file "$json"
+
+       json_select string 1>/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               json_get_keys keys
+               for key in ${keys}; do
+                       json_get_var option "$key"
+                       config_get value "$cfg" "$option" ""
+                       [ -z "$value" ] || {
+                               config="${config}${indent}${option} \"${value}\"\n"
+                       }
+               done
+               json_select ..
+       fi
+
+       json_select bool 1>/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               json_get_keys keys
+               for key in ${keys}; do
+                       json_get_var option "$key"
+                       config_get_bool value "$cfg" "$option"
+                       if [ "$value" = "0" ]; then
+                               config="${config}${indent}${option} false\n"
+                       fi
+
+                       if [ "$value" = "1" ]; then
+                               config="${config}${indent}${option} true\n"
+                       fi
+               done
+               json_select ..
+       fi
+
+       json_select list 1>/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               json_get_keys keys
+               for key in ${keys}; do
+                       json_get_var option "$key"
+                       CONFIG_LIST=""
+                       config_list_foreach "$cfg" "$option" add_list_option "$option" "$indent"
+                       config="${config}${CONFIG_LIST}"
+               done
+               json_select ..
+       fi
+
+       [ -z "$config" ] || {
+               printf "%s<Plugin %s>\n" "${CONFIG_STRING}" "$cfg" >> "$COLLECTD_CONF"
+               echo -e "${config}" >> "$COLLECTD_CONF"
+               printf "%s</Plugin>\n" "${CONFIG_STRING}" >> "$COLLECTD_CONF"
+       }
+
+       printf "\n" >> "$COLLECTD_CONF"
+}
+
+process_plugins() {
+       local cfg="$1"
+
+       local enable keys key option value
+
+       config_get enable "$cfg" enable 0
+       [ "$enable" = "1" ] || return 0
+
+       [ -f "/usr/lib/collectd/$cfg.so" ] || {
+               $LOG notice "Plugin collectd-mod-$cfg not installed"
+               return 0
+       }
+
+       [ -f "/usr/share/collectd/plugin/$cfg.json" ] || {
+               $LOG notice "Configuration definition file for $cfg not found"
+               return 0
+       }
+
+       printf "LoadPlugin %s\n" "$cfg" >> "$COLLECTD_CONF"
+       case "$cfg" in
+               exec)
+                       CONFIG_STRING=""
+                       process_exec
+                       ;;
+               *)
+                       CONFIG_STRING=""
+                       process_generic "$cfg" "\\t" "/usr/share/collectd/plugin/$cfg.json"
+               ;;
+       esac
+}
+
+process_config() {
+       local alt_config_file BaseDir Include PIDFile PluginDir TypesDB
+       local Interval ReadThreads Hostname
+
+       rm -f "$COLLECTD_CONF"
+
+       [ -f /etc/config/collectd ] || {
+               $LOG notice "UCI config not found"
+               return 0
+       }
+       config_load collectd
+       config_get alt_config_file globals alt_config_file
+
+       # If "alt_config_file" specified, use that instead
+       [ -n "$alt_config_file" ] && [ -f "$alt_config_file" ] && {
+               rm -f "$COLLECTD_CONF"
+               ln -s "$alt_config_file" "$COLLECTD_CONF"
+               return 0
+       }
+
+       # GOBAL CONFIG
+       config_get BaseDir globals BaseDir "/var/run/collectd"
+       printf "BaseDir \"%s\"\n" "$BaseDir" >> "$COLLECTD_CONF"
+
+       config_get Include globals Include "/tmp/collectd.d"
+       printf "Include \"%s\"\n" "$Include" >> "$COLLECTD_CONF"
+       mkdir -p "$Include"
+
+       config_get PIDFile globals PIDFile "/var/run/collectd.pid"
+       printf "PIDFile \"%s\"\n" "$PIDFile" >> "$COLLECTD_CONF"
+
+       config_get PluginDir globals PluginDir "/usr/lib/collectd"
+       printf "PluginDir \"%s\"\n" "$PluginDir" >> "$COLLECTD_CONF"
+
+       config_get TypesDB globals TypesDB "/usr/share/collectd/types.db"
+       printf "TypesDB \"%s\"\n" "$TypesDB" >> "$COLLECTD_CONF"
+
+       config_get Interval globals Interval 30
+       printf "Interval \"%s\"\n" "$Interval" >> "$COLLECTD_CONF"
+
+       config_get ReadThreads globals ReadThreads 2
+       printf "ReadThreads \"%s\"\n" "$ReadThreads" >> "$COLLECTD_CONF"
+
+       config_get Hostname globals Hostname "$(hostname)"
+       printf "Hostname \"%s\"\n" "$Hostname" >> "$COLLECTD_CONF"
+
+       printf "\n" >> "$COLLECTD_CONF"
+
+       # PLUGIN CONFIG
+       config_foreach process_plugins plugin
+}
+
 start_service() {
-       mkdir -m 0755 -p /var/lib/collectd
        procd_open_instance
-       procd_set_param command /usr/sbin/collectd -f
+       procd_set_param command /usr/sbin/collectd
+       procd_append_param command -C "$COLLECTD_CONF"
+       procd_append_param command -f # don't daemonize, procd will handle that for us
        procd_set_param nice "$NICEPRIO"
+
+       process_config
+
+       # set auto respawn behavior
+       procd_set_param respawn
        procd_close_instance
 }
 
diff --git a/utils/collectd/files/collectd.uci b/utils/collectd/files/collectd.uci
new file mode 100644 (file)
index 0000000..73e2c2a
--- /dev/null
@@ -0,0 +1,160 @@
+config globals 'globals'
+       option alt_config_file "/etc/collectd.conf"
+#      option BaseDir '/var/run/collectd'
+#      option Include '/tmp/collectd.d'
+#      option PIDFile '/var/run/collectd.pid'
+#      option PluginDir '/usr/lib/collectd'
+#      option TypesDB '/usr/share/collectd/types.db'
+#      option Interval '30'
+#      option ReadThreads '2'
+
+#config plugin 'conntrack'
+#      option enable '0'
+
+#config plugin 'contextswitch'
+#      option enable '0'
+
+#config plugin 'cpu'
+#      option enable '0'
+
+#config plugin 'cpufreq'
+#      option enable '0'
+
+#config plugin 'csv'
+#      option enable '0'
+#      option StoreRates '0'
+#      option DataDir '/tmp'
+
+#config plugin 'df'
+#      option enable '0'
+#      list Device '/dev/mtdblock/4'
+#      list MountPoint '/jffs'
+#      list FSType 'tmpfs'
+#      option IgnoreSelected '0'
+
+#config plugin 'disk'
+#      option enable '0'
+#      list Disk 'hda1'
+#      list Disk 'hdb'
+#      option IgnoreSelected '0'
+
+#config plugin 'dns'
+#      option enable '0'
+#      list Interface 'br-lan'
+#      list IgnoreSource '127.0.0.1'
+
+#config plugin 'email'
+#      option enable '0'
+#      option SocketFile '/var/run/collectd/email.sock'
+#      option SocketGroup 'nogroup'
+
+#config plugin 'entropy'
+#      option enable '0'
+
+#config plugin 'exec'
+#      option enable '0'
+
+#config exec_input
+#      option cmdline '/usr/bin/stat-dhcpusers'
+#      option cmduser 'nobody'
+#      option cmdgroup 'nogroup'
+
+#config exec_notify
+#      option cmdline '/usr/bin/stat-dhcpusers'
+#      option cmduser 'nobody'
+#      option cmdgroup 'nogroup'
+
+#config plugin 'interface'
+#      option enable '1'
+#      list Interface 'br-lan'
+#      option IgnoreSelected '0'
+
+#config plugin 'irq'
+#      option enable '0'
+#      list Irq '2'
+#      list Irq '3'
+#      list Irq '4'
+#      list Irq '7'
+
+#config plugin 'iwinfo'
+#      option enable '0'
+
+#config plugin 'load'
+#      option enable '0'
+
+#config plugin 'lua'
+#      option BasePath '/usr/share/collectd-mod-lua'
+#      list Script 'script1.lua'
+#      list Script 'script2.lua
+
+#config plugin 'memory'
+#      option enable '0'
+
+#config plugin 'netlink'
+#      option enable '0'
+#      option IgnoreSelected '0'
+#      list VerboseInterface 'br-lan'
+#      list QDisc 'br-lan'
+
+#config plugin 'nut'
+#      option enable '0'
+#      option UPS 'myupsname'
+
+#config plugin 'olsrd'
+#      option enable '0'
+#      option Port '2006'
+#      option Host '127.0.0.1'
+
+#config plugin 'openvpn'
+#      option enable '0'
+#      option StatusFile '/var/run/openvpn/openvpn.status'
+#      option CollectIndividualUsers '1'
+#      optoin CollectUserCount '1'
+#      optoin CollectCompression '1'
+#      option ImprovedNamingSchema '0'
+
+#config plugin 'ping'
+#      option enable '0'
+#      option TTL '127'
+#      option Interval '30'
+#      list Host '127.0.0.1'
+
+#config plugin 'processes'
+#      option enable '0'
+#      list Process 'uhttpd'
+#      list Process 'dnsmasq'
+#      list Process 'dropbear'
+
+#config plugin 'rrdtool'
+#      option enable '0'
+#      option DataDir '/tmp/rrd'
+#      option RRARows '100'
+#      option RRASingle '1'
+#      list RRATimespan '3600'
+#      list RRATimespan '86400'
+#      list RRATimespan '604800'
+#      list RRATimespan '2678400'
+#      list RRATimespan '31622400'
+
+#config plugin 'sensors'
+#      option enable '0'
+
+#config plugin 'tcpconns'
+#      option enable '0'
+#      list ListeningPort '0'
+#      list LocalPort '22'
+#      list LocalPort '80'
+
+#config plugin 'thermal'
+#      option enable '0'
+#      option IgnoreSelected '0'
+#      list Device ''
+
+#config plugin 'unixsock'
+#      option enable '0'
+#      option SocketFile '/var/run/collectd/query.sock'
+#      option SocketGroup 'nogroup'
+
+#config plugin 'uptime'
+#      option enable '0'
+
diff --git a/utils/collectd/files/usr/share/collectd/plugin/conntrack.json b/utils/collectd/files/usr/share/collectd/plugin/conntrack.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/contextswitch.json b/utils/collectd/files/usr/share/collectd/plugin/contextswitch.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/cpu.json b/utils/collectd/files/usr/share/collectd/plugin/cpu.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/cpufreq.json b/utils/collectd/files/usr/share/collectd/plugin/cpufreq.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/csv.json b/utils/collectd/files/usr/share/collectd/plugin/csv.json
new file mode 100644 (file)
index 0000000..3e89972
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "string": [
+               "DataDir"
+       ],
+       "bool": [
+               "StoreRates"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/df.json b/utils/collectd/files/usr/share/collectd/plugin/df.json
new file mode 100644 (file)
index 0000000..dde65fd
--- /dev/null
@@ -0,0 +1,10 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Device",
+               "MountPoint",
+               "FSType"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/disk.json b/utils/collectd/files/usr/share/collectd/plugin/disk.json
new file mode 100644 (file)
index 0000000..e7b9214
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Disk"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/dns.json b/utils/collectd/files/usr/share/collectd/plugin/dns.json
new file mode 100644 (file)
index 0000000..c9dacf1
--- /dev/null
@@ -0,0 +1,6 @@
+{
+       "list": [
+               "Interface",
+               "IgnoreSource"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/email.json b/utils/collectd/files/usr/share/collectd/plugin/email.json
new file mode 100644 (file)
index 0000000..eb6b3ef
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "string": [
+               "SocketFile",
+               "SocketGroup",
+               "SocketPerms",
+               "MaxConns"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/entropy.json b/utils/collectd/files/usr/share/collectd/plugin/entropy.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/exec.json b/utils/collectd/files/usr/share/collectd/plugin/exec.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/interface.json b/utils/collectd/files/usr/share/collectd/plugin/interface.json
new file mode 100644 (file)
index 0000000..aef2522
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Interface"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/irq.json b/utils/collectd/files/usr/share/collectd/plugin/irq.json
new file mode 100644 (file)
index 0000000..0f7e59c
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Irq"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/iwinfo.json b/utils/collectd/files/usr/share/collectd/plugin/iwinfo.json
new file mode 100644 (file)
index 0000000..aef2522
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Interface"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/load.json b/utils/collectd/files/usr/share/collectd/plugin/load.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/lua.json b/utils/collectd/files/usr/share/collectd/plugin/lua.json
new file mode 100644 (file)
index 0000000..2bc7b68
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "string": [
+               "BasePath"
+       ],
+       "list": [
+               "Script"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/memory.json b/utils/collectd/files/usr/share/collectd/plugin/memory.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/netlink.json b/utils/collectd/files/usr/share/collectd/plugin/netlink.json
new file mode 100644 (file)
index 0000000..7ef7b77
--- /dev/null
@@ -0,0 +1,12 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Interface",
+               "VerboseInterface",
+               "QDisc",
+               "Classe",
+               "Filter"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/nut.json b/utils/collectd/files/usr/share/collectd/plugin/nut.json
new file mode 100644 (file)
index 0000000..4cac99f
--- /dev/null
@@ -0,0 +1,5 @@
+{
+       "string": [
+               "UPS"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/olsrd.json b/utils/collectd/files/usr/share/collectd/plugin/olsrd.json
new file mode 100644 (file)
index 0000000..04c0438
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "string": [
+               "Host",
+               "Port",
+               "CollectLinks",
+               "CollectRoutes",
+               "CollectTopology"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/openvpn.json b/utils/collectd/files/usr/share/collectd/plugin/openvpn.json
new file mode 100644 (file)
index 0000000..87a3f16
--- /dev/null
@@ -0,0 +1,11 @@
+{
+       "string": [
+               "StatusFile"
+       ],
+       "bool": [
+               "CollectIndividualUsers",
+               "CollectUserCount",
+               "CollectCompression",
+               "ImprovedNamingSchema"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/ping.json b/utils/collectd/files/usr/share/collectd/plugin/ping.json
new file mode 100644 (file)
index 0000000..53bc88c
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "string": [
+               "TTL",
+               "Interval"
+       ],
+       "list": [
+               "Host"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/processes.json b/utils/collectd/files/usr/share/collectd/plugin/processes.json
new file mode 100644 (file)
index 0000000..6e38fa9
--- /dev/null
@@ -0,0 +1,5 @@
+{
+       "list": [
+               "Process"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/rrdtool.json b/utils/collectd/files/usr/share/collectd/plugin/rrdtool.json
new file mode 100644 (file)
index 0000000..339f6ac
--- /dev/null
@@ -0,0 +1,17 @@
+{
+       "string": [
+               "DataDir",
+               "StepSize",
+               "HeartBeat",
+               "RRARows",
+               "XFF",
+               "CacheFlush",
+               "CacheTimeout"
+       ],
+       "bool": [
+               "RRASingle"
+       ],
+       "list": [
+               "RRATimespan"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/sensors.json b/utils/collectd/files/usr/share/collectd/plugin/sensors.json
new file mode 100644 (file)
index 0000000..35915ba
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Sensor"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/tcpconns.json b/utils/collectd/files/usr/share/collectd/plugin/tcpconns.json
new file mode 100644 (file)
index 0000000..56a4c81
--- /dev/null
@@ -0,0 +1,9 @@
+{
+       "bool": [
+               "ListeningPorts"
+       ],
+       "list": [
+               "LocalPort",
+               "RemotePort"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/thermal.json b/utils/collectd/files/usr/share/collectd/plugin/thermal.json
new file mode 100644 (file)
index 0000000..cf93fc2
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "bool": [
+               "IgnoreSelected"
+       ],
+       "list": [
+               "Device"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/unixsock.json b/utils/collectd/files/usr/share/collectd/plugin/unixsock.json
new file mode 100644 (file)
index 0000000..6362a9d
--- /dev/null
@@ -0,0 +1,7 @@
+{
+       "string": [
+               "SocketFile",
+               "SocketGroup",
+               "SocketPerms"
+       ]
+}
diff --git a/utils/collectd/files/usr/share/collectd/plugin/uptime.json b/utils/collectd/files/usr/share/collectd/plugin/uptime.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
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. */
diff --git a/utils/collectd/patches/930-fix-lua-callback-registration.patch b/utils/collectd/patches/930-fix-lua-callback-registration.patch
new file mode 100644 (file)
index 0000000..bffe656
--- /dev/null
@@ -0,0 +1,42 @@
+--- a/src/lua.c
++++ b/src/lua.c
+@@ -281,9 +281,6 @@ static int lua_cb_register_read(lua_Stat
+   luaL_checktype(L, 1, LUA_TFUNCTION);
+-  char function_name[DATA_MAX_NAME_LEN];
+-  snprintf(function_name, sizeof(function_name), "lua/%s", lua_tostring(L, 1));
+-
+   int callback_id = clua_store_callback(L, 1);
+   if (callback_id < 0)
+     return luaL_error(L, "%s", "Storing callback function failed");
+@@ -298,6 +295,9 @@ static int lua_cb_register_read(lua_Stat
+   if (cb == NULL)
+     return luaL_error(L, "%s", "calloc failed");
++  char function_name[DATA_MAX_NAME_LEN];
++  snprintf(function_name, sizeof(function_name), "lua/%p", thread);
++
+   cb->lua_state = thread;
+   cb->callback_id = callback_id;
+   cb->lua_function_name = strdup(function_name);
+@@ -325,9 +325,6 @@ static int lua_cb_register_write(lua_Sta
+   luaL_checktype(L, 1, LUA_TFUNCTION);
+-  char function_name[DATA_MAX_NAME_LEN] = "";
+-  snprintf(function_name, sizeof(function_name), "lua/%s", lua_tostring(L, 1));
+-
+   int callback_id = clua_store_callback(L, 1);
+   if (callback_id < 0)
+     return luaL_error(L, "%s", "Storing callback function failed");
+@@ -342,6 +339,9 @@ static int lua_cb_register_write(lua_Sta
+   if (cb == NULL)
+     return luaL_error(L, "%s", "calloc failed");
++  char function_name[DATA_MAX_NAME_LEN] = "";
++  snprintf(function_name, sizeof(function_name), "lua/%p", thread);
++
+   cb->lua_state = thread;
+   cb->callback_id = callback_id;
+   cb->lua_function_name = strdup(function_name);
index 8a88c3ddbfdf920f2c88b802df48d653c24e2ddf..cc9c5796838ab5d27d37dc5d0ca8dcbe5e115c86 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:=4
 
 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
diff --git a/utils/device-observatory/patches/010-uClibc-ng.patch b/utils/device-observatory/patches/010-uClibc-ng.patch
new file mode 100644 (file)
index 0000000..077a971
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/src/parse_ether.c
++++ b/src/parse_ether.c
+@@ -21,10 +21,18 @@
+ #include "parse_ether.h"
+ /* tcpdump header (ether.h) defines ETHER_HDRLEN) */
+-#ifndef ETHER_HDRLEN 
++#ifndef ETHER_HDRLEN
+ #define ETHER_HDRLEN 14
+ #endif
++/* uClibc-ng compatibility */
++#ifndef IPPROTO_BEETPH
++#define IPPROTO_BEETPH        94
++#endif
++
++#ifndef IPPROTO_MPLS
++#define IPPROTO_MPLS  137
++#endif
+ const char *ip_protcol_str(int p)
+ {
index b91e1dd67e9e745dabcf109673ce2be0f23cb14a..1fee52fe7079fc8afc07d2d45a22b78950753700 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION_MAJOR:=4
 PKG_VERSION_PATCH:=9700
 PKG_COMMIT:=
 PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 ifeq ($(PKG_COMMIT),)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/utils/domoticz/patches/010-boost-170-fix.patch b/utils/domoticz/patches/010-boost-170-fix.patch
new file mode 100644 (file)
index 0000000..4d2bd8a
--- /dev/null
@@ -0,0 +1,71 @@
+From 9d226dab339f5767ec01ea1bcc9043ceee185cca Mon Sep 17 00:00:00 2001
+From: Rob Peters <info@domoticz.com>
+Date: Mon, 25 Mar 2019 08:50:23 +0100
+Subject: [PATCH] Fix for boot 1.70 get_io_service, fixed #3117
+
+---
+ hardware/Pinger.cpp                   | 10 ++++++++--
+ hardware/TCPProxy/tcpproxy_server.cpp |  8 +++++++-
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/hardware/Pinger.cpp b/hardware/Pinger.cpp
+index 01a955ba4..184378738 100644
+--- a/hardware/Pinger.cpp
++++ b/hardware/Pinger.cpp
+@@ -18,6 +18,12 @@
+ #include <iostream>
++#if BOOST_VERSION >= 107000
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
++#else
++#define GET_IO_SERVICE(s) ((s).get_io_service())
++#endif
++
+ class pinger
+       : private domoticz::noncopyable
+ {
+@@ -76,7 +82,7 @@ class pinger
+                               num_tries_++;
+                               if (num_tries_ > 4)
+                               {
+-                                      resolver_.get_io_service().stop();
++                                      GET_IO_SERVICE(resolver_).stop();
+                               }
+                               else
+                               {
+@@ -118,7 +124,7 @@ class pinger
+                       if (num_replies_++ == 0)
+                               timer_.cancel();
+                       m_PingState = true;
+-                      resolver_.get_io_service().stop();
++                      GET_IO_SERVICE(resolver_).stop();
+               }
+               else
+               {
+diff --git a/hardware/TCPProxy/tcpproxy_server.cpp b/hardware/TCPProxy/tcpproxy_server.cpp
+index fddac08de..60445d9c2 100644
+--- a/hardware/TCPProxy/tcpproxy_server.cpp
++++ b/hardware/TCPProxy/tcpproxy_server.cpp
+@@ -15,6 +15,12 @@
+ #include "stdafx.h"
+ #include "tcpproxy_server.h"
++#if BOOST_VERSION >= 107000
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
++#else
++#define GET_IO_SERVICE(s) ((s).get_io_service())
++#endif
++
+ namespace tcp_proxy
+ {
+       bridge::bridge(boost::asio::io_service& ios)
+@@ -38,7 +44,7 @@ namespace tcp_proxy
+               boost::asio::ip::tcp::endpoint end;
+-              boost::asio::io_service &ios=downstream_socket_.get_io_service();
++              boost::asio::io_service &ios= GET_IO_SERVICE(downstream_socket_);
+               boost::asio::ip::tcp::resolver resolver(ios);
+               boost::asio::ip::tcp::resolver::query query(upstream_host, upstream_port, boost::asio::ip::resolver_query_base::numeric_service);
+               boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query);
index 55dca989c4b9b2f41a25931f3bff1b47ab35988f..707d684267ebb3a387e814567f6fe4546d8a0929 100644 (file)
@@ -8,18 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flent-tools
-PKG_VERSION:=1.0.1
-PKG_LICENSE:=GPLv3
+PKG_VERSION:=1.2.2
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
-PKG_MIRROR_HASH:=0c4a99179a76e8479bdc7d91c312de7fc9e6d4d54132d1b2aba836138c86440c
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/tohojo/flent
-PKG_REV:=03c72cc340def354024351b6500774b11170d5ba
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/tohojo/flent/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=554bb1b5329cd39113cbb34445765ca6868dbf033aa64832d957d4a09d56adc7
+PKG_BUILD_DIR:=$(BUILD_DIR)/flent-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-3.0-only
+PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/flent-tools
   SECTION:=utils
index d684c7e3e7b26b50dd2dabf67e6204f9f02114b4..fc13e36a9779894d39d021ad0a42a3735f184f15 100644 (file)
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gawk
-PKG_VERSION:=4.2.1
+PKG_VERSION:=5.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gawk
 
-PKG_HASH:=d1119785e746d46a8209d28b2de404a57f983aa48670f4e225531d3bdc175551
+PKG_HASH:=50f091ed0eb485ad87dbb620d773a3e2c31a27f75f5e008f7bf065055f024406
 
 PKG_LICENSE:=GPL
 PKG_LICENSE_FILES:=COPYING
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
 }
diff --git a/utils/hashdeep/Makefile b/utils/hashdeep/Makefile
new file mode 100644 (file)
index 0000000..f697e08
--- /dev/null
@@ -0,0 +1,45 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hashdeep
+PKG_VERSION:=4.4
+PKG_RELEASE:=1
+PKG_MAINTAINER=Tobe Deprez <trldp@outlook.com>
+PKG_LICENSE:=NLPL
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/jessek/hashdeep/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=ad78d42142f9a74fe8ec0c61bc78d6588a528cbb9aede9440f50b6ff477f3a7f
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hashdeep
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Recursively compute hashsums or piecewise hashings
+  URL:=http://md5deep.sourceforge.net/
+  DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/hashdeep/description
+       hashdeep is a set of tools to compute MD5, SHA1, SHA256, tiger
+       and whirlpool hashsums of arbitrary number of files recursively.
+endef
+
+define Package/hashdeep/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hashdeep \
+                   $(PKG_INSTALL_DIR)/usr/bin/md5deep \
+                   $(PKG_INSTALL_DIR)/usr/bin/sha1deep \
+                   $(PKG_INSTALL_DIR)/usr/bin/sha256deep \
+                   $(PKG_INSTALL_DIR)/usr/bin/tigerdeep \
+                   $(PKG_INSTALL_DIR)/usr/bin/whirlpooldeep \
+                   $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,hashdeep))
+
index 9300fbc0a79a5ebf3ea7b07553422d73b097c515..e5184280e9fa1b512a8f686de32e656a982a78e0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hfsprogs
 PKG_VERSION:=332.25
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
diff --git a/utils/hfsprogs/patches/010-valloc-to-memalign.patch b/utils/hfsprogs/patches/010-valloc-to-memalign.patch
new file mode 100644 (file)
index 0000000..c391e1d
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/newfs_hfs.tproj/makehfs.c
++++ b/newfs_hfs.tproj/makehfs.c
+@@ -376,7 +376,7 @@ make_hfsplus(const DriveInfo *driveInfo, hfsparams_t *defaults)
+       if ( (temp & 0x01FF) != 0 )
+               temp = (temp + kBytesPerSector) & 0xFFFFFE00;
+       
+-      nodeBuffer = valloc((size_t)temp);
++      (void)posix_memalign(&nodeBuffer, sysconf(_SC_PAGESIZE), (size_t)temp);
+       if (nodeBuffer == NULL)
+               err(1, NULL);
+@@ -1814,7 +1814,7 @@ ClearDisk(const DriveInfo *driveInfo, UInt64 startingSector, UInt32 numberOfSect
+       bufferSize = bufferSizeInSectors << kLog2SectorSize;
+-      tempBuffer = valloc((size_t)bufferSize);
++      (void)posix_memalign(&tempBuffer, sysconf(_SC_PAGESIZE), (size_t)bufferSize);
+       if (tempBuffer == NULL)
+               err(1, NULL);
index 41d0cc63c4250554a6a64e688971f5eb251f531c..e3e8054bd73c6140bd8eb4f74a169f60684a7830 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hplip
-PKG_VERSION:=3.18.12
+PKG_VERSION:=3.19.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/hplip
-PKG_HASH:=3ba5278d5fcaf83ecd04d16850f2f24c43c78c1189c15ae32cae756360c2fabd
+PKG_HASH:=a04edf0b5b4c4dcaa3998a27caad8f24513340e0aea61b694397c7807d7c2ae6
 
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=GPL-2.0 GPL-2.0+
diff --git a/utils/hplip/patches/040-fix_bool.patch b/utils/hplip/patches/040-fix_bool.patch
deleted file mode 100644 (file)
index eab984e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.launchpad.net/hplip/+bug/1778626
-
---- a/prnt/hpcups/genPCLm.cpp
-+++ b/prnt/hpcups/genPCLm.cpp
-@@ -171,7 +171,7 @@ Defines
- #define rgb_2_gray(r,g,b) (ubyte)(0.299*(double)r+0.587*(double)g+0.114*(double)b)
- // Note: this is required for debugging
--boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
-+bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name);
- /* 
- ********************************************* Helper Routines **************************
-@@ -343,7 +343,7 @@ bool PCLmGenerator::addKids(sint32 kidObj)
-       return(true);
- }
--boolean writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
-+bool writeOutputFile(int numBytes, ubyte *ptr, char *user_name)
- {
-       FILE *outputFile;
-       char outFileName[MAX_FILE_PATH_LEN];
-@@ -1074,7 +1074,7 @@ void PCLmGenerator::writePDFGrammarPage(int imageWidth, int imageHeight, int num
- * Limitations:
- *   - 
- *****************************************************************************************/
--boolean prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
-+bool prepImageForBacksideDuplex(ubyte *imagePtr, sint32 imageHeight, sint32 imageWidth, sint32 numComponents)
- {
-       sint32 numBytes=imageHeight*imageWidth*numComponents;
-       ubyte *head, *tail, t0, t1, t2; 
diff --git a/utils/hplip/patches/060-fix-uclibc.patch b/utils/hplip/patches/060-fix-uclibc.patch
new file mode 100644 (file)
index 0000000..d941d83
--- /dev/null
@@ -0,0 +1,15 @@
+Fix missing definition of uint64_t while compiling
+under uclibc
+
+https://bugs.launchpad.net/hplip/+bug/1826965
+
+--- a/scan/sane/OrbliteScan/LinuxCommon.h
++++ b/scan/sane/OrbliteScan/LinuxCommon.h
+@@ -2,6 +2,7 @@
+ #define H_LinuxCommon\r
\r
+ #include <sys/types.h>\r
++#include <stdint.h>\r
\r
+ /* Common typedefs for Linux */\r
\r
index 87df54aa95278daa379838555efd99e7005524ce..3e8a2b3d7eaca40eff1557b0e9f3db9dc65a55fb 100644 (file)
@@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2c-tools
 PKG_VERSION:=4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
 PKG_HASH:=57b219efd183795bd545dd5a60d9eabbe9dcb6f8fb92bc7ba2122b87f98527d5
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
+PKG_LICENSE_FILES:=COPYING COPYING.LGPL
 
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-i2c-tools-$(PKG_VERSION)
@@ -123,6 +123,7 @@ define Package/i2c-tools/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdump $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cset $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cget $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2ctransfer $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,libi2c))
index cd153d0b11181514a5172fb6532512a89801e430..fead55294452438ddff6517492b05d96aadc9e78 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mariadb
-PKG_VERSION:=10.2.22
+PKG_VERSION:=10.2.24
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -18,11 +18,13 @@ PKG_SOURCE_URL := \
        https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
        https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
 
-PKG_HASH:=42f4c54c29b7c196bd105bbf4d2ea721f869b14cb7ba436c3566e6dd2760614c
+PKG_HASH:=97f4d924e69f77abb2f650116785c2f5ef356230442534ebcbaadb51d9bb8bc4
 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
 PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
 
+PKG_CPE_ID:=cpe:/a:mariadb:mariadb
+
 HOST_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
@@ -200,10 +202,7 @@ define Package/mariadb/install/plugin
 endef
 
 define Package/mariadb/description/Default
-MariaDB is a fast, stable and true multi-user, multi-threaded SQL
-database server. SQL (Structured Query Language) is the most popular
-database query language in the world. The main goals of MariaDB are
-speed, robustness and ease of use.
+MariaDB is a very fast and robust SQL database server.
 endef
 
 define Package/libmariadb/Default
index e55cfce706efa3dac748dc4b106450868429dce9..66afb35bcd4fdc864488773e78723d231c668b61 100644 (file)
@@ -10,7 +10,7 @@ USE_PROCD=1
 
 NAME=mysqld
 
-LOGGER="/usr/bin/logger -p user.err -s -t $NAME"
+LOGGER="/usr/bin/logger -p user.err -s -t $NAME --"
 COMMAND=/usr/bin/$NAME
 
 mysqld_get_param() {
@@ -24,7 +24,10 @@ mysqld_get_param() {
 start_service() {
        local conf=/etc/mysql/my.cnf
        local dir
-       local user=mariadb
+       local user
+       local group
+
+       local logfile
 
        local datadir
        local logdir=/var/log/mysql
@@ -36,6 +39,8 @@ start_service() {
        local log_stdout
        local options
 
+       local hint="please fix your server configuration in /etc/mysql/"
+
        if [ ! -x $COMMAND ]; then
                $LOGGER $COMMAND is missing
                exit 1
@@ -60,30 +65,80 @@ start_service() {
        config_get options general options
 
        datadir=$(mysqld_get_param datadir)
+       logfile=$(mysqld_get_param general_log_file)
        tmpdir=$(mysqld_get_param tmpdir)
+       user=$(mysqld_get_param user)
 
        if [ -z "$datadir" ]; then
                $LOGGER datadir is not set
+               $LOGGER $hint
                exit 1
        fi
 
        if [ -z "$tmpdir" ]; then
-               $LOGGER tmpdir is not set.
+               $LOGGER tmpdir is not set
+               $LOGGER $hint
                exit 1
        fi
 
-       [ -e "$datadir" ] || mkdir -p "$datadir"
+       if [ -z "$user" ]; then
+               $LOGGER user is not set
+               $LOGGER $hint
+               exit 1
+       fi
 
-       for dir in "$logdir" "$rundir" "$tmpdir"; do
-               if [ ! -e "$dir" ]; then
-                       mkdir -p "$dir"
-                       chown $user "$dir"
-               fi
-       done
+       user_exists "$user" || {
+               $LOGGER user \""$user"\" does not exist
+               $LOGGER $hint
+               exit 1
+       }
+
+       group=$(id -g -n "$user")
+
+       group_exists "$group" || {
+               $LOGGER group \""$group"\" does not exist
+               $LOGGER user \""$user"\" not configured correctly
+               exit 1
+       }
+
+       [ -n "$logfile" ] && logdir=$(dirname "$logfile")
+
+       # do not touch directories that already exist
+       # posix shell does not support arrays, hence using awk
+       awk \
+         -v user="$user" \
+         -v group="$group" \
+         -v a="$datadir" \
+         -v b="$logdir" \
+         -v c="$rundir" \
+         -v d="$tmpdir" \
+         '
+           BEGIN {
+             dir[0]=a
+             dir[1]=b
+             dir[2]=c
+             dir[3]=d
+             for (x in dir) {
+               if (system("test ! -e \"" dir[x] "\"" )) {
+                 delete dir[x]
+               }
+             }
+             for (x in dir) {
+               system("mkdir -p \"" dir[x] "\"" )
+               system("chmod 750 \"" dir[x] "\"" )
+               system("chown \"" user "\":\"" group "\" \"" dir[x] "\"" )
+             }
+           }
+         '
 
        if [ ! -f "$datadir/mysql/tables_priv.MYD" ]; then
-               $LOGGER "cannot detect privileges table, you might need to"
-               $LOGGER "run 'mysql_install_db --force' to initialize the system tables"
+               local args="--force"
+               local basedir=$(mysqld_get_param basedir)
+               [ -n "$basedir" ] && args="$args --basedir=$basedir"
+
+               $LOGGER Cannot detect privileges table. You might need to run
+               $LOGGER \'mysql_install_db $args\'
+               $LOGGER to initialize the system tables.
                exit 1
        fi
 
index d428a7b7e65a874d99717ab179aa28626d982119..81cef724cb5c14131a72926e3869cbd12159f913 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/mysql_install_db.sh
 +++ b/scripts/mysql_install_db.sh
-@@ -399,7 +399,7 @@ fi
+@@ -403,7 +403,7 @@ fi
  
  
  # Try to determine the hostname
index 7cfa667a185408c7db94b3f847516b5fdba4276f..198d5f10cd0630eab7350340c0f0fd13bd355e94 100644 (file)
@@ -53,7 +53,7 @@ directly was the first solution adopted in MariaDB [2].
  #  define UT_RESUME_PRIORITY_CPU() ((void)0)
 --- a/storage/innobase/include/ut0ut.h
 +++ b/storage/innobase/include/ut0ut.h
-@@ -70,9 +70,8 @@ typedef time_t       ib_time_t;
+@@ -71,9 +71,8 @@ typedef time_t       ib_time_t;
     the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
     independent way by using YieldProcessor. */
  # define UT_RELAX_CPU() YieldProcessor()
@@ -65,7 +65,7 @@ directly was the first solution adopted in MariaDB [2].
  #else
  # define UT_RELAX_CPU() do { \
       volatile int32   volatile_var; \
-@@ -90,9 +89,8 @@ typedef time_t       ib_time_t;
+@@ -91,9 +90,8 @@ typedef time_t       ib_time_t;
  #endif
  
  #if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
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..05c25d223ad5c53b13989154a8675baa13e16a55 100644 (file)
@@ -8,14 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=4.0
+PKG_VERSION:=4.2
 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:=1143defce62e391b241252ffdb6e5c1ded56cfe26d46ee81b796abe0ccc45df9
+
+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
 
index a943d9851caeec313072a39d42b12f01119679cc..627871367efb628552b41b163327594a02b7219f 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntfs-3g
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_VERSION:=2017.3.23
 PKG_SOURCE:=$(PKG_NAME)_ntfsprogs-$(PKG_VERSION).tgz
@@ -66,6 +66,10 @@ config PACKAGE_NTFS-3G_USE_LIBFUSE
        etc.) it makes sense to activate this option and save some kilobytes
        of space.
 
+config PACKAGE_NTFS-3G_HAS_PROBE
+       bool "install the ntfs-3g.probe utility"
+       depends on PACKAGE_ntfs-3g
+       default y
 endef
 
 define Package/ntfs-3g-low
@@ -150,7 +154,8 @@ endef
 
 define Package/ntfs-3g/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g $(1)/usr/bin/
+       $(if $(CONFIG_PACKAGE_NTFS-3G_HAS_PROBE),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g.probe $(1)/usr/bin/,)
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/sbin
index 9f63758eb182216d4ac3e84cd7e66da6b3ab14e0..c1af74ec93fa96c7e96f4bf20222ac9f28bfb4b8 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=open-vm-tools
-PKG_VERSION:=10.3.5
-PKG_RELEASE:=2
+PKG_VERSION:=10.3.10
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-10430147.tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-12406962.tar.gz
 PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
-PKG_HASH:=364cd0fdfa5a05e872d08609659e6231ec99788669f7ebba24bfb8c94168daef
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-10430147
+PKG_HASH:=a3c02595c802680be258d6249513c76502d383a59597079b10984bb9136dbef5
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-12406962
 PKG_INSTALL:=1
 
 PKG_FIXUP:=autoreconf
diff --git a/utils/open-vm-tools/patches/0012-Fix-some-bad-derefs-in-primary-NIC-gathering-code.patch b/utils/open-vm-tools/patches/0012-Fix-some-bad-derefs-in-primary-NIC-gathering-code.patch
deleted file mode 100644 (file)
index 9974ada..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From bfa850db67e150e8d44093a14ef6a9999c5c9968 Mon Sep 17 00:00:00 2001
-From: Oliver Kurth <okurth@vmware.com>
-Date: Wed, 29 Aug 2018 13:29:43 -0700
-Subject: [PATCH] Fix some bad derefs in primary NIC gathering code.
-
-Found by user in https://github.com/vmware/open-vm-tools/issues/272
-
-Debug code tries to access a struct field that may not have been initialized.
- - Pointer deref'd without a sanity check.
----
- open-vm-tools/lib/nicInfo/nicInfoPosix.c | 39 +++++++++++++++++++++-----------
- 1 file changed, 26 insertions(+), 13 deletions(-)
-
-diff --git a/lib/nicInfo/nicInfoPosix.c b/lib/nicInfo/nicInfoPosix.c
-index 8a063a0..31c1d1a 100644
---- a/lib/nicInfo/nicInfoPosix.c
-+++ b/lib/nicInfo/nicInfoPosix.c
-@@ -359,7 +359,7 @@ GuestInfoGetNicInfo(unsigned int maxIPv4Routes,
-    /* Get a handle to read the network interface configuration details. */
-    if ((intf = intf_open()) == NULL) {
--      g_debug("Error, failed NULL result from intf_open()\n");
-+      g_warning("%s: intf_open() failed\n", __FUNCTION__);
-       return FALSE;
-    }
-@@ -466,7 +466,15 @@ GuestInfoGetPrimaryIP(void)
-     * the first non-loopback, internet interface in the interface list.
-     */
-    for (curr = ifaces; curr != NULL; curr = curr->ifa_next) {
--      int currFamily = ((struct sockaddr_storage *)curr->ifa_addr)->ss_family;
-+      int currFamily;
-+
-+      /*
-+       * Some interfaces ("tun") have no ifa_addr, so ignore them.
-+       */
-+      if (NULL == curr->ifa_addr) {
-+         continue;
-+      }
-+      currFamily = ((struct sockaddr_storage *)curr->ifa_addr)->ss_family;
-       if (!(curr->ifa_flags & IFF_UP) || curr->ifa_flags & IFF_LOOPBACK) {
-          continue;
-@@ -500,6 +508,7 @@ GuestInfoGetPrimaryIP(void)
- }
- #else
-+
- #ifndef NO_DNET
- char *
-@@ -508,20 +517,24 @@ GuestInfoGetPrimaryIP(void)
-    GuestInfoIpPriority ipp;
-    intf_t *intf = intf_open();
--   if (intf != NULL) {
--      ipp.ipstr = NULL;
--      for (ipp.priority = NICINFO_PRIORITY_PRIMARY;
--          ipp.priority < NICINFO_PRIORITY_MAX;
--          ipp.priority++){
--         intf_loop(intf, GuestInfoGetIntf, &ipp);
--         if (ipp.ipstr != NULL) {
--            break;
--         }
-+   if (NULL == intf) {
-+      g_warning("%s: intf_open() failed\n", __FUNCTION__);
-+      return NULL;
-+   }
-+
-+   ipp.ipstr = NULL;
-+   for (ipp.priority = NICINFO_PRIORITY_PRIMARY;
-+       ipp.priority < NICINFO_PRIORITY_MAX;
-+       ipp.priority++){
-+      intf_loop(intf, GuestInfoGetIntf, &ipp);
-+      if (ipp.ipstr != NULL) {
-+         break;
-       }
--      intf_close(intf);
-    }
-+   intf_close(intf);
--   g_debug("%s: returning '%s'", __FUNCTION__, ipp.ipstr);
-+   g_debug("%s: returning '%s'",
-+           __FUNCTION__, ipp.ipstr ? ipp.ipstr : "<null>");
-    return ipp.ipstr;
- }
--- 
-2.7.4
-
index b6d829b857c99b2821e49f7336eff27ef0f67b15..48953a4edb25460d366ecd960adcbb1b256c7831 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=owfs
 PKG_VERSION:=3.2p3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/owfs/owfs/releases/download/v$(PKG_VERSION)
@@ -86,8 +86,7 @@ define Package/libow
   DEPENDS:= \
     +libpthread \
     +LIBOW_MASTER_USB:libusb-compat \
-    +LIBOW_MASTER_W1:kmod-w1 \
-    +libavahi-client
+    +LIBOW_MASTER_W1:kmod-w1
   TITLE:=OWFS - common shared library
 endef
 
@@ -192,6 +191,7 @@ CONFIGURE_ARGS += \
        --disable-owphp \
        --disable-owtcl \
        --disable-swig \
+       --disable-avahi \
        $(if $(CONFIG_LIBOW_MASTER_USB),--enable-usb,--disable-usb) \
        $(if $(CONFIG_LIBOW_MASTER_W1),--enable-w1,--disable-w1) \
        $(if $(CONFIG_LIBOW_MASTER_I2C),--enable-i2c,--disable-i2c) \
index c7670444497e26140dbb63c03de16b131807f126..bfbd0964e491b8e6209a22bee2a4d2c33fecbe16 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.24
+PKG_VERSION:=1.8.25
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://pcsclite.apdu.fr/files/
-PKG_HASH:=b81864fa6a5ec776639c02ae89998955f7702a8d10e8b8f70023c5a599d97568
+PKG_HASH:=d76d79edc31cf76e782b9f697420d3defbcc91778c3c650658086a1b748e8792
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
index cde0a435775eaab5bb1e8786e3d1964a42230e11..3d877467767f070b10bee05004c12f4ff9f593fc 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcsc-tools
-PKG_VERSION=1.5.3
+PKG_VERSION=1.5.4
 PKG_RELEASE:=1
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
-PKG_HASH:=daaa011c28daa00653bd8e2a3d8b0b9f8abae00f7344f50b1a94fbd2b01f1d14
+PKG_HASH:=c39e6abba781895220c68df5e5d2f0f9547c7a676eebec3f1ddcff8794377c93
 
 PKG_FIXUP:=autoreconf
 
index 18638b39e04ef9104d68b18fcf0bdcfc8bc46a6d..83a5c06cf78745433236db4730aaa091fd2b1b47 100644 (file)
@@ -4,8 +4,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2018.12.30
-PKG_RELEASE:=5
+PKG_VERSION:=2019.04.12
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
 PKG_LICENSE:=Apache-2.0
index 19b5b1eab2a614437088d6d9b0e892d836202b49..f241e414f0e1d79bda4126a5c4bb41e928f13912 100644 (file)
@@ -2,9 +2,23 @@ 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_inactive = metric('wifi_station_inactive_milliseconds', 'gauge')
+
+  local metric_wifi_station_exp_thr = metric('wifi_station_expected_throughput_kilobits_per_second', 'gauge')
+
+  local metric_wifi_station_tx_bitrate = metric('wifi_station_transmit_kilobits_per_second', 'gauge')
+  local metric_wifi_station_rx_bitrate = metric('wifi_station_receive_kilobits_per_second', 'gauge')
+
+  local metric_wifi_station_tx_packets = metric("wifi_station_transmit_packets_total","counter")
+  local metric_wifi_station_rx_packets = metric("wifi_station_receive_packets_total","counter")
+
+  local metric_wifi_station_tx_bytes = metric('wifi_station_transmit_bytes_total', 'counter')
+  local metric_wifi_station_rx_bytes = metric('wifi_station_receive_bytes_total', 'counter')
+
 
   local u = ubus.connect()
   local status = u:call("network.wireless", "status", {})
@@ -13,6 +27,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
@@ -20,10 +35,33 @@ local function scrape()
           ifname = ifname,
           mac = mac,
         }
-        metric_wifi_station_signal(labels, station.signal)
+        if station.signal and station.signal ~= 0 then
+          metric_wifi_station_signal(labels, station.signal)
+        end
+        if station.inactive then
+          metric_wifi_station_inactive(labels, station.inactive)
+        end
+        if station.expected_throughput and station.expected_throughput ~= 0 then
+          metric_wifi_station_exp_thr(labels, station.expected_throughput)
+        end
+        if station.tx_rate and station.tx_rate ~= 0 then
+          metric_wifi_station_tx_bitrate(labels, station.tx_rate)
+        end
+        if station.rx_rate and station.rx_rate ~= 0 then
+          metric_wifi_station_rx_bitrate(labels, station.rx_rate)
+        end
         metric_wifi_station_tx_packets(labels, station.tx_packets)
         metric_wifi_station_rx_packets(labels, station.rx_packets)
+        if station.tx_bytes then
+          metric_wifi_station_tx_bytes(labels, station.tx_bytes)
+        end
+        if station.rx_bytes then
+          metric_wifi_station_rx_bytes(labels, station.rx_bytes)
+        end
+
+        count = count + 1
       end
+      metric_wifi_stations({ifname = ifname}, count)
     end
   end
 end
index 0dc4d5c5f829e421411347156c2acfc662e27768..da1e31b03be34ac43586fcc26900cd357f97fc37 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2016 OpenWrt.org
-# Copyright (C) 2016-2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,10 +9,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
-PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=4.0.0
+PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
+PKG_HASH:=13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469
 PKG_SOURCE_URL:=http://download.qemu.org/
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
@@ -23,6 +23,7 @@ PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/package.mk
 
 
@@ -152,7 +153,7 @@ define qemu-target
     TITLE:=QEMU target $(1)
     URL:=http://www.qemu.org
     DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) \
-       $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +pixman +qemu-blobs)
+       $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +pixman +qemu-blobs $(ICONV_DEPENDS))
   endef
 
   define Package/qemu-$(1)/description
@@ -193,27 +194,92 @@ CONFIGURE_ARGS +=                 \
        --disable-fortify-source        \
        --disable-stack-protector       \
 
-# Make a list from QEMU source code for reference
+# VHost features
+CONFIGURE_ARGS +=                      \
+       --enable-vhost-crypto           \
+       --enable-vhost-kernel           \
+       --enable-vhost-net              \
+       --enable-vhost-scsi             \
+       --enable-vhost-user             \
+       --enable-vhost-vsock            \
+
+# Image formats support
+CONFIGURE_ARGS +=                      \
+       --disable-bochs                 \
+       --disable-cloop                 \
+       --disable-dmg                   \
+       --disable-qcow1                 \
+       --disable-vdi                   \
+       --disable-vvfat                 \
+       --disable-qed                   \
+       --disable-parallels             \
+
+# system/user-mode emulation
+CONFIGURE_ARGS +=                      \
+       --disable-user                  \
+       --disable-bsd-user              \
+       --disable-linux-user            \
+       --enable-system                 \
+
+# accel
+CONFIGURE_ARGS +=                      \
+       --disable-hax                   \
+       --disable-hvf                   \
+       --disable-whpx                  \
+       --disable-xen                   \
+       --enable-kvm                    \
+       --enable-tcg                    \
+
+# UI
+CONFIGURE_ARGS +=                      \
+       --disable-cocoa                 \
+       --disable-gtk                   \
+       --disable-sdl                   \
+       --disable-sdl-image             \
+       --disable-spice                 \
+       --disable-virglrenderer         \
+       --disable-vnc                   \
+       --disable-vnc-jpeg              \
+       --disable-vnc-png               \
+       --disable-vnc-sasl              \
+       --disable-vte                   \
+       --enable-curses                 \
+       --enable-iconv                  \
+
+# Features for performance & no external dependency
+CONFIGURE_ARGS +=                      \
+       --enable-coroutine-pool         \
+       --enable-crypto-afalg           \
+       --enable-live-block-migration   \
+       --enable-membarrier             \
+       --enable-replication            \
+
+# Review configure options not explicitly specified here
 #
-#      grep -E '^\s*--disable-[^)]+\)' configure | cut -f1 -d')' | sort -u
+#      openwrt_makefile=openwrt/packages/utils/qemu/Makefile
+#      qemu_configure=qemu/configure
+#      for arg in $(grep -E '^\s*--disable-[^)]+\)' "$qemu_configure" | cut -f1 -d')'); do
+#        grep -qE "(--enable|--disable)${arg#--disable}" "$openwrt_makefile" || echo "$arg"
+#      done
 #
 CONFIGURE_ARGS +=                      \
        --audio-drv-list=''             \
        --disable-attr                  \
+       --disable-auth-pam              \
        --disable-bluez                 \
        --disable-brlapi                \
-       --disable-bsd-user              \
        --disable-bzip2                 \
        --disable-cap-ng                \
-       --disable-cocoa                 \
+       --disable-capstone              \
        --disable-curl                  \
        --disable-debug-info            \
+       --disable-debug-mutex           \
        --disable-debug-tcg             \
        --disable-docs                  \
        --disable-gcrypt                \
+       --disable-git-update            \
        --disable-glusterfs             \
        --disable-gnutls                \
-       --disable-gtk                   \
        --disable-guest-agent-msi       \
        --disable-jemalloc              \
        --disable-libiscsi              \
@@ -224,43 +290,36 @@ CONFIGURE_ARGS +=                 \
        --disable-libusb                \
        --disable-libxml2               \
        --disable-linux-aio             \
+       --disable-lzfse                 \
        --disable-lzo                   \
        --disable-modules               \
+       --disable-mpath                 \
        --disable-netmap                \
        --disable-nettle                \
        --disable-numa                  \
        --disable-opengl                \
+       --disable-pvrdma                \
        --disable-qom-cast-debug        \
        --disable-rbd                   \
        --disable-rdma                  \
-       --disable-sdl                   \
+       --disable-sanitizers            \
        --disable-seccomp               \
+       --disable-sheepdog              \
        --disable-smartcard             \
        --disable-snappy                \
        --disable-sparse                \
-       --disable-spice                 \
        --disable-strip                 \
        --disable-tcg-interpreter       \
        --disable-tcmalloc              \
        --disable-tools                 \
        --disable-tpm                   \
        --disable-usb-redir             \
-       --disable-uuid                  \
        --disable-vde                   \
-       --disable-vhdx                  \
-       --disable-virglrenderer         \
        --disable-virtfs                \
-       --disable-vnc                   \
-       --disable-vnc-jpeg              \
-       --disable-vnc-png               \
-       --disable-vnc-sasl              \
-       --disable-vte                   \
+       --disable-vxhs                  \
        --disable-werror                \
-       --disable-xen                   \
        --disable-xen-pci-passthrough   \
-       --disable-xen-pv-domain-build   \
        --disable-xfsctl                \
-       --disable-zlib-test             \
 
 CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
 CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
index 9759cfa57bd50c45dcae00caff4d2006280d1ced..a1fb69c707d99dc39d6294cf8003e9e5eb46831f 100644 (file)
@@ -1,4 +1,4 @@
-From 82d1bb429533dcab4278ed21afc19ee303d7d3f5 Mon Sep 17 00:00:00 2001
+From cbb0971d0d1bc32413095810e24f17eb7169810a Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:43:19 +0800
 Subject: [PATCH 1/4] configure: allow disable fortify_source
@@ -10,10 +10,10 @@ OpenWrt base build system decide flavor of fortify_source to use
  1 file changed, 2 insertions(+)
 
 diff --git a/configure b/configure
-index 0a3c6a72c3..d274df816c 100755
+index 1c563a7027..f4d949b35b 100755
 --- a/configure
 +++ b/configure
-@@ -1491,6 +1491,8 @@ for opt do
+@@ -1518,6 +1518,8 @@ for opt do
    ;;
    --disable-libpmem) libpmem=no
    ;;
index 4a429572123f4990f9795551cbeca7b524f30c7e..ea0183fa525447a6b41f0de94fcbbb89388f9518 100644 (file)
@@ -1,4 +1,4 @@
-From 4d7955f069922c482886e03e5cd352281dbce146 Mon Sep 17 00:00:00 2001
+From 39b07d1742475f2c60ae2c80f3f2853bb556e0b1 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Tue, 2 Apr 2019 06:31:31 +0000
 Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
@@ -9,10 +9,10 @@ Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
  1 file changed, 4 insertions(+)
 
 diff --git a/configure b/configure
-index d274df816c..a138faeb72 100755
+index f4d949b35b..939f54178b 100755
 --- a/configure
 +++ b/configure
-@@ -1491,6 +1491,10 @@ for opt do
+@@ -1518,6 +1518,10 @@ for opt do
    ;;
    --disable-libpmem) libpmem=no
    ;;
index ece36702184995950f39127556b967dc48cf0aea..a204f183de697ca97efcbf040e5a227130837ca8 100644 (file)
@@ -1,4 +1,4 @@
-From c480c25cf9265fe8e90c2c26d65c8a2fa174b0ea Mon Sep 17 00:00:00 2001
+From fb90eacb808c3b1719d6a5f2deefe88c82589bfb Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:45:25 +0800
 Subject: [PATCH 3/4] disas: fix compilation failure when isnan is a macro
index f63f015b6a627866bdea774013025e40166beedf..45e4ca51ac89986dbb284e36e493db9c8e247577 100644 (file)
@@ -1,4 +1,4 @@
-From e030d1c14119e880a52788dd04325d489cf455ae Mon Sep 17 00:00:00 2001
+From 8cff6a5f07f66103809e6bf4a26c512d70ab2841 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:46:31 +0800
 Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
@@ -9,7 +9,7 @@ Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
-index a9a9e5e7eb..f88b3ee446 100644
+index e33a24da0d..ce734e8202 100644
 --- a/pc-bios/optionrom/Makefile
 +++ b/pc-bios/optionrom/Makefile
 @@ -34,7 +34,7 @@ endif
@@ -20,13 +20,13 @@ index a9a9e5e7eb..f88b3ee446 100644
 +ASFLAGS += $(Wa)-32
  QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
  
- build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
+ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
+@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
  
  
  %.o: %.S
 -      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
 +      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
  
%.img: %.o
-       $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
pvh.img: pvh.o pvh_main.o
+       $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $^,"BUILD","$(TARGET_DIR)$@")
index f157251da774aa47012efbbd55bb02a0483cb102..0696f6d8cb5a2172879847010ff8e15e8fe3c2b4 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtty
-PKG_VERSION:=6.5.0
+PKG_VERSION:=6.6.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/rtty/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=736f4f6bb214c5d97ae530d8029b9a113dbd82b5e6683cf46bf9f23c55fb10d8
+PKG_HASH:=4a46bd80f738ccb9aeea7c0cb8aa5ac364fd964d9ccc1bc3faf7b68eae17007c
 CMAKE_INSTALL:=1
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
index dfa2aa33d7c466b0ebdabba9e0c168df3f42b2b1..65138e6310e733febd747f42d0e9954c6eecdfc7 100644 (file)
@@ -11,3 +11,4 @@
 #   option  port        '5912'              # Server Port
 #   option  ssl         1                   # Whether to use ssl
 #   option  keepalive   5                   # keep alive in seconds for this client
+#   option  token       'your-token'        # generated by rttys
index 175e124246b39587d55549e81257f2d19ff34d7f..55a131053a15c85ffc30cb2f3c37b3446df4393c 100644 (file)
@@ -5,55 +5,62 @@ 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' \
+               'token:maxlength(32)'
+}
+
 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
+       [ -n "$token" ] && procd_append_param command -t "$token"
+       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 f4077c3a14f3b716a44e4002cb01058bfe7cce97..774428d7fd3ed1804b5515a416ce52c9f2831550 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2006-2016 OpenWrt.org
-# Copyright (C) 2017-2018 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+# Copyright (C) 2017-2019 Luiz Angelo Daros de Luca <luizluca@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sane-backends
 PKG_VERSION:=1.0.27
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://fossies.org/linux/misc \
     https://alioth.debian.org/frs/download.php/file/4146/
@@ -193,9 +193,11 @@ define Package/sane-daemon/install
        $(INSTALL_DIR) $(1)/etc/sane.d
        $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/saned.conf $(1)/etc/sane.d/
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+       $(INSTALL_BIN) ./files/usr/sbin/saned $(1)/usr/sbin/saned
+       $(INSTALL_DIR) $(1)/usr/lib/sane/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/saned $(1)/usr/lib/sane/saned
        $(INSTALL_DIR) $(1)/etc/xinetd.d
-       $(CP) ./files/xinet.d_sane-port $(1)/etc/xinetd.d/sane-port
+       $(CP) ./files/etc/xinetd.d/sane-port $(1)/etc/xinetd.d/sane-port
 endef
 
 define Package/sane-daemon/conffiles
diff --git a/utils/sane-backends/files/etc/xinetd.d/sane-port b/utils/sane-backends/files/etc/xinetd.d/sane-port
new file mode 100644 (file)
index 0000000..9119973
--- /dev/null
@@ -0,0 +1,14 @@
+# default: off
+# description: The saned provides scanner service via the network.  \
+#      Applications like kooka, xsane or xscanimage can use the remote \
+#      scanner. 
+service sane-port
+{
+       socket_type = stream
+       port        = 6566
+       wait        = no
+       user        = root
+       group       = root
+       server      = /usr/sbin/saned
+       disable     = yes
+}
diff --git a/utils/sane-backends/files/usr/sbin/saned b/utils/sane-backends/files/usr/sbin/saned
new file mode 100755 (executable)
index 0000000..7114926
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+usblp_driver="/sys/bus/usb/drivers/usblp"
+
+inuse=""
+if [ -e /sys/bus/usb/devices ]; then
+       for usbdev_driver in /sys/bus/usb/devices/*/driver; do
+               [ -e "$usbdev_driver" ] || continue
+               [ "$(readlink -f "$usbdev_driver")" = "$usblp_driver" ] || continue
+               usbdev="${usbdev_driver%/*}"
+               inuse="$inuse ${usbdev##*/}"
+       done
+fi
+
+/usr/lib/sane/saned "$@"
+err=$?
+
+for usbdev in $inuse; do
+       [ -e "/sys/bus/usb/devices/$usbdev/driver" ] && continue
+       logger -t saned "binding device $usbdev back to usblp..."
+       printf '%s' "$usbdev" > "$usblp_driver/bind"
+done
+
+exit $err
diff --git a/utils/sane-backends/files/xinet.d_sane-port b/utils/sane-backends/files/xinet.d_sane-port
deleted file mode 100644 (file)
index 9119973..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# default: off
-# description: The saned provides scanner service via the network.  \
-#      Applications like kooka, xsane or xscanimage can use the remote \
-#      scanner. 
-service sane-port
-{
-       socket_type = stream
-       port        = 6566
-       wait        = no
-       user        = root
-       group       = root
-       server      = /usr/sbin/saned
-       disable     = yes
-}
index de92f3b6708dd9e4d91ac9f216c6fff6a519de35..c4344ecb34ce920cdc16b5c93cf7ff2c75fc54a6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016, 2018 Jeffery To
+# Copyright (C) 2016, 2018-2019 Jeffery To
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=slide-switch
-PKG_VERSION:=0.9.3
+PKG_VERSION:=0.9.4
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git
-PKG_SOURCE_VERSION:=c43b6184292dc60949aa22e2b1730ced9fe34a49
+PKG_SOURCE_VERSION:=0.9.4
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(call version_abbrev,$(PKG_SOURCE_VERSION)).tar.xz
-PKG_MIRROR_HASH:=9ba1b8c978d14b7b70fa61fbf14513ef508a7dbb2a75638088532e4258de6a1b
+PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
+PKG_MIRROR_HASH:=52a93506c994b1babf174aec8ac8aebbf94f27263125d144f6d86db001dd24d6
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
@@ -29,33 +29,40 @@ PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 include $(INCLUDE_DIR)/package.mk
 
 define Package/slide-switch
-       SECTION:=utils
-       CATEGORY:=Utilities
-       DEPENDS:=+jshn +jsonfilter
-       TITLE:=Translate switch position change to button press
-       URL:=https://github.com/jefferyto/openwrt-slide-switch
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Translate switch position change to button press
+  URL:=https://github.com/jefferyto/openwrt-slide-switch
+  DEPENDS:=+jshn +jsonfilter
+  PKGARCH:=all
 endef
 
 define Package/slide-switch/description
 slide-switch translates slide switch position changes into normal button
-presses and releases for OpenWrt / LEDE devices.
+presses and releases for OpenWrt devices.
 endef
 
-CONFIGURE_ARGS += --with-platform=$(BOARD)
-
 define Package/slide-switch/install
        $(INSTALL_DIR) $(1)/etc/hotplug.d/button
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch $(1)/etc/hotplug.d/button
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch \
+               $(1)/etc/hotplug.d/button
+
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch $(1)/etc/init.d
-       if [ -d $(PKG_INSTALL_DIR)/usr/lib/slide-switch ]; then \
-               $(INSTALL_DIR) $(1)/usr/lib/slide-switch; \
-               $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/slide-switch/* $(1)/usr/lib/slide-switch; \
-       fi
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch \
+               $(1)/etc/init.d
+
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/sbin/slide-switch $(1)/usr/sbin
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/sbin/slide-switch \
+               $(1)/usr/sbin
+
        $(INSTALL_DIR) $(1)/usr/share/slide-switch
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh $(1)/usr/share/slide-switch
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh \
+               $(PKG_INSTALL_DIR)/usr/share/slide-switch/switch-data.json \
+               $(1)/usr/share/slide-switch
 endef
 
 $(eval $(call BuildPackage,slide-switch))
index 67a6eab8e0054673ed3ac9a4bd6777387fab3f98..b034e2569f9554c23413fc2485a90f99905242e1 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sumo
-PKG_VERSION:=0.27.1
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/sumo
-PKG_HASH:=4494190bd6570646df7a020befe25bc66355377273d922753685737c0d38bfdf
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_HASH:=68630b6879a3331683443e8044cb0a81e5919f9e4cfb80722933da85b84e542e
 
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
 
@@ -25,20 +25,12 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-CONFIGURE_ARGS += \
-       --with-xerces=$(STAGING_DIR)/usr \
-       --disable-debug \
-       --disable-dependency-tracking \
-       --disable-silent-rules
-
-TARGET_CXXFLAGS+=-fpermissive
-
 define Package/sumo
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=SUMO - Simulation of Urban MObility
-  URL:=http://sumo-sim.org/
-  DEPENDS:=+libstdcpp +libxerces-c
+  URL:=https://sumo.dlr.de/
+  DEPENDS:=+libxerces-c
 endef
 
 define Package/sumo/description
@@ -50,6 +42,12 @@ define Package/sumo/description
   various APIs to remotely control the simulation.
 endef
 
+CONFIGURE_ARGS += \
+       --with-xerces=$(STAGING_DIR)/usr \
+       --disable-debug \
+       --disable-dependency-tracking \
+       --disable-silent-rules
+
 define Package/sumo/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{activitygen,dfrouter,duarouter,emissionsDrivingCycle,emissionsMap,jtrrouter,marouter,netconvert,netgenerate,od2trips,polyconvert,TraCITestClient} $(1)/usr/bin
index b50048d20b3651a651182384d30d3c1f310744f9..e5deea5b7815ec9236f9b3debd77c0439d77d6e6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -117,11 +117,6 @@ dnl - - - - - - - - - - - - - - - - - -
+@@ -87,11 +87,6 @@ dnl - - - - - - - - - - - - - - - - - -
  case "$host" in
     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux*)
  dnl Make sure we are on architecture that supports SIMD
index 6bb60b49b0b0c86abe0afbb2ac06637807967b70..7bbea2b853af87d3f68059cba6f4c877ef460c07 100644 (file)
@@ -6,16 +6,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=temperusb
-PKG_VERSION:=2.0
+PKG_VERSION:=2.3
 PKG_RELEASE:=1
 PKG_CONFIG_DEPENDS:=libusb
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/temperv14-$(PKG_VERSION)
 PKG_SOURCE_URL:=https://codeload.github.com/Arduous/temperv14/tar.gz/v${PKG_VERSION}?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=a8f4ef76a2def5a2e3ec351828a042ce8f7a0963eaa6d9d8ce0c8313e2b54526
-PKG_LICENSE:=BSD-1-Clause
-PKG_LICENSE_FILES:=temperv14.c
+PKG_HASH:=3319026e0d5c42aebe9a75a23593f181c29d0ec9d544fac90b7ba886269ff246
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_MAINTAINER := Samuel Progin <samuel.progin@gmail.com>
 
@@ -30,12 +30,12 @@ endef
 
 define Package/temperusb/description
   RDing TEMPer v1.4 USB thermometer are cheap devices that can be sourced everywhere on
-  the Internet. This package allow to operate them from user space.
+  the Internet. This package allows to operate them from user space.
 endef
 
 define Package/temperusb/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/temperv14 $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/temperusb $(1)/usr/bin
 endef
 
 $(eval $(call BuildPackage,temperusb))
index ff3c9ee19b94a94a2ecb9539cf28a32b893f3c86..b46d4c2fa231883a62d1c031f4dccd5efd2fab61 100644 (file)
@@ -1,19 +1,13 @@
-#
-# Copyright (C) 2009-2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tmux
-PKG_VERSION:=2.8
+PKG_VERSION:=2.9a
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION)
-PKG_HASH:=7f6bf335634fafecff878d78de389562ea7f73a7367f268b66d37ea13617a2ba
+PKG_HASH:=839d167a4517a6bffa6b6074e89a9a8630547b2dea2086f1fad15af12ab23b25
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 
 PKG_LICENSE:=ISC
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 aa6006d3bc25cc41f9948c3697aabb0de7ac123d..091e14e481d885b38e1fec5616df85df4f8abffd 100644 (file)
@@ -8,22 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbmuxd
-PKG_VERSION:=1.1.1
-PKG_RELEASE:=4
-PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2019-03-04
+PKG_SOURCE_VERSION:=b1b0bf390363fa36aff1bc09443ff751943b9c34
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
+PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING.GPLv2
 
-PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=7c0d8ea230570344fbc0183c0171689c74baf3d75fff33bbdfca2d1775a4d62d
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL=https://codeload.github.com/libimobiledevice/usbmuxd/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=ca4275dbc21e8d9c926e65943b605ea5a6112d30eb3f9e655d3983da87ac6798
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -43,7 +43,7 @@ define Package/usbmuxd/description
   uses a dedicated USB interface as a virtual network device.
 endef
 
-TARGET_CFLAGS += $(FPIC)
+CONFIGURE_ARGS += --without-systemd
 
 define Package/usbmuxd/install
        $(INSTALL_DIR) $(1)/usr/sbin
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 7b8088354000dd2458ce6ffb7077199c2550d435..0b94e5bdd864e08511255d9beb2ad32caa533a6d 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xz
 PKG_VERSION:=5.2.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/lzmautils
diff --git a/utils/xz/patches/001-relative-pkg-config-paths.patch b/utils/xz/patches/001-relative-pkg-config-paths.patch
new file mode 100644 (file)
index 0000000..b89c13f
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/src/liblzma/liblzma.pc.in
++++ b/src/liblzma/liblzma.pc.in
+@@ -7,8 +7,8 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
+ Name: liblzma
+ Description: General purpose data compression library
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..865dc73b3abddc28e0efd00b7eff1adaf737152b 100644 (file)
@@ -1,15 +1,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zstd
-PKG_VERSION:=1.3.8
-PKG_RELEASE:=1
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=3
 
 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
+PKG_LICENSE_FILES:=COPYING
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
diff --git a/utils/zstd/patches/010-uClibc-ng.patch b/utils/zstd/patches/010-uClibc-ng.patch
new file mode 100644 (file)
index 0000000..552286b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/programs/fileio.c
++++ b/programs/fileio.c
+@@ -175,7 +175,7 @@ static void clearHandler(void)
+ #if !defined(BACKTRACE_ENABLE)
+ /* automatic detector : backtrace enabled by default on linux+glibc and osx */
+-#  if (defined(__linux__) && defined(__GLIBC__)) \
++#  if (defined(__linux__) && (defined(__GLIBC__) && !defined(__UCLIBC__))) \
+      || (defined(__APPLE__) && defined(__MACH__))
+ #    define BACKTRACE_ENABLE 1
+ #  else