Merge pull request #8518 from neheb/i
authorRosen Penev <rosenp@gmail.com>
Sun, 5 May 2019 18:49:51 +0000 (11:49 -0700)
committerGitHub <noreply@github.com>
Sun, 5 May 2019 18:49:51 +0000 (11:49 -0700)
libimobiledevice packages updated to git

570 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/sudo/Makefile
admin/syslog-ng/Makefile
admin/zabbix/Makefile
admin/zabbix/patches/010-change-agentd-config.patch
admin/zabbix/patches/110-reproducible-builds.patch
devel/lttng-tools/Makefile
devel/lttng-tools/patches/010-fix-compile-fails-for-x32-arch.patch [new file with mode: 0644]
devel/lttng-tools/patches/020-Fix-getgrnam-is-not-MT-Safe-use-getgrnam_r.patch [new file with mode: 0644]
devel/lttng-tools/patches/100-musl-compat.patch [deleted file]
devel/lttng-tools/patches/200-use-extern.patch [deleted file]
lang/dkjson/Makefile
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/json4lua/Makefile
lang/lua-bencode/Makefile
lang/lua-ev/Makefile [new file with mode: 0644]
lang/lua-libmodbus/Makefile
lang/lua-mobdebug/Makefile
lang/lua-wsapi/Makefile
lang/lua-xavante/Makefile
lang/lualanes/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/luasec/patches/100-fix-compilation.patch
lang/luasoap/Makefile
lang/luasocket/Makefile
lang/luasocket/patches/040-remove-fpic-and-warnings.patch [new file with mode: 0644]
lang/luasql/Makefile
lang/lzmq/Makefile
lang/node-arduino-firmata/Makefile
lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js
lang/node-cylon/Makefile
lang/node-hid/Makefile
lang/node-homebridge/Makefile [new file with mode: 0644]
lang/node-homebridge/files/homebridge.init [new file with mode: 0644]
lang/node-mozilla-iot-gateway/Makefile
lang/node-serialport/Makefile
lang/node/Makefile
lang/node/patches/004-openssl-deprecated.patch
lang/node/patches/005-powerpc32_musl_support.patch [new file with mode: 0644]
lang/perl-cgi/Makefile
lang/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/perl-parse-recdescent/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/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-aiohttp/Makefile [new file with mode: 0644]
lang/python/python-astral/Makefile [new file with mode: 0644]
lang/python/python-async-timeout/Makefile [new file with mode: 0644]
lang/python/python-awscli/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-cryptodome/Makefile
lang/python/python-cryptodome/patches/002-omit-tests.patch
lang/python/python-cryptodomex/Makefile
lang/python/python-cryptodomex/patches/002-omit-tests.patch
lang/python/python-curl/Makefile
lang/python/python-curl/patches/0001-support-for-mbedTLS.patch [new file with mode: 0644]
lang/python/python-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-multidict/Makefile [new file with mode: 0644]
lang/python/python-mysql/Makefile
lang/python/python-netdisco/Makefile [new file with mode: 0644]
lang/python/python-package-install.sh
lang/python/python-package.mk
lang/python/python-pyotp/Makefile [new file with mode: 0644]
lang/python/python-pytz/Makefile
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 [new file with mode: 0644]
lang/python/python-twisted/Makefile
lang/python/python-twisted/patches/001-omit-tkconch.patch
lang/python/python-twisted/patches/002-omit-tests.patch
lang/python/python-urllib3/Makefile
lang/python/python-voluptuous-serialize/Makefile [new file with mode: 0644]
lang/python/python-voluptuous/Makefile [new file with mode: 0644]
lang/python/python-yaml/Makefile
lang/python/python-yarl/Makefile [new file with mode: 0644]
lang/python/python-zeroconf/Makefile [new file with mode: 0644]
lang/python/python/Makefile
lang/python/python/files/python-config.in [new file with mode: 0644]
lang/python/python/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12216.patch [new file with mode: 0644]
lang/python/python/patches/020-bpo-36216-Only-print-test-messages-when-verbose-GH-12291.patch [new file with mode: 0644]
lang/python/python/patches/021-compileall-add-recursion-option.patch [new file with mode: 0644]
lang/python/python3-netifaces/Makefile [new file with mode: 0644]
lang/python/python3-package.mk
lang/python/python3-pyroute2/Makefile [new file with mode: 0644]
lang/python/python3-unidecode/Makefile [new file with mode: 0644]
lang/python/python3/Makefile
lang/python/python3/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12213.patch [new file with mode: 0644]
lang/python/rcssmin/Makefile [deleted file]
lang/python/ruamel-yaml/Makefile [new file with mode: 0644]
lang/python/text-unidecode/Makefile [new file with mode: 0644]
lang/python/xmltodict/Makefile [new file with mode: 0644]
lang/ruby/Makefile
lang/uuid/Makefile
libs/boost/Makefile
libs/boost/patches/010-uclibc-ng.patch [new file with mode: 0644]
libs/boost/patches/uclibc-ng-2.patch [new file with mode: 0644]
libs/botan/Makefile [new file with mode: 0644]
libs/fcgi/Makefile
libs/fcgi/patches/100-fcgio-int-type-fix.patch
libs/fcgi/patches/110-no_examples.patch [deleted file]
libs/fcgi/patches/120-stdio.patch [deleted file]
libs/fcgi/patches/200-Convert-AM_INIT_AUTOMAKE-AC_INIT-and-trigger-non-GNU.patch [deleted file]
libs/file/Makefile
libs/hiredis/Makefile
libs/hiredis/patches/010-fix_pkconfig_file.patch [new file with mode: 0644]
libs/icu/Makefile
libs/icu/patches/001-change_optimization_option.patch [new file with mode: 0644]
libs/icu/patches/010-add-big-endian-arm-support.patch [new file with mode: 0644]
libs/jose/Makefile [new file with mode: 0644]
libs/jose/patches/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/ldns/Makefile
libs/libcgroup/Makefile [new file with mode: 0644]
libs/libcgroup/patches/0001-musl-fts-configure.patch [new file with mode: 0644]
libs/libdaq/Makefile
libs/libdaq/patches/001-compile.patch
libs/libdaq/patches/100-musl-compat.patch
libs/libdmapsharing/Makefile
libs/libdouble-conversion/Makefile
libs/libdouble-conversion/patches/010-armeb.patch [new file with mode: 0644]
libs/libgflags/Makefile [new file with mode: 0644]
libs/libglog/Makefile
libs/libglog/patches/100-fix-musl-compilation.patch [new file with mode: 0644]
libs/libgpg-error/Makefile
libs/libgpg-error/patches/001-cross-compile-fix.patch
libs/libgpiod/Makefile
libs/libhttp-parser/Makefile
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/libpng/Makefile
libs/libpsl/Makefile
libs/libre2/Makefile [new file with mode: 0644]
libs/libsearpc/Makefile
libs/libsndfile/Makefile
libs/libssh2/Makefile
libs/libstrophe/Makefile
libs/libuwsc/Makefile
libs/libv4l/Makefile
libs/libv4l/patches/010-remove-libudev-check.patch
libs/libv4l/patches/030-getsubopt.patch [new file with mode: 0644]
libs/libvpx/Makefile
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 [new file with mode: 0644]
libs/lttng-ust/Makefile
libs/lttng-ust/patches/001-no_docs_tests.patch
libs/lttng-ust/patches/002-examples.patch [deleted file]
libs/measurement-kit/Makefile
libs/nspr/Makefile [new file with mode: 0644]
libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch [new file with mode: 0644]
libs/nspr/patches/002-Add-ARC-support.patch [new file with mode: 0644]
libs/nspr/patches/003-native_and_musl_fix.patch [new file with mode: 0644]
libs/nss/Makefile [new file with mode: 0644]
libs/nss/files/blank-cert9.db [new file with mode: 0644]
libs/nss/files/blank-key4.db [new file with mode: 0644]
libs/nss/files/system-pkcs11.txt [new file with mode: 0644]
libs/nss/patches/001-nss_standalone.patch [new file with mode: 0644]
libs/nss/patches/002-os_test.patch [new file with mode: 0644]
libs/nss/patches/003-openwrt_fix.patch [new file with mode: 0644]
libs/opencv/Makefile
libs/opencv/patches/010-fix-url.patch [new file with mode: 0644]
libs/openldap/Makefile
libs/pcre/Makefile
libs/pixman/Makefile
libs/protobuf-c/Makefile
libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch [new file with mode: 0644]
libs/protobuf/Makefile
libs/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/mutt/Makefile
mail/postfix/Makefile
mail/postfix/patches/100-fsstat.patch
mail/postfix/patches/110-openssl-engine.patch [deleted file]
mail/postfix/patches/200-manpages.patch
mail/postfix/patches/300-bdb_hash_segfault.patch
mail/postfix/patches/400-cdb.patch
mail/postfix/patches/500-crosscompile.patch
mail/postfix/patches/501-include_stdio.patch
mail/postfix/patches/600-nopostconf.patch
mail/postfix/patches/700-defaultconfig.patch
mail/postfix/patches/800-fmt.patch
mail/postfix/patches/900_less_overlayfs_rewrites.patch
mail/ssmtp/Makefile
mail/ssmtp/patches/020-openssl-deprecated.patch [new file with mode: 0644]
multimedia/ffmpeg/Makefile
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/youtube-dl/Makefile
multimedia/youtube-dl/patches/dont-use-pandoc.patch [deleted file]
net/acme/Makefile
net/aircrack-ng/Makefile
net/apcupsd/Makefile
net/apcupsd/files/apccontrol
net/apcupsd/patches/015-drop-doc.patch [new file with mode: 0644]
net/aria2/Makefile
net/aria2/files/aria2.init
net/ariang/Makefile
net/bcp38/Makefile
net/bonding/Makefile
net/cifs-utils/Makefile
net/clamav/Makefile
net/ddns-scripts/Makefile
net/ddns-scripts/samples/slaac_sample.sh [new file with mode: 0755]
net/dmapd/Makefile
net/dynapoint/Makefile
net/e2guardian/Makefile
net/e2guardian/files/e2guardian.init
net/fping/Makefile
net/freeradius3/Makefile
net/freeradius3/files/radiusd.init
net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch
net/freeradius3/patches/004-tls.c-allow-build-with-no-openssl-engine-support.patch [deleted file]
net/gnunet/Makefile
net/gnunet/patches/0001-fix-dist-for-experimental.patch [deleted file]
net/gnunet/patches/0002-credential-include-headers-in-dist-sources.patch [deleted file]
net/gnunet/patches/0003-reclaim-attribute-include-header-in-dist-sources.patch [deleted file]
net/gnunet/patches/0004-reclaim-include-reclaim.conf-in-source-dist.patch [deleted file]
net/gnunet/patches/0005-rest-plugins-include-headers-in-dist-sources.patch [deleted file]
net/gnunet/patches/001-fix-libgnunetabe-build.patch [new file with mode: 0644]
net/haproxy/Makefile
net/haproxy/get-latest-patches.sh
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/000-deprecated-openssl.patch [deleted file]
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/002-MINOR-spoe-Use-the-sample-context-to-pass-frag_ctx-info-during-encoding.patch [new file with mode: 0644]
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/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/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/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/kea/Makefile [new file with mode: 0644]
net/kea/patches/001-fix-cross-compile.patch [new file with mode: 0644]
net/kea/patches/002-fix-host-compile.patch [new file with mode: 0644]
net/kea/patches/003-no-test-compile.patch [new file with mode: 0644]
net/keepalived/Config.in [new file with mode: 0644]
net/keepalived/Makefile
net/keepalived/files/keepalived.config
net/keepalived/files/keepalived.init
net/knot/Makefile
net/krb5/Makefile
net/krb5/files/krb5kdc
net/lcdringer/Makefile
net/lcdringer/patches/010-disable-check.patch [new file with mode: 0644]
net/libreswan/Makefile [new file with mode: 0644]
net/libreswan/files/ipsec.conf [new file with mode: 0644]
net/libreswan/files/ipsec.init [new file with mode: 0755]
net/libreswan/files/ipsec.secrets [new file with mode: 0644]
net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch [new file with mode: 0644]
net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch [new file with mode: 0644]
net/lighttpd/Makefile
net/linknx/Makefile
net/mini_snmpd/Makefile
net/mini_snmpd/files/mini_snmpd.init
net/miniupnpc/Makefile
net/miniupnpc/patches/100-no-fPIC.patch [new file with mode: 0644]
net/miniupnpc/patches/100-no_minixml_test.patch [deleted file]
net/miniupnpc/patches/300-add-listdevices-to-cmake.patch [new file with mode: 0644]
net/miniupnpd/Makefile
net/miniupnpd/patches/100-build-on-OpenWrt.patch
net/miniupnpd/patches/200-remove-default-cflags.patch [new file with mode: 0644]
net/mosquitto/Makefile
net/mosquitto/files/etc/init.d/mosquitto
net/net-snmp/Makefile
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/200-idmapd-add-missing-libgen-header.patch [new file with mode: 0644]
net/nft-qos/Makefile
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/pppossh/Makefile
net/pptpd/Makefile
net/pptpd/files/pptpd.init
net/prosody/Makefile
net/ptunnel-ng/Makefile
net/rosy-file-server/Makefile [new file with mode: 0644]
net/rosy-file-server/files/rosyfs.config [new file with mode: 0644]
net/rosy-file-server/files/rosyfs.init [new file with mode: 0755]
net/rpcbind/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/Config.in
net/seafile-server/Makefile
net/seafile-server/patches/090-django-11-compat.patch
net/shadowsocks-libev/README.md
net/shorewall-core/Makefile
net/shorewall-lite/Makefile
net/shorewall/Makefile
net/shorewall6-lite/Makefile
net/shorewall6/Makefile
net/snort/Makefile
net/snort/files/snort.init
net/snort/patches/001-compile.patch
net/snort3/Makefile [new file with mode: 0644]
net/snort3/files/snort.config [new file with mode: 0644]
net/snort3/files/snort.init [new file with mode: 0644]
net/snort3/patches/001-compile.patch [new file with mode: 0644]
net/snort3/patches/002-ignore-liblzma.patch [new file with mode: 0644]
net/softethervpn/Makefile
net/softethervpn/patches/110-no-m64.patch [new file with mode: 0644]
net/softethervpn5/Makefile
net/squid/Makefile
net/squid/files/squid.init
net/squid/patches/001-cross_compile.patch
net/squid/patches/010-openssl-engine.patch [deleted file]
net/sshtunnel/Makefile
net/stunnel/Makefile
net/stunnel/files/stunnel.init
net/subversion/Makefile
net/subversion/patches/301-cross-compilation-macos.patch
net/sysrepo/Makefile
net/tgt/Makefile
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/vpnc-scripts/Makefile
net/wakeonlan/Makefile
net/wavemon/Makefile
net/wavemon/patches/010-Scan-screen-resolves-62.patch [new file with mode: 0644]
net/wget/Makefile
net/wifidog-ng/Makefile
net/wifidog-ng/files/wifidog-ng.init
net/znc/Makefile
net/znc/patches/120-openssl-deprecated.patch
utils/attendedsysupgrade-common/Makefile
utils/bmx7-dnsupdate/Makefile
utils/btrfs-progs/Config.in [new file with mode: 0644]
utils/btrfs-progs/Makefile
utils/collectd/Makefile
utils/collectd/patches/051-Add-scale-and-shift-to-modbus-plugin.patch [new file with mode: 0644]
utils/collectd/patches/052-correcting-all-the-wrongs.patch [new file with mode: 0644]
utils/collectd/patches/053-Add-support-for-RS485-to-modbus-plugin.patch [new file with mode: 0644]
utils/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/fio/Makefile
utils/fio/patches/010-mpcore.patch [new file with mode: 0644]
utils/gammu/Makefile
utils/gddrescue/Makefile [new file with mode: 0644]
utils/gddrescue/patches/001-fix_uclibc.patch [new file with mode: 0644]
utils/gpsd/Makefile
utils/gpsd/files/gpsd.init
utils/hd-idle/Makefile
utils/hd-idle/files/hd-idle.init
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/lxc/Makefile
utils/micrond/Makefile [new file with mode: 0644]
utils/micrond/files/etc/init.d/micrond [new file with mode: 0755]
utils/micrond/files/usr/lib/micron.d/.keep [new file with mode: 0644]
utils/micrond/src/Makefile [new file with mode: 0644]
utils/micrond/src/micrond.c [new file with mode: 0644]
utils/mmc-utils/Makefile
utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch [new file with mode: 0644]
utils/mmc-utils/patches/0001-Check-calloc-s-return-value-before-using-the-pointer.patch [new file with mode: 0644]
utils/mmc-utils/patches/0002-Cleanup-memory-in-error-case.patch [new file with mode: 0644]
utils/mmc-utils/patches/0003-Fix-parsing-of-character-in-to_binstr.patch [new file with mode: 0644]
utils/mmc-utils/patches/0004-Optimize-to_binstr-function.patch [new file with mode: 0644]
utils/mmc-utils/patches/0005-Add-eMMC-vendor-Micron-to-table.patch [new file with mode: 0644]
utils/mmc-utils/patches/0006-Fix-parsing-of-Product-Revision-and-Serial-Number.patch [new file with mode: 0644]
utils/mmc-utils/patches/0007-Add-various-SD-eMMC-vendors-to-table.patch [new file with mode: 0644]
utils/mmc-utils/patches/0008-Various-fixes.patch [new file with mode: 0644]
utils/mmc-utils/patches/0009-mmc-utils-let-FFU-mode-use-CMD23-and-CMD25.patch [new file with mode: 0644]
utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch [deleted file]
utils/nano/Makefile
utils/ncdu/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/openocd/Makefile
utils/openocd/patches/100-bind-localhost-only.patch [new file with mode: 0644]
utils/openocd/patches/101-cve-2018-5704-css-fix.patch [new file with mode: 0644]
utils/owfs/Makefile
utils/pciutils/Makefile
utils/powertop/Makefile [new file with mode: 0644]
utils/powertop/patches/001-musl-fix-headers.patch [new file with mode: 0644]
utils/powertop/patches/002-strerror_r.patch [new file with mode: 0644]
utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch [new file with mode: 0644]
utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch [new file with mode: 0644]
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/conntrack.lua
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/wifi_stations.lua
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch [new file with mode: 0644]
utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch [deleted file]
utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch [new file with mode: 0644]
utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch [deleted file]
utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch [new file with mode: 0644]
utils/rtty/Makefile
utils/rtty/files/rtty.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/screen/Makefile
utils/screen/patches/010-fix-configure-failed-while-build-dir-name-contains-y.patch [new file with mode: 0644]
utils/screen/patches/020-fix-configure-option-disable-use-locale-is-not-worki.patch [new file with mode: 0644]
utils/screen/patches/030-PATCH-1-4-Remove-redundant-compiler-sanity-checks.patch [new file with mode: 0644]
utils/screen/patches/040-PATCH-2-4-Provide-cross-compile-alternatives-for-AC_.patch [new file with mode: 0644]
utils/screen/patches/050-PATCH-3-4-Skip-host-file-system-checks-when-cross-co.patch [new file with mode: 0644]
utils/screen/patches/060-PATCH-4-4-Avoid-mis-identifying-systems-as-SVR4.patch [new file with mode: 0644]
utils/screen/patches/100-cross_compile_fix.patch [deleted file]
utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch [deleted file]
utils/screen/patches/200-musl-compat.patch [deleted file]
utils/slide-switch/Makefile
utils/sumo/Makefile
utils/sumo/patches/100-configure_fix.patch
utils/sysstat/Makefile
utils/sysstat/files/sysstat.init
utils/tang/Makefile [new file with mode: 0644]
utils/tang/files/tangdw [new file with mode: 0755]
utils/tang/files/tangdx [new file with mode: 0644]
utils/tang/patches/Makefile_am.patch [new file with mode: 0644]
utils/tang/patches/rm-systemd-from-configure.patch [new file with mode: 0644]
utils/tang/patches/use-readlink-in-tangd-update.patch [new file with mode: 0644]
utils/temperusb/Makefile
utils/ttyd/Makefile
utils/unrar/Makefile
utils/unrar/patches/100-makefile_fixes.patch
utils/vim/Makefile
utils/watchcat/Makefile
utils/wifitoggle/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/zoneinfo/Makefile
utils/zstd/Makefile [new file with mode: 0644]

index 75d8bc2dc2781aabada91437dc4eacb52343d0b0..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.
@@ -42,7 +42,7 @@ All packages you commit or submit by pull-request should follow these simple gui
 * Have a useful description prefixed with the package name
     (E.g.: "foopkg: Add libzot dependency")
 * Include Signed-off-by tag in the commit comments.
-    See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
+    See: [Sign your work](https://openwrt.org/submitting-patches#sign_your_work)
 
 ### Advice on pull requests:
 
@@ -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 ab130ec21d358c014ef03845ce71f67aa317d13b..aaf4934f64704e9aaaf541cc23a14121155af0a8 100644 (file)
@@ -8,13 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sudo
-PKG_VERSION:=1.8.26
+PKG_VERSION:=1.8.27
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.sudo.ws/dist
-PKG_HASH:=40da219a6f0341ccb22d04a98988e27f09b831d2561b14c6154067a49ef3fee2
+PKG_HASH:=7beb68b94471ef56d8a1036dbcdc09a7b58a949a68ffce48b83f837dd33e2ec0
 
+PKG_MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=doc/LICENSE
 PKG_CPE_ID:=cpe:/a:todd_miller:sudo
@@ -31,7 +32,6 @@ define Package/sudo
   CATEGORY:=Administration
   TITLE:=Delegate authority to run commands
   URL:=https://www.sudo.ws/
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
 endef
 
 define Package/sudo/description
index 76f3ce759ce4dc947170b04a3a914f5a3c8d540a..98a743a741322af7ae24b10392974baacca252e3 100644 (file)
@@ -60,6 +60,7 @@ CONFIGURE_ARGS +=  \
        --disable-redis \
        --disable-dependency-tracking \
        --disable-python \
+       --disable-geoip2 \
        --disable-java \
        --disable-java-modules \
        --with-librabbitmq-client=no \
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 b5ecfd522798bd2a4d085a949146ff453c48a7e5..3f0f6fd9cad6dee8c86da33d0a2e709439be1b31 100644 (file)
@@ -27,6 +27,7 @@ define Package/dkjson
        URL:=http://dkolf.de/src/dkjson-lua.fsl/home
        MAINTAINER:=Lars Gierth <larsg@systemli.org>
        DEPENDS:=+lua
+       PKGARCH:=all
 endef
 
 define Package/dkjson/description
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 e25894865ac51f135ff2fc7a35fdd84e54a7e66d..e758ad2e1a96c29ad5b1e110e494191420d9c715 100644 (file)
@@ -11,4 +11,4 @@ endif
 
 
 GO_VERSION_MAJOR_MINOR:=1.12
-GO_VERSION_PATCH:=1
+GO_VERSION_PATCH:=4
index 94522055347c4888bc0cc64177f0a78ade1bf1d0..92714d3a0a056197a3bc81bb186c59a8bb869782 100644 (file)
@@ -18,7 +18,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \
 
 PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
 PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=0be127684df4b842a64e58093154f9d15422f1405f1fcff4b2c36ffc6a15818a
+PKG_HASH:=4affc3e610cd8182c47abbc5b0c0e4e3c6a2b945b55aaa2ba952964ad9df1467
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 33892d2f61996fa2bbf4fd83092ba8239e902309..6a4f8af703e69073736a1d5b4eb73aeac93b6316 100644 (file)
@@ -29,6 +29,7 @@ define Package/json4lua
   TITLE:=json4lua
   URL:=https://github.com/amrhassan/json4lua
   DEPENDS:=+lua +luasocket
+  PKGARCH:=all
 endef
 
 define Package/json4lua/description
index e256fe822ebcec23a2f6bf93035da0ecb97a9956..3edee239f996be8fa3da71cf05c27e81a89c708e 100644 (file)
@@ -27,6 +27,7 @@ define Package/lua-bencode
        TITLE:=lua-bencode
        URL:=https://bitbucket.org/wilhelmy/lua-bencode
        DEPENDS:=+lua
+       PKGARCH:=all
 endef
 
 define Package/lua-bencode/description
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 8e26f34f63d470438bdf96d60c7ec8c21fb7b3ba..8fd42b40a6cb3448dc709a202f3ffb3899d16626 100644 (file)
@@ -6,7 +6,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE:=lua-libmodbus-$(PKG_VERSION).tar.gz
 PKG_SOURCE_SUBDIR:=lua-libmodbus-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://codeload.github.com/remakeelectric/lua-libmodbus/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE_URL:=https://codeload.github.com/etactica/lua-libmodbus/tar.gz/v$(PKG_VERSION)?
 PKG_HASH:=90aff3a2cfe7f91f167ad4ea00f55c2aa86cf2aef93d022e3b2cf906a1791254
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 
@@ -22,7 +22,7 @@ define Package/lua-libmodbus
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=lua-libmodbus
-  URL:=https://github.com/remakeelectric/lua-libmodbus
+  URL:=https://github.com/etactica/lua-libmodbus
   DEPENDS:=+liblua +libmodbus
 endef
 
index bc0bb8cd389b42219c0a394e205b26dbca9b60c3..b1c387d429bb12c264a31edbb4662fe10554098f 100644 (file)
@@ -32,6 +32,7 @@ define Package/lua-mobdebug
   TITLE:=Lua-MobDebug
   URL:=https://github.com/pkulchenko/MobDebug
   DEPENDS:=+lua
+  PKGARCH:=all
 endef
 
 define Package/lua-mobdebug/description
index d1ac559dcfd0b418f2ea613b8bd128c4c4d4da69..71e5aad554927316d60f32c614546b948c195b76 100644 (file)
@@ -31,6 +31,7 @@ define Package/lua-wsapi/Default
   TITLE:=Lua WSAPI
   URL:=https://keplerproject.github.io/wsapi/
   DEPENDS:= +lua
+  PKGARCH:=all
 endef
 
 define Package/lua-wsapi/Default/description
index acef0c2eba5dca62ca383d252e451846c47b1dec..9b870aa5cdf0aa97a6a0396f19495a1e950648f2 100644 (file)
@@ -31,6 +31,7 @@ define Package/lua-xavante
   TITLE:=Xavante Web Server
   URL:=https://keplerproject.github.io/xavante/
   DEPENDS:= +lua
+  PKGARCH:=all
 endef
 
 define Package/lua-xavante/description
index 79bbc14f5c401cd1cd241b410c23382abdc1afe2..b95b625f009847a22dc0421e647f00d02b4a6aae 100644 (file)
@@ -42,6 +42,8 @@ define Build/Compile
         CC="$(TARGET_CC)" \
         LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \
         LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \
+       LUA_FLAGS= \
+       LUA_LIBS=-llua \
         OPT_FLAGS="$(TARGET_CFLAGS) -Dpthread_yield=sched_yield"
 endef
 
index 4690ddd4be3f1864a7598d2bb2fd87573588fb56..e6867aeeeae4a8b952e0a3072b1a2bd2c5c00877 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luasec
-PKG_VERSION:=0.7
+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>
@@ -41,9 +41,13 @@ endef
 define Build/Configure
 endef
 
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += $(FPIC)
+
 MAKE_FLAGS += \
-       INCDIR="$(TARGET_CPPFLAGS) -I." \
-       LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
+       LD="$(TARGET_CC)" \
+       INC_PATH="" \
+       LIB_PATH="" \
        LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
        LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
 
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 fbd6ab3b60058afd016926badfa47b6090470207..61f0490a35992446ebd1e95b87fa363519de85f9 100644 (file)
@@ -1,7 +1,16 @@
-diff --git a/src/Makefile b/src/Makefile
-index 9be2f14..93d1dc4 100644
 --- a/src/Makefile
 +++ b/src/Makefile
+@@ -15,8 +15,8 @@ WARN=-Wall -pedantic
+ BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+ BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR)
+-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR)
++LNX_CFLAGS=$(INCDIR) $(DEFS)
++LNX_LDFLAGS=-shared $(LIBDIR)
+ MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)'
+ MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS)
 @@ -33,10 +33,10 @@ LDFLAGS += $(MYLDFLAGS)
  all:
  
index de88fcf98f47f00a24b4eeef068b9ad964c99806..f07c635a86f86d4aefd4b578ad7725df73c74174 100644 (file)
@@ -30,6 +30,7 @@ define Package/luasoap
   TITLE:=LuaSOAP
   URL:=https://github.com/tomasguisasola/luasoap
   DEPENDS:=+lua +luaexpat +luasec +luasocket
+  PKGARCH:=all
 endef
 
 define Package/luasoap/description
index ba8ca2a6ee64100ece395785a06ee1421688e4ab..9264788f35427c2ef66e3d9a1f1451cd05f5c0a3 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=luasocket
 PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448
 PKG_VERSION:=3.0-rc1-20130909
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_MIRROR_HASH:=d2fa075d8bd026c41e0eb1a634ac2ad8115dee8abb070720e8e91fab51f86ee4
@@ -42,7 +42,7 @@ endef
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR)/ \
                LIBDIR="$(TARGET_LDFLAGS)" \
-               CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
+               CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
                LD="$(TARGET_CROSS)ld -shared" \
                all
 endef
diff --git a/lang/luasocket/patches/040-remove-fpic-and-warnings.patch b/lang/luasocket/patches/040-remove-fpic-and-warnings.patch
new file mode 100644 (file)
index 0000000..95c17b1
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/makefile
++++ b/src/makefile
+@@ -163,9 +163,8 @@ DEF_linux=-DLUASOCKET_$(DEBUG) -DLUA_$(COMPAT)_MODULE \
+       -DLUASOCKET_API='__attribute__((visibility("default")))' \
+       -DUNIX_API='__attribute__((visibility("default")))' \
+       -DMIME_API='__attribute__((visibility("default")))'
+-CFLAGS_linux= -I$(LUAINC) $(DEF) -pedantic -Wall -Wshadow -Wextra \
+-      -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
+-LDFLAGS_linux=-O -shared -fpic -o 
++CFLAGS_linux= -I$(LUAINC) $(DEF) -fvisibility=hidden
++LDFLAGS_linux=-shared -o
+ LD_linux=gcc
+ SOCKET_linux=usocket.o
index 3ca72b08bb709b2687722b4e924e9257e89bbf2a..5355a824a907a1f785ee625378397c4cc2f15ebc 100644 (file)
@@ -82,21 +82,19 @@ TARGET_CFLAGS += $(FPIC) -std=gnu99
 TARGET_CPPFLAGS += -DLUA_USE_LINUX
 
 ifeq ($(BUILD_VARIANT),mysql)
-  TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql
-  TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
+  MAKE_FLAGS += DRIVER_INCS_mysql='-I$(STAGING_DIR)/usr/include/mysql' \
+               DRIVER_LIBS_mysql='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz'
 endif
 
 ifeq ($(BUILD_VARIANT),postgres)
-  TARGET_LDFLAGS += -lpq
+  MAKE_FLAGS += DRIVER_LIBS_postgres='$(TARGET_LDFLAGS) -lpq'
 endif
 
 ifeq ($(BUILD_VARIANT),sqlite3)
-  TARGET_LDFLAGS += -lsqlite3 -lpthread
+  MAKE_FLAGS += DRIVER_LIBS_sqlite='$(TARGET_LDFLAGS) -lsqlite3 -lpthread'
 endif
 
 MAKE_FLAGS += \
-       DRIVER_INCS="$(TARGET_CPPFLAGS)" \
-       DRIVER_LIBS="$(TARGET_LDFLAGS)" \
        CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
        $(BUILD_VARIANT)
 
index 560a22e6366e00bfb85a62592291f9ead54f92a5..210b88ed3c715f2ac954a18e284c26833c34827e 100644 (file)
@@ -25,7 +25,7 @@ define Package/lzmq
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Lua ZeroMQ binding
-  URL:=https://github.com/moteus/lzmq/
+  URL:=https://github.com/zeromq/lzmq
   DEPENDS:= +lua +libzmq
 endef
 
index 84629ac8d41a5d35d4b36539537b4dd200d22e68..fd2b3f4c1884c0d2b1621437e7fa04ed9392d1a2 100644 (file)
@@ -10,19 +10,16 @@ include $(TOPDIR)/rules.mk
 PKG_NPM_NAME:=arduino-firmata
 PKG_NAME:=node-$(PKG_NPM_NAME)
 PKG_VERSION:=0.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
-PKG_MIRROR_HASH:=1aef93dc704ea771b9eab51cb64103533f829aee5b2886ad55d173adf3f11ede
-PKG_SOURCE_VERSION:=v0.3.4
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 
@@ -32,47 +29,44 @@ define Package/node-arduino-firmata
   SUBMENU:=Node.js
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=Node.js package to access serial ports for reading and writing
-  URL:=https://www.npmjs.org/package/serialport
+  TITLE:=Arduino Firmata implementation for Node.js
+  URL:=https://www.npmjs.com/package/arduino-firmata
   DEPENDS:=+node +node-npm +node-serialport
 endef
 
 define Package/node-arduino-firmata/description
- Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+ Arduino Firmata protocol (http://firmata.org) implementation on Node.js.
 endef
 
-define Build/Prepare
-       /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
-       $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; \
+       $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
 endef
 
 define Package/node-arduino-firmata/install
-       mkdir -p $(1)/usr/lib/node
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node
-       rm -rf  $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ \
-               $(1)/usr/lib/node/arduino-firmata/patches \
-               $(1)/usr/lib/node/arduino-firmata/.p* \
-               $(1)/usr/lib/node/arduino-firmata/.quilt* \
-               $(1)/usr/lib/node/arduino-firmata/.built* \
-               $(1)/usr/lib/node/arduino-firmata/.config*
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,README.md} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{tests,*.txt} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
        $(CP) ./files/* $(1)/
 endef
 
 $(eval $(call BuildPackage,node-arduino-firmata))
-
index 578bd402b1733785898324b752d68bd7ce03ba3a..2f9bcf7c1a9a16750bb61b110bfce07d7ee36694 100644 (file)
 (function() {
   'use strict';
-  var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
-    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
-    hasProp = {}.hasOwnProperty;
+  var ArduinoFirmata, debug, events, exports, serialport;
 
   events = require('eventemitter2');
 
-  SerialPort = (serialport = require('serialport')).SerialPort;
+  serialport = require('serialport');
 
   debug = require('debug')('arduino-firmata');
 
-  exports = module.exports = ArduinoFirmata = (function(superClass) {
-    extend(ArduinoFirmata, superClass);
-
-    ArduinoFirmata.Status = {
-      CLOSE: 0,
-      OPEN: 1
-    };
-
-    ArduinoFirmata.INPUT = 0;
-
-    ArduinoFirmata.OUTPUT = 1;
-
-    ArduinoFirmata.ANALOG = 2;
-
-    ArduinoFirmata.PWM = 3;
-
-    ArduinoFirmata.SERVO = 4;
-
-    ArduinoFirmata.SHIFT = 5;
-
-    ArduinoFirmata.I2C = 6;
-
-    ArduinoFirmata.LOW = 0;
-
-    ArduinoFirmata.HIGH = 1;
-
-    ArduinoFirmata.MAX_DATA_BYTES = 32;
-
-    ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
-
-    ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
-
-    ArduinoFirmata.REPORT_ANALOG = 0xC0;
-
-    ArduinoFirmata.REPORT_DIGITAL = 0xD0;
-
-    ArduinoFirmata.SET_PIN_MODE = 0xF4;
-
-    ArduinoFirmata.REPORT_VERSION = 0xF9;
-
-    ArduinoFirmata.SYSTEM_RESET = 0xFF;
-
-    ArduinoFirmata.START_SYSEX = 0xF0;
-
-    ArduinoFirmata.END_SYSEX = 0xF7;
-
-    ArduinoFirmata.list = function(callback) {
-      return serialport.list(function(err, ports) {
-        var devices, j, len, port;
-        if (err) {
-          return callback(err);
-        }
-        devices = [];
-        for (j = 0, len = ports.length; j < len; j++) {
-          port = ports[j];
-          if (/usb|acm|com\d+/i.test(port.comName)) {
-            devices.push(port.comName);
+  exports = module.exports = ArduinoFirmata = (function() {
+    class ArduinoFirmata extends events.EventEmitter2 {
+      static list(callback) {
+        return serialport.list(function(err, ports) {
+          var devices, j, len, port;
+          if (err) {
+            return callback(err);
           }
-        }
-        return callback(null, devices);
-      });
-    };
-
-    function ArduinoFirmata() {
-      this.status = ArduinoFirmata.Status.CLOSE;
-      this.wait_for_data = 0;
-      this.execute_multi_byte_command = 0;
-      this.multi_byte_channel = 0;
-      this.stored_input_data = [];
-      this.parsing_sysex = false;
-      this.sysex_bytes_read = 0;
-      this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-      this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-      this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-      this.boardVersion = null;
-    }
-
-    ArduinoFirmata.prototype.isOldArduinoDevice = function() {
-      return /usbserial|USB/.test(this.serialport_name);
-    };
+          devices = [];
+          for (j = 0, len = ports.length; j < len; j++) {
+            port = ports[j];
+            if (/usb|acm|com|ama\d+/i.test(port.comName)) {
+              devices.push(port.comName);
+            }
+          }
+          return callback(null, devices);
+        });
+      }
 
-    ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
-      this.serialport_name = serialport_name;
-      if (opts == null) {
-        opts = {
-          baudrate: 57600
-        };
+      constructor() {
+        super();
+        this.status = ArduinoFirmata.Status.CLOSE;
+        this.wait_for_data = 0;
+        this.execute_multi_byte_command = 0;
+        this.multi_byte_channel = 0;
+        this.stored_input_data = [];
+        this.parsing_sysex = false;
+        this.sysex_bytes_read = 0;
+        this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.boardVersion = null;
       }
-      opts.parser = serialport.parsers.raw;
-      if (!this.serialport_name) {
-        ArduinoFirmata.list((function(_this) {
-          return function(err, devices) {
-            return _this.connect(devices[0], opts);
-          };
-        })(this));
-        return this;
+
+      isOldArduinoDevice() {
+        return /usbserial|USB/.test(this.serialport_name);
       }
-      this.once('boardReady', function() {
-        var io_init_wait;
-        debug('boardReady');
-        io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
-        debug("wait " + io_init_wait + "(msec)");
-        return setTimeout((function(_this) {
-          return function() {
+
+      connect(serialport_name, opts = {
+          baudRate: 57600
+        }) {
+        this.serialport_name = serialport_name;
+        opts.parser = serialport.parsers.raw;
+        if (!this.serialport_name) {
+          ArduinoFirmata.list((err, devices) => {
+            return this.connect(devices[0], opts);
+          });
+          return this;
+        }
+        this.once('boardReady', function() {
+          var io_init_wait;
+          debug('boardReady');
+          io_init_wait = this.isOldArduinoDevice() ? (debug(`old arduino device found ${this.serialport_name}`), 3000) : (debug(`new arduino device found ${this.serialport_name}`), 100);
+          debug(`wait ${io_init_wait}(msec)`);
+          return setTimeout(() => {
             var i, j, k;
             for (i = j = 0; j < 6; i = ++j) {
-              _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
+              this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
             }
             for (i = k = 0; k < 2; i = ++k) {
-              _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
+              this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
             }
             debug('init IO ports');
-            return _this.emit('connect');
-          };
-        })(this), io_init_wait);
-      });
-      this.serialport = new SerialPort(this.serialport_name, opts);
-      this.serialport.once('open', (function(_this) {
-        return function() {
+            return this.emit('connect');
+          }, io_init_wait);
+        });
+        this.serialport = new serialport(this.serialport_name, opts);
+        this.serialport.once('open', () => {
           var cid;
-          cid = setInterval(function() {
+          cid = setInterval(() => {
             debug('request REPORT_VERSION');
-            return _this.write([ArduinoFirmata.REPORT_VERSION]);
+            return this.write([ArduinoFirmata.REPORT_VERSION]);
           }, 500);
-          _this.once('boardVersion', function(version) {
+          this.once('boardVersion', (version) => {
             clearInterval(cid);
-            _this.status = ArduinoFirmata.Status.OPEN;
-            return _this.emit('boardReady');
+            this.status = ArduinoFirmata.Status.OPEN;
+            return this.emit('boardReady');
           });
-          return _this.serialport.on('data', function(data) {
+          return this.serialport.on('data', (data) => {
             var byte, j, len, results;
             results = [];
             for (j = 0, len = data.length; j < len; j++) {
               byte = data[j];
-              results.push(_this.process_input(byte));
+              results.push(this.process_input(byte));
             }
             return results;
           });
-        };
-      })(this));
-      return this;
-    };
+        });
+        return this;
+      }
 
-    ArduinoFirmata.prototype.isOpen = function() {
-      return this.status === ArduinoFirmata.Status.OPEN;
-    };
+      isOpen() {
+        return this.status === ArduinoFirmata.Status.OPEN;
+      }
 
-    ArduinoFirmata.prototype.close = function(callback) {
-      this.status = ArduinoFirmata.Status.CLOSE;
-      return this.serialport.close(callback);
-    };
+      close(callback) {
+        this.status = ArduinoFirmata.Status.CLOSE;
+        return this.serialport.close(callback);
+      }
 
-    ArduinoFirmata.prototype.reset = function(callback) {
-      return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
-    };
+      reset(callback) {
+        return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
+      }
 
-    ArduinoFirmata.prototype.write = function(bytes, callback) {
-      return this.serialport.write(bytes, callback);
-    };
+      write(bytes, callback) {
+        return this.serialport.write(bytes, callback);
+      }
 
-    ArduinoFirmata.prototype.sysex = function(command, data, callback) {
-      var write_data;
-      if (data == null) {
-        data = [];
+      sysex(command, data = [], callback) {
+        var write_data;
+        //# http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
+        data = data.map(function(i) {
+          return i & 0b1111111; // 7bit
+        });
+        write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
+        return this.write(write_data, callback);
       }
-      data = data.map(function(i) {
-        return i & 0x7f;
-      });
-      write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
-      return this.write(write_data, callback);
-    };
 
-    ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
-      switch (mode) {
-        case true:
-          mode = ArduinoFirmata.OUTPUT;
-          break;
-        case false:
-          mode = ArduinoFirmata.INPUT;
+      pinMode(pin, mode, callback) {
+        switch (mode) {
+          case true:
+            mode = ArduinoFirmata.OUTPUT;
+            break;
+          case false:
+            mode = ArduinoFirmata.INPUT;
+        }
+        return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
       }
-      return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
-    };
 
-    ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
-      var port_num;
-      this.pinMode(pin, ArduinoFirmata.OUTPUT);
-      port_num = (pin >>> 3) & 0x0F;
-      if (value === 0 || value === false) {
-        this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
-      } else {
-        this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+      digitalWrite(pin, value, callback) {
+        var port_num;
+        this.pinMode(pin, ArduinoFirmata.OUTPUT);
+        port_num = (pin >>> 3) & 0x0F;
+        if (value === 0 || value === false) {
+          this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
+        } else {
+          this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+        }
+        return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
       }
-      return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
-    };
 
-    ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
-      value = Math.floor(value);
-      this.pinMode(pin, ArduinoFirmata.PWM);
-      return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
-    };
+      analogWrite(pin, value, callback) {
+        value = Math.floor(value);
+        this.pinMode(pin, ArduinoFirmata.PWM);
+        return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
+      }
 
-    ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
-      this.pinMode(pin, ArduinoFirmata.SERVO);
-      return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
-    };
+      servoWrite(pin, angle, callback) {
+        this.pinMode(pin, ArduinoFirmata.SERVO);
+        return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
+      }
 
-    ArduinoFirmata.prototype.digitalRead = function(pin) {
-      return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
-    };
+      digitalRead(pin) {
+        return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
+      }
 
-    ArduinoFirmata.prototype.analogRead = function(pin) {
-      return this.analog_input_data[pin];
-    };
+      analogRead(pin) {
+        return this.analog_input_data[pin];
+      }
 
-    ArduinoFirmata.prototype.process_input = function(input_data) {
-      var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
-      if (this.parsing_sysex) {
-        if (input_data === ArduinoFirmata.END_SYSEX) {
-          this.parsing_sysex = false;
-          sysex_command = this.stored_input_data[0];
-          sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
-          return this.emit('sysex', {
-            command: sysex_command,
-            data: sysex_data
-          });
-        } else {
-          this.stored_input_data[this.sysex_bytes_read] = input_data;
-          return this.sysex_bytes_read += 1;
-        }
-      } else if (this.wait_for_data > 0 && input_data < 128) {
-        this.wait_for_data -= 1;
-        this.stored_input_data[this.wait_for_data] = input_data;
-        if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
-          switch (this.execute_multi_byte_command) {
-            case ArduinoFirmata.DIGITAL_MESSAGE:
-              input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
-              diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
-              this.digital_input_data[this.multi_byte_channel] = input_data;
-              if (this.listeners('digitalChange').length > 0) {
-                results = [];
-                for (i = j = 0; j <= 13; i = ++j) {
-                  if (((0x01 << i) & diff) > 0) {
-                    stat = (input_data & diff) > 0;
-                    results.push(this.emit('digitalChange', {
-                      pin: i + this.multi_byte_channel * 8,
-                      value: stat,
-                      old_value: !stat
-                    }));
-                  } else {
-                    results.push(void 0);
+      process_input(input_data) {
+        var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
+        if (this.parsing_sysex) {
+          if (input_data === ArduinoFirmata.END_SYSEX) {
+            this.parsing_sysex = false;
+            sysex_command = this.stored_input_data[0];
+            sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
+            return this.emit('sysex', {
+              command: sysex_command,
+              data: sysex_data
+            });
+          } else {
+            this.stored_input_data[this.sysex_bytes_read] = input_data;
+            return this.sysex_bytes_read += 1;
+          }
+        } else if (this.wait_for_data > 0 && input_data < 128) {
+          this.wait_for_data -= 1;
+          this.stored_input_data[this.wait_for_data] = input_data;
+          if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
+            switch (this.execute_multi_byte_command) {
+              case ArduinoFirmata.DIGITAL_MESSAGE:
+                input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+                diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
+                this.digital_input_data[this.multi_byte_channel] = input_data;
+                if (this.listeners('digitalChange').length > 0) {
+                  results = [];
+                  for (i = j = 0; j <= 13; i = ++j) {
+                    if (((0x01 << i) & diff) > 0) {
+                      stat = (input_data & diff) > 0;
+                      results.push(this.emit('digitalChange', {
+                        pin: i + this.multi_byte_channel * 8,
+                        value: stat,
+                        old_value: !stat
+                      }));
+                    } else {
+                      results.push(void 0);
+                    }
                   }
+                  return results;
+                }
+                break;
+              case ArduinoFirmata.ANALOG_MESSAGE:
+                analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+                old_analog_value = this.analogRead(this.multi_byte_channel);
+                this.analog_input_data[this.multi_byte_channel] = analog_value;
+                if (old_analog_value !== analog_value) {
+                  return this.emit('analogChange', {
+                    pin: this.multi_byte_channel,
+                    value: analog_value,
+                    old_value: old_analog_value
+                  });
                 }
-                return results;
-              }
-              break;
-            case ArduinoFirmata.ANALOG_MESSAGE:
-              analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
-              old_analog_value = this.analogRead(this.multi_byte_channel);
-              this.analog_input_data[this.multi_byte_channel] = analog_value;
-              if (old_analog_value !== analog_value) {
-                return this.emit('analogChange', {
-                  pin: this.multi_byte_channel,
-                  value: analog_value,
-                  old_value: old_analog_value
-                });
-              }
-              break;
-            case ArduinoFirmata.REPORT_VERSION:
-              this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
-              return this.emit('boardVersion', this.boardVersion);
+                break;
+              case ArduinoFirmata.REPORT_VERSION:
+                this.boardVersion = `${this.stored_input_data[1]}.${this.stored_input_data[0]}`;
+                return this.emit('boardVersion', this.boardVersion);
+            }
           }
-        }
-      } else {
-        if (input_data < 0xF0) {
-          command = input_data & 0xF0;
-          this.multi_byte_channel = input_data & 0x0F;
         } else {
-          command = input_data;
-        }
-        if (command === ArduinoFirmata.START_SYSEX) {
-          this.parsing_sysex = true;
-          return this.sysex_bytes_read = 0;
-        } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
-          this.wait_for_data = 2;
-          return this.execute_multi_byte_command = command;
+          if (input_data < 0xF0) {
+            command = input_data & 0xF0;
+            this.multi_byte_channel = input_data & 0x0F;
+          } else {
+            command = input_data;
+          }
+          if (command === ArduinoFirmata.START_SYSEX) {
+            this.parsing_sysex = true;
+            return this.sysex_bytes_read = 0;
+          } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
+            this.wait_for_data = 2;
+            return this.execute_multi_byte_command = command;
+          }
         }
       }
+
+    };
+
+    ArduinoFirmata.Status = {
+      CLOSE: 0,
+      OPEN: 1
     };
 
+    ArduinoFirmata.INPUT = 0;
+
+    ArduinoFirmata.OUTPUT = 1;
+
+    ArduinoFirmata.ANALOG = 2;
+
+    ArduinoFirmata.PWM = 3;
+
+    ArduinoFirmata.SERVO = 4;
+
+    ArduinoFirmata.SHIFT = 5;
+
+    ArduinoFirmata.I2C = 6;
+
+    ArduinoFirmata.LOW = 0;
+
+    ArduinoFirmata.HIGH = 1;
+
+    ArduinoFirmata.MAX_DATA_BYTES = 32;
+
+    ArduinoFirmata.DIGITAL_MESSAGE = 0x90; // send data for a digital port
+
+    ArduinoFirmata.ANALOG_MESSAGE = 0xE0; // send data for an analog pin (or PWM)
+
+    ArduinoFirmata.REPORT_ANALOG = 0xC0; // enable analog input by pin
+
+    ArduinoFirmata.REPORT_DIGITAL = 0xD0; // enable digital input by port
+
+    ArduinoFirmata.SET_PIN_MODE = 0xF4; // set a pin to INPUT/OUTPUT/PWM/etc
+
+    ArduinoFirmata.REPORT_VERSION = 0xF9; // report firmware version
+
+    ArduinoFirmata.SYSTEM_RESET = 0xFF; // reset from MIDI
+
+    ArduinoFirmata.START_SYSEX = 0xF0; // start a MIDI SysEx message
+
+    ArduinoFirmata.END_SYSEX = 0xF7; // end a MIDI SysEx message
+
     return ArduinoFirmata;
 
-  })(events.EventEmitter2);
+  }).call(this);
 
 }).call(this);
index 6e2fa3c58554b72cbdaf176e8d5fbe332e7b91d2..2e5da4e39b53ade8528ab815a0cc2e0bb1387d22 100644 (file)
@@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=cylon
 PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_SRC_NAME:=$(PKG_NPM_NAME)-firmata
 PKG_VERSION:=0.24.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
-PKG_SOURCE_VERSION:=a930f8446f23ec2cb28aadeff54b79ab7704e3a0
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=dceb75539d32f402db0a5f68f2c7e2b52e5547a5ac2dec875d34fd3cc95cce00
+PKG_SOURCE:=$(PKG_SRC_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_SRC_NAME)/-/
+PKG_HASH:=06ac7a8e2e6012577d2f4b043af766bf28a1d3e2a0d50e46629dab4f0bb65104
+PKG_SOURCE_SUBDIR:=$(PKG_SRC_NAME)-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
@@ -33,7 +32,7 @@ define Package/node-cylon/default
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=CylonJS - $(1)
-  URL:=https://www.npmjs.org/package/cylon
+  URL:=https://www.npmjs.org/package/cylon-firmata
   DEPENDS:=+node +node-npm $(2)
 endef
 
@@ -54,52 +53,55 @@ define Package/node-cylon-firmata
 endef
 
 define Package/node-cylon/description
      JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
+ JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
 endef
 
-define Build/Prepare
-       /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
-       $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; \
+       $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
 endef
 
 define Package/node-cylon/install
-       mkdir -p $(1)/usr/lib/node/cylon
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
 endef
 
 define Package/node-cylon-i2c/install
-       mkdir -p $(1)/usr/lib/node/cylon-i2c
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon-i2c
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
 endef
 
 define Package/node-cylon-gpio/install
-       mkdir -p $(1)/usr/lib/node/cylon-gpio
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon-gpio
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
 endef
 
 define Package/node-cylon-firmata/install
-       mkdir -p $(1)/usr/lib/node/cylon-firmata
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon-firmata
+       $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.md} \
+               $(1)/usr/lib/node/cylon-firmata/
+       $(CP) $(PKG_BUILD_DIR)/{docs,examples,*.js} \
+               $(1)/usr/lib/node/cylon-firmata/
+       $(CP) $(PKG_BUILD_DIR)/{lib,spec} \
+               $(1)/usr/lib/node/cylon-firmata/
 endef
 
 $(eval $(call BuildPackage,node-cylon))
 $(eval $(call BuildPackage,node-cylon-i2c))
 $(eval $(call BuildPackage,node-cylon-gpio))
 $(eval $(call BuildPackage,node-cylon-firmata))
-
index ec5b19fe703ac60c5656542bbed1e9bf9ac04f09..6cd500467422d895f30d6666722187c15d2ebdf8 100644 (file)
@@ -7,23 +7,20 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_NPM_NAME:=hid
-PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.7.2
+PKG_NPM_NAME:=node-hid
+PKG_NAME:=$(PKG_NPM_NAME)
+PKG_VERSION:=0.7.7
 PKG_RELEASE:=2
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v0.7.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=ede801a26a23290ab76d64ab636c3c3e2788030bb830af7006d37444c2a7b2c4
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=ac14467265a64116114e99091cd557ca7953500285c78cb4bdf6b82fe262cca6
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT or X11
 PKG_LICENSE_FILES:=
 
 include $(INCLUDE_DIR)/package.mk
@@ -34,43 +31,50 @@ define Package/node-hid
   CATEGORY:=Languages
   TITLE:=Node.js package to access HID devices
   URL:=https://github.com/node-hid/node-hid
-  DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +libudev-fbsd
+  DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev-fbsd
 endef
 
 define Package/node-hid/description
  Node.js package to access HID devices
 endef
 
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC) -I$(STAGING_DIR)/usr/include/libusb-1.0
 
 define Build/Compile
        git init $(PKG_BUILD_DIR)
-       cd $(PKG_BUILD_DIR) ; \
        $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install --build-from-source --target_arch=$(CPU) -g \
-               `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+       rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
 endef
 
 define Package/node-hid/install
-       mkdir -p $(1)/usr/lib/node/node-hid/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node/
-       $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
-                 $(1)/usr/lib/node/node-hid/.p* \
-                 $(1)/usr/lib/node/node-hid/.quilt* \
-                 $(1)/usr/lib/node/node-hid/.built* \
-                 $(1)/usr/lib/node/node-hid/.config*
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID.node \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
 endef
 
 $(eval $(call BuildPackage,node-hid))
-
diff --git a/lang/node-homebridge/Makefile b/lang/node-homebridge/Makefile
new file mode 100644 (file)
index 0000000..ba5133a
--- /dev/null
@@ -0,0 +1,72 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NPM_NAME:=homebridge
+PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_VERSION:=0.4.48
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=020a4d882c04ed26a3c96b8a5e82768b29309cf461aa9a17f330887ed12e3e6b
+
+PKG_BUILD_DEPENDS:=node/host
+PKG_USE_MIPS16:=0
+
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=ISC Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/node-homebridge
+  SUBMENU:=Node.js
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Node.js HomeKit Server
+  URL:=https://www.npmjs.org/package/homebridge
+  DEPENDS:=+node +node-npm
+  USERID:=homebridge:homebridge
+endef
+
+define Package/node-homebridge/description
+ Homebridge is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API
+endef
+
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
+
+TARGET_CFLAGS+=$(FPIC)
+
+define Build/Prepare
+       $(INSTALL_DIR) $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+       $(MAKE_VARS) \
+       $(MAKE_FLAGS) \
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+       npm install -g $(DL_DIR)/$(PKG_SOURCE)
+       rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+       rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
+endef
+
+define Package/node-homebridge/install
+       $(INSTALL_DIR) $(1)/usr/lib/node
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(LN) ../lib/node/homebridge/bin/homebridge $(1)/usr/bin/homebridge
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/homebridge.init $(1)/etc/init.d/homebridge
+endef
+
+$(eval $(call BuildPackage,node-homebridge))
diff --git a/lang/node-homebridge/files/homebridge.init b/lang/node-homebridge/files/homebridge.init
new file mode 100644 (file)
index 0000000..cea6b87
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+
+START=98
+USE_PROCD=1
+
+start_service() {
+       [ -d /usr/share/homebridge ] || {
+               mkdir -m 0755 -p /usr/share/homebridge
+               chmod 0700 /usr/share/homebridge
+               chown homebridge:homebridge /usr/share/homebridge
+       }
+       procd_open_instance
+       procd_set_param command /usr/bin/homebridge -U /usr/share/homebridge
+       procd_set_param user homebridge
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
+}
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 2c75acf0679e69959f17f5e41f480b896f6fa7ea..3c77f177ad7320c79bf707b2d4cb906634b131fc 100644 (file)
@@ -9,18 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=serialport
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=6.1.1
+PKG_VERSION:=7.1.4
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=b58c326d217fb0af1639e4ea834d9fca4be16934c486499e2ddac6e52b8dd560
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d6f60bd81fe94578dee8e82887a66c5b007ec3f346b13d8156dd94a46f2b4849
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
@@ -29,8 +29,8 @@ define Package/node-serialport
   SUBMENU:=Node.js
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=Node.js package to access serial ports for reading and writing
-  URL:=https://www.npmjs.org/package/serialport
+  TITLE:=Node.js package to access serial ports
+  URL:=https://serialport.io/
   DEPENDS:=+node +node-npm
 endef
 
@@ -38,39 +38,37 @@ define Package/node-serialport/description
  Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
 endef
 
-define Build/Prepare
-       /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
-       $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+TARGET_CFLAGS+=$(FPIC)
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; \
+       $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install --build-from-source --target_arch=$(CPU) -g \
-               `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache-$(TMPNPM) \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp-$(TMPNPM) \
+       npm install -g --build-from-source $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp-$(TMPNPM)
+       rm -rf $(TMP_DIR)/npm-cache-$(TMPNPM)
 endef
 
 define Package/node-serialport/install
-       mkdir -p $(1)/usr/lib/node/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
-       $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
-                 $(1)/usr/lib/node/node-hid/.p* \
-                 $(1)/usr/lib/node/node-hid/.quilt* \
-                 $(1)/usr/lib/node/node-hid/.built* \
-                 $(1)/usr/lib/node/node-hid/.config*
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,LICENSE,*.md} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/test.js \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
 endef
 
 $(eval $(call BuildPackage,node-serialport))
-
index cd3e149ec04b1f4b34eca653c80ddfed1322b6a8..25816a893003eb2d2c17639d44739a364a1dd8f1 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
-PKG_VERSION:=v8.14.1
+PKG_VERSION:=v8.16.0
 PKG_RELEASE:=1
 PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION}
-PKG_HASH:=b1df87803ddffb76fc6739f025f69f6b8288514fcd2f278f0d675ac3d52a6b9b
+PKG_HASH:=3515e8e01568a5dc4dff3d91a76ebc6724f5fa2fbb58b4b0c5da7b178a2f7340
 
 HOST_BUILD_DEPENDS:=python/host
 PKG_BUILD_DEPENDS:=python/host
@@ -37,7 +37,10 @@ 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 \
+          +USE_UCLIBC:libpthread +USE_UCLIBC:librt \
+          +NODEJS_ICU:icu
 endef
 
 define Package/node/description
@@ -60,13 +63,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]);
index 724374227b2301ee830d170d9cea2455ce60bb48..832e8b93f76f56b1aec27e75dafbd9bcddf77cff 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-cgi
-PKG_VERSION:=4.40
+PKG_VERSION:=4.42
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/L/LE/LEEJO
 PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_HASH:=10efff3061b3c31a33b3cc59f955aef9c88d57d12dbac46389758cef92f24f56
+PKG_HASH:=11d308e7dad2312d65747a7fdec5d0c22024c28df5e882e829ca1553482024e7
 
-PKG_LICENSE:=GPL Artistic-2.0
+PKG_LICENSE:=Artistic-2.0
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>, \
                Philip Prindeville <philipp@redfish-solutions.com>
 
@@ -32,7 +32,7 @@ define Package/perl-cgi
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Handle Common Gateway Interface requests and responses
-  URL:=http://search.cpan.org/dist/CGI/
+  URL:=https://search.cpan.org/dist/CGI/
   DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8
 endef
 
index 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
 
index d7dff8dbaa7d91a7384b60a0efa8f8b92dbf1bbe..a9eb3dc9a8ffc950bc367c5da938b6670a131379 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-parse-recdescent
-PKG_VERSION:=1.967013
+PKG_VERSION:=1.967015
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JT/JTBRAUN
+PKG_SOURCE_URL:=https://www.cpan.org/authors/id/J/JT/JTBRAUN
 PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz
-PKG_HASH:=226590d3850cd1678deb0190d5207b3477fb9070a8ca6f18d8999daf44485930
+PKG_HASH:=1943336a4cb54f1788a733f0827c0c55db4310d5eae15e542639c9dd85656e37
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
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 14d90c00c0c57ccff054c10d18a874124f6ca422..2c5aa18ba0616de5e407e2bb07f115196a7c46e0 100644 (file)
@@ -1,12 +1,16 @@
 # 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. [Build considerations](#build-considerations)
+5. [General folder structure](#general-folder-structure)
+6. [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 +25,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).
@@ -152,13 +188,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
@@ -209,13 +248,73 @@ The name `*-src` must be the Python package name; so for `python-lxml-src` a equ
 
 Some packages need custom build rules (because they do).
 
-For building, if a user specifies a `PyBuild/Compile` & `Py3Build/Compile` rule, this will be used to build/compile the package, instead of the default one defined in `python[3]-package.mk`.
+The default package build and install processes are defined in `python[3]-package.mk`.
+
+#### Building
+
+The default build process calls `setup.py install` inside the directory where the Python source package is extracted (`PKG_BUILD_DIR`). This "installs" the Python package to an intermediate location (`PKG_INSTALL_DIR`) where it is used by the default install process.
 
-For installing files on the target, 2 build rules are used:
-* `PyPackage/$(1)/filespec` & `Py3Package/$(1)/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` ; most Python[3] packages generate files that get installed in this sub-folder
-* `PyPackage/$(1)/install` & `Py3Package/$(1)/install` is similar to `Package/$(1)/install` ; these allow binary (or other files) to be installed on the target
+There are several Makefile variables that can be used to customize this process (all optional):
+
+* `PYTHON_PKG_SETUP_DIR` / `PYTHON3_PKG_SETUP_DIR`: Path where `setup.py` can be found, relative to the package directory (`PKG_BUILD_DIR`).  
+  Default: empty value (`setup.py` is in the package directory)
+* `PYTHON_PKG_SETUP_VARS` / `PYTHON3_PKG_SETUP_VARS`: Additional environment variables to set for the call to `setup.py`. Should be in the form of `VARIABLE1=value VARIABLE2=value ...`.  
+  Default: empty value
+* `PYTHON_PKG_SETUP_GLOBAL_ARGS` / `PYTHON3_PKG_SETUP_GLOBAL_ARGS`: Additional command line arguments to pass to `setup.py`, before / in front of the `install` command.  
+  Default: empty value
+* `PYTHON_PKG_SETUP_ARGS` / `PYTHON3_PKG_SETUP_ARGS`: Additional command line arguments to pass to `setup.py`, after the `install` command.  
+  Default: `--single-version-externally-managed`
+
+Conceptually, these variables are used in this way (using a Python 2 package as an example):
+
+```
+cd $(PKG_BUILD_DIR)/$(PYTHON_PKG_SETUP_DIR)
+$(PYTHON_PKG_SETUP_VARS) python setup.py $(PYTHON_PKG_SETUP_GLOBAL_ARGS) install $(PYTHON_PKG_SETUP_ARGS)
+```
 
-Both the 2 above rules generate a `Package/$(1)/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages.
+The default build process can be completely overridden by defining custom `PyBuild/Compile` & `Py3Build/Compile` rules in the package Makefile.
+
+#### Installing
+
+The default install process copies some/all of the files from `PKG_INSTALL_DIR`, placed there by the build process, to a location passed to the install rule as the first argument (`$(1)`). The OpenWrt build system will then take those files and create the actual .ipk package archives.
+
+This default process uses 2 build rules:
+* `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` which are Python library files relative to `/usr/lib/pythonX.Y` ; by default this is `/usr/lib/python$(PYTHON[3]_VERSION)/site-packages` (`PYTHON[3]_PKG_DIR`) ; most Python[3] packages generate files that get installed in this sub-folder
+* `PyPackage/<package>/install` & `Py3Package/<package>/install` is similar to `Package/<package>/install` ; these allow binary (or other files) to be installed on the target
+
+Both the 2 above rules generate a `Package/<package>/install` build rule, which gets picked up by the build system. Both can be used together (they are not mutually exclusive), and provide a good enough flexibility for specifying Python[3] packages.
+
+The `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` rules contain one or more lines of the following format (whitespace added for clarity):
+
+```
+<one of: +-=> | <file/directory path> | <file permissions>
+```
+
+The initial character controls the action that will be taken:
+
+* `+`: Install the given path. If the path is a directory, all files and subdirectories inside are installed.
+  * If file permissions is specified (optional), then the file or directory (and all files and subdirectories) are assigned the given permissions; if omitted, then the file or directory retains its original permissions.
+* `-`: Remove the given path. Useful when most of a directory should be installed except for a few files or subdirectories.
+  * File permissions is not used / ignored in this case.
+* `=`: Assign the given file permissions to the given path. File permissions is required in this case.
+
+As mentioned, the default `PyPackage/<package>/filespec` & `Py3Package/<package>/filespec` install `PYTHON[3]_PKG_DIR`:
+
+```
+define PyPackage/python-example/filespec
++|$(PYTHON_PKG_DIR)
+endef
+```
+
+If there is an `examples` directory and `test_*.py` files that can be omitted to save space, this can be specified as:
+
+```
+define PyPackage/python-example/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/examples
+-|$(PYTHON_PKG_DIR)/test_*.py
+endef
+```
 
 ### Host-side Python packages for build
 
index 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-aiohttp/Makefile b/lang/python/python-aiohttp/Makefile
new file mode 100644 (file)
index 0000000..f1de0b5
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=aiohttp
+PKG_VERSION:=3.5.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=aiohttp-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/aiohttp/
+PKG_HASH:=9c4c83f4fa1938377da32bc2d59379025ceeee8e24b89f72fcbccd8ca22dc9bf
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:aio-libs_project:aiohttp
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-aiohttp
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Async http client/server framework (asyncio)
+  URL:=https://github.com/aio-libs/aiohttp
+  DEPENDS:= \
+       +python3-light \
+       +python3-attrs \
+       +python3-chardet \
+       +python3-multidict \
+       +python3-async-timeout \
+       +python3-yarl \
+       +python3-logging \
+       +python3-codecs \
+       +python3-cgi \
+       +python3-openssl
+  VARIANT:=python3
+endef
+
+define Package/python3-aiohttp/description
+Asynchronous HTTP client/server framework for asyncio and Python3
+endef
+
+$(eval $(call Py3Package,python3-aiohttp))
+$(eval $(call BuildPackage,python3-aiohttp))
+$(eval $(call BuildPackage,python3-aiohttp-src))
diff --git a/lang/python/python-astral/Makefile b/lang/python/python-astral/Makefile
new file mode 100644 (file)
index 0000000..7243eb0
--- /dev/null
@@ -0,0 +1,70 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-astral
+PKG_VERSION:=1.10.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=astral-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/astral/
+PKG_HASH:=d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-astral-$(PKG_VERSION)
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-astral/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Calculations for the position of the sun and moon
+  URL:=https://github.com/sffjunkie/astral
+endef
+
+define Package/python-astral
+$(call Package/python-astral/Default)
+  DEPENDS+= \
+      +PACKAGE_python-astral:python-light \
+      +PACKAGE_python-astral:python-pytz
+  VARIANT:=python
+endef
+
+define Package/python3-astral
+$(call Package/python-astral/Default)
+  DEPENDS+= \
+      +PACKAGE_python3-astral:python3-light \
+      +PACKAGE_python3-astral:python3-pytz
+  VARIANT:=python3
+endef
+
+define Package/python-astral/description
+Astral is a python module for calculating the times of various aspects of the sun and moon.
+endef
+
+define Package/python3-astral/description
+$(call Package/python-astral/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-astral))
+$(eval $(call BuildPackage,python-astral))
+$(eval $(call BuildPackage,python-astral-src))
+
+$(eval $(call Py3Package,python3-astral))
+$(eval $(call BuildPackage,python3-astral))
+$(eval $(call BuildPackage,python3-astral-src))
diff --git a/lang/python/python-async-timeout/Makefile b/lang/python/python-async-timeout/Makefile
new file mode 100644 (file)
index 0000000..a8c76c1
--- /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:=async-timeout
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=async-timeout-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/async-timeout/
+PKG_HASH:=0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-async-timeout
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Timeout context manager for asyncio programs
+  URL:=https://github.com/aio-libs/async-timeout
+  DEPENDS:= \
+  +python3-light \
+  +python3-asyncio
+  VARIANT:=python3
+endef
+
+define Package/python3-async-timeout/description
+Timeout context manager for asyncio programs
+endef
+
+$(eval $(call Py3Package,python3-async-timeout))
+$(eval $(call BuildPackage,python3-async-timeout))
+$(eval $(call BuildPackage,python3-async-timeout-src))
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-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 030fd9391f9d8e3d20ee29ccf0df4e4a4876a69a..02e8966623b2bb1fa71a7cceeeb7156d550b1c37 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptodome
-PKG_VERSION:=3.7.3
+PKG_VERSION:=3.8.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pycryptodome-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodome
-PKG_HASH:=1a222250e43f3c659b4ebd5df3e11c2f112aab6aef58e38af55ef5678b9f0636
+PKG_HASH:=68ad0ce4a374577a26bb7f458575abe3c2a342818b5280de6e5738870b7761b3
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodome-$(PKG_VERSION)
 
index 6f16b2175150f2ca49cfa6345f10bb9943390fed..cbaf70f25b367a5c05ba35fab31a3c2278301531 100644 (file)
@@ -1,50 +1,12 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -245,16 +245,6 @@
-     "Crypto.Signature",
-     "Crypto.Util",
-     "Crypto.Math",
--    "Crypto.SelfTest",
--    "Crypto.SelfTest.Cipher",
--    "Crypto.SelfTest.Hash",
--    "Crypto.SelfTest.IO",
--    "Crypto.SelfTest.Protocol",
--    "Crypto.SelfTest.PublicKey",
--    "Crypto.SelfTest.Random",
--    "Crypto.SelfTest.Signature",
--    "Crypto.SelfTest.Util",
--    "Crypto.SelfTest.Math",
- ]
- package_dir = {"Crypto": "lib/Crypto"}
- package_data = {
-@@ -268,30 +258,6 @@
-     "Crypto.Signature" : [ "*.pyi" ],
-     "Crypto.IO" : [ "*.pyi" ],
-     "Crypto.Util" : [ "*.pyi" ],
--    "Crypto.SelfTest.Cipher" : [
--        "test_vectors/AES/*.rsp",
--        "test_vectors/TDES/*.rsp",
--        "test_vectors/wycheproof/*.json",
--    ],
--    "Crypto.SelfTest.Hash" : [
--        "test_vectors/SHA1/*.rsp",
--        "test_vectors/SHA2/*.rsp",
--        "test_vectors/SHA3/*.txt",
--        "test_vectors/keccak/*.txt",
--        "test_vectors/BLAKE2s/*.txt",
--        "test_vectors/BLAKE2b/*.txt",
--        "test_vectors/wycheproof/*.json",
--    ],
--    "Crypto.SelfTest.Signature" : [
--        "test_vectors/DSA/*.*",
--        "test_vectors/ECDSA/*.*",
--        "test_vectors/PKCS1-v1.5/*.*",
--        "test_vectors/PKCS1-PSS/*.*",
--        "test_vectors/wycheproof/*.json",
--    ],
--    "Crypto.SelfTest.PublicKey" : [
--        "test_vectors/ECC/*.*",
--    ],
+@@ -293,6 +293,9 @@ package_data = {
+     ],
  }
  
- system_bits = 8 * struct.calcsize("P")
++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')]
++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')}
++
+ ext_modules = [
+     # Hash functions
+     Extension("Crypto.Hash._MD2",
index 6691b7f04d89d881881d539eb4378710965fafdc..ec748204347850897cfcc12ecbd1c262608633ad 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptodomex
-PKG_VERSION:=3.7.3
+PKG_VERSION:=3.8.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=pycryptodomex-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycryptodomex
-PKG_HASH:=b70fe991564e178af02ccf89435a8f9e8d052707a7c4b95bf6027cb785da3175
+PKG_HASH:=9251b3f6254d4274caa21b79bd432bf07afa3567c6f02f11861659fb6245139a
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
 
index 23e264ae3d2e361e9473efc88cc77bee12201ce2..cbaf70f25b367a5c05ba35fab31a3c2278301531 100644 (file)
@@ -1,50 +1,12 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -245,16 +245,6 @@
-     "Crypto.Signature",
-     "Crypto.Util",
-     "Crypto.Math",
--    "Crypto.SelfTest",
--    "Crypto.SelfTest.Cipher",
--    "Crypto.SelfTest.Hash",
--    "Crypto.SelfTest.IO",
--    "Crypto.SelfTest.Protocol",
--    "Crypto.SelfTest.PublicKey",
--    "Crypto.SelfTest.Random",
--    "Crypto.SelfTest.Signature",
--    "Crypto.SelfTest.Util",
--    "Crypto.SelfTest.Math",
- ]
- package_dir = {"Crypto": "lib/Crypto"}
- package_data = {
-@@ -268,30 +258,6 @@
-     "Crypto.Signature" : [ "*.pyi" ],
-     "Crypto.IO" : [ "*.pyi" ],
-     "Crypto.Util" : [ "*.pyi" ],
--    "Crypto.SelfTest.Cipher" : [
--        "test_vectors/AES/*.*",
--        "test_vectors/TDES/*.*",
--        "test_vectors/wycheproof/*.*",
--    ],
--    "Crypto.SelfTest.Hash" : [
--        "test_vectors/SHA1/*.*",
--        "test_vectors/SHA2/*.*",
--        "test_vectors/SHA3/*.*",
--        "test_vectors/keccak/*.*",
--        "test_vectors/BLAKE2s/*.*",
--        "test_vectors/BLAKE2b/*.*",
--        "test_vectors/wycheproof/*.*",
--    ],
--    "Crypto.SelfTest.Signature" : [
--        "test_vectors/DSA/*.*",
--        "test_vectors/ECDSA/*.*",
--        "test_vectors/PKCS1-v1.5/*.*",
--        "test_vectors/PKCS1-PSS/*.*",
--        "test_vectors/wycheproof/*.*",
--    ],
--    "Crypto.SelfTest.PublicKey" : [
--        "test_vectors/ECC/*.*",
--    ],
+@@ -293,6 +293,9 @@ package_data = {
+     ],
  }
  
- system_bits = 8 * struct.calcsize("P")
++packages = [i for i in packages if not i.startswith('Crypto.SelfTest')]
++package_data = {k: v for k, v in package_data.items() if not k.startswith('Crypto.SelfTest')}
++
+ ext_modules = [
+     # Hash functions
+     Extension("Crypto.Hash._MD2",
index 3986b14abbad0ebd5237d69d6248762f486b4dd2..a5b4f54d407c7b4d1d9b9bea54a322e0a502999a 100644 (file)
@@ -6,40 +6,62 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pycurl
 PKG_VERSION:=7.43.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=pycurl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycurl
+PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
+
 PKG_MAINTAINER:=Waldemar Konik <informatyk74@interia.pl>
 PKG_LICENSE:=LGPL-2.1
-PKG_LICENSE_FILE=COPYING-LGPL
+PKG_LICENSE_FILES:=COPYING-LGPL
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://dl.bintray.com/pycurl/pycurl/
-PKG_HASH:=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-curl-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/python-curl
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-curl/Default
   CATEGORY:=Languages
   SECTION:=lang
   SUBMENU:=Python
   TITLE:=Python module interface to the cURL library
   URL:=http://pycurl.io/
-  DEPENDS:=+python +libcurl
+  DEPENDS:=+libcurl
+endef
+
+define Package/python-curl
+$(call Package/python-curl/Default)
+  DEPENDS+=+PACKAGE_python-curl:python
+  VARIANT:=python
 endef
 
 define Package/python-curl/description
-Python module interface to the cURL library.
+PycURL is a Python interface to libcurl, the multiprotocol file transfer library.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --with-openssl --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-curl
+$(call Package/python-curl/Default)
+  DEPENDS+=+PACKAGE_python3-curl:python3
+  VARIANT:=python3
 endef
 
-define Package/python-curl/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-               $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-               $(1)$(PYTHON_PKG_DIR)
+define Package/python3-curl/description
+$(call Package/python-curl/description)
+.
+(Variant for Python3)
 endef
 
+PYTHON_PKG_SETUP_ARGS:=--with-mbedtls
+PYTHON3_PKG_SETUP_ARGS:=--with-mbedtls
+
+$(eval $(call PyPackage,python-curl))
 $(eval $(call BuildPackage,python-curl))
+$(eval $(call BuildPackage,python-curl-src))
+
+$(eval $(call Py3Package,python3-curl))
+$(eval $(call BuildPackage,python3-curl))
+$(eval $(call BuildPackage,python3-curl-src))
diff --git a/lang/python/python-curl/patches/0001-support-for-mbedTLS.patch b/lang/python/python-curl/patches/0001-support-for-mbedTLS.patch
new file mode 100644 (file)
index 0000000..58112ee
--- /dev/null
@@ -0,0 +1,263 @@
+From bb7d7a803665005cc72ad68a388e9e937ff3d2f6 Mon Sep 17 00:00:00 2001
+From: Josef Schlehofer <pepe.schlehofer@gmail.com>
+Date: Sat, 23 Mar 2019 21:02:17 +0100
+Subject: [PATCH] support for mbedTLS
+
+---
+ INSTALL.rst           |  4 ++--
+ doc/thread-safety.rst |  2 +-
+ setup.py              | 28 +++++++++++++++++++++-------
+ src/module.c          |  6 ++++--
+ src/pycurl.h          |  7 ++++++-
+ src/threadsupport.c   | 39 +++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 73 insertions(+), 13 deletions(-)
+
+diff --git a/INSTALL.rst b/INSTALL.rst
+index 8ad8b4f..da70d25 100644
+--- a/INSTALL.rst
++++ b/INSTALL.rst
+@@ -53,7 +53,7 @@ It will then fail at runtime as follows::
+ To fix this, you need to tell ``setup.py`` what SSL backend is used::
+-    python setup.py --with-[openssl|gnutls|nss] install
++    python setup.py --with-[openssl|gnutls|nss|mbedtls] install
+ Note: as of PycURL 7.21.5, setup.py accepts ``--with-openssl`` option to
+ indicate that libcurl is built against OpenSSL. ``--with-ssl`` is an alias
+@@ -85,7 +85,7 @@ environment variable::
+ The same applies to the SSL backend, if you need to specify it (see the SSL
+ note above)::
+-    export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss]
++    export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss|mbedtls]
+     easy_install pycurl
+diff --git a/doc/thread-safety.rst b/doc/thread-safety.rst
+index 5ba3f3e..ae2b9e5 100644
+--- a/doc/thread-safety.rst
++++ b/doc/thread-safety.rst
+@@ -21,7 +21,7 @@ For Python programs using PycURL, this means:
+   Python code *outside of a libcurl callback for the PycURL object in question*
+   is unsafe.
+-PycURL handles the necessary SSL locks for OpenSSL/LibreSSL, GnuTLS and NSS.
++PycURL handles the necessary SSL locks for OpenSSL/LibreSSL, GnuTLS, NSS and mbedTLS.
+ A special situation exists when libcurl uses the standard C library
+ name resolver (i.e., not threaded nor c-ares resolver). By default libcurl
+diff --git a/setup.py b/setup.py
+index e1e6925..5ab437f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -143,6 +143,7 @@ class ExtensionConfiguration(object):
+             '--with-ssl': self.using_openssl,
+             '--with-gnutls': self.using_gnutls,
+             '--with-nss': self.using_nss,
++            '--with-mbedtls': self.using_mbedtls,
+         }
+     def detect_ssl_option(self):
+@@ -152,20 +153,20 @@ class ExtensionConfiguration(object):
+                     if option != other_option:
+                         if scan_argv(self.argv, other_option) is not None:
+                             raise ConfigurationError('Cannot give both %s and %s' % (option, other_option))
+-                
++
+                 return option
+     def detect_ssl_backend(self):
+         ssl_lib_detected = False
+-        
++
+         if 'PYCURL_SSL_LIBRARY' in os.environ:
+             ssl_lib = os.environ['PYCURL_SSL_LIBRARY']
+-            if ssl_lib in ['openssl', 'gnutls', 'nss']:
++            if ssl_lib in ['openssl', 'gnutls', 'nss', 'mbedtls']:
+                 ssl_lib_detected = True
+                 getattr(self, 'using_%s' % ssl_lib)()
+             else:
+                 raise ConfigurationError('Invalid value "%s" for PYCURL_SSL_LIBRARY' % ssl_lib)
+-        
++
+         option = self.detect_ssl_option()
+         if option:
+             ssl_lib_detected = True
+@@ -194,6 +195,10 @@ class ExtensionConfiguration(object):
+                         self.using_nss()
+                         ssl_lib_detected = True
+                         break
++                    if arg[2:] == 'mbedtls':
++                        self.using_nss()
++                        ssl_lib_detected = True
++                        break
+         if not ssl_lib_detected and len(self.argv) == len(self.original_argv) \
+                 and not os.environ.get('PYCURL_CURL_CONFIG') \
+@@ -201,7 +206,7 @@ class ExtensionConfiguration(object):
+             # this path should only be taken when no options or
+             # configuration environment variables are given to setup.py
+             ssl_lib_detected = self.detect_ssl_lib_on_centos6()
+-            
++
+         self.ssl_lib_detected = ssl_lib_detected
+     def curl_config(self):
+@@ -301,7 +306,7 @@ class ExtensionConfiguration(object):
+             if errtext:
+                 msg += ":\n" + errtext
+             raise ConfigurationError(msg)
+-            
++
+         # hack
+         self.sslhintbuf = sslhintbuf
+@@ -327,7 +332,7 @@ specify the SSL backend manually.''')
+                 self.library_dirs.append(arg[2:])
+             else:
+                 self.extra_link_args.append(arg)
+-            
++
+         if not self.libraries:
+             self.libraries.append("curl")
+@@ -354,6 +359,9 @@ specify the SSL backend manually.''')
+         elif ssl_version.startswith('NSS/'):
+             self.using_nss()
+             ssl_lib_detected = True
++        elif ssl_version.startswith('mbedTLS/'):
++            self.using_mbedtls()
++            ssl_lib_detected = 'mbedtls'
+         return ssl_lib_detected
+     def detect_ssl_lib_on_centos6(self):
+@@ -505,6 +513,11 @@ specify the SSL backend manually.''')
+         self.libraries.append('ssl3')
+         self.define_macros.append(('HAVE_CURL_SSL', 1))
++    def using_mbedtls(self):
++        self.define_macros.append(('HAVE_CURL_MBEDTLS', 1))
++        self.libraries.append('mbedtls')
++        self.define_macros.append(('HAVE_CURL_SSL', 1))
++
+ def get_bdist_msi_version_hack():
+     # workaround for distutils/msi version requirement per
+     # epydoc.sourceforge.net/stdlib/distutils.version.StrictVersion-class.html -
+@@ -871,6 +884,7 @@ PycURL Unix options:
+  --with-ssl                          legacy alias for --with-openssl
+  --with-gnutls                       libcurl is linked against GnuTLS
+  --with-nss                          libcurl is linked against NSS
++ --with-mbedtls                      libcurl is linked against mbedTLS
+ '''
+ windows_help = '''\
+diff --git a/src/module.c b/src/module.c
+index 2331ae8..7fdb25a 100644
+--- a/src/module.c
++++ b/src/module.c
+@@ -328,7 +328,7 @@ initpycurl(void)
+     PyObject *collections_module = NULL;
+     PyObject *named_tuple = NULL;
+     PyObject *arglist = NULL;
+-    
++
+     assert(Curl_Type.tp_weaklistoffset > 0);
+     assert(CurlMulti_Type.tp_weaklistoffset > 0);
+     assert(CurlShare_Type.tp_weaklistoffset > 0);
+@@ -355,6 +355,8 @@ initpycurl(void)
+         runtime_ssl_lib = "gnutls";
+     } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
+         runtime_ssl_lib = "nss";
++    } else if (!strncmp(vi->ssl_version, "mbedTLS/", 2)) {
++        runtime_ssl_lib = "mbedtls";
+     } else {
+         runtime_ssl_lib = "none/other";
+     }
+@@ -461,7 +463,7 @@ initpycurl(void)
+     /* constants for ioctl callback argument values */
+     insint_c(d, "IOCMD_NOP", CURLIOCMD_NOP);
+     insint_c(d, "IOCMD_RESTARTREAD", CURLIOCMD_RESTARTREAD);
+-    
++
+     /* opensocketfunction return value */
+     insint_c(d, "SOCKET_BAD", CURL_SOCKET_BAD);
+diff --git a/src/pycurl.h b/src/pycurl.h
+index 65290f7..2294cb8 100644
+--- a/src/pycurl.h
++++ b/src/pycurl.h
+@@ -174,6 +174,11 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+ #   define COMPILE_SSL_LIB "gnutls"
+ # elif defined(HAVE_CURL_NSS)
+ #   define COMPILE_SSL_LIB "nss"
++# elif defined(HAVE_CURL_MBEDTLS)
++#   include <mbedtls/ssl.h>
++#   define PYCURL_NEED_SSL_TSL
++#   define PYCURL_NEED_MBEDTLS_TSL
++#   define COMPILE_SSL_LIB "mbedtls"
+ # else
+ #  ifdef _MSC_VER
+     /* sigh */
+@@ -190,7 +195,7 @@ pycurl_inet_ntop (int family, void *addr, char *string, size_t string_size);
+    /* since we have no crypto callbacks for other ssl backends,
+     * no reason to require users match those */
+ #  define COMPILE_SSL_LIB "none/other"
+-# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS */
++# endif /* HAVE_CURL_OPENSSL || HAVE_CURL_GNUTLS || HAVE_CURL_NSS || HAVE_CURL_MBEDTLS */
+ #else
+ # define COMPILE_SSL_LIB "none/other"
+ #endif /* HAVE_CURL_SSL */
+diff --git a/src/threadsupport.c b/src/threadsupport.c
+index 6ca07f5..51abffd 100644
+--- a/src/threadsupport.c
++++ b/src/threadsupport.c
+@@ -232,6 +232,45 @@ pycurl_ssl_cleanup(void)
+ }
+ #endif
++/* mbedTLS */
++
++#ifdef PYCURL_NEED_MBEDTLS_TSL
++static int
++pycurl_ssl_mutex_create(void **m)
++{
++    if ((*((PyThread_type_lock *) m) = PyThread_allocate_lock()) == NULL) {
++        return -1;
++    } else {
++        return 0;
++    }
++}
++
++static int
++pycurl_ssl_mutex_destroy(void **m)
++{
++    PyThread_free_lock(*((PyThread_type_lock *) m));
++    return 0;
++}
++
++static int
++pycurl_ssl_mutex_lock(void **m)
++{
++    return !PyThread_acquire_lock(*((PyThread_type_lock *) m), 1);
++}
++
++PYCURL_INTERNAL int
++pycurl_ssl_init(void)
++{
++    return 0;
++}
++
++PYCURL_INTERNAL void
++pycurl_ssl_cleanup(void)
++{
++    return;
++}
++#endif
++
+ /*************************************************************************
+ // CurlShareObject
+ **************************************************************************/
+-- 
+2.17.0.windows.1
+
index 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))
diff --git a/lang/python/python-multidict/Makefile b/lang/python/python-multidict/Makefile
new file mode 100644 (file)
index 0000000..971c382
--- /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:=multidict
+PKG_VERSION:=4.5.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=multidict-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/multidict/
+PKG_HASH:=024b8129695a952ebd93373e45b5d341dbb87c17ce49637b34000093f243dd4f
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-multidict
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=multidict implementation
+  URL:=https://github.com/aio-libs/multidict
+  DEPENDS:= \
+      +python3-light \
+      +python3-attrs
+  VARIANT:=python3
+endef
+
+define Package/python3-multidict/description
+Multidict is dict-like collection of key-value pairs where key might be occurred more than once in the container.
+endef
+
+$(eval $(call Py3Package,python3-multidict))
+$(eval $(call BuildPackage,python3-multidict))
+$(eval $(call BuildPackage,python3-multidict-src))
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 a1b21e49f47c24efaf3443e373e9ed0f011bdf95..2ca2abc16e13e77daf5b9848d2e493084a90d688 100644 (file)
@@ -43,11 +43,7 @@ process_filespec() {
 delete_empty_dirs() {
        local dst_dir="$1"
        if [ -d "$dst_dir/usr" ] ; then
-               for _ in $(seq 1 10) ; do
-                       find "$dst_dir/usr" -empty -type d -exec rmdir {} \; || continue
-                       break
-               done
-               rmdir "$dst_dir/usr" || true
+               find "$dst_dir/usr" -empty -type d -delete
        fi
 }
 
@@ -58,7 +54,9 @@ python="$4"
 mode="$5"
 filespec="$6"
 
-find "$src_dir" -name "*\.exe" -exec rm -f {} \;
+SED="${SED:-sed -e}"
+
+find "$src_dir" -name "*.exe" -delete
 
 process_filespec "$src_dir" "$dst_dir" "$filespec" || {
        echo "process filespec error-ed"
@@ -68,12 +66,12 @@ process_filespec "$src_dir" "$dst_dir" "$filespec" || {
 usr_bin_dir="$dst_dir/usr/bin"
 
 if [ -d "$usr_bin_dir" ] ; then
-       sed "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i $usr_bin_dir/*
+       $SED "1"'!'"b;s,^#"'!'".*python.*,#"'!'"/usr/bin/python${ver}," -i --follow-symlinks $usr_bin_dir/*
 fi
 
 if [ "$mode" == "sources" ] ; then
        # Copy only python source files
-       find "$dst_dir" -not -type d -not -name "*\.py" -exec rm -f {} \;
+       find "$dst_dir" -not -type d -not -name "*.py" -delete
 
        delete_empty_dirs "$dst_dir"
        exit 0
@@ -81,6 +79,8 @@ fi
 
 legacy=
 [ "$ver" == "3" ] && legacy="-b"
+# default max recursion is 10
+max_recursion_level=20
 
 # XXX [So that you won't goof as I did]
 # Note: Yes, I tried to use the -O & -OO flags here.
@@ -88,14 +88,14 @@ legacy=
 #       So, we just stuck to un-optimized byte-codes,
 #       which is still way better/faster than running
 #       Python sources all the time.
-$python -m compileall $legacy -d '/' "$dst_dir" || {
+$python -m compileall -r "$max_recursion_level" $legacy -d '/' "$dst_dir" || {
        echo "python -m compileall err-ed"
        exit 1
 }
 
 # Delete source files and pyc [ un-optimized bytecode files ]
 # We may want to make this optimization thing configurable later, but not sure atm
-find "$dst_dir" -type f -name "*\.py" -exec rm -f {} \;
+find "$dst_dir" -type f -name "*.py" -delete
 
 delete_empty_dirs "$dst_dir"
 
index 9990d5340ae0347313c08a5e15280384026ae477..c594f614ed34c240fe027f1da4e91eff2fe5d07c 100644 (file)
@@ -69,6 +69,7 @@ define PyPackage
 
   define Package/$(1)/install
        $$(call PyPackage/$(1)/install,$$(1))
+       SED="$(SED)" \
        $(SHELL) $(python_mk_path)python-package-install.sh "2" \
                "$(PKG_INSTALL_DIR)" "$$(1)" \
                "$(HOST_PYTHON_BIN)" "$$(2)" \
@@ -115,6 +116,7 @@ define Build/Compile/PyMod
 endef
 
 PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
 PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON_PKG_SETUP_VARS ?=
 
@@ -124,6 +126,7 @@ define PyBuild/Compile/Default
        )
        $(call Build/Compile/PyMod, \
                $(PYTHON_PKG_SETUP_DIR), \
+               $(PYTHON_PKG_SETUP_GLOBAL_ARGS) \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
                $(PYTHON_PKG_SETUP_ARGS), \
                $(PYTHON_PKG_SETUP_VARS) \
diff --git a/lang/python/python-pyotp/Makefile b/lang/python/python-pyotp/Makefile
new file mode 100644 (file)
index 0000000..b41ce93
--- /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:=pyotp
+PKG_VERSION:=2.2.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyotp-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyotp
+PKG_HASH:=be0ffeabddaa5ee53e7204e7740da842d070cf69168247a3d0c08541b84de602
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyotp
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Python One-Time Password Library
+  URL:=https://github.com/pyauth/pyotp
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-pyotp/description
+  PyOTP is a Python library for generating and verifying one-time passwords.
+  It can be used to implement two-factor (2FA) or multi-factor (MFA) authentication methods
+  in web applications and in other systems that require users to log in.
+endef
+
+$(eval $(call Py3Package,python3-pyotp))
+$(eval $(call BuildPackage,python3-pyotp))
+$(eval $(call BuildPackage,python3-pyotp-src))
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
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:=
diff --git a/lang/python/python-slugify/Makefile b/lang/python/python-slugify/Makefile
new file mode 100644 (file)
index 0000000..4ec4bae
--- /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-slugify
+PKG_VERSION:=3.0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-slugify/
+PKG_HASH:=57163ffb345c7e26063435a27add1feae67fa821f1ef4b2f292c25847575d758
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-slugify
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Slugify application that handles Unicode
+  URL:=https://github.com/un33k/python-slugify
+  DEPENDS+= \
+      +python3-light \
+      +python3-codecs \
+      +python3-setuptools \
+      +python3-text-unidecode
+  VARIANT:=python3
+endef
+
+define Package/python3-slugify/description
+A Python slugify application that handles unicode.
+endef
+
+$(eval $(call Py3Package,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify-src))
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..97fb21d8e1cd3b383ba78dd1f4f78045f8881b9f 100644 (file)
@@ -8,17 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-urllib3
-PKG_VERSION:=1.24.1
-PKG_RELEASE:=2
+PKG_VERSION:=1.25
+PKG_RELEASE:=1
+
 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:=f03eeb431c77b88cf8747d47e94233a91d0e0fdae1cf09e0b21405a885700266
+
 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 +31,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 +60,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-voluptuous-serialize/Makefile b/lang/python/python-voluptuous-serialize/Makefile
new file mode 100644 (file)
index 0000000..d29db7e
--- /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:=voluptuous-serialize
+PKG_VERSION:=2.1.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous-serialize/
+PKG_HASH:=d30fef4f1aba251414ec0b315df81a06da7bf35201dcfb1f6db5253d738a154f
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-voluptuous-serialize
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Python Voluptuous Serialize
+  URL:=https://github.com/balloob/voluptuous-serialize
+  DEPENDS:= \
+       +python3-light \
+       +python3-voluptuous
+  VARIANT:=python3
+endef
+
+define Package/python3-voluptuous-serialize/description
+Convert Voluptuous schemas to dictionaries so they can be serialized.
+endef
+
+$(eval $(call Py3Package,python3-voluptuous-serialize))
+$(eval $(call BuildPackage,python3-voluptuous-serialize))
+$(eval $(call BuildPackage,python3-voluptuous-serialize-src))
diff --git a/lang/python/python-voluptuous/Makefile b/lang/python/python-voluptuous/Makefile
new file mode 100644 (file)
index 0000000..c5ccca1
--- /dev/null
@@ -0,0 +1,69 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-voluptuous
+PKG_VERSION:=0.11.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=voluptuous-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/v/voluptuous/
+PKG_HASH:=567a56286ef82a9d7ae0628c5842f65f516abcb496e74f3f59f1d7b28df314ef
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-voluptuous-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-voluptuous/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Data validation library
+  URL:=https://github.com/alecthomas/voluptuous
+endef
+
+define Package/python-voluptuous
+$(call Package/python-voluptuous/Default)
+  DEPENDS:= \
+      +PACKAGE_python-voluptuous:python-light
+  VARIANT:=python
+endef
+
+define Package/python3-voluptuous
+$(call Package/python-voluptuous/Default)
+  DEPENDS:= \
+      +PACKAGE_python3-voluptuous:python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-voluptuous/description
+It is primarily intended for validating data coming into Python as JSON, YAML, etc.
+endef
+
+define Package/python3-voluptuous/description
+$(call Package/python-voluptuous/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous))
+$(eval $(call BuildPackage,python-voluptuous-src))
+
+$(eval $(call Py3Package,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous))
+$(eval $(call BuildPackage,python3-voluptuous-src))
+
index 4a4245bb21f1f71d7a0cc51ea6f49a308b88a169..ed568ca96ab22311c5ba7172ee2a564ede55fcbb 100644 (file)
@@ -8,59 +8,68 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=PyYAML
-PKG_VERSION:=3.13
+PKG_VERSION:=5.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/PyYAML
-PKG_HASH:=3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/PyYAML
+PKG_HASH:=436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95
 
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:pyyaml_project:pyyaml
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-$(PKG_NAME)-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
 include ../python3-package.mk
 
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
 define Package/python-yaml/Default
-  SUBMENU:=Python
   SECTION:=lang
+  SUBMENU:=Python
   CATEGORY:=Languages
-  URL:=https://pyyaml.org/wiki/PyYAML
+  TITLE:=YAML parser and emitter for Python
+  URL:=https://github.com/yaml/pyyaml
   DEPENDS:=+libyaml
 endef
 
 define Package/python-yaml
 $(call Package/python-yaml/Default)
-  TITLE:=YAML parser and emitter for Python
-  DEPENDS+=+PACKAGE_python-yaml:python-light +PACKAGE_python-yaml:python-codecs
+  DEPENDS+= \
+       +PACKAGE_python-yaml:python-light \
+       +PACKAGE_python-yaml:python-codecs
   VARIANT:=python
 endef
 
 define Package/python3-yaml
 $(call Package/python-yaml/Default)
-  TITLE:=YAML parser and emitter for Python3
   DEPENDS+=+PACKAGE_python3-yaml:python3-light
   VARIANT:=python3
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,,\
-               --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
-       )
+define Package/python-yaml/description
+PyYAML is a YAML parser and emitter for the Python programming language.
 endef
 
-define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,,\
-               --with-libyaml install --prefix="$(PKG_INSTALL_DIR)/usr" \
-       )
+define Package/python3-yaml/description
+$(call Package/python-yaml/description)
+.
+(Variant for Python3)
 endef
 
+PYTHON_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_GLOBAL_ARGS:=--with-libyaml
+PYTHON3_PKG_SETUP_ARGS:=
+
 $(eval $(call PyPackage,python-yaml))
 $(eval $(call BuildPackage,python-yaml))
+$(eval $(call BuildPackage,python-yaml-src))
+
 $(eval $(call Py3Package,python3-yaml))
 $(eval $(call BuildPackage,python3-yaml))
+$(eval $(call BuildPackage,python3-yaml-src))
diff --git a/lang/python/python-yarl/Makefile b/lang/python/python-yarl/Makefile
new file mode 100644 (file)
index 0000000..d0aed33
--- /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:=yarl
+PKG_VERSION:=1.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=yarl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/yarl/
+PKG_HASH:=024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-yarl
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Yet another URL library
+  URL:=https://github.com/aio-libs/yarl
+  DEPENDS:= \
+  +python3-light \
+  +python3-multidict \
+  +python3-urllib \
+  +python3-idna
+  VARIANT:=python3
+endef
+
+define Package/python3-yarl/description
+Yet another URL library
+endef
+
+$(eval $(call Py3Package,python3-yarl))
+$(eval $(call BuildPackage,python3-yarl))
+$(eval $(call BuildPackage,python3-yarl-src))
diff --git a/lang/python/python-zeroconf/Makefile b/lang/python/python-zeroconf/Makefile
new file mode 100644 (file)
index 0000000..a29d4a6
--- /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.21.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=zeroconf-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/z/zeroconf/
+PKG_HASH:=5b52dfdf4e665d98a17bf9aa50dea7a8c98e25f972d9c1d7660e2b978a1f5713
+
+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))
index a4101ac888379545bea248e7522f069cc6538508..6eec6bd362ae850dc7ad640198682766d4da9397 100644 (file)
@@ -12,7 +12,7 @@ include ../python-version.mk
 
 PKG_NAME:=python
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
@@ -195,6 +195,8 @@ endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
@@ -205,6 +207,15 @@ define Build/InstallDev
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
                $(1)/usr/lib/pkgconfig
+       $(INSTALL_BIN) \
+               ./files/python-config.in \
+               $(1)/usr/bin/python$(PYTHON_VERSION)-config
+       $(SED) \
+               's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \
+               $(1)/usr/bin/python$(PYTHON_VERSION)-config
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
+               $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
 endef
 
 PYTHON_BASE_LIB_FILES:= \
diff --git a/lang/python/python/files/python-config.in b/lang/python/python/files/python-config.in
new file mode 100644 (file)
index 0000000..46f6c9c
--- /dev/null
@@ -0,0 +1,81 @@
+#!@EXENAME@
+
+import sys
+import os
+import getopt
+from distutils import sysconfig
+
+# start changes
+host_prefix = sysconfig.PREFIX
+
+target_bin_dir = os.path.dirname(os.path.abspath(__file__))
+target_prefix = os.path.normpath(os.path.join(target_bin_dir, '..'))
+
+target_data_dir = os.path.join(target_prefix, 'lib', 'python' + sysconfig.get_config_var('VERSION') + '-openwrt')
+sys.path.append(target_data_dir)
+
+try:
+    from _sysconfigdatatarget import build_time_vars
+    sysconfig._config_vars = {}
+    sysconfig._config_vars.update(build_time_vars)
+except ImportError:
+    print >>sys.stderr, "Could not import target data from %s" % (target_data_dir)
+    sys.exit(1)
+# end changes
+# plus .replace(host_prefix, target_prefix) below
+
+valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
+              'ldflags', 'help']
+
+def exit_with_usage(code=1):
+    print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
+                                            '|'.join('--'+opt for opt in valid_opts))
+    sys.exit(code)
+
+try:
+    opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
+except getopt.error:
+    exit_with_usage()
+
+if not opts:
+    exit_with_usage()
+
+pyver = sysconfig.get_config_var('VERSION')
+getvar = sysconfig.get_config_var
+
+opt_flags = [flag for (flag, val) in opts]
+
+if '--help' in opt_flags:
+    exit_with_usage(code=0)
+
+for opt in opt_flags:
+    if opt == '--prefix':
+        #print sysconfig.PREFIX
+        print target_prefix
+
+    elif opt == '--exec-prefix':
+        #print sysconfig.EXEC_PREFIX
+        print target_prefix
+
+    elif opt in ('--includes', '--cflags'):
+        flags = ['-I' + sysconfig.get_python_inc(),
+                 '-I' + sysconfig.get_python_inc(plat_specific=True)]
+        if opt == '--cflags':
+            flags.extend(getvar('CFLAGS').split())
+        #print ' '.join(flags)
+        print ' '.join(flags).replace(host_prefix, target_prefix)
+
+    elif opt in ('--libs', '--ldflags'):
+        libs = ['-lpython' + pyver]
+        libs += getvar('LIBS').split()
+        libs += getvar('SYSLIBS').split()
+        # add the prefix/lib/pythonX.Y/config dir, but only if there is no
+        # shared library in prefix/lib/.
+        if opt == '--ldflags':
+            if not getvar('Py_ENABLE_SHARED'):
+                libs.insert(0, '-L' + getvar('LIBPL'))
+            if not getvar('PYTHONFRAMEWORK'):
+                libs.extend(getvar('LINKFORSHARED').split())
+        #print ' '.join(libs)
+        print ' '.join(libs).replace(host_prefix, target_prefix)
+
diff --git a/lang/python/python/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12216.patch b/lang/python/python/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12216.patch
new file mode 100644 (file)
index 0000000..3ad6143
--- /dev/null
@@ -0,0 +1,155 @@
+From 3e3669c9c41a27e1466e2c28b3906e3dd0ce3e7e Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Thu, 7 Mar 2019 08:25:22 -0800
+Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
+ to separators (GH-12201)
+
+---
+ Doc/library/urlparse.rst                      | 20 ++++++++++++++++
+ Lib/test/test_urlparse.py                     | 24 +++++++++++++++++++
+ Lib/urlparse.py                               | 17 +++++++++++++
+ .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst  |  3 +++
+ 4 files changed, 64 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+
+diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst
+index 22249da54fbb..0989c88c3022 100644
+--- a/Doc/library/urlparse.rst
++++ b/Doc/library/urlparse.rst
+@@ -119,12 +119,22 @@ The :mod:`urlparse` module defines the following functions:
+    See section :ref:`urlparse-result-object` for more information on the result
+    object.
++   Characters in the :attr:`netloc` attribute that decompose under NFKC
++   normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++   ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++   decomposed before parsing, or is not a Unicode string, no error will be
++   raised.
++
+    .. versionchanged:: 2.5
+       Added attributes to return value.
+    .. versionchanged:: 2.7
+       Added IPv6 URL parsing capabilities.
++   .. versionchanged:: 2.7.17
++      Characters that affect netloc parsing under NFKC normalization will
++      now raise :exc:`ValueError`.
++
+ .. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
+@@ -232,11 +242,21 @@ The :mod:`urlparse` module defines the following functions:
+    See section :ref:`urlparse-result-object` for more information on the result
+    object.
++   Characters in the :attr:`netloc` attribute that decompose under NFKC
++   normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++   ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++   decomposed before parsing, or is not a Unicode string, no error will be
++   raised.
++
+    .. versionadded:: 2.2
+    .. versionchanged:: 2.5
+       Added attributes to return value.
++   .. versionchanged:: 2.7.17
++      Characters that affect netloc parsing under NFKC normalization will
++      now raise :exc:`ValueError`.
++
+ .. function:: urlunsplit(parts)
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 4e1ded73c266..73b0228ea8e3 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -1,4 +1,6 @@
+ from test import test_support
++import sys
++import unicodedata
+ import unittest
+ import urlparse
+@@ -624,6 +626,28 @@ def test_portseparator(self):
+         self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
+                 ('http','www.python.org:80','','','',''))
++    def test_urlsplit_normalization(self):
++        # Certain characters should never occur in the netloc,
++        # including under normalization.
++        # Ensure that ALL of them are detected and cause an error
++        illegal_chars = u'/:#?@'
++        hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
++        denorm_chars = [
++            c for c in map(unichr, range(128, sys.maxunicode))
++            if (hex_chars & set(unicodedata.decomposition(c).split()))
++            and c not in illegal_chars
++        ]
++        # Sanity check that we found at least one such character
++        self.assertIn(u'\u2100', denorm_chars)
++        self.assertIn(u'\uFF03', denorm_chars)
++
++        for scheme in [u"http", u"https", u"ftp"]:
++            for c in denorm_chars:
++                url = u"{}://netloc{}false.netloc/path".format(scheme, c)
++                print "Checking %r" % url
++                with self.assertRaises(ValueError):
++                    urlparse.urlsplit(url)
++
+ def test_main():
+     test_support.run_unittest(UrlParseTestCase)
+diff --git a/Lib/urlparse.py b/Lib/urlparse.py
+index f7c2b032b097..54eda08651ab 100644
+--- a/Lib/urlparse.py
++++ b/Lib/urlparse.py
+@@ -165,6 +165,21 @@ def _splitnetloc(url, start=0):
+             delim = min(delim, wdelim)     # use earliest delim position
+     return url[start:delim], url[delim:]   # return (domain, rest)
++def _checknetloc(netloc):
++    if not netloc or not isinstance(netloc, unicode):
++        return
++    # looking for characters like \u2100 that expand to 'a/c'
++    # IDNA uses NFKC equivalence, so normalize for this check
++    import unicodedata
++    netloc2 = unicodedata.normalize('NFKC', netloc)
++    if netloc == netloc2:
++        return
++    _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
++    for c in '/?#@:':
++        if c in netloc2:
++            raise ValueError("netloc '" + netloc2 + "' contains invalid " +
++                             "characters under NFKC normalization")
++
+ def urlsplit(url, scheme='', allow_fragments=True):
+     """Parse a URL into 5 components:
+     <scheme>://<netloc>/<path>?<query>#<fragment>
+@@ -193,6 +208,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+                 url, fragment = url.split('#', 1)
+             if '?' in url:
+                 url, query = url.split('?', 1)
++            _checknetloc(netloc)
+             v = SplitResult(scheme, netloc, url, query, fragment)
+             _parse_cache[key] = v
+             return v
+@@ -216,6 +232,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+         url, fragment = url.split('#', 1)
+     if '?' in url:
+         url, query = url.split('?', 1)
++    _checknetloc(netloc)
+     v = SplitResult(scheme, netloc, url, query, fragment)
+     _parse_cache[key] = v
+     return v
+diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+new file mode 100644
+index 000000000000..1e1ad92c6feb
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+@@ -0,0 +1,3 @@
++Changes urlsplit() to raise ValueError when the URL contains characters that
++decompose under IDNA encoding (NFKC-normalization) into characters that
++affect how the URL is parsed.
+\ No newline at end of file
diff --git a/lang/python/python/patches/020-bpo-36216-Only-print-test-messages-when-verbose-GH-12291.patch b/lang/python/python/patches/020-bpo-36216-Only-print-test-messages-when-verbose-GH-12291.patch
new file mode 100644 (file)
index 0000000..0ca88b5
--- /dev/null
@@ -0,0 +1,23 @@
+From 06b5ee585d6e76bdbb4002f642d864d860cbbd2b Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Tue, 12 Mar 2019 08:23:33 -0700
+Subject: [PATCH] bpo-36216: Only print test messages when verbose
+
+---
+ Lib/test/test_urlparse.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index 73b0228ea8e3..1830d0b28688 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -644,7 +644,8 @@ def test_urlsplit_normalization(self):
+         for scheme in [u"http", u"https", u"ftp"]:
+             for c in denorm_chars:
+                 url = u"{}://netloc{}false.netloc/path".format(scheme, c)
+-                print "Checking %r" % url
++                if test_support.verbose:
++                    print "Checking %r" % url
+                 with self.assertRaises(ValueError):
+                     urlparse.urlsplit(url)
diff --git a/lang/python/python/patches/021-compileall-add-recursion-option.patch b/lang/python/python/patches/021-compileall-add-recursion-option.patch
new file mode 100644 (file)
index 0000000..fa75a42
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/Lib/compileall.py b/Lib/compileall.py
+index 5cfa8bed3f..8716c9c0ca 100644
+--- a/Lib/compileall.py
++++ b/Lib/compileall.py
+@@ -152,10 +152,10 @@ def main():
+     """Script main program."""
+     import getopt
+     try:
+-        opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:')
++        opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:')
+     except getopt.error, msg:
+         print msg
+-        print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
++        print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \
+               "[-x regexp] [-i list] [directory|file ...]"
+         print
+         print "arguments: zero or more file and directory names to compile; " \
+@@ -164,6 +164,7 @@ def main():
+         print
+         print "options:"
+         print "-l: don't recurse into subdirectories"
++        print "-r recursion: control the maximum recursion level"
+         print "-f: force rebuild even if timestamps are up-to-date"
+         print "-q: output only error messages"
+         print "-d destdir: directory to prepend to file paths for use in " \
+@@ -187,6 +188,7 @@ def main():
+     flist = None
+     for o, a in opts:
+         if o == '-l': maxlevels = 0
++        if o == '-r': maxlevels = int(a)
+         if o == '-d': ddir = a
+         if o == '-f': force = 1
+         if o == '-q': quiet = 1
diff --git a/lang/python/python3-netifaces/Makefile b/lang/python/python3-netifaces/Makefile
new file mode 100644 (file)
index 0000000..eac04cc
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-netifaces
+PKG_VERSION:=0.10.9
+PKG_RELEASE:=1
+
+PKG_SOURCE:=netifaces-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/n/netifaces/
+PKG_HASH:=2dee9ffdd16292878336a58d04a20f0ffe95555465fee7c9bd23b3490ef2abf3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/netifaces-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-netifaces
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Portable network interface information
+  URL:=https://github.com/al45tair/netifaces
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-netifaces/description
+  Portable network interface information.
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
index e52a15233ae466391dbdeef720a87cd6be776058..4a3dddd6439bb867d69d5340157e0ab2aeac5b5e 100644 (file)
@@ -68,6 +68,7 @@ define Py3Package
 
   define Package/$(1)/install
        $$(call Py3Package/$(1)/install,$$(1))
+       SED="$(SED)" \
        $(SHELL) $(python3_mk_path)python-package-install.sh "3" \
                "$(PKG_INSTALL_DIR)" "$$(1)" \
                "$(HOST_PYTHON3_BIN)" "$$(2)" \
@@ -114,6 +115,7 @@ define Build/Compile/Py3Mod
 endef
 
 PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
 PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
 PYTHON3_PKG_SETUP_VARS ?=
 
@@ -123,6 +125,7 @@ define Py3Build/Compile/Default
        )
        $(call Build/Compile/Py3Mod, \
                $(PYTHON3_PKG_SETUP_DIR), \
+               $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
                $(PYTHON3_PKG_SETUP_ARGS), \
                $(PYTHON3_PKG_SETUP_VARS) \
diff --git a/lang/python/python3-pyroute2/Makefile b/lang/python/python3-pyroute2/Makefile
new file mode 100644 (file)
index 0000000..83c28b0
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-pyroute2
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pyroute2-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyroute2
+PKG_HASH:=ad679a91d453fe8426c4076d0da3a67265e5ccfe641879d75c9bc7660d075dfa
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pyroute2-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Martin Matějek <martin.matejek@nic.cz>
+PKG_LICENSE:=GPL-2.0-or-later Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.GPL.v2 LICENSE.Apache.v2
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pyroute2
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Python netlink library
+  URL:=http://github.com/svinota/pyroute2
+  DEPENDS:= \
+         +python3-light \
+         +python3-distutils \
+         +python3-logging \
+         +python3-multiprocessing \
+         +python3-sqlite3 \
+         +python3-ctypes
+  VARIANT:=python3
+endef
+
+define Package/python3-pyroute2/description
+  Pyroute2 is a pure Python netlink library.
+  The library was started as an RTNL protocol implementation,
+  but now it supports many netlink protocols.
+endef
+
+PYTHON3_PKG_SETUP_ARGS:=
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
diff --git a/lang/python/python3-unidecode/Makefile b/lang/python/python3-unidecode/Makefile
new file mode 100644 (file)
index 0000000..caac016
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python3-unidecode
+PKG_VERSION:=1.0.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Unidecode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/unidecode/
+PKG_HASH:=8b85354be8fd0c0e10adbf0675f6dc2310e56fda43fa8fe049123b6c475e52fb
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Unidecode-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-unidecode
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=ASCII transliterations of Unicode text
+  URL:=https://github.com/avian2/unidecode
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-unidecode/description
+Unidecode, lossy ASCII transliterations of Unicode text
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)-src))
index 8e6a19be381518a7594d9ef4e4a7553aa3164fcb..60fe7c69f737aae6a98731cfcb57d8d25b97281d 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=8
+PKG_RELEASE:=10
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -199,6 +199,7 @@ endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/bin
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
@@ -209,6 +210,9 @@ define Build/InstallDev
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
                $(1)/usr/lib/pkgconfig
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
+               $(1)/usr/bin/
 endef
 
 PYTHON3_BASE_LIB_FILES:= \
diff --git a/lang/python/python3/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12213.patch b/lang/python/python3/patches/019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12213.patch
new file mode 100644 (file)
index 0000000..828c17f
--- /dev/null
@@ -0,0 +1,150 @@
+From 30a779770fe690584456970b602ea16ec3f74ce7 Mon Sep 17 00:00:00 2001
+From: Steve Dower <steve.dower@python.org>
+Date: Thu, 7 Mar 2019 08:05:31 -0800
+Subject: [PATCH] bpo-36216: Add check for characters in netloc that normalize
+ to separators (GH-12201)
+
+---
+ Doc/library/urllib.parse.rst                  | 18 +++++++++++++++
+ Lib/test/test_urlparse.py                     | 23 +++++++++++++++++++
+ Lib/urllib/parse.py                           | 17 ++++++++++++++
+ .../2019-03-06-09-38-40.bpo-36216.6q1m4a.rst  |  3 +++
+ 4 files changed, 61 insertions(+)
+ create mode 100644 Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+
+diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
+index 0c8f0f607314..b565e1edd321 100644
+--- a/Doc/library/urllib.parse.rst
++++ b/Doc/library/urllib.parse.rst
+@@ -124,6 +124,11 @@ or on combining URL components into a URL string.
+    Unmatched square brackets in the :attr:`netloc` attribute will raise a
+    :exc:`ValueError`.
++   Characters in the :attr:`netloc` attribute that decompose under NFKC
++   normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++   ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++   decomposed before parsing, no error will be raised.
++
+    .. versionchanged:: 3.2
+       Added IPv6 URL parsing capabilities.
+@@ -136,6 +141,10 @@ or on combining URL components into a URL string.
+       Out-of-range port numbers now raise :exc:`ValueError`, instead of
+       returning :const:`None`.
++   .. versionchanged:: 3.7.3
++      Characters that affect netloc parsing under NFKC normalization will
++      now raise :exc:`ValueError`.
++
+ .. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace', max_num_fields=None)
+@@ -257,10 +266,19 @@ or on combining URL components into a URL string.
+    Unmatched square brackets in the :attr:`netloc` attribute will raise a
+    :exc:`ValueError`.
++   Characters in the :attr:`netloc` attribute that decompose under NFKC
++   normalization (as used by the IDNA encoding) into any of ``/``, ``?``,
++   ``#``, ``@``, or ``:`` will raise a :exc:`ValueError`. If the URL is
++   decomposed before parsing, no error will be raised.
++
+    .. versionchanged:: 3.6
+       Out-of-range port numbers now raise :exc:`ValueError`, instead of
+       returning :const:`None`.
++   .. versionchanged:: 3.7.3
++      Characters that affect netloc parsing under NFKC normalization will
++      now raise :exc:`ValueError`.
++
+ .. function:: urlunsplit(parts)
+diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
+index be50b47603aa..e6638aee2244 100644
+--- a/Lib/test/test_urlparse.py
++++ b/Lib/test/test_urlparse.py
+@@ -1,3 +1,5 @@
++import sys
++import unicodedata
+ import unittest
+ import urllib.parse
+@@ -984,6 +986,27 @@ def test_all(self):
+                 expected.append(name)
+         self.assertCountEqual(urllib.parse.__all__, expected)
++    def test_urlsplit_normalization(self):
++        # Certain characters should never occur in the netloc,
++        # including under normalization.
++        # Ensure that ALL of them are detected and cause an error
++        illegal_chars = '/:#?@'
++        hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
++        denorm_chars = [
++            c for c in map(chr, range(128, sys.maxunicode))
++            if (hex_chars & set(unicodedata.decomposition(c).split()))
++            and c not in illegal_chars
++        ]
++        # Sanity check that we found at least one such character
++        self.assertIn('\u2100', denorm_chars)
++        self.assertIn('\uFF03', denorm_chars)
++
++        for scheme in ["http", "https", "ftp"]:
++            for c in denorm_chars:
++                url = "{}://netloc{}false.netloc/path".format(scheme, c)
++                with self.subTest(url=url, char='{:04X}'.format(ord(c))):
++                    with self.assertRaises(ValueError):
++                        urllib.parse.urlsplit(url)
+ class Utility_Tests(unittest.TestCase):
+     """Testcase to test the various utility functions in the urllib."""
+diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
+index f691ab74f87f..39c5d6a80824 100644
+--- a/Lib/urllib/parse.py
++++ b/Lib/urllib/parse.py
+@@ -391,6 +391,21 @@ def _splitnetloc(url, start=0):
+             delim = min(delim, wdelim)     # use earliest delim position
+     return url[start:delim], url[delim:]   # return (domain, rest)
++def _checknetloc(netloc):
++    if not netloc or netloc.isascii():
++        return
++    # looking for characters like \u2100 that expand to 'a/c'
++    # IDNA uses NFKC equivalence, so normalize for this check
++    import unicodedata
++    netloc2 = unicodedata.normalize('NFKC', netloc)
++    if netloc == netloc2:
++        return
++    _, _, netloc = netloc.rpartition('@') # anything to the left of '@' is okay
++    for c in '/?#@:':
++        if c in netloc2:
++            raise ValueError("netloc '" + netloc2 + "' contains invalid " +
++                             "characters under NFKC normalization")
++
+ def urlsplit(url, scheme='', allow_fragments=True):
+     """Parse a URL into 5 components:
+     <scheme>://<netloc>/<path>?<query>#<fragment>
+@@ -419,6 +434,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+                 url, fragment = url.split('#', 1)
+             if '?' in url:
+                 url, query = url.split('?', 1)
++            _checknetloc(netloc)
+             v = SplitResult('http', netloc, url, query, fragment)
+             _parse_cache[key] = v
+             return _coerce_result(v)
+@@ -442,6 +458,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
+         url, fragment = url.split('#', 1)
+     if '?' in url:
+         url, query = url.split('?', 1)
++    _checknetloc(netloc)
+     v = SplitResult(scheme, netloc, url, query, fragment)
+     _parse_cache[key] = v
+     return _coerce_result(v)
+diff --git a/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+new file mode 100644
+index 000000000000..5546394157f9
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-03-06-09-38-40.bpo-36216.6q1m4a.rst
+@@ -0,0 +1,3 @@
++Changes urlsplit() to raise ValueError when the URL contains characters that
++decompose under IDNA encoding (NFKC-normalization) into characters that
++affect how the URL is parsed.
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))
diff --git a/lang/python/ruamel-yaml/Makefile b/lang/python/ruamel-yaml/Makefile
new file mode 100644 (file)
index 0000000..a5f4085
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ruamel-yaml
+PKG_VERSION:=0.15.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:=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
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/ruamel-yaml/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=YAML 1.2 loader/dumper package for Python
+  URL:=https://bitbucket.org/ruamel/yaml
+endef
+
+define Package/python-ruamel-yaml
+$(call Package/ruamel-yaml/Default)
+  DEPENDS:= \
+      +PACKAGE_python-ruamel-yaml:python-light
+  VARIANT:=python
+endef
+
+define Package/python3-ruamel-yaml
+$(call Package/ruamel-yaml/Default)
+  DEPENDS:= \
+      +PACKAGE_python3-ruamel-yaml:python3-light
+  VARIANT:=python3
+endef
+
+define Package/ruamel-yaml/description
+ruamel-yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
+endef
+
+define Package/python3-ruamel-yaml/description
+$(call Package/ruamel-yaml/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-ruamel-yaml))
+$(eval $(call BuildPackage,python-ruamel-yaml))
+$(eval $(call BuildPackage,python-ruamel-yaml-src))
+
+$(eval $(call Py3Package,python3-ruamel-yaml))
+$(eval $(call BuildPackage,python3-ruamel-yaml))
+$(eval $(call BuildPackage,python3-ruamel-yaml-src))
diff --git a/lang/python/text-unidecode/Makefile b/lang/python/text-unidecode/Makefile
new file mode 100644 (file)
index 0000000..86be758
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-text-unidecode
+PKG_VERSION:=1.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=text-unidecode-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/t/text-unidecode/
+PKG_HASH:=5a1375bb2ba7968740508ae38d92e1f889a0832913cb1c447d5e2046061a396d
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-text-unidecode-$(PKG_VERSION)
+
+PKG_LICENSE:=Artistic-1.0-cl8
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-text-unidecode/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=The most basic Text::Unidecode port
+  URL:=https://github.com/kmike/text-unidecode/
+endef
+
+define Package/python-text-unidecode
+$(call Package/python-text-unidecode/Default)
+  DEPENDS:= \
+      +PACKAGE_python-text-unidecode:python-light
+  VARIANT:=python
+endef
+
+define Package/python3-text-unidecode
+$(call Package/python-text-unidecode/Default)
+  DEPENDS:= \
+      +PACKAGE_python3-text-unidecode:python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-text-unidecode/description
+text-unidecode is the most basic port of the Text::Unidecode Perl library.
+endef
+
+define Package/python3-text-unidecode/description
+$(call Package/python-text-unidecode/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-text-unidecode))
+$(eval $(call BuildPackage,python-text-unidecode))
+$(eval $(call BuildPackage,python-text-unidecode-src))
+
+$(eval $(call Py3Package,python3-text-unidecode))
+$(eval $(call BuildPackage,python3-text-unidecode))
+$(eval $(call BuildPackage,python3-text-unidecode-src))
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 9d9b4deeff753653d3f95d2685a8c89ce6f33d2e..d1ca407705425c6910dd0d85c412c0f57e872430 100644 (file)
@@ -32,6 +32,7 @@ define Package/uuid
   TITLE:=uuid
   URL:=https://github.com/Tieske/uuid
   DEPENDS:=+lua +luasocket
+  PKGARCH:=all
 endef
 
 define Package/uuid/description
index ce4352ab35d4a918ee856eab6bb01909ec405d58..6a87228b213030cfe295a5341f9b53350f4e7f70 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=boost
-PKG_VERSION:=1.69.0
-PKG_SOURCE_VERSION:=1_69_0
-PKG_RELEASE:=2
+PKG_VERSION:=1.70.0
+PKG_SOURCE_VERSION:=1_70_0
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
-PKG_HASH:=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
+PKG_HASH:=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
 PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
 PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
 
@@ -38,7 +38,7 @@ define Package/boost/Default
 endef
 
 define Package/boost/description
-This package provides the Boost v1.69.0 libraries.
+This package provides the Boost v1.70.0 libraries.
 Boost is a set of free, peer-reviewed, portable C++ source libraries.
 
 -----------------------------------------------------------------------------
@@ -84,7 +84,7 @@ This package provides the following run-time libraries:
  - wave
 
 There are many more header-only libraries supported by Boost.
-See more at http://www.boost.org/doc/libs/1_69_0/
+See more at http://www.boost.org/doc/libs/1_70_0/
 endef
 
 PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
@@ -342,7 +342,7 @@ $(eval $(call DefineBoostLibrary,date_time,,))
 $(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
 $(eval $(call DefineBoostLibrary,filesystem,system,))
 $(eval $(call DefineBoostLibrary,graph,regex,))
-$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2))
+$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +zstd))
 $(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
 $(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
 $(eval $(call DefineBoostLibrary,math,,))
@@ -374,7 +374,7 @@ TARGET_LDFLAGS += -pthread -lrt
 TARGET_CFLAGS += \
        $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
 
-EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
+EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_USE_VERSION_5),-std=gnu++14,-std=gnu++17)
 
 ifneq ($(findstring mips,$(ARCH)),)
     BOOST_ABI = o32
@@ -392,14 +392,14 @@ endif
 comma := ,
 
 define Build/Compile
-       $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
+       $(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu type $(CONFIG_CPU_TYPE) $(if $(CONFIG_CPU_SUBTYPE),and cpu subtype $(CONFIG_CPU_SUBTYPE),))
        ( cd $(PKG_BUILD_DIR) ; \
-               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                        tools/build/src/user-config.jam ; \
                b2 \
                        $(CONFIGURE_ARGS) \
                        --ignore-site-config \
-                       --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+                       --toolset=gcc abi=$(BOOST_ABI) \
                        --disable-long-double \
                        $(if $(CONFIG_boost-compile-visibility-global), visibility=global,) \
                        $(if $(CONFIG_boost-compile-visibility-protected), visibility=protected,) \
@@ -435,14 +435,14 @@ define Build/Compile
                                -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
                        install ;\
                        $(if $(CONFIG_PACKAGE_boost-python), \
-                               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+                               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                                        tools/build/src/user-config.jam ; \
                                echo "using python : $(BOOST_PYTHON_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON_VER).so ;" >> \
                                        tools/build/src/user-config.jam; \
                                b2 -a \
                                        $(CONFIGURE_ARGS) \
                                        --ignore-site-config \
-                                       --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+                                       --toolset=gcc abi=$(BOOST_ABI) \
                                        --disable-long-double \
                                        $(if $(CONFIG_boost-variant-release), variant=release,) \
                                        $(if $(CONFIG_boost-variant-debug), variant=debug,) \
@@ -461,14 +461,14 @@ define Build/Compile
                                install ;\
                        ,) \
                        $(if $(CONFIG_PACKAGE_boost-python3), \
-                               echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
+                               echo "using gcc : $(GCC_VERSION) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ \" <cxxflags>\"$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > \
                                        tools/build/src/user-config.jam ; \
                                echo "using python : $(BOOST_PYTHON3_VER) : : $(STAGING_DIR)/usr/include/python$(BOOST_PYTHON3_VER)/ : $(STAGING_DIR)/usr/lib/libpython$(BOOST_PYTHON3_VER).so ;" >> \
                                        tools/build/src/user-config.jam; \
                                b2 -a \
                                        $(CONFIGURE_ARGS) \
                                        --ignore-site-config \
-                                       --toolset=gcc-$(ARCH) abi=$(BOOST_ABI) \
+                                       --toolset=gcc abi=$(BOOST_ABI) \
                                        --disable-long-double \
                                        $(if $(CONFIG_boost-variant-release), variant=release,) \
                                        $(if $(CONFIG_boost-variant-debug), variant=debug,) \
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/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)
+     {
diff --git a/libs/botan/Makefile b/libs/botan/Makefile
new file mode 100644 (file)
index 0000000..ebd9c6d
--- /dev/null
@@ -0,0 +1,92 @@
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=botan
+PKG_VERSION:=2.10.0
+PKG_RELEASE:=3
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
+
+PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
+PKG_BUILD_DIR:=$(BUILD_DIR)/Botan-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://botan.randombit.net/releases/
+PKG_HASH:=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
+
+PKG_USE_MIPS16:=0
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=license.txt
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/botan/Default
+  SUBMENU:=SSL
+  TITLE:=Crypto and TLS for C++11
+  URL:=https://botan.randombit.net
+endef
+
+define Package/botan/Default/description
+  Botan (Japanese for peony) is a cryptography library written in C++11 and
+  released under the permissive Simplified BSD license.
+endef
+
+define Package/libbotan
+  $(call Package/botan/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= (library)
+  ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+  DEPENDS:=+libstdcpp +libpthread
+endef
+
+define Package/libbotan/description
+  $(call Package/botan/Default/description)
+  This package contains the botan library.
+endef
+
+CONFIGURE_CMD = ./configure.py
+
+CONFIGURE_ARGS = \
+       --cpu="$(ARCH)" \
+       --cc-bin="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
+       --program-suffix="" \
+       --prefix=$(CONFIGURE_PREFIX) \
+       --exec-prefix=$(CONFIGURE_PREFIX) \
+       --bindir=$(CONFIGURE_PREFIX)/bin \
+       --sbindir=$(CONFIGURE_PREFIX)/sbin \
+       --libexecdir=$(CONFIGURE_PREFIX)/lib \
+       --sysconfdir=/etc \
+       --datadir=$(CONFIGURE_PREFIX)/share \
+       --localstatedir=/var \
+       --mandir=$(CONFIGURE_PREFIX)/man \
+       --infodir=$(CONFIGURE_PREFIX)/info \
+       --optimize-for-size \
+       $(DISABLE_IPV6)
+
+ifeq ($(CONFIG_SOFT_FLOAT),y)
+CONFIGURE_ARGS += --disable-neon
+endif
+
+TARGET_LDFLAGS += \
+       -Wl,--gc-sections,--as-needed \
+       -lpthread
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/botan* $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
+endef
+
+define Package/libbotan/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libbotan))
index 293ffebe6c1eb7457cd5c28581b4d06278e7e517..32acaefc6bb13c26211f015837202ec9820246ed 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fcgi
-PKG_VERSION:=2.4.1
+PKG_VERSION:=2.4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)2-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/FastCGI-Archives/fcgi2/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=53cc36624bb92a88e3d5a3d696282e1af24b280c3f275604123d9c6d407173e2
+PKG_HASH:=1fe83501edfc3a7ec96bb1e69db3fd5ea1730135bd73ab152186fd0b437013bc
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)2-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Jacob Siverskog <jacob@teenageengineering.com>
@@ -50,6 +50,9 @@ define Package/fcgi/description
  server specific APIs.
 endef
 
+TARGET_CXXFLAGS += -fno-rtti -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/fastcgi.h $(1)/usr/include/
index c517551d93646261d1dab3b8198eb3f992702cd6..1aec5f04c7e2ecaa940f49e47dd20c999f35c9c8 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/include/fcgio.h b/include/fcgio.h
-index 20d222a..92eda3c 100644
 --- a/include/fcgio.h
 +++ b/include/fcgio.h
 @@ -77,10 +77,10 @@ protected:
@@ -15,11 +13,9 @@ index 20d222a..92eda3c 100644
  
      // Use a buffer.  The only reasons that a buffer would be useful is
      // to support the use of the unget()/putback() or seek() methods.  Using
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 5a54c11..e57b622 100644
 --- a/libfcgi/fcgio.cpp
 +++ b/libfcgi/fcgio.cpp
-@@ -89,7 +89,7 @@ int fcgi_streambuf::sync()
+@@ -86,7 +86,7 @@ int fcgi_streambuf::sync()
  }
  
  // uflow() removes the char, underflow() doesn't
@@ -28,7 +24,7 @@ index 5a54c11..e57b622 100644
  {
      if (this->bufsize)
      {
-@@ -103,7 +103,7 @@ int fcgi_streambuf::uflow()
+@@ -100,7 +100,7 @@ int fcgi_streambuf::uflow()
      }
  }
                                
diff --git a/libs/fcgi/patches/110-no_examples.patch b/libs/fcgi/patches/110-no_examples.patch
deleted file mode 100644 (file)
index dc015b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index b35f7f3..c34a274 100755
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,7 +4,7 @@
- #  $Id: Makefile.am,v 1.8 2003/11/02 21:42:47 robs Exp $
- #
--SUBDIRS = libfcgi cgi-fcgi examples include
-+SUBDIRS = libfcgi cgi-fcgi include
- include_HEADERS = fcgi_config.h
diff --git a/libs/fcgi/patches/120-stdio.patch b/libs/fcgi/patches/120-stdio.patch
deleted file mode 100644 (file)
index 404d1d4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/libfcgi/fcgio.cpp b/libfcgi/fcgio.cpp
-index 5a54c11..9ecca45 100644
---- a/libfcgi/fcgio.cpp
-+++ b/libfcgi/fcgio.cpp
-@@ -23,6 +23,7 @@
- #endif
- #include <limits.h>
-+#include <stdio.h>
- #include "fcgio.h"
- using std::streambuf;
diff --git a/libs/fcgi/patches/200-Convert-AM_INIT_AUTOMAKE-AC_INIT-and-trigger-non-GNU.patch b/libs/fcgi/patches/200-Convert-AM_INIT_AUTOMAKE-AC_INIT-and-trigger-non-GNU.patch
deleted file mode 100644 (file)
index 7481f21..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From 78fac26891fe7494355021dbac109b807b8c6d53 Mon Sep 17 00:00:00 2001
-From: Joachim Nilsson <troglobit@gmail.com>
-Date: Mon, 14 May 2018 15:40:43 +0200
-Subject: [PATCH] Convert AM_INIT_AUTOMAKE() --> AC_INIT() and trigger non-GNU
- project
-
-Converts from old-style configure syntax with AM_INIT_AUTOMAKE to
-AC_INIT and enable "foreign" mode, i.e. non-GNU conformant tree
-to avoid copying in COPYING and other files when autogen.sh runs.
-
-Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
----
- configure.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 2f72645..c5fbc4b 100755
---- a/configure.in
-+++ b/configure.in
-@@ -4,8 +4,8 @@ dnl     This file is an input file used by the GNU "autoconf" program to
- dnl     generate the file "configure", which is run during the build
- dnl     to configure the system for the local environment.
--AC_INIT
--AM_INIT_AUTOMAKE(fcgi, 2.4.1-SNAP-0910052249)
-+AC_INIT(fcgi, 2.4.1-SNAP-0910052249)
-+AM_INIT_AUTOMAKE([1.11 foreign])
- AM_CONFIG_HEADER(fcgi_config.h)
--- 
-2.20.0
-
index 04a498f7539b5d7e62ef39d9e5ecd8fb965e6ccf..8fceca7e8838b9df3baf04913b205a52870f2ecd 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=file
-PKG_VERSION:=5.35
+PKG_VERSION:=5.36
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://src.fedoraproject.org/lookaside/pkgs/file/ \
        http://download.openpkg.org/components/cache/file/ \
        ftp://ftp.astron.com/pub/file/
-PKG_HASH:=30c45e817440779be7aac523a905b123cba2a6ed0bf4f5439e1e99ba940b5546
+PKG_HASH:=fb608290c0fd2405a8f63e5717abf6d03e22e183fb21884413d1edd918184379
 
 PKG_LICENSE:=BSD-2c
 PKG_LICENSE_FILES:=COPYING
@@ -47,15 +47,19 @@ $(call Package/file/Default)
   DEPENDS:=+zlib
 endef
 
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
-       --disable-libseccomp
+       --disable-libseccomp \
+       --disable-rpath \
+       --disable-warnings \
+       --without-pic
 
 MAKE_PATH := src
 
-TARGET_CFLAGS += $(FPIC)
-
 define Build/Compile/magic
        ( cd $(PKG_BUILD_DIR)/magic/Magdir; \
                for f in `ls`; do \
index 090339278440341f18a27781aa7d5e30f5698eb9..1ec13921b0a21afb77452a2ce37a6f989de3928e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hiredis
 PKG_VERSION:=0.14.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/redis/hiredis/tar.gz/v$(PKG_VERSION)?
diff --git a/libs/hiredis/patches/010-fix_pkconfig_file.patch b/libs/hiredis/patches/010-fix_pkconfig_file.patch
new file mode 100644 (file)
index 0000000..9557776
--- /dev/null
@@ -0,0 +1,34 @@
+commit f96d9f9d2e3ba39352035e6ac26463243484d404
+Author: Sebastian Kemper <sebastian_ml@gmx.net>
+Date:   Sun Jan 13 19:25:52 2019 +0100
+
+    Setup .pc file to allow use for cross-compiling
+    
+    The Makefile is currently creating the pkg-config file using static lib
+    and include dir statements. Change that so that projects that
+    cross-compile hiredis can use pkg-config to setup other programs
+    depending on it.
+    
+    Note: these projects (like OpenWrt) call pkg-config with arguments to
+    overwrite some variables in the .pc file, namely:
+    
+    --define-variable=prefix=<...>
+    --define-variable=exec_prefix=<...>
+    
+    Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
+
+diff --git a/Makefile b/Makefile
+index 07b8a83..14d21de 100644
+--- a/Makefile
++++ b/Makefile
+@@ -166,8 +166,8 @@ $(PKGCONFNAME): hiredis.h
+       @echo "Generating $@ for pkgconfig..."
+       @echo prefix=$(PREFIX) > $@
+       @echo exec_prefix=\$${prefix} >> $@
+-      @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
+-      @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
++      @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@
++      @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@
+       @echo >> $@
+       @echo Name: hiredis >> $@
+       @echo Description: Minimalistic C client library for Redis. >> $@
index 43f30d510f34935d669a0022385cab41816ed510..9b2d20b72748cab471fa400e599a4a35a05014a9 100644 (file)
@@ -8,15 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=icu4c
-PKG_VERSION:=63.1
+MAJOR_VERSION:=64
+MINOR_VERSION:=2
+PKG_VERSION:=$(MAJOR_VERSION).$(MINOR_VERSION)
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-63_1-src.tgz
-PKG_SOURCE_URL:=http://download.icu-project.org/files/$(PKG_NAME)/$(PKG_VERSION)
-PKG_HASH:=05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d
+PKG_SOURCE:=$(PKG_NAME)-$(MAJOR_VERSION)_$(MINOR_VERSION)-src.tgz
+PKG_SOURCE_URL:=https://github.com/unicode-org/icu/releases/download/release-$(MAJOR_VERSION)-$(MINOR_VERSION)
+PKG_HASH:=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>
 
@@ -109,6 +112,11 @@ HOST_CONFIGURE_ARGS:= \
        --enable-dyload \
        --prefix=$(STAGING_DIR_HOSTPKG)
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       mkdir -p $(PKG_BUILD_DIR)/data/out
+endef
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/icu/patches/001-change_optimization_option.patch b/libs/icu/patches/001-change_optimization_option.patch
new file mode 100644 (file)
index 0000000..6914a07
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/runConfigureICU
++++ b/runConfigureICU
+@@ -239,8 +239,8 @@
+         THE_COMP="the GNU C++"
+         CC=gcc; export CC
+         CXX=g++; export CXX
+-        RELEASE_CFLAGS='-O3'
+-        RELEASE_CXXFLAGS='-O3'
++        RELEASE_CFLAGS=' '
++        RELEASE_CXXFLAGS=' '
+         DEBUG_CFLAGS='-g'
+         DEBUG_CXXFLAGS='-g'
+         ;;
diff --git a/libs/icu/patches/010-add-big-endian-arm-support.patch b/libs/icu/patches/010-add-big-endian-arm-support.patch
new file mode 100644 (file)
index 0000000..2c4dee8
--- /dev/null
@@ -0,0 +1,23 @@
+From cb5cf996d123014a2420c853c4db60e4500973b1 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 1 Apr 2019 04:52:32 -0700
+Subject: [PATCH] Add big endian ARM support (#92)
+
+This fixes compilation on such platforms.
+---
+ double-conversion/utils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h
+index 1e44fca..b715c65 100644
+--- a/18n/double-conversion-utils.h
++++ b/i18n/double-conversion-utils.h
+@@ -99,7 +99,7 @@ int main(int argc, char** argv) {
+     defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+-    defined(_MIPS_ARCH_MIPS32R2) || \
++    defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) || \
+     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+     defined(__riscv) || \
+     defined(__or1k__) || defined(__arc__) || \
diff --git a/libs/jose/Makefile b/libs/jose/Makefile
new file mode 100644 (file)
index 0000000..20b9c2f
--- /dev/null
@@ -0,0 +1,74 @@
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jose
+PKG_VERSION:=10
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libjose
+  SECTION:=libs
+  TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+  DEPENDS:=+zlib +jansson +libopenssl +libpthread
+  URL:=https://github.com/latchset/jose
+  MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose
+  SECTION:=utils
+  TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+  DEPENDS:=+libjose
+  URL:=https://github.com/latchset/jose
+  MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose/description
+       jose is a command line utility for performing various tasks on JSON
+       Object Signing and Encryption (JOSE) objects. José provides a full
+       crypto stack including key generation, signing and encryption.
+endef
+
+define Package/libjose/description
+       libjose is a library for performing various tasks on JSON
+       Object Signing and Encryption (JOSE) objects. José provides a full
+       crypto stack including key generation, signing and encryption.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR)  $(1)/usr/lib
+       $(INSTALL_DIR)  $(1)/usr/include
+       $(INSTALL_DIR)  $(1)/usr/include/$(PKG_NAME)
+       $(INSTALL_DIR)  $(1)/usr/lib/pkgconfig
+       $(CP)   $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so*   $(1)/usr/lib
+       $(CP)   $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h  $(1)/usr/include/$(PKG_NAME)
+       $(CP)   $(PKG_BUILD_DIR)/*.pc                           $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libjose/install
+       $(INSTALL_DIR)  $(1)/usr/lib
+       $(CP)           $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so*   $(1)/usr/lib/
+endef
+
+define Package/jose/install
+       $(INSTALL_DIR)  $(1)/usr/bin
+       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)          $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libjose))
+$(eval $(call BuildPackage,jose))
diff --git a/libs/jose/patches/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();
+ }
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
diff --git a/libs/libcgroup/Makefile b/libs/libcgroup/Makefile
new file mode 100644 (file)
index 0000000..c1fb6de
--- /dev/null
@@ -0,0 +1,60 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcgroup
+PKG_VERSION:=0.41
+PKG_RELEASE:=1
+PKG_LICENSE:=LGPL
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=@SF/libcg
+PKG_HASH:=e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51
+PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcgroup
+  TITLE:=CGroup config and exec library
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+musl-fts +@KERNEL_CGROUPS
+endef
+
+define Package/cgroup-tools
+  TITLE:=CGroup config and exec tools
+  DEPENDS:=+libcgroup
+  CATEGORY:=Utilities
+endef
+
+define Package/libcgroup/description
+  Helpers utils for working with cgroups.
+endef
+
+CONFIGURE_ARGS += --enable-tools \
+               --enable-shared \
+               --disable-daemon \
+               --disable-pam
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/include/libcgroup.h $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/include/libcgroup $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/libcgroup.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libcgroup/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/src/.libs/libcgroup.so* $(1)/usr/lib
+endef
+
+define Package/cgroup-tools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/.libs/* $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,libcgroup))
+$(eval $(call BuildPackage,cgroup-tools))
diff --git a/libs/libcgroup/patches/0001-musl-fts-configure.patch b/libs/libcgroup/patches/0001-musl-fts-configure.patch
new file mode 100644 (file)
index 0000000..f6079a6
--- /dev/null
@@ -0,0 +1,24 @@
+diff --git a/configure.in b/configure.in
+index 75f4a51..f70b37c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -193,6 +193,19 @@ if test x$with_pam = xtrue; then
+               header files!])])
+ fi
++AC_CHECK_LIB(
++      [fts],
++      [fts_open],
++      [],
++      [AC_MSG_ERROR([Cannot compile without fts!])]
++)
++
++AC_CHECK_HEADERS(
++      [fts.h],
++      [],
++      [AC_MSG_ERROR([Cannot compile without fts.h])]
++)
++
+ AC_CONFIG_FILES([Makefile
+       tests/Makefile
+       tests/tools/testenv.sh
index ebf4063f0ba5172d2091d11fc0682064394847bb..2f37f00c27c621626f307eb3a9c1e470ee7b3b1a 100644 (file)
@@ -8,18 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdaq
-PKG_VERSION:=2.0.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.2.2
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
-       @SF/snort
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
 PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
-PKG_HASH:=d41da5f7793e66044e6927dd868c0525e7ee4ec1a3515bf74ef9a30cd9273af0
+PKG_HASH:=7cd818cabb1ad35360e83076e54775f07165ee71407dc672d147e27d3cd37f7b
 PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
@@ -43,14 +44,6 @@ CONFIGURE_ARGS+= \
        --with-libpcap-includes="$(STAGING_DIR)/usr/include" \
        --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
 
-define Build/Compile
-       $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)
-endef
-
-define Build/Install
-       $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
-endef
-
 define Build/InstallDev
        $(INSTALL_DIR) $(STAGING_DIR)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/
index 82df2591f9a6d02e77434146a89f5c5d531a7885..d5a2882ddfd51989c12b48426f2603deab39e958 100644 (file)
@@ -1,6 +1,7 @@
---- a/configure
-+++ b/configure
-@@ -13552,10 +13552,11 @@ if ${daq_cv_libpcap_version_1x+:} false;
+diff -u --recursive daq-2.2.2-vanilla/configure daq-2.2.2/configure
+--- daq-2.2.2-vanilla/configure        2017-07-05 15:58:03.000000000 -0400
++++ daq-2.2.2/configure        2018-09-01 17:18:56.774898034 -0400
+@@ -13244,10 +13244,11 @@
  else
  
      if test "$cross_compiling" = yes; then :
index c510564c456d77f8309abaff6319c1093ef872b7..6a1aa8f96b398e2fb71c288a93bf2f46da8e7df8 100644 (file)
@@ -1,5 +1,6 @@
---- a/os-daq-modules/daq_ipfw.c
-+++ b/os-daq-modules/daq_ipfw.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c daq-2.2.2/os-daq-modules/daq_ipfw.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_ipfw.c        2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_ipfw.c        2018-09-01 17:21:10.608181841 -0400
 @@ -23,10 +23,10 @@
  #include <stdlib.h>
  #include <string.h>
@@ -12,8 +13,9 @@
  
  #include <netinet/in.h>
  #include <sys/socket.h>
---- a/os-daq-modules/daq_ipq.c
-+++ b/os-daq-modules/daq_ipq.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c daq-2.2.2/os-daq-modules/daq_ipq.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_ipq.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_ipq.c 2018-09-01 17:21:23.162208457 -0400
 @@ -24,10 +24,10 @@
  #include <stdio.h>
  #include <stdlib.h>
@@ -26,8 +28,9 @@
  
  #include <netinet/ip.h>
  
---- a/os-daq-modules/daq_nfq.c
-+++ b/os-daq-modules/daq_nfq.c
+diff -u --recursive daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c daq-2.2.2/os-daq-modules/daq_nfq.c
+--- daq-2.2.2-vanilla/os-daq-modules/daq_nfq.c 2017-02-08 17:04:18.000000000 -0500
++++ daq-2.2.2/os-daq-modules/daq_nfq.c 2018-09-01 17:21:35.202233988 -0400
 @@ -24,10 +24,10 @@
  #include <stdio.h>
  #include <stdlib.h>
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 2f345ffcffebae1dcca87393f2bfc688a8764d87..ac7e4f93407e4b590587c59a0688318df8d44437 100644 (file)
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdouble-conversion
-PKG_VERSION:=3.1.1
-PKG_RELEASE:=1
+PKG_VERSION:=3.1.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=double-conversion-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/google/double-conversion/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c49a6b3fa9c917f827b156c8e0799ece88ae50440487a99fc2f284cfd357a5b9
+PKG_HASH:=95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/double-conversion-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/double-conversion-$(PKG_VERSION)
 
 PKG_MAINTAINER:=
@@ -21,6 +23,7 @@ PKG_LICENSE:=BSD-3c
 PKG_LICENSE_FILES:=COPYING LICENSE
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
 
 define Package/libdouble-conversion
@@ -67,3 +70,4 @@ define Package/libdouble-conversion/install
 endef
 
 $(eval $(call BuildPackage,libdouble-conversion))
+$(eval $(call HostBuild))
diff --git a/libs/libdouble-conversion/patches/010-armeb.patch b/libs/libdouble-conversion/patches/010-armeb.patch
new file mode 100644 (file)
index 0000000..29c397e
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/double-conversion/utils.h
++++ b/double-conversion/utils.h
+@@ -91,7 +91,7 @@ int main(int argc, char** argv) {
+     defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+-    defined(_MIPS_ARCH_MIPS32R2) || \
++    defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) || \
+     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+     defined(__riscv) || \
+     defined(__or1k__) || defined(__arc__) || \
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 98b1970f05a98d94fb0c4213b1e8f26b1fb339f5..83ff65cb79515daabc019724963b079b5fd9b66e 100644 (file)
@@ -1,28 +1,30 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glog
-PKG_VERSION:=0.3.5
+PKG_VERSION:=0.4.0
 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:=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0
+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
diff --git a/libs/libglog/patches/100-fix-musl-compilation.patch b/libs/libglog/patches/100-fix-musl-compilation.patch
new file mode 100644 (file)
index 0000000..dab64be
--- /dev/null
@@ -0,0 +1,13 @@
+Index: glog-0.4.0/src/symbolize_unittest.cc
+===================================================================
+--- glog-0.4.0.orig/src/symbolize_unittest.cc
++++ glog-0.4.0/src/symbolize_unittest.cc
+@@ -401,7 +401,7 @@ int main(int argc, char **argv) {
+   FLAGS_logtostderr = true;
+   InitGoogleLogging(argv[0]);
+   InitGoogleTest(&argc, argv);
+-#if defined(HAVE_SYMBOLIZE)
++#if defined(HAVE_SYMBOLIZE) && defined(HAVE_STACKTRACE)
+ # if defined(__ELF__)
+   // We don't want to get affected by the callback interface, that may be
+   // used to install some callback function at InitGoogle() time.
index 61db49373c21fb52745a051a6e4d360043553b6a..095526b1ff539b6f5654e250108f581c45990b1f 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgpg-error
-PKG_VERSION:=1.34
+PKG_VERSION:=1.36
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://ftp.bit.nl/mirror/gnupg/ \
                https://ftp.nluug.nl/security/gnupg/ \
                http://ring.ksc.gr.jp/archives/net/gnupg/libgpg-error/ \
                https://www.gnupg.org/ftp/gcrypt/libgpg-error/
-PKG_HASH:=0680799dee71b86b2f435efb825391eb040ce2704b057f6bd3dcc47fbc398c81
+PKG_HASH:=babd98437208c163175c29453f8681094bcaf92968a15cafb1a276076b33c97c
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=LGPL-2.1+
index c7ff30fae387048f912c9ab3d9c4ba7ed5942ce9..606cdd3785856362f0356d94f022cdafafc1f21a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -74,6 +74,18 @@ AM_SILENT_RULES
+@@ -74,6 +74,21 @@ AM_SILENT_RULES
  AC_CANONICAL_HOST
  AB_INIT
  
@@ -11,6 +11,9 @@
 +    arm-openwrt-linux-gnu|armeb-openwrt-linux-gnu)
 +        host=arm-unknown-linux-gnueabi
 +        ;;
++    mips64-openwrt-linux-gnu)
++        host=mips64el-unknown-linux-gnuabi64
++        ;;
 +    *)
 +        host=$(echo $host | sed 's/openwrt/unknown/g')
 +        ;;
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 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
+
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))
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
index 7d9ee48e98af51fe9572bc3354cca996cd09c021..cae33e3da9a76abd991b6f3cf0daef9f8275d65b 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/erikd/libsndfile.git
-PKG_SOURCE_DATE:=2019-03-08
-PKG_SOURCE_VERSION:=5056a77fdae85f96eee4dff82af462db5a5c341e
-PKG_MIRROR_HASH:=5a695b64885ed3c41910029116de8b713118be6349554685fe53997316c369ea
+PKG_SOURCE_DATE:=2019-04-21
+PKG_SOURCE_VERSION:=25824cb914fb3b79e18f31fb861e218c84be7d34
+PKG_MIRROR_HASH:=9b3beef70003456ff297ce50ecd5cb1d066ca98f10f6363562431d773b3fcb3d
 
 PKG_LICENSE:=LGPLv2.1
 PKG_LICENSE_FILES:=COPYING
index 90e4d5b3024226d5b9e110effa90e328193dced7..c2d29ae3a3e75eea4959fd8550bd70a2d23fb379 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libssh2
-PKG_VERSION:=1.8.1
+PKG_VERSION:=1.8.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.libssh2.org/download
-PKG_HASH:=40b517f35b1bb869d0075b15125c7a015557f53a5a3a6a8bffb89b69fd70f159
+PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
 
 PKG_FIXUP:=autoreconf
 
@@ -21,6 +21,7 @@ PKG_INSTALL:=1
 
 PKG_LICENSE:=BSD
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:libssh2:libssh2
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_LIBSSH2_MBEDTLS \
index 091835f33b998d444328d60c48c361db265de3fa..ffb99d0b69d891e6e09cd57cb98f68027eacf928 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libstrophe
 PKG_VERSION:=0.9.2
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
@@ -56,7 +56,11 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
 
        $(INSTALL_DIR) $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libstrophe.pc \
+               $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libstrophe/install
index 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 b034e3638eeff8b6be0517af72c23122e9a8eca1..23b891a3dfc5317d7f93e2a430cb13bd1d331027 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l-utils
-PKG_VERSION:=1.16.3
+PKG_VERSION:=1.16.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.linuxtv.org/downloads/v4l-utils
-PKG_HASH:=7c5c0d49c130cf65d384f28e9f3a53c5f7d17bf18740c48c40810e0fbbed5b54
+PKG_HASH:=ed80242510385017a1dc566e17a285a77222bb301f5bc19386badfcc2c19df1b
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
@@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/nls.mk
 
 define Package/libv4l/Default
   TITLE:=Video 4 Linux
-  URL:=http://www.linuxtv.org/
+  URL:=https://www.linuxtv.org/
 endef
 
 define Package/libv4l/Default/description
index 6a9784adb06f015c7e0515de80b7ea167c2dda2d..2e55aa288352352a5e1f50293966024999bec777 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -283,16 +283,9 @@ else
+@@ -309,16 +309,9 @@ else
     AC_MSG_WARN(ALSA library not available)
  fi
  
diff --git a/libs/libv4l/patches/030-getsubopt.patch b/libs/libv4l/patches/030-getsubopt.patch
new file mode 100644 (file)
index 0000000..c476e5e
--- /dev/null
@@ -0,0 +1,36 @@
+POSIX says that behavior when subopts list is empty is undefined.
+musl libs will set value to NULL which leads to crash.
+
+Simply avoid getsubopt, since we cannot rely on it.
+
+diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+index 3ea6cd3..291fb3e 100644
+--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
++++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
+@@ -692,16 +692,17 @@ static bool parse_subset(char *optarg)
+ static bool parse_next_subopt(char **subs, char **value)
+ {
+-      static char *const subopts[] = {
+-          NULL
+-      };
+-      int opt = getsubopt(subs, subopts, value);
++      char *p = *subs;
++      *value = *subs;
+-      if (opt < 0 || *value)
+-              return false;
+-      fprintf(stderr, "No value given to suboption <%s>\n",
+-                      subopts[opt]);
+-      return true;
++      while (*p && *p != ',')
++              p++;
++
++      if (*p)
++              *p++ = '\0';
++
++      *subs = p;
++      return false;
+ }
+ void common_cmd(int ch, char *optarg)
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/
index bf25e520358c374c334e238779716b12d781073b..23c1d196f2902d9a5c195edd0bdccafd8dbc04ea 100644 (file)
@@ -8,9 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xerces-c
-PKG_MAIN_VER:=3.2
 PKG_VERSION:=3.2.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@APACHE/xerces/c/3/sources
@@ -24,33 +23,25 @@ PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
-include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/package.mk
 
-CONFIGURE_ARGS += \
-       --disable-pretty-make \
-       --enable-transcoder-iconv \
-       --enable-netaccessor-socket \
-       --enable-msgloader-inmemory
-
-TARGET_LDFLAGS += \
-       -lm
-
-define Package/libxerces-c
+define Package/libxerces-c/Default
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Validating XML parser library for C++
-  URL:=http://xerces.apache.org/
-  DEPENDS:=$(CXX_DEPENDS) $(ICONV_DEPENDS) +libc +libpthread
+  URL:=https://xerces.apache.org/
+endef
+
+define Package/libxerces-c
+$(call Package/libxerces-c/Default)
+  DEPENDS:=$(ICONV_DEPENDS) +libstdcpp
 endef
 
 define Package/libxerces-c-samples
-  SECTION:=libs
-  CATEGORY:=Libraries
-  TITLE:=Validating XML parser library for C++ (samples)
-  URL:=http://xerces.apache.org/
-  DEPENDS:=+libxerces-c
+$(call Package/libxerces-c/Default)
+  TITLE+= (samples)
+  DEPENDS+=+libxerces-c
 endef
 
 define Package/libxerces-c/description
@@ -69,18 +60,28 @@ define Package/libxerces-c-samples/description
   Validating XML parser library for C++ (samples)
 endef
 
+CONFIGURE_ARGS += \
+       --disable-rpath \
+       --enable-msgloader-inmemory \
+       --enable-netaccessor-socket \
+       --enable-transcoder-iconv \
+       --without-pic
+
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/xercesc/
        $(CP) $(PKG_INSTALL_DIR)/usr/include/xercesc/* $(1)/usr/include/xercesc/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c.a,libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{*.a,*.so} $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xerces-c.pc $(1)/usr/lib/pkgconfig/xerces-c.pc
 endef
 
 define Package/libxerces-c/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libxerces-c-$(PKG_MAIN_VER).so,libxerces-c.so} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
 endef
 
 define Package/libxerces-c-samples/install
index 9e639acb5b131b7b6b14694b63f932f764540946..33832701441baf6b7465e6da2695d527c06fd6f6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -194,7 +194,7 @@ AC_COMPILE_IFELSE(  [AC_LANG_PROGRAM([[#
+@@ -228,7 +228,7 @@ AC_COMPILE_IFELSE(  [AC_LANG_PROGRAM([[#
                      ]
                   )
  AC_MSG_CHECKING([for wcsrtombs])
@@ -9,7 +9,7 @@
  #include <string.h>]],
                                   [[
  mbstate_t st;
-@@ -216,7 +216,7 @@ else
+@@ -250,7 +250,7 @@ else
                      ]
                   )
  AC_MSG_CHECKING([for mbsrtowcs])
index 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
+
diff --git a/libs/log4cplus/Makefile b/libs/log4cplus/Makefile
new file mode 100644 (file)
index 0000000..314d556
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=log4cplus
+PKG_VERSION:=2.0.3
+PKG_RELEASE:=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_FILES:=LICENSE
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/log4cplus
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A simple to use C++ logging API
+  URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
+  DEPENDS:=+libstdcpp
+endef
+
+define Package/log4cplus/description
+  log4cplus is a simple to use C++11 logging API providing thread--safe,
+  flexible, and arbitrarily granular control over log management and
+  configuration. It is modeled after the Java log4j API.
+endef
+
+TARGET_CFLAGS += -flto
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CMAKE_OPTIONS += \
+       -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
+       -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
+       -DUNICODE:BOOL=OFF \
+       -DWITH_ICONV:BOOL=OFF
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/log4cplus $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+define Package/log4cplus/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,log4cplus))
index 7b88f0ce4b7a2c8ead6c966ef202a087bbf1b3a9..2fe3740400f7adb6aac493419164e09f93e42811 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lttng-ust
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.10.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
-PKG_HASH:=a75c3ea6cbfa3a89107a2141b27ebabf13964e628855566571f09459bbbc8cb3
+PKG_HASH:=9e8420f90d5f963f7aa32bc6d44adc1e491136f687c69ffb7a3075d33b40852b
 
+PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1 GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
 
 PKG_FIXUP:=autoreconf
 PKG_USE_MIPS16:=0
@@ -34,11 +34,19 @@ define Package/lttng-ust
   DEPENDS:= +liburcu +libuuid +librt
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+       --without-pic
+
+CONFIGURE_VARS += \
+       ac_cv_prog_BUILD_GEN_TP_EXAMPLES=no
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ust*.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ust.pc $(1)/usr/lib/pkgconfig/
 endef
index e1c20c6e5601c4d817f53697777c4ae07cb6462a..6dee8034107ae7ce009d65812e3f9521c4ffcd95 100644 (file)
@@ -1,7 +1,7 @@
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -20,8 +20,6 @@ if BUILD_JAVA_AGENT
SUBDIRS += liblttng-ust-java-agent
+@@ -26,8 +26,6 @@ SUBDIRS += python-lttngust \
              liblttng-ust-python-agent
  endif
  
 -SUBDIRS += tests doc
diff --git a/libs/lttng-ust/patches/002-examples.patch b/libs/lttng-ust/patches/002-examples.patch
deleted file mode 100644 (file)
index 46449b7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -350,7 +350,14 @@ AC_ARG_WITH([lttng-system-rundir],
- AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"],
-       [LTTng system runtime directory])
--AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:])
-+AC_ARG_ENABLE([examples],
-+      [AS_HELP_STRING([--enable-examples],[build examples [default=no]])],
-+      [enable_examples=$enableval],
-+      [enable_examples=no]
-+)
-+if test "x$enable_examples" = "xyes"; then
-+  AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1,[:])
-+fi
- AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test $BUILD_GEN_TP_EXAMPLES], [Build examples requiring lttng-gen-tp])
- AC_CONFIG_FILES([
index c345e814a622982f931d5ad71c1dca6716e710a9..7b60452512edb235e4051a741982c966b390ca53 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=measurement-kit
-PKG_VERSION:=0.10.0
+PKG_VERSION:=0.10.1
 PKG_RELEASE=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=c31ff8a457dfdbb2d42ef60f82646e508f6649107f15eec31fc22bc140ceb8e6
+PKG_HASH:=4caf856ebbb28633c7593a9b5b8ee79f0c0436d05ae7391cc59e8d72b260911a
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -29,7 +29,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/measurement-kit
   SECTION:=libs
   CATEGORY:=Libraries
-  TITLE:=C++14 library that implements open network measurement methodologies
+  TITLE:=library for open network measurement
   URL:=https://measurement-kit.github.io/
   DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +ca-bundle
 endef
diff --git a/libs/nspr/Makefile b/libs/nspr/Makefile
new file mode 100644 (file)
index 0000000..a01ba13
--- /dev/null
@@ -0,0 +1,86 @@
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nspr
+PKG_VERSION:=4.21
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+    https://download.cdn.mozilla.net/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/ \
+    https://archive.mozilla.org/pub/$(PKG_NAME)/releases/v$(PKG_VERSION)/src/
+PKG_HASH:=15ea32c7b100217b6e3193bc03e77f485d9bf7504051443ba9ce86d1c17c6b5a
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_PATH = ./nspr
+MAKE_PATH = ./nspr
+PKG_AUTOMAKE_PATHS = $(PKG_BUILD_DIR)/nspr
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+    conf=--enable-64bit
+endif
+
+export MUSL=$(if $(CONFIG_LIBC_USE_GLIBC),0,1)
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CONFIGURE_ARGS += \
+    --build=$(GNU_HOST_NAME) \
+    --host=$(GNU_HOST_NAME) \
+    --target=$(REAL_GNU_TARGET_NAME) \
+    --disable-debug \
+    --with-pthreads \
+    $(if $(CONFIG_IPV6),--enable-ipv6,--disable-ipv6) \
+    $(conf)
+
+define Build/Compile
+       CROSS_COMPILE=1 CFLAGS="-DXP_UNIX $(HOST_CFLAGS)" LDFLAGS="" CC="$(HOSTCC)" \
+           $(MAKE) -C $(PKG_BUILD_DIR)/nspr/config
+       $(call Build/Compile/Default)
+endef
+
+define Package/nspr
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Netscape Portable Runtime (NSPR)
+  URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR
+  DEPENDS:=+libpthread
+endef
+
+define Package/nspr/description
+  Netscape Portable Runtime (NSPR) provides a platform-neutral API for system
+  level and libc-like functions. The API is used in the Mozilla clients, many
+  of Red Hat's and Oracle's server applications, and other software offerings.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) \
+           $(1)/usr/include \
+           $(1)/usr/lib/ \
+           $(1)/usr/lib/pkgconfig/ \
+           $(1)/usr/share/aclocal/
+
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/nspr $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
+endef
+
+define Package/nspr/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,nspr))
diff --git a/libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch b/libs/nspr/patches/001-Makefile.in_rm_BUILD_STRING_and_BUILD_TIME.patch
new file mode 100644 (file)
index 0000000..4ab1df5
--- /dev/null
@@ -0,0 +1,103 @@
+From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Fri, 16 Nov 2018 13:52:49 +0800
+Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
+
+Remove _BUILD_STRING and _BUILD_TIME to avoid
+adding timestamp to _pl_bld.h which can result
+in adding timestamp in library file such as
+libnspr4.so.
+ $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
+ [snip]
+  0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
+ [snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ lib/ds/Makefile.in        | 8 +-------
+ lib/libc/src/Makefile.in  | 8 +-------
+ lib/prstreams/Makefile.in | 8 +-------
+ pr/src/Makefile.in        | 8 +-------
+ 4 files changed, 4 insertions(+), 28 deletions(-)
+
+diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
+index e737791..b578476 100644
+--- a/nspr/lib/ds/Makefile.in
++++ b/nspr/lib/ds/Makefile.in
+@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
+ $(TINC):
+       @$(MAKE_OBJDIR)
+-      @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+-      @if test ! -z "$(SH_NOW)"; then \
+-          $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+-      else \
+-          true; \
+-      fi
+-      @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++      @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
+index e8a6d9f..978ed28 100644
+--- a/nspr/lib/libc/src/Makefile.in
++++ b/nspr/lib/libc/src/Makefile.in
+@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
+ $(TINC):
+       @$(MAKE_OBJDIR)
+-      @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+-      @if test ! -z "$(SH_NOW)"; then \
+-          $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+-      else \
+-          true; \
+-      fi
+-      @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++      @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
+index aeb2944..f318097 100644
+--- a/nspr/lib/prstreams/Makefile.in
++++ b/nspr/lib/prstreams/Makefile.in
+@@ -116,13 +116,7 @@ endif
+ $(TINC):
+       @$(MAKE_OBJDIR)
+-      @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+-      @if test ! -z "$(SH_NOW)"; then \
+-          $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+-      else \
+-          true; \
+-      fi
+-      @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++      @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+ $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
+diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
+index 19c5a69..b4ac31c 100644
+--- a/nspr/pr/src/Makefile.in
++++ b/nspr/pr/src/Makefile.in
+@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
+ $(TINC):
+       @$(MAKE_OBJDIR)
+-      @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
+-      @if test ! -z "$(SH_NOW)"; then \
+-          $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
+-      else \
+-          true; \
+-      fi
+-      @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
++      @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
+ $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
+-- 
+2.7.4
+
diff --git a/libs/nspr/patches/002-Add-ARC-support.patch b/libs/nspr/patches/002-Add-ARC-support.patch
new file mode 100644 (file)
index 0000000..92785cc
--- /dev/null
@@ -0,0 +1,88 @@
+From 6cb5b0be8837222a1e01745f2cf57cd0e593186d Mon Sep 17 00:00:00 2001
+From: Antoine Tenart <antoine.tenart@free-electrons.com>
+Date: Mon, 23 Oct 2017 10:28:20 +0200
+Subject: [PATCH] Add ARC support
+
+[Alexey: Rebased on top of other patches like RiscV, NIOS2 etc].
+
+Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1492378 ]
+---
+ pr/include/md/_linux.cfg | 45 ++++++++++++++++++++++++++++++++++++++++
+ pr/include/md/_linux.h   |  2 ++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index fec8525378dc..5f4fa0eac783 100644
+--- a/nspr/pr/include/md/_linux.cfg
++++ b/nspr/pr/include/md/_linux.cfg
+@@ -1157,6 +1157,51 @@
+ #define PR_BYTES_PER_WORD_LOG2  3
+ #define PR_BYTES_PER_DWORD_LOG2 3
++#elif defined(__arc__)
++
++#define IS_LITTLE_ENDIAN 1
++#undef  IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   4
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   4
++#define PR_BYTES_PER_DWORD  8
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    32
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    32
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   5
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   5
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    4
++#define PR_ALIGN_OF_INT64   4
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD    4
++
++#define PR_BYTES_PER_WORD_LOG2   2
++#define PR_BYTES_PER_DWORD_LOG2  3
++
+ #else
+ #error "Unknown CPU architecture"
+diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
+index 8e04fad479a1..628b1217e9c8 100644
+--- a/nspr/pr/include/md/_linux.h
++++ b/nspr/pr/include/md/_linux.h
+@@ -63,6 +63,8 @@
+ #define _PR_SI_ARCHITECTURE "riscv32"
+ #elif defined(__riscv) && (__riscv_xlen == 64)
+ #define _PR_SI_ARCHITECTURE "riscv64"
++#elif defined(__arc__)
++#define _PR_SI_ARCHITECTURE "arc"
+ #else
+ #error "Unknown CPU architecture"
+ #endif
+-- 
+2.17.1
+
diff --git a/libs/nspr/patches/003-native_and_musl_fix.patch b/libs/nspr/patches/003-native_and_musl_fix.patch
new file mode 100644 (file)
index 0000000..c5485db
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/nspr/config/config.mk    2017-10-31 13:13:22.692343122 +0200
++++ b/nspr/config/config.mk    2017-10-31 13:13:58.758016378 +0200
+@@ -126,6 +126,9 @@
+ ifeq ($(USE_IPV6),1)
+ DEFINES += -D_PR_INET6
++ifeq ($(MUSL),1)
++CFLAGS += -D_PR_POLL_AVAILABLE -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO -D_PR_INET6_PROBE
++endif
+ endif
+ ifeq ($(MOZ_UNICODE),1)
+--- a/nspr/config/Makefile.in  2019-03-31 13:44:56.919871810 +0300
++++ b/nspr/config/Makefile.in  2019-03-31 13:45:21.560545948 +0300
+@@ -30,7 +30,7 @@
+ # This version hasn't been ported for us; the one in mozilla/config has
+ ifneq ($(OS_ARCH),OS2)
+-CSRCS  += nsinstall.c
++#CSRCS  += nsinstall.c
+  
+ PLSRCS        = nfspwd.pl
+ endif
diff --git a/libs/nss/Makefile b/libs/nss/Makefile
new file mode 100644 (file)
index 0000000..c2d57f1
--- /dev/null
@@ -0,0 +1,142 @@
+#
+# Copyright (C) 2019 Lucian Cristian
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nss
+PKG_VERSION:=3.43
+PKG_RELEASE:=2
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+PKG_LICENCE:=MPL-2.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:= \
+    https://download.cdn.mozilla.net/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src \
+    https://archive.mozilla.org/pub/security/$(PKG_NAME)/releases/NSS_$(subst .,_,$(PKG_VERSION))_RTM/src
+PKG_HASH:=f30bc1b7330887b75de9fec37dbc173001758dc43fb095ffbc45dac4093fe2ca
+
+PKG_BUILD_PARALLEL:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libnss
+  SECTION:=libs
+  SUBMENU:=SSL
+  CATEGORY:=Libraries
+  TITLE:=Mozilla's SSL and TLS implementation
+  URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+  DEPENDS:=+libpthread +libsqlite3 +nspr
+endef
+
+define Package/nss-utils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Utilities for Mozilla's SSL and TLS implementation
+  URL:=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+  DEPENDS:=+libnss
+endef
+
+define Package/libnss/description
+  Network Security Services (NSS) is a set of libraries designed to support 
+  cross-platform development of security-enabled client and server applications.
+  Applications built with NSS can support SSL v2 and v3, TLS, PKCS 5, PKCS 7,
+  PKCS 11, PKCS 12, S/MIME, X.509 v3 certificates, and other security standards.
+endef
+
+CONFIGURE_PATH = ./nss
+MAKE_PATH = ./nss
+
+LBITS = $(shell $(TARGET_CC) -dM -E - </dev/null | grep -q "__LP64__" && echo 64 || echo 32)
+
+ifeq ($(LBITS),64)
+    export USE_64=1
+endif
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+export CROSS_COMPILE=1
+export BUILD_OPT=1
+export NATIVE_CC=$(HOSTCC)
+export NATIVE_FLAGS=$(HOST_CFLAGS)
+export NSDISTMODE=copy
+export NSS_ENABLE_WERROR=0
+export NSS_DISABLE_GTESTS=1
+export NSS_USE_SYSTEM_SQLITE=1
+export OS_TARGET=Linux
+export OS_ARCH=Linux
+export OS_TEST=$(ARCH)
+export CPU_ARCH=$(ARCH)
+export fpic=$(FPIC)
+export NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr
+export SEED_ONLY_DEV_URANDOM=1
+export OS_REL_CFLAGS=$(TARGET_CFLAGS)
+export NS_USE_GCC=1
+export FREEBL_NO_DEPEND=1
+#size optimisation, seems to not impact speed
+export NSS_DISABLE_DBM=1
+export NSS_PKIX_NO_LDAP=1
+export ALLOW_OPT_CODE_SIZE=1
+export OPT_CODE_SIZE=1
+
+#native compile nsinstall
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       USE_NATIVE=1 OS_REL_CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" CC="$(HOSTCC)" \
+           $(MAKE) -C $(PKG_BUILD_DIR)/nss/coreconf/nsinstall
+#      $(if $(CONFIG_LIBC_USE_GLIBC),, \
+#              $(SED) '/-DHAVE_SYS_CDEFS_H/d' $(PKG_BUILD_DIR)/nss/lib/dbm/config/config.mk)
+endef
+
+define Package/libnss/conffiles
+/etc/pki/nssdb
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) \
+        $(1)/usr/include/nss \
+        $(1)/usr/lib \
+        $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/dist/private/nss/*.h \
+         $(1)/usr/include/nss/
+       $(CP) $(PKG_BUILD_DIR)/dist/public/nss/*.h \
+         $(1)/usr/include/nss/
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/*.so \
+         $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/nss/config/*.pc \
+         $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/nss-utils/install
+       $(INSTALL_DIR) \
+        $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/bin/certutil $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/bin/pk12util $(1)/usr/bin
+endef
+
+#for now pack only libreswan needed libs
+define Package/libnss/install
+       $(INSTALL_DIR) \
+        $(1)/usr/lib \
+        $(1)/etc/pki/nssdb \
+        $(1)/etc/ipsec.d
+
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libfreebl3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libnss3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libnssutil3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libsmime3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libsoftokn3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/dist/build_dir/lib/libssl3.so $(1)/usr/lib/
+#      Pprovide databases with a blank certificate
+       $(CP)   ./files/blank-cert9.db $(1)/etc/pki/nssdb/cert9.db
+       $(CP)   ./files/blank-key4.db $(1)/etc/pki/nssdb/key4.db
+       $(CP)   ./files/system-pkcs11.txt $(1)/etc/pki/nssdb/pkcs11.txt
+       ln -s /etc/pki/nssdb/cert9.db $(1)/etc/ipsec.d/cert9.db
+       ln -s /etc/pki/nssdb/key4.db $(1)/etc/ipsec.d/key4.db
+       ln -s /etc/pki/nssdb/pkcs11.txt $(1)/etc/ipsec.d/pkcs11.txt
+endef
+
+$(eval $(call BuildPackage,nss-utils))
+$(eval $(call BuildPackage,libnss))
diff --git a/libs/nss/files/blank-cert9.db b/libs/nss/files/blank-cert9.db
new file mode 100644 (file)
index 0000000..7d4bcf2
Binary files /dev/null and b/libs/nss/files/blank-cert9.db differ
diff --git a/libs/nss/files/blank-key4.db b/libs/nss/files/blank-key4.db
new file mode 100644 (file)
index 0000000..d47f08d
Binary files /dev/null and b/libs/nss/files/blank-key4.db differ
diff --git a/libs/nss/files/system-pkcs11.txt b/libs/nss/files/system-pkcs11.txt
new file mode 100644 (file)
index 0000000..1a264e9
--- /dev/null
@@ -0,0 +1,5 @@
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='sql:/etc/pki/nssdb' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription='' 
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
+
diff --git a/libs/nss/patches/001-nss_standalone.patch b/libs/nss/patches/001-nss_standalone.patch
new file mode 100644 (file)
index 0000000..eb3b6fd
--- /dev/null
@@ -0,0 +1,247 @@
+Submitted By:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
+Date:                    2016-12-27
+Initial Package Version: 3.12.4
+Upstream Status:         Not applicable
+Origin:                  Self, rediffed for nss-3.28.
+Description:             Adds auto-generated nss.pc and nss-config script, and
+                         allows building without nspr in the source tree.
+                         For 3.40.1, Requires: updated to nspr >= 4.20.
+
+diff -Naurp nss-3.28-orig/nss/Makefile nss-3.28/nss/Makefile
+--- nss-3.28-orig/nss/Makefile 2016-12-21 05:56:27.000000000 -0600
++++ nss-3.28/nss/Makefile      2016-12-26 22:24:52.695146032 -0600
+@@ -46,7 +46,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
+ # (7) Execute "local" rules. (OPTIONAL).                              #
+ #######################################################################
+-nss_build_all: build_nspr all latest
++nss_build_all: all latest
+ nss_clean_all: clobber_nspr clobber
+diff -Naurp nss-3.28-orig/nss/config/Makefile nss-3.28/nss/config/Makefile
+--- nss-3.28-orig/nss/config/Makefile  1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/Makefile       2016-12-26 22:20:40.008205774 -0600
+@@ -0,0 +1,40 @@
++CORE_DEPTH = ..
++DEPTH      = ..
++
++include $(CORE_DEPTH)/coreconf/config.mk
++
++NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
++NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
++PREFIX = /usr
++
++all: export libs
++
++export:
++      # Create the nss.pc file
++      mkdir -p $(DIST)/lib/pkgconfig
++      sed -e "s,@prefix@,$(PREFIX)," \
++          -e "s,@exec_prefix@,\$${prefix}," \
++          -e "s,@libdir@,\$${prefix}/lib," \
++          -e "s,@includedir@,\$${prefix}/include/nss," \
++          -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
++          -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++          -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++          nss.pc.in > nss.pc
++      chmod 0644 nss.pc
++      ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
++
++      # Create the nss-config script
++      mkdir -p $(DIST)/bin
++      sed -e "s,@prefix@,$(PREFIX)," \
++          -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
++          -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
++          -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
++          nss-config.in > nss-config
++      chmod 0755 nss-config
++      ln -sf ../../../nss/config/nss-config $(DIST)/bin
++
++libs:
++
++dummy: all export libs
++
+diff -Naurp nss-3.28-orig/nss/config/nss-config.in nss-3.28/nss/config/nss-config.in
+--- nss-3.28-orig/nss/config/nss-config.in     1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/nss-config.in  2016-12-26 22:20:40.008205774 -0600
+@@ -0,0 +1,153 @@
++#!/bin/sh
++
++prefix=@prefix@
++
++major_version=@NSS_MAJOR_VERSION@
++minor_version=@NSS_MINOR_VERSION@
++patch_version=@NSS_PATCH_VERSION@
++
++usage()
++{
++      cat <<EOF
++Usage: nss-config [OPTIONS] [LIBRARIES]
++Options:
++      [--prefix[=DIR]]
++      [--exec-prefix[=DIR]]
++      [--includedir[=DIR]]
++      [--libdir[=DIR]]
++      [--version]
++      [--libs]
++      [--cflags]
++Dynamic Libraries:
++      nss
++      nssutil
++      smime
++      ssl
++      softokn
++EOF
++      exit $1
++}
++
++if test $# -eq 0; then
++      usage 1 1>&2
++fi
++
++lib_nss=yes
++lib_nssutil=yes
++lib_smime=yes
++lib_ssl=yes
++lib_softokn=yes
++
++while test $# -gt 0; do
++  case "$1" in
++  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
++  *) optarg= ;;
++  esac
++
++  case $1 in
++    --prefix=*)
++      prefix=$optarg
++      ;;
++    --prefix)
++      echo_prefix=yes
++      ;;
++    --exec-prefix=*)
++      exec_prefix=$optarg
++      ;;
++    --exec-prefix)
++      echo_exec_prefix=yes
++      ;;
++    --includedir=*)
++      includedir=$optarg
++      ;;
++    --includedir)
++      echo_includedir=yes
++      ;;
++    --libdir=*)
++      libdir=$optarg
++      ;;
++    --libdir)
++      echo_libdir=yes
++      ;;
++    --version)
++      echo ${major_version}.${minor_version}.${patch_version}
++      ;;
++    --cflags)
++      echo_cflags=yes
++      ;;
++    --libs)
++      echo_libs=yes
++      ;;
++    nss)
++      lib_nss=yes
++      ;;
++    nssutil)
++      lib_nssutil=yes
++      ;;
++    smime)
++      lib_smime=yes
++      ;;
++    ssl)
++      lib_ssl=yes
++      ;;
++    softokn)
++      lib_softokn=yes
++      ;;
++    *)
++      usage 1 1>&2
++      ;;
++  esac
++  shift
++done
++
++# Set variables that may be dependent upon other variables
++if test -z "$exec_prefix"; then
++    exec_prefix=`pkg-config --variable=exec_prefix nss`
++fi
++if test -z "$includedir"; then
++    includedir=`pkg-config --variable=includedir nss`
++fi
++if test -z "$libdir"; then
++    libdir=`pkg-config --variable=libdir nss`
++fi
++
++if test "$echo_prefix" = "yes"; then
++    echo $prefix
++fi
++
++if test "$echo_exec_prefix" = "yes"; then
++    echo $exec_prefix
++fi
++
++if test "$echo_includedir" = "yes"; then
++    echo $includedir
++fi
++
++if test "$echo_libdir" = "yes"; then
++    echo $libdir
++fi
++
++if test "$echo_cflags" = "yes"; then
++    echo -I$includedir
++fi
++
++if test "$echo_libs" = "yes"; then
++      libdirs="-L$libdir"
++      if test -n "$lib_nss"; then
++      libdirs="$libdirs -lnss${major_version}"
++      fi
++      if test -n "$lib_nssutil"; then
++        libdirs="$libdirs -lnssutil${major_version}"
++      fi
++      if test -n "$lib_smime"; then
++      libdirs="$libdirs -lsmime${major_version}"
++      fi
++      if test -n "$lib_ssl"; then
++      libdirs="$libdirs -lssl${major_version}"
++      fi
++      if test -n "$lib_softokn"; then
++        libdirs="$libdirs -lsoftokn${major_version}"
++      fi
++      echo $libdirs
++fi      
++
+diff -Naurp nss-3.28-orig/nss/config/nss.pc.in nss-3.28/nss/config/nss.pc.in
+--- nss-3.28-orig/nss/config/nss.pc.in 1969-12-31 18:00:00.000000000 -0600
++++ nss-3.28/nss/config/nss.pc.in      2016-12-26 22:22:53.300694346 -0600
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: NSS
++Description: Network Security Services
++Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
++Requires: nspr >= 4.20
++Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
++Cflags: -I${includedir}
++
+diff -Naurp nss-3.28-orig/nss/manifest.mn nss-3.28/nss/manifest.mn
+--- nss-3.28-orig/nss/manifest.mn      2016-12-21 05:56:27.000000000 -0600
++++ nss-3.28/nss/manifest.mn   2016-12-26 22:24:12.278991843 -0600
+@@ -10,4 +10,4 @@ IMPORTS =    nspr20/v4.8 \
+ RELEASE = nss
+-DIRS = coreconf lib cmd cpputil gtests
++DIRS = coreconf lib cmd cpputil gtests config
diff --git a/libs/nss/patches/002-os_test.patch b/libs/nss/patches/002-os_test.patch
new file mode 100644 (file)
index 0000000..ce2b683
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/nss/coreconf/arch.mk     2019-04-01 22:20:32.470080052 +0300
++++ b/nss/coreconf/arch.mk     2019-04-01 22:21:01.730987548 +0300
+@@ -20,13 +20,13 @@
+ # Macros for getting the OS architecture
+ #
+-OS_ARCH := $(subst /,_,$(shell uname -s))
++OS_ARCH ?= $(subst /,_,$(shell uname -s))
+ #
+ # Attempt to differentiate between sparc and x86 Solaris
+ #
+-OS_TEST := $(shell uname -m)
++OS_TEST ?= $(shell uname -m)
+ ifeq ($(OS_TEST),i86pc)
+     OS_RELEASE := $(shell uname -r)_$(OS_TEST)
+ else
diff --git a/libs/nss/patches/003-openwrt_fix.patch b/libs/nss/patches/003-openwrt_fix.patch
new file mode 100644 (file)
index 0000000..d4af642
--- /dev/null
@@ -0,0 +1,86 @@
+--- a/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:14.797053528 +0300
++++ b/nss/lib/dbm/src/dirent.h 2017-10-19 17:15:26.156310432 +0300
+@@ -30,7 +30,7 @@
+ #define MAXNAMLEN FILENAME_MAX
+ #else
+-#include <param.h>
++#include <sys/param.h>
+ #endif
+ #endif
+--- a/nss/coreconf/rules.mk    2019-03-31 22:39:06.741609534 +0300
++++ b/nss/coreconf/rules.mk    2019-03-31 22:36:13.260356949 +0300
+@@ -261,7 +261,7 @@
+ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
+       $(AR) $(subst /,\\,$(OBJS))
+ else
+-      $(AR) $(OBJS)
++      $(AR) rcs $@ $(OBJS)
+ endif
+       $(RANLIB) $@
+--- a/nss/coreconf/arch.mk     2019-03-31 23:38:34.374931416 +0300
++++ b/nss/coreconf/arch.mk     2019-03-31 23:38:44.667236102 +0300
+@@ -305,7 +305,7 @@
+     OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
+ endif
+ OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
+-OBJDIR_NAME = $(OBJDIR_NAME_BASE).OBJ
++OBJDIR_NAME = build_dir
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+--- a/nss/coreconf/Linux.mk    2019-04-01 10:08:59.129269177 +0300
++++ b/nss/coreconf/Linux.mk    2019-04-01 10:09:15.557782574 +0300
+@@ -139,6 +139,7 @@
+       DEFINES         += -D_REENTRANT
+ endif
++ifndef USE_NATIVE
+ DSO_CFLAGS            = -fPIC
+ DSO_LDOPTS            = -shared $(ARCHFLAG) -Wl,--gc-sections
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+@@ -149,6 +150,7 @@
+ ZDEFS_FLAG            = -Wl,-z,defs
+ DSO_LDOPTS            += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
+ LDFLAGS                       += $(ARCHFLAG) -z noexecstack
++endif
+ # On Maemo, we need to use the -rpath-link flag for even the standard system
+ # library directories.
+--- a/nss/coreconf/Linux.mk    2019-04-01 23:10:19.091912203 +0300
++++ b/nss/coreconf/Linux.mk    2019-04-06 14:07:13.499169075 +0300
+@@ -140,7 +140,7 @@
+ endif
+ ifndef USE_NATIVE
+-DSO_CFLAGS            = -fPIC
++DSO_CFLAGS            = $(fpic)
+ DSO_LDOPTS            = -shared $(ARCHFLAG) -Wl,--gc-sections
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+ # incorrectly reports undefined references in the libraries we link with, so
+--- a/nss/coreconf/Linux.mk    2019-04-06 20:25:36.431663894 +0300
++++ b/nss/coreconf/Linux.mk    2019-04-06 20:26:23.397129525 +0300
+@@ -107,11 +107,6 @@
+ endif
+ ifdef BUILD_OPT
+-ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
+-      OPTIMIZER = -Os
+-else
+-      OPTIMIZER = -O2
+-endif
+ ifdef MOZ_DEBUG_SYMBOLS
+       ifdef MOZ_DEBUG_FLAGS
+               OPTIMIZER += $(MOZ_DEBUG_FLAGS)
+--- a/nss/coreconf/UNIX.mk     2019-04-06 20:34:24.284157646 +0300
++++ b/nss/coreconf/UNIX.mk     2019-04-06 20:34:34.760485327 +0300
+@@ -10,7 +10,6 @@
+ LDOPTS     += -L$(SOURCE_LIB_DIR)
+ ifdef BUILD_OPT
+-      OPTIMIZER  += -O
+       DEFINES    += -UDEBUG -DNDEBUG
+ else
+       OPTIMIZER  += -g
index 0a6f9ade8fd287336ebec9d436f9b21a03955998..b110787a28d43b0d756307db26db385f1496bb22 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opencv
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(PKG_VERSION)/
diff --git a/libs/opencv/patches/010-fix-url.patch b/libs/opencv/patches/010-fix-url.patch
new file mode 100644 (file)
index 0000000..cad061b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/3rdparty/ippicv/downloader.cmake
++++ b/3rdparty/ippicv/downloader.cmake
+@@ -64,7 +64,7 @@ function(_icv_downloader)
+       if(DEFINED ENV{OPENCV_ICV_URL})
+         set(OPENCV_ICV_URL $ENV{OPENCV_ICV_URL})
+       else()
+-        set(OPENCV_ICV_URL "https://raw.githubusercontent.com/Itseez/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
++        set(OPENCV_ICV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_BINARIES_COMMIT}/ippicv")
+       endif()
+     endif()
index 8b459642901ee6be8f9557c3219775d4759950a3..f667d76703e586cd068f68fcdaf88407a8bcf237 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openldap
 PKG_VERSION:=2.4.47
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://gpl.savoirfairelinux.net/pub/mirrors/openldap/openldap-release/ \
@@ -24,6 +24,7 @@ PKG_FIXUP:=autoreconf
 
 PKG_CONFIG_DEPENDS := \
         CONFIG_OPENLDAP_DEBUG \
+        CONFIG_OPENLDAP_CRYPT \
         CONFIG_OPENLDAP_MONITOR \
         CONFIG_OPENLDAP_DB47 \
         CONFIG_OPENLDAP_ICU
@@ -53,6 +54,25 @@ define Package/libopenldap/config
        help
                Enable debugging information. This option must be enabled
                for the loglevel directive to work.
+  config OPENLDAP_CRYPT
+       bool "Crypt(3) passwords support"
+       default n
+       help
+               With crypt(3) password storage scheme enabled, OpenLDAP can
+               receive and store SHA-256 and SHA-512 password hashes from
+               Samba AD-DC. If this option is disabled, synchronization of
+               passwords between Samba AD-DC (v4.5 and above) and OpenLDAP
+               requires use of cleartext passwords.
+               To enable crypt(3) password synchronization functionality:
+               1. Re-include crypt(3) support in OpenWRT by enabling 'Include
+               crypt() support for SHA256, SHA512 and Blowfish ciphers' option
+               in "Advanced configuration options (for developers)" ->
+               "Toolchain Options".
+               2. Provision AD-DC with 'password hash userPassword schemes'
+               option. For more information, see smb.conf manpage for details
+               on 'password hash userPassword schemes'.
+               3. Use a script to synchronize passwords from AD-DC to
+               OpenLDAP. See samba-tool manpage for 'user syncpasswords'.
   config OPENLDAP_MONITOR
        bool "Enable monitor backend"
        default n
@@ -121,6 +141,12 @@ CONFIGURE_ARGS += \
        --disable-relay
 
 
+ifdef CONFIG_OPENLDAP_CRYPT
+       CONFIGURE_ARGS+= --enable-crypt
+else
+       CONFIGURE_ARGS+= --disable-crypt
+endif
+
 ifdef CONFIG_OPENLDAP_MONITOR
        CONFIGURE_ARGS+= --enable-monitor
 else
index 3208aa7aca58598e63ae258d80018193f4fc2b43..1f141ebd252cc824b9a78f6359c55ccdccde56fa 100644 (file)
@@ -30,6 +30,7 @@ define Package/libpcre/default
   SECTION:=libs
   CATEGORY:=Libraries
   URL:=https://www.pcre.org/
+  DEPENDS:=$(CXX_DEPENDS)
 endef
 
 define Package/libpcre
@@ -45,7 +46,7 @@ endef
 define Package/libpcrecpp
   $(call Package/libpcre/default)
   TITLE:=C++ wrapper for Perl Compatible Regular Expression library
-  DEPENDS:=+libpcre $(CXX_DEPENDS)
+  DEPENDS:=+libpcre
 endef
 
 TARGET_CFLAGS += $(FPIC)
@@ -55,12 +56,8 @@ CONFIGURE_ARGS += \
        --enable-unicode-properties \
        --enable-pcre16 \
        --with-match-limit-recursion=16000 \
+       --enable-cpp
 
-ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
-  CONFIGURE_ARGS+= --enable-cpp
-else
-  CONFIGURE_ARGS+= --disable-cpp
-endif
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS)"
index d04e13a48aa16a4bd6f39fa0871c1c7343a5b9ba..8a6cae27628ddd0b1f93e14d1519fb269bc11baf 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pixman
-PKG_VERSION:=0.38.0
+PKG_VERSION:=0.38.4
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=a7592bef0156d7c27545487a52245669b00cf7e70054505381cff2136d890ca8
+PKG_HASH:=da66d6fd6e40aee70f7bd02e4f8f76fc3f006ec879d346bae6a723025cfbdde7
 PKG_SOURCE_URL:=https://www.cairographics.org/releases
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index 6199766c37859676ef757b731b7d692a7e35fbba..e044833180870145c2386e07401c7d9b455dcf8b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libprotobuf-c
 PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
diff --git a/libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch b/libs/protobuf-c/patches/001-t-generated-code2-cxx-generate-packed-data-fix.patch
new file mode 100644 (file)
index 0000000..2d83cec
--- /dev/null
@@ -0,0 +1,13 @@
+Index: protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
+===================================================================
+--- protobuf-c-1.3.1.orig/t/generated-code2/cxx-generate-packed-data.cc
++++ protobuf-c-1.3.1/t/generated-code2/cxx-generate-packed-data.cc
+@@ -998,7 +998,7 @@ static void dump_test_packed_repeated_en
+ static void dump_test_unknown_fields (void)
+ {
+   EmptyMess mess;
+-  const google::protobuf::Message::Reflection *reflection = mess.GetReflection();
++  const google::protobuf::Reflection *reflection = mess.GetReflection();
+   google::protobuf::UnknownFieldSet *fs = reflection->MutableUnknownFields(&mess);
+ #if GOOGLE_PROTOBUF_VERSION >= 2001000
index c93527f054d66208a8918a3f49086d95cd146fb4..3d0a16f2807c158243beacab63724ca7644ade18 100644 (file)
@@ -8,19 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=protobuf
-PKG_VERSION:=3.5.1
+PKG_VERSION:=3.7.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
-PKG_HASH:=c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092
+PKG_HASH:=97f6cdaa0724d5a8cd3375d5f5cf4bd253d5ad5291154f533ed0d94a9d501ef3
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=protobuf/host
-PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
 
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -31,7 +31,7 @@ define Package/protobuf/Default
   CATEGORY:=Libraries
   TITLE:=A structured data encoding library
   URL:=https://github.com/google/protobuf
-  DEPENDS:=+zlib +libpthread +libstdcpp
+  DEPENDS:=+zlib +libpthread +libatomic +libstdcpp
   MAINTAINER:=Ken Keys <kkeys@caida.org>
 endef
 
index 6bdabb58550c76b88f5418e97fe07d0d05d7dde2..1ceffa03602211ea3bb1826985a50e808b70afea 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqlite
-PKG_VERSION:=3260000
-PKG_RELEASE:=3
+PKG_VERSION:=3270200
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_HASH:=5daa6a3fb7d1e8c767cd59c4ded8da6e4b00c61d3b466d0685e35c4dd6d7bf5d
-PKG_SOURCE_URL:=https://www.sqlite.org/2018/
+PKG_HASH:=50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e
+PKG_SOURCE_URL:=https://www.sqlite.org/2019/
 
 PKG_LICENSE:=PUBLICDOMAIN
 PKG_LICENSE_FILES:=
index 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 1a0896244d4babb02e24aeb6f9a6fce3dfedc665..8a5d3ba14772f650ae6039391e56fd3d051cab0e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.5
+PKG_VERSION:=2.3.5.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=bfe112ec6d11f7d6c6f7f0440e3b6e2c840c15cec1e99466b5495765d54aaaff
+PKG_HASH:=ba14e41aefd81a868a35b83bcb54194116106424d37690519b50ea83c0f31bf2
 PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
@@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS:= \
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 # iconv is needed when compiling with MySQL support. iconv will also be used by
@@ -122,7 +123,8 @@ CONFIGURE_VARS += \
        lib_cv_va_copy=yes \
        lib_cv_va_copy=yes \
        lib_cv___va_copy=yes \
-       lib_cv_va_val_copy=yes
+       lib_cv_va_val_copy=yes \
+       ac_cv_prog_KRB5CONFIG="krb5-config"
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
index ecb00a77bf5a8a220f09c0db19324de47fabc770..72d447425bfc9b4d04da8ee006f0c23cc7b341dc 100644 (file)
  
 --- a/src/lib-ssl-iostream/dovecot-openssl-common.c
 +++ b/src/lib-ssl-iostream/dovecot-openssl-common.c
-@@ -79,6 +79,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -63,9 +63,11 @@ void dovecot_openssl_common_global_ref(void)
+               /*i_warning("CRYPTO_set_mem_functions() was called too late");*/
+       }
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       SSL_library_init();
+       SSL_load_error_strings();
+       OpenSSL_add_all_algorithms();
++#endif
+ }
+ bool dovecot_openssl_common_global_unref(void)
+@@ -79,6 +81,7 @@ bool dovecot_openssl_common_global_unref(void)
                ENGINE_finish(dovecot_openssl_engine);
                dovecot_openssl_engine = NULL;
        }
@@ -18,7 +30,7 @@
        /* OBJ_cleanup() is called automatically by EVP_cleanup() in
           newer versions. Doesn't hurt to call it anyway. */
        OBJ_cleanup();
-@@ -100,6 +101,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -100,6 +103,7 @@ bool dovecot_openssl_common_global_unref(void)
        ERR_free_strings();
  #ifdef HAVE_OPENSSL_CLEANUP
        OPENSSL_cleanup();
  #include <openssl/x509.h>
  #include <openssl/pem.h>
  #include <openssl/ssl.h>
+@@ -510,8 +513,10 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx,
+       int nid;
+       const char *curve_name;
+ #endif
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       if (SSL_CTX_need_tmp_RSA(ssl_ctx) != 0)
+               SSL_CTX_set_tmp_rsa_callback(ssl_ctx, ssl_gen_rsa_key);
++#endif
+       if (set->dh == NULL || *set->dh == '\0')
+               SSL_CTX_set_tmp_dh_callback(ssl_ctx, ssl_tmp_dh_callback);
+ #ifdef HAVE_ECDH
index 9859c7328be32310774b92af6c1c2a57c3bc8a74..19326fb13b891ea6718cf01bc9f59079aed0cd41 100644 (file)
@@ -47,7 +47,7 @@
  
  #ifdef HAVE_SSL_NEW_MEM_FUNCS
  static void *dovecot_openssl_malloc(size_t size, const char *u0 ATTR_UNUSED, int u1 ATTR_UNUSED)
-@@ -75,10 +78,12 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -77,10 +80,12 @@ bool dovecot_openssl_common_global_unref(void)
        if (--openssl_init_refcount > 0)
                return TRUE;
  
@@ -60,7 +60,7 @@
  #if OPENSSL_VERSION_NUMBER < 0x10100000L
        /* OBJ_cleanup() is called automatically by EVP_cleanup() in
           newer versions. Doesn't hurt to call it anyway. */
-@@ -86,7 +91,9 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -88,7 +93,9 @@ bool dovecot_openssl_common_global_unref(void)
  #ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
        SSL_COMP_free_compression_methods();
  #endif
@@ -70,7 +70,7 @@
        EVP_cleanup();
        CRYPTO_cleanup_all_ex_data();
  #ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT
-@@ -109,6 +116,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -111,6 +118,7 @@ bool dovecot_openssl_common_global_unref(void)
  int dovecot_openssl_common_global_set_engine(const char *engine,
                                             const char **error_r)
  {
@@ -78,7 +78,7 @@
        if (dovecot_openssl_engine != NULL)
                return 1;
  
-@@ -130,5 +138,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
+@@ -132,5 +140,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
                dovecot_openssl_engine = NULL;
                return -1;
        }
index dbd7185161a1fe4d6503fc9db00512c5425037ab..25a2e137a06141e6cd7ab2fde636ab034f4c51ea 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=msmtp
-PKG_VERSION:=1.8.3
+PKG_VERSION:=1.8.4
 PKG_RELEASE:=1
 
 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>
@@ -107,16 +107,10 @@ 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 f9282394ae3642ac704335873281bb246059bd67..f11951225937ab93e20c8ada0a9c9859caee43c2 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mutt
-PKG_VERSION:=1.11.2
+PKG_VERSION:=1.11.4
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
                https://bitbucket.org/mutt/mutt/downloads/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=da5cd4c39f228914d3933d8cf3a017c8271fdd9b9d81c6e4fc42ad22e1a28723
+PKG_HASH:=b651357ea6c8762178080493991c77ecb111d916d171d422500257ab48be2801
 
 PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
 PKG_LICENSE:=GPL-2.0+
index 6dc3f255cceeb50e9dce97873e9013f112d5dd95..3c499c2523d65f4a5abc402b0229e510a29dd941 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postfix
-PKG_RELEASE:=3
-PKG_VERSION:=3.3.2
+PKG_RELEASE:=1
+PKG_VERSION:=3.4.4
 PKG_SOURCE_URL:= \
        https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \
-       ftp://ftp.porcupine.org/mirrors/postfix-release/official/
+       http://ftp.porcupine.org/mirrors/postfix-release/official/
 
-PKG_HASH:=3c93f31eee49a58e592c31e62a058701cadde11e8e066ea441da19fddad7b35b
+PKG_HASH:=27f2ab631a966a40e002aedc6db9281e5970295fa5fd96b29066e457a4601e34
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
 PKG_LICENSE:=IPL-1.0
index 1a037a2e9e98d477095e67d9697cdcaf3b651647..f1e4769f73af73c1d4c4e824fd17c2f3afa1be0a 100644 (file)
@@ -1,7 +1,6 @@
-diff -rupN postfix-2.8.1/src/smtpd/smtpd_check.c postfix-2.8.1_patched/src/smtpd/smtpd_check.c
---- postfix-2.8.1/src/smtpd/smtpd_check.c      2011-01-04 22:03:50.000000000 +0300
-+++ postfix-2.8.1_patched/src/smtpd/smtpd_check.c      2011-03-06 19:35:39.000000000 +0300
-@@ -5322,7 +5322,7 @@ char   *smtpd_check_queue(SMTPD_STATE *s
+--- a/src/smtpd/smtpd_check.c
++++ b/src/smtpd/smtpd_check.c
+@@ -5325,7 +5325,7 @@ char   *smtpd_check_queue(SMTPD_STATE *state)
       */
  #define BLOCKS(x)     ((x) / fsbuf.block_size)
  
diff --git a/mail/postfix/patches/110-openssl-engine.patch b/mail/postfix/patches/110-openssl-engine.patch
deleted file mode 100644 (file)
index 95956ea..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/src/posttls-finger/posttls-finger.c
-+++ b/src/posttls-finger/posttls-finger.c
-@@ -374,7 +374,9 @@
- #include <tls.h>
- #ifdef USE_TLS
-+#ifndef OPENSSL_NO_ENGINE
- #include <openssl/engine.h>
-+#endif
- #endif
-  /*
-@@ -1524,7 +1526,9 @@ static void ssl_cleanup(void)
- #else
-     ERR_remove_state(0);              /* Deprecated with OpenSSL 1.0.0 */
- #endif
-+#ifndef OPENSSL_NO_ENGINE
-     ENGINE_cleanup();
-+#endif
-     CONF_modules_unload(1);
-     ERR_free_strings();
-     EVP_cleanup();
index 287cd1712f12a9c7c681c01cfbebc6ae025d28f6..0a3b9f3a4d13760526f76ca4ac3b2ad4caef7b26 100644 (file)
@@ -1,7 +1,6 @@
-diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-install
---- postfix-2.10.2/conf/post-install   2013-06-13 18:07:46.000000000 +0400
-+++ postfix-2.10.2_patched/conf/post-install   2013-11-19 21:17:49.572820573 +0400
-@@ -366,10 +366,10 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -366,10 +366,10 @@ test -f $config_directory/main.cf && {
  
  # Sanity checks
  
@@ -16,7 +15,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
  
  case $setgid_group in
   no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-@@ -377,7 +377,7 @@
+@@ -377,7 +377,7 @@ case $setgid_group in
  esac
  
  for path in "$daemon_directory" "$command_directory" "$queue_directory" \
@@ -25,7 +24,7 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
      "$meta_directory"
  do
     case "$path" in
-@@ -386,7 +386,7 @@
+@@ -386,7 +386,7 @@ do
     esac
  done
  
@@ -34,10 +33,9 @@ diff -Naur postfix-2.10.2/conf/post-install postfix-2.10.2_patched/conf/post-ins
  do
     case "$path" in
     /*) ;;
-diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
---- postfix-2.10.2/postfix-install     2012-05-22 23:40:29.000000000 +0400
-+++ postfix-2.10.2_patched/postfix-install     2013-11-19 21:12:20.694160734 +0400
-@@ -563,13 +563,13 @@
+--- a/postfix-install
++++ b/postfix-install
+@@ -563,13 +563,13 @@ case "$setgid_group" in
       exit 1;;
  esac
  
@@ -58,7 +56,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
  
  for path in "$html_directory" "$readme_directory" "$shlib_directory"
  do
-@@ -582,7 +582,7 @@
+@@ -582,7 +582,7 @@ do
  done
  
  for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \
@@ -67,7 +65,7 @@ diff -Naur postfix-2.10.2/postfix-install postfix-2.10.2_patched/postfix-install
      "$meta_directory"
  do
     case "$path" in
-@@ -789,8 +789,8 @@
+@@ -789,8 +789,8 @@ do
                compare_or_replace $mode "$owner" "$group" html/$file \
                    $HTML_DIRECTORY/$file || exit 1;;
        '$manpage_directory')
index 8e67ddcab18f8c12eac01cd93f9c8c2b1cbb328d..e991577054da98b956c9e0ad1523c5449cb88500 100644 (file)
@@ -1,6 +1,6 @@
---- a/src/util/dict_db.c       2017-07-16 16:56:00.819659962 +0300
-+++ b/src/util/dict_db.c       2017-07-16 16:58:31.011401358 +0300
-@@ -740,8 +740,8 @@
+--- a/src/util/dict_db.c
++++ b/src/util/dict_db.c
+@@ -750,8 +750,8 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
        msg_fatal("create DB database: %m");
      if (db == 0)
        msg_panic("db_create null result");
index 8faa125214a650f4ad6649052999249632d980ae..2b25a33e01fb71f548104a7d70472bb05998bf57 100644 (file)
@@ -1,7 +1,6 @@
-diff -Naur postfix-2.11.1/src/util/sys_defs.h postfix-2.11.1.patched/src/util/sys_defs.h
---- postfix-2.11.1/src/util/sys_defs.h 2013-09-30 00:51:55.000000000 +0400
-+++ postfix-2.11.1.patched/src/util/sys_defs.h 2014-09-29 03:11:48.962277971 +0400
-@@ -759,9 +759,8 @@
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -760,9 +760,8 @@ extern int initgroups(const char *, int);
  #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK
  #define DEF_MAILBOX_LOCK "fcntl, dotlock"     /* RedHat >= 4.x */
  #define HAS_FSYNC
index 6d48de0a2910029ff380ddb01ad3c01ff6e4a734..dc10774487c1a0d2a87341a1b9f5cd88e8584e50 100644 (file)
@@ -1,6 +1,6 @@
---- a/makedefs 2016-01-28 12:30:14.444082390 -0500
-+++ b/makedefs 2016-01-28 13:44:02.092006512 -0500
-@@ -213,7 +213,7 @@ error() {
+--- a/makedefs
++++ b/makedefs
+@@ -215,7 +215,7 @@ error() {
  
  case $# in
   # Officially supported usage.
@@ -9,7 +9,7 @@
      RELEASE=`(uname -r) 2>/dev/null`
      # No ${x%%y} support in Solaris 11 /bin/sh
      RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
-@@ -227,6 +227,15 @@ case $# in
+@@ -229,6 +229,15 @@ case $# in
  esac
  
  case "$SYSTEM.$RELEASE" in
index 4fc3f52173e2c601a594bd980db4b5c5a2f23b69..84ad04a835e64214cafbe017248802b1a9735157 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/posttls-finger/posttls-finger.c
 +++ b/src/posttls-finger/posttls-finger.c
-@@ -318,6 +318,7 @@
+@@ -342,6 +342,7 @@
  #include <sys/un.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
index 7f60e1e4a07e707ff9570f3f4290787bad2371ab..ab83a0283c56b5b89c5f0ff778635c7fd18c10ee 100644 (file)
@@ -1,7 +1,6 @@
-diff -Naur postfix-2.11.1/postfix-install postfix-2.11.1.patched/postfix-install
---- postfix-2.11.1/postfix-install     2014-10-05 20:43:58.598876904 +0400
-+++ postfix-2.11.1.patched/postfix-install     2014-10-05 20:47:36.076700082 +0400
-@@ -861,23 +861,23 @@
+--- a/postfix-install
++++ b/postfix-install
+@@ -861,23 +861,23 @@ do
      esac
  done
  
index 99088d19c660d4b4cf36be3c140443e45ac6141b..c779d12ed9a8772daec72dc871ad8f404efae7cc 100644 (file)
@@ -1,7 +1,6 @@
-diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf
---- postfix-2.11.1/conf/main.cf        2013-12-24 18:57:25.000000000 +0400
-+++ postfix-2.11.1.patched/conf/main.cf        2014-10-05 21:35:53.427534410 +0400
-@@ -40,43 +40,8 @@
+--- a/conf/main.cf
++++ b/conf/main.cf
+@@ -40,43 +40,8 @@ compatibility_level = 2
  #
  #soft_bounce = no
  
@@ -45,7 +44,7 @@ diff -Naur postfix-2.11.1/conf/main.cf postfix-2.11.1.patched/conf/main.cf
  # The default_privs parameter specifies the default rights used by
  # the local delivery agent for delivery to external file or command.
  # These rights are used in the absence of a recipient user context.
-@@ -632,45 +597,4 @@
+@@ -632,45 +597,4 @@ debugger_command =
  #     -dmS $process_name gdb $daemon_directory/$process_name
  #     $process_id & sleep 1
  
index 40faa1a92bcc3360eea6d025454640e9a400f77c..262a2ae9a7dd2cafaa8fec8bdb352a1560fc5b70 100644 (file)
@@ -1,7 +1,6 @@
-diff -Naur postfix-2.11.1/conf/post-install postfix-2.11.1.patched/conf/post-install
---- postfix-2.11.1/conf/post-install   2014-10-05 20:43:58.597876946 +0400
-+++ postfix-2.11.1.patched/conf/post-install   2014-10-11 16:28:01.258874097 +0400
-@@ -326,7 +326,7 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -326,7 +326,7 @@ fake_fmt() {
  case `uname -s` in
  HP-UX*) FMT=cat;;
  SunOS*) FMT=fake_fmt;;
index d5bb1178783e28e707d2c361eb58131b2241d37d..faed3af7f5db77ba3aa64eae50c11c8b5010f39f 100644 (file)
@@ -1,7 +1,6 @@
-diff -Naur a/conf/post-install b/conf/post-install
---- a/conf/post-install        2015-12-28 00:00:45.000000000 +0000
-+++ b/conf/post-install        2017-08-01 22:42:30.476896711 +0000
-@@ -566,15 +566,16 @@
+--- a/conf/post-install
++++ b/conf/post-install
+@@ -566,15 +566,16 @@ test -n "$create" && {
            then
                set_permission=1
            fi
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 9dffa515010205fb1e484544f8a7f4a1bdcbb62c..bffb9c3d8937abd0dd56da3132566c213665b9e6 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
-PKG_VERSION:=3.4.5
+PKG_VERSION:=3.4.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_HASH:=741cbd6394eaed370774ca4cc089eaafbc54d0824b9aa360d4b3b0cbcbc4a92c
+PKG_HASH:=3572279cb139d9e39dcfbc23edf438ff5311ec3fc5d0dcb3558e49591e5cb83e
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Ian Leonard <antonlacon@gmail.com>
 
index b10d050ec09b5d0a8a6bf90229bf1f427b3fe8f0..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 433c3b92f09c2bfeb57ac8bfc7f23ef2e4465f94..f2e284c89756b65e096192a26432c853aca3b194 100644 (file)
@@ -8,46 +8,47 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.03.01
+PKG_VERSION:=2019.4.30
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/rg3/youtube-dl/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=65a4ed3588ff67c69b4b3a507acefb29225d5051ffe606688778cfaf8efd79a5
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
+PKG_HASH:=31844229a4f4d7003e03ab309ff2caff1b16ce0acbd3cfb7a13276058af13056
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
 
 PKG_LICENSE:=Unlicense
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
 
-PKG_BUILD_DEPENDS:=python/host zip/host
-
 include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
 
-define Package/youtube-dl
+define Package/youtube-dl/Default
   SECTION:=multimedia
   CATEGORY:=Multimedia
-  TITLE:=utility to download videos from YouTube.com
-  DEPENDS:=+python-openssl +python-email +python-xml +python-codecs +python-ctypes +ca-certificates
-  URL:=https://youtube-dl.org
+  TITLE:=Utility to download videos from YouTube.com
+  DEPENDS:=+ca-certificates
+  URL:=https://yt-dl.org
 endef
 
 define Package/youtube-dl/description
   youtube-dl is a small command-line program to download videos
-  from YouTube.com and a few more sites.
-  It requires the Python interpreter.
+  from YouTube.com and other video sites.
+  It requires the Python3 interpreter.
 endef
 
-define Package/youtube-dl/install
-       $(INSTALL_DIR) $(1)/usr/bin
-
-       python -m compileall $(PKG_BUILD_DIR)/youtube_dl/
-       cd $(PKG_BUILD_DIR) && zip --quiet youtube-dl-c.zip youtube_dl/*.pyc youtube_dl/*/*.pyc
-       cd $(PKG_BUILD_DIR) && zip --quiet --junk-paths youtube-dl-c.zip youtube_dl/__main__.pyc
-       echo '#!/usr/bin/env python' > $(PKG_BUILD_DIR)/youtube-dl-c
-       cat $(PKG_BUILD_DIR)/youtube-dl-c.zip >> $(PKG_BUILD_DIR)/youtube-dl-c
-
-       $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/youtube-dl-c $(1)/usr/bin/youtube-dl
+define Package/youtube-dl
+$(call Package/youtube-dl/Default)
+  DEPENDS+= \
+       +python3 \
+       +python3-email \
+       +python3-xml \
+       +python3-codecs \
+       +python3-ctypes
+  VARIANT:=python3
 endef
 
+$(eval $(call Py3Package,youtube-dl))
 $(eval $(call BuildPackage,youtube-dl))
+$(eval $(call BuildPackage,youtube-dl-src))
diff --git a/multimedia/youtube-dl/patches/dont-use-pandoc.patch b/multimedia/youtube-dl/patches/dont-use-pandoc.patch
deleted file mode 100644 (file)
index 51b3dd5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 4a62f44..fee93e8 100644
---- a/Makefile
-+++ b/Makefile
-@@ -85,12 +85,12 @@ supportedsites:
-       $(PYTHON) devscripts/make_supportedsites.py docs/supportedsites.md
- README.txt: README.md
--      pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
-+#     pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
- youtube-dl.1: README.md
--      $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
--      pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
--      rm -f youtube-dl.1.temp.md
-+#     $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
-+#     pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
-+#     rm -f youtube-dl.1.temp.md
- youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
-       $(PYTHON) devscripts/bash-completion.py
index 1c2f5fb1d07615fba660e423fe06d28003164bcc..412e7019c0d3cf80eb52df442dcd032a9388c420 100644 (file)
@@ -17,6 +17,7 @@ PKG_SOURCE_URL:=https://codeload.github.com/Neilpang/acme.sh/tar.gz/$(PKG_VERSIO
 PKG_HASH:=25f8eef1a53584e3ebc653e1ae7763362ca97c40bb476ab7fee01aa50fa3a101
 PKG_BUILD_DIR:=$(BUILD_DIR)/acme.sh-$(PKG_VERSION)
 PKG_MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+PKGARCH:=all
 
 LUCI_DIR:=/usr/lib/lua/luci
 
index 51ce5e998ddf1dbf223ca921962b5c3a9f04fe87..c4f5d8dab5b73b7dacf958bbb6ecc86f149714d8 100644 (file)
@@ -9,13 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=aircrack-ng
 PKG_VERSION:=1.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=$(PKG_SOURCE_VERSION)
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/aircrack-ng/aircrack-ng/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=7e03f9828495a3a1a781ad79e41805971bf7347c092df852820232bca866a19b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=42f2b48d7f46b39e0d5d2f2a64cbf63f87416a70
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_MIRROR_HASH:=17893e05278635675a77a3cb0927202ec4df2fc9a742689a7a88e4a8f27a69b6
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -33,12 +36,13 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_AIRCRACK_NG_HWLOC \
        CONFIG_AIRCRACK_NG_SQLITE3
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/aircrack-ng
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread +libstdcpp
+  DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread $(CXX_DEPENDS)
   DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
   DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
   DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
@@ -69,6 +73,11 @@ define Package/airmon-ng/description
   Bash script designed to turn wireless cards into monitor mode.
 endef
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       echo "$(PKG_VERSION)_rev$(PKG_SOURCE_VERSION)" > $(PKG_BUILD_DIR)/VERSION
+endef
+
 CONFIGURE_ARGS += \
        --disable-silent-rules \
        --enable-shared \
@@ -79,10 +88,10 @@ CONFIGURE_ARGS += \
        \
        PYTHON=$(PYTHON) \
        \
-       $(if $(CONFIG_AIRCRACK_NG_OPENSSL),--with-openssl,--without-openssl) \
+       $(if $(CONFIG_AIRCRACK_NG_OPENSSL),,--without-openssl) \
        $(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
        $(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
-       $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3,--without-sqlite3)
+       $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3)
 
 TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
 
index da18a0e165a4e6672146cc1d2a6eb3f0d2806444..5e4974c950e44dec3840bf9074585e586ae816ce 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apcupsd
 PKG_VERSION:=3.14.14
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=GPL-2.0
@@ -39,6 +39,8 @@ define Package/apcupsd-cgi
   URL:=http://www.apcupsd.org/
 endef
 
+CONFIGURE_VARS += SHUTDOWN=/sbin/halt
+
 define Build/Configure
        $(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/autoconf/
        $(call Build/Configure/Default, \
index 254935418b848052c2ef0a33633f1e02df800beb..740298f3b869196498ee0833261df302a61df32c 100644 (file)
@@ -20,7 +20,7 @@ exec_prefix=/usr
 
 APCPID=/var/run/apcupsd.pid
 APCUPSD=/usr/sbin/apcupsd
-SHUTDOWN=/sbin/shutdown
+SHUTDOWN=/sbin/halt
 SCRIPTSHELL=/bin/sh
 SCRIPTDIR=/etc/apcupsd
 WALL=true
@@ -101,11 +101,11 @@ case "$1" in
     ;;
     doreboot)
        echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
-       ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
+       echo "apcupsd UPS ${2} initiated reboot" && /sbin/reboot
     ;;
     doshutdown)
        echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
-       ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
+       echo "apcupsd UPS ${2} initiated shutdown" && /sbin/halt
     ;;
     annoyme)
        echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
diff --git a/net/apcupsd/patches/015-drop-doc.patch b/net/apcupsd/patches/015-drop-doc.patch
new file mode 100644 (file)
index 0000000..fb90b22
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/Makefile.orig    2019-04-04 18:19:45.007668656 +0200
++++ a/Makefile 2019-04-04 18:23:00.723165465 +0200
+@@ -1,6 +1,6 @@
+ topdir:=.
+
+-SUBDIRS=src platforms doc
++SUBDIRS=src platforms
+ include autoconf/targets.mak
+
+ # Force platforms/ to build after src/
index 765123faf24ed0e0a1169d9ba449b74bbcee0ba7..672894aede4915d1342a3acfc0691b114a772e41 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=aria2
 PKG_VERSION:=1.34.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_VERSION)/
index 47c05107258f45896c0544dbde1c245827417020..41f0005005d3fbf1ba9d9561a6e3ba79c3d986fd 100755 (executable)
@@ -79,11 +79,11 @@ append_setting() {
 append_header() {
        local h="$1"
        [ -n "$h" ] && \
-               echo "header=\"${h}\"" >>"$config_file_tmp"
+               echo "header=\"$h\"" >>"$config_file_tmp"
 }
 
 aria2_validate() {
-       uci_validate_section "$NAME" aria2 "$1" \
+       uci_load_validate "$NAME" aria2 "$1" "$2" \
                'enabled:bool:0' \
                'enable_logging:bool' \
                'enable_proxy:bool' \
@@ -158,23 +158,23 @@ aria2_validate() {
 
 aria2_start() {
        local section="$1"
-       aria2_validate "$section" || { _err "Validation failed."; return 1; }
+       [ "$2" = "0" ] || { _err "Validation failed."; return 1; }
 
-       [ "$enabled" = "1" ] || { _info "Instance \"${section}\" disabled."; return 1; }
+       [ "$enabled" = "1" ] || { _info "Instance \"$section\" disabled."; return 1; }
        [ -n "$dir" ] || { _err "Please set download dir."; return 1; }
        [ -d "$dir" ] || { _err "Please create download dir first."; return 1; }
 
-       config_file="${config_dir}/${NAME}.conf.${section}"
-       config_file_tmp="${config_dir}/${NAME}.conf.tmp"
-       session_file="${config_dir}/${NAME}.session.${section}"
+       config_file="$config_dir/$NAME.conf.$section"
+       config_file_tmp="$config_dir/$NAME.conf.tmp"
+       session_file="$config_dir/$NAME.session.$section"
 
        _make_dir "$config_dir" || {
-               _err "Can't create config dir: ${config_dir}"
+               _err "Can't create config dir: $config_dir"
                return 1
        }
 
        _create_file "$session_file" "$config_file" "$config_file_tmp" || {
-               _err "Can't create files: ${session_file}, ${config_file}, ${config_file_tmp}"
+               _err "Can't create files: $session_file, $config_file, $config_file_tmp"
                return 1
        }
 
@@ -183,14 +183,14 @@ aria2_start() {
                # Auto generated file, changes to this file will be lost.
        EOF
 
-       append_setting "dir=${dir}"
+       append_setting "dir=$dir"
        append_setting "enable-rpc=true"
        append_setting "rpc-allow-origin-all=true"
        append_setting "rpc-listen-all=true"
        append_setting "quiet=true"
        append_setting "continue=true"
-       append_setting "input-file=${session_file}"
-       append_setting "save-session=${session_file}"
+       append_setting "input-file=$session_file"
+       append_setting "save-session=$session_file"
 
        if [ -z "$enable_logging" ]; then
                append_options "log" "log_level"
@@ -201,14 +201,14 @@ aria2_start() {
                log_dir="$(dirname "$log")"
 
                _make_dir "$log_dir" || {
-                       _err "Can't create log dir: ${log_dir}"
+                       _err "Can't create log dir: $log_dir"
                        return 1
                }
 
                # create or clear log file
                echo >"$log"
 
-               append_setting "log=${log}"
+               append_setting "log=$log"
                append_options "log_level"
        fi
 
@@ -218,30 +218,30 @@ aria2_start() {
 
        unset_auth_method() {
                uci -q batch <<-EOF
-                       set ${NAME}.${section}.rpc_auth_method=""
+                       set $NAME.$section.rpc_auth_method=""
                        commit $NAME
                EOF
        }
 
        if [ -z "$rpc_auth_method" ]; then
                if [ -n "$rpc_secret" ]; then
-                       append_setting "rpc-secret=${rpc_secret}"
+                       append_setting "rpc-secret=$rpc_secret"
                elif [ -n "$rpc_user" ]; then
-                       append_setting "rpc-user=${rpc_user}"
-                       append_setting "rpc-passwd=${rpc_passwd}"
+                       append_setting "rpc-user=$rpc_user"
+                       append_setting "rpc-passwd=$rpc_passwd"
                else
                        _info "It is recommended to set RPC secret."
                fi
        elif [ "$rpc_auth_method" = "token" ]; then
                if [ -n "$rpc_secret" ]; then
-                       append_setting "rpc-secret=${rpc_secret}"
+                       append_setting "rpc-secret=$rpc_secret"
                else
                        unset_auth_method
                fi
        elif [ "$rpc_auth_method" = "user_pass" ]; then
                if [ -n "$rpc_user" ]; then
-                       append_setting "rpc-user=${rpc_user}"
-                       append_setting "rpc-passwd=${rpc_passwd}"
+                       append_setting "rpc-user=$rpc_user"
+                       append_setting "rpc-passwd=$rpc_passwd"
                else
                        _info "Please set RPC user."
                        unset_auth_method
@@ -261,25 +261,25 @@ aria2_start() {
        fi
 
        if [ ."$enable_dht" = ."true" ]; then
-               dht_file="${config_dir}/dht.dat.${section}"
+               dht_file="$config_dir/dht.dat.$section"
                _create_file "$dht_file" || {
-                       _err "Can't create DHT file: ${dht_file}"
+                       _err "Can't create DHT file: $dht_file"
                        return 1
                }
 
                append_setting "enable-dht=true"
-               append_setting "dht-file-path=${dht_file}"
+               append_setting "dht-file-path=$dht_file"
        fi
 
        if [ ."$enable_dht6" = ."true" ] && [ ."$disable_ipv6" != ."true" ]; then
-               dht6_file="${config_dir}/dht6.dat.${section}"
+               dht6_file="$config_dir/dht6.dat.$section"
                _create_file "$dht6_file" || {
-                       _err "Can't create DHT6 file: ${dht6_file}"
+                       _err "Can't create DHT6 file: $dht6_file"
                        return 1
                }
 
                append_setting "enable-dht6=true"
-               append_setting "dht-file-path6=${dht6_file}"
+               append_setting "dht-file-path6=$dht6_file"
        fi
 
        if [ -n "$bt_tracker" ]; then
@@ -288,11 +288,11 @@ aria2_start() {
                        if [ -z "$bt_tracker_list" ]; then
                                bt_tracker_list="$t"
                        else
-                               bt_tracker_list="${bt_tracker_list},${t}"
+                               bt_tracker_list="$bt_tracker_list,$t"
                        fi
                done
 
-               append_setting "bt-tracker=${bt_tracker_list}"
+               append_setting "bt-tracker=$bt_tracker_list"
        fi
 
        append_options "auto_save_interval" "bt_enable_lpd" "bt_max_open_files" "bt_max_peers" \
@@ -318,19 +318,19 @@ aria2_start() {
 
        if [ -n "$user" ]; then
                if ( user_exists "$user" && _change_owner "$user" "$config_dir" "$log" ); then
-                               _info "Aria2 will run with user '${user}'."
+                               _info "Aria2 will run with user '$user'."
                                if [ "$user" != "root" ]; then
-                                       _info "Please make sure user '${user}' has write access to download dir: ${dir}"
+                                       _info "Please make sure user '$user' has write access to download dir: $dir"
                                fi
                else
-                       _info "Setting run user to '${user}' failed, default user will be used."
+                       _info "Setting run user to '$user' failed, default user will be used."
                        user=
                fi
        fi
 
-       procd_open_instance "${NAME}.${section}"
+       procd_open_instance "$NAME.$section"
        procd_set_param command "$PROG"
-       procd_append_param command --conf-path="${config_file}"
+       procd_append_param command --conf-path="$config_file"
 
        procd_set_param respawn
        procd_set_param stdout 1
@@ -340,7 +340,7 @@ aria2_start() {
        [ -n "$user" ] && \
                procd_set_param user "$user"
 
-       procd_add_jail "${NAME}.${section}" log
+       procd_add_jail "$NAME.$section" log
        procd_add_jail_mount "$config_file"
        procd_add_jail_mount_rw "$dir" "$config_dir" "$log"
        procd_close_instance
@@ -348,9 +348,10 @@ aria2_start() {
 
 service_triggers() {
        procd_add_reload_trigger "$NAME"
+       procd_add_validation aria2_validate
 }
 
 start_service() {
        config_load "$NAME"
-       config_foreach aria2_start "aria2"
+       config_foreach aria2_validate "aria2" aria2_start
 }
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 ebac110908d2009fec43e268e86e282edf359575..1ca8ab9b69ad429582b0fb08efa706b57163ad26 100644 (file)
@@ -20,6 +20,7 @@ define Package/bcp38
   URL:=https://github.com/dtaht/ceropackages-3.10
   MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
   DEPENDS:=+ipset
+  PKGARCH:=all
 endef
 
 define Package/bcp38/description
index c808666b37dd4a61d7406f03b384e5d27f9ba2cb..1c53fcb61c7557b964ea450975a0524c87c970a1 100644 (file)
@@ -23,6 +23,7 @@ define Package/proto-bonding
   CATEGORY:=Network
   TITLE:=Link Aggregation (Channel Bonding) proto handler
   DEPENDS:=+kmod-bonding
+  PKGARCH:=all
 endef
 
 define Package/proto-bonding/description
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 ba45fff84a25930b4971e6f894f879e818fd086a..b8d0625a973847531a2b036783f13eaf701197d6 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=clamav
-PKG_VERSION:=0.101.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.101.2
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
@@ -18,7 +18,7 @@ PKG_CPE_ID:=cpe:/a:clamav:clamav
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
-PKG_HASH:=fa368fa9b2f57638696150c7d108b06dec284e8d8e3b8e702c784947c01fb806
+PKG_HASH:=0a12ebdf6ff7a74c0bde2bdc2b55cae33449e6dd953ec90824a9e01291277634
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index bc3784dc0ac34def25234de70009a79f50765a2a..86c52dce27b86d408040bc00162ffbf450747f0e 100755 (executable)
@@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts
 PKG_VERSION:=2.7.8
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=
diff --git a/net/ddns-scripts/samples/slaac_sample.sh b/net/ddns-scripts/samples/slaac_sample.sh
new file mode 100755 (executable)
index 0000000..ea8f24d
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# script to determine and return SLAAC ipv6 address using prefix from a locally configured interface and the MAC address of the device
+# (c) 2018 Keve Mueller <keve at keve dot hu>
+#
+# activated inside /etc/config/ddns by setting
+#
+# option ip_source      'script'
+# option ip_script      '/usr/lib/ddns/slaac_sample.sh br-lan AA:BB:CC:DD:EE:FF'
+#
+# the script is executed (not parsed) inside get_local_ip() function
+# of /usr/lib/ddns/dynamic_dns_functions.sh
+#
+# useful when this box is the only DDNS client in the network and other clients use SLAAC
+# so no need to install ddns client on every "internal" box
+#
+# NB: this will not catch the actual IPV6 used by the host when it is configured to use temporary addresses
+
+#NB: we need a valid MAC address that is fully expanded with leading zeroes on all positions
+format_eui_64() {
+    local macaddr="$1"
+    echo ${macaddr:0:1}$(echo ${macaddr:1:1}|tr 0123456789abcdefABCDEF 23016745ab89efcd89efcd)${macaddr:3:2}:${macaddr:6:2}ff:fe${macaddr:9:2}:${macaddr:12:2}${macaddr:15:2}
+}
+
+# expand :: in an ipv6 address specification to the appropriate series of 0:
+# result will have 8 ipv6 fragments separated by single colon
+# NB: input must be a valid IPv6 address, e.g. ::1
+# NB: numbers are not prepended with leading zeroes
+expand_ipv6_colons() {
+    local ipv6=$1
+# we need :: to be in the middle, so prepend a 0 if the input starts with : and append 0 if it ends with it
+    if [ "${ipv6:0:1}" = ":" ]; then ipv6=0${ipv6}; fi
+    if [ "${ipv6: -1:1}" = ":" ]; then ipv6=${ipv6}0; fi
+# retain only the real colons
+    local colons=${ipv6//::|[0123456789abcdefABCDEF]/}
+# count them
+    local num_colons=${#colons}
+    local filler=":0:0:0:0:0:0:"
+# replace the :: with the appropriate substring from filler
+    local ipv6_x=${ipv6/::/${filler:0:(7-$num_colons)*2-1}}
+    echo $ipv6_x
+}
+
+# obtain the first ipv6 address of the device passed in $1
+addr_net=$(ip -6 -o addr show dev $1 scope global up | cut -d" " -f 7 | head -1)
+#addr_net=$1
+addr=${addr_net%/*}
+# TODO: we assume /64 subnet
+# get the first 64 bits of the address
+prefix=$(expand_ipv6_colons $addr | cut -d: -f -4)
+# compute the SLAAC 64 bits from the MAC
+suffix=$(format_eui_64 "$2")
+
+echo -n $prefix:$suffix
+exit 0
+
+#echo "Should never come here" >&2
+#exit 2
+
index 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 f27ad745e5e086e852dbfd6c786fe2debfeec981..e724874795f3eb1135a228d524d6c5c0bff913df 100644 (file)
@@ -21,6 +21,7 @@ define Package/dynapoint
     SUBMENU:=wireless
     DEPENDS:=+lua +libubus-lua +libuci-lua +libubox-lua +luci-lib-nixio
     TITLE:=Dynamic access point manager
+    PKGARCH:=all
 endef
 
 define Package/dynapoint/description
index 2628711ea43601a5757d5cb637a38280a79367e5..5fd458ae370b88c77de33fc923b93cbcb153abdf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=e2guardian
 PKG_VERSION:=3.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
index 4a5981e869a907204976bcaf3aa86b75fc884e71..b4c236e4083521c93c6bf56175a1525e7dbedc1d 100644 (file)
@@ -11,7 +11,7 @@ LOGFILE="/tmp/e2guardian/access.log"
 GROUPCONFIG="/tmp/e2guardian/e2guardianf1.conf"
 
 validate_e2guardian_section() {
-       uci_validate_section e2guardian e2guardian "${1}" \
+       uci_load_validate e2guardian e2guardian "$1" "$2" \
                'accessdeniedaddress:string' \
                'bannediplist:string' \
                'contentscanexceptions:string' \
@@ -83,22 +83,9 @@ validate_e2guardian_section() {
                'weightedphrasemode:range(0,2)'
 }
 
-start_service() {
-
-       local accessdeniedaddress bannediplist contentscanexceptions contentscanner contentscannertimeout \
-               createlistcachefiles custombannedflashfile custombannedimagefile deletedownloadedtempfiles \
-               downloadmanager exceptioniplist filecachedir loglocation \
-               filtergroups filtergroupslist filterip filterports forcequicksearch forwardedfor hexdecodecontent \
-               initialtrickledelay ipcfilename ipipcfilename language languagedir logadblocks logchildprocesshandling \
-               logclienthostnames logconnectionhandlingerrors logexceptionhits logfileformat loglevel loguseragent \
-               maxagechildren maxchildren maxcontentfilecachescansize maxcontentfiltersize maxcontentramcachescansize \
-               maxips maxsparechildren maxuploadsize minchildren minsparechildren nodaemon nologger \
-               pcontimeout perroomdirectory phrasefiltermode prefercachedlists preforkchildren preservecase proxyexchange \
-               proxyip proxyport proxytimeout recheckreplacedurls reverseaddresslookups reverseclientiplookups scancleancache \
-               showweightedfound softrestart trickledelay urlcacheage urlcachenumber urlipcfilename usecustombannedflash \
-               usecustombannedimage usexforwardedfor weightedphrasemode
-
-       validate_e2guardian_section e2guardian || {
+start_e2guardian_instance() {
+
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -198,6 +185,11 @@ start_service() {
 
 }
 
+start_service()
+{
+       validate_e2guardian_section e2guardian start_e2guardian_instance
+}
+
 stop_service()
 {
        PID=`cat /tmp/e2guardian/e2guardian.pid`
index d3bdedde0f9f2e4accab439f695927f55bbefa13..34bfdd3be209821bfcbae979a000fa4db0e6ae96 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fping
-PKG_VERSION:=4.1
+PKG_VERSION:=4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://fping.org/dist/
-PKG_HASH:=2733e2a18cc2b5b935c4e3b5b84ccf2080c38043f1864d7c43326e8048ddab73
+PKG_SOURCE_URL:=https://fping.org/dist/
+PKG_HASH:=7d339674b6a95aae1d8ad487ff5056fd95b474c3650938268f6a905c3771b64a
 
 PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
 PKG_LICENSE:=BSD-4-Clause
@@ -27,7 +27,7 @@ define Package/fping
   SECTION:=net
   CATEGORY:=Network
   TITLE:=sends ICMP ECHO_REQUEST packets to network hosts
-  URL:=http://fping.org/
+  URL:=https://fping.org/
 endef
 
 
index 4c8a658dee8fea058a4f37db8736561fb290841b..52c904632bcdda63e68ac993307a22cff7c4e506 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_17
-PKG_RELEASE:=3
+PKG_VERSION:=release_3_0_19
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
+PKG_HASH:=34c50ac47a683b13eae1a02f2d0263c0bd51a83f01b99c02c5fe25df07a1ee77
 
-PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
+PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYRIGHT LICENSE
 
@@ -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
+  DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +libpcre +libreadline +libtalloc +libatomic
 endef
 
 define Package/freeradius3-default
@@ -349,7 +349,75 @@ define Package/freeradius3-mod-realm/conffiles
 /etc/freeradius3/mods-enabled/realm
 endef
 
-# SQL support has not been ported
+define Package/freeradius3-mod-sql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3
+  TITLE:=Radius generic SQL front-end
+endef
+
+define Package/freeradius3-mod-sql/conffiles
+/etc/freeradius3/mods-available/sql
+endef
+
+define Package/freeradius3-mod-sql-mysql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql +libmysqlclient
+  TITLE:=Radius MySQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/mysql
+endef
+
+define Package/freeradius3-mod-sql-null
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql
+  TITLE:=Radius Dummy SQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-postgresql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql +libpq
+  TITLE:=Radius PostgreSQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/postgresql
+endef
+
+define Package/freeradius3-mod-sql-sqlite
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql +libsqlite3
+  TITLE:=Radius SQLite back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/sqlite
+endef
+
+define Package/freeradius3-mod-sqlcounter
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql
+  TITLE:=Packet counter using accounting records written into an SQL database
+endef
+
+define Package/freeradius3-mod-sqlcounter/conffiles
+/etc/freeradius3/mods-config/sql/counter
+/etc/freeradius3/mods-available/sqlcounter
+endef
+
+define Package/freeradius3-mod-sqlippool
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql
+  TITLE:=Radius SQL Based IP Pool module
+endef
+
+define Package/freeradius3-mod-sqlippool/conffiles
+/etc/freeradius3/mods-config/sql/ippool
+/etc/freeradius3/mods-config/sql/ippool-dhcp
+/etc/freeradius3/mods-available/dhcp_sqlippool
+/etc/freeradius3/mods-available/sqlippool
+endef
 
 define Package/freeradius3-mod-radutmp
   $(call Package/freeradius3/Default)
@@ -427,22 +495,17 @@ CONFIGURE_ARGS+= \
        --without-rlm_ruby \
        --without-rlm_securid \
        --without-rlm_smsotp \
-       --without-rlm_sql \
        --without-rlm_sql_db2 \
        --without-rlm_sql_firebird \
        --without-rlm_sql_freetds \
        --without-rlm_sql_iodbc \
-       --without-rlm_sql_mysql \
        --without-rlm_sql_oracle \
-       --without-rlm_sql_postgresql \
-       --without-rlm_sql_sqlite \
        --without-rlm_sql_unixodbc \
-       --without-rlm_sqlcounter \
-       --without-rlm_sqlhpwippool \
-       --without-rlm_sqlippool \
        --without-rlm_unbound \
        --without-rlm_yubikey \
 
+CONFIGURE_LIBS+= -latomic
+
 PKG_DICTIONARIES:= \
        compat \
        freeradius freeradius.internal \
@@ -491,6 +554,44 @@ else
   CONFIGURE_ARGS+= --without-rlm_eap_pwd
 endif
 
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql),)
+  CONFIGURE_ARGS+= --with-rlm_sql
+else
+  CONFIGURE_ARGS+= --without-rlm_sql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-mysql),)
+  CONFIGURE_ARGS+= \
+               --with-rlm_sql_mysql \
+               --with-mysql-include-dir="$(STAGING_DIR)/usr/include/mysql"
+else
+  CONFIGURE_ARGS+= --without-rlm_sql_mysql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-postgresql),)
+  CONFIGURE_ARGS+= --with-rlm_sql_postgresql
+else
+  CONFIGURE_ARGS+= --without-rlm_sql_postgresql
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sql-sqlite),)
+  CONFIGURE_ARGS+= --with-rlm_sql_sqlite
+else
+  CONFIGURE_ARGS+= --without-rlm_sql_sqlite
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sqlcounter),)
+  CONFIGURE_ARGS+= --with-rlm_sqlcounter
+else
+  CONFIGURE_ARGS+= --without-rlm_sqlcounter
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-sqlippool),)
+  CONFIGURE_ARGS+= --with-rlm_sqlippool
+else
+  CONFIGURE_ARGS+= --without-rlm_sqlippool
+endif
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius3-mod-radutmp),)
   CONFIGURE_ARGS+= --with-rlm_radutmp
 else
@@ -641,5 +742,12 @@ $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
 $(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
 $(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
 $(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-mysql,rlm_sql_mysql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-null,rlm_sql_null,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-postgresql,rlm_sql_postgresql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-sqlite,rlm_sql_sqlite,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlcounter,rlm_sqlcounter,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlippool,rlm_sqlippool,))
 $(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
 $(eval $(call BuildPackage,freeradius3-utils))
index 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 b909e1df4bfb321cf6a4dff8a353954cd51d993e..801550b06680c73375ad769407507efdc6f5550f 100644 (file)
@@ -27,7 +27,7 @@ Last-Update: 2017-05-30
  
        return state;
  }
-@@ -3151,7 +3151,7 @@ post_ca:
+@@ -3277,7 +3277,7 @@ post_ca:
        /*
         *      Callbacks, etc. for session resumption.
         */
@@ -36,7 +36,7 @@ Last-Update: 2017-05-30
                /*
                 *      Cache sessions on disk if requested.
                 */
-@@ -3221,7 +3221,7 @@ post_ca:
+@@ -3347,7 +3347,7 @@ post_ca:
        /*
         *      Setup session caching
         */
diff --git a/net/freeradius3/patches/004-tls.c-allow-build-with-no-openssl-engine-support.patch b/net/freeradius3/patches/004-tls.c-allow-build-with-no-openssl-engine-support.patch
deleted file mode 100644 (file)
index 6c14dea..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-From 0b17cf6e39064b008792811a6babf4cd75ac7744 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Mon, 25 Feb 2019 10:48:48 -0300
-Subject: [PATCH] tls.c: allow build with no openssl engine support
-
-This avoids an ENGINE_cleanup call if openssl was compiled without
-engine support.
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/src/main/tls.c b/src/main/tls.c
-index 73f0e3a3e8..9726953234 100644
---- a/src/main/tls.c
-+++ b/src/main/tls.c
-@@ -2743,7 +2743,9 @@ void tls_global_cleanup(void)
- #elif OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-       ERR_remove_thread_state(NULL);
- #endif
-+#ifndef OPENSSL_NO_ENGINE
-       ENGINE_cleanup();
-+#endif
-       CONF_modules_unload(1);
-       ERR_free_strings();
-       EVP_cleanup();
index 48f2a8f4f3d37cd1131d13bcadd2c75a24c22ac3..6cf315a9576647eb9d1a97f898a19729feaa0648 100644 (file)
@@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
 
-PKG_VERSION:=0.11.0
+PKG_VERSION:=0.11.3
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/gnunet
-PKG_HASH:=b7477a3c3b0d5e8a013685dc208cfb4ccee4145f8668faa8eb5b382af36c7e9a
+PKG_HASH:=2405db9232ae6ded57e7ff513abdf810c65e3861823b3985717ce990b8d87a37
 
 PKG_LICENSE:=AGPL-3.0
 PKG_LICENSE_FILES:=COPYING
@@ -131,26 +131,26 @@ define Package/gnunet/install
        $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
 
        ( for bin in arm ats ats-new cadet core config ecc identity nat nat-auto nat-server nse \
-           peerinfo revocation scalarproduct scrypt statistics transport uri; do \
+           peerinfo peerstore revocation scalarproduct scrypt statistics transport uri; do \
                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
        done )
 
        ( for lib in arm ats atsapplication atstransport block blockgroup cadet \
            core datacache dht dns dnsparser fragmentation friends hello \
-           identity natauto natnew nse nt peerinfo regexblock regex revocation \
-           scalarproduct set statistics transport transportaddress \
+           identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \
+           scalarproduct set statistics transport transportaddress transportapplication \
            transportcommunicator transportcore transportmonitor util; do \
                $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
        done )
 
-       ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix; do \
+       ( for plug in ats_proportional ats2_simple block_dht block_regex block_revocation transport_unix; do \
                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
        done )
 
        ( for lex in daemon-topology helper-nat-client \
-           helper-nat-server service-arm service-ats service-cadet \
+           helper-nat-server service-arm service-ats service-ats-new service-cadet \
            service-core service-dht service-identity service-nat service-nat-auto \
-           service-nse service-peerinfo service-regex \
+           service-nse service-peerinfo service-peerstore service-regex \
            service-revocation service-scalarproduct-alice \
            service-scalarproduct-bob service-scalarproduct-ecc-alice \
            service-scalarproduct-ecc-bob service-set service-statistics \
@@ -158,9 +158,9 @@ define Package/gnunet/install
                $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
        done )
 
-       ( for conf in arm ats cadet core datacache dht identity identity-provider \
-           nat nat-auto nse peerinfo regex revocation scalarproduct \
-           set statistics topology transport util; do \
+       ( for conf in arm ats cadet communicator-unix core datacache dht identity \
+           identity-provider nat nat-auto nse peerinfo peerstore regex revocation \
+           scalarproduct set statistics topology transport util; do \
                $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
        done )
 
@@ -182,6 +182,11 @@ define Build/InstallDev
        $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
 endef
 
+BIN_auction:=auction-create auction-info auction-join
+LIBEXEC_auction:=service-auction
+CONF_auction:=auction
+DEPENDS_auction:=+gnunet-reclaim +jansson
+
 DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
 BIN_conversation:=conversation conversation-test
 LIB_conversation:=conversation microphone speaker
@@ -208,6 +213,7 @@ PLUGIN_transport-http_client:=transport_http_client transport_https_client
 
 DEPENDS_transport-http_server:=+libmicrohttpd-ssl
 PLUGIN_transport-http_server:=transport_http_server transport_https_server
+BIN_transport-http_server:=transport-certificate-creation
 
 PLUGIN_transport-tcp:=transport_tcp
 
@@ -216,9 +222,6 @@ PLUGIN_transport-udp:=transport_udp
 PLUGIN_transport-wlan:=transport_wlan
 LIBEXEC_transport-wlan:=helper-transport-wlan
 
-PLUGIN_transport-xt:=transport_xt
-
-PLUGIN_transport-xu:=transport_xu
 
 DEPENDS_experiments:=+libglpk
 PLUGIN_experiments:=ats_mlp ats_ril
@@ -229,7 +232,7 @@ PLUGIN_dv:=transport_dv
 LIBEXEC_dv:=service-dv
 CONF_dv:=dv
 
-DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor
+DEPENDS_fs:=+gnunet-datastore +libextractor
 BIN_fs:=auto-share directory download fs publish unindex search
 LIB_fs:=fs
 PLUGIN_fs:=block_fs
@@ -238,7 +241,7 @@ CONF_fs:=fs
 
 DEPENDS_gns:=+gnunet-vpn +iptables-mod-extra
 USERID_gns:=gnunet=958:gnunetdns=452
-BIN_gns:=gns gns-import.sh namecache namestore resolver zoneimport
+BIN_gns:=gns gns-import.sh gns-proxy-setup-ca namecache namestore resolver zoneimport 
 LIB_gns:=gns gnsrecord namecache namestore
 PLUGIN_gns:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
 LIBEXEC_gns:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
@@ -256,21 +259,12 @@ LIB_datastore:=datastore
 LIBEXEC_datastore:=service-datastore
 CONF_datastore:=datastore
 
-BIN_peerstore:=peerstore
-LIB_peerstore:=peerstore
-LIBEXEC_peerstore:=service-peerstore
-CONF_peerstore:=peerstore
-
-DEPENDS_auction:=+gnunet-reclaim
-BIN_auction:=auction-create auction-info auction-join
-LIBEXEC_auction:=service-auction
-CONF_auction:=auction
 
 DEPENDS_reclaim:=+gnunet-gns +gnunet-sqlite +libpbc +libgabe
 BIN_reclaim:=credential reclaim
 LIB_reclaim:=consensus credential abe reclaim reclaimattribute secretsharing
 LIBEXEC_reclaim:=service-consensus service-credential service-reclaim service-secretsharing
-CONF_reclaim:=consensus reclaim secretsharing
+CONF_reclaim:=consensus credential reclaim secretsharing
 PLUGIN_reclaim:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid reclaim_sqlite
 
 DEPENDS_rest:=+gnunet-gns +gnunet-reclaim +libmicrohttpd-ssl +jansson
@@ -290,7 +284,6 @@ CONFLICTS_dhtcache-heap:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
 DEPENDS_gns-flat:=+gnunet-gns
 PLUGIN_gns-flat:=namecache_flat namestore_heap
 
-DEPENDS_peerstore-flat:=+gnunet-peerstore
 PLUGIN_peerstore-flat:=peerstore_flat
 
 DEPENDS_fs-heap:=+gnunet-datastore
@@ -328,7 +321,7 @@ DEPENDS_gns-sqlite:=+gnunet-gns +gnunet-sqlite
 PLUGIN_gns-sqlite:=namecache_sqlite namestore_sqlite
 CONFLICTS_gns-sqlite:=gnunet-gns-flat
 
-DEPENDS_peerstore-sqlite:=+gnunet-peerstore +gnunet-sqlite
+DEPENDS_peerstore-sqlite:=+gnunet-sqlite
 PLUGIN_peerstore-sqlite:=peerstore_sqlite
 CONFLICTS_peerstore-sqlite:=gnunet-peerstore-flat
 
@@ -395,6 +388,7 @@ $(eval $(call PostInstFixSUIDPerms,gnunet-transport-wlan))
 $(eval $(call PostInstFixSUIDPerms,gnunet-vpn))
 
 $(eval $(call BuildPackage,gnunet))
+$(eval $(call BuildComponent,auction,auction components,))
 $(eval $(call BuildComponent,conversation,conversation component,))
 $(eval $(call BuildComponent,curl,cURL wrapper component,))
 $(eval $(call BuildComponent,datastore,data storage components,))
@@ -405,7 +399,6 @@ $(eval $(call BuildComponent,fs,file-sharing components,))
 $(eval $(call BuildComponent,gns,name resolution components,y))
 $(eval $(call BuildComponent,gns-proxy,gns-proxy component,))
 $(eval $(call BuildComponent,hostlist,HTTP bootstrap hostlist client and server,y))
-$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
 $(eval $(call BuildComponent,reclaim,reclaim identity-provider subsystem,))
 $(eval $(call BuildComponent,rest,REST interface,))
 $(eval $(call BuildComponent,rps,RPS routing component,y))
@@ -431,7 +424,5 @@ $(eval $(call BuildComponent,transport-http_server,HTTP/HTTPS server transport,)
 $(eval $(call BuildComponent,transport-tcp,TCP transport,y))
 $(eval $(call BuildComponent,transport-udp,UDP transport,y))
 $(eval $(call BuildComponent,transport-wlan,WLAN transport,y))
-$(eval $(call BuildComponent,transport-xt,xt transport,))
-$(eval $(call BuildComponent,transport-xu,xu transport,))
 $(eval $(call BuildComponent,utils,administration utililties,))
 $(eval $(call BuildComponent,vpn,vpn components,y))
diff --git a/net/gnunet/patches/0001-fix-dist-for-experimental.patch b/net/gnunet/patches/0001-fix-dist-for-experimental.patch
deleted file mode 100644 (file)
index 4fdde5a..0000000
+++ /dev/null
@@ -1,777 +0,0 @@
-From 6603f7e1a837d3a51a1949a6f4e1802b6ef3d806 Mon Sep 17 00:00:00 2001
-From: "Schanzenbach, Martin" <mschanzenbach@posteo.de>
-Date: Thu, 28 Feb 2019 14:19:34 +0100
-Subject: [PATCH] fix dist for experimental
-
----
- po/POTFILES.in          | 114 ++++++++++++++++++++--------------------
- src/include/Makefile.am |   1 +
- 2 files changed, 58 insertions(+), 57 deletions(-)
-
---- a/po/POTFILES.in
-+++ b/po/POTFILES.in
-@@ -4,6 +4,14 @@ src/arm/arm_monitor_api.c
- src/arm/gnunet-arm.c
- src/arm/gnunet-service-arm.c
- src/arm/mockup-service.c
-+src/ats-tests/ats-testing-experiment.c
-+src/ats-tests/ats-testing-log.c
-+src/ats-tests/ats-testing-preferences.c
-+src/ats-tests/ats-testing-traffic.c
-+src/ats-tests/ats-testing.c
-+src/ats-tests/gnunet-ats-sim.c
-+src/ats-tests/gnunet-solver-eval.c
-+src/ats-tool/gnunet-ats.c
- src/ats/ats_api2_application.c
- src/ats/ats_api2_transport.c
- src/ats/ats_api_connectivity.c
-@@ -11,10 +19,10 @@ src/ats/ats_api_performance.c
- src/ats/ats_api_scanner.c
- src/ats/ats_api_scheduling.c
- src/ats/gnunet-ats-solver-eval.c
--src/ats/gnunet-service-ats_addresses.c
-+src/ats/gnunet-service-ats-new.c
- src/ats/gnunet-service-ats.c
-+src/ats/gnunet-service-ats_addresses.c
- src/ats/gnunet-service-ats_connectivity.c
--src/ats/gnunet-service-ats-new.c
- src/ats/gnunet-service-ats_normalization.c
- src/ats/gnunet-service-ats_performance.c
- src/ats/gnunet-service-ats_plugins.c
-@@ -26,14 +34,6 @@ src/ats/plugin_ats2_simple.c
- src/ats/plugin_ats_mlp.c
- src/ats/plugin_ats_proportional.c
- src/ats/plugin_ats_ril.c
--src/ats-tests/ats-testing.c
--src/ats-tests/ats-testing-experiment.c
--src/ats-tests/ats-testing-log.c
--src/ats-tests/ats-testing-preferences.c
--src/ats-tests/ats-testing-traffic.c
--src/ats-tests/gnunet-ats-sim.c
--src/ats-tests/gnunet-solver-eval.c
--src/ats-tool/gnunet-ats.c
- src/auction/gnunet-auction-create.c
- src/auction/gnunet-auction-info.c
- src/auction/gnunet-auction-join.c
-@@ -50,8 +50,8 @@ src/cadet/cadet_api_list_peers.c
- src/cadet/cadet_api_list_tunnels.c
- src/cadet/cadet_test_lib.c
- src/cadet/desirability_table.c
--src/cadet/gnunet-cadet.c
- src/cadet/gnunet-cadet-profiler.c
-+src/cadet/gnunet-cadet.c
- src/cadet/gnunet-service-cadet.c
- src/cadet/gnunet-service-cadet_channel.c
- src/cadet/gnunet-service-cadet_connection.c
-@@ -67,15 +67,15 @@ src/consensus/gnunet-service-consensus.c
- src/consensus/plugin_block_consensus.c
- src/conversation/conversation_api.c
- src/conversation/conversation_api_call.c
--src/conversation/gnunet-conversation.c
- src/conversation/gnunet-conversation-test.c
--src/conversation/gnunet_gst.c
--src/conversation/gnunet_gst_test.c
--src/conversation/gnunet-helper-audio-playback.c
-+src/conversation/gnunet-conversation.c
- src/conversation/gnunet-helper-audio-playback-gst.c
--src/conversation/gnunet-helper-audio-record.c
-+src/conversation/gnunet-helper-audio-playback.c
- src/conversation/gnunet-helper-audio-record-gst.c
-+src/conversation/gnunet-helper-audio-record.c
- src/conversation/gnunet-service-conversation.c
-+src/conversation/gnunet_gst.c
-+src/conversation/gnunet_gst_test.c
- src/conversation/microphone.c
- src/conversation/plugin_gnsrecord_conversation.c
- src/conversation/speaker.c
-@@ -111,7 +111,6 @@ src/dht/dht_api.c
- src/dht/dht_test_lib.c
- src/dht/gnunet-dht-get.c
- src/dht/gnunet-dht-monitor.c
--src/dht/gnunet_dht_profiler.c
- src/dht/gnunet-dht-put.c
- src/dht/gnunet-service-dht.c
- src/dht/gnunet-service-dht_clients.c
-@@ -120,6 +119,7 @@ src/dht/gnunet-service-dht_hello.c
- src/dht/gnunet-service-dht_neighbours.c
- src/dht/gnunet-service-dht_nse.c
- src/dht/gnunet-service-dht_routing.c
-+src/dht/gnunet_dht_profiler.c
- src/dht/plugin_block_dht.c
- src/dns/dns_api.c
- src/dns/gnunet-dns-monitor.c
-@@ -129,8 +129,8 @@ src/dns/gnunet-service-dns.c
- src/dns/gnunet-zonewalk.c
- src/dns/plugin_block_dns.c
- src/exit/gnunet-daemon-exit.c
--src/exit/gnunet-helper-exit.c
- src/exit/gnunet-helper-exit-windows.c
-+src/exit/gnunet-helper-exit.c
- src/fragmentation/defragmentation.c
- src/fragmentation/fragmentation.c
- src/fs/fs_api.c
-@@ -155,8 +155,8 @@ src/fs/gnunet-auto-share.c
- src/fs/gnunet-daemon-fsprofiler.c
- src/fs/gnunet-directory.c
- src/fs/gnunet-download.c
--src/fs/gnunet-fs.c
- src/fs/gnunet-fs-profiler.c
-+src/fs/gnunet-fs.c
- src/fs/gnunet-helper-fs-publish.c
- src/fs/gnunet-publish.c
- src/fs/gnunet-search.c
-@@ -176,10 +176,10 @@ src/gns/gns_tld_api.c
- src/gns/gnunet-bcd.c
- src/gns/gnunet-dns2gns.c
- src/gns/gnunet-gns-benchmark.c
--src/gns/gnunet-gns.c
- src/gns/gnunet-gns-helper-service-w32.c
- src/gns/gnunet-gns-import.c
- src/gns/gnunet-gns-proxy.c
-+src/gns/gnunet-gns.c
- src/gns/gnunet-service-gns.c
- src/gns/gnunet-service-gns_interceptor.c
- src/gns/gnunet-service-gns_resolver.c
-@@ -187,19 +187,19 @@ src/gns/nss/nss_gns.c
- src/gns/nss/nss_gns_query.c
- src/gns/plugin_block_gns.c
- src/gns/plugin_gnsrecord_gns.c
-+src/gns/w32nsp-install.c
-+src/gns/w32nsp-resolve.c
-+src/gns/w32nsp-uninstall.c
-+src/gns/w32nsp.c
- src/gnsrecord/gnsrecord.c
- src/gnsrecord/gnsrecord_crypto.c
- src/gnsrecord/gnsrecord_misc.c
- src/gnsrecord/gnsrecord_serialization.c
- src/gnsrecord/plugin_gnsrecord_dns.c
--src/gns/w32nsp.c
--src/gns/w32nsp-install.c
--src/gns/w32nsp-resolve.c
--src/gns/w32nsp-uninstall.c
- src/hello/address.c
- src/hello/gnunet-hello.c
--src/hello/hello.c
- src/hello/hello-ng.c
-+src/hello/hello.c
- src/hostlist/gnunet-daemon-hostlist.c
- src/hostlist/gnunet-daemon-hostlist_client.c
- src/hostlist/gnunet-daemon-hostlist_server.c
-@@ -222,8 +222,8 @@ src/namecache/namecache_api.c
- src/namecache/plugin_namecache_flat.c
- src/namecache/plugin_namecache_postgres.c
- src/namecache/plugin_namecache_sqlite.c
--src/namestore/gnunet-namestore.c
- src/namestore/gnunet-namestore-fcfsd.c
-+src/namestore/gnunet-namestore.c
- src/namestore/gnunet-service-namestore.c
- src/namestore/gnunet-zoneimport.c
- src/namestore/namestore_api.c
-@@ -238,10 +238,10 @@ src/nat-auto/gnunet-service-nat-auto.c
- src/nat-auto/gnunet-service-nat-auto_legacy.c
- src/nat-auto/nat_auto_api.c
- src/nat-auto/nat_auto_api_test.c
--src/nat/gnunet-helper-nat-client.c
- src/nat/gnunet-helper-nat-client-windows.c
--src/nat/gnunet-helper-nat-server.c
-+src/nat/gnunet-helper-nat-client.c
- src/nat/gnunet-helper-nat-server-windows.c
-+src/nat/gnunet-helper-nat-server.c
- src/nat/gnunet-nat.c
- src/nat/gnunet-service-nat.c
- src/nat/gnunet-service-nat_externalip.c
-@@ -250,16 +250,16 @@ src/nat/gnunet-service-nat_mini.c
- src/nat/gnunet-service-nat_stun.c
- src/nat/nat_api.c
- src/nat/nat_api_stun.c
--src/nse/gnunet-nse.c
- src/nse/gnunet-nse-profiler.c
-+src/nse/gnunet-nse.c
- src/nse/gnunet-service-nse.c
- src/nse/nse_api.c
- src/nt/nt.c
-+src/peerinfo-tool/gnunet-peerinfo.c
-+src/peerinfo-tool/gnunet-peerinfo_plugins.c
- src/peerinfo/gnunet-service-peerinfo.c
- src/peerinfo/peerinfo_api.c
- src/peerinfo/peerinfo_api_notify.c
--src/peerinfo-tool/gnunet-peerinfo.c
--src/peerinfo-tool/gnunet-peerinfo_plugins.c
- src/peerstore/gnunet-peerstore.c
- src/peerstore/gnunet-service-peerstore.c
- src/peerstore/peerstore_api.c
-@@ -295,7 +295,6 @@ src/regex/regex_internal_dht.c
- src/regex/regex_test_graph.c
- src/regex/regex_test_lib.c
- src/regex/regex_test_random.c
--src/rest/gnunet-rest-server.c
- src/rest-plugins/json_reclaim.c
- src/rest-plugins/oidc_helper.c
- src/rest-plugins/plugin_rest_copying.c
-@@ -306,27 +305,28 @@ src/rest-plugins/plugin_rest_namestore.c
- src/rest-plugins/plugin_rest_openid_connect.c
- src/rest-plugins/plugin_rest_peerinfo.c
- src/rest-plugins/plugin_rest_reclaim.c
-+src/rest/gnunet-rest-server.c
- src/rest/rest.c
- src/revocation/gnunet-revocation.c
- src/revocation/gnunet-service-revocation.c
- src/revocation/plugin_block_revocation.c
- src/revocation/revocation_api.c
--src/rps/gnunet-rps.c
- src/rps/gnunet-rps-profiler.c
-+src/rps/gnunet-rps.c
- src/rps/gnunet-service-rps.c
- src/rps/gnunet-service-rps_custommap.c
- src/rps/gnunet-service-rps_sampler.c
- src/rps/gnunet-service-rps_sampler_elem.c
- src/rps/gnunet-service-rps_view.c
--src/rps/rps_api.c
- src/rps/rps-sampler_client.c
- src/rps/rps-sampler_common.c
- src/rps/rps-test_util.c
-+src/rps/rps_api.c
- src/scalarproduct/gnunet-scalarproduct.c
--src/scalarproduct/gnunet-service-scalarproduct_alice.c
--src/scalarproduct/gnunet-service-scalarproduct_bob.c
- src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
- src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
-+src/scalarproduct/gnunet-service-scalarproduct_alice.c
-+src/scalarproduct/gnunet-service-scalarproduct_bob.c
- src/scalarproduct/scalarproduct_api.c
- src/secretsharing/gnunet-secretsharing-profiler.c
- src/secretsharing/gnunet-service-secretsharing.c
-@@ -352,15 +352,16 @@ src/statistics/gnunet-statistics.c
- src/statistics/statistics_api.c
- src/template/gnunet-service-template.c
- src/template/gnunet-template.c
-+src/testbed-logger/gnunet-service-testbed-logger.c
-+src/testbed-logger/testbed_logger_api.c
- src/testbed/generate-underlay-topology.c
- src/testbed/gnunet-daemon-latency-logger.c
- src/testbed/gnunet-daemon-testbed-blacklist.c
- src/testbed/gnunet-daemon-testbed-underlay.c
- src/testbed/gnunet-helper-testbed.c
--src/testbed/gnunet_mpi_test.c
- src/testbed/gnunet-service-test-barriers.c
--src/testbed/gnunet-service-testbed_barriers.c
- src/testbed/gnunet-service-testbed.c
-+src/testbed/gnunet-service-testbed_barriers.c
- src/testbed/gnunet-service-testbed_cache.c
- src/testbed/gnunet-service-testbed_connectionpool.c
- src/testbed/gnunet-service-testbed_cpustatus.c
-@@ -368,20 +369,19 @@ src/testbed/gnunet-service-testbed_links
- src/testbed/gnunet-service-testbed_meminfo.c
- src/testbed/gnunet-service-testbed_oc.c
- src/testbed/gnunet-service-testbed_peers.c
--src/testbed/gnunet_testbed_mpi_spawn.c
- src/testbed/gnunet-testbed-profiler.c
--src/testbed-logger/gnunet-service-testbed-logger.c
--src/testbed-logger/testbed_logger_api.c
--src/testbed/testbed_api_barriers.c
-+src/testbed/gnunet_mpi_test.c
-+src/testbed/gnunet_testbed_mpi_spawn.c
- src/testbed/testbed_api.c
-+src/testbed/testbed_api_barriers.c
- src/testbed/testbed_api_hosts.c
- src/testbed/testbed_api_operations.c
- src/testbed/testbed_api_peers.c
- src/testbed/testbed_api_sd.c
- src/testbed/testbed_api_services.c
- src/testbed/testbed_api_statistics.c
--src/testbed/testbed_api_testbed.c
- src/testbed/testbed_api_test.c
-+src/testbed/testbed_api_testbed.c
- src/testbed/testbed_api_topology.c
- src/testbed/testbed_api_underlay.c
- src/testing/gnunet-testing.c
-@@ -393,29 +393,29 @@ src/transport/gnunet-communicator-tcp.c
- src/transport/gnunet-communicator-udp.c
- src/transport/gnunet-communicator-unix.c
- src/transport/gnunet-helper-transport-bluetooth.c
--src/transport/gnunet-helper-transport-wlan.c
- src/transport/gnunet-helper-transport-wlan-dummy.c
-+src/transport/gnunet-helper-transport-wlan.c
- src/transport/gnunet-service-tng.c
--src/transport/gnunet-service-transport_ats.c
- src/transport/gnunet-service-transport.c
-+src/transport/gnunet-service-transport_ats.c
- src/transport/gnunet-service-transport_hello.c
- src/transport/gnunet-service-transport_manipulation.c
- src/transport/gnunet-service-transport_neighbours.c
- src/transport/gnunet-service-transport_plugins.c
- src/transport/gnunet-service-transport_validation.c
--src/transport/gnunet-transport.c
- src/transport/gnunet-transport-certificate-creation.c
- src/transport/gnunet-transport-profiler.c
- src/transport/gnunet-transport-wlan-receiver.c
- src/transport/gnunet-transport-wlan-sender.c
-+src/transport/gnunet-transport.c
- src/transport/plugin_transport_http_client.c
- src/transport/plugin_transport_http_common.c
- src/transport/plugin_transport_http_server.c
- src/transport/plugin_transport_smtp.c
- src/transport/plugin_transport_tcp.c
- src/transport/plugin_transport_template.c
--src/transport/plugin_transport_udp_broadcasting.c
- src/transport/plugin_transport_udp.c
-+src/transport/plugin_transport_udp_broadcasting.c
- src/transport/plugin_transport_unix.c
- src/transport/plugin_transport_wlan.c
- src/transport/plugin_transport_xt.c
-@@ -424,6 +424,11 @@ src/transport/tcp_connection_legacy.c
- src/transport/tcp_server_legacy.c
- src/transport/tcp_server_mst_legacy.c
- src/transport/tcp_service_legacy.c
-+src/transport/transport-testing-filenames.c
-+src/transport/transport-testing-loggers.c
-+src/transport/transport-testing-main.c
-+src/transport/transport-testing-send.c
-+src/transport/transport-testing.c
- src/transport/transport_api2_address.c
- src/transport/transport_api2_communication.c
- src/transport/transport_api2_core.c
-@@ -436,11 +441,6 @@ src/transport/transport_api_manipulation
- src/transport/transport_api_monitor_peers.c
- src/transport/transport_api_monitor_plugins.c
- src/transport/transport_api_offer_hello.c
--src/transport/transport-testing.c
--src/transport/transport-testing-filenames.c
--src/transport/transport-testing-loggers.c
--src/transport/transport-testing-main.c
--src/transport/transport-testing-send.c
- src/util/bandwidth.c
- src/util/benchmark.c
- src/util/bio.c
-@@ -453,8 +453,8 @@ src/util/configuration_loader.c
- src/util/container_bloomfilter.c
- src/util/container_heap.c
- src/util/container_meta_data.c
--src/util/container_multihashmap32.c
- src/util/container_multihashmap.c
-+src/util/container_multihashmap32.c
- src/util/container_multipeermap.c
- src/util/container_multishortmap.c
- src/util/crypto_abe.c
-@@ -476,15 +476,15 @@ src/util/dnsparser.c
- src/util/dnsstub.c
- src/util/getopt.c
- src/util/getopt_helpers.c
--src/util/gnunet-config.c
- src/util/gnunet-config-diff.c
-+src/util/gnunet-config.c
- src/util/gnunet-ecc.c
- src/util/gnunet-helper-w32-console.c
- src/util/gnunet-resolver.c
- src/util/gnunet-scrypt.c
- src/util/gnunet-service-resolver.c
--src/util/gnunet-timeout.c
- src/util/gnunet-timeout-w32.c
-+src/util/gnunet-timeout.c
- src/util/gnunet-uri.c
- src/util/helper.c
- src/util/load.c
-@@ -513,13 +513,13 @@ src/util/tun.c
- src/util/w32cat.c
- src/util/win.c
- src/util/winproc.c
--src/vpn/gnunet-helper-vpn.c
- src/vpn/gnunet-helper-vpn-windows.c
-+src/vpn/gnunet-helper-vpn.c
- src/vpn/gnunet-service-vpn.c
- src/vpn/gnunet-vpn.c
- src/vpn/vpn_api.c
--src/zonemaster/gnunet-service-zonemaster.c
- src/zonemaster/gnunet-service-zonemaster-monitor.c
-+src/zonemaster/gnunet-service-zonemaster.c
- src/fs/fs_api.h
- src/include/compat.h
- src/include/gnunet_common.h
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -47,6 +47,7 @@ gnunetinclude_HEADERS = \
-   gnunet_container_lib.h \
-   gnunet_conversation_service.h \
-   gnunet_core_service.h \
-+      gnunet_credential_service.h \
-   gnunet_crypto_lib.h \
-   gnunet_curl_lib.h \
-   gnunet_datacache_lib.h \
---- /dev/null
-+++ b/src/include/gnunet_credential_service.h
-@@ -0,0 +1,375 @@
-+/*
-+      This file is part of GNUnet
-+      Copyright (C) 2012-2014 GNUnet e.V.
-+
-+      GNUnet is free software: you can redistribute it and/or modify it
-+      under the terms of the GNU Affero General Public License as published
-+      by the Free Software Foundation, either version 3 of the License,
-+      or (at your option) any later version.
-+
-+      GNUnet is distributed in the hope that it will be useful, but
-+      WITHOUT ANY WARRANTY; without even the implied warranty of
-+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+      Affero General Public License for more details.
-+     
-+      You should have received a copy of the GNU Affero General Public License
-+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+
-+/**
-+ * @author Martin Schanzenbach
-+ *
-+ * @file
-+ * API to the Credential service
-+ *
-+ * @defgroup credential  Credential service
-+ * Credentials
-+ *
-+ * @{
-+ */
-+#ifndef GNUNET_CREDENTIAL_SERVICE_H
-+#define GNUNET_CREDENTIAL_SERVICE_H
-+
-+#include "gnunet_util_lib.h"
-+#include "gnunet_gns_service.h"
-+#include "gnunet_identity_service.h"
-+
-+#ifdef __cplusplus
-+extern "C"
-+{
-+#if 0                           /* keep Emacsens' auto-indent happy */
-+}
-+#endif
-+#endif
-+
-+
-+/**
-+ * Connection to the Credential service.
-+ */
-+struct GNUNET_CREDENTIAL_Handle;
-+
-+/**
-+ * Handle to control a lookup operation.
-+ */
-+struct GNUNET_CREDENTIAL_Request;
-+
-+/*
-+* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
-+*/
-+enum GNUNET_CREDENTIAL_CredentialFlags {
-+
-+  //Subject had credentials before, but have been revoked now
-+  GNUNET_CREDENTIAL_FLAG_REVOKED=0,
-+
-+  //Subject flag indicates that the subject is a holder of this credential and may present it as such
-+  GNUNET_CREDENTIAL_FLAG_SUBJECT=1,
-+
-+  //Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance
-+  GNUNET_CREDENTIAL_FLAG_ISSUER=2
-+
-+};
-+
-+GNUNET_NETWORK_STRUCT_BEGIN
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationRecord {
-+
-+  /**
-+   * Number of delegation sets in this record
-+   */
-+  uint32_t set_count;
-+
-+  /**
-+   * Length of delegation sets
-+   */
-+  uint64_t data_size;
-+  /**
-+   * Followed by set_count DelegationSetRecords
-+   *
-+   */
-+};
-+
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationRecordSet {
-+
-+  /**
-+   * Public key of the subject this attribute was delegated to
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+  /**
-+   * Length of attribute, may be 0
-+   */
-+  uint32_t subject_attribute_len;
-+};
-+
-+
-+GNUNET_NETWORK_STRUCT_END
-+
-+/**
-+ * The attribute delegation record
-+ */
-+struct GNUNET_CREDENTIAL_DelegationSet {
-+
-+  /**
-+   * Public key of the subject this attribute was delegated to
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+  uint32_t subject_attribute_len;
-+
-+  /**
-+   * The subject attribute
-+   */
-+  const char *subject_attribute;
-+};
-+
-+
-+/**
-+ * A delegation
-+ */
-+struct GNUNET_CREDENTIAL_Delegation {
-+
-+  /**
-+   * The issuer of the delegation
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+  /**
-+   * Public key of the subject this attribute was delegated to
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+  /**
-+   * Length of the attribute
-+   */
-+  uint32_t issuer_attribute_len;
-+
-+  /**
-+   * The attribute
-+   */
-+  const char *issuer_attribute;
-+
-+  /**
-+   * Length of the attribute
-+   */
-+  uint32_t subject_attribute_len;
-+
-+  /**
-+   * The attribute
-+   */
-+  const char *subject_attribute;
-+};
-+
-+
-+/**
-+ * A credential
-+ */
-+struct GNUNET_CREDENTIAL_Credential {
-+
-+  /**
-+   * The issuer of the credential
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+  /**
-+   * Public key of the subject this credential was issued to
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+  /**
-+   * Signature of this credential
-+   */
-+  struct GNUNET_CRYPTO_EcdsaSignature signature;
-+
-+  /**
-+   * Expiration of this credential
-+   */
-+  struct GNUNET_TIME_Absolute expiration;
-+
-+  /**
-+   * Length of the attribute
-+   */
-+  uint32_t issuer_attribute_len;
-+
-+  /**
-+   * The attribute
-+   */
-+  const char *issuer_attribute;
-+
-+};
-+
-+
-+
-+/**
-+ * Initialize the connection with the Credential service.
-+ *
-+ * @param cfg configuration to use
-+ * @return handle to the Credential service, or NULL on error
-+ */
-+struct GNUNET_CREDENTIAL_Handle *
-+GNUNET_CREDENTIAL_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
-+
-+
-+/**
-+ * Shutdown connection with the Credentail service.
-+ *
-+ * @param handle connection to shut down
-+ */
-+void
-+GNUNET_CREDENTIAL_disconnect (struct GNUNET_CREDENTIAL_Handle *handle);
-+
-+
-+/**
-+ * Iterator called on obtained result for an attribute verification.
-+ *
-+ * @param cls closure
-+ * @param d_count the number of delegations processed
-+ * @param delegation_chain the delegations processed
-+ * @param c_count the number of credentials found
-+ * @param credential the credentials
-+ */
-+typedef void (*GNUNET_CREDENTIAL_CredentialResultProcessor) (void *cls,
-+                                                         unsigned int d_count,
-+                                                         struct GNUNET_CREDENTIAL_Delegation *delegation_chain,
-+                                                         unsigned int c_count,
-+                                                         struct GNUNET_CREDENTIAL_Credential *credential);
-+
-+/**
-+ * Iterator called on obtained result for an attribute delegation.
-+ *
-+ * @param cls closure
-+ * @param success GNUNET_YES if successful
-+ * @param result the record data that can be handed to the subject
-+ */
-+typedef void (*GNUNET_CREDENTIAL_DelegateResultProcessor) (void *cls,
-+                                                           uint32_t success);
-+
-+/**
-+ * Iterator called on obtained result for an attribute delegation removal.
-+ *
-+ * @param cls closure
-+ * @param success GNUNET_YES if successful
-+ * @param result the record data that can be handed to the subject
-+ */
-+typedef void (*GNUNET_CREDENTIAL_RemoveDelegateResultProcessor) (void *cls,
-+                                                                 uint32_t success);
-+
-+
-+/**
-+ * Performs attribute verification.
-+ * Checks if there is a delegation chain from
-+ * attribute ``issuer_attribute'' issued by the issuer
-+ * with public key ``issuer_key'' maps to the attribute
-+ * ``subject_attribute'' claimed by the subject with key
-+ * ``subject_key''
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer_key the issuer public key
-+ * @param issuer_attribute the issuer attribute
-+ * @param subject_key the subject public key
-+ * @param credential_count number of credentials
-+ * @param credentials the subject credentials
-+ * @param proc function to call on result
-+ * @param proc_cls closure for processor
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request*
-+GNUNET_CREDENTIAL_verify (struct GNUNET_CREDENTIAL_Handle *handle,
-+                          const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
-+                          const char *issuer_attribute,
-+                          const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key,
-+                          uint32_t credential_count,
-+                          const struct GNUNET_CREDENTIAL_Credential *credentials,
-+                          GNUNET_CREDENTIAL_CredentialResultProcessor proc,
-+                          void *proc_cls);
-+
-+struct GNUNET_CREDENTIAL_Request*
-+GNUNET_CREDENTIAL_collect (struct GNUNET_CREDENTIAL_Handle *handle,
-+                           const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
-+                           const char *issuer_attribute,
-+                           const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key,
-+                           GNUNET_CREDENTIAL_CredentialResultProcessor proc,
-+                           void *proc_cls);
-+
-+/**
-+ * Delegate an attribute
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer the ego that should be used to delegate the attribute
-+ * @param attribute the name of the attribute to delegate
-+ * @param subject the subject of the delegation
-+ * @param delegated_attribute the name of the attribute that is delegated to
-+ * @param proc the result callback
-+ * @param proc_cls the result closure context
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request *
-+GNUNET_CREDENTIAL_add_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
-+                                  struct GNUNET_IDENTITY_Ego *issuer,
-+                                  const char *attribute,
-+                                  struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
-+                                  const char *delegated_attribute,
-+                                  GNUNET_CREDENTIAL_DelegateResultProcessor proc,
-+                                  void *proc_cls);
-+
-+/**
-+ * Remove a delegation
-+ *
-+ * @param handle handle to the Credential service
-+ * @param issuer the ego that was used to delegate the attribute
-+ * @param attribute the name of the attribute that is delegated
-+ * @param proc the callback
-+ * @param proc_cls callback closure
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Request *
-+GNUNET_CREDENTIAL_remove_delegation (struct GNUNET_CREDENTIAL_Handle *handle,
-+                                     struct GNUNET_IDENTITY_Ego *issuer,
-+                                     const char *attribute,
-+                                     GNUNET_CREDENTIAL_RemoveDelegateResultProcessor proc,
-+                                     void *proc_cls);
-+
-+
-+
-+/**
-+ * Issue an attribute to a subject
-+ *
-+ * @param issuer the ego that should be used to issue the attribute
-+ * @param subject the subject of the attribute
-+ * @param attribute the name of the attribute
-+ * @param expiration the TTL of the credential
-+ * @return handle to the queued request
-+ */
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
-+                                    struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
-+                                    const char *attribute,
-+                                    struct GNUNET_TIME_Absolute *expiration);
-+
-+
-+
-+/**
-+ * Cancel pending lookup request
-+ *
-+ * @param lr the lookup request to cancel
-+ */
-+void
-+GNUNET_CREDENTIAL_request_cancel (struct GNUNET_CREDENTIAL_Request *lr);
-+
-+
-+#if 0                           /* keep Emacsens' auto-indent happy */
-+{
-+#endif
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+
-+/** @} */  /* end of group */
diff --git a/net/gnunet/patches/0002-credential-include-headers-in-dist-sources.patch b/net/gnunet/patches/0002-credential-include-headers-in-dist-sources.patch
deleted file mode 100644 (file)
index 967b3db..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-From 5be7a51b0980909719670953c938ee724627ad90 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 15:30:26 +0100
-Subject: [PATCH] credential: include headers in dist sources
-
----
- src/credential/Makefile.am | 3 +++
- src/include/Makefile.am    | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
---- a/src/credential/Makefile.am
-+++ b/src/credential/Makefile.am
-@@ -68,8 +68,11 @@ gnunet_service_credential_LDADD = \
- libgnunetcredential_la_SOURCES = \
-+ credential.h \
-  credential_api.c \
-+ credential_serialization.h \
-  credential_serialization.c \
-+ credential_misc.h \
-  credential_misc.c
- libgnunetcredential_la_LIBADD = \
-  $(top_builddir)/src/util/libgnunetutil.la $(XLIB) 
---- a/src/include/Makefile.am
-+++ b/src/include/Makefile.am
-@@ -47,7 +47,7 @@ gnunetinclude_HEADERS = \
-   gnunet_container_lib.h \
-   gnunet_conversation_service.h \
-   gnunet_core_service.h \
--      gnunet_credential_service.h \
-+  gnunet_credential_service.h \
-   gnunet_crypto_lib.h \
-   gnunet_curl_lib.h \
-   gnunet_datacache_lib.h \
-@@ -107,7 +107,7 @@ gnunetinclude_HEADERS = \
-   gnunet_regex_service.h \
-   gnunet_rest_lib.h \
-   gnunet_rest_plugin.h \
--      gnunet_rps_service.h \
-+  gnunet_rps_service.h \
-   gnunet_revocation_service.h \
-   gnunet_scalarproduct_service.h \
-   gnunet_scheduler_lib.h \
---- /dev/null
-+++ b/src/credential/credential.h
-@@ -0,0 +1,221 @@
-+/*
-+      This file is part of GNUnet
-+      Copyright (C) 2012-2013 GNUnet e.V.
-+
-+      GNUnet is free software: you can redistribute it and/or modify it
-+      under the terms of the GNU Affero General Public License as published
-+      by the Free Software Foundation, either version 3 of the License,
-+      or (at your option) any later version.
-+
-+      GNUnet is distributed in the hope that it will be useful, but
-+      WITHOUT ANY WARRANTY; without even the implied warranty of
-+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+      Affero General Public License for more details.
-+     
-+      You should have received a copy of the GNU Affero General Public License
-+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @file credential/credential.h
-+ * @brief IPC messages between CREDENTIAL API and CREDENTIAL service
-+ * @author Martin Schanzenbach
-+ */
-+#ifndef CREDENTIAL_H
-+#define CREDENTIAL_H
-+
-+#include "gnunet_credential_service.h"
-+
-+GNUNET_NETWORK_STRUCT_BEGIN
-+
-+/**
-+ * Message from client to Credential service to collect credentials.
-+ */
-+struct CollectMessage
-+{
-+  /**
-+   * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
-+   */
-+  struct GNUNET_MessageHeader header;
-+
-+  /**
-+   * Subject public key
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPrivateKey subject_key;
-+
-+  /**
-+   * Trust anchor
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+  /**
-+   * Length of the issuer attribute
-+   */
-+  uint16_t issuer_attribute_len;
-+
-+  /**
-+   * Unique identifier for this request (for key collisions).
-+   */
-+  uint32_t id GNUNET_PACKED;
-+
-+  /* Followed by the zero-terminated attribute */
-+
-+};
-+
-+
-+/**
-+ * Message from client to Credential service to verify attributes.
-+ */
-+struct VerifyMessage
-+{
-+  /**
-+   * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY
-+   */
-+  struct GNUNET_MessageHeader header;
-+
-+  /**
-+   * Subject public key
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+  /**
-+   * Trust anchor
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+  /**
-+   * Number of credentials
-+   */
-+  uint32_t c_count;
-+
-+  /**
-+   * Length of the issuer attribute
-+   */
-+  uint16_t issuer_attribute_len;
-+
-+  /**
-+   * Unique identifier for this request (for key collisions).
-+   */
-+  uint32_t id GNUNET_PACKED;
-+
-+  /* Followed by the zero-terminated attribute and credentials to look up */
-+
-+};
-+
-+
-+/**
-+ * Message from CREDENTIAL service to client: new results.
-+ */
-+struct DelegationChainResultMessage
-+{
-+  /**
-+    * Header of type #GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT
-+   */
-+  struct GNUNET_MessageHeader header;
-+
-+  /**
-+   * Unique identifier for this request (for key collisions).
-+   */
-+  uint32_t id GNUNET_PACKED;
-+  
-+  /**
-+   * Indicates if credential has been found at all
-+   */
-+  uint32_t cred_found GNUNET_PACKED;
-+
-+  /**
-+   * The number of delegations in the response
-+   */
-+  uint32_t d_count GNUNET_PACKED;
-+
-+  /**
-+   * The number of credentials in the response
-+   */
-+  uint32_t c_count GNUNET_PACKED;
-+
-+  /* followed by ad_count GNUNET_CREDENTIAL_RecordData structs*/
-+
-+};
-+
-+struct DelegationRecordData
-+{
-+  /**
-+   * Subject key
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+  
-+  /**
-+   * Subject attributes
-+   */
-+  uint32_t subject_attribute_len GNUNET_PACKED;
-+};
-+
-+
-+struct ChainEntry
-+{
-+  /**
-+   * Issuer key
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+  
-+  /**
-+   * Subject key
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+  
-+  /**
-+   * Issuer attributes
-+   */
-+  uint32_t issuer_attribute_len GNUNET_PACKED;
-+  
-+  /**
-+   * Subject attributes
-+   */
-+  uint32_t subject_attribute_len GNUNET_PACKED;
-+};
-+
-+
-+struct CredentialEntry
-+{
-+
-+  /**
-+   * The signature for this credential by the issuer
-+   */
-+  struct GNUNET_CRYPTO_EcdsaSignature signature;
-+
-+  /**
-+   * Signature meta
-+   */
-+  struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-+
-+  /**
-+   * Public key of the issuer
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey issuer_key;
-+
-+  /**
-+   * Public key of the subject this credential was issued to
-+   */
-+  struct GNUNET_CRYPTO_EcdsaPublicKey subject_key;
-+
-+  /**
-+   * Expiration time of this credential
-+   */
-+  uint64_t expiration GNUNET_PACKED;
-+   
-+  /**
-+   * Issuer attribute length
-+   */
-+  uint32_t issuer_attribute_len;
-+
-+  /**
-+   * Followed by the attribute string
-+   */
-+};
-+
-+
-+GNUNET_NETWORK_STRUCT_END
-+
-+#endif
-+
---- /dev/null
-+++ b/src/credential/credential_misc.h
-@@ -0,0 +1,35 @@
-+/*
-+      This file is part of GNUnet
-+      Copyright (C) 2012-2013 GNUnet e.V.
-+
-+      GNUnet is free software: you can redistribute it and/or modify it
-+      under the terms of the GNU Affero General Public License as published
-+      by the Free Software Foundation, either version 3 of the License,
-+      or (at your option) any later version.
-+
-+      GNUnet is distributed in the hope that it will be useful, but
-+      WITHOUT ANY WARRANTY; without even the implied warranty of
-+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+      Affero General Public License for more details.
-+     
-+      You should have received a copy of the GNU Affero General Public License
-+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+/**
-+ * @file credential/credential_misc.h
-+ * @brief Credential helper functions
-+ */
-+#ifndef CREDENTIAL_MISC_H
-+#define CREDENTIAL_MISC_H
-+
-+
-+
-+char*
-+GNUNET_CREDENTIAL_credential_to_string (const struct GNUNET_CREDENTIAL_Credential *cred);
-+
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_from_string (const char* str);
-+
-+#endif
---- /dev/null
-+++ b/src/credential/credential_serialization.h
-@@ -0,0 +1,159 @@
-+/*
-+     This file is part of GNUnet.
-+     Copyright (C) 2009-2013, 2016 GNUnet e.V.
-+
-+     GNUnet is free software: you can redistribute it and/or modify it
-+     under the terms of the GNU Affero General Public License as published
-+     by the Free Software Foundation, either version 3 of the License,
-+     or (at your option) any later version.
-+
-+     GNUnet is distributed in the hope that it will be useful, but
-+     WITHOUT ANY WARRANTY; without even the implied warranty of
-+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+     Affero General Public License for more details.
-+    
-+     You should have received a copy of the GNU Affero General Public License
-+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+*/
-+
-+
-+/**
-+ * @file credential/credential_serialization.h
-+ * @brief API to serialize and deserialize delegation chains 
-+ * and credentials
-+ * @author Martin Schanzenbach
-+ */
-+#ifndef CREDENTIAL_SERIALIZATION_H
-+#define CREDENTIAL_SERIALIZATION_H
-+
-+#include "platform.h"
-+#include "gnunet_util_lib.h"
-+#include "gnunet_constants.h"
-+#include "gnunet_credential_service.h"
-+
-+/**
-+ * Calculate how many bytes we will need to serialize
-+ * the given delegation record
-+ *
-+ * @param ds_count number of delegation chain entries
-+ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
-+ * @return the required size to serialize
-+ */
-+size_t
-+GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count,
-+                                           const struct GNUNET_CREDENTIAL_DelegationSet *dsr);
-+
-+/**
-+ * Serizalize the given delegation record entries
-+ *
-+ * @param d_count number of delegation chain entries
-+ * @param dsr array of #GNUNET_CREDENTIAL_Delegation
-+ * @param dest_size size of the destination
-+ * @param dest where to store the result
-+ * @return the size of the data, -1 on failure
-+ */
-+ssize_t
-+GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count,
-+                                            const struct GNUNET_CREDENTIAL_DelegationSet *dsr,
-+                                            size_t dest_size,
-+                                            char *dest);
-+
-+
-+/**
-+ * Deserialize the given destination
-+ *
-+ * @param len size of the serialized delegation recird
-+ * @param src the serialized data
-+ * @param d_count the number of delegation chain entries
-+ * @param dsr where to put the delegation chain entries
-+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-+ */
-+int
-+GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len,
-+                                              const char *src,
-+                                              unsigned int d_count,
-+                                              struct GNUNET_CREDENTIAL_DelegationSet *dsr);
-+
-+  /**
-+   * Calculate how many bytes we will need to serialize
-+   * the given delegation chain and credential
-+   *
-+   * @param d_count number of delegation chain entries
-+   * @param dd array of #GNUNET_CREDENTIAL_Delegation
-+   * @param c_count number of credential entries
-+   * @param cd a #GNUNET_CREDENTIAL_Credential
-+   * @return the required size to serialize
-+   */
-+  size_t
-+    GNUNET_CREDENTIAL_delegation_chain_get_size (unsigned int d_count,
-+                                                 const struct GNUNET_CREDENTIAL_Delegation *dd,
-+                                                 unsigned int c_count,
-+                                                 const struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+  /**
-+   * Serizalize the given delegation chain entries and credential
-+   *
-+   * @param d_count number of delegation chain entries
-+   * @param dd array of #GNUNET_CREDENTIAL_Delegation
-+   * @param c_count number of credential entries
-+   * @param cd a #GNUNET_CREDENTIAL_Credential
-+   * @param dest_size size of the destination
-+   * @param dest where to store the result
-+   * @return the size of the data, -1 on failure
-+   */
-+  ssize_t
-+    GNUNET_CREDENTIAL_delegation_chain_serialize (unsigned int d_count,
-+                                                  const struct GNUNET_CREDENTIAL_Delegation *dd,
-+                                                  unsigned int c_count,
-+                                                  const struct GNUNET_CREDENTIAL_Credential *cd,
-+                                                  size_t dest_size,
-+                                                  char *dest);
-+
-+
-+  /**
-+   * Deserialize the given destination
-+   *
-+   * @param len size of the serialized delegation chain and cred
-+   * @param src the serialized data
-+   * @param d_count the number of delegation chain entries
-+   * @param dd where to put the delegation chain entries
-+   * @param c_count number of credential entries
-+   * @param cd where to put the credential data
-+   * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
-+   */
-+  int
-+    GNUNET_CREDENTIAL_delegation_chain_deserialize (size_t len,
-+                                                    const char *src,
-+                                                    unsigned int d_count,
-+                                                    struct GNUNET_CREDENTIAL_Delegation *dd,
-+                                                    unsigned int c_count,
-+                                                    struct GNUNET_CREDENTIAL_Credential *cd);
-+  size_t
-+  GNUNET_CREDENTIAL_credentials_get_size (unsigned int c_count,
-+                                          const struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+ssize_t
-+GNUNET_CREDENTIAL_credentials_serialize (unsigned int c_count,
-+                                         const struct GNUNET_CREDENTIAL_Credential *cd,
-+                                         size_t dest_size,
-+                                         char *dest);
-+
-+
-+int
-+GNUNET_CREDENTIAL_credentials_deserialize (size_t len,
-+                                           const char *src,
-+                                           unsigned int c_count,
-+                                           struct GNUNET_CREDENTIAL_Credential *cd);
-+
-+
-+int
-+GNUNET_CREDENTIAL_credential_serialize (struct GNUNET_CREDENTIAL_Credential *cred,
-+                                        char **data);
-+
-+struct GNUNET_CREDENTIAL_Credential*
-+GNUNET_CREDENTIAL_credential_deserialize (const char* data,
-+                                          size_t data_size);
-+#endif
-+/* end of credential_serialization.h */
---- a/src/credential/Makefile.in
-+++ b/src/credential/Makefile.in
-@@ -714,8 +714,11 @@ gnunet_service_credential_LDADD = \
-   $(GN_LIBINTL)
- libgnunetcredential_la_SOURCES = \
-+ credential.h \
-  credential_api.c \
-+ credential_serialization.h \
-  credential_serialization.c \
-+ credential_misc.h \
-  credential_misc.c
- libgnunetcredential_la_LIBADD = \
diff --git a/net/gnunet/patches/0003-reclaim-attribute-include-header-in-dist-sources.patch b/net/gnunet/patches/0003-reclaim-attribute-include-header-in-dist-sources.patch
deleted file mode 100644 (file)
index 2188c2c..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-From c776664d488028f844ae6045e60f693a8624bfac Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:06:06 +0100
-Subject: [PATCH] reclaim-attribute: include header in dist sources
-
----
- src/reclaim-attribute/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/src/reclaim-attribute/Makefile.am
-+++ b/src/reclaim-attribute/Makefile.am
-@@ -20,6 +20,7 @@ lib_LTLIBRARIES = \
-   libgnunetreclaimattribute.la
- libgnunetreclaimattribute_la_SOURCES = \
-+  reclaim_attribute.h \
-   reclaim_attribute.c
- libgnunetreclaimattribute_la_LIBADD = \
-   $(top_builddir)/src/util/libgnunetutil.la \
---- /dev/null
-+++ b/src/reclaim-attribute/reclaim_attribute.h
-@@ -0,0 +1,56 @@
-+/*
-+   This file is part of GNUnet.
-+   Copyright (C) 2012-2015 GNUnet e.V.
-+
-+   GNUnet is free software: you can redistribute it and/or modify it
-+   under the terms of the GNU Affero General Public License as published
-+   by the Free Software Foundation, either version 3 of the License,
-+   or (at your option) any later version.
-+
-+   GNUnet is distributed in the hope that it will be useful, but
-+   WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Affero General Public License for more details.
-+  
-+   You should have received a copy of the GNU Affero General Public License
-+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+   */
-+/**
-+ * @author Martin Schanzenbach
-+ * @file reclaim-attribute/reclaim_attribute.h
-+ * @brief GNUnet reclaim identity attributes
-+ *
-+ */
-+#ifndef RECLAIM_ATTRIBUTE_H
-+#define RECLAIM_ATTRIBUTE_H
-+
-+#include "gnunet_reclaim_service.h"
-+
-+struct Attribute
-+{
-+  /**
-+   * Attribute type
-+   */
-+  uint32_t attribute_type;
-+
-+  /**
-+   * Attribute version
-+   */
-+  uint32_t attribute_version;
-+
-+  /**
-+   * Name length
-+   */
-+  uint32_t name_len;
-+  
-+  /**
-+   * Data size
-+   */
-+  uint32_t data_size;
-+
-+  //followed by data_size Attribute value data
-+};
-+
-+#endif
diff --git a/net/gnunet/patches/0004-reclaim-include-reclaim.conf-in-source-dist.patch b/net/gnunet/patches/0004-reclaim-include-reclaim.conf-in-source-dist.patch
deleted file mode 100644 (file)
index 7417aef..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 6c0f43552d627b93f99f7fd40d63815f323958c3 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:16:13 +0100
-Subject: [PATCH] reclaim: include reclaim.conf in source dist
-
----
- src/reclaim/Makefile.am | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/src/reclaim/Makefile.am
-+++ b/src/reclaim/Makefile.am
-@@ -17,9 +17,10 @@ SQLITE_PLUGIN = libgnunet_plugin_reclaim
- endif
- EXTRA_DIST = \
-+  reclaim.conf \
-   test_reclaim_defaults.conf \
--      test_reclaim.conf \
--      $(check_SCRIPTS)
-+  test_reclaim.conf \
-+  $(check_SCRIPTS)
- pkgcfgdir= $(pkgdatadir)/config.d/
---- /dev/null
-+++ b/src/reclaim/reclaim.conf
-@@ -0,0 +1,23 @@
-+[reclaim]
-+START_ON_DEMAND = NO
-+RUN_PER_USER = YES
-+#PORT = 2108
-+HOSTNAME = localhost
-+BINARY = gnunet-service-reclaim
-+ACCEPT_FROM = 127.0.0.1;
-+ACCEPT_FROM6 = ::1;
-+UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-reclaim.sock
-+UNIX_MATCH_UID = NO
-+UNIX_MATCH_GID = YES
-+TOKEN_EXPIRATION_INTERVAL = 30 m
-+DATABASE = sqlite
-+
-+[reclaim-rest-plugin]
-+#ADDRESS = https://identity.gnu:8000#/login
-+ADDRESS = https://ui.reclaim/#/login
-+PSW = secret
-+JWT_SECRET = secret
-+EXPIRATION_TIME = 1d
-+
-+[reclaim-sqlite]
-+FILENAME = $GNUNET_DATA_HOME/reclaim/sqlite.db
diff --git a/net/gnunet/patches/0005-rest-plugins-include-headers-in-dist-sources.patch b/net/gnunet/patches/0005-rest-plugins-include-headers-in-dist-sources.patch
deleted file mode 100644 (file)
index bbe5d5a..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-From da16f9c20dda74dc689c9564d1791cc2af3ede9d Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel@makrotopia.org>
-Date: Thu, 28 Feb 2019 16:23:40 +0100
-Subject: [PATCH] rest-plugins: include headers in dist sources
-
----
- src/rest-plugins/Makefile.am | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/src/rest-plugins/Makefile.am
-+++ b/src/rest-plugins/Makefile.am
-@@ -30,6 +30,7 @@ endif
- libgnunet_plugin_rest_reclaim_la_SOURCES = \
-   plugin_rest_reclaim.c \
-+      json_reclaim.h \
-       json_reclaim.c
- libgnunet_plugin_rest_reclaim_la_LIBADD = \
-   $(top_builddir)/src/identity/libgnunetidentity.la \
-@@ -117,6 +118,7 @@ libgnunet_plugin_rest_gns_la_LDFLAGS = \
- libgnunet_plugin_rest_openid_connect_la_SOURCES = \
-   plugin_rest_openid_connect.c \
-+      oidc_helper.h \
-       oidc_helper.c
- libgnunet_plugin_rest_openid_connect_la_LIBADD = \
-       $(top_builddir)/src/identity/libgnunetidentity.la \
---- /dev/null
-+++ b/src/rest-plugins/oidc_helper.h
-@@ -0,0 +1,111 @@
-+/*
-+      This file is part of GNUnet
-+      Copyright (C) 2010-2015 GNUnet e.V.
-+
-+      GNUnet is free software: you can redistribute it and/or modify it
-+      under the terms of the GNU Affero General Public License as published
-+      by the Free Software Foundation, either version 3 of the License,
-+      or (at your option) any later version.
-+
-+      GNUnet is distributed in the hope that it will be useful, but
-+      WITHOUT ANY WARRANTY; without even the implied warranty of
-+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+      Affero General Public License for more details.
-+     
-+      You should have received a copy of the GNU Affero General Public License
-+      along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+ */
-+
-+/**
-+ * @file reclaim/oidc_helper.h
-+ * @brief helper library for OIDC related functions
-+ * @author Martin Schanzenbach
-+ */
-+
-+#ifndef JWT_H
-+#define JWT_H
-+
-+#define JWT_ALG "alg"
-+
-+/* Use 512bit HMAC */
-+#define JWT_ALG_VALUE "HS512"
-+
-+#define JWT_TYP "typ"
-+
-+#define JWT_TYP_VALUE "jwt"
-+
-+#define SERVER_ADDRESS "https://api.reclaim"
-+
-+/**
-+ * Create a JWT from attributes
-+ *
-+ * @param aud_key the public of the audience
-+ * @param sub_key the public key of the subject
-+ * @param attrs the attribute list
-+ * @param expiration_time the validity of the token
-+ * @param secret_key the key used to sign the JWT
-+ * @return a new base64-encoded JWT string.
-+ */
-+char*
-+OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
-+                   const struct GNUNET_CRYPTO_EcdsaPublicKey *sub_key,
-+                   const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
-+                   const struct GNUNET_TIME_Relative *expiration_time,
-+                   const char *nonce,
-+                   const char *secret_key);
-+
-+/**
-+ * Builds an OIDC authorization code including
-+ * a reclaim ticket and nonce
-+ *
-+ * @param issuer the issuer of the ticket, used to sign the ticket and nonce
-+ * @param ticket the ticket to include in the code
-+ * @param nonce the nonce to include in the code
-+ * @return a new authorization code (caller must free)
-+ */
-+char*
-+OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
-+                       const struct GNUNET_RECLAIM_Ticket *ticket,
-+                       const char* nonce);
-+
-+/**
-+ * Parse reclaim ticket and nonce from
-+ * authorization code.
-+ * This also verifies the signature in the code.
-+ *
-+ * @param audience the expected audience of the code
-+ * @param code the string representation of the code
-+ * @param ticket where to store the ticket
-+ * @param nonce where to store the nonce
-+ * @return GNUNET_OK if successful, else GNUNET_SYSERR
-+ */
-+int
-+OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPublicKey *audience,
-+                       const char* code,
-+                       struct GNUNET_RECLAIM_Ticket **ticket,
-+                       char **nonce);
-+
-+/**
-+ * Build a token response for a token request
-+ * TODO: Maybe we should add the scope here?
-+ *
-+ * @param access_token the access token to include
-+ * @param id_token the id_token to include
-+ * @param expiration_time the expiration time of the token(s)
-+ * @param token_response where to store the response
-+ */
-+void
-+OIDC_build_token_response (const char *access_token,
-+                           const char *id_token,
-+                           const struct GNUNET_TIME_Relative *expiration_time,
-+                           char **token_response);
-+/**
-+ * Generate a new access token
-+ */
-+char*
-+OIDC_access_token_new ();
-+
-+
-+#endif
---- /dev/null
-+++ b/src/rest-plugins/json_reclaim.h
-@@ -0,0 +1,48 @@
-+/*
-+     This file is part of GNUnet.
-+     Copyright (C) 2009-2018 GNUnet e.V.
-+
-+     GNUnet is free software: you can redistribute it and/or modify it
-+     under the terms of the GNU Affero General Public License as published
-+     by the Free Software Foundation, either version 3 of the License,
-+     or (at your option) any later version.
-+
-+     GNUnet is distributed in the hope that it will be useful, but
-+     WITHOUT ANY WARRANTY; without even the implied warranty of
-+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+     Affero General Public License for more details.
-+
-+     You should have received a copy of the GNU Affero General Public License
-+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+     SPDX-License-Identifier: AGPL3.0-or-later
-+*/
-+
-+/**
-+ * @file rest-plugins/json_reclaim.h
-+ * @brief JSON handling of reclaim data
-+ * @author Martin Schanzenbach
-+ */
-+#include "platform.h"
-+#include "gnunet_util_lib.h"
-+#include "gnunet_json_lib.h"
-+#include "gnunet_reclaim_service.h"
-+#include "gnunet_reclaim_attribute_lib.h"
-+
-+/**
-+ * JSON Specification for Reclaim claims.
-+ *
-+ * @param ticket struct of GNUNET_RECLAIM_ATTRIBUTE_Claim to fill
-+ * @return JSON Specification
-+ */
-+struct GNUNET_JSON_Specification
-+GNUNET_RECLAIM_JSON_spec_claim (struct GNUNET_RECLAIM_ATTRIBUTE_Claim **attr);
-+
-+/**
-+ * JSON Specification for Reclaim tickets.
-+ *
-+ * @param ticket struct of GNUNET_RECLAIM_Ticket to fill
-+ * @return JSON Specification
-+ */
-+struct GNUNET_JSON_Specification
-+GNUNET_RECLAIM_JSON_spec_ticket (struct GNUNET_RECLAIM_Ticket **ticket);
diff --git a/net/gnunet/patches/001-fix-libgnunetabe-build.patch b/net/gnunet/patches/001-fix-libgnunetabe-build.patch
new file mode 100644 (file)
index 0000000..ed7474a
--- /dev/null
@@ -0,0 +1,33 @@
+diff --git a/src/abe/Makefile.am b/src/abe/Makefile.am
+index 23a7ae68e..cccd3ccb0 100644
+--- a/src/abe/Makefile.am
++++ b/src/abe/Makefile.am
+@@ -20,6 +20,8 @@ libgnunetabe_la_LIBADD = \
+   $(LTLIBICONV) \
+   $(LTLIBINTL) \
+       $(ABE_LIBADD) \
++      $(top_builddir)/src/util/libgnunetutil.la \
++      -lgmp \
+       -lgabe \
+       -lpbc \
+       -lglib-2.0 \
+diff --git a/src/reclaim/Makefile.am b/src/reclaim/Makefile.am
+index 13918508e..be50cce26 100644
+--- a/src/reclaim/Makefile.am
++++ b/src/reclaim/Makefile.am
+@@ -99,6 +99,7 @@ libgnunet_plugin_reclaim_sqlite_la_LIBADD = \
+   libgnunetreclaim.la  \
+   $(top_builddir)/src/sq/libgnunetsq.la \
+   $(top_builddir)/src/statistics/libgnunetstatistics.la \
++      $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \
+   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
+   $(LTLIBINTL)
+ libgnunet_plugin_reclaim_sqlite_la_LDFLAGS = \
+@@ -126,6 +127,7 @@ libgnunetreclaim_la_SOURCES = \
+  reclaim.h
+ libgnunetreclaim_la_LIBADD = \
+   $(top_builddir)/src/util/libgnunetutil.la \
++      $(top_builddir)/src/reclaim-attribute/libgnunetreclaimattribute.la \
+       $(GN_LIBINTL) $(XLIB)
+ libgnunetreclaim_la_LDFLAGS = \
+       $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
index 54e34743efed8f2adfa84f027a8feb9addc4c4fe..b42bc595831d6aabfb693dca5f61692df57d0d95 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.8.19
-PKG_RELEASE:=2
+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-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/000-deprecated-openssl.patch b/net/haproxy/patches/000-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/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/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-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/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/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/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
diff --git a/net/kea/Makefile b/net/kea/Makefile
new file mode 100644 (file)
index 0000000..ec7e92f
--- /dev/null
@@ -0,0 +1,205 @@
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=kea
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=3
+PKG_MAINTAINER:=BangLang Huang<banglang.huang@foxmail.com>, Rosy Song<rosysong@rosinson.com>
+PKG_BUILD_DEPENDS:=boost log4cplus kea/host
+HOST_BUILD_DEPENDS:=boost boost/host log4cplus/host
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://ftp.isc.org/isc/kea/$(PKG_VERSION)/
+
+PKG_HASH:=edce4fab68ca7af607cf7f5bc86596e04fe0ef4b8e88906e339cdefcf21daaec
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=MPL-2.0
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
+
+define Package/kea/Default
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=IP Addresses and Names
+  TITLE:=ISC Kea
+  URL:=https://www.isc.org/kea
+endef
+
+define Package/kea/description
+  Kea is an open source DHCPv4/DHCPv6 server being developed by Internet
+  Systems Consortium. Kea is a high-performance, extensible DHCP server
+  engine that is designed to be easily modified and extended with hooks
+  libraries. It provides DHCPv4 and DHCPv6 servers, a dynamic DNS update
+  module, a portable DHCP library, libdhcp++, control agent that provides
+  management REST interface, and a DHCP benchmarking tool, perfdhcp.
+endef
+
+define Package/kea-libs
+       $(call Package/kea/Default)
+       TITLE+= Libraries
+       DEPENDS:=+libopenssl +log4cplus \
+               +boost +boost-python3 +boost-system
+endef
+
+define Package/kea-dhcp4
+       $(call Package/kea/Default)
+       TITLE+= DHCP Server v4
+       DEPENDS:=+kea-libs
+endef
+
+define Package/kea-dhcp6
+       $(call Package/kea/Default)
+       TITLE+= DHCP Server v6
+       DEPENDS:=@IPV6 +kea-libs
+endef
+
+define Package/kea-dhcp-ddns
+       $(call Package/kea/Default)
+       TITLE+= DHCP - DDNS
+       DEPENDS:=+kea-libs
+endef
+
+define Package/kea-admin
+       $(call Package/kea/Default)
+       TITLE+= Admin
+       DEPENDS:= +kea-libs +python3
+endef
+
+define Package/kea-ctrl
+       $(call Package/kea/Default)
+       TITLE+= Control
+       DEPENDS:= +kea-dhcp4 +IPV6:kea-dhcp6 \
+               +kea-dhcp-ddns
+endef
+
+define Package/kea-lfc
+       $(call Package/kea/Default)
+       TITLE+= lfc
+       DEPENDS:=+kea-libs
+endef
+
+define Package/kea-perfdhcp
+       $(call Package/kea/Default)
+       TITLE+= perfdhcp
+       DEPENDS:=+kea-libs
+endef
+
+CONFIGURE_ARGS += \
+       --with-log4cplus="$(STAGING_DIR)/usr" \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       $(if $(CONFIG_PACKAGE_kea-perfdhcp),--enable-perfdhcp,)
+
+CONFIGURE_VARS += \
+       cross_compiling="yes"
+
+HOST_CONFIGURE_ARGS += \
+       --enable-static-link \
+       --enable-boost-headers-only \
+       --with-log4cplus="$(STAGING_DIR_HOSTPKG)" \
+       --with-boost-include="$(STAGING_DIR)/usr/include" \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --without-pic
+
+HOST_LDFLAGS += \
+               -Wl,--gc-sections,--as-needed
+
+TARGET_CXXFLAGS += \
+               $(FPIC) \
+               -fdata-sections \
+               -ffunction-sections
+
+TARGET_LDFLAGS += \
+               -Wl,--gc-sections,--as-needed
+
+# Only compile the kea-msg-compiler which we need for
+# package compilation
+define Host/Compile
+       +$(HOST_MAKE_VARS) \
+       $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/exceptions $(HOST_MAKE_FLAGS)
+       +$(HOST_MAKE_VARS) \
+       $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/util $(HOST_MAKE_FLAGS)
+       +$(HOST_MAKE_VARS) \
+       $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/src/lib/log $(HOST_MAKE_FLAGS)
+endef
+
+define Host/Install
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/lib/log/compiler/kea-msg-compiler \
+               $(STAGING_DIR_HOSTPKG)/bin/
+endef
+
+define Build/Compile
+       $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/lib/log/compiler
+       $(INSTALL_BIN) $(STAGING_DIR_HOSTPKG)/bin/kea-msg-compiler \
+               $(PKG_BUILD_DIR)/src/lib/log/compiler/
+       $(call Build/Compile/Default)
+endef
+
+define Package/kea-libs/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/kea-dhcp4/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp4 $(1)/usr/sbin/kea-dhcp4
+       $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp4.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp6/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp6 $(1)/usr/sbin/kea-dhcp6
+       $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp6.conf $(1)/etc/kea/
+endef
+
+define Package/kea-dhcp-ddns/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-dhcp-ddns $(1)/usr/sbin/kea-dhcp-ddns
+       $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-dhcp-ddns.conf $(1)/etc/kea/
+endef
+
+define Package/kea-admin/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-admin $(1)/usr/sbin/kea-admin
+endef
+
+define Package/kea-ctrl/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/kea
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keactrl $(1)/usr/sbin/keactrl
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-ctrl-agent $(1)/usr/sbin/kea-ctrl-agent
+       $(CP) $(PKG_INSTALL_DIR)/etc/kea/keactrl.conf $(1)/etc/kea/
+       $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-ctrl-agent.conf $(1)/etc/kea/
+       $(CP) $(PKG_INSTALL_DIR)/etc/kea/kea-netconf.conf $(1)/etc/kea/
+endef
+
+define Package/kea-lfc/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kea-lfc $(1)/usr/sbin/kea-lfc
+endef
+
+define Package/kea-perfdhcp/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/perfdhcp $(1)/usr/sbin/perfdhcp
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,kea-libs))
+$(eval $(call BuildPackage,kea-dhcp4))
+$(eval $(call BuildPackage,kea-dhcp6))
+$(eval $(call BuildPackage,kea-dhcp-ddns))
+$(eval $(call BuildPackage,kea-admin))
+$(eval $(call BuildPackage,kea-ctrl))
+$(eval $(call BuildPackage,kea-lfc))
+$(eval $(call BuildPackage,kea-perfdhcp))
diff --git a/net/kea/patches/001-fix-cross-compile.patch b/net/kea/patches/001-fix-cross-compile.patch
new file mode 100644 (file)
index 0000000..d3a1521
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -580,10 +580,10 @@ AC_TRY_COMPILE([
+         AC_MSG_RESULT(no))
+ AC_MSG_CHECKING(for usuable C++11 regex)
+-AC_TRY_RUN([
++AC_TRY_COMPILE([
+ #include <regex>
+-#include <iostream>
+-int main() {
++#include <iostream>],
++[int main() {
+   const std::regex regex(".*");
+   const std::string string = "This should match!";
+   const auto result = std::regex_search(string, regex);
diff --git a/net/kea/patches/002-fix-host-compile.patch b/net/kea/patches/002-fix-host-compile.patch
new file mode 100644 (file)
index 0000000..01f20d1
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/m4macros/ax_crypto.m4
++++ b/m4macros/ax_crypto.m4
+@@ -454,7 +454,7 @@ EOF
+     dnl Check availability of SHA-2
+     AC_MSG_CHECKING([support of SHA-2])
+     LIBS_SAVED=${LIBS}
+-    LIBS="$LIBS $CRYPTO_LIBS"
++    LIBS="$LIBS $CRYPTO_LIBS -lpthread"
+     CPPFLAGS_SAVED=${CPPFLAGS}
+     CPPFLAGS="$CRYPTO_INCLUDES $CPPFLAGS"
+     AC_LINK_IFELSE(
diff --git a/net/kea/patches/003-no-test-compile.patch b/net/kea/patches/003-no-test-compile.patch
new file mode 100644 (file)
index 0000000..9b484d5
--- /dev/null
@@ -0,0 +1,328 @@
+--- a/src/bin/admin/Makefile.am
++++ b/src/bin/admin/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ # Install kea-admin in sbin.
+ sbin_SCRIPTS  = kea-admin
+--- a/src/bin/agent/Makefile.am
++++ b/src/bin/agent/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/d2/Makefile.am
++++ b/src/bin/d2/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp4/Makefile.am
++++ b/src/bin/dhcp4/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/dhcp6/Makefile.am
++++ b/src/bin/dhcp6/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/keactrl/Makefile.am
++++ b/src/bin/keactrl/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ # Install keactrl in sbin and the keactrl.conf required by the keactrl
+ # in etc. keactrl will look for its configuration file in the etc folder.
+--- a/src/bin/lfc/Makefile.am
++++ b/src/bin/lfc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/netconf/Makefile.am
++++ b/src/bin/netconf/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/perfdhcp/Makefile.am
++++ b/src/bin/perfdhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
+--- a/src/bin/shell/Makefile.am
++++ b/src/bin/shell/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ pkgpython_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py
+--- a/src/hooks/dhcp/high_availability/Makefile.am
++++ b/src/hooks/dhcp/high_availability/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/lease_cmds/Makefile.am
++++ b/src/hooks/dhcp/lease_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/stat_cmds/Makefile.am
++++ b/src/hooks/dhcp/stat_cmds/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/hooks/dhcp/user_chk/Makefile.am
++++ b/src/hooks/dhcp/user_chk/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiodns/Makefile.am
++++ b/src/lib/asiodns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/asiolink/Makefile.am
++++ b/src/lib/asiolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cc/Makefile.am
++++ b/src/lib/cc/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cfgrpt/Makefile.am
++++ b/src/lib/cfgrpt/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS  = $(KEA_CXXFLAGS)
+--- a/src/lib/config/Makefile.am
++++ b/src/lib/config/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/config_backend/Makefile.am
++++ b/src/lib/config_backend/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/cql/Makefile.am
++++ b/src/lib/cql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CQL_CPPFLAGS)
+--- a/src/lib/cryptolink/Makefile.am
++++ b/src/lib/cryptolink/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(CRYPTO_CFLAGS) $(CRYPTO_INCLUDES)
+--- a/src/lib/database/Makefile.am
++++ b/src/lib/database/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp/Makefile.am
++++ b/src/lib/dhcp/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcp_ddns/Makefile.am
++++ b/src/lib/dhcp_ddns/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/dhcpsrv/Makefile.am
++++ b/src/lib/dhcpsrv/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+-SUBDIRS = . testutils tests benchmarks
++SUBDIRS = . benchmarks
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ kea_lfc_location = @prefix@/sbin/kea-lfc
+--- a/src/lib/dns/Makefile.am
++++ b/src/lib/dns/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/eval/Makefile.am
++++ b/src/lib/eval/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/exceptions/Makefile.am
++++ b/src/lib/exceptions/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CXXFLAGS=$(KEA_CXXFLAGS)
+--- a/src/lib/hooks/Makefile.am
++++ b/src/lib/hooks/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/http/Makefile.am
++++ b/src/lib/http/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/Makefile.am
++++ b/src/lib/log/Makefile.am
+@@ -2,7 +2,6 @@ SUBDIRS = interprocess .
+ if !CROSS_COMPILING
+ SUBDIRS += compiler
+ endif
+-SUBDIRS += tests
+ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/log/interprocess/Makefile.am
++++ b/src/lib/log/interprocess/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += -DLOCKFILE_DIR=\"$(localstatedir)/run/$(PACKAGE_NAME)\"
+--- a/src/lib/mysql/Makefile.am
++++ b/src/lib/mysql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(MYSQL_CPPFLAGS)
+--- a/src/lib/pgsql/Makefile.am
++++ b/src/lib/pgsql/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(PGSQL_CPPFLAGS)
+--- a/src/lib/process/Makefile.am
++++ b/src/lib/process/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils tests
++SUBDIRS = .
+ dhcp_data_dir = @localstatedir@/@PACKAGE@
+ AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+ AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""
+--- a/src/lib/stats/Makefile.am
++++ b/src/lib/stats/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/Makefile.am
++++ b/src/lib/util/Makefile.am
+@@ -1,6 +1,6 @@
+ AUTOMAKE_OPTIONS = subdir-objects
+-SUBDIRS = . io unittests tests python threads
++SUBDIRS = . io python threads
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES)
+--- a/src/lib/util/threads/Makefile.am
++++ b/src/lib/util/threads/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . tests
++SUBDIRS = .
+ AM_CXXFLAGS = $(KEA_CXXFLAGS)
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+--- a/src/lib/yang/Makefile.am
++++ b/src/lib/yang/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = . testutils pretests tests
++SUBDIRS = .
+ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+ AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_CPPFLAGS)
diff --git a/net/keepalived/Config.in b/net/keepalived/Config.in
new file mode 100644 (file)
index 0000000..0cddf09
--- /dev/null
@@ -0,0 +1,164 @@
+if PACKAGE_keepalived
+
+menu "Configuration"
+
+config KEEPALIVED_BFD
+       bool
+       default n
+       prompt "Enable BFD support"
+       help
+               Builds support for BFD
+
+config KEEPALIVED_SHA1
+       bool
+       default y
+       prompt "Enable SHA1 support in genhash"
+       help
+               Builds support for using SHA1 with genhash
+
+config KEEPALIVED_LVS
+       bool
+       default y
+       prompt "Enable IPVS support"
+       help
+               Builds support for IPVS
+
+config KEEPALIVED_LVS_SYNCD
+       depends on KEEPALIVED_LVS
+       bool
+       default y
+       prompt "Enable IPVS syncd daemon control"
+       help
+               Builds support for configuring IPVS syncd daemon
+
+config KEEPALIVED_LVS_64BIT_STATS
+       depends on KEEPALIVED_LVS
+       bool
+       default y
+       prompt "Enable IPVS 64 bit stats"
+       help
+               Builds support for IPVS 64 bit stats
+
+config KEEPALIVED_FWMARK
+       depends on KEEPALIVED_LVS
+       bool
+       default y
+       prompt "Enable support for setting FWMARK on sockets"
+       help
+               Builds support for setting firewall mark on checker sockets
+
+config KEEPALIVED_SNMP_CHECKER
+       depends on KEEPALIVED_LVS
+       bool
+       default n
+       prompt "Enable SNMP support for checker (LVS)"
+       help
+               Builds support for using SNMP with LVS
+
+config KEEPALIVED_VRRP
+       bool
+       default y
+       prompt "Enable VRRP support"
+       help
+               Builds support for VRRP
+
+config KEEPALIVED_IPTABLES
+       depends on KEEPALIVED_VRRP
+       bool
+       default y
+       prompt "Enable iptables for VIP filtering"
+       help
+               Builds support for using iptables/ipsets for filtering packets
+               to VIPs
+
+config KEEPALIVED_SNMP_VRRP
+       depends on KEEPALIVED_VRRP
+       bool
+       default n
+       prompt "Enable SNMP support for VRRP"
+       help
+               Builds support for using SNMP with VRRP
+
+config KEEPALIVED_SNMP_RFC2
+       depends on KEEPALIVED_VRRP
+       bool
+       default n
+       prompt "Enable SNMP support for VRRPv2 (RFC2787)"
+       help
+               Builds support for using RFC2787 SNMP support for VRRPv2
+
+config KEEPALIVED_SNMP_RFC3
+       depends on KEEPALIVED_VRRP
+       bool
+       default n
+       prompt "Enable SNMP support for VRRPv3 (RFC6527)"
+       help
+               Builds support for using RFC6527 SNMP support for VRRPv3
+
+config KEEPALIVED_SNMP_REPLY_V3_FOR_V2
+       depends on KEEPALIVED_SNMP_RFC3
+       bool
+       default n
+       prompt "Enable SNMP v3 responses for VRRPv2 instances"
+       help
+               Builds support for using SNMP v3 responses for VRRPv2 instances
+
+config KEEPALIVED_DBUS
+       depends on KEEPALIVED_VRRP
+       bool
+       default n
+       prompt "Enable DBus support"
+       help
+               Builds support for using DBus with VRRP
+
+config KEEPALIVED_JSON
+       depends on KEEPALIVED_VRRP
+       bool
+       default n
+       prompt "Enable JSON support with VRRP"
+       help
+               Builds support for using JSON output for VRRP
+
+config KEEPALIVED_VRRP_AUTH
+       depends on KEEPALIVED_VRRP
+       bool
+       default y
+       prompt "Enable (removed) VRRPv2 authentication"
+       help
+               Builds support for using (removed) VRRPv2 authentication
+               Note: authentication was removed from the VRRPv2 specification
+               by RFC3768 in 2004.
+               Use of this option is non-compliant and can cause problems.
+               Avoid using if possible, except when using unicast, where it
+               can be helpful.
+
+config KEEPALIVED_CHECKSUM_COMPAT
+       depends on KEEPALIVED_VRRP
+       bool
+       default y
+       prompt "Enable checksum compatibility"
+       help
+               Builds support for interworking with instances using
+               old(incorrect) checksum method
+
+config KEEPALIVED_ROUTES
+       depends on KEEPALIVED_VRRP
+       bool
+       default y
+       prompt "Enable support for VRRP instances managing routes and rules"
+       help
+               Builds support for VRRP instances adding and removing IP
+               routes and rules
+
+config KEEPALIVED_LINKBEAT
+       depends on KEEPALIVED_VRRP
+       bool
+       default y
+       prompt "Enable support for linkbeat"
+       help
+               Builds support for using linkbeat polling to monitor the state
+               of interfaces
+
+endmenu
+
+endif # PACKAGE_keepalived
index a7acb6b166d99462a3c2c05109412cc05560c816..73196dd8283701566a3eaee4c239cfdb08236845 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=2.0.10
+PKG_VERSION:=2.0.15
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.keepalived.org/software
-PKG_HASH:=40e0e55afed9ca313d621a9c5878579696fafb5504dab521aadaf20ba6e7f597
+PKG_SOURCE_URL:=https://www.keepalived.org/software
+PKG_HASH:=933ee01bc6346aa573453b998f87510d3cce4aba4537c9642b24e6dbfba5c6f4
 
 PKG_CPE_ID:=cpe:/a:keepalived:keepalived
 PKG_LICENSE:=GPL-2.0+
@@ -21,30 +21,61 @@ PKG_LICENSE_FILES:=COPYING
 PKG_MAINTAINER:=Ben Kelly <ben@benjii.net> \
                Florian Eckert <fe@dev.tdt.de>
 
+PKG_CONFIG_DEPENDS += \
+       KEEPALIVED_VRRP \
+       KEEPALIVED_LVS \
+       KEEPALIVED_IPTABLES \
+       KEEPALIVED_BFD \
+       KEEPALIVED_SNMP_VRRP \
+       KEEPALIVED_SNMP_CHECKER \
+       KEEPALIVED_SNMP_RFC2 \
+       KEEPALIVED_SNMP_RFC3 \
+       KEEPALIVED_SNMP_REPLY_V3_FOR_V2 \
+       KEEPALIVED_DBUS \
+       KEEPALIVED_JSON \
+       KEEPALIVED_ROUTES \
+       IPV6
+
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk
 
+define Package/keepalived/config
+       source "$(SOURCE)/Config.in"
+endef
+
+# specifying +(IPV6&&KEEPALIVED_IPTABLES) in the DEPENDS definition doesn't work
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES)$(CONFIG_IPV6),yy)
+  KEEPALIVED_DEPENDS_LIBIP6TC=+libip6tc
+endif
+
+# The +kmod-nf-ipvs line should be +KEEPALIVED_LVS:kmod-nf-ipvs,
+# but make menuconfig then reports :error: recursive dependency detected!
+# !!FIXME DEPENDS:= +KEEPALIVED_LVS:kmod-nf-ipvs
 define Package/keepalived
   SECTION:=net
   CATEGORY:=Network
-  TITLE:=Failover and monitoring daemon for LVS clusters
+  TITLE:=VRRP with failover and monitoring daemon for LVS clusters
   URL:=http://www.keepalived.org/
   DEPENDS:= \
-    +libopenssl \
-    +libip4tc \
-    +IPV6:libip6tc \
-    +libxtables \
-    +kmod-macvlan \
+    +libnl-genl \
     +libmagic \
-    +libnl-route \
-    +libnfnetlink \
-    +kmod-nf-ipvs
+    +KEEPALIVED_VRRP:kmod-macvlan \
+    +KEEPALIVED_VRRP:libnl-route \
+    +KEEPALIVED_VRRP:libnfnetlink \
+    +KEEPALIVED_SHA1:libopenssl \
+    +KEEPALIVED_IPTABLES:libip4tc \
+    $(KEEPALIVED_DEPENDS_LIBIP6TC) \
+    +KEEPALIVED_IPTABLES:libxtables \
+    +KEEPALIVED_IPTABLES:libipset \
+    +(KEEPALIVED_SNMP_VRRP||KEEPALIVED_SNMP_CHECKER||KEEPALIVED_SNMP_RFC2||KEEPALIVED_SNMP_RFC3):libnetsnmp \
+    +KEEPALIVED_JSON:libjson-c \
+    +KEEPALIVED_DBUS:glib2
 endef
 
 define Package/keepalived/description
Failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
VRRP with failover and monitoring daemon for Linux Virtual Server (LVS) clusters.
 endef
 
 define Package/keepalived/conffiles
@@ -54,31 +85,182 @@ define Package/keepalived/conffiles
 endef
 
 CONFIGURE_ARGS+= \
-       --disable-libipset \
-       --disable-libnl \
-       --enable-sha1 \
-       --disable-snmp \
-       --with-kernel-dir="$(LINUX_DIR)/$(LINUX_UAPI_DIR)" \
-       --with-init=SYSV
+       --with-init=SYSV \
+       --disable-nftables
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),)
+CONFIGURE_ARGS += \
+       --disable-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),)
+CONFIGURE_ARGS += \
+       --disable-lvs
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_BFD),y)
+CONFIGURE_ARGS += \
+       --enable-bfd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SHA1),y)
+CONFIGURE_ARGS += \
+       --enable-sha1
+endif
+
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP),y)
+ifeq ($(CONFIG_KEEPALIVED_IPTABLES),)
+CONFIGURE_ARGS += \
+       --disable-iptables
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_IPSETS),)
+CONFIGURE_ARGS += \
+       --disable-libipset-dynamic
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_VRRP),y)
+CONFIGURE_ARGS += \
+       --enable-snmp-vrrp
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+CONFIGURE_ARGS += \
+       --enable-snmp-rfcv2
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+CONFIGURE_ARGS += \
+       --enable-snmp-rfcv3
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+ifeq ($(CONFIG_KEEPALIVED_SNMP_REPLY_V3_FOR_V2),)
+CONFIGURE_ARGS += \
+       --disable-snmp-reply-v3-for-v2
+endif
+endif # CONFIG_KEEPALIVED_SNMP_RFC3
+
+ifeq ($(CONFIG_KEEPALIVED_JSON),y)
+CONFIGURE_ARGS += \
+       --enable-json
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_VRRP_AUTH),)
+CONFIGURE_ARGS += \
+       --disable-vrrp-auth
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_CHECKSUM_COMPAT),)
+CONFIGURE_ARGS += \
+       --disable-checksum-compat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+CONFIGURE_ARGS += \
+       --enable-dbus
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LINKBEAT),)
+CONFIGURE_ARGS += \
+       --disable-linkbeat
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_ROUTES),)
+CONFIGURE_ARGS += \
+       --disable-routes
+endif
+endif # CONFIG_KEEPALIVED_VRRP
 
-MAKE_FLAGS += \
-               STRIP="/bin/true" \
+
+ifeq ($(CONFIG_KEEPALIVED_LVS),y)
+ifeq ($(CONFIG_KEEPALIVED_LVS_SYNCD),)
+CONFIGURE_ARGS += \
+       --disable-lvs-syncd
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_LVS_64BIT_STATS),)
+CONFIGURE_ARGS += \
+       --disable-lvs-64bit-stats
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_FWMARK),)
+CONFIGURE_ARGS += \
+       --disable-fwmark
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_CHECKER),y)
+CONFIGURE_ARGS += \
+       --enable-snmp-checker
+endif
+
+endif # CONFIG_KEEPALIVED_LVS
+
+
+MAKE_FLAGS += STRIP="/bin/true"
+TARGET_CFLAGS += -I$(LINUX_DIR)
 
 define Package/keepalived/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/keepalived $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/keepalived \
+               $(1)/usr/sbin/
+
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/genhash $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/genhash \
+               $(1)/usr/bin/
+
        $(INSTALL_DIR) $(1)/etc/keepalived
-       $(CP) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf $(1)/etc/keepalived/
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf \
+               $(1)/etc/keepalived/
+
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/keepalived.init $(1)/etc/init.d/keepalived
+       $(INSTALL_BIN) ./files/keepalived.init \
+               $(1)/etc/init.d/keepalived
+
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_CONF) ./files/keepalived.config $(1)/etc/config/keepalived
+       $(INSTALL_CONF) ./files/keepalived.config \
+               $(1)/etc/config/keepalived
+
        $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/keepalived.user $(1)/etc/keepalived.user
+       $(INSTALL_CONF) ./files/keepalived.user \
+               $(1)/etc/keepalived.user
+
        $(INSTALL_DIR) $(1)/etc/hotplug.d/keepalived
-       $(INSTALL_DATA) ./files/hotplug-user $(1)/etc/hotplug.d/keepalived/01-user
+       $(INSTALL_DATA) ./files/hotplug-user \
+               $(1)/etc/hotplug.d/keepalived/01-user
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER)$(CONFIG_KEEPALIVED_SNMP_RFC2)$(CONFIG_KEEPALIVED_SNMP_RFC3),)
+       $(INSTALL_DIR) $(1)/usr/share/snmp/mibs
+endif
+
+ifneq ($(CONFIG_KEEPALIVED_SNMP_VRRP)$(CONFIG_KEEPALIVED_SNMP_CHECKER),)
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt \
+               $(1)/usr/share/snmp/mibs/KEEPALIVED-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC2),y)
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRP-MIB.txt \
+               $(1)/usr/share/snmp/mibs/VRRP-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_SNMP_RFC3),y)
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/VRRPv3-MIB.txt \
+               $(1)/usr/share/snmp/mibs/VRRPv3-MIB.txt
+endif
+
+ifeq ($(CONFIG_KEEPALIVED_DBUS),y)
+       $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf \
+               $(1)/etc/dbus-1/system.d/org.keepalived.Vrrp1.conf
+
+       $(INSTALL_DIR) $(1)/usr/share/dbus-1/interfaces
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml \
+               $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml \
+               $(1)/usr/share/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml
+endif
+
 endef
 
 $(eval $(call BuildPackage,keepalived))
index 5fde1f89d5d2b521480f3e06b0e635782bfa1b5f..7c1975ad5a616f768c5a607e9ba07c4625af755a 100644 (file)
@@ -10,6 +10,7 @@ config global_defs
 #      option vrrp_mcast_group4        "224.0.0.18" # optional, default 224.0.0.18
 #      option vrrp_mcast_group6        "f02::12"    # optional, default ff02::12
 #      option linkbeat_use_polling     "1"
+#      option vrrp_startup_delay       "5"
 
 #config ipaddress
 #      option name     "ipaddress0"
index 70e0b7310b979f96e1c68d3c82052393c2346455..4e63711f480ee9458308b478f72c04441d206a5d 100644 (file)
@@ -105,8 +105,14 @@ global_defs() {
        config_get notification_email $1 notification_email
        print_list_indent notification_email
 
-       print_elems_indent $1 $INDENT_1 notification_email_from smtp_server smtp_connect_timeout \
-                  router_id vrrp_mcast_group4 vrrp_mcast_group6
+       print_elems_indent $1 $INDENT_1 \
+               notification_email_from \
+               smtp_server \
+               smtp_connect_timeout \
+               router_id \
+               vrrp_mcast_group4 \
+               vrrp_mcast_group6 \
+               vrrp_startup_delay
 }
 
 print_ipaddress_indent() {
index ed740f06c4e48b170690b009322c330c3762936e..0d74f6868f9d620bd4dac87c96b757e24b60b58d 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knot
-PKG_VERSION:=2.8.0
+PKG_VERSION:=2.8.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=494ad926705018bd754d96711dc2129f3173f326a0b57d33978090ba4eef87ef
+PKG_HASH:=b21bf03e5cb6804df4e0e8b3898446349e86ddae5bf110edaf240d0ad1e2a2c6
 
 PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
 PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
@@ -144,6 +144,8 @@ define Package/knot-tests/description
        Usage: /usr/share/knot/runtests.sh
 endef
 
+export KNOT_VERSION_FORMAT=release
+
 CONFIGURE_ARGS +=                      \
        --enable-recvmmsg=no            \
        --disable-fastparser            \
index fd1e86b37d630bb375c330eec17b9581b7f5cee1..d72e29d2e77a380bba8503d8801f2a17ed05a864 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=krb5
 PKG_VERSION:=1.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -50,6 +50,12 @@ define Package/krb5-server
        TITLE:=Kerberos 5 Server
 endef
 
+define Package/krb5-server-extras
+       $(call Package/krb5/Default)
+       DEPENDS:=+krb5-libs +libpthread
+       TITLE:=Kerberos 5 Admin Server
+endef
+
 define Package/krb5-client
        $(call Package/krb5/Default)
        DEPENDS:=+krb5-libs
@@ -124,22 +130,25 @@ endef
 define Package/krb5-server/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/krb5kdc $(1)/etc/init.d/krb5kdc
-#      $(INSTALL_DIR) $(1)/usr/bin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sclient $(1)/usr/bin
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmin.local $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kdb5_util $(1)/usr/sbin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/krb5kdc $(1)/usr/sbin
-#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
+endef
+
+define Package/krb5-server-extras/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kadmind $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kprop $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/kpropd $(1)/usr/sbin
 endef
 
 define Package/krb5-server/postinst
+mkdir -p $${IPKG_INSTROOT}/etc/krb5kdc
 touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl
 endef
 
 $(eval $(call BuildPackage,krb5-libs))
 $(eval $(call BuildPackage,krb5-server))
+$(eval $(call BuildPackage,krb5-server-extras))
 $(eval $(call BuildPackage,krb5-client))
index dec7188e9b01e32f03b5fafbd300ce7780a182e4..fd428c933e46f235246905ad1f0a41b5f2511edc 100644 (file)
@@ -10,10 +10,10 @@ start() {
        [ -f /etc/krb5kdc/principal ] || ( echo; echo ) | kdb5_util create -s
        
        /usr/sbin/krb5kdc
-       /usr/sbin/kadmind
+       [ -x /usr/sbin/kadmind ] && /usr/sbin/kadmind
 }
 
 stop() {
        killall krb5kdc 2> /dev/null
-       killall kadmind 2> /dev/null
+       [ -x /usr/sbin/kadmind ] && killall kadmind 2> /dev/null
 }
index bc23b86224ceaca979d750600f99e9a0d3afad38..f56d4a9a213a719fb5d25cf27479099da12d30f4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lcdringer
 PKG_VERSION:=0.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 
@@ -23,6 +23,7 @@ PKG_BUILD_DEPENDS:=vala
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
diff --git a/net/lcdringer/patches/010-disable-check.patch b/net/lcdringer/patches/010-disable-check.patch
new file mode 100644 (file)
index 0000000..b079609
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,9 +87,6 @@ fi
+ AC_SUBST(GSTREAMER_CFLAGS)
+ AC_SUBST(GSTREAMER_LIBS)
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],have_check=yes,have_check=no)
+-AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+-
+ AM_PROG_VALAC([0.11.4])
+ AM_CONDITIONAL(HAVE_VALAC, test -x "$VALAC")
diff --git a/net/libreswan/Makefile b/net/libreswan/Makefile
new file mode 100644 (file)
index 0000000..606e4c1
--- /dev/null
@@ -0,0 +1,110 @@
+#
+# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libreswan
+PKG_VERSION:=3.27
+PKG_RELEASE:=3
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://download.libreswan.org/
+PKG_HASH:=ead07dd701116094b483dc57e54e2a5ee9a06d3982bb142260bcbf3d1faf7b82
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libreswan/Default
+  TITLE:=Libreswan
+  URL:=https://libreswan.org/
+endef
+
+define Package/libreswan/Default/description
+ Libreswan is a free software implementation of the most widely supported and
+ standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
+ ("IKE"). These standards are produced and maintained by the Internet
+ Engineering Task Force ("IETF").
+endef
+
+define Package/libreswan
+$(call Package/libreswan/Default)
+  SUBMENU:=VPN
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:= +libnss +librt +libevent2 +libevent2-pthreads +kmod-crypto-authenc \
+       +kmod-crypto-hash +kmod-ipt-ipsec +iptables-mod-ipsec +ip-full +kmod-ip-vti \
+       +kmod-ipsec +kmod-ipsec4 +kmod-crypto-rng +IPV6:kmod-ipsec6 +IPV6:kmod-ip6-vti
+  PROVIDES:=openswan
+  CONFLICTS:=strongswan
+  TITLE+= IPsec Server
+endef
+
+define Package/libreswan/description
+$(call Package/libreswan/Default/description)
+ Libreswan is a free software implementation of the most widely supported and
+ standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
+ ("IKE"). These standards are produced and maintained by the Internet
+ Engineering Task Force ("IETF").
+endef
+
+define Package/libreswan/conffiles
+/etc/ipsec.d
+/etc/ipsec.conf
+/etc/ipsec.secrets
+endef
+
+TARGET_CFLAGS+= -Wno-error=format-nonliteral
+MAKE_FLAGS+= \
+    WERROR_CFLAGS=" " \
+    USE_DNSSEC=false \
+    USE_LINUX_AUDIT=false \
+    USE_LABELED_IPSEC=false \
+    USE_NM=false \
+    USE_LIBCURL=false \
+    USE_GLIBC_KERN_FLIP_HEADERS=true \
+    USE_XAUTHPAM=false \
+    USE_FIPSCHECK=false \
+    USE_LIBCAP_NG=false \
+    USE_SYSTEMD_WATCHDOG=false \
+    INC_USRLOCAL="/usr" \
+    FINALRUNDIR="/var/run/pluto" \
+    ARCH="$(LINUX_KARCH)" \
+    KERNELSRC="$(LINUX_DIR)"
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(SED) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \
+            $(PKG_BUILD_DIR)/mk/program.mk
+endef
+
+define Build/Compile
+       $(call Build/Compile/Default,all)
+endef
+
+define Package/libreswan/install
+       $(INSTALL_DIR) \
+        $(1)/etc/init.d \
+        $(1)/etc/ipsec.d/policies \
+        $(1)/usr/libexec/ipsec \
+        $(1)/usr/sbin
+
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec  \
+           $(1)/usr/sbin/ipsec
+       $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
+       $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
+       $(INSTALL_DATA) ./files/ipsec.secrets $(1)/etc/ipsec.secrets
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ipsec.d/policies/* \
+            $(1)/etc/ipsec.d/policies/
+       $(CP) $(PKG_INSTALL_DIR)/usr/libexec/ipsec/* \
+           $(1)/usr/libexec/ipsec/
+endef
+
+$(eval $(call BuildPackage,libreswan))
diff --git a/net/libreswan/files/ipsec.conf b/net/libreswan/files/ipsec.conf
new file mode 100644 (file)
index 0000000..8b7493b
--- /dev/null
@@ -0,0 +1,25 @@
+config setup
+    # needed when using PSK only. Not needed for X.509 based servers
+    uniqueids=no
+    virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v4:!100.64.0.0/24
+
+conn ikev1
+    authby=secret
+    pfs=no
+    auto=add
+    rekey=no
+    left=%defaultroute
+    right=%any
+    ikev2=never
+    type=transport
+    leftprotoport=17/1701
+    rightprotoport=17/%any
+    dpddelay=15
+    dpdtimeout=30
+    dpdaction=clear
+
+conn ikev1-nat
+    also=ikev1
+    rightsubnet=vhost:%priv
+
+# include /etc/ipsec.d/*.conf
diff --git a/net/libreswan/files/ipsec.init b/net/libreswan/files/ipsec.init
new file mode 100755 (executable)
index 0000000..6e30263
--- /dev/null
@@ -0,0 +1,207 @@
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=10
+
+#USE_PROCD=1
+
+. $IPKG_INSTROOT/lib/functions.sh
+
+EXTRA_COMMANDS=status
+EXTRA_HELP="   status  Show the status of the service"
+
+# Check that networking is up.
+[ "${NETWORKING}" = "no" ] && exit 6
+
+if [ $(id -u) -ne 0 ]; then
+    echo "permission denied (must be superuser)" | \
+       logger -s -p daemon.error -t ipsec_setup 2>&1
+    exit 4
+fi
+
+# where the private directory and the config files are
+IPSEC_EXECDIR="${IPSEC_EXECDIR-/usr/libexec/ipsec}"
+IPSEC_SBINDIR="${IPSEC_SBINDIR-/usr/sbin}"
+IPSEC_CONF="${IPSEC_CONF-/etc/ipsec.conf}"
+unset PLUTO_OPTIONS
+
+rundir=/var/run/pluto
+plutopid=${rundir}/pluto.pid
+plutoctl=${rundir}/pluto.ctl
+lockdir=/var/lock
+lockfile=${lockdir}/ipsec
+ipsecversion=/proc/net/ipsec_version
+kamepfkey=/proc/net/pfkey
+
+# /etc/resolv.conf related paths
+LIBRESWAN_RESOLV_CONF=${rundir}/libreswan-resolv-conf-backup
+ORIG_RESOLV_CONF=/etc/resolv.conf
+
+# misc setup
+umask 022
+
+# standardize PATH, and export it for everything else's benefit
+PATH="${IPSEC_SBINDIR}":/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
+export PATH
+
+mkdir -p ${rundir}
+chmod 700 ${rundir}
+
+verify_config() {
+       [ -f ${IPSEC_CONF} ] || exit 6
+       config_error=$(ipsec addconn --config ${IPSEC_CONF} --checkconfig 2>&1)
+       RETVAL=$?
+       if [ ${RETVAL} -gt 0 ]; then
+               echo "Configuration error - the following error occurred:"
+               echo ${config_error}
+               echo "IKE daemon status was not modified"
+               exit ${RETVAL}
+       fi
+}
+
+start() {
+       echo -n "Starting pluto IKE daemon for IPsec: "
+       ipsec _stackmanager start
+       # pluto searches the current directory, so this is required for making it selinux compliant
+       cd /
+       # Create nss db or convert from old format to new sql format
+       ipsec --checknss
+       # Enable nflog if configured
+       ipsec --checknflog > /dev/null
+       # This script will enter an endless loop to ensure pluto restarts on crash
+       ipsec _plutorun --config ${IPSEC_CONF} --nofork ${PLUTO_OPTIONS} & [ -d ${lockdir} ] || mkdir -p ${lockdir}
+       touch ${lockfile}
+       # Because _plutorun starts pluto at background we need to make sure pluto is started
+       # before we know if start was successful or not
+       for waitsec in 1 2 3 4 5; do
+           if status >/dev/null; then
+               RETVAL=0
+               break
+               else
+               echo -n "."
+               sleep 1
+               RETVAL=1
+           fi
+       done
+       if [ ${RETVAL} -ge 1 ]; then
+           rm -f ${lockfile}
+       fi
+       echo
+       return ${RETVAL}
+}
+
+stop() {
+    if [ -e ${plutoctl} ]; then
+       echo "Shutting down pluto IKE daemon"
+       ipsec whack --shutdown 2>/dev/null
+       # don't use seq, might not exist on embedded
+       for waitsec in 1 2 3 4 5 6 7 8 9 10; do
+           if [ -s ${plutopid} ]; then
+               echo -n "."
+               sleep 1
+           else
+               break
+           fi
+       done
+       echo
+       rm -f ${plutoctl} # we won't be using this anymore
+    fi
+    if [ -s ${plutopid} ]; then
+       # pluto did not die peacefully
+       pid=$(cat ${plutopid})
+       if [ -d /proc/${pid} ]; then
+           kill -TERM ${pid}
+           RETVAL=$?
+           sleep 5;
+           if [ -d /proc/${pid} ]; then
+               kill -KILL ${pid}
+               RETVAL=$?
+           fi
+           if [ ${RETVAL} -ne 0 ]; then
+               echo "Kill failed - removing orphaned ${plutopid}"
+           fi
+       else
+           echo "Removing orphaned ${plutopid}"
+       fi
+       rm -f ${plutopid}
+    fi
+
+    ipsec _stackmanager stop
+    ipsec --stopnflog > /dev/null
+
+    # cleaning up backup resolv.conf
+    if [ -e ${LIBRESWAN_RESOLV_CONF} ]; then
+       if grep 'Libreswan' ${ORIG_RESOLV_CONF} > /dev/null 2>&1; then
+           cp ${LIBRESWAN_RESOLV_CONF} ${ORIG_RESOLV_CONF}
+       fi
+       rm -f  ${LIBRESWAN_RESOLV_CONF}
+    fi
+
+    rm -f ${lockfile}
+    return ${RETVAL}
+}
+
+restart() {
+    verify_config
+    stop
+    start
+    return $?
+}
+
+status() {
+    local RC
+    if [ -f ${plutopid} ]; then
+       if [ -r ${plutopid} ]; then
+           pid=$(cat ${plutopid})
+           if [ -n "$pid" -a -d /proc/${pid} ]; then
+               RC=0    # running
+           else
+               RC=1    # not running but pid exists
+           fi
+       else
+           RC=4        # insufficient privileges
+       fi
+    fi
+    if [ -z "${RC}" ]; then
+       if [ -f ${lockfile} ]; then
+           RC=2
+       else
+           RC=3
+       fi
+    fi
+    case "${RC}" in
+       0)
+           echo "ipsec: pluto (pid ${pid}) is running..."
+           return 0
+           ;;
+       1)
+           echo "ipsec: pluto dead but pid file exits"
+           return 1
+           ;;
+       2)
+           echo "ipsec: pluto dead but subsys locked"
+           return 2
+           ;;
+       4)
+           echo "ipsec: pluto status unknown due to insufficient privileges."
+           return 4
+           ;;
+    esac
+    echo "ipsec: pluto is stopped"
+    return 3
+}
+
+condrestart() {
+    verify_config
+    RETVAL=$?
+    if [ -f ${lockfile} ]; then
+       restart
+       RETVAL=$?
+    fi
+    return ${RETVAL}
+}
+
+version() {
+    ipsec version
+    return $?
+}
diff --git a/net/libreswan/files/ipsec.secrets b/net/libreswan/files/ipsec.secrets
new file mode 100644 (file)
index 0000000..5ef87b0
--- /dev/null
@@ -0,0 +1,10 @@
+# Unlike older openswan, this file does NOT contain any X.509 related
+# information such as private key :RSA statements as these now reside
+# in the NSS database. See:
+#
+# https://libreswan.org/wiki/Using_NSS_with_libreswan
+# https://libreswan.org/wiki/Migrating_from_Openswan
+
+# A.B.C.D %any : PSK "SsEeCcRrEeTt"
+: PSK "SsEeCcRrEeTt"
+# include /etc/ipsec.d/*.secrets
diff --git a/net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch b/net/libreswan/patches/001-move_kernel_klips_to_mk_kernel.mk.patch
new file mode 100644 (file)
index 0000000..0cca6c3
--- /dev/null
@@ -0,0 +1,973 @@
+From 010a9f2bbdaa97024933be04eff1a48ff1f9b657 Mon Sep 17 00:00:00 2001
+From: Andrew Cagney <cagney@gnu.org>
+Date: Thu, 25 Oct 2018 21:00:59 -0400
+Subject: [PATCH] building: move kernel (klips) rules to mk/kernel.mk
+
+---
+ Makefile     | 448 +-----------------------------------------------
+ mk/kernel.mk | 468 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 474 insertions(+), 442 deletions(-)
+ create mode 100644 mk/kernel.mk
+
+diff --git a/Makefile b/Makefile
+index b706defd0f..0b070966e6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -97,119 +97,14 @@ KERNELREL=$(shell ${KVSHORTUTIL} ${KERNELSRC}/Makefile)
+ # directories visited by all recursion
+-# declaration for make's benefit
+-.PHONY:       def insert kpatch patches _patches _patches2.4 \
+-      klipsdefaults programs man install \
+-      precheck verset confcheck kernel \
+-      module module24 module26 kinstall minstall minstall24 minstall26 \
+-      moduleclean mod24clean module24clean mod26clean module26clean \
+-      backup unpatch uninstall \
+-      check \
+-
+-kpatch: unapplypatch applypatch klipsdefaults
+-npatch: unapplynpatch applynpatch
+-sarefpatch: unapplysarefpatch applysarefpatch
+-
+-unapplypatch:
+-      @echo "info: making unapplypatch in `pwd` and KERNELSRC=\"${KERNELSRC}\";"
+-      -@if [ -f ${KERNELSRC}/libreswan.patch ]; then \
+-              echo Undoing previous patches; \
+-              cat ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
+-      fi
+-
+-applypatch:
+-      @echo "info: Now performing forward patches in `pwd`";
+-      ${MAKE} kernelpatch${KERNELREL} | tee ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
+-
+-unapplynpatch:
+-      @echo "info: making unapplynpatch (note the second N) in `pwd`";
+-      -@if [ -f ${KERNELSRC}/natt.patch ]; then \
+-              echo Undoing previous NAT patches; \
+-              cat ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
+-      fi
+-
+-applynpatch:
+-      @echo "info: Now performing forward NAT patches in `pwd`";
+-      ${MAKE} nattpatch${KERNELREL} | tee ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
+-
+-unapplysarefpatch:
+-      @echo "info: making unapplysarefpatch in `pwd`";
+-      -@if [ -f ${KERNELSRC}/saref.patch ]; then \
+-              echo Undoing previous saref patches; \
+-              cat ${KERNELSRC}/saref.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preng --reverse --ignore-whitespace ); \
+-      fi
+-
+-applysarefpatch:
+-      @echo "info: Now performing SAref patches in `pwd`";
+-      ${MAKE} sarefpatch${KERNELREL} | tee ${KERNELSRC}/klipsng.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preng --forward --ignore-whitespace )
+-
+-# patch kernel
+-PATCHER=packaging/utils/patcher
+-
+-_patches:
+-      echo "===============" >>out.kpatch
+-      echo "`date` `cd $(KERNELSRC) ; pwd`" >>out.kpatch
+-      $(MAKE) __patches$(KERNELREL) >>out.kpatch
+-
+-# Linux-2.4.0 version
+-__patches2.4:
+-      @$(PATCHER) -v -c $(KERNELSRC) Documentation/Configure.help \
+-              'CONFIG_KLIPS' $(PATCHES)/Documentation/Configure.help.fs2_2.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/Config.in \
+-              'CONFIG_KLIPS' $(PATCHES)/net/Config.in.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/Makefile \
+-              'CONFIG_KLIPS' $(PATCHES)/net/Makefile.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/ipv4/af_inet.c \
+-              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/af_inet.c.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) net/ipv4/udp.c \
+-              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/udp.c.fs2_4.patch
+-      @$(PATCHER) -v $(KERNELSRC) include/net/sock.h \
+-              'CONFIG_KLIPS' $(PATCHES)/include/net/sock.h.fs2_4.patch
+-# Removed patches, will unpatch automatically.
+-      @$(PATCHER) -v $(KERNELSRC) include/linux/proc_fs.h
+-      @$(PATCHER) -v $(KERNELSRC) net/core/dev.c
+-      @$(PATCHER) -v $(KERNELSRC) net/ipv4/protocol.c
+-      @$(PATCHER) -v $(KERNELSRC) drivers/net/Space.c
+-      @$(PATCHER) -v $(KERNELSRC) include/linux/netlink.h
+-      @$(PATCHER) -v $(KERNELSRC) net/netlink/af_netlink.c
+-      @$(PATCHER) -v $(KERNELSRC) net/netlink/netlink_dev.c
+-      @$(PATCHER) -v $(KERNELSRC) drivers/isdn/isdn_net.c
+-
+-klipsdefaults:
+-      @KERNELDEFCONFIG=$(KERNELSRC)/arch/$(ARCH)/defconfig ; \
+-      KERNELCONFIG=$(KCFILE) ; \
+-      if ! egrep -q 'CONFIG_KLIPS' $$KERNELDEFCONFIG ; \
+-      then \
+-              set -x ; \
+-              cp -a $$KERNELDEFCONFIG $$KERNELDEFCONFIG.orig ; \
+-              chmod u+w $$KERNELDEFCONFIG ; \
+-              cat $$KERNELDEFCONFIG $(KERNELKLIPS)/defconfig \
+-                      >$$KERNELDEFCONFIG.tmp ; \
+-              rm -f $$KERNELDEFCONFIG ; \
+-              cp -a $$KERNELDEFCONFIG.tmp $$KERNELDEFCONFIG ; \
+-              rm -f $$KERNELDEFCONFIG.tmp ; \
+-      fi ; \
+-      if ! egrep -q 'CONFIG_KLIPS' $$KERNELCONFIG ; \
+-      then \
+-              set -x ; \
+-              cp -a $$KERNELCONFIG $$KERNELCONFIG.orig ; \
+-              chmod u+w $$KERNELCONFIG ; \
+-              cat $$KERNELCONFIG $(KERNELKLIPS)/defconfig \
+-                      >$$KERNELCONFIG.tmp ; \
+-              rm -f $$KERNELCONFIG ; \
+-              cp -a $$KERNELCONFIG.tmp $$KERNELCONFIG ; \
+-              rm -f $$KERNELCONFIG.tmp ; \
+-      fi
+-
+-
+-
+ # programs
+ ABSOBJDIR:=$(shell mkdir -p ${OBJDIR}; cd ${OBJDIR} && pwd)
+ OBJDIRTOP=${ABSOBJDIR}
+ # Recursive clean dealt with elsewhere.
+-local-clean-base: moduleclean
++.PHONY: local-clean-base
++local-clean-base:
+       $(foreach file,$(RPMTMPDIR) $(RPMDEST) out.*build out.*install, \
+               rm -rf $(file) ; )      # but leave out.kpatch
+@@ -219,339 +114,13 @@ local-clean-base: moduleclean
+ # $(OBJDIR), "distclean" does not depend on it.  If it did, "make
+ # distclean" would have the quirky behaviour of first creating
+ # $(OBJDIR) only to then delete it.
+-distclean: moduleclean module24clean module26clean clean-kvm-keys
++.PHONY: distclean
++distclean: clean-kvm-keys
+       rm -f $(RPMTMPDIR) $(RPMDEST) out.*
+       rm -rf testing/pluto/*/OUTPUT*
+       rm -rf OBJ.* $(OBJDIR)
+       rm -rf BACKUP
+-# proxies for major kernel make operations
+-
+-# do-everything entries
+-KINSERT_PRE=precheck verset insert
+-PRE=precheck verset kpatch
+-POST=confcheck programs kernel install
+-MPOST=confcheck programs module install
+-
+-# preliminaries
+-precheck:
+-      @if test ! -d $(KERNELSRC) -a ! -L $(KERNELSRC) ; \
+-      then \
+-              echo '*** cannot find directory "$(KERNELSRC)"!!' ; \
+-              echo '*** may be necessary to add symlink to kernel source' ; \
+-              exit 1 ; \
+-      fi
+-      @if ! cd $(KERNELSRC) ; \
+-      then \
+-              echo '*** cannot "cd $(KERNELSRC)"!!' ; \
+-              echo '*** may be necessary to add symlink to kernel source' ; \
+-              exit 1 ; \
+-      fi
+-      @if test ! -f $(KCFILE) ; \
+-      then \
+-              echo '*** cannot find "$(KCFILE)"!!' ; \
+-              echo '*** perhaps kernel has never been configured?' ; \
+-              echo '*** please do that first; the results are necessary.' ; \
+-              exit 1 ; \
+-      fi
+-      @if test ! -f $(VERFILE) ; \
+-      then \
+-              echo '*** cannot find "$(VERFILE)"!!' ; \
+-              echo '*** perhaps kernel has never been compiled?' ; \
+-              echo '*** please do that first; the results are necessary.' ; \
+-              exit 1 ; \
+-      fi
+-
+-# configuring (exit statuses disregarded, something fishy here sometimes)
+-xcf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) xconfig
+-mcf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) menuconfig
+-pcf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) config
+-
+-ocf:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig
+-
+-rcf:
+-      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) ${NONINTCONFIG} </dev/null
+-      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) dep >/dev/null
+-
+-kclean:
+-      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) clean
+-
+-confcheck:
+-      @if test ! -f $(KCFILE) ; \
+-      then echo '*** no kernel configuration file written!!' ; exit 1 ; \
+-      fi
+-      @if ! egrep -q '^CONFIG_KLIPS=[my]' $(KCFILE) ; \
+-      then echo '*** IPsec not in kernel config ($(KCFILE))!!' ; exit 1 ; \
+-      fi
+-      @if ! egrep -q 'CONFIG_KLIPS[   ]+1' $(ACFILE) && \
+-              ! egrep -q 'CONFIG_KLIPS_MODULE[        ]+1' $(ACFILE) ; \
+-      then echo '*** IPsec in kernel config ($(KCFILE)),' ; \
+-              echo '***       but not in config header file ($(ACFILE))!!' ; \
+-              exit 1 ; \
+-      fi
+-      @if egrep -q '^CONFIG_KLIPS=m' $(KCFILE) && \
+-              ! egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
+-      then echo '*** IPsec configured as module in kernel with no module support!!' ; exit 1 ; \
+-      fi
+-      @if ! egrep -q 'CONFIG_KLIPS_AH[        ]+1' $(ACFILE) && \
+-              ! egrep -q 'CONFIG_KLIPS_ESP[   ]+1' $(ACFILE) ; \
+-      then echo '*** IPsec configuration must include AH or ESP!!' ; exit 1 ; \
+-      fi
+-
+-# kernel building, with error checks
+-kernel:
+-      rm -f out.kbuild out.kinstall
+-      # undocumented kernel folklore: clean BEFORE dep.
+-      # we run make dep separately, because there is no point in running ERRCHECK
+-      # on the make dep output.
+-      # see LKML thread "clean before or after dep?"
+-      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNCLEAN) $(KERNDEP) )
+-      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNEL) ) 2>&1 | tee out.kbuild
+-      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
+-      then set -x ; \
+-              ( cd $(KERNELSRC) ; \
+-              $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
+-      fi
+-      ${ERRCHECK} out.kbuild
+-
+-# module-only building, with error checks
+-ifneq ($(strip $(MOD24BUILDDIR)),)
+-${MOD24BUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make
+-      mkdir -p ${MOD24BUILDDIR}
+-      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make ${MOD24BUILDDIR}/Makefile
+-
+-module:
+-      @if [ -f ${KERNELSRC}/README.libreswan-2 ] ; then \
+-                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with libreswan-2, out of tree build might fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/README.openswan ] ; then \
+-                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan, out of tree build might fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/README.openswan-2 ] ; then \
+-                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan-2, out of tree build might fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/README.freeswan ] ; then \
+-                echo "ERROR: Kernel source ${KERNELSRC} has already been patched with freeswan, out of tree build will fail!"; \
+-        fi;
+-      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
+-                echo "Building module for a 2.4 kernel"; ${MAKE} module24 ; \
+-        else echo "Building module for a 2.6 kernel"; ${MAKE} module26; \
+-        fi;
+-
+-modclean moduleclean:
+-      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
+-              echo "Cleaning module for a 2.4 kernel"; ${MAKE} module24clean ; \
+-      else echo "Cleaning module for a 2.6 kernel"; ${MAKE} module26clean; \
+-      fi;
+-
+-module24:
+-      @if [ ! -f ${KERNELSRC}/Rules.make ] ; then \
+-                echo "Warning: Building for a 2.4 kernel in what looks like a 2.6 tree"; \
+-        fi ; \
+-        ${MAKE} ${MOD24BUILDDIR}/Makefile
+-      ${MAKE} -C ${MOD24BUILDDIR}  LIBRESWANSRCDIR=${LIBRESWANSRCDIR} ARCH=${ARCH} V=${V} ${MODULE_FLAGS} MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} TOPDIR=${KERNELSRC} -f Makefile ipsec.o
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-      @echo 'KLIPS24 module built successfully. '
+-      @echo ipsec.o is in ${MOD24BUILDDIR}
+-      @echo
+-      @(cd ${MOD24BUILDDIR}; ls -l ipsec.o)
+-      @(cd ${MOD24BUILDDIR}; size ipsec.o)
+-      @echo
+-      @echo 'use make minstall as root to install it'
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-
+-mod24clean module24clean:
+-      rm -rf ${MOD24BUILDDIR}
+-
+-#autoodetect 2.4 and 2.6
+-module_install minstall install-module:
+-      @if [ -f $(KERNELSRC)/Rules.make ] ; then \
+-                $(MAKE) minstall24 ; \
+-      else \
+-              $(MAKE) minstall26 ; \
+-        fi;
+-
+-# Extract the value of MODLIB from the output of $(MAKE).  Also hide
+-# the sup-process $(MAKE) so that GNU Make doesn't always invoke the
+-# target ("make -n" ignored).
+-#
+-# If $(MAKE) directly appears in a target (for instance in minstall26)
+-# then GNU Make will assume that it is a recursive make invocation and
+-# invoke the target regardless of -n.
+-#
+-# XXX: minstall24 should also use this.
+-
+-osmodlib-from-make = \
+-      OSMODLIB=$$($(MAKE) $(1) 2>/dev/null | sed -n -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/p' | head -1) ; \
+-      test -z "$$OSMODLIB" || echo "OSMODLIB=$$OSMODLIB ($(MAKE) $(1))"
+-
+-# module-only install, with error checks
+-minstall24:
+-      ( OSMODLIB=`${MAKE} -C $(KERNELSRC) -p dummy | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              OSMODLIB=`${MAKE} -C $(KERNELSRC) -n -p modules_install | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
+-      fi ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              echo "No known place to install module. Aborting." ; \
+-              exit 93 ; \
+-      fi ; \
+-      set -x ; \
+-      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      cp $(MOD24BUILDDIR)/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      if [ -f /sbin/depmod ] ; then /sbin/depmod -a ; fi; \
+-      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
+-        mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-                if [ -f $$OSMODLIB/kernel/ipsec.o -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ] ; then \
+-                        echo "WARNING: two ipsec.o modules found in $$OSMODLIB/kernel:" ; \
+-                        ls -l $$OSMODLIB/kernel/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ; \
+-                        exit 1; \
+-                fi ; \
+-        fi ; \
+-        set -x ) ;
+-
+-
+-else
+-module:
+-      echo 'Building in place is no longer supported. Please set MOD24BUILDDIR='
+-      exit 1
+-
+-endif
+-
+-# module-only building, with error checks
+-ifneq ($(strip $(MODBUILDDIR)),)
+-${MODBUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module.make
+-      mkdir -p ${MODBUILDDIR}
+-      echo ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/*.S ${MODBUILDDIR}
+-      (rm -f ${MODBUILDDIR}/des; mkdir -p ${MODBUILDDIR}/des && cd ${MODBUILDDIR}/des && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/* . && ln -s -f Makefile.fs2_6 Makefile)
+-      (rm -f ${MODBUILDDIR}/aes; mkdir -p ${MODBUILDDIR}/aes && cd ${MODBUILDDIR}/aes && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/aes/* . && ln -s -f Makefile.fs2_6 Makefile)
+-      mkdir -p ${MODBUILDDIR}/aes
+-      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module.make ${MODBUILDDIR}/Makefile
+-      ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/match*.S ${MODBUILDDIR}
+-
+-module26:
+-      @if [ -f ${KERNELSRC}/Rules.make ] ; then \                 echo "Warning: Building for a 2.6+ kernel in what looks like a 2.4 tree"; \
+-        fi ; \
+-        ${MAKE}  ${MODBUILDDIR}/Makefile
+-      ${MAKE} -C ${KERNELSRC} ${KERNELBUILDMFLAGS} BUILDDIR=${MODBUILDDIR} SUBDIRS=${MODBUILDDIR} INITSYSTEM=$(INITSYSTEM) MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} MODULE_DEFCONFIG=${MODULE_DEFCONFIG}  MODULE_EXTRA_INCLUDE=${MODULE_EXTRA_INCLUDE} ARCH=${ARCH} V=${V} modules
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-      @echo 'KLIPS module built successfully. '
+-      @echo ipsec.ko is in ${MODBUILDDIR}
+-      @echo
+-      @(cd ${MODBUILDDIR}; ls -l ipsec.ko)
+-      @(cd ${MODBUILDDIR}; size ipsec.ko)
+-      @echo
+-      @echo 'use make minstall as root to install it'
+-      @echo
+-      @echo '========================================================='
+-      @echo
+-
+-mod26clean module26clean:
+-      rm -rf ${MODBUILDDIR}
+-
+-# module-only install, with error checks
+-minstall26:
+-      $(call osmodlib-from-make,-C $(KERNELSRC) -p help) ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              $(call osmodlib-from-make,-C $(KERNELSRC) -n -p modules_install) ; \
+-      fi ; \
+-      if [ -z "$$OSMODLIB" ] ; then \
+-              echo "No known place to install module. Aborting." ; \
+-              exit 93 ; \
+-      fi ; \
+-      set -x ; \
+-      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      cp $(MODBUILDDIR)/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-      if [ -f /sbin/depmod ] ; then \
+-              /sbin/depmod -a ; \
+-      fi ; \
+-      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
+-              mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
+-              if [ -f $$OSMODLIB/kernel/ipsec.ko -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ] ; then \
+-                      echo "WARNING: two ipsec.ko modules found in $$OSMODLIB/kernel:" ; \
+-                      ls -l $$OSMODLIB/kernel/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ; \
+-                      exit 1; \
+-              fi ; \
+-      fi
+-
+-
+-else
+-module26:
+-      echo 'Building in place is no longer supported. Please set MODBUILDDIR='
+-      exit 1
+-
+-endif
+-
+-# kernel install, with error checks
+-kinstall:
+-      rm -f out.kinstall
+-      >out.kinstall
+-      # undocumented kernel folklore: modules_install must precede install (observed on RHL8.0)
+-      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
+-      then set -x ; \
+-              ( cd $(KERNELSRC) ; \
+-              $(MAKE) $(KERNMAKEOPTS) modules_install 2>&1 ) | tee -a out.kinstall ; \
+-      fi
+-      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) install ) 2>&1 | tee -a out.kinstall
+-      ${ERRCHECK} out.kinstall
+-
+-kernelpatch3 kernelpatch3.5 kernelpatch2.6 kernelpatch:
+-      packaging/utils/kernelpatch 2.6
+-
+-kernelpatch2.4:
+-      packaging/utils/kernelpatch 2.4
+-
+-nattpatch:
+-      if [ -f ${KERNELSRC}/Makefile ]; then \
+-              ${MAKE} nattpatch${KERNELREL}; \
+-      else    echo "Cannot determine Linux kernel version. Perhaps you need to set KERNELSRC? (eg: export KERNELSRC=/usr/src/linux-`uname -r`/)"; exit 1; \
+-      fi;
+-
+-sarefpatch2.6:
+-      #cat patches/kernel/2.6.38/0001-SAREF-add-support-for-SA-selection-through-sendmsg.patch
+-      #packaging/utils/sarefpatch 2.6
+-      echo ""
+-
+-nattpatch2.6:
+-      packaging/utils/nattpatch 2.6
+-
+-nattpatch2.4:
+-      packaging/utils/nattpatch 2.4
+-
+-nattupdate:
+-      (cd UMLPOOL && diff -u plain26/net/ipv4/udp.c.orig plain26/net/ipv4/udp.c; exit 0) >nat-t/net/ipv4/udp.c.os2_6.patch
+-
+-# take all the patches out of the kernel
+-# (Note, a couple of files are modified by non-patch means; they are
+-# included in "make backup".)
+-unpatch:
+-      @echo \"make unpatch\" is obsolete. See make unapplypatch.
+-      exit 1
+-
+-_unpatch:
+-      for f in `find $(KERNELSRC)/. -name '*.preipsec' -print` ; \
+-      do \
+-              echo "restoring $$f:" ; \
+-              dir=`dirname $$f` ; \
+-              core=`basename $$f .preipsec` ; \
+-              cd $$dir ; \
+-              mv -f $$core.preipsec $$core ; \
+-              rm -f $$core.wipsec $$core.ipsecmd5 ; \
+-      done
+-
+-# at the moment there is no difference between snapshot and release build
+-snapready:    buildready
+-relready:     buildready
+-ready:                devready
+ # set up for build
+ buildready:
+@@ -604,13 +173,6 @@ deb:
+       #debuild -S -sa
+       @echo "to build optional KLIPS kernel module, run make deb-klips"
+-deb-klips:
+-      sudo module-assistant prepare -u .
+-      sudo dpkg -i ../libreswan-modules-source_`make -s showdebversion`_all.deb
+-      sudo module-assistant -u . prepare
+-      sudo module-assistant -u . build libreswan
+-
+-
+ release:
+       packaging/utils/makerelease
+@@ -654,3 +216,5 @@ install-fipshmac:
+ include ${LIBRESWANSRCDIR}/mk/docker-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/kvm-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/web-targets.mk
++include ${LIBRESWANSRCDIR}/mk/kernel.mk
++
+diff --git a/mk/kernel.mk b/mk/kernel.mk
+new file mode 100644
+index 0000000000..187167d440
+--- /dev/null
++++ b/mk/kernel.mk
+@@ -0,0 +1,468 @@
++# Libreswan master makefile
++#
++# Copyright (C) 1998-2002  Henry Spencer.
++# Copyright (C) 2003-2004  Xelerance Corporation
++# Copyright (C) 2017, Richard Guy Briggs <rgb@tricolour.ca>
++# Copyright (C) 2015-2018  Andrew Cagney
++#
++# This program is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by the
++# Free Software Foundation; either version 2 of the License, or (at your
++# option) any later version.  See <https://www.gnu.org/licenses/gpl2.txt>.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++# for more details.
++#
++
++PATCHES=linux
++# where KLIPS goes in the kernel
++# note, some of the patches know the last part of this path
++KERNELKLIPS=$(KERNELSRC)/net/ipsec
++KERNELCRYPTODES=$(KERNELSRC)/crypto/ciphers/des
++KERNELLIBFREESWAN=$(KERNELSRC)/lib/libfreeswan
++KERNELLIBZLIB=$(KERNELSRC)/lib/zlib
++KERNELINCLUDE=$(KERNELSRC)/include
++
++MAKEUTILS=packaging/utils
++ERRCHECK=${MAKEUTILS}/errcheck
++KVUTIL=${MAKEUTILS}/kernelversion
++KVSHORTUTIL=${MAKEUTILS}/kernelversion-short
++
++# kernel details
++# what variant of our patches should we use, and where is it
++KERNELREL=$(shell ${KVSHORTUTIL} ${KERNELSRC}/Makefile)
++
++# directories visited by all recursion
++
++# declaration for make's benefit
++.PHONY:       def insert kpatch patches _patches _patches2.4 \
++      klipsdefaults programs man install \
++      precheck verset confcheck kernel \
++      module module24 module26 kinstall minstall minstall24 minstall26 \
++      moduleclean mod24clean module24clean mod26clean module26clean \
++      backup unpatch uninstall \
++      check \
++
++kpatch: unapplypatch applypatch klipsdefaults
++npatch: unapplynpatch applynpatch
++sarefpatch: unapplysarefpatch applysarefpatch
++
++unapplypatch:
++      @echo "info: making unapplypatch in `pwd` and KERNELSRC=\"${KERNELSRC}\";"
++      -@if [ -f ${KERNELSRC}/libreswan.patch ]; then \
++              echo Undoing previous patches; \
++              cat ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
++      fi
++
++applypatch:
++      @echo "info: Now performing forward patches in `pwd`";
++      ${MAKE} kernelpatch${KERNELREL} | tee ${KERNELSRC}/libreswan.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
++
++unapplynpatch:
++      @echo "info: making unapplynpatch (note the second N) in `pwd`";
++      -@if [ -f ${KERNELSRC}/natt.patch ]; then \
++              echo Undoing previous NAT patches; \
++              cat ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preipsec --reverse --ignore-whitespace ); \
++      fi
++
++applynpatch:
++      @echo "info: Now performing forward NAT patches in `pwd`";
++      ${MAKE} nattpatch${KERNELREL} | tee ${KERNELSRC}/natt.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preipsec --forward --ignore-whitespace )
++
++unapplysarefpatch:
++      @echo "info: making unapplysarefpatch in `pwd`";
++      -@if [ -f ${KERNELSRC}/saref.patch ]; then \
++              echo Undoing previous saref patches; \
++              cat ${KERNELSRC}/saref.patch | (cd ${KERNELSRC} && patch -p1 -R --force -E -z .preng --reverse --ignore-whitespace ); \
++      fi
++
++applysarefpatch:
++      @echo "info: Now performing SAref patches in `pwd`";
++      ${MAKE} sarefpatch${KERNELREL} | tee ${KERNELSRC}/klipsng.patch | (cd ${KERNELSRC} && patch -p1 -b -z .preng --forward --ignore-whitespace )
++
++# patch kernel
++PATCHER=packaging/utils/patcher
++
++_patches:
++      echo "===============" >>out.kpatch
++      echo "`date` `cd $(KERNELSRC) ; pwd`" >>out.kpatch
++      $(MAKE) __patches$(KERNELREL) >>out.kpatch
++
++# Linux-2.4.0 version
++__patches2.4:
++      @$(PATCHER) -v -c $(KERNELSRC) Documentation/Configure.help \
++              'CONFIG_KLIPS' $(PATCHES)/Documentation/Configure.help.fs2_2.patch
++      @$(PATCHER) -v $(KERNELSRC) net/Config.in \
++              'CONFIG_KLIPS' $(PATCHES)/net/Config.in.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) net/Makefile \
++              'CONFIG_KLIPS' $(PATCHES)/net/Makefile.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) net/ipv4/af_inet.c \
++              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/af_inet.c.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) net/ipv4/udp.c \
++              'CONFIG_KLIPS' $(PATCHES)/net/ipv4/udp.c.fs2_4.patch
++      @$(PATCHER) -v $(KERNELSRC) include/net/sock.h \
++              'CONFIG_KLIPS' $(PATCHES)/include/net/sock.h.fs2_4.patch
++# Removed patches, will unpatch automatically.
++      @$(PATCHER) -v $(KERNELSRC) include/linux/proc_fs.h
++      @$(PATCHER) -v $(KERNELSRC) net/core/dev.c
++      @$(PATCHER) -v $(KERNELSRC) net/ipv4/protocol.c
++      @$(PATCHER) -v $(KERNELSRC) drivers/net/Space.c
++      @$(PATCHER) -v $(KERNELSRC) include/linux/netlink.h
++      @$(PATCHER) -v $(KERNELSRC) net/netlink/af_netlink.c
++      @$(PATCHER) -v $(KERNELSRC) net/netlink/netlink_dev.c
++      @$(PATCHER) -v $(KERNELSRC) drivers/isdn/isdn_net.c
++
++klipsdefaults:
++      @KERNELDEFCONFIG=$(KERNELSRC)/arch/$(ARCH)/defconfig ; \
++      KERNELCONFIG=$(KCFILE) ; \
++      if ! egrep -q 'CONFIG_KLIPS' $$KERNELDEFCONFIG ; \
++      then \
++              set -x ; \
++              cp -a $$KERNELDEFCONFIG $$KERNELDEFCONFIG.orig ; \
++              chmod u+w $$KERNELDEFCONFIG ; \
++              cat $$KERNELDEFCONFIG $(KERNELKLIPS)/defconfig \
++                      >$$KERNELDEFCONFIG.tmp ; \
++              rm -f $$KERNELDEFCONFIG ; \
++              cp -a $$KERNELDEFCONFIG.tmp $$KERNELDEFCONFIG ; \
++              rm -f $$KERNELDEFCONFIG.tmp ; \
++      fi ; \
++      if ! egrep -q 'CONFIG_KLIPS' $$KERNELCONFIG ; \
++      then \
++              set -x ; \
++              cp -a $$KERNELCONFIG $$KERNELCONFIG.orig ; \
++              chmod u+w $$KERNELCONFIG ; \
++              cat $$KERNELCONFIG $(KERNELKLIPS)/defconfig \
++                      >$$KERNELCONFIG.tmp ; \
++              rm -f $$KERNELCONFIG ; \
++              cp -a $$KERNELCONFIG.tmp $$KERNELCONFIG ; \
++              rm -f $$KERNELCONFIG.tmp ; \
++      fi
++
++
++local-clean-base: moduleclean
++distclean: moduleclean module24clean module26clean clean-kvm-keys
++
++# proxies for major kernel make operations
++
++# do-everything entries
++KINSERT_PRE=precheck verset insert
++PRE=precheck verset kpatch
++POST=confcheck programs kernel install
++MPOST=confcheck programs module install
++
++# preliminaries
++precheck:
++      @if test ! -d $(KERNELSRC) -a ! -L $(KERNELSRC) ; \
++      then \
++              echo '*** cannot find directory "$(KERNELSRC)"!!' ; \
++              echo '*** may be necessary to add symlink to kernel source' ; \
++              exit 1 ; \
++      fi
++      @if ! cd $(KERNELSRC) ; \
++      then \
++              echo '*** cannot "cd $(KERNELSRC)"!!' ; \
++              echo '*** may be necessary to add symlink to kernel source' ; \
++              exit 1 ; \
++      fi
++      @if test ! -f $(KCFILE) ; \
++      then \
++              echo '*** cannot find "$(KCFILE)"!!' ; \
++              echo '*** perhaps kernel has never been configured?' ; \
++              echo '*** please do that first; the results are necessary.' ; \
++              exit 1 ; \
++      fi
++      @if test ! -f $(VERFILE) ; \
++      then \
++              echo '*** cannot find "$(VERFILE)"!!' ; \
++              echo '*** perhaps kernel has never been compiled?' ; \
++              echo '*** please do that first; the results are necessary.' ; \
++              exit 1 ; \
++      fi
++
++# configuring (exit statuses disregarded, something fishy here sometimes)
++xcf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) xconfig
++mcf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) menuconfig
++pcf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) config
++
++ocf:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) oldconfig
++
++rcf:
++      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) ${NONINTCONFIG} </dev/null
++      cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) dep >/dev/null
++
++kclean:
++      -cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) clean
++
++confcheck:
++      @if test ! -f $(KCFILE) ; \
++      then echo '*** no kernel configuration file written!!' ; exit 1 ; \
++      fi
++      @if ! egrep -q '^CONFIG_KLIPS=[my]' $(KCFILE) ; \
++      then echo '*** IPsec not in kernel config ($(KCFILE))!!' ; exit 1 ; \
++      fi
++      @if ! egrep -q 'CONFIG_KLIPS[   ]+1' $(ACFILE) && \
++              ! egrep -q 'CONFIG_KLIPS_MODULE[        ]+1' $(ACFILE) ; \
++      then echo '*** IPsec in kernel config ($(KCFILE)),' ; \
++              echo '***       but not in config header file ($(ACFILE))!!' ; \
++              exit 1 ; \
++      fi
++      @if egrep -q '^CONFIG_KLIPS=m' $(KCFILE) && \
++              ! egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++      then echo '*** IPsec configured as module in kernel with no module support!!' ; exit 1 ; \
++      fi
++      @if ! egrep -q 'CONFIG_KLIPS_AH[        ]+1' $(ACFILE) && \
++              ! egrep -q 'CONFIG_KLIPS_ESP[   ]+1' $(ACFILE) ; \
++      then echo '*** IPsec configuration must include AH or ESP!!' ; exit 1 ; \
++      fi
++
++# kernel building, with error checks
++kernel:
++      rm -f out.kbuild out.kinstall
++      # undocumented kernel folklore: clean BEFORE dep.
++      # we run make dep separately, because there is no point in running ERRCHECK
++      # on the make dep output.
++      # see LKML thread "clean before or after dep?"
++      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNCLEAN) $(KERNDEP) )
++      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) $(KERNEL) ) 2>&1 | tee out.kbuild
++      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++      then set -x ; \
++              ( cd $(KERNELSRC) ; \
++              $(MAKE) $(KERNMAKEOPTS) modules 2>&1 ) | tee -a out.kbuild ; \
++      fi
++      ${ERRCHECK} out.kbuild
++
++# module-only building, with error checks
++ifneq ($(strip $(MOD24BUILDDIR)),)
++${MOD24BUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make
++      mkdir -p ${MOD24BUILDDIR}
++      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module24.make ${MOD24BUILDDIR}/Makefile
++
++module:
++      @if [ -f ${KERNELSRC}/README.libreswan-2 ] ; then \
++                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with libreswan-2, out of tree build might fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/README.openswan ] ; then \
++                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan, out of tree build might fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/README.openswan-2 ] ; then \
++                echo "WARNING: Kernel source ${KERNELSRC} has already been patched with openswan-2, out of tree build might fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/README.freeswan ] ; then \
++                echo "ERROR: Kernel source ${KERNELSRC} has already been patched with freeswan, out of tree build will fail!"; \
++        fi;
++      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
++                echo "Building module for a 2.4 kernel"; ${MAKE} module24 ; \
++        else echo "Building module for a 2.6 kernel"; ${MAKE} module26; \
++        fi;
++
++modclean moduleclean:
++      @if [ -f ${KERNELSRC}/Rules.make ] ; then \
++              echo "Cleaning module for a 2.4 kernel"; ${MAKE} module24clean ; \
++      else echo "Cleaning module for a 2.6 kernel"; ${MAKE} module26clean; \
++      fi;
++
++module24:
++      @if [ ! -f ${KERNELSRC}/Rules.make ] ; then \
++                echo "Warning: Building for a 2.4 kernel in what looks like a 2.6 tree"; \
++        fi ; \
++        ${MAKE} ${MOD24BUILDDIR}/Makefile
++      ${MAKE} -C ${MOD24BUILDDIR}  LIBRESWANSRCDIR=${LIBRESWANSRCDIR} ARCH=${ARCH} V=${V} ${MODULE_FLAGS} MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} TOPDIR=${KERNELSRC} -f Makefile ipsec.o
++      @echo
++      @echo '========================================================='
++      @echo
++      @echo 'KLIPS24 module built successfully. '
++      @echo ipsec.o is in ${MOD24BUILDDIR}
++      @echo
++      @(cd ${MOD24BUILDDIR}; ls -l ipsec.o)
++      @(cd ${MOD24BUILDDIR}; size ipsec.o)
++      @echo
++      @echo 'use make minstall as root to install it'
++      @echo
++      @echo '========================================================='
++      @echo
++
++mod24clean module24clean:
++      rm -rf ${MOD24BUILDDIR}
++
++#autoodetect 2.4 and 2.6
++module_install minstall install-module:
++      @if [ -f $(KERNELSRC)/Rules.make ] ; then \
++                $(MAKE) minstall24 ; \
++      else \
++              $(MAKE) minstall26 ; \
++        fi;
++
++# Extract the value of MODLIB from the output of $(MAKE).  Also hide
++# the sup-process $(MAKE) so that GNU Make doesn't always invoke the
++# target ("make -n" ignored).
++#
++# If $(MAKE) directly appears in a target (for instance in minstall26)
++# then GNU Make will assume that it is a recursive make invocation and
++# invoke the target regardless of -n.
++#
++# XXX: minstall24 should also use this.
++
++osmodlib-from-make = \
++      OSMODLIB=$$($(MAKE) $(1) 2>/dev/null | sed -n -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/p' | head -1) ; \
++      test -z "$$OSMODLIB" || echo "OSMODLIB=$$OSMODLIB ($(MAKE) $(1))"
++
++# module-only install, with error checks
++minstall24:
++      ( OSMODLIB=`${MAKE} -C $(KERNELSRC) -p dummy | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              OSMODLIB=`${MAKE} -C $(KERNELSRC) -n -p modules_install | ( sed -n -e '/^MODLIB/p' -e '/^MODLIB/q' ; cat > /dev/null ) | sed -e 's/^MODLIB[ :=]*\([^;]*\).*/\1/'` ; \
++      fi ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              echo "No known place to install module. Aborting." ; \
++              exit 93 ; \
++      fi ; \
++      set -x ; \
++      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      cp $(MOD24BUILDDIR)/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      if [ -f /sbin/depmod ] ; then /sbin/depmod -a ; fi; \
++      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
++        mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++                if [ -f $$OSMODLIB/kernel/ipsec.o -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ] ; then \
++                        echo "WARNING: two ipsec.o modules found in $$OSMODLIB/kernel:" ; \
++                        ls -l $$OSMODLIB/kernel/ipsec.o $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.o ; \
++                        exit 1; \
++                fi ; \
++        fi ; \
++        set -x ) ;
++
++
++else
++module:
++      echo 'Building in place is no longer supported. Please set MOD24BUILDDIR='
++      exit 1
++
++endif
++
++# module-only building, with error checks
++ifneq ($(strip $(MODBUILDDIR)),)
++${MODBUILDDIR}/Makefile : ${LIBRESWANSRCDIR}/packaging/makefiles/module.make
++      mkdir -p ${MODBUILDDIR}
++      echo ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/*.S ${MODBUILDDIR}
++      (rm -f ${MODBUILDDIR}/des; mkdir -p ${MODBUILDDIR}/des && cd ${MODBUILDDIR}/des && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/des/* . && ln -s -f Makefile.fs2_6 Makefile)
++      (rm -f ${MODBUILDDIR}/aes; mkdir -p ${MODBUILDDIR}/aes && cd ${MODBUILDDIR}/aes && ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/aes/* . && ln -s -f Makefile.fs2_6 Makefile)
++      mkdir -p ${MODBUILDDIR}/aes
++      cp ${LIBRESWANSRCDIR}/packaging/makefiles/module.make ${MODBUILDDIR}/Makefile
++      ln -s -f ${LIBRESWANSRCDIR}/linux/net/ipsec/match*.S ${MODBUILDDIR}
++
++module26:
++      @if [ -f ${KERNELSRC}/Rules.make ] ; then \                 echo "Warning: Building for a 2.6+ kernel in what looks like a 2.4 tree"; \
++        fi ; \
++        ${MAKE}  ${MODBUILDDIR}/Makefile
++      ${MAKE} -C ${KERNELSRC} ${KERNELBUILDMFLAGS} BUILDDIR=${MODBUILDDIR} SUBDIRS=${MODBUILDDIR} INITSYSTEM=$(INITSYSTEM) MODULE_DEF_INCLUDE=${MODULE_DEF_INCLUDE} MODULE_DEFCONFIG=${MODULE_DEFCONFIG}  MODULE_EXTRA_INCLUDE=${MODULE_EXTRA_INCLUDE} ARCH=${ARCH} V=${V} modules
++      @echo
++      @echo '========================================================='
++      @echo
++      @echo 'KLIPS module built successfully. '
++      @echo ipsec.ko is in ${MODBUILDDIR}
++      @echo
++      @(cd ${MODBUILDDIR}; ls -l ipsec.ko)
++      @(cd ${MODBUILDDIR}; size ipsec.ko)
++      @echo
++      @echo 'use make minstall as root to install it'
++      @echo
++      @echo '========================================================='
++      @echo
++
++mod26clean module26clean:
++      rm -rf ${MODBUILDDIR}
++
++# module-only install, with error checks
++minstall26:
++      $(call osmodlib-from-make,-C $(KERNELSRC) -p help) ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              $(call osmodlib-from-make,-C $(KERNELSRC) -n -p modules_install) ; \
++      fi ; \
++      if [ -z "$$OSMODLIB" ] ; then \
++              echo "No known place to install module. Aborting." ; \
++              exit 93 ; \
++      fi ; \
++      set -x ; \
++      mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      cp $(MODBUILDDIR)/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++      if [ -f /sbin/depmod ] ; then \
++              /sbin/depmod -a ; \
++      fi ; \
++      if [ -n "$(OSMOD_DESTDIR)" ] ; then \
++              mkdir -p $$OSMODLIB/kernel/$(OSMOD_DESTDIR) ; \
++              if [ -f $$OSMODLIB/kernel/ipsec.ko -a -f $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ] ; then \
++                      echo "WARNING: two ipsec.ko modules found in $$OSMODLIB/kernel:" ; \
++                      ls -l $$OSMODLIB/kernel/ipsec.ko $$OSMODLIB/kernel/$(OSMOD_DESTDIR)/ipsec.ko ; \
++                      exit 1; \
++              fi ; \
++      fi
++
++
++else
++module26:
++      echo 'Building in place is no longer supported. Please set MODBUILDDIR='
++      exit 1
++
++endif
++
++# kernel install, with error checks
++kinstall:
++      rm -f out.kinstall
++      >out.kinstall
++      # undocumented kernel folklore: modules_install must precede install (observed on RHL8.0)
++      @if egrep -q '^CONFIG_MODULES=y' $(KCFILE) ; \
++      then set -x ; \
++              ( cd $(KERNELSRC) ; \
++              $(MAKE) $(KERNMAKEOPTS) modules_install 2>&1 ) | tee -a out.kinstall ; \
++      fi
++      ( cd $(KERNELSRC) ; $(MAKE) $(KERNMAKEOPTS) install ) 2>&1 | tee -a out.kinstall
++      ${ERRCHECK} out.kinstall
++
++kernelpatch3 kernelpatch3.5 kernelpatch2.6 kernelpatch:
++      packaging/utils/kernelpatch 2.6
++
++kernelpatch2.4:
++      packaging/utils/kernelpatch 2.4
++
++nattpatch:
++      if [ -f ${KERNELSRC}/Makefile ]; then \
++              ${MAKE} nattpatch${KERNELREL}; \
++      else    echo "Cannot determine Linux kernel version. Perhaps you need to set KERNELSRC? (eg: export KERNELSRC=/usr/src/linux-`uname -r`/)"; exit 1; \
++      fi;
++
++sarefpatch2.6:
++      #cat patches/kernel/2.6.38/0001-SAREF-add-support-for-SA-selection-through-sendmsg.patch
++      #packaging/utils/sarefpatch 2.6
++      echo ""
++
++nattpatch2.6:
++      packaging/utils/nattpatch 2.6
++
++nattpatch2.4:
++      packaging/utils/nattpatch 2.4
++
++nattupdate:
++      (cd UMLPOOL && diff -u plain26/net/ipv4/udp.c.orig plain26/net/ipv4/udp.c; exit 0) >nat-t/net/ipv4/udp.c.os2_6.patch
++
++# take all the patches out of the kernel
++# (Note, a couple of files are modified by non-patch means; they are
++# included in "make backup".)
++unpatch:
++      @echo \"make unpatch\" is obsolete. See make unapplypatch.
++      exit 1
++
++_unpatch:
++      for f in `find $(KERNELSRC)/. -name '*.preipsec' -print` ; \
++      do \
++              echo "restoring $$f:" ; \
++              dir=`dirname $$f` ; \
++              core=`basename $$f .preipsec` ; \
++              cd $$dir ; \
++              mv -f $$core.preipsec $$core ; \
++              rm -f $$core.wipsec $$core.ipsecmd5 ; \
++      done
diff --git a/net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch b/net/libreswan/patches/002-cripple_klips_klips_kernel_rules.patch
new file mode 100644 (file)
index 0000000..f07f0ed
--- /dev/null
@@ -0,0 +1,22 @@
+From fa00316e8c5151747f3e80895e6afd9ee1a9c0cd Mon Sep 17 00:00:00 2001
+From: Andrew Cagney <cagney@gnu.org>
+Date: Thu, 25 Oct 2018 21:02:45 -0400
+Subject: [PATCH] building: when !USE_KLIPS=true cripple klips kernel module
+ rules
+
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 0b070966e6..2fcf0229fd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -216,5 +216,6 @@ install-fipshmac:
+ include ${LIBRESWANSRCDIR}/mk/docker-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/kvm-targets.mk
+ include ${LIBRESWANSRCDIR}/mk/web-targets.mk
++ifeq ($(USE_KLIPS),true)
+ include ${LIBRESWANSRCDIR}/mk/kernel.mk
+-
++endif
index 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 4ba840e7ae63b733ab69f9ce9f246181078759f7..d3e66966c614c3743e617e90910b507226326f4d 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linknx
-PKG_VERSION:=0.0.1.36
+PKG_VERSION:=0.0.1.37
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
@@ -16,7 +16,7 @@ PKG_LICENSE:=GPL-2.0+
 
 PKG_SOURCE:=$(PKG_NAME)-${PKG_VERSION}.tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/linknx/linknx/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=e271ae32e2b68dff67864812c67e891d361f02960777bfb13f199dee0884f38f
+PKG_HASH:=3c3aaf8c409538153b15f5fb975a4485e58c4820cfea289a3f20777ba69782ab
 
 PKG_BUILD_DEPENDS:=argp-standalone
 PKG_FORTIFY_SOURCE:=1
index e4783b70b6657ca3d7f161d5ca0919e74f50544f..bce9d91250ff221fc03c1970db9f6a9074b1902e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mini_snmpd
 PKG_VERSION:=1.4-rc1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
index e3461563065791530ed8cbf844b1f3fda00d996c..9e6eff88ec9621554f7f79bded0c325bc7dd1642 100644 (file)
@@ -8,22 +8,26 @@ USE_PROCD=1
 PROG=/usr/bin/mini_snmpd
 NAME=mini_snmpd
 
+global_respawn_threshold=
+global_respawn_timeout=
+global_respawn_retry=
+
 _log() {
-        logger -p daemon.info -t mini_snmpd "$@"
+       logger -p daemon.info -t mini_snmpd "$@"
 }
 
 _err() {
-        logger -p daemon.err -t mini_snmpd "$@"
+       logger -p daemon.err -t mini_snmpd "$@"
 }
 
 
-# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd 
+# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd
 # and at least configuration entry for network physical interface defined in /etc/config/network
 # It handles network interfaces not yet present (e.g. ppp) but will statfs() the root/wrong filesystem if device not mounted
 # Tip: complex scripts run faster without in openwrt if you stop busybox forking and searching for applets. Faster bootups
 #      CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK
-#      CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
-#      BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n]
+#      CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
+#      BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n]
 #      CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD
 
 mini_snmpd_validation="enabled:bool:0 \
@@ -49,14 +53,14 @@ mini_snmpd_validation="enabled:bool:0 \
 append_disk() {
        local disk="$1" disk_count
        [ -z $disk_count ] && disk_count=0
-       if grep -qF "$disk" /proc/mounts ; then
+       if grep -qF "$disk" /proc/mounts; then
                # check the fileystem is mountpoint, and directory search permissions available for statfs()
                # presence as a directory -d test done is already done by uci_validate_section()
                [ -x "$disk" ] || {
                        _err "$cfg: mountpoint $disk for snmp monitoring EACCES error. Check permissions, ignoring"
                        return 1
                }
-               if [ $disk_count -lt 4 ] ;  then  
+               if [ $disk_count -lt 4 ]; then
                        append disks_arg "$disk" ','
                        disk_count=$((disk_count++))
                else
@@ -72,15 +76,15 @@ append_interface() {
        [ -z $netdev_count ] && netdev_count=0
        # for the purposes of snmp monitoring it doesn't need to be up, it just needs to exist in /proc/net/dev
        network_get_device netdev "$name"
-       if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then 
+       if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then
                [ $netdev_count -ge 4 ] && {
                        _err "$cfg: too many network interfaces configured, ignoring $name"
                        return
                }
-               netdev_count=$((netdev_count++))        
-               if [ -n "$interfaces_arg" ]; then       
+               netdev_count=$((netdev_count++))
+               if [ -n "$interfaces_arg" ]; then
                        append interfaces_arg "$netdev" ','
-               else    
+               else
                        append interfaces_arg "$netdev"
                fi
        else
@@ -102,57 +106,50 @@ watch_interfaces() {
        config_get listen_interface "$cfg" listen_interface
        # If the interface is up & instance is running we'll watch at the instance level and only restart that instance if it's bound interface changes
        # Regardless of ubus knowing about an interface (in the case it's not yet configured)
-       [ -n "$listen_interface" ] && trigger_interfaces="${listen_interface} ${trigger_interfaces} "
+       [ -n "$listen_interface" ] && trigger_interfaces="$listen_interface $trigger_interfaces"
        # Restart daemon if one of monitored interfaces changes
        config_get reload_interfaces "$cfg" interfaces
-
 }
 
 validate_mini_snmpd_section() {
        # validate a mini_snmpd instance in uci config file mini_snmpd
        # http://luci.subsignal.org/trac/wiki/Documentation/Datatypes ubox/validate/validate.c
-       uci_validate_section mini_snmpd mini_snmpd "${1}" $mini_snmpd_validation
+       uci_load_validate mini_snmpd mini_snmpd "$1" "$2" $mini_snmpd_validation
 }
 
 
 service_triggers() {
-        config_load 'mini_snmpd'
-        procd_open_trigger
-        procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload
-        config_foreach watch_interfaces 'mini_snmpd' 
+       config_load 'mini_snmpd'
+       procd_open_trigger
+       procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload
+       config_foreach watch_interfaces 'mini_snmpd'
        # this only watches interfaces for which there is no running instance due to interface down / not in ubus
        # hence start not reload, this trigger will not affect running instances as another start will not change their procd command arguments
        # or stop the already running process
-        [ -n "$trigger_interfaces" ] & {
-                for n in $trigger_interfaces ; do
+       [ -n "$trigger_interfaces" ] && {
+               for n in $trigger_interfaces; do
                        procd_add_interface_trigger "interface.*" $n /etc/init.d/mini_snmpd start
-                done
-        }
+               done
+       }
        [ -n "$reload_interfaces" ] && {
                for n in $reload_interfaces; do
                        procd_add_reload_interface_trigger $n
                done
        }
-        procd_close_trigger
+       procd_close_trigger
        procd_add_validation validate_mini_snmpd_section
 }
 
 
 start_instance() {
        local cfg validation_failed validation_err disks_arg interfaces_arg
-       cfg="$1"        
-       #uci_validate_section should unset undefined variables from other instances
-       #however defining uci variables as local will scope them to this instance
-       #"local variables are also visible to functions called by the parent function" so it's good practice
-       local enabled ipv6 debug auth community contact location listen_interface \
-               udp_port tcp_port vendor_oid mib_timeout
-       local disks="" interfaces=""
-       validate_mini_snmpd_section "$cfg" 2>/dev/null || validation_failed=1
-       [ "$enabled" == 1 ] || { 
-               _log "instance:$cfg disabled not starting" 
+       cfg="$1"
+       [ "$2" = 0 ] || validation_failed=1
+       [ "$enabled" == 1 ] || {
+               _log "instance:$cfg disabled not starting"
                 return 1
        }
-       
+
        local listen_interface_json listen_interface_ip listen_interface_device listen_interface_up
        [ -n "$listen_interface" ] && {
                if [ "$ipv6" = 1 ]; then
@@ -168,11 +165,11 @@ start_instance() {
                network_get_physdev listen_interface_device "$listen_interface"
        }
 
-       [ $validation_failed ] && {  
+       [ $validation_failed ] && {
                _err "validation of $NAME configuration for $cfg instance failed, all tests should be within constraints"
                _err "please edit the configuration values below using [l]uci "
                validation_err=`/sbin/validate_data mini_snmpd mini_snmpd "$cfg" $mini_snmpd_validation 2>&1 | sed '/with\ false$/!d;s/validates\ as\ /needs\ to\ be\ /;s/with\ false//' `
-               _err "${validation_err}"
+               _err "$validation_err"
                return 1
        }
        config_list_foreach "$cfg" 'disks' append_disk
@@ -182,36 +179,47 @@ start_instance() {
                _err "$cfg: you haven't sucessfully configured any mountpoints or disks for this instance, not starting"
                return 1
        }
-       
+
+       [ -z "$respawn_threshold$respawn_timeout$respawn_retry" ] && {
+               respawn_threshold=$global_respawn_threshold
+               respawn_timeout=$global_respawn_timeout
+               respawn_retry=$global_respawn_retry
+       }
+       [ -z "$global_respawn_threshold$global_respawn_timeout$global_respawn_retry" ] && {
+               global_respawn_threshold=$respawn_threshold
+               global_respawn_timeout=$respawn_timeout
+               global_respawn_retry=$respawn_retry
+       }
+
        procd_open_instance
 
        procd_set_param command "$PROG" -n
-       procd_set_param stdout "1"
+       procd_set_param stdout "1"
        procd_set_param stderr "1"
        # don't the like default respawn values? you can override through uci.
-       # vars left as global so you only need to do it in the first mini_snmpd instance
+       # vars saved as global so you only need to do it in the first mini_snmpd instance
        procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-10} ${respawn_retry:-1}
        # this monitors ubus changes
        [ -n "$listen_interface" ] && {
                 #procd_open_trigger
-                #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload 
+                #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload
                 #procd_close_trigger
                 procd_add_reload_interface_trigger $listen_interface #or use shorthand of above
        }
        # this re-starts the daemon if a properly configured network interface is changed whilst it is already running
-       # igmpproxy has this as well as "procd_set_param netdev" 
-
-       append_arg "-c" "$community" 
-       append_arg "-L" "${location}"
-       append_arg "-C" "${contact}" 
-       append_arg "-p" $udp_port  
-       append_arg "-P" $tcp_port  
-       append_arg "-V" "${vendor_oid}"  
-       append_arg "-t" $mib_timeout 
-       
-       [ "$ipv6" = 1  ] && procd_append_param command "-6"
+       # igmpproxy has this as well as "procd_set_param netdev"
+
+       append_arg "-c" "$community"
+       append_arg "-L" "$location"
+       append_arg "-C" "$contact"
+       append_arg "-p" $udp_port
+       append_arg "-P" $tcp_port
+       append_arg "-V" "$vendor_oid"
+       append_arg "-t" $mib_timeout
+
+       [ "$ipv6" = 1 ] && procd_append_param command "-6"
        [ "$debug" = 1 ] && procd_append_param command "-v"
-       # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string 
+       # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string
        # e.g. ="1" however it sets bools defined in /etc/config/* to =1 / =0
        [ "$auth" = 1 -o "$auth" = "1" ] && procd_append_param command "-a"
        [ -n "$disks_arg" ] && procd_append_param command "-d" "$disks_arg"
@@ -232,6 +240,5 @@ start_service() {
        . /lib/functions/network.sh
 
        config_load 'mini_snmpd'
-       config_foreach start_instance 'mini_snmpd'
+       config_foreach validate_mini_snmpd_section 'mini_snmpd' start_instance
 }
-
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 2180bfa5a8eba260a570dcf1f3641c9f4dc1d6fb..bfcaa90661728c3a57cd2287adc00fa007f34984 100644 (file)
@@ -40,7 +40,7 @@ define Package/libnetsnmp
 $(call Package/net-snmp/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libnl-tiny
+  DEPENDS:=+libnl-tiny +libpci
   TITLE:=Open source SNMP implementation (libraries)
 endef
 
index 4cdfc136975697c04ba88a7cd322899ca42f66e5..6ad405aac7d51b4d97953d920f5641cb8894584f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2016 OpenWrt.org
+# Copyright (C) 2009-2019 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
 PKG_VERSION:=2.3.3
-PKG_RELEASE:=5
+PKG_RELEASE:=7
 PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
 
 PKG_SOURCE_URL:=@SF/nfs
@@ -29,36 +29,37 @@ include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/nfs-kernel-server/Default
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Filesystem
-  DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
-  URL:=http://nfs.sourceforge.net/
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+       SECTION:=net
+       CATEGORY:=Network
+       SUBMENU:=Filesystem
+       DEPENDS:=+libwrap +libblkid +libuuid +libtirpc
+       URL:=http://nfs.sourceforge.net/
+       MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
 
 define Package/nfs-kernel-server
-  $(call Package/nfs-kernel-server/Default)
-  TITLE:=Kernel NFS server support
-  DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+       $(call Package/nfs-kernel-server/Default)
+       TITLE:=Kernel NFS server support
+       DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +NFS_KERNEL_SERVER_V4:kmod-fs-nfs-v4 +rpcbind +NFS_KERNEL_SERVER_V4:nfs-utils-libs +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+       USERID:=nfs:nfs
 endef
 
 define Package/nfs-kernel-server/description
-  Kernel NFS server support
+Kernel NFS server support
 endef
 
 define Package/nfs-kernel-server/config
-  source "$(SOURCE)/Config.in"
+       source "$(SOURCE)/Config.in"
 endef
 
 define Package/nfs-kernel-server-utils
-  $(call Package/nfs-kernel-server/Default)
-  TITLE:=NFS server utils
-  DEPENDS:=nfs-kernel-server
+       $(call Package/nfs-kernel-server/Default)
+       TITLE:=NFS server utils
+       DEPENDS:=nfs-kernel-server
 endef
 
 define Package/nfs-kernel-server-utils/description
-  NFS server utils
+NFS server utils
 endef
 
 define Package/nfs-kernel-server/conffiles
@@ -66,30 +67,30 @@ define Package/nfs-kernel-server/conffiles
 endef
 
 define Package/nfs-utils/Default
-  $(call Package/nfs-kernel-server/Default)
-  SECTION:=utils
-  CATEGORY:=Utilities
-  DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
-  URL:=http://nfs.sourceforge.net/
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
+       $(call Package/nfs-kernel-server/Default)
+       SECTION:=utils
+       CATEGORY:=Utilities
+       DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+       URL:=http://nfs.sourceforge.net/
+       MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
 
 define Package/nfs-utils
-  $(call Package/nfs-utils/Default)
-  TITLE:=updated mount utility (includes nfs4)
+       $(call Package/nfs-utils/Default)
+       TITLE:=updated mount utility (includes nfs4)
 endef
 
 define Package/nfs-utils/description
-  Updated mount.nfs command - allows mounting nfs4 volumes
+Updated mount.nfs command - allows mounting nfs4 volumes
 endef
 
 define Package/nfs-utils-libs
-  $(call Package/nfs-utils/Default)
-  TITLE:=libraries provided by nfs-utils
+       $(call Package/nfs-utils/Default)
+       TITLE:=libraries provided by nfs-utils
 endef
 
 define Package/nfs-utils-libs/description
-  Libraries provided by nfs-utils
+Libraries provided by nfs-utils
 endef
 
 TARGET_CFLAGS += -Wno-error=implicit-function-declaration \
@@ -113,7 +114,7 @@ CONFIGURE_ARGS += \
        $(if $(CONFIG_NFS_KERNEL_SERVER_V4),--enable,--disable)-nfsv41
 
 ifeq ($(CONFIG_IPV6),n)
-CONFIGURE_ARGS += --disable-ipv6
+       CONFIGURE_ARGS += --disable-ipv6
 endif
 
 CONFIGURE_VARS += \
diff --git a/net/nfs-kernel-server/patches/200-idmapd-add-missing-libgen-header.patch b/net/nfs-kernel-server/patches/200-idmapd-add-missing-libgen-header.patch
new file mode 100644 (file)
index 0000000..1dd6b88
--- /dev/null
@@ -0,0 +1,29 @@
+From: Rosen Penev <rosenp@gmail.com>\r
+To: linux-nfs@vger.kernel.org\r
+Subject: [PATCH] idmapd: Add missing libgen header\r
+Date: Sun, 14 Apr 2019 19:11:40 -0700\r
+Message-Id: <20190415021140.1388-1-rosenp@gmail.com>\r
+X-Mailer: git-send-email 2.17.1\r
+\r
+Otherwise compilation can fail with an implicit declaration of basename.\r
+\r
+Signed-off-by: Rosen Penev <rosenp@gmail.com>\r
+---\r
+ utils/idmapd/idmapd.c | 1 +\r
+ 1 file changed, 1 insertion(+)\r
+\r
+diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c\r
+index 91c0253..62e37b8 100644\r
+--- a/utils/idmapd/idmapd.c\r
++++ b/utils/idmapd/idmapd.c\r
+@@ -59,6 +59,7 @@\r
+ #include <grp.h>\r
+ #include <limits.h>\r
+ #include <ctype.h>\r
++#include <libgen.h>\r
+ #include <nfsidmap.h>\r
\r
+ #ifdef HAVE_CONFIG_H\r
+-- \r
+2.17.1\r
+\r
index ed3ff441f7b967e5b13c6467143c39d7d1117b19..78e0ec2b954ff3730f68754636430165dfcd33ec 100644 (file)
@@ -23,6 +23,7 @@ define Package/nft-qos
   CATEGORY:=Base system
   DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
   TITLE:=QoS scripts over nftables
+  PKGARCH:=all
 endef
 
 define Package/nft-qos/description
index 4a52720594b1d427cc957cd1a46f0a7704ef8532..85f97bc9ded3839745952978157db445d825f6e5 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
-PKG_VERSION:=1.15.8
+PKG_VERSION:=1.16.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787
+PKG_HASH:=4fd376bad78797e7f18094a00f0f1088259326436b537eb5af69b01be2ca1345
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
                                Ansuel Smith <ansuelsmth@gmail.com>
@@ -71,6 +71,8 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
        CONFIG_NGINX_RTMP_MODULE \
        CONFIG_NGINX_TS_MODULE \
+       CONFIG_OPENSSL_ENGINE \
+       CONFIG_OPENSSL_WITH_NPN
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -80,7 +82,7 @@ define Package/nginx/default
   SUBMENU:=Web Servers/Proxies
   TITLE:=Nginx web server
   URL:=http://nginx.org/
-  DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
+  DEPENDS:=+NGINX_PCRE:libpcre +NGINX_SSL:libopenssl \
        +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
 endef
 
@@ -104,7 +106,7 @@ define Package/nginx-ssl
 endef
 
 Package/nginx-ssl/description = $(Package/nginx/description) \
-  This varian is compiled with SSL support enabled. To enable additional module \
+  This variant is compiled with SSL support enabled. To enable additional module \
   select them in the nginx default configuration menu.
 
 define Package/nginx-all-module
@@ -116,7 +118,7 @@ define Package/nginx-all-module
 endef
 
 Package/nginx-all-module/description = $(Package/nginx/description) \
-  This varian is compiled with ALL module selected.
+  This variant is compiled with ALL module selected.
 
 define Package/nginx/config
   source "$(SOURCE)/Config.in"
index 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 d71cee690345ae04619018138480eadeeffa9730..04b2d0e9e79d0bc86508c8bba34bae4aeb77c4d7 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
-PKG_VERSION:=7.9p1
-PKG_RELEASE:=6
+PKG_VERSION:=8.0p1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
                https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \
                https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/
-PKG_HASH:=6b4b3ba2253d84ed3771c8050728d597c91cfce898713beb7b64a305b6f11aad
+PKG_HASH:=bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68
 
 PKG_LICENSE:=BSD ISC
 PKG_LICENSE_FILES:=LICENCE
@@ -130,8 +130,6 @@ endef
 define Package/openssh-sftp-server
        $(call Package/openssh/Default)
        TITLE+= SFTP server
-       # Strip dependencies to avoid pulling in OpenSSL etc.
-       DEPENDS:=
 endef
 
 define Package/openssh-sftp-server/description
@@ -180,7 +178,7 @@ CONFIGURE_ARGS += \
        --without-pam
 endif
 
-ifeq ($(CONFIG_OPENSSL_ENGINE_CRYPTO),y)
+ifeq ($(CONFIG_OPENSSL_ENGINE),y)
 CONFIGURE_ARGS+= \
        --with-ssl-engine
 endif
@@ -197,10 +195,6 @@ TARGET_LDFLAGS += -lpthread
 endif
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               LIBS="" \
-               sftp-server
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                STRIP_OPT="" \
diff --git a/net/openssh/patches/0000-CVE-2018-20685.patch b/net/openssh/patches/0000-CVE-2018-20685.patch
deleted file mode 100644 (file)
index f2f1ecf..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6010c0303a422a9c5fa8860c061bf7105eb7f8b2 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Fri, 16 Nov 2018 03:03:10 +0000
-Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer
- to the
-
-current directory; based on report/patch from Harry Sintonen
-
-OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9
----
- scp.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/scp.c b/scp.c
-index 60682c687..4f3fdcd3d 100644
---- a/scp.c
-+++ b/scp.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
-+/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */
- /*
-  * scp - secure remote copy.  This is basically patched BSD rcp which
-  * uses ssh to do the data transfer (instead of using rcmd).
-@@ -1106,7 +1106,8 @@ sink(int argc, char **argv)
-                       SCREWUP("size out of range");
-               size = (off_t)ull;
--              if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
-+              if (*cp == '\0' || strchr(cp, '/') != NULL ||
-+                  strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
-                       run_err("error: unexpected filename: %s", cp);
-                       exit(1);
-               }
diff --git a/net/openssh/patches/0001-fix-key-type-check.patch b/net/openssh/patches/0001-fix-key-type-check.patch
deleted file mode 100644 (file)
index c5b9f0e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-From 5e021158aa22cc64da4fca1618ee0bfd2d031049 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Fri, 16 Nov 2018 02:43:56 +0000
-Subject: upstream: fix bug in HostbasedAcceptedKeyTypes and
-
-PubkeyAcceptedKeyTypes options. If only RSA-SHA2 siganture types were
-specified, then authentication would always fail for RSA keys as the monitor
-checks only the base key (not the signature algorithm) type against
-*AcceptedKeyTypes. bz#2746; reported by Jakub Jelen; ok dtucker
-
-OpenBSD-Commit-ID: 117bc3dc54578dbdb515a1d3732988cb5b00461b
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=cd9467318b56e6e93ff9575c906ff8350af9b8a2
-Last-Update: 2019-02-28
-
-Patch-Name: fix-key-type-check.patch
----
- monitor.c | 39 ++++++++++++++++++++++++++++++++++-----
- 1 file changed, 34 insertions(+), 5 deletions(-)
-
-diff --git a/monitor.c b/monitor.c
-index 08fddabd7..037d6d333 100644
---- a/monitor.c
-+++ b/monitor.c
-@@ -892,6 +892,35 @@ mm_answer_authrole(int sock, struct sshbuf *m)
-       return (0);
- }
-+/*
-+ * Check that the key type appears in the supplied pattern list, ignoring
-+ * mismatches in the signature algorithm. (Signature algorithm checks are
-+ * performed in the unprivileged authentication code).
-+ * Returns 1 on success, 0 otherwise.
-+ */
-+static int
-+key_base_type_match(const char *method, const struct sshkey *key,
-+    const char *list)
-+{
-+      char *s, *l, *ol = xstrdup(list);
-+      int found = 0;
-+
-+      l = ol;
-+      for ((s = strsep(&l, ",")); s && *s != '\0'; (s = strsep(&l, ","))) {
-+              if (sshkey_type_from_name(s) == key->type) {
-+                      found = 1;
-+                      break;
-+              }
-+      }
-+      if (!found) {
-+              error("%s key type %s is not in permitted list %s", method,
-+                  sshkey_ssh_name(key), list);
-+      }
-+
-+      free(ol);
-+      return found;
-+}
-+
- int
- mm_answer_authpassword(int sock, struct sshbuf *m)
- {
-@@ -1197,8 +1226,8 @@ mm_answer_keyallowed(int sock, struct sshbuf *m)
-                               break;
-                       if (auth2_key_already_used(authctxt, key))
-                               break;
--                      if (match_pattern_list(sshkey_ssh_name(key),
--                          options.pubkey_key_types, 0) != 1)
-+                      if (!key_base_type_match(auth_method, key,
-+                          options.pubkey_key_types))
-                               break;
-                       allowed = user_key_allowed(ssh, authctxt->pw, key,
-                           pubkey_auth_attempt, &opts);
-@@ -1209,8 +1238,8 @@ mm_answer_keyallowed(int sock, struct sshbuf *m)
-                               break;
-                       if (auth2_key_already_used(authctxt, key))
-                               break;
--                      if (match_pattern_list(sshkey_ssh_name(key),
--                          options.hostbased_key_types, 0) != 1)
-+                      if (!key_base_type_match(auth_method, key,
-+                          options.hostbased_key_types))
-                               break;
-                       allowed = hostbased_key_allowed(authctxt->pw,
-                           cuser, chost, key);
diff --git a/net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch b/net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch
deleted file mode 100644 (file)
index 2c876be..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-From d94226d4fcefbc398c5583e12b5d07ca33884ba4 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Thu, 27 Dec 2018 23:02:11 +0000
-Subject: upstream: Request RSA-SHA2 signatures for
-
-rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@
-
-OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=f429c1b2ef631f2855e51a790cf71761d752bbca
-Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2944
-Bug-Debian: https://bugs.debian.org/923419
-Last-Update: 2019-02-28
-
-Patch-Name: request-rsa-sha2-cert-signatures.patch
----
- authfd.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/authfd.c b/authfd.c
-index ecdd869ab..62cbf8c19 100644
---- a/authfd.c
-+++ b/authfd.c
-@@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl)
- static u_int
- agent_encode_alg(const struct sshkey *key, const char *alg)
- {
--      if (alg != NULL && key->type == KEY_RSA) {
--              if (strcmp(alg, "rsa-sha2-256") == 0)
-+      if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) {
-+              if (strcmp(alg, "rsa-sha2-256") == 0 ||
-+                  strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0)
-                       return SSH_AGENT_RSA_SHA2_256;
--              else if (strcmp(alg, "rsa-sha2-512") == 0)
-+              if (strcmp(alg, "rsa-sha2-512") == 0 ||
-+                  strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0)
-                       return SSH_AGENT_RSA_SHA2_512;
-       }
-       return 0;
diff --git a/net/openssh/patches/0003-sanitize-scp-filenames-via-snmprintf.patch b/net/openssh/patches/0003-sanitize-scp-filenames-via-snmprintf.patch
deleted file mode 100644 (file)
index 347382b..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-From 11b88754cadcad0ba79b4ffcc127223248dccb54 Mon Sep 17 00:00:00 2001
-From: "dtucker@openbsd.org" <dtucker@openbsd.org>
-Date: Wed, 23 Jan 2019 08:01:46 +0000
-Subject: upstream: Sanitize scp filenames via snmprintf. To do this we move
-
-the progressmeter formatting outside of signal handler context and have the
-atomicio callback called for EINTR too.  bz#2434 with contributions from djm
-and jjelen at redhat.com, ok djm@
-
-OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8
-
-CVE-2019-6109
-
-Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=8976f1c4b2721c26e878151f52bdf346dfe2d54c
-Bug-Debian: https://bugs.debian.org/793412
-Last-Update: 2019-02-08
-
-Patch-Name: sanitize-scp-filenames-via-snmprintf.patch
----
- atomicio.c      | 20 ++++++++++++++-----
- progressmeter.c | 53 ++++++++++++++++++++++---------------------------
- progressmeter.h |  3 ++-
- scp.c           |  1 +
- sftp-client.c   | 16 ++++++++-------
- 5 files changed, 51 insertions(+), 42 deletions(-)
-
-diff --git a/atomicio.c b/atomicio.c
-index f854a06f5..d91bd7621 100644
---- a/atomicio.c
-+++ b/atomicio.c
-@@ -65,9 +65,14 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n,
-               res = (f) (fd, s + pos, n - pos);
-               switch (res) {
-               case -1:
--                      if (errno == EINTR)
-+                      if (errno == EINTR) {
-+                              /* possible SIGALARM, update callback */
-+                              if (cb != NULL && cb(cb_arg, 0) == -1) {
-+                                      errno = EINTR;
-+                                      return pos;
-+                              }
-                               continue;
--                      if (errno == EAGAIN || errno == EWOULDBLOCK) {
-+                      } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
- #ifndef BROKEN_READ_COMPARISON
-                               (void)poll(&pfd, 1, -1);
- #endif
-@@ -122,9 +127,14 @@ atomiciov6(ssize_t (*f) (int, const struct iovec *, int), int fd,
-               res = (f) (fd, iov, iovcnt);
-               switch (res) {
-               case -1:
--                      if (errno == EINTR)
-+                      if (errno == EINTR) {
-+                              /* possible SIGALARM, update callback */
-+                              if (cb != NULL && cb(cb_arg, 0) == -1) {
-+                                      errno = EINTR;
-+                                      return pos;
-+                              }
-                               continue;
--                      if (errno == EAGAIN || errno == EWOULDBLOCK) {
-+                      } else if (errno == EAGAIN || errno == EWOULDBLOCK) {
- #ifndef BROKEN_READV_COMPARISON
-                               (void)poll(&pfd, 1, -1);
- #endif
-diff --git a/progressmeter.c b/progressmeter.c
-index fe9bf52e4..add462dde 100644
---- a/progressmeter.c
-+++ b/progressmeter.c
-@@ -31,6 +31,7 @@
- #include <errno.h>
- #include <signal.h>
-+#include <stdarg.h>
- #include <stdio.h>
- #include <string.h>
- #include <time.h>
-@@ -39,6 +40,7 @@
- #include "progressmeter.h"
- #include "atomicio.h"
- #include "misc.h"
-+#include "utf8.h"
- #define DEFAULT_WINSIZE 80
- #define MAX_WINSIZE 512
-@@ -61,7 +63,7 @@ static void setscreensize(void);
- void refresh_progress_meter(void);
- /* signal handler for updating the progress meter */
--static void update_progress_meter(int);
-+static void sig_alarm(int);
- static double start;          /* start progress */
- static double last_update;    /* last progress update */
-@@ -74,6 +76,7 @@ static long stalled;         /* how long we have been stalled */
- static int bytes_per_second;  /* current speed in bytes per second */
- static int win_size;          /* terminal window size */
- static volatile sig_atomic_t win_resized; /* for window resizing */
-+static volatile sig_atomic_t alarm_fired;
- /* units for format_size */
- static const char unit[] = " KMGT";
-@@ -126,9 +129,17 @@ refresh_progress_meter(void)
-       off_t bytes_left;
-       int cur_speed;
-       int hours, minutes, seconds;
--      int i, len;
-       int file_len;
-+      if ((!alarm_fired && !win_resized) || !can_output())
-+              return;
-+      alarm_fired = 0;
-+
-+      if (win_resized) {
-+              setscreensize();
-+              win_resized = 0;
-+      }
-+
-       transferred = *counter - (cur_pos ? cur_pos : start_pos);
-       cur_pos = *counter;
-       now = monotime_double();
-@@ -158,16 +169,11 @@ refresh_progress_meter(void)
-       /* filename */
-       buf[0] = '\0';
--      file_len = win_size - 35;
-+      file_len = win_size - 36;
-       if (file_len > 0) {
--              len = snprintf(buf, file_len + 1, "\r%s", file);
--              if (len < 0)
--                      len = 0;
--              if (len >= file_len + 1)
--                      len = file_len;
--              for (i = len; i < file_len; i++)
--                      buf[i] = ' ';
--              buf[file_len] = '\0';
-+              buf[0] = '\r';
-+              snmprintf(buf+1, sizeof(buf)-1 , &file_len, "%*s",
-+                  file_len * -1, file);
-       }
-       /* percent of transfer done */
-@@ -228,22 +234,11 @@ refresh_progress_meter(void)
- /*ARGSUSED*/
- static void
--update_progress_meter(int ignore)
-+sig_alarm(int ignore)
- {
--      int save_errno;
--
--      save_errno = errno;
--
--      if (win_resized) {
--              setscreensize();
--              win_resized = 0;
--      }
--      if (can_output())
--              refresh_progress_meter();
--
--      signal(SIGALRM, update_progress_meter);
-+      signal(SIGALRM, sig_alarm);
-+      alarm_fired = 1;
-       alarm(UPDATE_INTERVAL);
--      errno = save_errno;
- }
- void
-@@ -259,10 +254,9 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr)
-       bytes_per_second = 0;
-       setscreensize();
--      if (can_output())
--              refresh_progress_meter();
-+      refresh_progress_meter();
--      signal(SIGALRM, update_progress_meter);
-+      signal(SIGALRM, sig_alarm);
-       signal(SIGWINCH, sig_winch);
-       alarm(UPDATE_INTERVAL);
- }
-@@ -286,6 +280,7 @@ stop_progress_meter(void)
- static void
- sig_winch(int sig)
- {
-+      signal(SIGWINCH, sig_winch);
-       win_resized = 1;
- }
-diff --git a/progressmeter.h b/progressmeter.h
-index bf179dca6..8f6678060 100644
---- a/progressmeter.h
-+++ b/progressmeter.h
-@@ -24,4 +24,5 @@
-  */
- void  start_progress_meter(const char *, off_t, off_t *);
-+void  refresh_progress_meter(void);
- void  stop_progress_meter(void);
-diff --git a/scp.c b/scp.c
-index 7163d33dc..80308573c 100644
---- a/scp.c
-+++ b/scp.c
-@@ -593,6 +593,7 @@ scpio(void *_cnt, size_t s)
-       off_t *cnt = (off_t *)_cnt;
-       *cnt += s;
-+      refresh_progress_meter();
-       if (limit_kbps > 0)
-               bandwidth_limit(&bwlimit, s);
-       return 0;
-diff --git a/sftp-client.c b/sftp-client.c
-index 4986d6d8d..2bc698f86 100644
---- a/sftp-client.c
-+++ b/sftp-client.c
-@@ -101,7 +101,9 @@ sftpio(void *_bwlimit, size_t amount)
- {
-       struct bwlimit *bwlimit = (struct bwlimit *)_bwlimit;
--      bandwidth_limit(bwlimit, amount);
-+      refresh_progress_meter();
-+      if (bwlimit != NULL)
-+              bandwidth_limit(bwlimit, amount);
-       return 0;
- }
-@@ -121,8 +123,8 @@ send_msg(struct sftp_conn *conn, struct sshbuf *m)
-       iov[1].iov_base = (u_char *)sshbuf_ptr(m);
-       iov[1].iov_len = sshbuf_len(m);
--      if (atomiciov6(writev, conn->fd_out, iov, 2,
--          conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_out) !=
-+      if (atomiciov6(writev, conn->fd_out, iov, 2, sftpio,
-+          conn->limit_kbps > 0 ? &conn->bwlimit_out : NULL) !=
-           sshbuf_len(m) + sizeof(mlen))
-               fatal("Couldn't send packet: %s", strerror(errno));
-@@ -138,8 +140,8 @@ get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
-       if ((r = sshbuf_reserve(m, 4, &p)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
--      if (atomicio6(read, conn->fd_in, p, 4,
--          conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_in) != 4) {
-+      if (atomicio6(read, conn->fd_in, p, 4, sftpio,
-+          conn->limit_kbps > 0 ? &conn->bwlimit_in : NULL) != 4) {
-               if (errno == EPIPE || errno == ECONNRESET)
-                       fatal("Connection closed");
-               else
-@@ -157,8 +159,8 @@ get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
-       if ((r = sshbuf_reserve(m, msg_len, &p)) != 0)
-               fatal("%s: buffer error: %s", __func__, ssh_err(r));
--      if (atomicio6(read, conn->fd_in, p, msg_len,
--          conn->limit_kbps > 0 ? sftpio : NULL, &conn->bwlimit_in)
-+      if (atomicio6(read, conn->fd_in, p, msg_len, sftpio,
-+          conn->limit_kbps > 0 ? &conn->bwlimit_in : NULL)
-           != msg_len) {
-               if (errno == EPIPE)
-                       fatal("Connection closed");
diff --git a/net/openssh/patches/0004-have-progressmeter-force-update-at-beginning-and-end-transfer.patch b/net/openssh/patches/0004-have-progressmeter-force-update-at-beginning-and-end-transfer.patch
deleted file mode 100644 (file)
index f89ee17..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-From 2a8f710447442e9a03e71c022859112ec2d77d17 Mon Sep 17 00:00:00 2001
-From: "dtucker@openbsd.org" <dtucker@openbsd.org>
-Date: Thu, 24 Jan 2019 16:52:17 +0000
-Subject: upstream: Have progressmeter force an update at the beginning and
-
-end of each transfer.  Fixes the problem recently introduces where very quick
-transfers do not display the progressmeter at all.  Spotted by naddy@
-
-OpenBSD-Commit-ID: 68dc46c259e8fdd4f5db3ec2a130f8e4590a7a9a
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=bdc6c63c80b55bcbaa66b5fde31c1cb1d09a41eb
-Last-Update: 2019-02-08
-
-Patch-Name: have-progressmeter-force-update-at-beginning-and-end-transfer.patch
----
- progressmeter.c | 13 +++++--------
- progressmeter.h |  4 ++--
- scp.c           |  2 +-
- sftp-client.c   |  2 +-
- 4 files changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/progressmeter.c b/progressmeter.c
-index add462dde..e385c1254 100644
---- a/progressmeter.c
-+++ b/progressmeter.c
-@@ -59,9 +59,6 @@ static void format_rate(char *, int, off_t);
- static void sig_winch(int);
- static void setscreensize(void);
--/* updates the progressmeter to reflect the current state of the transfer */
--void refresh_progress_meter(void);
--
- /* signal handler for updating the progress meter */
- static void sig_alarm(int);
-@@ -120,7 +117,7 @@ format_size(char *buf, int size, off_t bytes)
- }
- void
--refresh_progress_meter(void)
-+refresh_progress_meter(int force_update)
- {
-       char buf[MAX_WINSIZE + 1];
-       off_t transferred;
-@@ -131,7 +128,7 @@ refresh_progress_meter(void)
-       int hours, minutes, seconds;
-       int file_len;
--      if ((!alarm_fired && !win_resized) || !can_output())
-+      if ((!force_update && !alarm_fired && !win_resized) || !can_output())
-               return;
-       alarm_fired = 0;
-@@ -254,7 +251,7 @@ start_progress_meter(const char *f, off_t filesize, off_t *ctr)
-       bytes_per_second = 0;
-       setscreensize();
--      refresh_progress_meter();
-+      refresh_progress_meter(1);
-       signal(SIGALRM, sig_alarm);
-       signal(SIGWINCH, sig_winch);
-@@ -271,7 +268,7 @@ stop_progress_meter(void)
-       /* Ensure we complete the progress */
-       if (cur_pos != end_pos)
--              refresh_progress_meter();
-+              refresh_progress_meter(1);
-       atomicio(vwrite, STDOUT_FILENO, "\n", 1);
- }
-diff --git a/progressmeter.h b/progressmeter.h
-index 8f6678060..1703ea75b 100644
---- a/progressmeter.h
-+++ b/progressmeter.h
-@@ -24,5 +24,5 @@
-  */
- void  start_progress_meter(const char *, off_t, off_t *);
--void  refresh_progress_meter(void);
-+void  refresh_progress_meter(int);
- void  stop_progress_meter(void);
-diff --git a/scp.c b/scp.c
-index 80308573c..1971c80cd 100644
---- a/scp.c
-+++ b/scp.c
-@@ -593,7 +593,7 @@ scpio(void *_cnt, size_t s)
-       off_t *cnt = (off_t *)_cnt;
-       *cnt += s;
--      refresh_progress_meter();
-+      refresh_progress_meter(0);
-       if (limit_kbps > 0)
-               bandwidth_limit(&bwlimit, s);
-       return 0;
-diff --git a/sftp-client.c b/sftp-client.c
-index 2bc698f86..cf2887a40 100644
---- a/sftp-client.c
-+++ b/sftp-client.c
-@@ -101,7 +101,7 @@ sftpio(void *_bwlimit, size_t amount)
- {
-       struct bwlimit *bwlimit = (struct bwlimit *)_bwlimit;
--      refresh_progress_meter();
-+      refresh_progress_meter(0);
-       if (bwlimit != NULL)
-               bandwidth_limit(bwlimit, amount);
-       return 0;
diff --git a/net/openssh/patches/0005-check-filenames-in-scp-client.patch b/net/openssh/patches/0005-check-filenames-in-scp-client.patch
deleted file mode 100644 (file)
index 519358c..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-From 125924e47db3713a85a70e0f8d6c23818d2ea054 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Sat, 26 Jan 2019 22:41:28 +0000
-Subject: upstream: check in scp client that filenames sent during
-
-remote->local directory copies satisfy the wildcard specified by the user.
-
-This checking provides some protection against a malicious server
-sending unexpected filenames, but it comes at a risk of rejecting wanted
-files due to differences between client and server wildcard expansion rules.
-
-For this reason, this also adds a new -T flag to disable the check.
-
-reported by Harry Sintonen
-fix approach suggested by markus@;
-has been in snaps for ~1wk courtesy deraadt@
-
-OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda
-
-CVE-2019-6111
-
-Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=391ffc4b9d31fa1f4ad566499fef9176ff8a07dc
-Last-Update: 2019-02-08
-
-Patch-Name: check-filenames-in-scp-client.patch
----
- scp.1 | 12 +++++++++++-
- scp.c | 37 +++++++++++++++++++++++++++++--------
- 2 files changed, 40 insertions(+), 9 deletions(-)
-
-diff --git a/scp.1 b/scp.1
-index 0e5cc1b2d..397e77091 100644
---- a/scp.1
-+++ b/scp.1
-@@ -18,7 +18,7 @@
- .Nd secure copy (remote file copy program)
- .Sh SYNOPSIS
- .Nm scp
--.Op Fl 346BCpqrv
-+.Op Fl 346BCpqrTv
- .Op Fl c Ar cipher
- .Op Fl F Ar ssh_config
- .Op Fl i Ar identity_file
-@@ -208,6 +208,16 @@ to use for the encrypted connection.
- The program must understand
- .Xr ssh 1
- options.
-+.It Fl T
-+Disable strict filename checking.
-+By default when copying files from a remote host to a local directory
-+.Nm
-+checks that the received filenames match those requested on the command-line
-+to prevent the remote end from sending unexpected or unwanted files.
-+Because of differences in how various operating systems and shells interpret
-+filename wildcards, these checks may cause wanted files to be rejected.
-+This option disables these checks at the expense of fully trusting that
-+the server will not send unexpected filenames.
- .It Fl v
- Verbose mode.
- Causes
-diff --git a/scp.c b/scp.c
-index 1971c80cd..035037bcc 100644
---- a/scp.c
-+++ b/scp.c
-@@ -94,6 +94,7 @@
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <fnmatch.h>
- #include <limits.h>
- #include <locale.h>
- #include <pwd.h>
-@@ -383,14 +384,14 @@ void verifydir(char *);
- struct passwd *pwd;
- uid_t userid;
- int errs, remin, remout;
--int pflag, iamremote, iamrecursive, targetshouldbedirectory;
-+int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory;
- #define       CMDNEEDS        64
- char cmd[CMDNEEDS];           /* must hold "rcp -r -p -d\0" */
- int response(void);
- void rsource(char *, struct stat *);
--void sink(int, char *[]);
-+void sink(int, char *[], const char *);
- void source(int, char *[]);
- void tolocal(int, char *[]);
- void toremote(int, char *[]);
-@@ -429,8 +430,9 @@ main(int argc, char **argv)
-       addargs(&args, "-oRemoteCommand=none");
-       addargs(&args, "-oRequestTTY=no");
--      fflag = tflag = 0;
--      while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1)
-+      fflag = Tflag = tflag = 0;
-+      while ((ch = getopt(argc, argv,
-+          "dfl:prtTvBCc:i:P:q12346S:o:F:")) != -1) {
-               switch (ch) {
-               /* User-visible flags. */
-               case '1':
-@@ -509,9 +511,13 @@ main(int argc, char **argv)
-                       setmode(0, O_BINARY);
- #endif
-                       break;
-+              case 'T':
-+                      Tflag = 1;
-+                      break;
-               default:
-                       usage();
-               }
-+      }
-       argc -= optind;
-       argv += optind;
-@@ -542,7 +548,7 @@ main(int argc, char **argv)
-       }
-       if (tflag) {
-               /* Receive data. */
--              sink(argc, argv);
-+              sink(argc, argv, NULL);
-               exit(errs != 0);
-       }
-       if (argc < 2)
-@@ -800,7 +806,7 @@ tolocal(int argc, char **argv)
-                       continue;
-               }
-               free(bp);
--              sink(1, argv + argc - 1);
-+              sink(1, argv + argc - 1, src);
-               (void) close(remin);
-               remin = remout = -1;
-       }
-@@ -976,7 +982,7 @@ rsource(char *name, struct stat *statp)
-        (sizeof(type) != 4 && sizeof(type) != 8))
- void
--sink(int argc, char **argv)
-+sink(int argc, char **argv, const char *src)
- {
-       static BUF buffer;
-       struct stat stb;
-@@ -992,6 +998,7 @@ sink(int argc, char **argv)
-       unsigned long long ull;
-       int setimes, targisdir, wrerrno = 0;
-       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
-+      char *src_copy = NULL, *restrict_pattern = NULL;
-       struct timeval tv[2];
- #define       atime   tv[0]
-@@ -1016,6 +1023,17 @@ sink(int argc, char **argv)
-       (void) atomicio(vwrite, remout, "", 1);
-       if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
-               targisdir = 1;
-+      if (src != NULL && !iamrecursive && !Tflag) {
-+              /*
-+               * Prepare to try to restrict incoming filenames to match
-+               * the requested destination file glob.
-+               */
-+              if ((src_copy = strdup(src)) == NULL)
-+                      fatal("strdup failed");
-+              if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) {
-+                      *restrict_pattern++ = '\0';
-+              }
-+      }
-       for (first = 1;; first = 0) {
-               cp = buf;
-               if (atomicio(read, remin, cp, 1) != 1)
-@@ -1120,6 +1138,9 @@ sink(int argc, char **argv)
-                       run_err("error: unexpected filename: %s", cp);
-                       exit(1);
-               }
-+              if (restrict_pattern != NULL &&
-+                  fnmatch(restrict_pattern, cp, 0) != 0)
-+                      SCREWUP("filename does not match request");
-               if (targisdir) {
-                       static char *namebuf;
-                       static size_t cursize;
-@@ -1157,7 +1178,7 @@ sink(int argc, char **argv)
-                                       goto bad;
-                       }
-                       vect[0] = xstrdup(np);
--                      sink(1, vect);
-+                      sink(1, vect, src);
-                       if (setimes) {
-                               setimes = 0;
-                               if (utimes(vect[0], tv) < 0)
diff --git a/net/openssh/patches/0006-scp-handle-braces.patch b/net/openssh/patches/0006-scp-handle-braces.patch
deleted file mode 100644 (file)
index 0cbdcfd..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-From 7a3fa37583d4abf128f7f4c6eb1e7ffc90115eab Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Sun, 10 Feb 2019 11:15:52 +0000
-Subject: upstream: when checking that filenames sent by the server side
-
-match what the client requested, be prepared to handle shell-style brace
-alternations, e.g. "{foo,bar}".
-
-"looks good to me" millert@ + in snaps for the last week courtesy
-deraadt@
-
-OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e
-
-Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=3d896c157c722bc47adca51a58dca859225b5874
-Bug-Debian: https://bugs.debian.org/923486
-Last-Update: 2019-03-01
-
-Patch-Name: scp-handle-braces.patch
----
- scp.c | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 269 insertions(+), 11 deletions(-)
-
-diff --git a/scp.c b/scp.c
-index 035037bcc..3888baab0 100644
---- a/scp.c
-+++ b/scp.c
-@@ -635,6 +635,253 @@ parse_scp_uri(const char *uri, char **userp, char **hostp, int *portp,
-       return r;
- }
-+/* Appends a string to an array; returns 0 on success, -1 on alloc failure */
-+static int
-+append(char *cp, char ***ap, size_t *np)
-+{
-+      char **tmp;
-+
-+      if ((tmp = reallocarray(*ap, *np + 1, sizeof(*tmp))) == NULL)
-+              return -1;
-+      tmp[(*np)] = cp;
-+      (*np)++;
-+      *ap = tmp;
-+      return 0;
-+}
-+
-+/*
-+ * Finds the start and end of the first brace pair in the pattern.
-+ * returns 0 on success or -1 for invalid patterns.
-+ */
-+static int
-+find_brace(const char *pattern, int *startp, int *endp)
-+{
-+      int i;
-+      int in_bracket, brace_level;
-+
-+      *startp = *endp = -1;
-+      in_bracket = brace_level = 0;
-+      for (i = 0; i < INT_MAX && *endp < 0 && pattern[i] != '\0'; i++) {
-+              switch (pattern[i]) {
-+              case '\\':
-+                      /* skip next character */
-+                      if (pattern[i + 1] != '\0')
-+                              i++;
-+                      break;
-+              case '[':
-+                      in_bracket = 1;
-+                      break;
-+              case ']':
-+                      in_bracket = 0;
-+                      break;
-+              case '{':
-+                      if (in_bracket)
-+                              break;
-+                      if (pattern[i + 1] == '}') {
-+                              /* Protect a single {}, for find(1), like csh */
-+                              i++; /* skip */
-+                              break;
-+                      }
-+                      if (*startp == -1)
-+                              *startp = i;
-+                      brace_level++;
-+                      break;
-+              case '}':
-+                      if (in_bracket)
-+                              break;
-+                      if (*startp < 0) {
-+                              /* Unbalanced brace */
-+                              return -1;
-+                      }
-+                      if (--brace_level <= 0)
-+                              *endp = i;
-+                      break;
-+              }
-+      }
-+      /* unbalanced brackets/braces */
-+      if (*endp < 0 && (*startp >= 0 || in_bracket))
-+              return -1;
-+      return 0;
-+}
-+
-+/*
-+ * Assembles and records a successfully-expanded pattern, returns -1 on
-+ * alloc failure.
-+ */
-+static int
-+emit_expansion(const char *pattern, int brace_start, int brace_end,
-+    int sel_start, int sel_end, char ***patternsp, size_t *npatternsp)
-+{
-+      char *cp;
-+      int o = 0, tail_len = strlen(pattern + brace_end + 1);
-+
-+      if ((cp = malloc(brace_start + (sel_end - sel_start) +
-+          tail_len + 1)) == NULL)
-+              return -1;
-+
-+      /* Pattern before initial brace */
-+      if (brace_start > 0) {
-+              memcpy(cp, pattern, brace_start);
-+              o = brace_start;
-+      }
-+      /* Current braced selection */
-+      if (sel_end - sel_start > 0) {
-+              memcpy(cp + o, pattern + sel_start,
-+                  sel_end - sel_start);
-+              o += sel_end - sel_start;
-+      }
-+      /* Remainder of pattern after closing brace */
-+      if (tail_len > 0) {
-+              memcpy(cp + o, pattern + brace_end + 1, tail_len);
-+              o += tail_len;
-+      }
-+      cp[o] = '\0';
-+      if (append(cp, patternsp, npatternsp) != 0) {
-+              free(cp);
-+              return -1;
-+      }
-+      return 0;
-+}
-+
-+/*
-+ * Expand the first encountered brace in pattern, appending the expanded
-+ * patterns it yielded to the *patternsp array.
-+ *
-+ * Returns 0 on success or -1 on allocation failure.
-+ *
-+ * Signals whether expansion was performed via *expanded and whether
-+ * pattern was invalid via *invalid.
-+ */
-+static int
-+brace_expand_one(const char *pattern, char ***patternsp, size_t *npatternsp,
-+    int *expanded, int *invalid)
-+{
-+      int i;
-+      int in_bracket, brace_start, brace_end, brace_level;
-+      int sel_start, sel_end;
-+
-+      *invalid = *expanded = 0;
-+
-+      if (find_brace(pattern, &brace_start, &brace_end) != 0) {
-+              *invalid = 1;
-+              return 0;
-+      } else if (brace_start == -1)
-+              return 0;
-+
-+      in_bracket = brace_level = 0;
-+      for (i = sel_start = brace_start + 1; i < brace_end; i++) {
-+              switch (pattern[i]) {
-+              case '{':
-+                      if (in_bracket)
-+                              break;
-+                      brace_level++;
-+                      break;
-+              case '}':
-+                      if (in_bracket)
-+                              break;
-+                      brace_level--;
-+                      break;
-+              case '[':
-+                      in_bracket = 1;
-+                      break;
-+              case ']':
-+                      in_bracket = 0;
-+                      break;
-+              case '\\':
-+                      if (i < brace_end - 1)
-+                              i++; /* skip */
-+                      break;
-+              }
-+              if (pattern[i] == ',' || i == brace_end - 1) {
-+                      if (in_bracket || brace_level > 0)
-+                              continue;
-+                      /* End of a selection, emit an expanded pattern */
-+
-+                      /* Adjust end index for last selection */
-+                      sel_end = (i == brace_end - 1) ? brace_end : i;
-+                      if (emit_expansion(pattern, brace_start, brace_end,
-+                          sel_start, sel_end, patternsp, npatternsp) != 0)
-+                              return -1;
-+                      /* move on to the next selection */
-+                      sel_start = i + 1;
-+                      continue;
-+              }
-+      }
-+      if (in_bracket || brace_level > 0) {
-+              *invalid = 1;
-+              return 0;
-+      }
-+      /* success */
-+      *expanded = 1;
-+      return 0;
-+}
-+
-+/* Expand braces from pattern. Returns 0 on success, -1 on failure */
-+static int
-+brace_expand(const char *pattern, char ***patternsp, size_t *npatternsp)
-+{
-+      char *cp, *cp2, **active = NULL, **done = NULL;
-+      size_t i, nactive = 0, ndone = 0;
-+      int ret = -1, invalid = 0, expanded = 0;
-+
-+      *patternsp = NULL;
-+      *npatternsp = 0;
-+
-+      /* Start the worklist with the original pattern */
-+      if ((cp = strdup(pattern)) == NULL)
-+              return -1;
-+      if (append(cp, &active, &nactive) != 0) {
-+              free(cp);
-+              return -1;
-+      }
-+      while (nactive > 0) {
-+              cp = active[nactive - 1];
-+              nactive--;
-+              if (brace_expand_one(cp, &active, &nactive,
-+                  &expanded, &invalid) == -1) {
-+                      free(cp);
-+                      goto fail;
-+              }
-+              if (invalid)
-+                      fatal("%s: invalid brace pattern \"%s\"", __func__, cp);
-+              if (expanded) {
-+                      /*
-+                       * Current entry expanded to new entries on the
-+                       * active list; discard the progenitor pattern.
-+                       */
-+                      free(cp);
-+                      continue;
-+              }
-+              /*
-+               * Pattern did not expand; append the finename component to
-+               * the completed list
-+               */
-+              if ((cp2 = strrchr(cp, '/')) != NULL)
-+                      *cp2++ = '\0';
-+              else
-+                      cp2 = cp;
-+              if (append(xstrdup(cp2), &done, &ndone) != 0) {
-+                      free(cp);
-+                      goto fail;
-+              }
-+              free(cp);
-+      }
-+      /* success */
-+      *patternsp = done;
-+      *npatternsp = ndone;
-+      done = NULL;
-+      ndone = 0;
-+      ret = 0;
-+ fail:
-+      for (i = 0; i < nactive; i++)
-+              free(active[i]);
-+      free(active);
-+      for (i = 0; i < ndone; i++)
-+              free(done[i]);
-+      free(done);
-+      return ret;
-+}
-+
- void
- toremote(int argc, char **argv)
- {
-@@ -998,7 +1245,8 @@ sink(int argc, char **argv, const char *src)
-       unsigned long long ull;
-       int setimes, targisdir, wrerrno = 0;
-       char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048];
--      char *src_copy = NULL, *restrict_pattern = NULL;
-+      char **patterns = NULL;
-+      size_t n, npatterns = 0;
-       struct timeval tv[2];
- #define       atime   tv[0]
-@@ -1028,16 +1276,13 @@ sink(int argc, char **argv, const char *src)
-                * Prepare to try to restrict incoming filenames to match
-                * the requested destination file glob.
-                */
--              if ((src_copy = strdup(src)) == NULL)
--                      fatal("strdup failed");
--              if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) {
--                      *restrict_pattern++ = '\0';
--              }
-+              if (brace_expand(src, &patterns, &npatterns) != 0)
-+                      fatal("%s: could not expand pattern", __func__);
-       }
-       for (first = 1;; first = 0) {
-               cp = buf;
-               if (atomicio(read, remin, cp, 1) != 1)
--                      return;
-+                      goto done;
-               if (*cp++ == '\n')
-                       SCREWUP("unexpected <newline>");
-               do {
-@@ -1063,7 +1308,7 @@ sink(int argc, char **argv, const char *src)
-               }
-               if (buf[0] == 'E') {
-                       (void) atomicio(vwrite, remout, "", 1);
--                      return;
-+                      goto done;
-               }
-               if (ch == '\n')
-                       *--cp = 0;
-@@ -1138,9 +1383,14 @@ sink(int argc, char **argv, const char *src)
-                       run_err("error: unexpected filename: %s", cp);
-                       exit(1);
-               }
--              if (restrict_pattern != NULL &&
--                  fnmatch(restrict_pattern, cp, 0) != 0)
--                      SCREWUP("filename does not match request");
-+              if (npatterns > 0) {
-+                      for (n = 0; n < npatterns; n++) {
-+                              if (fnmatch(patterns[n], cp, 0) == 0)
-+                                      break;
-+                      }
-+                      if (n >= npatterns)
-+                              SCREWUP("filename does not match request");
-+              }
-               if (targisdir) {
-                       static char *namebuf;
-                       static size_t cursize;
-@@ -1299,7 +1549,15 @@ bad:                    run_err("%s: %s", np, strerror(errno));
-                       break;
-               }
-       }
-+done:
-+      for (n = 0; n < npatterns; n++)
-+              free(patterns[n]);
-+      free(patterns);
-+      return;
- screwup:
-+      for (n = 0; n < npatterns; n++)
-+              free(patterns[n]);
-+      free(patterns);
-       run_err("protocol error: %s", why);
-       exit(1);
- }
diff --git a/net/openssh/patches/1001-fix-compilation-with-openssl-built-without-ECC.patch b/net/openssh/patches/1001-fix-compilation-with-openssl-built-without-ECC.patch
deleted file mode 100644 (file)
index e430dfe..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 91b777c7064d9d91a1433a42b0bb31592388d1b4 Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Tue, 9 Oct 2018 16:17:42 -0300
-Subject: [PATCH] fix compilation with openssl built without ECC
-
-ECDSA code in openssh-compat.h and libressl-api-compat.c needs to be
-guarded by OPENSSL_HAS_ECC
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
-index de3e64a6..ae00ff59 100644
---- a/openbsd-compat/libressl-api-compat.c
-+++ b/openbsd-compat/libressl-api-compat.c
-@@ -152,7 +152,9 @@
- #include <openssl/dsa.h>
- #include <openssl/rsa.h>
- #include <openssl/evp.h>
-+#ifdef OPENSSL_HAS_ECC
- #include <openssl/ecdsa.h>
-+#endif
- #include <openssl/dh.h>
- #ifndef HAVE_DSA_GET0_PQG
-@@ -417,6 +419,7 @@ DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
- }
- #endif /* HAVE_DSA_SIG_SET0 */
-+#ifdef OPENSSL_HAS_ECC
- #ifndef HAVE_ECDSA_SIG_GET0
- void
- ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
-@@ -442,6 +445,7 @@ ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
-       return 1;
- }
- #endif /* HAVE_ECDSA_SIG_SET0 */
-+#endif /* OPENSSL_HAS_ECC */
- #ifndef HAVE_DH_GET0_PQG
- void
-diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
-index 9e0264c0..6a525f28 100644
---- a/openbsd-compat/openssl-compat.h
-+++ b/openbsd-compat/openssl-compat.h
-@@ -24,7 +24,9 @@
- #include <openssl/evp.h>
- #include <openssl/rsa.h>
- #include <openssl/dsa.h>
-+#ifdef OPENSSL_HAS_ECC
- #include <openssl/ecdsa.h>
-+#endif
- #include <openssl/dh.h>
- int ssh_compatible_openssl(long, long);
-@@ -161,6 +163,7 @@ void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
- #endif /* DSA_SIG_SET0 */
-+#ifdef OPENSSL_HAS_ECC
- #ifndef HAVE_ECDSA_SIG_GET0
- void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- #endif /* HAVE_ECDSA_SIG_GET0 */
-@@ -168,6 +171,7 @@ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
- #ifndef HAVE_ECDSA_SIG_SET0
- int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
- #endif /* HAVE_ECDSA_SIG_SET0 */
-+#endif /* OPENSSL_HAS_ECC */
- #ifndef HAVE_DH_GET0_PQG
- void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,
diff --git a/net/openssh/patches/1002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch b/net/openssh/patches/1002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch
deleted file mode 100644 (file)
index 7c1e15d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-From edfc2e18ef069ba600c8f4632ce1e3dc94a0669a Mon Sep 17 00:00:00 2001
-From: Eneas U de Queiroz <cote2004-github@yahoo.com>
-Date: Fri, 19 Oct 2018 10:04:24 -0300
-Subject: [PATCH 2/2] Fix OPENSSL_init_crypto call for openssl < 1.1
-
-Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-
-diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
-index 8b4a3627..590b66d1 100644
---- a/openbsd-compat/openssl-compat.c
-+++ b/openbsd-compat/openssl-compat.c
-@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
-       ENGINE_load_builtin_engines();
-       ENGINE_register_all_complete();
--#if OPENSSL_VERSION_NUMBER < 0x10001000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       OPENSSL_config(NULL);
- #else
-       OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
index 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 a4a048fcc8df9d862205d0130819ee4be3bb5eb3..4567ac50b9951d16d4b346086485ad58d1642977 100644 (file)
@@ -19,6 +19,7 @@ define Package/pppossh
   CATEGORY:=Network
   TITLE:=PPPoSSH (Point-to-Point Protocol over SSH)
   DEPENDS:=+ppp +resolveip @(PACKAGE_dropbear||PACKAGE_openssh-client)
+  PKGARCH:=all
 endef
 
 define Package/pppossh/description
index 62a33881f5dffae5caf0bb0c4a89f163df6083c9..083254b834bcf0553650009b1c9b12954fcd8abf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptpd
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/poptop
@@ -18,8 +18,6 @@ PKG_HASH:=8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/pptpd
index 294b00f4d7e542355ffae072b3b87a68415691ca..322eaaf1b5ef3f0db786a1caab4cc1ce41653429 100644 (file)
@@ -10,13 +10,14 @@ CHAP_SECRETS=/var/etc/chap-secrets
 OPTIONS_PPTP=/var/etc/options.pptpd
 
 validate_login_section() {
-       uci_validate_section pptpd login "${1}" \
+       uci_load_validate pptpd login "$1" "$2" \
                'username:string' \
-               'password:string'
+               'password:string' \
+               'remoteip:string'
 }
 
 validate_pptpd_section() {
-       uci_validate_section pptpd service "${1}" \
+       uci_load_validate pptpd service "$1" "$2" \
                'enabled:uinteger' \
                'localip:string' \
                'remoteip:string' \
@@ -25,21 +26,20 @@ validate_pptpd_section() {
 }
 
 setup_login() {
-       validate_login_section "${1}" || {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
 
-       [ -n "${username}" ] || return 0
-       [ -n "${password}" ] || return 0
+       [ -n "$username" ] || return 0
+       [ -n "$password" ] || return 0
+       [ -n "$remoteip" ] || remoteip=*
 
-       echo "${username} pptp-server ${password} *" >> $CHAP_SECRETS
+       echo "$username pptp-server $password $remoteip" >> $CHAP_SECRETS
 }
 
 setup_config() {
-       local enabled localip remoteip mppe
-
-       validate_pptpd_section "${1}" || {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -61,8 +61,8 @@ setup_config() {
 
 start_service() {
        config_load pptpd
-       setup_config pptpd || return
-       config_foreach setup_login login
+       validate_pptpd_section pptpd setup_config || return
+       config_foreach validate_login_section login setup_login
 
        ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets
 
@@ -70,3 +70,12 @@ start_service() {
        procd_set_param command $BIN -c $CONFIG --fg -o $OPTIONS_PPTP
        procd_close_instance
 }
+
+service_triggers () {
+       procd_add_reload_trigger "pptpd"
+
+       procd_open_validate
+       validate_pptpd_section
+       validate_login_section
+       procd_close_validate
+}
index f102735de633528644156a6725b4d2555cb7eba0..c5c0d89138d91f7d35c06eb5e7941186c17aee09 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
 PKG_VERSION:=0.11.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://prosody.im/downloads/source
@@ -30,7 +30,7 @@ define Package/prosody
   SUBMENU:=Instant Messaging
   DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua +luabitop
   TITLE:=XMPP server
-  URL:=http://prosody.im/
+  URL:=https://prosody.im/
   USERID:=prosody=54:prosody=54
 endef
 
@@ -44,10 +44,10 @@ define Package/prosody/conffiles
 /etc/prosody/prosody.cfg.lua
 endef
 
-TARGET_CFLAGS += $(FPIC) 
-
-TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib 
+TARGET_CFLAGS += $(FPIC) -std=gnu99
+TARGET_LDFLAGS += -shared
 
+MAKE_FLAGS += LD="$(TARGET_CC)"
 
 define Build/Configure
        # this is *NOT* GNU autoconf stuff
@@ -57,17 +57,11 @@ define Build/Configure
                --with-lua-include="$(STAGING_DIR)/usr/include" \
                --with-lua-lib="$(STAGING_DIR)/usr/lib" \
                --cflags="$(TARGET_CFLAGS)" \
-               --ldflags="$(TARGET_LDFLAGS) -llua -lm -ldl -shared" \
+               --ldflags="$(TARGET_LDFLAGS)" \
                --c-compiler="$(CC)" \
-               --linker="$(LD)" \
                --datadir="/etc/prosody/data" \
        )
 endef
-#      LDFLAGS="$(TARGET_LDFLAGS) -llua -lm -ldl" \
-
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
-       PREFIX="/usr" \
 
 define Package/prosody/install
        $(INSTALL_DIR) $(1)/etc/init.d
@@ -124,7 +118,7 @@ define Package/prosody/postinst
                paxctl  -v /usr/bin/ > /dev/null  2>&1
                [ $$? -ne 0 ] && {
                        cp /usr/bin/lua /tmp
-                       paxctl -c -m /tmp/lua > /dev/null  2>&1 
+                       paxctl -c -m /tmp/lua > /dev/null  2>&1
                        cp -f /tmp/lua /usr/bin/lua
                }
        }
index 3b409c163690f27d868d8ad80f4629d377b5ab27..1513fb7a518b73c2c1b9a89cc92367efccd665fa 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.40
+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:=ad2f2032a79ad41e871c00d28c94670c10ed74920de54d977fe0a33a65fcac76
+PKG_HASH:=5ee6b101e4e252ea98e3337da6542d73b7f33de49a89014276cc98a70142ab10
 
 PKG_LICENSE:=BSD-3
 PKG_LICENSE_FILES:=COPYING
@@ -30,7 +30,8 @@ endef
 
 CONFIGURE_ARGS += \
        --disable-pcap \
-       --disable-selinux
+       --disable-selinux \
+       --with-rngdev=/dev/urandom
 
 define Package/ptunnel-ng/install
        $(INSTALL_DIR) $(1)/usr/sbin
diff --git a/net/rosy-file-server/Makefile b/net/rosy-file-server/Makefile
new file mode 100644 (file)
index 0000000..c1a097d
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rosy-file-server
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+
+PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rosy-file-server
+  SUBMENU:=File Transfer
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Rosy File Server over HTTP
+  PKGARCH:=all
+endef
+
+define Package/rosy-file-server/description
+ This package is a configuration management for luci-app-rosy-file-server.
+endef
+
+define Package/rosy-file-server/conffiles
+/etc/config/rosy-file-server
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/rosy-file-server/install
+       $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config
+       $(INSTALL_BIN) ./files/rosyfs.init $(1)/etc/init.d/rosyfs
+       $(INSTALL_CONF) ./files/rosyfs.config $(1)/etc/config/rosyfs
+endef
+
+$(eval $(call BuildPackage,rosy-file-server))
diff --git a/net/rosy-file-server/files/rosyfs.config b/net/rosy-file-server/files/rosyfs.config
new file mode 100644 (file)
index 0000000..53ad71a
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+config rosyfs default
+
+       # Web title
+       option title    'Rosy File Server'
+
+       # Path to share
+       option target   '/www'
+
+       option disabled '0'
diff --git a/net/rosy-file-server/files/rosyfs.init b/net/rosy-file-server/files/rosyfs.init
new file mode 100755 (executable)
index 0000000..ebcd19d
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+
+START=99
+USE_PROCD=1
+SHARE_PATH=/www/rosyfs-share
+
+service_triggers() {
+       procd_add_reload_trigger rosyfs
+}
+
+start_service() {
+       config_load rosyfs
+       config_get disabled default disabled '0'
+       config_get target default target ''
+
+       [ $disabled -eq 1 ] && return
+
+       [ -n "$target" -a ! "$(readlink $SHARE_PATH)" = "$target" ] && {
+               rm -f $SHARE_PATH
+               ln -s $target $SHARE_PATH
+       }
+}
+
+stop_service() {
+       rm -f $SHARE_PATH
+}
index 24d31d20cf1873ecb9dd15ada63adf883cfaeb82..108c7711adc57c8e1599d7d7859e1817a445c861 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcbind
 PKG_VERSION:=1.2.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=@SF/rpcbind
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -10,13 +10,15 @@ PKG_HASH:=2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
+PKG_CPE_ID:=cpe:/a:rpcbind_project:rpcbind
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
 PKG_INSTALL:=1
 
 PKG_CONFIG_DEPENDS:= \
-       CONFIG_RPCBIND_LIBWRAP
+       CONFIG_RPCBIND_LIBWRAP \
+       CONFIG_RPCBIND_RMTCALLS
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -42,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
 
@@ -56,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/
index f56bc4e6f8023621eafb3b2cec43b4dd6c5f38ff..99157702a468b6560397ade1993d788453f99653 100644 (file)
@@ -1,7 +1,6 @@
 config SAMBA4_SERVER_ACL
        bool "ACL support (xattr)"
        depends on PACKAGE_samba4-server
-       select PACKAGE_acl
        help
                installs: sharesec
                        modules: vfs_acl_xattr vfs_acl_tdb vfs_posixacl
@@ -12,13 +11,9 @@ config SAMBA4_SERVER_ACL
 config SAMBA4_SERVER_AD_DC
        bool "Active Directory Domain Controller support (requires krb5-server) (EXPERIMENTAL)"
        depends on PACKAGE_samba4-server
-       select PACKAGE_python-base
        select PACKAGE_python-crypto
-       select PACKAGE_libopenssl
-       select PACKAGE_libgnutls
-       select PACKAGE_libopenldap
        help
-               installs: samba (meta-daemon) python-crypt ntlm_auth
+               installs: samba (meta-daemon) python-crypto ntlm_auth
                        scripts: samba-tool
 
                Run as a Active Directory Domain Controller
@@ -31,7 +26,6 @@ config SAMBA4_SERVER_AVAHI
        bool "Avahi support"
        depends on PACKAGE_samba4-server
        select SAMBA4_SERVER_VFS
-       select PACKAGE_libavahi-client
        help
                Announce Samba resources via DNS/DNS-SD using the Avahi daemon, for Linux/Mac clients.
        default y
@@ -81,7 +75,6 @@ config SAMBA4_SERVER_NETBIOS
 config SAMBA4_SERVER_WINBIND
        bool "Winbind support"
        depends on PACKAGE_samba4-server
-       depends on SAMBA4_SERVER_AD_DC
        help
                installs: winbindd (daemon) wbinfo
 
index e520c1059b0a2b76039b8b7fcba4c7974c977e70..b0f24f1415470b08b5f4c1ee0b8b53b9b653a4c1 100644 (file)
@@ -2,19 +2,25 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
-PKG_VERSION:=4.9.4
-PKG_RELEASE:=3
+PKG_VERSION:=4.9.6
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-3.0-only
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE_URL:=https://download.samba.org/pub/samba/stable/
+PKG_SOURCE_URL:=https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
+               https://ftp.gwdg.de/pub/samba/stable/ \
+               https://ftp.riken.jp/net/samba/samba/stable/ \
+               http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
+               http://samba.mirror.bit.nl/samba/ftp/stable/ \
+               https://download.samba.org/pub/samba/stable/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6d98a8d8bcccbe788e4bbb406362e6676311aca711a3f3cc9b3a404bb9ff0b4f
+PKG_HASH:=c9205a651a83d69e200fec9dd65e9fa360f0c75ab3275b3dcb74e5cbaec60807
 
-# Buildroot bug? Can't add target deps via '+SAMBA4_SERVER_AD_DC:python-crypto' (as work-around we select via config.in)
-PKG_BUILD_DEPENDS:=SAMBA4_SERVER_AD_DC:python-crypto nfs-kernel-server/host
+# samba4=(asn1_compile) e2fsprogs=(compile_et) nfs-kernel-server=(rpcgen)
+HOST_BUILD_DEPENDS:=nfs-kernel-server/host e2fsprogs/host
+PKG_BUILD_DEPENDS:=samba4/host
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_SAMBA4_SERVER_NETBIOS \
@@ -29,6 +35,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_kmod-fs-xfs
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
@@ -50,7 +57,7 @@ endef
 define Package/samba4-libs
   $(call Package/samba4/Default)
   TITLE+= libs
-  DEPENDS:= +zlib +libtirpc +krb5-libs +libpopt \
+  DEPENDS:= +zlib +libtirpc +libpopt +libcomerr \
        +PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
        +PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
        +SAMBA4_SERVER_VFS:attr \
@@ -63,15 +70,17 @@ define Package/samba4-server
   $(call Package/samba4/Default)
   TITLE+= server
   DEPENDS:= +samba4-libs
+  EXTRA_DEPENDS:=$(if $(CONFIG_SAMBA4_SERVER_AD_DC),python-crypto,)
 endef
 
 define Package/samba4-server/description
-  installs: smbd (daemon) smbpasswd pdbedit testparm
+  installs: smbd, nmbd (daemon) smbpasswd pdbedit testparm
 
-    This provides the basic fileserver service and is the minimum needed to serve file shares.
-    HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
+  This provides the basic fileserver service and is the minimum needed to serve file shares.
+  HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
 endef
 
+# BUG: We cant add DEPENDS:= +SAMBA4_SERVER_AD_DC:python-crypto, so this only happens here via select!
 define Package/samba4-server/config
   select PACKAGE_wsdd2
   source "$(SOURCE)/Config.in"
@@ -120,16 +129,33 @@ CONFIGURE_VARS += \
        CPP="$(TARGET_CROSS)cpp"
 
 CONFIGURE_CMD = ./buildtools/bin/waf
+HOST_CONFIGURE_CMD = ./buildtools/bin/waf
 
 # Strip options that WAF configure script does not recognize
 CONFIGURE_ARGS:=$(filter-out   \
-       --host=%                \
-       --build=%               \
-       --program-suffix=%      \
+       --target=%                      \
+       --host=%                        \
+       --build=%                       \
+       --program-prefix=%      \
+       --program-suffix=%      \
        --disable-nls           \
        --disable-ipv6          \
        , $(CONFIGURE_ARGS))
 
+HOST_CONFIGURE_ARGS:=$(filter-out      \
+       --target=%                      \
+       --host=%                        \
+       --build=%                       \
+       --program-prefix=%      \
+       --program-suffix=%      \
+       --disable-nls           \
+       --disable-ipv6          \
+       , $(HOST_CONFIGURE_ARGS))
+
+# Waf needs the "configure" argument
+CONFIGURE_ARGS:=configure $(CONFIGURE_ARGS)
+HOST_CONFIGURE_ARGS:=configure $(HOST_CONFIGURE_ARGS)
+
 CONFIGURE_ARGS += \
                --hostcc="$(HOSTCC)" \
                --cross-compile \
@@ -156,6 +182,35 @@ CONFIGURE_ARGS += \
                --without-regedit \
                --without-gpgme
 
+HOST_CONFIGURE_ARGS += \
+               --hostcc="$(HOSTCC)" \
+               --disable-cups \
+               --disable-iprint \
+               --disable-cephfs \
+               --disable-fault-handling \
+               --disable-glusterfs \
+               --disable-rpath \
+               --disable-rpath-install \
+               --disable-rpath-private-install \
+               --enable-fhs \
+               --without-automount \
+               --without-iconv \
+               --without-lttng \
+               --without-ntvfs-fileserver \
+               --without-pam \
+               --without-systemd \
+               --without-utmp \
+               --without-dmapi \
+               --without-fam \
+               --without-gettext \
+               --without-regedit \
+               --without-gpgme
+
+HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
+       --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
+       --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+HOST_CONFIGURE_VARS += python_LDFLAGS="" python_LIBDIR=""
+
 # Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
 # Support for Nettle wasn't comitted
 ifdef CONFIG_TARGET_x86_64
@@ -170,13 +225,6 @@ CONFIGURE_ARGS += \
                --with-piddir=/var/run \
                --with-privatedir=/etc/samba
 
-CONFIGURE_ARGS += \
-               --with-system-mitkrb5 "$(STAGING_DIR)/usr" \
-               --with-system-mitkdc=/usr/sbin/krb5kdc
-
-               ## embedded-heimdal
-               # --bundled-libraries=talloc,tevent,tdb,ldb,com_err,cmocka,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
-
 ifeq ($(CONFIG_SAMBA4_SERVER_AVAHI),y)
        CONFIGURE_ARGS += --enable-avahi
 else
@@ -193,10 +241,11 @@ else
        CONFIGURE_ARGS += --without-acl-support
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-       CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap --with-experimental-mit-ad-dc
+       CONFIGURE_ARGS += --enable-gnutls --with-dnsupdate --with-ads --with-ldap
        TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/python2.7 $(TARGET_CFLAGS)
 else
-       CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo --disable-gnutls --without-dnsupdate --without-ads --without-ldap
+       CONFIGURE_ARGS += --without-ad-dc --without-json-audit --without-libarchive --disable-python --nopyc --nopyo \
+               --disable-gnutls --without-dnsupdate --without-ads --without-ldap
        CONFIGURE_VARS += \
                python_LDFLAGS="" \
                python_LIBDIR=""
@@ -212,46 +261,55 @@ SAMBA4_IDMAP_MODULES_SHARED :=
 SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
 SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,auth_script,
 SAMBA4_VFS_MODULES :=vfs_default,
+SAMBA4_VFS_MODULES_SHARED :=
 ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,
 ifeq ($(CONFIG_PACKAGE_kmod-fs-btrfs),y)
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_btrfs,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_btrfs,
 endif
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_VFSX),y)
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_aio_fork,vfs_aio_pthread,vfs_netatalk,vfs_dirsort,vfs_fileid,
 ifeq ($(CONFIG_PACKAGE_kmod-fs-xfs),y)
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_linux_xfs_sgid,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_linux_xfs_sgid,
 endif
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_QUOTAS),y)
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_default_quota,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_default_quota,
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_ACL),y)
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,vfs_acl_xattr,vfs_acl_tdb,
+       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_acl_xattr,vfs_acl_tdb,
        # vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
        # vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-       SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,
+       SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,pdb_ldapsam,
        SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_samba4,
-       SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_audit,vfs_extd_audit,vfs_full_audit,
+       SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_audit,vfs_extd_audit,vfs_full_audit,
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
-       SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_passdb,idmap_nss,idmap_tdb,idmap_tdb2,idmap_script,nss_info_template,
-       SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_ad,idmap_rfc2307,
+       SAMBA4_IDMAP_MODULES :=$(SAMBA4_IDMAP_MODULES)idmap_tdb,idmap_passdb,idmap_nss,nss_info_template,
+       SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_autorid,idmap_rid,idmap_hash,idmap_tdb2,idmap_script,
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+       SAMBA4_IDMAP_MODULES_SHARED :=$(SAMBA4_IDMAP_MODULES_SHARED)idmap_ad,idmap_ldap,idmap_rfc2307,
        # idmap_ad needs --with-ads
        # idmap_rfc2307 needs ldap headers
+endif
        SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_winbind,
 endif
 
-SAMBA4_MODULES :=${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}${SAMBA4_VFS_MODULES}
-SAMBA4_MODULES_SHARDED :=${SAMBA4_IDMAP_MODULES_SHARED}
+SAMBA4_MODULES :=${SAMBA4_VFS_MODULES}${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}${SAMBA4_IDMAP_MODULES}
+SAMBA4_MODULES_SHARDED :=${SAMBA4_VFS_MODULES_SHARED}${SAMBA4_IDMAP_MODULES_SHARED}
 
 CONFIGURE_ARGS += \
                --with-static-modules=$(SAMBA4_MODULES)!DEFAULT,!FORCED \
                --with-shared-modules=$(SAMBA4_MODULES_SHARDED)!DEFAULT,!FORCED
 
+HOST_CONFIGURE_ARGS += \
+               --with-static-modules=!DEFAULT,!FORCED \
+               --with-shared-modules=!DEFAULT,!FORCED
+
 # Setup build/install targets
 # CONFIG_PACKAGE_samba4-server
 BUILD_TARGETS_SERVER :=smbd/smbd,smbpasswd,pdbedit,testparm
@@ -263,7 +321,7 @@ ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
        BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),nmbd
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-       BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth
+       BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),samba,nsstest,ntlm_auth,samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_WINBIND),y)
        BUILD_TARGETS_SERVER :=$(BUILD_TARGETS_SERVER),winbindd,wbinfo,winbind_krb5_locator
@@ -271,20 +329,35 @@ endif
 # CONFIG_PACKAGE_samba4-client
 BUILD_TARGETS_CLIENT :=client/smbclient,client/cifsdd
 # CONFIG_PACKAGE_samba4-admin
-BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas
+BUILD_TARGETS_ADMIN :=net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas,eventlogadm
 # CONFIG_PACKAGE_samba4-utils
 BUILD_TARGETS_UTILS :=smbstatus,smbtree,smbget,mvxattr,nmblookup
 
 # lib bundling
 # NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
-CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
-#CONFIGURE_ARGS += --nonshared-binary=$(BUILD_TARGETS_SERVER)
+CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka
+HOST_CONFIGURE_ARGS += --builtin-libraries=replace --nonshared-binary=asn1_compile
+
 ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,pytalloc-util,pyldb-util,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
 else
-CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace,NONE
+CONFIGURE_ARGS += --bundled-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,NONE
 endif
-CONFIGURE_ARGS += --private-libraries=talloc,tevent,texpect,tdb,ldb,tdr,cmocka,replace
+# BUG: --private-libraries, Does not work for System possible libs, will not get "samba4" suffix!
+CONFIGURE_ARGS += --private-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace
+# CONFIGURE_ARGS += --disable-symbol-versions
+
+define Host/Compile
+       (cd $(HOST_BUILD_DIR); \
+               ./buildtools/bin/waf build \
+               --targets=asn1_compile \
+       )
+endef
+
+define Host/Install
+       $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/asn1_compile $(STAGING_DIR_HOSTPKG)/bin/
+endef
 
 define Build/Prepare
        $(Build/Prepare/Default)
@@ -303,15 +376,16 @@ define Build/Configure
        echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
        # NOTE: For some unknown reason this answer is not needed on some hosts/distros, yet needed on others?
        echo 'Checking whether POSIX capabilities are available: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
-       $(call Build/Configure/Default,configure)
+       $(call Build/Configure/Default)
 endef
 
 # BUG: We need to use "waf install --targets=" otherwise a "make install" or "waf install" will retrigger a full recompile of all possible targets!
 define Build/Compile
        (cd $(PKG_BUILD_DIR); \
-               ./buildtools/bin/waf install -j$(shell nproc) \
-               --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
+               ./buildtools/bin/waf install \
+               --jobs=$(shell nproc) \
                --destdir="$(PKG_INSTALL_DIR)" \
+               --targets=$(SAMBA4_MODULES)$(SAMBA4_MODULES_SHARDED)$(BUILD_TARGETS_SERVER),$(BUILD_TARGETS_UTILS),$(BUILD_TARGETS_ADMIN),$(BUILD_TARGETS_CLIENT) \
        )
 endef
 
@@ -323,6 +397,21 @@ define Package/samba4-libs/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/*.so* $(1)/usr/lib/
+       
+       $(INSTALL_DIR) $(1)/usr/lib/samba/vfs $(1)/usr/lib/samba/idmap $(1)/usr/lib/samba/ldb $(1)/usr/lib/samba/krb5
+       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
+               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
+       fi
+       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
+               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
+       fi
+       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/krb5 ]; then \
+               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/krb5 $(1)/usr/lib/samba/; \
+       fi
+ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
+       $(INSTALL_DIR) $(1)/usr/lib/python2.7
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
+endif
 endef
 
 define Package/samba4-client/install
@@ -333,6 +422,8 @@ endef
 define Package/samba4-admin/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{net,smbcontrol,profiles,rpcclient,smbcacls,smbcquotas} $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/eventlogadm $(1)/usr/sbin/
 endef
 
 define Package/samba4-utils/install
@@ -341,27 +432,15 @@ define Package/samba4-utils/install
 endef
 
 define Package/samba4-server/install
-       $(INSTALL_DIR) $(1)/usr/lib/samba
-       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/idmap ]; then \
-               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/idmap $(1)/usr/lib/samba/; \
-       fi
-       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/auth ]; then \
-               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/auth $(1)/usr/lib/samba/; \
-       fi
-       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/vfs ]; then \
-               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/vfs $(1)/usr/lib/samba/; \
-       fi
-       if [ -d $(PKG_INSTALL_DIR)/usr/lib/samba/pdb ]; then \
-               $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba/pdb $(1)/usr/lib/samba/; \
-       fi
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
 ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7 $(1)/usr/lib/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,smbtar} $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns} $(1)/usr/sbin/
+       # waf does not install those?
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{samba4kinit,samba4kgetcred,samba4kpasswd,samba4ktutil} $(1)/usr/bin/
 endif
 ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
@@ -389,8 +468,10 @@ define Package/samba4-server/conffiles
 /etc/samba/idmap.ldb
 /etc/samba/lmhosts
 /etc/nsswitch.conf
+/etc/krb5.conf
 endef
 
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,samba4-libs))
 $(eval $(call BuildPackage,samba4-server))
 $(eval $(call BuildPackage,samba4-client))
index 09714f0167fd0860c16ca6fc66527780b7c0065c..7e74a0c45b0908358ee5460603c62c47c57db410 100644 (file)
@@ -59,7 +59,12 @@ smb_header() {
 EOT
        }
 
-       [ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+       [ -e /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf
+       
+       if [ -f /etc/samba/smb.conf ]; then
+               logger -t 'samba4-server' "Local custom /etc/samba/smb.conf file detected, all luci/config settings are ignored!"
+       fi
+       
 }
 
 smb_add_share() {
index 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 d83f795aea2d61901e1b06199044a1053a905083..d66632fa41b963b485242e0d16158232dbb24ab4 100644 (file)
@@ -9,8 +9,4 @@ config SEAFILE_FUSE_SUPPORT
 config SEAFILE_CONSOLE_SUPPORT
        bool "Enable seafile server console"
        default n
-
-config SEAFILE_RIAK_SUPPORT
-       bool "Enable support for riak backend"
-       default n
 endmenu
index b4b77ad806bb1f0e3c3645af2e7359112df5381a..cdb6d8984472d42ad0093d57fb44144a7c234ee5 100644 (file)
@@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-server
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+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
@@ -24,16 +25,23 @@ include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 include ../../lang/python/python-package.mk
 
+# Check that the actual Makefile version-relase match the above.
+$(eval $(shell awk '/^PKG_VERSION.*=/ { print "SEAHUB_" $$$$0 }' ../seafile-seahub/Makefile))
+ifneq ($(PKG_VERSION),$(SEAHUB_PKG_VERSION))
+    $(error $(if $(SEAHUB_PKG_VERSION), \
+               Version mismatch between seafile-seahub ($(SEAHUB_PKG_VERSION)) and \
+               seafile-server ($(PKG_VERSION)), \
+               Could not get PKG_VERSION from seafile-seahub Makefile))
+endif
+
 define Package/seafile-server
     SECTION:=net
     CATEGORY:=Network
     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 \
                +libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
-    EXTRA_DEPENDS:=seafile-seahub (=6.3.4-1)
     MENU:=1
 endef
 
@@ -45,11 +53,7 @@ define Package/seafile-server/description
    Open source cloud storage with advanced features on privacy protection and teamwork.
 endef
 
-CONFIGURE_ARGS += --disable-client \
-                   --enable-server \
-                   --enable-python \
-                   --disable-static-build \
-                   --disable-server-pkg
+CONFIGURE_ARGS += --enable-python
 
 ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
        CONFIGURE_ARGS += --enable-fuse
@@ -64,12 +68,6 @@ else
        CONFIGURE_ARGS += --disable-console
 endif
 
-ifeq ($(CONFIG_SEAFILE_RIAK_SUPPORT),y)
-       CONFIGURE_ARGS += --enable-riak
-else
-       CONFIGURE_ARGS += --disable-riak
-endif
-
 PKG_BUILD_DEPENDS:=vala/host libevhtp
 
 # This is required as python-package.mk overrides the default setting of having interlinking enabled
index 525f0d6457328c48c9075d535f577f4d894a8679..273a5807b1f5dc0925389012530db463fc081408 100644 (file)
@@ -1,17 +1,56 @@
+From 115a4583deb9ae11adbc419ea87c990d0b8572fe Mon Sep 17 00:00:00 2001
+From: Joffrey Darcq <j-off@live.fr>
+Date: Sat, 28 Apr 2018 22:27:28 +0200
+Subject: [PATCH 1/2] fix django version 1.11
+
+---
+ tools/seafile-admin | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
 diff --git a/tools/seafile-admin b/tools/seafile-admin
-index 495ceab..72b6a07 100755
+index 5e3658b..38e7288 100755
 --- a/tools/seafile-admin
 +++ b/tools/seafile-admin
-@@ -502,7 +502,7 @@ def init_seahub():
+@@ -518,10 +518,10 @@ def init_seahub():
+ def check_django_version():
+-    '''Requires django 1.8'''
++    '''Requires django 1.11'''
+     import django
+-    if django.VERSION[0] != 1 or django.VERSION[1] != 8:
+-        error('Django 1.8 is required')
++    if django.VERSION[0] != 1 or django.VERSION[1] != 11:
++        error('Django 1.11 is required')
+     del django
+
+From bf69ff1cf1080081eae5d8115842c26468746736 Mon Sep 17 00:00:00 2001
+From: Joffrey Darcq <j-off@live.fr>
+Date: Sun, 3 Jun 2018 15:51:54 +0200
+Subject: [PATCH 2/2] fix django version 1.11
+
+---
+ tools/seafile-admin | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/seafile-admin b/tools/seafile-admin
+index 38e7288..c16aab6 100755
+--- a/tools/seafile-admin
++++ b/tools/seafile-admin
+@@ -499,8 +499,8 @@ def init_seahub():
      # create seahub_settings.py
      create_seahub_settings_py()
  
 -    argv = [PYTHON, 'manage.py', 'syncdb']
+-    # Set proper PYTHONPATH before run django syncdb command
 +    argv = [PYTHON, 'manage.py', 'migrate']
-     # Set proper PYTHONPATH before run django syncdb command
++    # Set proper PYTHONPATH before run django migrate command
      env = get_seahub_env()
  
-@@ -512,7 +512,7 @@ def init_seahub():
+     print
+@@ -509,7 +509,7 @@ def init_seahub():
      print
  
      if run_argv(argv, cwd=seahub_dir, env=env) != 0:
index d28009248f59dccdc784fa600ddc722a72aeb69f..30181ce25af1bfce136e6a5a7719c1b76fb692c4 100644 (file)
@@ -1,4 +1,6 @@
-## components
+Skip to [recipes](#recipes) for quick setup instructions
+
+# components
 
 `ss-local` provides SOCKS5 proxy with UDP associate support.
 
@@ -20,7 +22,7 @@
 
 `ss-server`, the "ss server" in the above diagram
 
-## uci
+# uci
 
 Option names are the same as those used in json config files.  Check `validate_xxx` func definition of the [service script](files/shadowsocks-libev.init) and shadowsocks-libev's own documentation for supported options and expected value types.  A [sample config file](files/shadowsocks-libev.config) is also provided for reference.
 
@@ -73,7 +75,7 @@ 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
 
-## notes and faq
+# notes and faq
 
 Useful paths and commands for debugging
 
@@ -95,3 +97,76 @@ Useful paths and commands for debugging
 ss-redir needs to open a new socket and setsockopt IP_TRANSPARENT when sending udp reply to client.  This requires `CAP_NET_ADMIN` and as such the process cannot run as `nobody`
 
 ss-local, ss-redir, etc. supports specifying an array of remote ss server, but supporting this in uci seems to be overkill.  The workaround can be defining multiple `server` sections and multiple `ss-redir` instances with `reuse_port` enabled
+
+# recipes
+
+## forward all
+
+This will setup firewall rules to forward almost all incoming tcp/udp and locally generated tcp traffic (excluding those to private addresses like 192.168.0.0/16 etc.) through remote shadowsocks server
+
+Install components.
+Retry each command till it succeed
+
+       opkg install shadowsocks-libev-ss-redir
+       opkg install shadowsocks-libev-ss-rules
+       opkg install shadowsocks-libev-ss-tunnel
+
+Edit uci config `/etc/config/shadowsocks-libev`.
+Replace `config server 'sss0'` section with parameters of your own remote shadowsocks server.
+As for other options, change them only when you know the effect.
+
+       config server 'sss0'
+               option disabled 0
+               option server '_sss_addr_'
+               option server_port '_sss_port_'
+               option password '********'
+               option method 'aes-256-cfb'
+
+       config ss_tunnel
+               option disabled 0
+               option server 'sss0'
+               option local_address '0.0.0.0'
+               option local_port '8053'
+               option tunnel_address '8.8.8.8:53'
+               option mode 'tcp_and_udp'
+
+       config ss_redir ssr0
+               option disabled 0
+               option server 'sss0'
+               option local_address '0.0.0.0'
+               option local_port '1100'
+               option mode 'tcp_and_udp'
+               option reuse_port 1
+
+       config ss_rules 'ss_rules'
+               option disabled 0
+               option redir_tcp 'ssr0'
+               option redir_udp 'ssr0'
+               option src_default 'checkdst'
+               option dst_default 'forward'
+               option local_default 'forward'
+
+Restart shadowsocks-libev components
+
+       /etc/init.d/shadowsocks-libev restart
+
+Check if things are in place
+
+       iptables-save | grep ss_rules
+       netstat -lntp | grep -E '8053|1100'
+       ps ww | grep ss-
+
+Edit `/etc/config/dhcp`, add a line to the first dnsmasq section like the following to let it use local tunnel endpoint for upstream dns query
+
+       config dnsmasq
+               ...
+               list server '127.0.0.1#8053'
+
+Restart dnsmasq
+
+       /etc/init.d/dnsmasq restart
+
+Check network on your computer
+
+       nslookup www.google.com
+       curl -vv https://www.google.com
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 30c3d7f6a4be57cfc3fac500a5eb2d437b025a79..2f65527e15785d4c8ed4bab269455a3c74acc56c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snort
 PKG_VERSION:=2.9.11.1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
index c3d962902bc8e79f4a9ce5f966628bb8362236da..7905c6ff30c2fecc26d042fc29fd5a23f7d85261 100644 (file)
@@ -8,26 +8,29 @@ USE_PROCD=1
 PROG=/usr/bin/snort
 
 validate_snort_section() {
-       uci_validate_section snort snort "${1}" \
+       uci_load_validate snort snort "$1" "$2" \
                'config_file:string' \
                'interface:string'
 }
 
-start_service() {
-       local config_file interface
-
-       validate_snort_section snort || {
+start_snort_instance() {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
 
        procd_open_instance
        procd_set_param command $PROG "-q" "--daq-dir" "/usr/lib/daq/" "-i" "$interface" "-c" "$config_file" "-s" "-N"
-       procd_set_param file $CONFIGFILE
+       procd_set_param file $config_file
        procd_set_param respawn
        procd_close_instance
 }
 
+start_service()
+{
+       validate_snort_section snort start_snort_instance
+}
+
 stop_service()
 {
        service_stop ${PROG}
index dff030c20747cbf8bb450b947d01c935ead859db..419051e93a3d4fba72e7ba6b1588cf1a8a5d0a23 100644 (file)
@@ -119,7 +119,7 @@ diff -u --recursive snort-2.9.11.1-vanilla/configure.in snort-2.9.11.1/configure
 -]])],
 -[have_daq_ext_modflow="yes"],
 -[have_daq_ext_modflow="no"])
-+have_daq_ext_modflow="no"
++have_daq_ext_modflow="yes"
  AC_MSG_RESULT($have_daq_ext_modflow)
  if test "x$have_daq_ext_modflow" = "xyes"; then
      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_EXT_MODFLOW"
@@ -160,7 +160,7 @@ diff -u --recursive snort-2.9.11.1-vanilla/configure.in snort-2.9.11.1/configure
 -]])],
 -[have_daq_data_channel_flags="yes"],
 -[have_daq_data_channel_flags="no"])
-+have_daq_data_channel_flags="no"
++have_daq_data_channel_flags="yes"
  AC_MSG_RESULT($have_daq_data_channel_flags)
  if test "x$have_daq_data_channel_flags" = "xyes"; then
      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_PARAMS"
@@ -180,7 +180,7 @@ diff -u --recursive snort-2.9.11.1-vanilla/configure.in snort-2.9.11.1/configure
 -]])],
 -[have_daq_data_channel_separate_ip_versions="yes"],
 -[have_daq_data_channel_separate_ip_versions="no"])
-+have_daq_data_channel_separate_ip_versions="no"
++have_daq_data_channel_separate_ip_versions="yes"
  AC_MSG_RESULT($have_daq_data_channel_separate_ip_versions)
  if test "x$have_daq_data_channel_separate_ip_versions" = "xyes"; then
      CCONFIGFLAGS="${CCONFIGFLAGS} -DHAVE_DAQ_DATA_CHANNEL_SEPARATE_IP_VERSIONS"
diff --git a/net/snort3/Makefile b/net/snort3/Makefile
new file mode 100644 (file)
index 0000000..73c6ce8
--- /dev/null
@@ -0,0 +1,103 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=snort3
+PKG_VERSION:=3.0.0-beta
+PKG_VERSION_SHORT:=3.0.0
+PKG_RELEASE:=3
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_SOURCE:=snort-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
+PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/snort3
+  SUBMENU:=Firewall
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libstdcpp +libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
+  TITLE:=Lightweight Network Intrusion Detection System
+  URL:=http://www.snort.org/
+  MENU:=1
+endef
+
+define Package/snort3/description
+  Snort is an open source network intrusion detection and prevention system.
+  It is capable of performing real-time traffic analysis, alerting, blocking
+  and packet logging on IP networks.  It utilizes a combination of protocol
+  analysis and pattern matching in order to detect anomalies, misuse and
+  attacks.
+endef
+
+CMAKE_OPTIONS += \
+       -DENABLE_STATIC_DAQ:BOOL=NO \
+       -DENABLE_COREFILES:BOOL=NO \
+       -DENABLE_GDB:BOOL=NO \
+       -DMAKE_DOC:BOOL=NO \
+       -DMAKE_HTML_DOC:BOOL=NO \
+       -DMAKE_PDF_DOC:BOOL=NO \
+       -DMAKE_TEXT_DOC:BOOL=NO \
+       -DHAVE_LZMA=OFF
+
+TARGET_CFLAGS  += -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -ltirpc
+
+define Package/snort3/conffiles
+/etc/config/snort
+endef
+
+define Package/snort3/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/snort  \
+               $(1)/usr/bin/
+
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
+               $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/usr/lib/snort
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
+               $(1)/usr/lib/snort/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
+               $(1)/usr/lib/snort/
+
+       $(INSTALL_DIR) $(1)/usr/share/lua
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
+               $(1)/usr/share/lua/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.lua \
+               $(1)/usr/share/lua/
+
+       $(INSTALL_DIR) $(1)/etc/snort
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) \
+               ./files/snort.init \
+               $(1)/etc/init.d/snort
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) \
+               ./files/snort.config \
+               $(1)/etc/config/snort
+endef
+
+$(eval $(call BuildPackage,snort3))
diff --git a/net/snort3/files/snort.config b/net/snort3/files/snort.config
new file mode 100644 (file)
index 0000000..c402ec5
--- /dev/null
@@ -0,0 +1,4 @@
+config snort 'snort'
+       option config_dir '/etc/snort/etc/'
+       option alert_module 'alert_syslog'
+       option interface 'eth0'
diff --git a/net/snort3/files/snort.init b/net/snort3/files/snort.init
new file mode 100644 (file)
index 0000000..4549e26
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/bin/snort
+
+validate_snort_section() {
+       uci_validate_section snort snort "${1}" \
+               'config_dir:string' \
+               'alert_module:string' \
+               'interface:string'
+}
+
+start_service() {
+       local config_file interface
+
+       validate_snort_section snort || {
+               echo "validation failed"
+               return 1
+       }
+
+       procd_open_instance
+       procd_set_param command $PROG -q --daq-dir /usr/lib/daq/ -i "$interface" -c "$config_dir/snort.lua" -A "$alert_module"
+       procd_set_param env SNORT_LUA_PATH="$config_dir"
+       procd_set_param file $CONFIGFILE
+       procd_set_param respawn
+       procd_close_instance
+}
+
+stop_service()
+{
+       service_stop ${PROG}
+}
+
+service_triggers()
+{
+       procd_add_reload_trigger "snort"
+       procd_add_validation validate_snort_section
+}
diff --git a/net/snort3/patches/001-compile.patch b/net/snort3/patches/001-compile.patch
new file mode 100644 (file)
index 0000000..09669a3
--- /dev/null
@@ -0,0 +1,52 @@
+diff -u --recursive snort-3.0.0-vanilla/daqs/daq_file.c snort-3.0.0/daqs/daq_file.c
+--- snort-3.0.0-vanilla/daqs/daq_file.c        2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/daqs/daq_file.c        2019-03-28 23:03:25.292770141 -0400
+@@ -33,7 +33,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <daq_api.h>
+ #include <sfbpf_dlt.h>
+diff -u --recursive snort-3.0.0-vanilla/daqs/daq_hext.c snort-3.0.0/daqs/daq_hext.c
+--- snort-3.0.0-vanilla/daqs/daq_hext.c        2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/daqs/daq_hext.c        2019-03-28 22:54:15.738207157 -0400
+@@ -35,7 +35,7 @@
+ #include <arpa/inet.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <sys/socket.h>
+ #include <daq_api.h>
+diff -u --recursive snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc
+--- snort-3.0.0-vanilla/src/network_inspectors/appid/service_plugins/service_rpc.cc    2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/src/network_inspectors/appid/service_plugins/service_rpc.cc    2019-03-28 22:32:04.211783669 -0400
+@@ -27,6 +27,7 @@
+ #include <netdb.h>
++#include <tirpc/rpc/rpcent.h>
+ #if defined(__FreeBSD__) || defined(__OpenBSD__)
+ #include <rpc/rpc.h>
+ #elif defined(__sun)
+diff -u --recursive snort-3.0.0-vanilla/src/utils/util.cc snort-3.0.0/src/utils/util.cc
+--- snort-3.0.0-vanilla/src/utils/util.cc      2018-08-28 02:01:02.000000000 -0400
++++ snort-3.0.0/src/utils/util.cc      2019-03-28 22:16:16.860942230 -0400
+@@ -605,13 +605,8 @@
+ {
+     static THREAD_LOCAL char buf[128];
+-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE < 200112L && \
+-        defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 600) || _GNU_SOURCE
+-    return strerror_r(errnum, buf, sizeof(buf));
+-#else
+     (void)strerror_r(errnum, buf, sizeof(buf));
+     return buf;
+-#endif
+ }
+ char* snort_strndup(const char* src, size_t dst_size)
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 09c3919315877009738c019eaa059f609b7135d5..c57cff1484377063ef15517b86cd6d8d62acf949 100644 (file)
@@ -12,7 +12,7 @@ PKG_NAME:=softethervpn
 PKG_VERSION:=4.28-9669
 PKG_VERREL:=beta
 PKG_VERDATE:=2018.09.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
 PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/
diff --git a/net/softethervpn/patches/110-no-m64.patch b/net/softethervpn/patches/110-no-m64.patch
new file mode 100644 (file)
index 0000000..5fc3e61
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/src/makefiles/linux_64bit.mak
++++ b/src/makefiles/linux_64bit.mak
+@@ -29,9 +29,9 @@ OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT
+ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+-OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -m64
++OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char
+-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
++OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+ INSTALL_BINDIR=/usr/bin/
+ INSTALL_VPNSERVER_DIR=/usr/vpnserver/
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 4433d0668eb0b686163fddd6d4bbb9985cac6e74..008ad4b3b698ee773c77399a3c9d4229bf1972b3 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squid
-PKG_VERSION:=4.4
-PKG_RELEASE:=2
+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 ed5a096236c204ca968b913b4ef4f6922e64a033..4faa1ce0dfe2804fee6df71c92b9787652240bb6 100644 (file)
@@ -10,7 +10,7 @@ CONFIGFILE="/tmp/squid/squid.conf"
 MIMETABLE="/tmp/squid/mime.conf"
 
 validate_squid_section() {
-       uci_validate_section squid squid "${1}" \
+       uci_load_validate squid squid "$1" "$2" \
                'config_file:string' \
                'http_port:port:3128' \
                'http_port_options:string' \
@@ -27,10 +27,10 @@ create_squid_user() {
        group_exists squid || group_add squid $USERID && group_add_user squid squid
 }
 
-start_service() {
-       local config_file http_port http_port_options ssldb ssldb_options coredump_dir visible_hostname pinger_enable
+start_squid_instance() {
+       local config_dir
 
-       validate_squid_section squid || {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -57,9 +57,14 @@ start_service() {
        procd_close_instance
 }
 
+start_service()
+{
+       validate_squid_section squid start_squid_instance
+}
+
 stop_service()
 {
-        ${PROG} -f $CONFIGFILE -N -k shutdown 2>/dev/null
+       $PROG -f $CONFIGFILE -N -k shutdown 2>/dev/null
 }
 
 service_triggers()
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 03f61140d5f35eed19e8c93569392f116b82693b..f2c2e00cf5154ae9417095181697d51ecf460570 100644 (file)
@@ -22,6 +22,7 @@ define Package/sshtunnel
   SUBMENU:=SSH
   TITLE:=Manages Local and Remote openssh ssh(1) tunnels
   DEPENDS:=+openssh-client
+  PKGARCH:=all
 endef
 
 define Package/sshtunnel/description
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
 
index 97f47037245b4d05c860fd2b541230b6da49741d..fa65f3c752a242bc86485be44fe02fddcaa88ee6 100644 (file)
@@ -4,26 +4,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tgt
-PKG_VERSION:=1.0.75
-PKG_RELEASE:=2
+PKG_VERSION:=1.0.76
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=1c719fdccc6ddc8e5de57a6e546aa64f41056a2fb1d710b8b2a22f65e08f5b90
+PKG_HASH:=fda84ae0cfc71e2b67ca2d073978f60cb52feea5a697601938ff86656bfdd8f9
 
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 PKG_LICENSE:=GPL-2.0
 
 PKG_USE_MIPS16:=0
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/tgt
-  SECTION:=net
-  CATEGORY:=Network
-  URL:=http://stgt.sourceforge.net/
-  TITLE:=userspace iSCSI target
-  DEPENDS:=+libpthread +libaio
+       SECTION:=net
+       CATEGORY:=Network
+       URL:=http://stgt.sourceforge.net/
+       TITLE:=userspace iSCSI target
+       DEPENDS:=+libpthread +libaio
 endef
 
 define Package/tgt/description
@@ -34,12 +35,7 @@ a user-space daemon and user-space tools.
 endef
 
 define Build/Compile
-       CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
-               $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               LD="$(TARGET_CC)" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
-               install-programs
+       $(call Build/Compile/Default,programs)
 endef
 
 define Package/tgt/conffiles
@@ -50,7 +46,7 @@ define Package/tgt/install
        $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin
        $(INSTALL_DATA) ./files/tgt.config $(1)/etc/config/tgt
        $(INSTALL_BIN) ./files/tgt.init $(1)/etc/init.d/tgt
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgt{d,adm} $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,tgt))
index 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 2e52975014b55bfb2acf21f67adf2e541420b9ff..752dd66111d76b6c2d60785d8b3f5473c9e8e095 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
-PKG_VERSION:=0.3.5.8
-PKG_RELEASE:=2
+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
@@ -100,6 +100,7 @@ CONFIGURE_ARGS += \
        --disable-libscrypt \
        --disable-unittests \
        --disable-lzma \
+       --disable-zstd \
        --with-tor-user=tor \
        --with-tor-group=tor
 
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..bd6e557cfd19c825e8e207160f870f783d4a73a7 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,8 @@ define Package/transmission-web
   $(call Package/transmission/template)
   TITLE+= (webinterface)
   DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls)
+  CONFLICTS:=transmission-web-control
+  PKGARCH:=all
 endef
 
 
@@ -133,14 +135,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 fb0c443b5a6e68a5943df62eed6c4c15079e2867..55423b028d0fe71cecbedc0442316ed25b8f3c33 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=1.4.3
+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 cf1e17ed0f8fc873809442c908128a708c51cbcb..61095a4686520effc7d5baea02a4137d76591f4d 100755 (executable)
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.4.3"
+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,85 +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}')"
-                                       if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ])
-                                       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
-                                                       cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
-                                                       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
-                                                               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}" ]
@@ -297,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}")" ]
@@ -310,10 +347,10 @@ f_jsnup()
        json_add_string "station_id" "${sta_radio:-"-"}/${sta_essid:-"-"}/${sta_bssid:-"-"}"
        json_add_string "station_interface" "${sta_iface:-"-"}"
        json_add_string "faulty_stations" "${faulty_list}"
-       json_add_string "last_rundate" "$(/bin/date "+%d.%m.%Y %H:%M:%S")"
+       json_add_string "last_rundate" "${last_date}"
        json_add_string "system" "${trm_sysver}"
        json_dump > "${trm_rtfile}"
-       f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}"
+       f_log "debug" "f_jsnup::: config: ${config:-"-"}, status: ${status:-"-"}, sta_iface: ${sta_iface:-"-"}, sta_radio: ${sta_radio:-"-"}, sta_essid: ${sta_essid:-"-"}, sta_bssid: ${sta_bssid:-"-"}, faulty_list: ${faulty_list:-"-"}, list_expiry: ${trm_listexpiry}"
 }
 
 # write to syslog
diff --git a/net/udptunnel/Makefile b/net/udptunnel/Makefile
new file mode 100644 (file)
index 0000000..e228261
--- /dev/null
@@ -0,0 +1,39 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=udptunnel
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cs.columbia.edu/~lennox/udptunnel
+PKG_HASH:=45c0e12045735bc55734076ebbdc7622c746d1fe4e6f7267fa122e2421754670
+
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYRIGHT
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/udptunnel
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Tunnel UDP packets over a TCP connection
+  URL:=http://www.cs.columbia.edu/~lennox/udptunnel/
+endef
+
+define Package/udptunnel/description 
+  UDPTunnel is a small program which can tunnel UDP packets bi-directionally
+  over a TCP connection. Its primary purpose (and original motivation) is to
+  allow multi-media conferences to traverse a firewall which allows only outgoing
+  TCP connections.
+endef
+
+define Package/udptunnel/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udptunnel $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,udptunnel))
diff --git a/net/udptunnel/patches/001-multicast.patch b/net/udptunnel/patches/001-multicast.patch
new file mode 100644 (file)
index 0000000..d69d139
--- /dev/null
@@ -0,0 +1,14 @@
+Description: Fix issue where udptunnel was failing to receive packets sent to a multicast address. (See #254834).
+Author: singh_chinmay@extenprise.net
+
+--- udptunnel-1.1.orig/udptunnel.c
++++ udptunnel-1.1/udptunnel.c
+@@ -217,7 +217,7 @@
+     (*relays)[i].udpaddr.sin_port = htons(udpport + i);
+     (*relays)[i].udpaddr.sin_family = AF_INET;
+     (*relays)[i].udp_ttl = udpttl;
+-    (*relays)[i].multicast_udp = IN_MULTICAST(htons(udpaddr.s_addr));
++    (*relays)[i].multicast_udp = IN_MULTICAST(htonl(udpaddr.s_addr));
+     (*relays)[i].tcpaddr.sin_addr = tcpaddr;
+     (*relays)[i].tcpaddr.sin_port = htons(tcpport + i);
diff --git a/net/udptunnel/patches/002-main_code_fix.patch b/net/udptunnel/patches/002-main_code_fix.patch
new file mode 100644 (file)
index 0000000..93043df
--- /dev/null
@@ -0,0 +1,67 @@
+Description: remove yp host lookup and fix some types
+Author: Jan Delgado <jdelgado@gmx.net>
+
+Index: udptunnel-1.1/host2ip.c
+===================================================================
+--- udptunnel-1.1.orig/host2ip.c
++++ udptunnel-1.1/host2ip.c
+@@ -4,7 +4,6 @@
+ #include <netdb.h>           /* gethostbyname() */
+ #include <netinet/in.h>      /* sockaddr_in */
+ #include <arpa/inet.h>       /* inet_addr() */
+-#include <rpcsvc/ypclnt.h>   /* YP */
+ #include <ctype.h>           /* isspace() */
+ #include "host2ip.h"
+@@ -37,19 +36,9 @@ struct in_addr host2ip(char *host)
+   else if ((hep = gethostbyname(host))) {
+     in = *(struct in_addr *)(hep->h_addr_list[0]);
+   }
+-  /* As a last resort, try YP. */
+   else {
+-    static char *domain = 0;  /* YP domain */
+-    char *value;              /* key value */
+-    int value_len;            /* length of returned value */
+-
+-    if (!domain) yp_get_default_domain(&domain);
+-    if (yp_match(domain, "hosts.byname", host, strlen(host), &value, &value_len) == 0) {
+-      in.s_addr = inet_addr(value);
+-    } else {
+       /* Everything failed */
+       in.s_addr = INADDR_ANY;
+-    }
+   }
+   return in;
+ } /* host2ip */
+Index: udptunnel-1.1/udptunnel.c
+===================================================================
+--- udptunnel-1.1.orig/udptunnel.c
++++ udptunnel-1.1/udptunnel.c
+@@ -423,7 +423,7 @@ static void await_incoming_connections(s
+     for (i = 0; i < relay_count; i++) {
+       if (FD_ISSET(relays[i].tcp_listen_sock, &readfds)) {
+         struct sockaddr_in client_addr;
+-        int addrlen = sizeof(client_addr);
++        socklen_t addrlen = sizeof(client_addr);
+         
+         if ((relays[i].tcp_sock =
+              accept(relays[i].tcp_listen_sock,
+@@ -478,7 +478,7 @@ static int udp_to_tcp(struct relay *rela
+   struct out_packet p;
+   int buflen;
+   struct sockaddr_in remote_udpaddr;
+-  int addrlen = sizeof(remote_udpaddr);
++  socklen_t addrlen = sizeof(remote_udpaddr);
+   if ((buflen = recvfrom(relay->udp_recv_sock, p.buf, UDPBUFFERSIZE, 0,
+                          (struct sockaddr *) &remote_udpaddr,
+@@ -555,7 +555,8 @@ static int tcp_to_udp(struct relay *rela
+       /* There isn't a UDP listener waiting on the other end, but
+        * that's okay, it's probably just not up at the moment or something.
+        * Use getsockopt(SO_ERROR) to clear the error state. */
+-      int err, len = sizeof(err);
++      int err;
++      socklen_t len = sizeof(err);
+       if (debug > 1) {
+         fprintf(stderr, "ECONNREFUSED on udp_send_sock; clearing.\n");
index 030c5ff1ea5077ad6c688bd04be0691a2c21596b..3b48a4e8cc3b8466a357bcbc25c455f8dbae80ef 100644 (file)
@@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
 PKG_VERSION:=1.9.1
-PKG_RELEASE:=1
-
-PKG_LICENSE:=BSD-3-Clause
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.unbound.net/downloads
+PKG_SOURCE_URL:=https://www.unbound.net/downloads
 PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
 
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:nlnetlabs:unbound
+
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -27,8 +28,8 @@ include $(INCLUDE_DIR)/package.mk
 
 define Package/unbound/Default
   TITLE:=Validating Recursive DNS Server
-  URL:=http://www.unbound.net/
-  DEPENDS:=+libopenssl
+  URL:=https://www.unbound.net/
+  DEPENDS:=+libopenssl +@OPENSSL_WITH_EC
 endef
 
 define Package/unbound
@@ -113,6 +114,7 @@ CONFIGURE_ARGS += \
        --disable-dsa \
        --disable-gost \
        --enable-allsymbols \
+       --enable-ecdsa \
        --enable-tfo-client \
        --enable-tfo-server \
        --with-libexpat="$(STAGING_DIR)/usr" \
index 6576b2c85e25521695538cb782bf098286ef74c5..24cf1f242b7bfa3698fe7fc67070ad447691019e 100644 (file)
@@ -168,7 +168,7 @@ config zone
 ## HOW TO: TLS Over DNS
 Unbound can use TLS as a client or server. UCI supports Unbound as a forwarding client with TLS. Servers are more complex and need manual configuration. This may be desired for privacy against stealth tracking. Some public DNS servers seem to advertise help in this quest. If your looking for a better understanding, then some information can be found at [Cloudflare](https://www.cloudflare.com/) DNS [1.1.1.1](https://1.1.1.1/). The following is a generic example. You can mix providers by using complete server specificaiton to override the zones common port and certificate domain index.
 
-**NOTICE:** Unbound requires openssl-1.1.0 to verify host certificates. OpenWrt at present is configured with openssl-1.0.2. Connections will be over TLS, but theoretically, certificates may not be from a trusted source. See report [Unbound #658](https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=658). When this is resolved, it will be recommended again to install `ca-bundle`, maintain it, and be sure to include the TLS certificate domain index with the host addresses.
+Update as of Unbound 1.9.1, all TLS functions work correctly with either OpenSSL 1.0.2 or 1.1.0. Please be sure to install `ca-bundle` package and use `opkg` to get updates regularly.
 
 **/etc/config/unbound**:
 ```
index 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 910aac1a76417ae7fe8a114b92dcddf36f7ae307..73649026f76a09f1a82c93fc06cd643cc1ea9848 100644 (file)
@@ -19,6 +19,7 @@ define Package/vpnc-scripts
   TITLE:=VPN configuration script for vpnc and OpenConnect
   MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
   SUBMENU:=VPN
+  PKGARCH:=all
 endef
 
 define Package/vpnc-scripts/description
index 5e1bc2f0db67246c6939057d87f862ad78b8de88..a24e6e617af6bb3caa14e9800a386a33ef92ab1d 100644 (file)
@@ -26,6 +26,7 @@ define Package/wakeonlan
   TITLE:=Sends 'magic packets' to wake-on-LAN enabled ethernet adapters
   URL:=http://gsd.di.uminho.pt/jpo/software/wakeonlan/
   DEPENDS:=+perl +perlbase-getopt +perlbase-net +perlbase-socket
+  PKGARCH:=all
 endef
 
 define Package/wakeonlan/description
index c15948dc3733190b77da5a0c507d808fa58d835a..8634c1e7542e6f8dfd9d90970158277912a06812 100644 (file)
@@ -8,17 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wavemon
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=2
+PKG_VERSION:=0.9.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4199e2ad11a036f4289f5ad42a8b0fe518f2b5ff77447f4c366dbcf3f23e91d5
+PKG_HASH:=5823ef9459d6147a457b390b6744a77465584e93d37c2809fa7a0be557070166
 
+PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
 
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -39,14 +40,9 @@ define Package/wavemon/description
   and higher), e.g. the Lucent Orinoco cards.
 endef
 
-CONFIGURE_VARS += \
-       ac_cv_lib_cap_cap_get_flag=no \
-       BUILD_DATE=$(SOURCE_DATE_EPOCH)
-
-TARGET_CFLAGS += -pthread -I$(STAGING_DIR)/usr/include/libnl3
+CONFIGURE_ARGS += --without-libcap
 
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include"
+TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3
 
 define Package/wavemon/install
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/net/wavemon/patches/010-Scan-screen-resolves-62.patch b/net/wavemon/patches/010-Scan-screen-resolves-62.patch
new file mode 100644 (file)
index 0000000..ea9e209
--- /dev/null
@@ -0,0 +1,62 @@
+From f6e20c9c6e9b50963caaf5483248d329473a6815 Mon Sep 17 00:00:00 2001
+From: Gerrit Renker <Gerrit.Renker@ctl.io>
+Date: Mon, 21 Jan 2019 09:23:43 -0700
+Subject: [PATCH] Scan screen: resolves #62
+
+---
+ iw_if.c   | 10 ++++++----
+ iw_if.h   |  2 +-
+ iw_scan.c |  2 +-
+ 3 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/iw_if.c b/iw_if.c
+index c0b0128..d8bacbc 100644
+--- a/iw_if.c
++++ b/iw_if.c
+@@ -87,11 +87,13 @@ int if_set_down(const char *ifname)
+       return if_set_up_or_down(ifname, false);
+ }
+-/** Exit handler to restore interface 'down' state on exit via on_exit(3). */
+-void if_set_down_on_exit(int rc, void *arg)
++/** Exit handler to restore interface 'down' state on exit via atexit(3). */
++void if_set_down_on_exit(void)
+ {
+-      if (if_set_down(arg) < 0) {
+-              err_msg("unable to restore %s interface state - set down manually", arg);
++      const char *ifname = conf_ifname();
++
++      if (ifname && if_set_down(ifname) < 0) {
++              err_msg("unable to restore %s interface state - set down manually", ifname);
+       }
+ }
+diff --git a/iw_if.h b/iw_if.h
+index 50f5a47..e2199d3 100644
+--- a/iw_if.h
++++ b/iw_if.h
+@@ -76,7 +76,7 @@ struct if_info {
+ };
+ extern bool if_is_up(const char *ifname);
+ extern int  if_set_up(const char *ifname);
+-extern void if_set_down_on_exit(int rc, void *arg);
++extern void if_set_down_on_exit(void);
+ extern void if_getinf(const char *ifname, struct if_info *info);
+ /**
+diff --git a/iw_scan.c b/iw_scan.c
+index 18e9e06..e2b3067 100644
+--- a/iw_scan.c
++++ b/iw_scan.c
+@@ -430,7 +430,7 @@ void *do_scan(void *sr_ptr)
+                               if (if_set_up(conf_ifname()) < 0)
+                                       err_sys("Can not bring up interface '%s'", conf_ifname());
+-                              if (on_exit(if_set_down_on_exit, (void *)conf_ifname()) < 0)
++                              if (atexit(if_set_down_on_exit) < 0)
+                                       snprintf(sr->msg, sizeof(sr->msg), "Warning: unable to restore %s down state on exit", conf_ifname());
+                               break;
+                       }
+-- 
+2.17.1
+
index ad6e93e779ccab04023070d9535f13de0822e754..62aed759d0387a5b1066f7d511b099b1dd17a392 100644 (file)
@@ -8,16 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wget
-PKG_VERSION:=1.20.1
-PKG_RELEASE:=3
+PKG_VERSION:=1.20.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=b783b390cb571c837b392857945f5a1f00ec6b043177cc42abb8ee1b542ee1b3
+PKG_HASH:=31cccfc6630528db1c8e3a06f6decf2a370060b982841cfab2b8677400a5092e
 PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
 
+PKG_CPE_ID:=cpe:/a:gnu:wget
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
index ecaf540445daaca0a51c2261fb59fb8d59c13cea..3909e2a13c9a766c88712f3f4bd7d340878ddfb0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wifidog-ng
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)
 
index f39373278aea29071b895ada8c7ca826e6698ad9..d88acb5eafc51a0166d02478f86addc5db8ed92c 100644 (file)
@@ -5,117 +5,131 @@ START=95
 
 BIN=/usr/bin/wifidog-ng
 
-dhcp_host_white=1
+global_dhcp_host_white=1
+
+validate_gateway_section() {
+       uci_load_validate wifidog-ng gateway "$1" "$2" \
+               'enabled:bool:0' \
+               'interface:uci("network", "@interface"):lan' \
+               'dhcp_host_white:bool:1'
+}
 
 start_wifidog() {
-    local cfg="$1"
-    local enabled interface
-
-    uci_validate_section wifidog-ng gateway "${1}" \
-        'enabled:bool:0' \
-        'interface:uci("network", "@interface"):lan' \
-        'dhcp_host_white:bool:1'
-
-    [ $? -ne 0 ] && {
-        echo "validation gateway failed" >&2
-        exit 1
-    }
-
-    [ $enabled -eq 1 ] || exit 0
-
-    # timeout = 49 days
-    ipset -! create wifidog-ng-mac hash:mac timeout 4294967
-    ipset -! create wifidog-ng-ip hash:ip
-
-    modprobe wifidog-ng
-    echo "enabled=1" > /proc/wifidog-ng/config
-    
-    procd_open_instance
-    procd_set_param command $BIN
-    procd_set_param respawn
-    procd_close_instance
+       [ "$2" = 0 ] || {
+               echo "validation gateway failed" >&2
+               exit 1
+       }
+
+       [ $enabled = 1 ] || exit 0
+
+       [ $dhcp_host_white = 1 ] || global_dhcp_host_white=0
+
+       # timeout = 24.855 days
+       ipset -! create wifidog-ng-mac hash:mac timeout 2147483
+       ipset -! create wifidog-ng-ip hash:ip
+
+       modprobe wifidog-ng
+       echo "enabled=1" > /proc/wifidog-ng/config
+
+       procd_open_instance
+       procd_set_param command $BIN
+       procd_set_param respawn
+       procd_close_instance
+}
+
+validate_server_section() {
+       uci_load_validate wifidog-ng server "$1" "$2" \
+               'host:host'
 }
 
 parse_server() {
-    local cfg="$1"
-    local host
-
-    config_get host $cfg host
-    validate_data ip4addr "$host" 2> /dev/null
-    if [ $? -eq 0 ];
-    then
-        ipset add wifidog-ng-ip $host
-    else
-        echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
-    fi
+       [ "$2" = 0 ] || {
+               echo "validation server failed" >&2
+               exit 1
+       }
+
+       if validate_data ip4addr "$host" 2> /dev/null; then
+               ipset add wifidog-ng-ip $host
+       else
+               echo "ipset=/$host/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+       fi
 }
 
-parse_validated_user() {
-    local cfg="$1"
-    local mac ip
+validate_validated_user_section() {
+       uci_load_validate wifidog-ng validated_user "$1" "$2" \
+               'mac:macaddr'
+}
 
-    uci_validate_section wifidog-ng validated_user "${1}" \
-        'mac:macaddr'
+parse_validated_user() {
+       [ "$2" = 0 ] || {
+               echo "validation validated_user failed" >&2
+               exit 1
+       }
 
-    [ $? -ne 0 ] && {
-        echo "validation validated_user failed" >&2
-        exit 1
-    }
+       [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+}
 
-    [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+validate_validated_domain_section() {
+       uci_load_validate wifidog-ng validated_domain "$1" "$2" \
+               'domain:host'
 }
 
 parse_validated_domain() {
-    local cfg="$1"
-    local domain
+       [ "$2" = 0 ] || {
+               echo "validation validated_domain failed" >&2
+               exit 1
+       }
 
-    uci_validate_section wifidog-ng validated_domain "${1}" \
-        'domain:host'
-
-    [ $? -ne 0 ] && {
-        echo "validation validated_domain failed" >&2
-        exit 1
-    }
+       [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+}
 
-    [ -n "$domain" ] && echo "ipset=/$domain/wifidog-ng-ip" >> /tmp/dnsmasq.d/wifidog-ng
+validate_dhcp_host_section() {
+       uci_load_validate dhcp host "$1" "$2" \
+               'mac:macaddr'
 }
 
 parse_dhcp_host() {
-    local cfg="$1"
-    local mac ip
+       [ "$2" = 0 ] || {
+               echo "validation validated dhcp host failed" >&2
+               exit 1
+       }
 
-    uci_validate_section dhcp host "${1}" \
-        'mac:macaddr'
-
-    [ $? -ne 0 ] && {
-        echo "validation validated dhcp host failed" >&2
-        exit 1
-    }
-
-    [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
+       [ -n "$mac" ] && ipset add wifidog-ng-mac $mac
 }
 
 start_service() {
-    config_load wifidog-ng
-    config_foreach start_wifidog gateway
+       config_load wifidog-ng
+       config_foreach validate_gateway_section gateway start_wifidog
 
-    echo -n > /tmp/dnsmasq.d/wifidog-ng
+       echo -n > /tmp/dnsmasq.d/wifidog-ng
 
-    config_foreach parse_server server
-    config_foreach parse_validated_user validated_user    
-    config_foreach parse_validated_domain validated_domain
+       config_foreach validate_server_section server parse_server
+       config_foreach validate_validated_user_section validated_user parse_validated_user
+       config_foreach validate_validated_domain_section validated_domain parse_validated_domain
 
-    [ $dhcp_host_white -eq 1 ] && {
-        config_load dhcp
-        config_foreach parse_dhcp_host host
-    }
+       [ $global_dhcp_host_white = 1 ] && {
+               config_load dhcp
+               config_foreach validate_dhcp_host_section host parse_dhcp_host
+       }
 
-    /etc/init.d/dnsmasq restart &
+       /etc/init.d/dnsmasq restart &
 }
 
 stop_service() {
-    rmmod wifidog-ng
+       rmmod wifidog-ng
+
+       ipset destroy wifidog-ng-mac
+       ipset destroy wifidog-ng-ip
+}
+
+service_triggers() {
+       procd_add_reload_trigger "wifidog-ng"
 
-    ipset destroy wifidog-ng-mac
-    ipset destroy wifidog-ng-ip
+       procd_open_validate
+       validate_gateway_section
+       validate_server_section
+       validate_validated_user_section
+       validate_validated_domain_section
+       validate_dhcp_host_section
+       procd_close_validate
 }
index 07387865054e08637567219b98f3b6301e3cfcac..efc98059984a15a5ab674655070369754cb684a3 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=1.7.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.7.3
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://znc.in/releases \
                https://znc.in/releases/archive
-PKG_HASH:=60b4e78f54c532c32673d1ef8e5f606c530ef3a6d6b76ea1daa66459a86682a9
+PKG_HASH:=1e4cc31837a1e8e6cc310873659a167cec16a3fd4281cbc3bf364e42352c113d
 
 PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
 PKG_LICENSE:=Apache-2.0
@@ -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 52170404b31bb152b2f21dd46ef0d844ec5e89ba..1af7779fc0d47ebcf5623b680e05cf94aa1e1442 100644 (file)
@@ -17,6 +17,7 @@ define Package/attendedsysupgrade-common
   TITLE:=Common files neede by attendedsysupgrade packages
   MAINTAINER:=Paul Spooren <paul@spooren.de>
   DEPENDS:=+rpcd +rpcd-mod-rpcsys
+  PKGARCH:=all
 endef
 
 define Package/attendedsysupgrade-common/description
index 1573d257d44b504917c5fbb71451a61bdb83d0ed..aa168c1b897ffbd5e5a2741b19e5f3fc2eb8f4a7 100644 (file)
@@ -12,6 +12,7 @@ define Package/bmx7-dnsupdate
   TITLE:=bmx7-dnsupdate
   MAINTAINER:=Paul Spooren <spooren@informatik.uni-leipzig.de>
   DEPENDS:=+bmx7 +bmx7-json inotifywait jshn
+  PKGARCH:=all
 endef
 
 define Build/Compile
diff --git a/utils/btrfs-progs/Config.in b/utils/btrfs-progs/Config.in
new file mode 100644 (file)
index 0000000..88cd869
--- /dev/null
@@ -0,0 +1,9 @@
+if PACKAGE_btrfs-progs
+
+config BTRFS_PROGS_ZSTD
+       bool "Build with zstd support"
+       default n
+       help
+               This allows you to manage BTRFS with zstd compression
+
+endif
index e674a4abb325a7fd022e885ef7fea4f9dd9c9f16..6da2bff6e141757bfce77bfced1fccca7173c3a7 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
 PKG_VERSION:=4.20.2
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
@@ -28,7 +28,7 @@ define Package/btrfs-progs
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Filesystem
-  DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread
+  DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread +BTRFS_PROGS_ZSTD:libzstd
   TITLE:=Btrfs filesystems utilities
   URL:=https://btrfs.wiki.kernel.org/
 endef
@@ -40,6 +40,10 @@ define Package/btrfs-progs/description
  GPL and open for contribution from anyone.
 endef
 
+define Package/btrfs-progs/config
+       source "$(SOURCE)/Config.in"
+endef
+
 progs = btrfs btrfs-find-root btrfs-image btrfs-map-logical \
        btrfs-select-super btrfstune mkfs.btrfs
 
@@ -52,8 +56,10 @@ CONFIGURE_ARGS += \
        --disable-backtrace \
        --disable-convert \
        --disable-documentation \
-       --disable-python \
-       --disable-zstd
+       --disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
index 71dee42850976c06ab30d5287d8c189c1b34fc93..4d88af1a888d9486afd01e25ac78cf18a5135073 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=5.8.1
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 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,11 @@ endef
 
 define Package/collectd
 $(call Package/collectd/Default)
-  DEPENDS:= +libpthread +zlib +libltdl +libip4tc
+  DEPENDS:= +libpthread \
+         +zlib \
+         +libltdl \
+         +libip4tc \
+         +PACKAGE_collectd-mod-lua:liblua
   MENU:=1
 endef
 
@@ -226,7 +230,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+= \
@@ -360,6 +369,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/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 d462156454a0b6fc1e4a619770a64a0fcd5280fb..5d8bdf2b23fba76eeb3ffa7430b56ed67efd9a52 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fio
 PKG_VERSION:=3.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/utils/fio/patches/010-mpcore.patch b/utils/fio/patches/010-mpcore.patch
new file mode 100644 (file)
index 0000000..bc46d56
--- /dev/null
@@ -0,0 +1,28 @@
+From ec4b65d9c9180101807f598c9edecb462f54261a Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sun, 31 Mar 2019 21:19:03 -0700
+Subject: [PATCH] arch: fix build breakage on armv6 again
+
+6K was missing from the defines.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ arch/arch-arm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arch-arm.h b/arch/arch-arm.h
+index fc1c4844..78cb2ebe 100644
+--- a/arch/arch-arm.h
++++ b/arch/arch-arm.h
+@@ -7,7 +7,7 @@
+       || defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5E__)\
+       || defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__) \
+       || defined(__ARM_ARCH_6__)  || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
+-      || defined(__ARM_ARCH_6KZ__)
++      || defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6K__)
+ #define nop             __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t")
+ #define read_barrier()        __asm__ __volatile__ ("" : : : "memory")
+ #define write_barrier()       __asm__ __volatile__ ("" : : : "memory")
+-- 
+2.17.1
+
index 6295d353219ea1be0012de9a4372965993887ef0..3a2fbdc13cacd886d1871ba4b1d7d49b634abde7 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gammu
 PKG_VERSION:=1.39.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -52,7 +52,7 @@ define Build/InstallDev
        mkdir -p $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
        mkdir -p $(1)/usr/lib
-       $(CP)    $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
 endef
 
 define Package/gammu/install
diff --git a/utils/gddrescue/Makefile b/utils/gddrescue/Makefile
new file mode 100644 (file)
index 0000000..230a1fe
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2018 Lucian Cristian
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gddrescue
+PKG_VERSION:=1.23
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz
+PKG_SOURCE_URL:=http://http.debian.net/debian/pool/main/g/$(PKG_NAME)
+PKG_HASH:=5831d7e24070bc700d8f22deaeec56af1149392ce30ae67254096eaf8c9169ab
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gddrescue
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Data recovery tool
+  URL:=https://www.gnu.org/software/ddrescue/
+  DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/gddrescue/description
+       GNU ddrescue is a data recovery tool. It copies data from one file
+       or block device (hard disc, cdrom, etc) to another, trying to rescue
+       the good parts first in case of read errors.
+endef
+
+CONFIGURE_ARGS += \
+       CXX="$(TARGET_CXX)" \
+       CPPFLAGS="$(TARGET_CPPFLAGS)" \
+       CXXFLAGS="$(TARGET_CXXFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS)"
+
+define Package/gddrescue/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ddrescue $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ddrescuelog $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,gddrescue))
diff --git a/utils/gddrescue/patches/001-fix_uclibc.patch b/utils/gddrescue/patches/001-fix_uclibc.patch
new file mode 100644 (file)
index 0000000..05113a8
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/block.h
++++ b/block.h
+@@ -34,6 +34,7 @@ class Block
+     { if( size_ < 0 || size_ > LLONG_MAX - pos_ ) size_ = LLONG_MAX - pos_; }
+ public:
++  Block() {}          // default constructor
+   Block( const long long p, const long long s ) : pos_( p ), size_( s )
+     { if( p < 0 ) { pos_ = 0; if( s > 0 ) size_ -= std::min( s, -p ); }
+       fix_size(); }
+@@ -102,6 +103,7 @@ private:
+   Status status_;
+ public:
++  Sblock() {}                         // default constructor
+   Sblock( const Block & b, const Status st )
+     : Block( b ), status_( st ) {}
+   Sblock( const long long p, const long long s, const Status st )
+--- a/mapbook.cc
++++ b/mapbook.cc
+@@ -19,6 +19,7 @@
+ #include <algorithm>
+ #include <cerrno>
++#include <cctype>
+ #include <climits>
+ #include <cstdio>
+ #include <cstdlib>
\ No newline at end of file
index f6433ac38623b5006e92b1116a3f1762338f7e18..4272034128da29746f156e2ab9b93be8717774b4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
 PKG_VERSION:=3.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
index c4b709c94d9a4c37a63a83bdd1b3e0807069deb7..3271d43fdc1cfaebf26c3d8238ce2e2487a77c6a 100644 (file)
@@ -8,7 +8,7 @@ NAME=gpsd
 
 validate_section_gpsd()
 {
-       uci_validate_section gpsd gpsd "${1}" \
+       uci_load_validate gpsd gpsd "$1" "$2" \
                'enabled:bool:1' \
                'device:string' \
                'listen_globally:bool:0' \
@@ -17,21 +17,19 @@ validate_section_gpsd()
 
 gpsd_instance()
 {
-       local device enabled listen_globally port
-
-       validate_section_gpsd "${1}" || {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
 
-       [ "${enabled}" = "0" ] && return 1
+       [ "$enabled" = "0" ] && return 1
 
        procd_open_instance
        procd_set_param command "$PROG" -N -n
 
-       [ "${listen_globally}" -ne 0 ] && procd_append_param command -G
-       procd_append_param command -S "${port}"
-       procd_append_param command "${device}"
+       [ "$listen_globally" -ne 0 ] && procd_append_param command -G
+       procd_append_param command -S "$port"
+       procd_append_param command "$device"
        procd_set_param respawn
 
        procd_close_instance
@@ -39,6 +37,11 @@ gpsd_instance()
 
 start_service()
 {
-       config_load "${NAME}"
-       config_foreach gpsd_instance gpsd
+       config_load "$NAME"
+       config_foreach validate_section_gpsd gpsd gpsd_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger "$NAME"
+       procd_add_validation validate_section_gpsd
 }
index f7f4645a20d2212f07b9275e1ba474e805157fb2..405753d1b98acbcec5ed833f9560e3d344b47a35 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hd-idle
 PKG_VERSION:=1.05
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Lim Guo Wei <limguowei@gmail.com>
 PKG_LICENSE:=GPL-2.0
index 4f6a2d7a165d058f2ee4fdd13746c0de5062628b..bdf9bb8d0ae29bade2ab8aa0e0532554513fa5c8 100644 (file)
@@ -8,7 +8,7 @@ USE_PROCD=1
 
 validate_section_hdidle()
 {
-       uci_validate_section hd-idle hd-idle "${1}" \
+       uci_load_validate hd-idle hd-idle "$1" "$2" \
                'disk:string' \
                'enabled:bool' \
                'idle_time_interval:uinteger:10' \
@@ -43,9 +43,7 @@ compute_seconds() {
 }
 
 hdidle_append() {
-       local disk enabled idle_time_interval idle_time_unit
-
-       validate_section_hdidle "${1}" || return
+       [ "$2" = 0 ] || return
 
        [ "$enabled" -gt 0 ] || return
 
@@ -63,10 +61,15 @@ start_service() {
        config_load "hd-idle"
 
        numdisks="0"
-       config_foreach hdidle_append "hd-idle"
+       config_foreach validate_section_hdidle "hd-idle" hdidle_append
 
        if [ "$numdisks" -gt 0 ]; then
                procd_set_param respawn
                procd_close_instance
        fi
 }
+
+service_triggers() {
+       procd_add_reload_trigger "hd-idle"
+       procd_add_validation validate_section_hdidle
+}
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 8f0798c675d70c11ca1fda4bf3cb898ca9e0bd2f..01b0597dec0faf212502488582f77c1a12c02ee7 100644 (file)
@@ -140,10 +140,13 @@ define Package/lxc-init
 endef
 
 CONFIGURE_ARGS += \
-       --disable-gnutls \
        --disable-apparmor \
+       --disable-cgmanager \
        --disable-doc \
        --disable-examples \
+       --disable-gnutls \
+       --disable-selinux \
+       --disable-python \
        --enable-lua=yes \
        --with-lua-pc="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc"
 
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 e71e896e6f77f8f6628af7c1eeb19ed518ca1e98..40ea80f226995c14cd34c6399385c6d66b2025d2 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ncdu
-PKG_VERSION:=1.13
+PKG_VERSION:=1.14
 PKG_RELEASE=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dev.yorhel.nl/download
-PKG_HASH:=f4d9285c38292c2de05e444d0ba271cbfe1a705eee37c2b23ea7c448ab37255a
+PKG_HASH:=c694783aab21e27e64baad314b7c1ff34541bfa219fe9645ef6780f1c5558c44
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
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 e6d4c8f949d447e6c2863fd57b8bc87bee61b538..7eeabb6b958b2436d96ed0ab8c68323b9f116f02 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=openocd
 PKG_SOURCE_VERSION:=0.10.0
 PKG_VERSION:=v$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@SF/openocd
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
@@ -20,6 +20,7 @@ PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
 PKG_MAINTAINER:=Paul Fertser <fercerpav@gmail.com>
+PKG_CPE_ID:=cpe:/a:openocd:open_on-chip_debugger
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
diff --git a/utils/openocd/patches/100-bind-localhost-only.patch b/utils/openocd/patches/100-bind-localhost-only.patch
new file mode 100644 (file)
index 0000000..d78f7c8
--- /dev/null
@@ -0,0 +1,45 @@
+Subject: Bind to IPv4 localhost by default
+Origin: other, http://openocd.zylin.com/#/c/4331/2
+Last-Update: 2018-01-18
+
+From f8630b0b15e30dc6c51270006a4e075c79cf466a Mon Sep 17 00:00:00 2001
+From: Paul Fertser <fercerpav@gmail.com>
+Date: Sat, 13 Jan 2018 16:22:10 +0300
+Subject: [PATCH] server: bind to IPv4 localhost by default
+
+Since OpenOCD basically allows to perform arbitrary actions on behalf of
+the running user, it makes sense to restrict the exposure by default.
+
+If you need network connectivity and your environment is safe enough,
+use "bindto 0.0.0.0" to switch to the old behaviour.
+
+Change-Id: I4a4044b90d0ecb30118cea96fc92a7bcff0924e0
+Signed-off-by: Paul Fertser <fercerpav@gmail.com>
+---
+
+diff --git a/doc/openocd.texi b/doc/openocd.texi
+index 7f5b72e..5c7f465 100644
+--- a/doc/openocd.texi
++++ b/doc/openocd.texi
+@@ -7017,7 +7017,7 @@
+ @deffn Command bindto [name]
+ Specify address by name on which to listen for incoming TCP/IP connections.
+-By default, OpenOCD will listen on all available interfaces.
++By default, OpenOCD will listen on the loopback interface only.
+ @end deffn
+ @anchor{targetstatehandling}
+diff --git a/src/server/server.c b/src/server/server.c
+index 1e52e97..ea1e898 100644
+--- a/src/server/server.c
++++ b/src/server/server.c
+@@ -259,7 +259,7 @@
+               c->sin.sin_family = AF_INET;
+               if (bindto_name == NULL)
+-                      c->sin.sin_addr.s_addr = INADDR_ANY;
++                      c->sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+               else {
+                       hp = gethostbyname(bindto_name);
+                       if (hp == NULL) {
diff --git a/utils/openocd/patches/101-cve-2018-5704-css-fix.patch b/utils/openocd/patches/101-cve-2018-5704-css-fix.patch
new file mode 100644 (file)
index 0000000..9a0ffbb
--- /dev/null
@@ -0,0 +1,47 @@
+Subject: Prevent some forms of Cross Protocol Scripting attacks
+Author: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Origin: other, http://openocd.zylin.com/#/c/4335/
+Bug-Debian: https://bugs.debian.org/887488
+Last-Update: 2018-01-18
+
+From 3a223ca3ebc7ac24d7726a0cd58e5695bc813657 Mon Sep 17 00:00:00 2001
+From: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Date: Sat, 13 Jan 2018 21:00:47 +0100
+Subject: [PATCH] CVE-2018-5704: Prevent some forms of Cross Protocol Scripting attacks
+
+OpenOCD can be targeted by a Cross Protocol Scripting attack from
+a web browser running malicious code, such as the following PoC:
+
+var x = new XMLHttpRequest();
+x.open("POST", "http://127.0.0.1:4444", true);
+x.send("exec xcalc\r\n");
+
+This mitigation should provide some protection from browser-based
+attacks and is based on the corresponding fix in Redis:
+
+https://github.com/antirez/redis/blob/8075572207b5aebb1385c4f233f5302544439325/src/networking.c#L1758
+
+Change-Id: Ia96ebe19b74b5805dc228bf7364c7971a90a4581
+Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
+Reported-by: Josef Gajdusek <atx@atx.name>
+---
+
+diff --git a/src/server/startup.tcl b/src/server/startup.tcl
+index 64ace40..dd1b31e 100644
+--- a/src/server/startup.tcl
++++ b/src/server/startup.tcl
+@@ -8,3 +8,14 @@
+       # one target
+       reset halt
+ }
++
++proc prevent_cps {} {
++      echo "Possible SECURITY ATTACK detected."
++      echo "It looks like somebody is sending POST or Host: commands to OpenOCD."
++      echo "This is likely due to an attacker attempting to use Cross Protocol Scripting"
++      echo "to compromise your OpenOCD instance. Connection aborted."
++      exit
++}
++
++proc POST {args} { prevent_cps }
++proc Host: {args} { prevent_cps }
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 e945d302fcf4a2b839870e9c403196bc672ad531..b5661c407d6317d2aeae84062d86b1c9c63b9579 100644 (file)
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pciutils
 PKG_VERSION:=3.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
 PKG_HASH:=db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3
 
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
@@ -30,7 +30,7 @@ define Package/pciutils
   CATEGORY:=Utilities
   TITLE:=Linux PCI Utilities
   URL:=http://mj.ucw.cz/pciutils.shtml
-  DEPENDS:=+libkmod +zlib
+  DEPENDS:=+libkmod +libpci
 endef
 
 define Package/pciutils/description
@@ -38,6 +38,15 @@ define Package/pciutils/description
  of PCI devices
 endef
 
+define Package/libpci
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Linux PCI Libraries
+  URL:=http://mj.ucw.cz/pciutils.shtml
+  DEPENDS:=
+endef
+
+
 PCI_IDS_VER:=0.319
 PCI_IDS_FILE:=pci.ids.$(PCI_IDS_VER)
 define Download/pci_ids
@@ -54,12 +63,15 @@ define Build/Prepare
        $(CP) $(DL_DIR)/$(PCI_IDS_FILE) $(PKG_BUILD_DIR)/pci.ids
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
        PREFIX="/usr" \
        HOST="Linux" \
        HWDB="no" \
-       ZLIB="yes"
+       ZLIB="no" \
+       SHARED="yes"
 
 ifneq ($(CONFIG_USE_GLIBC),)
 TARGET_LDFLAGS += -lresolv
@@ -67,7 +79,11 @@ endif
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpci.so.3 \
+               $(PKG_INSTALL_DIR)/usr/lib/libpci.so
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/lib/libpci.pc $(1)/usr/lib/pkgconfig
        $(INSTALL_DIR) $(1)/usr/include/pci
        $(CP) $(foreach i,pci.h config.h header.h types.h, \
                $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
@@ -77,7 +93,14 @@ define Package/pciutils/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/usr/share
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids $(1)/usr/share/
 endef
 
+define Package/libpci/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+
+$(eval $(call BuildPackage,libpci))
 $(eval $(call BuildPackage,pciutils))
diff --git a/utils/powertop/Makefile b/utils/powertop/Makefile
new file mode 100644 (file)
index 0000000..430ce69
--- /dev/null
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2019 Lucian Cristain <lucian.cristian@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=powertop
+PKG_VERSION:=2.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://01.org/sites/default/files/downloads/
+PKG_HASH:=d3b7459eaba7d01c8841dd33a3b4d369416c01e9bd8951b0d88234cf18fe4a75
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
+PKG_MAINTAINER:=Lucian Cristain <lucian.cristian@gmail.com>
+PKG_LICENSE:=GPL-2.0
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/powertop
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libpci +libncursesw +libnl-genl +libstdcpp
+  TITLE:=Power consumption monitor
+  URL:=https://01.org/powertop
+endef
+
+define Package/powertop/description
+ PowerTOP is a Linux tool to diagnose issues with power consumption
+ and power management.
+endef
+
+define Package/powertop/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/powertop \
+               $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,powertop))
diff --git a/utils/powertop/patches/001-musl-fix-headers.patch b/utils/powertop/patches/001-musl-fix-headers.patch
new file mode 100644 (file)
index 0000000..9839d15
--- /dev/null
@@ -0,0 +1,22 @@
+--- ./src/devices/devfreq.h.orig
++++ ./src/devices/devfreq.h
+@@ -25,6 +25,7 @@
+ #ifndef _INCLUDE_GUARD_DEVFREQ_H
+ #define _INCLUDE_GUARD_DEVFREQ_H
++#include <sys/time.h>
+ #include "device.h"
+ #include "../parameters/parameters.h"
+diff --git a/src/perf/perf.h b/src/perf/perf.h
+index ee072ae06d24..932588a684f9 100644
+--- a/src/perf/perf.h
++++ b/src/perf/perf.h
+@@ -26,6 +26,7 @@
+ #define _INCLUDE_GUARD_PERF_H_
+ #include <iostream>
++#include <stdio.h>
+ extern "C" {
diff --git a/utils/powertop/patches/002-strerror_r.patch b/utils/powertop/patches/002-strerror_r.patch
new file mode 100644 (file)
index 0000000..cf8659e
--- /dev/null
@@ -0,0 +1,20 @@
+--- traceevent/event-parse.c.orig
++++ ./traceevent/event-parse.c
+@@ -5121,12 +5121,17 @@
+       const char *msg;
+       if (errnum >= 0) {
++#if defined(__GLIBC__)
+               msg = strerror_r(errnum, buf, buflen);
+               if (msg != buf) {
+                       size_t len = strlen(msg);
+                       memcpy(buf, msg, min(buflen - 1, len));
+                       *(buf + min(buflen - 1, len)) = '\0';
+               }
++#else
++              if (strerror_r(errnum, buf, buflen))
++                      snprintf(buf, buflen, "errnum %i", errnum);
++#endif
+               return 0;
+       }
diff --git a/utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch b/utils/powertop/patches/010-src-main-Add-missing-pthread-header.patch
new file mode 100644 (file)
index 0000000..e01f0d5
--- /dev/null
@@ -0,0 +1,38 @@
+From 7235a786ea30ae5ca7c1b3458ef5b2388c08dfd9 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 28 Mar 2019 18:44:27 -0700
+Subject: [PATCH] src/main: Add missing pthread header
+
+Otherwise compilation can fail with:
+
+main.cpp: In function 'void one_measurement(int, int, char*)':
+main.cpp:226:3: error: 'pthread_t' was not declared in this scope
+   pthread_t thread = 0UL;
+   ^~~~~~~~~
+main.cpp:226:3: note: suggested alternative: 'pread'
+   pthread_t thread = 0UL;
+   ^~~~~~~~~
+   pread
+
+et al.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/main.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index cbb7a4e..75d4202 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -39,6 +39,7 @@
+ #include <locale.h>
+ #include <sys/resource.h>
+ #include <limits.h>
++#include <pthread.h>
+ #include "cpu/cpu.h"
+ #include "process/process.h"
+-- 
+2.17.1
+
diff --git a/utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch b/utils/powertop/patches/020-intel_cpus.cpp-Change-open-parameter-to-const-char.patch
new file mode 100644 (file)
index 0000000..46d0170
--- /dev/null
@@ -0,0 +1,30 @@
+From 8cdf846922ffb3e0d2a828be473fdf9c45a56e7c Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 30 Mar 2019 20:19:17 -0700
+Subject: [PATCH] intel_cpus.cpp: Change open parameter to const char *
+
+ifstream::open takes std::string starting with C++11, not before.
+
+This fixes compilation with uClibc++ and potentially other older libraries
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/cpu/intel_cpus.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
+index 0030dba..4dffadc 100644
+--- a/src/cpu/intel_cpus.cpp
++++ b/src/cpu/intel_cpus.cpp
+@@ -92,7 +92,7 @@ int is_supported_intel_cpu(int model, int cpu)
+ int is_intel_pstate_driver_loaded()
+ {
+-      const string filename("/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver");
++      const char *filename = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver";
+       const string intel_pstate("intel_pstate");
+       char line[32] = { '\0' };
+       ifstream file;
+-- 
+2.17.1
+
index bab0fde1256d1c6f63c1f25a71532f3530ad5762..83a5c06cf78745433236db4730aaa091fd2b1b47 100644 (file)
@@ -4,8 +4,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2018.12.30
-PKG_RELEASE:=4
+PKG_VERSION:=2019.04.12
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
 PKG_LICENSE:=Apache-2.0
index 93b26c266769c36e3d50cd4449ebaeb8e6fe49c9..1abb7a19136edc5722a1d7f0ecc3755c454107bc 100644 (file)
@@ -1,8 +1,12 @@
 local function scrape()
-  metric("node_nf_conntrack_entries", "gauge", nil,
-    string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_count"), 1, -2))
-  metric("node_nf_conntrack_entries_limit", "gauge", nil,
-    string.sub(get_contents("/proc/sys/net/netfilter/nf_conntrack_max"), 1, -2))
+  local count = get_contents("/proc/sys/net/netfilter/nf_conntrack_count")
+  local max = get_contents("/proc/sys/net/netfilter/nf_conntrack_max")
+  if count ~= "" then
+    metric("node_nf_conntrack_entries", "gauge", nil, string.sub(count, 1, -2))
+  end
+  if max ~= "" then
+    metric("node_nf_conntrack_entries_limit", "gauge", nil, string.sub(max, 1, -2))
+  end
 end
 
 return { scrape = scrape }
index 19b5b1eab2a614437088d6d9b0e892d836202b49..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 681e3cadb846631e93063ce748d3b310fbe5fb06..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_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,68 +194,132 @@ CONFIGURE_ARGS +=                        \
        --disable-fortify-source        \
        --disable-stack-protector       \
 
+# VHost features
 CONFIGURE_ARGS +=                      \
-       --audio-drv-list=''             \
-       --disable-debug-info            \
-       --disable-modules               \
+       --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-qom-cast-debug        \
-       --disable-virtfs                \
+       --disable-sdl-image             \
+       --disable-spice                 \
+       --disable-virglrenderer         \
        --disable-vnc                   \
-       --disable-debug-tcg             \
-       --disable-sparse                \
-       --disable-strip                 \
-       --disable-vnc-sasl              \
        --disable-vnc-jpeg              \
        --disable-vnc-png               \
-       --disable-uuid                  \
-       --disable-vde                   \
-       --disable-netmap                \
-       --disable-xen                   \
-       --disable-xen-pci-passthrough   \
-       --disable-xen-pv-domain-build   \
-       --disable-brlapi                \
+       --disable-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
+#
+#      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-tcg-interpreter       \
+       --disable-brlapi                \
+       --disable-bzip2                 \
        --disable-cap-ng                \
-       --disable-spice                 \
+       --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-guest-agent-msi       \
+       --disable-jemalloc              \
        --disable-libiscsi              \
        --disable-libnfs                \
-       --disable-cocoa                 \
-       --disable-bsd-user              \
-       --disable-curl                  \
+       --disable-libpmem               \
+       --disable-libssh2               \
+       --disable-libudev               \
+       --disable-libusb                \
+       --disable-libxml2               \
        --disable-linux-aio             \
-       --disable-attr                  \
-       --disable-docs                  \
+       --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-xfsctl                \
+       --disable-rdma                  \
+       --disable-sanitizers            \
+       --disable-seccomp               \
+       --disable-sheepdog              \
        --disable-smartcard             \
-       --disable-libusb                \
-       --disable-usb-redir             \
-       --disable-zlib-test             \
-       --disable-lzo                   \
        --disable-snappy                \
-       --disable-bzip2                 \
-       --disable-guest-agent-msi       \
+       --disable-sparse                \
+       --disable-strip                 \
+       --disable-tcg-interpreter       \
+       --disable-tcmalloc              \
        --disable-tools                 \
-       --disable-seccomp               \
-       --disable-glusterfs             \
-       --disable-gtk                   \
-       --disable-gnutls                \
-       --disable-nettle                \
-       --disable-gcrypt                \
-       --disable-rdma                  \
-       --disable-vte                   \
-       --disable-virglrenderer         \
        --disable-tpm                   \
-       --disable-libssh2               \
-       --disable-vhdx                  \
-       --disable-numa                  \
-       --disable-tcmalloc              \
-       --disable-jemalloc              \
-       --disable-strip                 \
+       --disable-usb-redir             \
+       --disable-vde                   \
+       --disable-virtfs                \
+       --disable-vxhs                  \
        --disable-werror                \
+       --disable-xen-pci-passthrough   \
+       --disable-xfsctl                \
 
 CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
 CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
index 8c11f00ad6e15ea77fd3401c0c76eb38f7549500..a1fb69c707d99dc39d6294cf8003e9e5eb46831f 100644 (file)
@@ -1,7 +1,7 @@
-From 0b4011cd0983ced6e065f397049f967656494793 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/3] configure: allow disable fortify_source
+Subject: [PATCH 1/4] configure: allow disable fortify_source
 
 Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
 OpenWrt base build system decide flavor of fortify_source to use
@@ -10,18 +10,15 @@ OpenWrt base build system decide flavor of fortify_source to use
  1 file changed, 2 insertions(+)
 
 diff --git a/configure b/configure
-index 0c6e757..8ea3fdd 100755
+index 1c563a7027..f4d949b35b 100755
 --- a/configure
 +++ b/configure
-@@ -1313,6 +1313,8 @@ for opt do
+@@ -1518,6 +1518,8 @@ for opt do
    ;;
-   --disable-git-update) git_update=no
+   --disable-libpmem) libpmem=no
    ;;
 +  --disable-fortify-source) fortify_source="no"
 +  ;;
    *)
        echo "ERROR: unknown option $opt"
        echo "Try '$0 --help' for more information"
--- 
-1.8.3.1
-
diff --git a/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch b/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
new file mode 100644 (file)
index 0000000..ea0183f
--- /dev/null
@@ -0,0 +1,25 @@
+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
+ line
+
+---
+ configure | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure b/configure
+index f4d949b35b..939f54178b 100755
+--- a/configure
++++ b/configure
+@@ -1518,6 +1518,10 @@ for opt do
+   ;;
+   --disable-libpmem) libpmem=no
+   ;;
++  --enable-libudev) libudev=yes
++  ;;
++  --disable-libudev) libudev=no
++  ;;
+   --disable-fortify-source) fortify_source="no"
+   ;;
+   *)
diff --git a/utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
deleted file mode 100644 (file)
index bd1ac2d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-From 83e72b93889fbcbbfff281b0dbcc58c5a7455257 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 2/3] disas: fix compilation failure when isnan is a macro
-
----
- disas/libvixl/vixl/utils.h | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
-index 5ab134e..df30663 100644
---- a/disas/libvixl/vixl/utils.h
-+++ b/disas/libvixl/vixl/utils.h
-@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
- // An fpclassify() function for 16-bit half-precision floats.
- int float16classify(float16 value);
-+#ifdef isnan
-+#define isnan_ isnan
-+#else
-+#define isnan_ std::isnan
-+#endif
-+
- // NaN tests.
- inline bool IsSignallingNaN(double num) {
-   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
-   uint64_t raw = double_to_rawbits(num);
--  if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-+  if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-     return true;
-   }
-   return false;
-@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
- inline bool IsSignallingNaN(float num) {
-   const uint32_t kFP32QuietNaNMask = 0x00400000;
-   uint32_t raw = float_to_rawbits(num);
--  if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-+  if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-     return true;
-   }
-   return false;
-@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
- template <typename T>
- inline bool IsQuietNaN(T num) {
--  return std::isnan(num) && !IsSignallingNaN(num);
-+  return isnan_(num) && !IsSignallingNaN(num);
- }
- // Convert the NaN in 'num' to a quiet NaN.
- inline double ToQuietNaN(double num) {
-   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
--  VIXL_ASSERT(std::isnan(num));
-+  VIXL_ASSERT(isnan_(num));
-   return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
- }
- inline float ToQuietNaN(float num) {
-   const uint32_t kFP32QuietNaNMask = 0x00400000;
--  VIXL_ASSERT(std::isnan(num));
-+  VIXL_ASSERT(isnan_(num));
-   return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
- }
--- 
-1.8.3.1
-
diff --git a/utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
new file mode 100644 (file)
index 0000000..a204f18
--- /dev/null
@@ -0,0 +1,66 @@
+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
+
+---
+ disas/libvixl/vixl/utils.h | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
+index 5ab134e240..df30663df8 100644
+--- a/disas/libvixl/vixl/utils.h
++++ b/disas/libvixl/vixl/utils.h
+@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
+ // An fpclassify() function for 16-bit half-precision floats.
+ int float16classify(float16 value);
++#ifdef isnan
++#define isnan_ isnan
++#else
++#define isnan_ std::isnan
++#endif
++
+ // NaN tests.
+ inline bool IsSignallingNaN(double num) {
+   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+   uint64_t raw = double_to_rawbits(num);
+-  if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
++  if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
+     return true;
+   }
+   return false;
+@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
+ inline bool IsSignallingNaN(float num) {
+   const uint32_t kFP32QuietNaNMask = 0x00400000;
+   uint32_t raw = float_to_rawbits(num);
+-  if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
++  if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
+     return true;
+   }
+   return false;
+@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
+ template <typename T>
+ inline bool IsQuietNaN(T num) {
+-  return std::isnan(num) && !IsSignallingNaN(num);
++  return isnan_(num) && !IsSignallingNaN(num);
+ }
+ // Convert the NaN in 'num' to a quiet NaN.
+ inline double ToQuietNaN(double num) {
+   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+-  VIXL_ASSERT(std::isnan(num));
++  VIXL_ASSERT(isnan_(num));
+   return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
+ }
+ inline float ToQuietNaN(float num) {
+   const uint32_t kFP32QuietNaNMask = 0x00400000;
+-  VIXL_ASSERT(std::isnan(num));
++  VIXL_ASSERT(isnan_(num));
+   return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
+ }
diff --git a/utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
deleted file mode 100644 (file)
index 374afc2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From b6d4bff30f2bdc3a6f26c9f6c7f32e352270d119 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 3/3] pc-bios: fix compilation when $(AS) is actually gcc
- driver
-
----
- pc-bios/optionrom/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
-index a9a9e5e..f88b3ee 100644
---- a/pc-bios/optionrom/Makefile
-+++ b/pc-bios/optionrom/Makefile
-@@ -34,7 +34,7 @@ endif
- QEMU_INCLUDES += -I$(SRC_PATH)
- Wa = -Wa,
--ASFLAGS += -32
-+ASFLAGS += $(Wa)-32
- QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
- build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
- %.o: %.S
--      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
-+      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
- %.img: %.o
-       $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
--- 
-1.8.3.1
-
diff --git a/utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
new file mode 100644 (file)
index 0000000..45e4ca5
--- /dev/null
@@ -0,0 +1,32 @@
+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
+ driver
+
+---
+ pc-bios/optionrom/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
+index e33a24da0d..ce734e8202 100644
+--- a/pc-bios/optionrom/Makefile
++++ b/pc-bios/optionrom/Makefile
+@@ -34,7 +34,7 @@ endif
+ QEMU_INCLUDES += -I$(SRC_PATH)
+ Wa = -Wa,
+-ASFLAGS += -32
++ASFLAGS += $(Wa)-32
+ QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
+ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin 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)$@")
+ 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 8399f19bdf1ce38a4448effff892886eee4f581d..c4244522f4c13ba4e2c2c399632b44946697c123 100644 (file)
@@ -9,14 +9,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=screen
 PKG_VERSION:=4.6.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
 PKG_SOURCE_URL:=@GNU/screen
+PKG_HASH:=1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a
 
+PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
 PKG_LICENSE:=GPL-3.0+
-PKG_LICENSE_FILES:=
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,8 +31,7 @@ define Package/screen
   SUBMENU:=Terminal
   DEPENDS:=+libncurses
   TITLE:=Full-screen terminal window manager
-  URL:=http://www.gnu.org/software/screen/
-  MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
+  URL:=https://www.gnu.org/software/screen/
 endef
 
 define Package/screen/description
@@ -35,14 +39,9 @@ define Package/screen/description
        terminal between several processes, typically interactive shells.
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default,\
-               --with-sys-screenrc=/etc/screenrc \
-               --enable-colors256 \
-       )
-       # XXX: memmove() works well with overlapped memory areas
-       echo "#define USEMEMMOVE 1" >>$(PKG_BUILD_DIR)/config.h
-endef
+CONFIGURE_ARGS += \
+       --enable-colors256 \
+       --with-sys-screenrc=/etc/screenrc
 
 define Package/screen/install
        $(INSTALL_DIR) $(1)/usr/sbin
diff --git a/utils/screen/patches/010-fix-configure-failed-while-build-dir-name-contains-y.patch b/utils/screen/patches/010-fix-configure-failed-while-build-dir-name-contains-y.patch
new file mode 100644 (file)
index 0000000..ede6de9
--- /dev/null
@@ -0,0 +1,128 @@
+From 8c2b4061d16756ee2ed37f08db063b8215656943 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 2 Nov 2017 16:48:15 +0800
+Subject: [PATCH] fix configure failed while build dir name contains "yes"
+
+While build dir name contained "yes", and compiled with
+producing debugging information (-g), the configure failed.
+
+The pattern of AC_EGREP_CPP (string "yes") mismatched with
+dir name. It caused the test of AC_EGREP_CPP incorrect.
+
+Use YES_IS_DEFINED to replace yes which is not often used
+as dir name.
+
+Bug: 52329
+(Fix release v.4.6.2 or above)
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 28237f5..34f9735 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -151,9 +151,9 @@ fi
+ AC_CHECKING(for Ultrix)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(ultrix) || defined(__ultrix)
+-   yes;
++   YES_IS_DEFINED;
+ #endif
+ ], ULTRIX=1)
+@@ -168,9 +168,9 @@ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
+ dnl BBN butterfly is not POSIX, but a MACH BSD system.
+ dnl Do not define POSIX and TERMIO.
+ AC_CHECKING(for butterfly)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(butterfly)
+-  yes;
++  YES_IS_DEFINED;
+ #endif
+ ], butterfly=1)
+@@ -179,12 +179,12 @@ if test -n "$ULTRIX"; then
+   test -z "$GCC" && CC="$CC -YBSD"
+ fi
+ AC_CHECKING(for POSIX.1)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#include <sys/types.h>
+ #include <unistd.h>
+ main () {
+ #ifdef _POSIX_VERSION
+-  yes;
++  YES_IS_DEFINED;
+ #endif
+ ], AC_NOTE(- you have a POSIX system) AC_DEFINE(POSIX) posix=1)
+ fi
+@@ -196,9 +196,9 @@ AC_TRY_COMPILE(
+ #include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV))
+ AC_CHECKING(for sequent/ptx)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef _SEQUENT_
+-  yes;
++  YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+@@ -213,9 +213,9 @@ AC_TRY_LINK([#include <utmpx.h>
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+ AC_CHECKING(for Solaris 2.x)
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(SVR4) && defined(sun)
+-  yes
++  YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -lnsl -lkstat")
+@@ -699,9 +699,9 @@ else
+ pdir='/dev'
+ fi
+ dnl SCO uses ptyp%d
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef M_UNIX
+-   yes;
++   YES_IS_DEFINED;
+ #endif
+ ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
+ dnl if test -c /dev/ptyp19; then
+@@ -878,9 +878,9 @@ fi
+ )
+ if test -z "$load" ; then
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#if defined(NeXT) || defined(apollo) || defined(linux)
+-  yes;
++  YES_IS_DEFINED;
+ #endif
+ ], load=1)
+ fi
+@@ -1105,9 +1105,9 @@ AC_CHECKING(syslog in libbsd.a)
+ AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
+ AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
+-AC_EGREP_CPP(yes,
++AC_EGREP_CPP(YES_IS_DEFINED,
+ [#ifdef M_UNIX
+-   yes;
++   YES_IS_DEFINED;
+ #endif
+ ], LIBS="$LIBS -lsocket -lcrypt_i")
+-- 
+2.17.1
+
diff --git a/utils/screen/patches/020-fix-configure-option-disable-use-locale-is-not-worki.patch b/utils/screen/patches/020-fix-configure-option-disable-use-locale-is-not-worki.patch
new file mode 100644 (file)
index 0000000..95ba880
--- /dev/null
@@ -0,0 +1,44 @@
+From 5c3643fb701cc380ceb02116526ef4f5885295d0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
+Date: Sat, 16 Dec 2017 15:09:57 +0100
+Subject: [PATCH] fix: configure option "--disable-use-locale" is not working
+
+Bug: 52663
+---
+ acconfig.h   | 2 +-
+ configure.ac | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/acconfig.h b/src/acconfig.h
+index 4e5cda0..6ff2d32 100644
+--- a/acconfig.h
++++ b/acconfig.h
+@@ -274,7 +274,7 @@
+  * Define USE_LOCALE if you want screen to use the locale names
+  * for the name of the month and day of the week.
+  */
+-#define USE_LOCALE
++#undef USE_LOCALE
+ /*
+  * Define USE_PAM if your system supports PAM (Pluggable Authentication
+diff --git a/src/configure.ac b/src/configure.ac
+index 34f9735..d1bc42c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1246,7 +1246,11 @@ if test "$enable_pam" = "yes"; then
+        AC_MSG_RESULT(no);LIBS="$oldlibs")
+ fi
+-AC_ARG_ENABLE(use_locale, [  --enable-use-locale         use localized month/day names])
++AC_ARG_ENABLE(use-locale,
++    [  --enable-use-locale     use localized month/day names (default: yes)],
++    [],
++    [enable_use_locale=yes]
++)
+ if test "$enable_use_locale" = "yes"; then
+   AC_DEFINE(USE_LOCALE)
+ fi
+-- 
+2.17.1
+
diff --git a/utils/screen/patches/030-PATCH-1-4-Remove-redundant-compiler-sanity-checks.patch b/utils/screen/patches/030-PATCH-1-4-Remove-redundant-compiler-sanity-checks.patch
new file mode 100644 (file)
index 0000000..3e04e1b
--- /dev/null
@@ -0,0 +1,65 @@
+From 6b320186db7df1e58fdd2c836af54c86cc596981 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:09:10 +0100
+Subject: [PATCH] [PATCH 1/4] Remove redundant compiler sanity checks
+
+AC_PROG_CC already performs sanity checks. And unlike the removed
+checks, it does so in a way that supports cross compilation.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 27 ---------------------------
+ 1 file changed, 27 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index d1bc42c..a8208ea 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
+ AC_ISC_POSIX
+ AC_USE_SYSTEM_EXTENSIONS
+-AC_TRY_RUN(main(){exit(0);},,[
+-if test $CC != cc ; then
+-AC_NOTE(Your $CC failed - restarting with CC=cc)
+-AC_NOTE()
+-CC=cc
+-export CC
+-exec $0 $configure_args
+-fi
+-])
+-
+-AC_TRY_RUN(main(){exit(0);},,
+-exec 5>&2
+-eval $ac_link
+-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
+-AC_NOTE($ac_compile)
+-AC_MSG_ERROR(Can't run the compiler - sorry))
+-
+-AC_TRY_RUN([
+-main()
+-{
+-  int __something_strange_();
+-  __something_strange_(0);
+-}
+-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
+-
+ AC_PROG_AWK
+ AC_PROG_INSTALL
+@@ -1278,8 +1253,6 @@ fi
+ dnl Ptx bug workaround -- insert -lc after -ltermcap
+ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
+-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
+-
+ ETCSCREENRC=
+ AC_MSG_CHECKING(for the global screenrc file)
+ AC_ARG_WITH(sys-screenrc, [  --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
+-- 
+2.17.1
+
diff --git a/utils/screen/patches/040-PATCH-2-4-Provide-cross-compile-alternatives-for-AC_.patch b/utils/screen/patches/040-PATCH-2-4-Provide-cross-compile-alternatives-for-AC_.patch
new file mode 100644 (file)
index 0000000..9e573a0
--- /dev/null
@@ -0,0 +1,137 @@
+From abba47ce4206506c49858d944e904fff86ae65cc Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:14:48 +0100
+Subject: [PATCH] [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 32 ++++++++++++++++++++------------
+ 1 file changed, 20 insertions(+), 12 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index a8208ea..74be368 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,7 +348,8 @@ main()
+   exit(0);
+ }
+ ], AC_NOTE(- your fifos are usable) fifo=1,
+-AC_NOTE(- your fifos are not usable))
++AC_NOTE(- your fifos are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
+ rm -f /tmp/conftest*
+ if test -n "$fifo"; then
+@@ -396,7 +397,8 @@ main()
+   exit(0);
+ }
+ ], AC_NOTE(- your implementation is ok), 
+-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
++AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
+ rm -f /tmp/conftest*
+ fi
+@@ -458,7 +460,8 @@ main()
+   exit(0);
+ }
+ ], AC_NOTE(- your sockets are usable) sock=1,
+-AC_NOTE(- your sockets are not usable))
++AC_NOTE(- your sockets are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
+ rm -f /tmp/conftest*
+ if test -n "$sock"; then
+@@ -497,7 +500,8 @@ main()
+ }
+ ],AC_NOTE(- you are normal),
+ AC_NOTE(- unix domain sockets are not kept in the filesystem)
+-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
++AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
+ rm -f /tmp/conftest*
+ fi
+@@ -598,7 +602,8 @@ main()
+   exit(0);
+ }
+ ],AC_NOTE(- select is ok),
+-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
++AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
++AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
+ dnl
+ dnl    ****  termcap or terminfo  ****
+@@ -640,7 +645,8 @@ main()
+ {
+  exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+ }], AC_NOTE(- you use the termcap database),
+-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
++AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
++AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
+ AC_CHECKING(ospeed)
+ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+@@ -775,7 +781,8 @@ main()
+     else
+       AC_NOTE(- can't determine - assume ptys are world accessable)
+     fi
+-  ]
++  ],
++  AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
+ )
+ rm -f conftest_grp
+ fi
+@@ -859,7 +866,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], load=1)
+ fi
+-if test -z "$load" ; then
++if test -z "$load" && test "$cross_compiling" = no ; then
+ AC_CHECKING(for kernelfile)
+ for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
+   if test -f $core || test -c $core; then
+@@ -1052,7 +1059,7 @@ main()
+ #endif
+   exit(0);
+ }
+-],,AC_DEFINE(SYSVSIGS))
++],,AC_DEFINE(SYSVSIGS),:)
+ fi
+@@ -1132,7 +1139,7 @@ main() {
+   if (strncmp(buf, "cdedef", 6))
+     exit(1);
+   exit(0); /* libc version works properly.  */
+-}], AC_DEFINE(USEBCOPY))
++}], AC_DEFINE(USEBCOPY),,:)
+ AC_TRY_RUN([
+ #define bcopy(s,d,l) memmove(d,s,l)
+@@ -1147,7 +1154,8 @@ main() {
+   if (strncmp(buf, "cdedef", 6))
+     exit(1);
+   exit(0); /* libc version works properly.  */
+-}], AC_DEFINE(USEMEMMOVE))
++}], AC_DEFINE(USEMEMMOVE),,
++  AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
+ AC_TRY_RUN([
+@@ -1163,7 +1171,7 @@ main() {
+   if (strncmp(buf, "cdedef", 6))
+     exit(1);
+   exit(0); /* libc version works properly.  */
+-}], AC_DEFINE(USEMEMCPY))
++}], AC_DEFINE(USEMEMCPY),,:)
+ AC_SYS_LONG_FILE_NAMES
+-- 
+2.17.1
+
diff --git a/utils/screen/patches/050-PATCH-3-4-Skip-host-file-system-checks-when-cross-co.patch b/utils/screen/patches/050-PATCH-3-4-Skip-host-file-system-checks-when-cross-co.patch
new file mode 100644 (file)
index 0000000..fc9a91e
--- /dev/null
@@ -0,0 +1,135 @@
+From c573b89139e7a068f5573abd565605bed60f293f Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:18:33 +0100
+Subject: [PATCH] [PATCH 3/4] Skip host file system checks when cross-compiling
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index 74be368..bd748d9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
+ dnl
+ dnl    ****  special unix variants  ****
+ dnl
+-if test -n "$ISC"; then
++if test "$cross_compiling" = no && test -n "$ISC" ; then
+   AC_DEFINE(ISC) LIBS="$LIBS -linet"
+ fi
+@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1)        # this disables MIPS again....
+ dnl fi
+ dnl fi
+-if test -f /sysV68 ; then
++if test "$cross_compiling" = no && test -f /sysV68 ; then
+ AC_DEFINE(sysV68)
+ fi
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for MIPS)
+ if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
+ oldlibs="$LIBS"
+@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
+ ))
+ fi
+ fi
++fi
+ AC_CHECKING(for Ultrix)
+@@ -132,7 +134,7 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], ULTRIX=1)
+-if test -f /usr/lib/libpyr.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpyr"
+ AC_CHECKING(Pyramid OSX)
+@@ -653,17 +655,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+ dnl
+ dnl    ****  PTY specific things  ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for /dev/ptc)
+ if test -r /dev/ptc; then
+ AC_DEFINE(HAVE_DEV_PTC)
+ fi
++fi
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for SVR4 ptys)
+ sysvr4ptys=
+ if test -c /dev/ptmx ; then
+ AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+ sysvr4ptys=1])
+ fi
++fi
+ AC_CHECK_FUNCS(getpt)
+@@ -673,6 +679,7 @@ AC_CHECK_FUNCS(openpty,,
+ [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+ fi
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for ptyranges)
+ if test -d /dev/ptym ; then
+ pdir='/dev/ptym'
+@@ -696,6 +703,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\
+ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+ AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
+ fi
++fi
+ dnl    ****  pty mode/group handling ****
+ dnl
+@@ -843,14 +851,16 @@ fi
+ dnl
+ dnl    ****  loadav  ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for libutil(s))
+ test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
+ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
++fi
+ AC_CHECKING(getloadavg)
+ AC_TRY_LINK(,[getloadavg((double *)0, 0);],
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1,
+-if test -f /usr/lib/libkvm.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
+ olibs="$LIBS"
+ LIBS="$LIBS -lkvm"
+ AC_CHECKING(getloadavg with -lkvm)
+@@ -1068,13 +1078,18 @@ dnl    ****  libraries  ****
+ dnl
+ AC_CHECKING(for crypt and sec libraries)
++if test "$cross_compiling" = no ; then
+ test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
++fi
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lcrypt"
+ AC_CHECKING(crypt)
+ AC_TRY_LINK(,,,LIBS="$oldlibs")
++if test "$cross_compiling" = no ; then
+ test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
+ test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
++fi
++
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lsun"
+ AC_CHECKING(IRIX sun library)
+-- 
+2.17.1
+
diff --git a/utils/screen/patches/060-PATCH-4-4-Avoid-mis-identifying-systems-as-SVR4.patch b/utils/screen/patches/060-PATCH-4-4-Avoid-mis-identifying-systems-as-SVR4.patch
new file mode 100644 (file)
index 0000000..51d6c01
--- /dev/null
@@ -0,0 +1,57 @@
+From ec90292592dd2c9d5c108390841e3df24e377ed5 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 24 Feb 2018 15:22:05 +0100
+Subject: [PATCH] [PATCH 4/4] Avoid mis-identifying systems as SVR4
+
+Linux can be misdetected as SVR4 because it has
+libelf installed. This leads to linking with libelf, even though no
+symbols from that library were actually used, and to a workaround for
+a buggy getlogin() being enabled.
+
+It is not documented which exact SVR4 system had the bug that the
+workaround was added for, so all I could do is make an educated guess
+at the #defines its compiler would be likely to set.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/src/configure.ac b/src/configure.ac
+index bd748d9..ab799d2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,14 +179,24 @@ AC_EGREP_CPP(YES_IS_DEFINED,
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
++AC_CHECKING(SVR4)
++AC_EGREP_CPP(yes,
++[main () {
++#if defined(SVR4) || defined(__SVR4)
++  yes;
++#endif
++], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
++if test -n "$svr4" ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lelf"
+ AC_CHECKING(SVR4)
+ AC_TRY_LINK([#include <utmpx.h>
+ ],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
++[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
++[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
+ ,LIBS="$oldlibs")
++fi
++
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+ AC_CHECKING(for Solaris 2.x)
+-- 
+2.17.1
+
diff --git a/utils/screen/patches/100-cross_compile_fix.patch b/utils/screen/patches/100-cross_compile_fix.patch
deleted file mode 100644 (file)
index 38821c4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -414,7 +414,7 @@ as_fn_error ()
-     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-   fi
-   $as_echo "$as_me: error: $2" >&2
--  as_fn_exit $as_status
-+  # as_fn_exit $as_status
- } # as_fn_error
- if expr a : '\(a\)' >/dev/null 2>&1 &&
-@@ -5909,8 +5909,6 @@ else
- fi
- rm -f core conftest.err conftest.$ac_objext \
-     conftest$ac_exeext conftest.$ac_ext
--test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
--test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
- oldlibs="$LIBS"
- LIBS="$LIBS -lsun"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIX sun library..." >&5
-@@ -6991,7 +6989,7 @@ as_fn_error ()
-     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-   fi
-   $as_echo "$as_me: error: $2" >&2
--  as_fn_exit $as_status
-+  # as_fn_exit $as_status
- } # as_fn_error
---- a/pty.c
-+++ b/pty.c
-@@ -39,9 +39,9 @@
- #endif
- /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
--#ifdef HAVE_STROPTS_H
--# include <sys/stropts.h>
--#endif
-+//#ifdef HAVE_STROPTS_H
-+//# include <sys/stropts.h>
-+//#endif
- #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
- # include <sys/ttold.h>
---- a/sched.h
-+++ b/sched.h
-@@ -27,6 +27,11 @@
-  * $Id$ GNU
-  */
-+#ifndef __SCHED_H
-+#define __SCHED_H
-+
-+#include <sys/time.h>
-+
- struct event
- {
-   struct event *next;
-@@ -46,3 +51,5 @@ struct event
- #define EV_READ               1
- #define EV_WRITE      2
- #define EV_ALWAYS     3
-+
-+#endif
diff --git a/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch b/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch
deleted file mode 100644 (file)
index 61389b7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -79,7 +79,7 @@ screen: $(OFILES)
-       $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
- .c.o:
--      $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
-+      $(CC) -c $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
-           $(OPTIONS) $(CFLAGS) $<
- install_bin: .version screen installdirs
diff --git a/utils/screen/patches/200-musl-compat.patch b/utils/screen/patches/200-musl-compat.patch
deleted file mode 100644 (file)
index cd783bd..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -4155,44 +4155,6 @@ fi
- rm -f conftest*
--oldlibs="$LIBS"
--LIBS="$LIBS -lelf"
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SVR4..." >&5
--$as_echo "$as_me: checking SVR4..." >&6;}
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--#include <utmpx.h>
--
--int
--main ()
--{
--
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_fn_c_check_header_mongrel "$LINENO" "dwarf.h" "ac_cv_header_dwarf_h" "$ac_includes_default"
--if test "x$ac_cv_header_dwarf_h" = xyes; then :
--  $as_echo "#define SVR4 1" >>confdefs.h
-- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h
--
--else
--  ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
--if test "x$ac_cv_header_elf_h" = xyes; then :
--  $as_echo "#define SVR4 1" >>confdefs.h
-- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h
--
--fi
--
--
--fi
--
--
--
--else
--  LIBS="$oldlibs"
--fi
- rm -f core conftest.err conftest.$ac_objext \
-     conftest$ac_exeext conftest.$ac_ext
- for ac_header in stropts.h string.h strings.h
---- a/utmp.c
-+++ b/utmp.c
-@@ -33,6 +33,7 @@
- #include "config.h"
- #include "screen.h"
- #include "extern.h"
-+#include "os.h"
- #ifdef HAVE_UTEMPTER
- #include <utempter.h>
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 a7278a03e9cd0c6cf2d2cca41563bdd58474b4a2..45e5529baf122af3b82e83ecc68ec9ffc4b65fa3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sysstat
 PKG_VERSION:=12.0.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
index a8190008dae41ff4e4cdd37759c85cadb1083ae7..9975d5ea601b5576d933708b7b80e6245929bac5 100755 (executable)
@@ -9,7 +9,7 @@ PROG=/usr/lib/sysstat/sadc
 SYSSTAT_CFG="/etc/sysstat/sysstat"
 
 validate_sysstat_section() {
-       uci_validate_section sysstat sysstat "${1}" \
+       uci_load_validate sysstat sysstat "$1" "$2" \
                'log_history:uinteger' \
                'compressafter:uinteger' \
                'sadc_options:string' \
@@ -18,11 +18,8 @@ validate_sysstat_section() {
                'enabled:string'
 }
 
-start_service() {
-
-       local log_history compressafter sadc_options sa_dir zip enabled
-
-       validate_sysstat_section sysstat || {
+start_sysstat_instance() {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -42,6 +39,10 @@ start_service() {
        procd_close_instance
 }
 
+start_service() {
+       validate_sysstat_section sysstat start_sysstat_instance
+}
+
 service_triggers()
 {
        procd_add_reload_trigger "sysstat"
diff --git a/utils/tang/Makefile b/utils/tang/Makefile
new file mode 100644 (file)
index 0000000..0bc686d
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tang
+PKG_VERSION:=6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=1df78b48a52d2ca05656555cfe52bd4427c884f5a54a2c5e37a7b39da9e155e3
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tang
+  SECTION:=utils
+  TITLE:=tang v$(PKG_VERSION) - daemon for binding data to the presence of a third party
+  DEPENDS:=+libhttp-parser +xinetd +jose +bash
+  URL:=https://github.com/latchset/tang
+  MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/tang/description
+       Tang is a small daemon for binding data to the presence of a third party.
+endef
+
+define Package/tang/conffiles
+/etc/xinetd.d/tangdx
+/usr/share/tang/db/
+endef
+
+define Package/tang/install
+       $(INSTALL_DIR)  $(1)/usr/libexec
+       $(INSTALL_DIR)  $(1)/etc/xinetd.d/
+       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/lib/tangd*       $(1)/usr/libexec/
+       $(INSTALL_BIN)  ./files/tangdw                          $(1)/usr/libexec/
+       $(CP)           ./files/tangdx                          $(1)/etc/xinetd.d/
+endef
+
+define Package/tang/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+       mkdir -p /usr/share/tang/db && mkdir -p /usr/share/tang/cache
+       KEYS=$(find /usr/share/tang/db/ -name "*.jw*" -maxdepth 1 | wc -l)
+       if [ "${KEYS}" = "0" ]; then # if db is empty generate new key pair
+               /usr/libexec/tangd-keygen /usr/share/tang/db/
+       elif [ "${KEYS}" = "1" ]; then # having 1 key should not happen
+               (>&2 echo "Please check the Tang's keys in /usr/share/tang/db \
+and regenate cache using /usr/libexec/tangd-update script.")
+       else
+               /usr/libexec/tangd-update /usr/share/tang/db/ /usr/share/tang/cache/
+       fi
+       (cat /etc/services | grep -E "tangd.*8888\/tcp") > /dev/null \
+               || echo -e "tangd\t\t8888/tcp" >> /etc/services
+fi
+endef
+
+$(eval $(call BuildPackage,tang))
diff --git a/utils/tang/files/tangdw b/utils/tang/files/tangdw
new file mode 100755 (executable)
index 0000000..91c8a89
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo "==================================" >> /var/log/tangd.log
+echo `date`: >> /var/log/tangd.log
+/usr/libexec/tangd $1 2>> /var/log/tangd.log
diff --git a/utils/tang/files/tangdx b/utils/tang/files/tangdx
new file mode 100644 (file)
index 0000000..2b15eb0
--- /dev/null
@@ -0,0 +1,12 @@
+service tangd
+{
+    port            = 8888
+    socket_type     = stream
+    wait            = no
+    user            = root
+    server          = /usr/libexec/tangdw
+    server_args     = /usr/share/tang/cache
+    log_on_success  += USERID
+    log_on_failure  += USERID
+    disable         = no
+}
diff --git a/utils/tang/patches/Makefile_am.patch b/utils/tang/patches/Makefile_am.patch
new file mode 100644 (file)
index 0000000..647aca5
--- /dev/null
@@ -0,0 +1,45 @@
+diff --git a/Makefile.am b/Makefile.am
+index 14bf91d..dfa6d07 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,3 @@
+-DISTCHECK_CONFIGURE_FLAGS = --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
+-
+ AM_CFLAGS = @TANG_CFLAGS@ @jose_CFLAGS@
+ LDADD = @jose_LIBS@ @http_parser_LIBS@
+@@ -7,21 +5,11 @@ nagiosdir = $(libdir)/nagios/plugins
+ cachedir = $(localstatedir)/cache/$(PACKAGE_NAME)
+ jwkdir = $(localstatedir)/db/$(PACKAGE_NAME)
+-nodist_systemdsystemunit_DATA = \
+-    units/tangd@.service \
+-    units/tangd.socket \
+-    units/tangd-update.path \
+-    units/tangd-update.service \
+-    units/tangd-keygen.service
+-
+ dist_libexec_SCRIPTS = src/tangd-update src/tangd-keygen
+ libexec_PROGRAMS = src/tangd
+-nagios_PROGRAMS = src/tang
+-man1_MANS = doc/tang-nagios.1
+ man8_MANS = doc/tang.8
+ src_tangd_SOURCES = src/http.c src/http.h src/tangd.c
+-src_tang_SOURCES = src/nagios.c
+ %: %.in
+       $(AM_V_GEN)mkdir -p "`dirname "$@"`"
+@@ -32,11 +20,9 @@ src_tang_SOURCES = src/nagios.c
+               $(srcdir)/$@.in > $@
+ AM_TESTS_ENVIRONMENT = SD_ACTIVATE="@SD_ACTIVATE@" PATH=$(srcdir)/src:$(builddir)/src:$(PATH)
+-TESTS = tests/adv tests/rec tests/nagios
++TESTS = tests/adv tests/rec 
+-CLEANFILES = $(nodist_systemdsystemunit_DATA)
+ EXTRA_DIST = \
+-    $(foreach unit,$(nodist_systemdsystemunit_DATA),$(unit).in) \
+     COPYING \
+     $(TESTS) \
+     $(man1_MANS) \
diff --git a/utils/tang/patches/rm-systemd-from-configure.patch b/utils/tang/patches/rm-systemd-from-configure.patch
new file mode 100644 (file)
index 0000000..50dc68c
--- /dev/null
@@ -0,0 +1,37 @@
+diff --git a/configure.ac b/configure.ac
+index b51bb31..4b37d30 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,32 +27,6 @@ AC_CHECK_LIB([http_parser], [http_parser_execute],
+              [AC_MSG_ERROR([http-parser required!])])
+ PKG_CHECK_MODULES([jose], [jose >= 8])
+-PKG_CHECK_MODULES([systemd], [systemd])
+-
+-AC_ARG_WITH([systemdsystemunitdir],
+-            [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
+-            [],
+-            [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+-
+-AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+-
+-for ac_prog in systemd-socket-activate systemd-activate; do
+-    AC_CHECK_PROG([SD_ACTIVATE], [$ac_prog], [$as_dir/$ac_prog], [],
+-                [$PATH$PATH_SEPARATOR$($PKG_CONFIG --variable=systemdutildir systemd)])
+-    test -n "$SD_ACTIVATE" && break
+-done
+-
+-test -n "$SD_ACTIVATE" || AC_MSG_ERROR([systemd-socket-activate required!])
+-
+-AC_MSG_CHECKING([systemd-socket-activate inetd flag])
+-if $SD_ACTIVATE --help | grep -q inetd; then
+-    SD_ACTIVATE="$SD_ACTIVATE --inetd"
+-    AC_MSG_RESULT([--inetd])
+-else
+-    AC_MSG_RESULT([(default)])
+-fi
+-
+-AC_SUBST(SD_ACTIVATE)
+ TANG_CFLAGS="\
+ -Wall \
diff --git a/utils/tang/patches/use-readlink-in-tangd-update.patch b/utils/tang/patches/use-readlink-in-tangd-update.patch
new file mode 100644 (file)
index 0000000..7c07b1d
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/src/tangd-update b/src/tangd-update
+index 652dbef..01aa842 100755
+--- a/src/tangd-update
++++ b/src/tangd-update
+@@ -33,8 +33,8 @@ fi
+ [ ! -d "$2" ] && mkdir -p -m 0700 "$2"
+-src=`realpath "$1"`
+-dst=`realpath "$2"`
++src=`readlink -f "$1"`
++dst=`readlink -f "$2"`
+ payl=()
+ sign=()
index 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 21efa69135ea5269e3db0b3627127ac8b99bbd39..5ec444e4d9d1be5e6bb4c18b53fba79e6e954ebd 100644 (file)
@@ -9,17 +9,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ttyd
 PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE_VERSION=$(PKG_VERSION)
-PKG_HASH=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
+PKG_HASH:=ff1a66b418df6cd741868a8ea84f69cd63f15e52e3fa117641ec57d3c37a1315
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
+PKG_BUILD_DEPENDS:=vim/host
 CMAKE_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
index 1ae48ed4ffe0bbd84e69d80c86582351c05b8a8f..528a585f55474b115a189e8ada71a47d607b9c11 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unrar
-PKG_VERSION:=5.6.8
+PKG_VERSION:=5.7.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.rarlab.com/rar
-PKG_HASH:=a4cc0ac14a354827751912d2af4a0a09e2c2129df5766576fa7e151791dd3dff
+PKG_HASH:=40e856b78374f258d8a1f5f02c02f828c5392a0118c9300fd169a300b520a444
 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
                Ted Hess <thess@kitschensync.net>
 
@@ -25,6 +25,12 @@ PKG_INSTALL:=1
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
+ifeq ($(CONFIG_USE_UCLIBCXX),y)
+TARGET_LDFLAGS +=-nodefaultlibs
+endif
+TARGET_CXXFLAGS +=-fno-rtti -flto
+TARGET_LDFLAGS +=$(FPIC) -Wl,--gc-sections
+
 define Package/unrar/Default
   TITLE:=UnRAR
   SUBMENU:=Compression
@@ -58,9 +64,6 @@ define Package/libunrar/description
   archives
 endef
 
-MAKE_FLAGS += \
-       LDFLAGS="$(TARGET_LDFLAGS) -lpthread"
-
 ifeq ($(BUILD_VARIANT),lib)
 define Build/Compile
        $(call Build/Compile/Default,lib)
index 9729612201efe285f737980e6c04ff31963fb651..65d06efc77b39f5da0278d6978e652e6d735d6e1 100644 (file)
@@ -1,22 +1,27 @@
 --- a/makefile
 +++ b/makefile
-@@ -2,13 +2,13 @@
+@@ -2,14 +2,14 @@
  # Makefile for UNIX - unrar
  
  # Linux using GCC
 -CXX=c++
 -CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
-+#CXX=c++
-+#CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
- LIBFLAGS=-fPIC
+-LIBFLAGS=-fPIC
++CXX?=c++
++CXXFLAGS?=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
++LIBFLAGS?=-fPIC
  DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
- STRIP=strip
- AR=ar
+-STRIP=strip
+-AR=ar
 -LDFLAGS=-pthread
-+LDFLAGS=-lpthread
- DESTDIR=/usr
+-DESTDIR=/usr
++STRIP?=strip
++AR?=ar
++LDFLAGS?=-lpthread
++DESTDIR?=/usr
  
  # Linux using LCC
+ #CXX=lcc
 @@ -166,7 +166,7 @@ uninstall-unrar:
                        rm -f $(DESTDIR)/bin/unrar
  
index 8e9e3f3f0936079f9af062499a9d50277835eaa7..e4ab2682f251ddd41d18957ae4a88e35071afb1d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vim
 PKG_VERSION:=8.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 VIMVER:=81
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -21,7 +21,11 @@ PKG_CPE_ID:=cpe:/a:vim:vim
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER)
 PKG_BUILD_PARALLEL:=1
 
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(VIMVER)
+HOST_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 
 define Package/vim/Default
   SECTION:=utils
@@ -242,3 +246,4 @@ $(eval $(call BuildPackage,vim-fuller))
 $(eval $(call BuildPackage,vim-runtime))
 $(eval $(call BuildPackage,vim-help))
 $(eval $(call BuildPackage,xxd))
+$(eval $(call HostBuild))
index fff7c4a1a1f7edf342f6e3076edf9debf8f2866c..8153e617870ca1133738af0f46f5f3587d60c326 100644 (file)
@@ -20,6 +20,7 @@ define Package/watchcat
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Enable the configuration of programed reboots
+  PKGARCH:=all
 endef
 
 define Package/watchcat/description
index c580e97817efda21092789afed88b0f21c1b6387..d9aa68d57b6b2be425c5b6f92a8962c9b38abfb9 100644 (file)
@@ -22,6 +22,7 @@ define Package/wifitoggle
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Script to toggle Wi-Fi with a button and UCI config
+  PKGARCH:=all
 endef
 
 define Package/wifitoggle/description
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 d138d6658c69062a65960a0bde2bf2f2a7fab2f7..f625ca3afb7e295caae91dce3915ff2eefcf7bdb 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2018 OpenWrt.org
+# Copyright (C) 2007-2019 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zoneinfo
-PKG_VERSION:=2018i
+PKG_VERSION:=2019a
 PKG_RELEASE:=1
 
 #As i couldn't find real license used "Public Domain"
@@ -19,14 +19,14 @@ PKG_LICENSE:=Public Domain
 PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
 PKG_SOURCE_CODE:=tzcode$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_HASH:=82c45ef84ca3bc01d0a4a397ba8adeb8f7f199c6550740587c6ac5a7108c00d9
+PKG_HASH:=90366ddf4aa03e37a16cd49255af77f801822310b213f195e2206ead48c59772
 
 include $(INCLUDE_DIR)/package.mk
 
 define Download/tzcode
    FILE=$(PKG_SOURCE_CODE)
    URL=$(PKG_SOURCE_URL)
-   HASH:=aaacdb876ca6fb9d58e244b462cbc7578a496b1b10994381b4b32b9f2ded32dc
+   HASH:=8739f162bc30cdfb482435697f969253abea49595541a0afd5f443fbae433ff5
 endef
 
 $(eval $(call Download,tzcode))
diff --git a/utils/zstd/Makefile b/utils/zstd/Makefile
new file mode 100644 (file)
index 0000000..dff96d6
--- /dev/null
@@ -0,0 +1,81 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zstd
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=63be339137d2b683c6d19a9e34f4fb684790e864fee13c7dd40e197a64c705c1
+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=build/cmake
+CMAKE_INSTALL:=1
+
+ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
+       TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+       TARGET_CFLAGS += -O3
+       TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS))
+       TARGET_CXXFLAGS += -O3
+endif
+
+define Package/zstd/Default
+       SUBMENU:=Compression
+       URL:=https://github.com/facebook/zstd
+       MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/libzstd
+$(call Package/zstd/Default)
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=zstd library.
+endef
+
+define Package/libzstd/description
+       Zstandard - Fast real-time compression algorithm.
+       This package provides libzstd library.
+endef
+
+define Package/libzstd/config
+       config ZSTD_OPTIMIZE_O3
+               bool "Use all optimizations (-O3)"
+               default y
+               help
+                       This enables additional optmizations using the -O3 compilation flag.
+endef
+
+define Package/zstd
+$(call Package/zstd/Default)
+       SECTION:=utils
+       CATEGORY:=Utilities
+       DEPENDS:=+libzstd
+       TITLE:=Fast real-time compression algorithm.
+endef
+
+define Package/zstd/description
+       Zstandard - Fast real-time compression algorithm.
+       This package provides the zstd binaries.
+endef
+
+define Package/libzstd/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib/
+endef
+
+define Package/zstd/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{unzstd,zstd,zstdcat,zstdmt} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libzstd))
+$(eval $(call BuildPackage,zstd))
+$(eval $(call HostBuild))