Merge pull request #8119 from jefferyto/snort-init
authorRosen Penev <rosenp@gmail.com>
Sun, 7 Apr 2019 22:22:25 +0000 (15:22 -0700)
committerGitHub <noreply@github.com>
Sun, 7 Apr 2019 22:22:25 +0000 (15:22 -0700)
snort: Update init script

713 files changed:
CONTRIBUTING.md
admin/netdata/Makefile
admin/sudo/Makefile
admin/syslog-ng/Makefile
devel/asu/Makefile [new file with mode: 0644]
devel/asu/files/asu.defaults [new file with mode: 0644]
devel/asu/files/asu.init [new file with mode: 0644]
lang/chicken-scheme/Makefile [new file with mode: 0644]
lang/dkjson/Makefile
lang/golang/golang-package.mk
lang/golang/golang-values.mk
lang/golang/golang-version.mk
lang/golang/golang/Makefile
lang/json4lua/Makefile
lang/lua-bencode/Makefile
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/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/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-serialport/Makefile
lang/perl-parse-recdescent/Makefile
lang/perl-text-csv_xs/Makefile
lang/php7-pecl-http/Makefile
lang/php7-pecl-mcrypt/Makefile
lang/php7/Makefile
lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch
lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch
lang/python/Flask/Makefile
lang/python/Jinja2/Makefile
lang/python/MarkupSafe/Makefile
lang/python/bcrypt/Makefile
lang/python/chardet/Makefile [deleted file]
lang/python/click-log/Makefile [new file with mode: 0644]
lang/python/pyodbc/Makefile
lang/python/python-aiohttp/Makefile [new file with mode: 0644]
lang/python/python-appdirs/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-attrs/Makefile
lang/python/python-automat/Makefile
lang/python/python-certifi/Makefile
lang/python/python-cffi/Makefile
lang/python/python-chardet/Makefile [new file with mode: 0644]
lang/python/python-constantly/Makefile
lang/python/python-contextlib2/Makefile [new file with mode: 0644]
lang/python/python-crypto/Makefile
lang/python/python-cryptodome/Makefile [new file with mode: 0644]
lang/python/python-cryptodome/patches/001-fix-libgmp-loading.patch [new file with mode: 0644]
lang/python/python-cryptodome/patches/002-omit-tests.patch [new file with mode: 0644]
lang/python/python-cryptodomex/Makefile [new file with mode: 0644]
lang/python/python-cryptodomex/patches/001-fix-libgmp-loading.patch [new file with mode: 0644]
lang/python/python-cryptodomex/patches/002-omit-tests.patch [new file with mode: 0644]
lang/python/python-cryptography/Makefile
lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch [deleted file]
lang/python/python-curl/Makefile
lang/python/python-curl/patches/0001-support-for-mbedTLS.patch [new file with mode: 0644]
lang/python/python-decorator/Makefile [new file with mode: 0644]
lang/python/python-dns/Makefile
lang/python/python-enum34/Makefile
lang/python/python-gmpy2/Makefile
lang/python/python-gnupg/Makefile
lang/python/python-hyperlink/Makefile
lang/python/python-idna/Makefile
lang/python/python-incremental/Makefile
lang/python/python-influxdb/Makefile [new file with mode: 0644]
lang/python/python-ipaddress/Makefile
lang/python/python-jsonpath-ng/Makefile [new file with mode: 0644]
lang/python/python-lxml/Makefile
lang/python/python-multidict/Makefile [new file with mode: 0644]
lang/python/python-oauthlib/Makefile
lang/python/python-package-install.sh
lang/python/python-package.mk
lang/python/python-paho-mqtt/Makefile [new file with mode: 0644]
lang/python/python-parsley/Makefile
lang/python/python-pcapy/Makefile
lang/python/python-pcapy/patches/010-libcxx.patch [new file with mode: 0644]
lang/python/python-ply/Makefile
lang/python/python-pyasn1-modules/Makefile
lang/python/python-pyasn1/Makefile
lang/python/python-pycparser/Makefile
lang/python/python-pyopenssl/Makefile
lang/python/python-pyotp/Makefile [new file with mode: 0644]
lang/python/python-pyptlib/Makefile
lang/python/python-pytz/Makefile [new file with mode: 0644]
lang/python/python-qrcode/Makefile
lang/python/python-requests-oauthlib/Makefile
lang/python/python-requests/Makefile
lang/python/python-schema/Makefile [new file with mode: 0644]
lang/python/python-service-identity/Makefile
lang/python/python-simplejson/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 [new file with mode: 0644]
lang/python/python-twisted/patches/001-omit-tkconch.patch [new file with mode: 0644]
lang/python/python-twisted/patches/002-omit-tests.patch [new file with mode: 0644]
lang/python/python-txsocksx/Makefile
lang/python/python-urllib3/Makefile
lang/python/python-version.mk
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-zope-interface/Makefile
lang/python/python/Makefile
lang/python/python/files/python-config.in [new file with mode: 0644]
lang/python/python/files/python-package-pip.mk
lang/python/python/files/python-package-setuptools.mk
lang/python/python/patches/001-enable-zlib.patch
lang/python/python/patches/005-fix-bluetooth-support.patch
lang/python/python/patches/011-fix-ssl-build-use-have-npn.patch
lang/python/python/patches/014-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch [deleted file]
lang/python/python/patches/015-2.7-bpo-34623-Mention-CVE-2018-14647-in-news-entry-G.patch [deleted file]
lang/python/python/patches/017_lib2to3_fix_pyc_search.patch
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-bottle/Makefile
lang/python/python3-package.mk
lang/python/python3/Makefile
lang/python/python3/files/python3-package-pip.mk
lang/python/python3/files/python3-package-setuptools.mk
lang/python/python3/files/python3-package-urllib.mk [new file with mode: 0644]
lang/python/python3/patches/001-enable-zlib.patch
lang/python/python3/patches/003-do-not-run-distutils-tests.patch
lang/python/python3/patches/006-remove-multi-arch-and-local-paths.patch
lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch
lang/python/python3/patches/014-remove-platform-so-suffix.patch
lang/python/python3/patches/015-abort-on-failed-modules.patch
lang/python/python3/patches/016-adjust-config-paths.patch
lang/python/python3/patches/018-bpo-35746-Fix-segfault-in-ssl-s-cert-parser-GH-11569.patch [new file with mode: 0644]
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/pytz/Makefile [deleted file]
lang/python/ruamel-yaml/Makefile [new file with mode: 0644]
lang/python/simplejson/Makefile [deleted file]
lang/python/text-unidecode/Makefile [new file with mode: 0644]
lang/python/twisted/Makefile [deleted file]
lang/python/twisted/patches/001-omit-tkconch.patch [deleted file]
lang/python/twisted/patches/002-omit-tests.patch [deleted file]
lang/ruby/Makefile
lang/ruby/patches/001_fix_isnan_isinf_finite_with_uclibc.patch [new file with mode: 0644]
lang/ruby/ruby_find_pkgsdeps
lang/ruby/ruby_missingfiles
lang/uuid/Makefile
libs/avahi/Makefile
libs/boost/Makefile
libs/botan/Makefile [new file with mode: 0644]
libs/czmq/Makefile [new file with mode: 0644]
libs/dtc/Makefile
libs/dtc/patches/0001-use-cflags-from-build-system.patch [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/freetype/Makefile
libs/gnutls/Config.in
libs/gnutls/Makefile
libs/google-authenticator-libpam/Makefile [new file with mode: 0644]
libs/icu/Makefile
libs/icu/patches/001-change_optimization_option.patch [new file with mode: 0644]
libs/jose/Makefile [new file with mode: 0644]
libs/jose/patches/Fix_minor_leak_upstream_198f720.patch [new file with mode: 0644]
libs/keyutils/Makefile
libs/keyutils/patches/010-reproducible-build.patch [new file with mode: 0644]
libs/libarchive/Makefile
libs/libarchive/patches/104-CVE-2019-1000019.patch [new file with mode: 0644]
libs/libarchive/patches/105-CVE-2019-1000020.patch [new file with mode: 0644]
libs/libcgroup/Makefile [new file with mode: 0644]
libs/libcgroup/patches/0001-musl-fts-configure.patch [new file with mode: 0644]
libs/libcups/Makefile
libs/libdaq/Makefile
libs/libdaq/patches/001-compile.patch
libs/libdaq/patches/100-musl-compat.patch
libs/libdouble-conversion/Makefile
libs/libdouble-conversion/patches/010-armeb.patch [new file with mode: 0644]
libs/libextractor/Makefile
libs/libgabe/Makefile
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/libinput/Makefile
libs/libinput/patches/010-musl-fix.patch [new file with mode: 0644]
libs/libmaxminddb/Makefile [new file with mode: 0644]
libs/libp11/Makefile
libs/libseccomp/Makefile
libs/libsigc++/Makefile
libs/libsndfile/Makefile
libs/libsoup/Makefile
libs/libssh2/Makefile
libs/libtasn1/Makefile
libs/libudev-fbsd/Makefile
libs/libudev-fbsd/patches/001-fix-unused.patch [deleted file]
libs/libudev-fbsd/patches/002-replace-nitems.patch [deleted file]
libs/libudev-fbsd/patches/003-add-pkg-config-description.patch
libs/libudev-fbsd/patches/005-extern-c.patch
libs/libudev-fbsd/patches/100-add-stub-udev_device_get_driver.patch
libs/libudev-fbsd/patches/101-add-stub-udev_device_new_from_subsystem_sysname.patch
libs/libudev-fbsd/patches/102-add-stub-udev_enumerate_add_nomatch_sysattr.patch
libs/libupnp/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/libyubikey/Makefile [new file with mode: 0644]
libs/log4cplus/Makefile [new file with mode: 0644]
libs/measurement-kit/Makefile [new file with mode: 0644]
libs/measurement-kit/patches/001-remove-ca-download.patch [new file with mode: 0644]
libs/measurement-kit/patches/002-replace-curl-with-wget.patch [new file with mode: 0644]
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/openldap/Makefile
libs/p11-kit/Makefile
libs/pcre/Makefile
libs/pixman/Makefile
libs/postgresql/Makefile
libs/protobuf-c/Makefile
libs/protobuf/Makefile
libs/vips/Makefile
libs/vips/patches/010-reproducible-build.patch [new file with mode: 0644]
libs/yubico-pam/Makefile [new file with mode: 0644]
mail/dovecot/Makefile
mail/dovecot/patches/100-openssl-deprecated.patch
mail/dovecot/patches/110-openssl-engine.patch
mail/fdm/Makefile
mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch [deleted file]
mail/fdm/patches/010-ntop-fix.patch [new file with mode: 0644]
mail/fdm/patches/020-Fix-compile-with-OpenSSL-1.1.0.patch
mail/fdm/patches/040-openssl-1.1.patch [deleted file]
mail/msmtp/Makefile
mail/mutt/Makefile
mail/pigeonhole/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
multimedia/crtmpserver/Makefile
multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch [deleted file]
multimedia/crtmpserver/patches/020-add-rpath.patch [deleted file]
multimedia/crtmpserver/patches/030-default-config.patch
multimedia/crtmpserver/patches/040-syslog.patch [new file with mode: 0644]
multimedia/crtmpserver/patches/040-use-select.patch [deleted file]
multimedia/crtmpserver/patches/050-add-missing-make-defines.patch [deleted file]
multimedia/crtmpserver/patches/060-add-missing-includes.patch [deleted file]
multimedia/crtmpserver/patches/070-disable-apple-streaming.patch [new file with mode: 0644]
multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch [deleted file]
multimedia/crtmpserver/patches/080-disable-apple-streaming.patch [deleted file]
multimedia/crtmpserver/patches/080-fix-define.patch [new file with mode: 0644]
multimedia/crtmpserver/patches/080-musl-uint32_t.patch [deleted file]
multimedia/crtmpserver/patches/090-openssl-1.1-compat.patch
multimedia/crtmpserver/patches/100-openssl-deprecated.patch [deleted file]
multimedia/ffmpeg/Makefile
multimedia/ffmpeg/patches/ffmpeg-fix-build-with-fdk-aac-2.0.patch [new file with mode: 0644]
multimedia/graphicsmagick/Makefile
multimedia/gst1-libav/Makefile
multimedia/gst1-plugins-bad/Makefile
multimedia/gst1-plugins-bad/patches/002-no-tests.patch [deleted file]
multimedia/gst1-plugins-bad/patches/003-openssl-deprecated.patch [deleted file]
multimedia/gst1-plugins-base/Makefile
multimedia/gst1-plugins-base/patches/001-no-translations.patch
multimedia/gst1-plugins-base/patches/002-no-tests.patch [deleted file]
multimedia/gst1-plugins-base/patches/003-no-docs.patch [deleted file]
multimedia/gst1-plugins-good/Makefile
multimedia/gst1-plugins-good/patches/002-no-tests.patch [deleted file]
multimedia/gst1-plugins-good/patches/003-no-docs.patch [deleted file]
multimedia/gst1-plugins-ugly/Makefile
multimedia/gst1-plugins-ugly/patches/002-no-tests.patch [deleted file]
multimedia/gst1-plugins-ugly/patches/003-no-docs.patch [deleted file]
multimedia/gstreamer1/Makefile
multimedia/gstreamer1/patches/001-no-translations.patch
multimedia/gstreamer1/patches/002-no-tests.patch [deleted file]
multimedia/gstreamer1/patches/003-no-docs.patch [deleted file]
multimedia/gstreamer1/patches/010-gstplugin-use-lazy-symbol-binding.patch
multimedia/minidlna/Makefile
multimedia/minidlna/files/minidlna.config
multimedia/minidlna/files/minidlna.init
multimedia/minidlna/patches/001-dont-build-po-files.patch [new file with mode: 0644]
multimedia/minidlna/patches/002-dont-build-po-files.patch [deleted file]
multimedia/minidlna/patches/002-mark_all_instances_of_magic_container_s_as_const.patch [new file with mode: 0644]
multimedia/minidlna/patches/003-wrap_container_definitions_into_a_structure.patch [new file with mode: 0644]
multimedia/minidlna/patches/004-reduce_duplication_in_sql_c.patch [new file with mode: 0644]
multimedia/v4l2rtspserver/Makefile
multimedia/v4l2rtspserver/files/config.openwrt [deleted file]
multimedia/v4l2rtspserver/files/v4l2rtspserver.init
multimedia/v4l2rtspserver/patches/010-Add-a-few-missing-headers.patch [deleted file]
multimedia/v4l2rtspserver/patches/020-replace-std-stoi-with-atoi.patch [deleted file]
multimedia/v4l2rtspserver/patches/030-fix-build.patch [deleted file]
multimedia/v4l2rtspserver/patches/040-Switch-Makefile-to-compile-with-g.patch [deleted file]
multimedia/youtube-dl/Makefile
multimedia/youtube-dl/patches/dont-use-pandoc.patch [deleted file]
net/acme/Makefile
net/acme/files/run.sh
net/aggregate/Makefile
net/aggregate/patches/500-cross_compile_flags.patch [new file with mode: 0644]
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/bcp38/Makefile
net/bcp38/files/bcp38.config
net/bind/Makefile
net/bind/patches/001-no-tests.patch
net/bind/patches/002-autoconf-ar-fix.patch
net/bonding/Makefile
net/clamav/Makefile
net/clamav/files/clamav.init
net/clamav/files/freshclam.init
net/conserver/Makefile
net/conserver/files/config.guess [new file with mode: 0644]
net/conserver/files/config.sub [new file with mode: 0644]
net/conserver/patches/010-openssl-deprecated.patch [deleted file]
net/coova-chilli/Makefile
net/coova-chilli/files/chilli.config
net/coova-chilli/files/chilli.firewall [deleted file]
net/davfs2/Makefile
net/davfs2/patches/010-main_code_fix.patch
net/davfs2/patches/100-musl-compat.patch
net/davfs2/patches/200-davfs2-1.5.4-no-forced-stack-protector.patch
net/davfs2/patches/300-have_iconv_h.patch
net/ddns-scripts/Makefile
net/ddns-scripts/files/dynamic_dns_functions.sh
net/dynapoint/Makefile
net/e2guardian/Makefile
net/e2guardian/files/e2guardian.init
net/fping/Makefile
net/freeradius3/Makefile
net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch
net/git/Makefile
net/git/patches/300-openssl-deprecated.patch [new file with mode: 0644]
net/gitolite/Makefile
net/gitolite/patches/0100-avoid-ssh-keygen.patch [new file with mode: 0644]
net/gnunet-fuse/Makefile [new file with mode: 0644]
net/gnunet-fuse/patches/001-musl-compat.patch [new file with mode: 0644]
net/gnunet-secushare/Makefile [new file with mode: 0644]
net/gnunet-secushare/files/gnunet-secushare-mysql.defaults [new file with mode: 0644]
net/gnunet-secushare/files/gnunet-secushare-pgsql.defaults [new file with mode: 0644]
net/gnunet-secushare/files/gnunet-secushare-sqlite.defaults [new file with mode: 0644]
net/gnunet/Makefile
net/gnunet/files/gnunet-social-pgsql.defaults [deleted file]
net/gnunet/files/gnunet-social-sqlite.defaults [deleted file]
net/gnunet/patches/001-fix-dist.patch [new file with mode: 0644]
net/gnunet/patches/002-include-credential_.h-in-dist.patch [new file with mode: 0644]
net/gnurl/Makefile
net/haproxy/Makefile
net/haproxy/get-latest-patches.sh
net/haproxy/patches/000-BUG-MAJOR-listener-Make-sure-the-listener-exist-before-using-it.patch [new file with mode: 0644]
net/haproxy/patches/000-DOC-http-request-cache-use-http-response-cache-store-expects-cache-name.patch [deleted file]
net/haproxy/patches/001-BUG-MAJOR-cache-fix-confusion-between-zero-and-uninitialized-cache-key.patch [deleted file]
net/haproxy/patches/001-BUG-MINOR-listener-keep-accept-rate-counters-accurate-under-saturation.patch [new file with mode: 0644]
net/haproxy/patches/002-BUG-MEDIUM-logs-Only-attempt-to-free-startup_logs-once.patch [new file with mode: 0644]
net/haproxy/patches/002-BUG-MEDIUM-ssl-Disable-anti-replay-protection-and-set-max-data-with-0RTT.patch [deleted file]
net/haproxy/patches/003-BUG-MEDIUM-51d-fix-possible-segfault-on-deinit_51degrees.patch [new file with mode: 0644]
net/haproxy/patches/003-DOC-Be-a-bit-more-explicit-about-allow-0rtt-security-implications.patch [deleted file]
net/haproxy/patches/004-BUG-MEDIUM-ssl-missing-allocation-failure-checks-loading-tls-key-file.patch [deleted file]
net/haproxy/patches/004-BUG-MINOR-ssl-fix-warning-about-ssl-min-max-ver-support.patch [new file with mode: 0644]
net/haproxy/patches/005-BUG-MINOR-backend-dont-use-url_param_name-as-a-hint-for-BE_LB_ALGO_PH.patch [deleted file]
net/haproxy/patches/005-MEDIUM-threads-Use-__ATOMIC_SEQ_CST-when-using-the-newer-atomic-API.patch [new file with mode: 0644]
net/haproxy/patches/006-BUG-MEDIUM-threads-fd-do-not-forget-to-take-into-account-epoll_fd-pipes.patch [new file with mode: 0644]
net/haproxy/patches/006-BUG-MINOR-backend-balance-uri-specific-options-were-lost-across-defaults.patch [deleted file]
net/haproxy/patches/007-BUG-MAJOR-spoe-Fix-initialization-of-thread-dependent-fields.patch [new file with mode: 0644]
net/haproxy/patches/007-BUG-MINOR-backend-BE_LB_LKUP_CHTREE-is-a-value-not-a-bit.patch [deleted file]
net/haproxy/patches/008-BUG-MINOR-stick_table-Prevent-conn_cur-from-underflowing.patch [deleted file]
net/haproxy/patches/008-deprecated-openssl.patch [new file with mode: 0644]
net/haproxy/patches/009-BUG-MINOR-server-dont-always-trust-srv_check_health-when-loading-a-server-state.patch [deleted file]
net/haproxy/patches/010-BUG-MINOR-check-Wake-the-check-task-if-the-check-is-finished-in-wake_srv_chk.patch [deleted file]
net/haproxy/patches/011-BUG-MEDIUM-ssl-Fix-handling-of-TLS-1-3-KeyUpdate-messages.patch [deleted file]
net/haproxy/patches/012-DOC-mention-the-effect-of-nf_conntrack_tcp_loose-on-src-dst.patch [deleted file]
net/haproxy/patches/013-deprecated-openssl.patch [deleted file]
net/i2pd/Makefile
net/i2pd/files/i2pd.config [new file with mode: 0644]
net/i2pd/files/i2pd.init
net/iotivity/Makefile
net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch [new file with mode: 0644]
net/irssi/Makefile
net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch [new file with mode: 0644]
net/kea/Makefile [new file with mode: 0644]
net/kea/patches/001-fix-cross-compile.patch [new file with mode: 0644]
net/kea/patches/002-fix-host-compile.patch [new file with mode: 0644]
net/kea/patches/003-no-test-compile.patch [new file with mode: 0644]
net/keepalived/Config.in [new file with mode: 0644]
net/keepalived/Makefile
net/keepalived/files/keepalived.config
net/keepalived/files/keepalived.init
net/keepalived/patches/001-fix-systemd.patch [new file with mode: 0644]
net/knot/Makefile
net/knot/patches/01_zscanner_tests.patch
net/krb5/Makefile
net/lcdringer/Makefile
net/lcdringer/patches/010-disable-check.patch [new file with mode: 0644]
net/lighttpd/Makefile
net/lighttpd/patches/010-openssl-deprecated.patch [deleted file]
net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch [deleted file]
net/linknx/Makefile
net/mini_snmpd/Makefile
net/mini_snmpd/files/mini_snmpd.init
net/mosquitto/Makefile
net/mwan3/Makefile
net/mwan3/files/lib/mwan3/mwan3.sh
net/mwan3/files/usr/sbin/mwan3rtmon
net/mwan3/files/usr/sbin/mwan3track
net/net-snmp/Makefile
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/files/nfsd.init
net/nfs-kernel-server/patches/0001-don-t-free-ai-ai_canonname.patch [new file with mode: 0644]
net/nfs-kernel-server/patches/0002-define-and-use-wrapper-function-nfs_freeaddrin.patch [new file with mode: 0644]
net/nft-qos/Makefile
net/nft-qos/files/lib/dynamic.sh
net/nft-qos/files/lib/priority.sh
net/nft-qos/files/lib/static.sh
net/nft-qos/files/nft-qos-dynamic.hotplug
net/nft-qos/files/nft-qos.config
net/nft-qos/files/nft-qos.init
net/nginx/Makefile
net/ngircd/Makefile
net/ngircd/patches/010-Fix-compilation-without-deprecated-OpenSSL-APIs.patch [deleted file]
net/ntpd/Makefile
net/ntpd/files/ntpd.init
net/obfs4proxy/Makefile
net/obfs4proxy/patches/bug-24793-send-correct-http-header-for-basic-auth.patch [deleted file]
net/obfsproxy/Makefile
net/ocserv/Makefile
net/openssh/Makefile
net/openssh/files/sshd.init
net/openssh/patches/0001-fix-compilation-with-openssl-built-without-ECC.patch [deleted file]
net/openssh/patches/0001-fix-key-type-check.patch [new file with mode: 0644]
net/openssh/patches/0002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch [deleted file]
net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch [new file with mode: 0644]
net/openssh/patches/0003-sanitize-scp-filenames-via-snmprintf.patch [new file with mode: 0644]
net/openssh/patches/0004-have-progressmeter-force-update-at-beginning-and-end-transfer.patch [new file with mode: 0644]
net/openssh/patches/0005-check-filenames-in-scp-client.patch [new file with mode: 0644]
net/openssh/patches/0006-scp-handle-braces.patch [new file with mode: 0644]
net/openssh/patches/1001-fix-compilation-with-openssl-built-without-ECC.patch [new file with mode: 0644]
net/openssh/patches/1002-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch [new file with mode: 0644]
net/openvswitch/Makefile
net/openvswitch/patches/0001-musl-compatibility.patch [deleted file]
net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch [new file with mode: 0644]
net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch [new file with mode: 0644]
net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch [new file with mode: 0644]
net/openvswitch/patches/0004-build-disable-building-tests.patch [new file with mode: 0644]
net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch [deleted file]
net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch [deleted file]
net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch [deleted file]
net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch [deleted file]
net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch [deleted file]
net/openvswitch/patches/0105-build-disable-building-tests.patch [deleted file]
net/openvswitch/patches/0106-ovs-save-compatible-with-busybox-ip-command.patch [deleted file]
net/openvswitch/patches/0107-datapath-use-KARCH-when-building-linux-datapath-modu.patch [deleted file]
net/pppossh/Makefile
net/pptpd/Makefile
net/pptpd/files/pptpd.init
net/privoxy/Makefile
net/prosody/Makefile
net/prosody/files/prosody.cfg.lua
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/rpcbind/patches/001-CVE-2017-8779-dos-via-memory-consumption.patch [new file with mode: 0644]
net/samba4/Config.in
net/samba4/Makefile
net/samba4/patches/104-tmsize-overflow-check.patch [new file with mode: 0644]
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/Makefile
net/shadowsocks-libev/README.md
net/shadowsocks-libev/files/shadowsocks-libev.init
net/shadowsocks-libev/files/ss-rules
net/shorewall-core/Makefile
net/shorewall-lite/Makefile
net/shorewall-lite/files/hotplug_iface
net/shorewall/Makefile
net/shorewall/files/hotplug_iface
net/shorewall6-lite/Makefile
net/shorewall6-lite/files/hotplug_iface
net/shorewall6/Makefile
net/shorewall6/files/hotplug_iface
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/socat/Makefile
net/socat/files/socat.init
net/softethervpn/Makefile
net/softethervpn/patches/110-no-m64.patch [new file with mode: 0644]
net/softethervpn5/Makefile
net/softethervpn5/files/vpnbridge.init
net/softethervpn5/files/vpnclient.init
net/softethervpn5/files/vpnserver.init
net/speedtest-netperf/Makefile [new file with mode: 0644]
net/speedtest-netperf/files/README.md [new file with mode: 0644]
net/speedtest-netperf/files/speedtest-netperf.sh [new file with mode: 0644]
net/spoofer/Makefile
net/squid/Makefile
net/squid/files/squid.init
net/sshtunnel/Makefile
net/sshtunnel/files/sshtunnel.init
net/sshtunnel/files/uci_sshtunnel
net/strongswan/Config.in
net/strongswan/Makefile
net/stubby/files/README.md
net/stubby/files/stubby.yml
net/stunnel/Makefile
net/tcpreplay/Makefile
net/tgt/Makefile
net/tgt/files/etc/config/tgt [deleted file]
net/tgt/files/etc/init.d/tgt [deleted file]
net/tgt/files/tgt.config [new file with mode: 0644]
net/tgt/files/tgt.init [new file with mode: 0755]
net/tor/Makefile
net/tor/files/tor.init
net/torsocks/Makefile [new file with mode: 0644]
net/trafficshaper/Makefile [new file with mode: 0644]
net/trafficshaper/files/etc/config/trafficshaper [new file with mode: 0644]
net/trafficshaper/files/etc/init.d/trafficshaper [new file with mode: 0755]
net/transmission/Makefile
net/travelmate/Makefile
net/travelmate/files/README.md
net/travelmate/files/travelmate.init
net/travelmate/files/travelmate.sh
net/unbound/Makefile
net/unbound/patches/101-dns64-crash.patch [deleted file]
net/unbound/patches/200-openssl-deprecated.patch [deleted file]
net/uwsgi-cgi/Makefile
net/vallumd/Makefile
net/vpnc-scripts/Makefile
net/vpnc/Makefile
net/vpnc/files/vpnc.sh
net/wakeonlan/Makefile
net/wavemon/Makefile
net/wavemon/patches/010-Scan-screen-resolves-62.patch [new file with mode: 0644]
net/xtables-addons/patches/001-fix-kernel-version-detection.patch [new file with mode: 0644]
net/xtables-addons/patches/002-build-support-for-Linux-4.15.patch [new file with mode: 0644]
net/xtables-addons/patches/002-fix-kernel-version-detection.patch [deleted file]
net/xtables-addons/patches/003-build-add-support-for-Linux-4.18.patch [new file with mode: 0644]
net/yggdrasil/Makefile [new file with mode: 0644]
net/yggdrasil/files/yggdrasil.defaults [new file with mode: 0644]
net/yggdrasil/files/yggdrasil.init [new file with mode: 0755]
net/znc/Makefile
net/znc/patches/104-disable-empty-modules-check.patch
net/znc/patches/120-openssl-deprecated.patch
sound/fdk-aac/Makefile
sound/fdk-aac/patches/001-fix-overflow.patch [deleted file]
sound/shairplay/Makefile
sound/shairplay/patches/002-libavahi-compat-dnssd.patch [deleted file]
sound/shairplay/patches/010-configure-only-check-for-dns_sd.h-in-case-libdl-was-.patch [new file with mode: 0644]
sound/squeezelite/Makefile
sound/squeezelite/patches/005-respect_LDFLAGS.patch [deleted file]
sound/squeezelite/patches/010-select_broadcast_interface.patch
sound/squeezelite/patches/020-no_libmad.patch
sound/squeezelite/patches/030-fix_musl_compatibilty.patch [deleted file]
sound/squeezelite/patches/040-clear_dynlink_errors.patch [deleted file]
utils/attendedsysupgrade-common/Makefile
utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults
utils/attendedsysupgrade-common/files/c06d891233ba699 [new file with mode: 0644]
utils/auc/Makefile
utils/auc/src/auc.c
utils/bash/Makefile
utils/bash/patches/101-bash50-001.patch [new file with mode: 0644]
utils/bash/patches/102-bash50-002.patch [new file with mode: 0644]
utils/bigclown/bigclown-control-tool/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-gateway/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-gateway/files/config [new file with mode: 0644]
utils/bigclown/bigclown-gateway/files/init [new file with mode: 0755]
utils/bigclown/bigclown-mqtt2influxdb/Makefile [new file with mode: 0644]
utils/bigclown/bigclown-mqtt2influxdb/files/config.yml [new file with mode: 0644]
utils/bigclown/bigclown-mqtt2influxdb/files/init [new file with mode: 0644]
utils/bluez/Makefile
utils/bmx7-dnsupdate/Makefile
utils/bonnie++/Makefile
utils/bonnie++/patches/001-cross_compile_fix.patch [deleted file]
utils/bonnie++/patches/002-add-verbose-error-messages.patch
utils/bonnie++/patches/010-openwrt-fixes.patch [new file with mode: 0644]
utils/bonnie++/patches/010-uclibcxx.patch [deleted file]
utils/btrfs-progs/Config.in [new file with mode: 0644]
utils/btrfs-progs/Makefile
utils/cryptsetup/Makefile
utils/fft-eval/Makefile [new file with mode: 0644]
utils/fio/Makefile
utils/fio/patches/010-mpcore.patch [new file with mode: 0644]
utils/fish/Makefile
utils/gammu/Makefile
utils/gddrescue/Makefile [new file with mode: 0644]
utils/gddrescue/patches/001-fix_uclibc.patch [new file with mode: 0644]
utils/hd-idle/Makefile
utils/hd-idle/files/hd-idle.init
utils/i2c-tools/Makefile
utils/jq/Makefile
utils/lxc/Makefile
utils/mariadb/Makefile
utils/mariadb/patches/100-fix_hostname.patch
utils/mariadb/patches/200-openssl-deprecated.patch [deleted file]
utils/moreutils/Makefile
utils/nano/Makefile
utils/ncdu/Makefile
utils/open-vm-tools/Makefile [new file with mode: 0644]
utils/open-vm-tools/files/shutdown [new file with mode: 0644]
utils/open-vm-tools/files/tools.conf [new file with mode: 0644]
utils/open-vm-tools/files/vmtoolsd.init [new file with mode: 0644]
utils/open-vm-tools/files/vmware-scsi.hotplug [new file with mode: 0644]
utils/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0012-Fix-some-bad-derefs-in-primary-NIC-gathering-code.patch [new file with mode: 0644]
utils/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch [new file with mode: 0644]
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/pcsc-lite/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/Makefile
utils/prometheus/patches/no_bzr.patch [new file with mode: 0644]
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/rtl-ais/Makefile
utils/rtl-ais/files/rtl_ais.init
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/smartmontools/Makefile
utils/smartmontools/patches/001-use-external-drivedb.patch [new file with mode: 0644]
utils/ssdeep/Makefile [new file with mode: 0644]
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/tar/Makefile
utils/taskwarrior/Makefile
utils/telldus-core/Makefile [new file with mode: 0644]
utils/telldus-core/files/telldusd [new file with mode: 0644]
utils/telldus-core/files/tellstick.conf [new file with mode: 0644]
utils/telldus-core/patches/100-add_includes.patch [new file with mode: 0644]
utils/telldus-core/patches/110-fix_warnings.patch [new file with mode: 0644]
utils/telldus-core/patches/120-fix_missing_var_conf.patch [new file with mode: 0644]
utils/telldus-core/patches/900-openwrt_fixes_cmake.patch [new file with mode: 0644]
utils/telldus-core/patches/920-openwrt_missing_var_conf.patch [new file with mode: 0644]
utils/unrar/Makefile
utils/unrar/patches/100-makefile_fixes.patch
utils/watchcat/Makefile
utils/wifitoggle/Makefile
utils/xz/Makefile
utils/ykclient/Makefile [new file with mode: 0644]
utils/ykpers/Makefile [new file with mode: 0644]
utils/zoneinfo/Makefile
utils/zstd/Makefile [new file with mode: 0644]

index 75d8bc2dc2781aabada91437dc4eacb52343d0b0..ef47a6391f562dadbdf9d30c7e969e8fe48ced6a 100644 (file)
@@ -42,7 +42,7 @@ All packages you commit or submit by pull-request should follow these simple gui
 * Have a useful description prefixed with the package name
     (E.g.: "foopkg: Add libzot dependency")
 * Include Signed-off-by tag in the commit comments.
-    See: [Sign your work](https://openwrt.org/docs/guide-developer/submittingpatches-tomerge?s[]=sign#sign_your_work)
+    See: [Sign your work](https://openwrt.org/submitting-patches#sign_your_work)
 
 ### Advice on pull requests:
 
index ed3d214625a918f63258946710ba8c516cfadc6e..954fd0bf2189e07edd630a4ee8de4169489a2460 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netdata
-PKG_VERSION:=1.11.1
+PKG_VERSION:=1.13.0
 PKG_RELEASE:=1
 PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-3.0+
@@ -16,8 +16,8 @@ PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
-PKG_HASH:=0150b2a060da0e5cc844bd9540d6704cd352c434ea1bb9d5268131830a815736
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)_rolling
+PKG_HASH:=258e64a945bf80e91c4bffab35e7f2d8930025246814038f541ff0ac403a666c
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -38,7 +38,7 @@ define Package/netdata/description
   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 however urllib3 isn't packaged yet (needs a PR on GitHub)
+ python3-urllib3
 endef
 
 TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
@@ -73,11 +73,13 @@ define Package/netdata/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
        $(INSTALL_DIR) $(1)/usr/share/netdata
        $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
-       rm -rf $(1)/usr/share/netdata/web/images
        rm $(1)/usr/share/netdata/web/demo*html
        rm $(1)/usr/share/netdata/web/fonts/*.svg
        rm $(1)/usr/share/netdata/web/fonts/*.ttf
        rm $(1)/usr/share/netdata/web/fonts/*.woff
+       rm $(1)/usr/share/netdata/web/images/*.png
+       rm $(1)/usr/share/netdata/web/images/*.gif
+       rm $(1)/usr/share/netdata/web/images/*.ico
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
 endef
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 d571496836d0b918e49a8e21e48f556a33445594..98a743a741322af7ae24b10392974baacca252e3 100644 (file)
@@ -1,17 +1,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syslog-ng
-PKG_VERSION:=3.19.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.20.1
+PKG_RELEASE:=1
 
-PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:balabit:syslog-ng
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_HASH:=5cf931a9d7bead0e6d9a2c65eee8f6005a005878f59aa280f3c4294257ed5178
+PKG_HASH:=a65858afe9c649119a23ff61669945cab8692a045ee8259e8ee666445c8fbda0
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -60,6 +60,7 @@ CONFIGURE_ARGS +=  \
        --disable-redis \
        --disable-dependency-tracking \
        --disable-python \
+       --disable-geoip2 \
        --disable-java \
        --disable-java-modules \
        --with-librabbitmq-client=no \
diff --git a/devel/asu/Makefile b/devel/asu/Makefile
new file mode 100644 (file)
index 0000000..4f90766
--- /dev/null
@@ -0,0 +1,60 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=asu
+PKG_VERSION:=0.2.3
+PKG_RELEASE=2
+
+PKG_LICENSE:=GPL-3.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/asu/
+PKG_HASH:=e60027cd531cc5b9b20d3321acc06fdf0cdd894004919800575b8235343ba8ef
+
+PKG_BUILD_DEPENDS:=python3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
+
+IMAGEBUILDER_DEPENDS:= \
+    @x86_64 +bash +bzip2 +coreutils +coreutils-stat +diffutils +file \
+    +gawk +gcc +getopt +git +git-http +libncurses +make +patch +perl \
+    +perlbase-attributes +perlbase-findbin +perlbase-getopt \
+    +perlbase-thread +python-light +tar +unzip +wget +xz +xzdiff \
+    +xzgrep +xzless +xz-utils +zlib-dev
+
+define Package/asu
+    SECTION:=devel
+    CATEGORY:=Development
+    TITLE:=attended sysupgrade image server
+    MAINTAINER:=Paul Spooren <paul@spooren.de>
+    URL:=http://github.com/aparcar/gsoc17-attended-sysupgrade/
+    DEPENDS:=$(IMAGEBUILDER_DEPENDS) +pgsql-server +psqlodbcw \
+             +python3-ctypes +python3-distutils +python3-flask \
+             +gunicorn +python3-openssl +python3-pyodbc +python3-yaml \
+             +libustream-mbedtls +ca-certificates +gnupg
+    USERID:=asu:asu
+    VARIANT:=python3
+endef
+
+define Package/asu/description
+   Build server to deliver OpenWrt/LEDE sysupgrade images
+endef
+
+define Py3Package/asu/install
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/asu.defaults $(1)/etc/uci-defaults/99-asu
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/asu.init $(1)/etc/init.d/asu
+       $(INSTALL_DIR) $(1)/etc/asu
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/asu/utils/config.yml.default $(1)/etc/asu/config.yml
+endef
+
+$(eval $(call Py3Package,asu))
+$(eval $(call BuildPackage,asu))
diff --git a/devel/asu/files/asu.defaults b/devel/asu/files/asu.defaults
new file mode 100644 (file)
index 0000000..04fdf07
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+asu_password=$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | sha256sum | cut -d' ' -f1)
+asu_tables="$(ls -1 /usr/lib/python*/site-packages/asu/utils/tables.sql | head -n 1)"
+
+uci -q batch <<EOF
+       del postgresql.asu
+       set postgresql.asu=postgres-db
+       set postgresql.asu.name=asu
+       set postgresql.asu.user=asu
+       set postgresql.asu.pass='$asu_password'
+       set postgresql.asu.script='$asu_tables'
+       commit postgresql
+EOF
+
+sed -i "s/database_user.*/database_user: asu/" /etc/asu/config.yml
+sed -i "s/database_pass.*/database_pass: $asu_password/" /etc/asu/config.yml
+
+cp -r /usr/lib/python*/site-packages/asu/utils/distributions /etc/asu/
+
+chown -R root:asu /etc/asu
+chmod -R g+rX /etc/asu
diff --git a/devel/asu/files/asu.init b/devel/asu/files/asu.init
new file mode 100644 (file)
index 0000000..069c0e7
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=01
+
+USE_PROCD=1
+PROG=/usr/bin/flask
+
+start_service() {
+    . /lib/functions/postgresql.sh
+
+    local pgdata=$(uci get postgresql.config.PGDATA)
+    local i=0
+
+    while ! pg_server_ready "$pgdata"; do
+      sleep 1
+      [ $((i++)) -gt 30 ] && return 1
+    done
+
+    i=0
+    while ! pg_test_db asu asu; do
+      sleep 1
+      [ $((i++)) -gt 30 ] && return 1
+    done
+
+    FLASK_APP=asu $PROG loaddb
+
+    procd_open_instance asu_main
+    procd_set_param user asu
+    procd_set_param group asu
+    procd_set_param command gunicorn asu:app
+    procd_close_instance
+
+    procd_open_instance main_worker
+    procd_set_param user asu
+    procd_set_param group asu
+    procd_set_param env FLASK_APP=asu
+    procd_set_param command $PROG run_worker
+    procd_close_instance
+}
diff --git a/lang/chicken-scheme/Makefile b/lang/chicken-scheme/Makefile
new file mode 100644 (file)
index 0000000..4fd60cd
--- /dev/null
@@ -0,0 +1,61 @@
+#
+# Copyright (C) 2019 Jerônimo Cordoni Pellegrini <j_p@aleph0.info>
+#
+# This file is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for details
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=chicken-scheme-interpreter
+PKG_VERSION=5.0.0
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
+PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://code.call-cc.org/releases/5.0.0/
+PKG_HASH:=a8b94bb94c5d6a4348cedd75dc334ac80924bcd9a7a7a3d6af5121e57ef66595
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/chicken-scheme-interpreter
+SECTION:=lang
+CATEGORY:=Languages
+TITLE:=Chicken Scheme
+URL:=https://call-cc.org
+MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
+endef
+
+define Package/chicken-scheme-interpreter/description
+  Chicken is an implementation of the Scheme language. It is portable, efficient, and supports 
+  the R5RS and R7RS (work in progress) standards, and many extensions.
+  Chicken can be used as a scripting language to automate tasks.
+  This package contains the interpreter, 'csi', only --
+  the compiler and the package installer are not included because they depend on a C compiler.
+  For more information, please refer to the Chicken Scheme website at https://call-cc.org.
+endef
+
+MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)"
+
+# not installed:
+# - csc and chicken, the compiler
+# - the include dir (only useful with the compiler)
+# - install, uninstall, status, and chicken-do, which deal with modules (installation of more modules depends on the compiler)
+# - profiler
+# - feathers, the debugger
+# - libchicken.a, the static library
+define Package/chicken-scheme-interpreter/install
+       $(INSTALL_DIR)  $(1)/usr/bin
+       $(INSTALL_DIR)  $(1)/usr/lib/chicken/9
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/csi    $(1)/usr/bin/
+       $(CP) $(PKG_BUILD_DIR)/libchicken.so.9 $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/libchicken.so   $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/*.import.so     $(1)/usr/lib/chicken/9/
+       $(CP) $(PKG_BUILD_DIR)/types.db        $(1)/usr/lib/chicken/9/
+endef
+
+$(eval $(call BuildPackage,chicken-scheme-interpreter))
+
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
index 1df4c3fec53dbcf9e1d0377a259f5430aa60b966..7522a9f4fa6f85e86cb99631d6f22246ff8b2915 100644 (file)
@@ -28,10 +28,12 @@ include $(GO_INCLUDE_DIR)/golang-values.mk
 #   files are installed:
 #
 #   * Files with one of these extensions:
-#     .go, .c, .cc, .h, .hh, .proto, .s
+#     .go, .c, .cc, .cpp, .h, .hh, .hpp, .proto, .s
 #
 #   * Files in any 'testdata' directory
 #
+#   * go.mod and go.sum, in any directory
+#
 #   e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
 #
 #
@@ -74,10 +76,32 @@ include $(GO_INCLUDE_DIR)/golang-values.mk
 #   not necessary.
 #
 #   e.g. GO_PKG_GO_GENERATE:=1
+#
+#
+# GO_PKG_GCFLAGS - list of arguments, default empty
+#
+#   Additional go tool compile arguments to use when building targets.
+#
+#   e.g. GO_PKG_GCFLAGS:=-N -l
+#
+#
+# GO_PKG_LDFLAGS - list of arguments, default empty
+#
+#   Additional go tool link arguments to use when building targets.
+#
+#   e.g. GO_PKG_LDFLAGS:=-s -w
+#
+#
+# GO_PKG_LDFLAGS_X - list of string variable definitions, default empty
+#
+#   Each definition will be passed as the parameter to the -X go tool
+#   link argument, i.e. -ldflags "-X importpath.name=value"
+#
+#   e.g. GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) main.BuildStamp=$(SOURCE_DATE_EPOCH)
 
 # Credit for this package build process (GoPackage/Build/Configure and
 # GoPackage/Build/Compile) belong to Debian's dh-golang completely.
-# https://anonscm.debian.org/cgit/pkg-go/packages/dh-golang.git
+# https://salsa.debian.org/go-team/packages/dh-golang
 
 
 # for building packages, not user code
@@ -153,17 +177,20 @@ define GoPackage/Build/Configure
                        sed 's|^\./||') ; \
                \
                if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \
-                       code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|go\|h\|hh\|proto\|s\)$$$$') ; \
+                       code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$$$$') ; \
                        testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \
+                       gomod=$$$$(echo "$$$$files" | grep '\(^\|/\)go\.\(mod\|sum\)$$$$') ; \
                        \
                        for pattern in $(GO_PKG_INSTALL_EXTRA); do \
                                extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \
                        done ; \
                        \
-                       files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \
+                       files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$gomod"; echo "$$$$extra") ; \
                        files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \
                fi ; \
                \
+               IFS=$$$$'\n' ; \
+               \
                echo "Copying files from $(PKG_BUILD_DIR) into $(GO_PKG_BUILD_DIR)/src/$(GO_PKG)" ; \
                for file in $$$$files; do \
                        echo $$$$file ; \
@@ -242,18 +269,25 @@ define GoPackage/Build/Compile
                if [ "$(GO_PKG_SOURCE_ONLY)" != 1 ]; then \
                        echo "Building targets" ; \
                        case $(GO_ARCH) in \
-                       arm)             installsuffix="-installsuffix v$(GO_ARM)" ;; \
-                       mips|mipsle)     installsuffix="-installsuffix $(GO_MIPS)" ;; \
-                       mips64|mips64le) installsuffix="-installsuffix $(GO_MIPS64)" ;; \
+                       arm)             installsuffix="v$(GO_ARM)" ;; \
+                       mips|mipsle)     installsuffix="$(GO_MIPS)" ;; \
+                       mips64|mips64le) installsuffix="$(GO_MIPS64)" ;; \
                        esac ; \
                        trimpath="all=-trimpath=$(GO_PKG_BUILD_DIR)" ; \
                        ldflags="all=-linkmode external -extldflags '$(TARGET_LDFLAGS)'" ; \
+                       pkg_gcflags="$(GO_PKG_GCFLAGS)" ; \
+                       pkg_ldflags="$(GO_PKG_LDFLAGS)" ; \
+                       for def in $(GO_PKG_LDFLAGS_X); do \
+                               pkg_ldflags="$$$$pkg_ldflags -X $$$$def" ; \
+                       done ; \
                        go install \
-                               $$$$installsuffix \
+                               $$$${installsuffix:+-installsuffix $$$$installsuffix} \
                                -gcflags "$$$$trimpath" \
                                -asmflags "$$$$trimpath" \
                                -ldflags "$$$$ldflags" \
                                -v \
+                               $$$${pkg_gcflags:+-gcflags "$$$$pkg_gcflags"} \
+                               $$$${pkg_ldflags:+-ldflags "$$$$pkg_ldflags"} \
                                $(1) \
                                $$$$targets ; \
                        retval=$$$$? ; \
index 893f9296deba995b726d3e67b845697432e4aebe..78ad1b3de6d540e0e068b16e29b0952aff114679 100644 (file)
@@ -13,7 +13,8 @@ include $(GO_INCLUDE_DIR)/golang-version.mk
 
 
 unexport \
-  GOARCH GOBIN GOCACHE GODEBUG GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+  GOARCH GOBIN GOCACHE GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
+  GOGC GODEBUG GOMAXPROCS GOTRACEBACK \
   CGO_ENABLED \
   CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
   CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
@@ -21,6 +22,7 @@ unexport \
   CGO_FFLAGS CGO_FFLAGS_ALLOW CGO_FFLAGS_DISALLOW \
   CGO_LDFLAGS CGO_LDFLAGS_ALLOW CGO_LDFLAGS_DISALLOW \
   GOARM GO386 GOMIPS GOMIPS64 \
+  GO111MODULE \
   GOROOT_FINAL GO_EXTLINK_ENABLED GIT_ALLOW_PROTOCOL \
   CC_FOR_TARGET CXX_FOR_TARGET GO_DISTFLAGS GO_GCFLAGS GO_LDFLAGS GOBUILDTIMELOGFILE GOROOT_BOOTSTRAP \
   BOOT_GO_GCFLAGS GOEXPERIMENT GOBOOTSTRAP_TOOLEXEC
index 494111452de2bc31aed5847ce2fc9662202c4dcd..e25894865ac51f135ff2fc7a35fdd84e54a7e66d 100644 (file)
@@ -10,5 +10,5 @@ ifeq ($(origin GO_INCLUDE_DIR),undefined)
 endif
 
 
-GO_VERSION_MAJOR_MINOR:=1.11
-GO_VERSION_PATCH:=5
+GO_VERSION_MAJOR_MINOR:=1.12
+GO_VERSION_PATCH:=1
index 49e69a58506dffdb37c9edf4a3ae53ee724e8093..94522055347c4888bc0cc64177f0a78ade1bf1d0 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:=bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e
+PKG_HASH:=0be127684df4b842a64e58093154f9d15422f1405f1fcff4b2c36ffc6a15818a
 
 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
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..621cb7af69a3684e56cf4ef600f12ea141ef9e98 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luasec
 PKG_VERSION:=0.7
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)?
@@ -41,9 +41,13 @@ endef
 define Build/Configure
 endef
 
+TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += $(FPIC)
+
 MAKE_FLAGS += \
-       INCDIR="$(TARGET_CPPFLAGS) -I." \
-       LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
+       LD="$(TARGET_CC)" \
+       INC_PATH="" \
+       LIB_PATH="" \
        LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
        LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
 
index fbd6ab3b60058afd016926badfa47b6090470207..61f0490a35992446ebd1e95b87fa363519de85f9 100644 (file)
@@ -1,7 +1,16 @@
-diff --git a/src/Makefile b/src/Makefile
-index 9be2f14..93d1dc4 100644
 --- a/src/Makefile
 +++ b/src/Makefile
+@@ -15,8 +15,8 @@ WARN=-Wall -pedantic
+ BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+ BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR)
+-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS)
+-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR)
++LNX_CFLAGS=$(INCDIR) $(DEFS)
++LNX_LDFLAGS=-shared $(LIBDIR)
+ MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)'
+ MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS)
 @@ -33,10 +33,10 @@ LDFLAGS += $(MYLDFLAGS)
  all:
  
index 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 84629ac8d41a5d35d4b36539537b4dd200d22e68..fd2b3f4c1884c0d2b1621437e7fa04ed9392d1a2 100644 (file)
@@ -10,19 +10,16 @@ include $(TOPDIR)/rules.mk
 PKG_NPM_NAME:=arduino-firmata
 PKG_NAME:=node-$(PKG_NPM_NAME)
 PKG_VERSION:=0.3.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
-PKG_MIRROR_HASH:=1aef93dc704ea771b9eab51cb64103533f829aee5b2886ad55d173adf3f11ede
-PKG_SOURCE_VERSION:=v0.3.4
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 
@@ -32,47 +29,44 @@ define Package/node-arduino-firmata
   SUBMENU:=Node.js
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=Node.js package to access serial ports for reading and writing
-  URL:=https://www.npmjs.org/package/serialport
+  TITLE:=Arduino Firmata implementation for Node.js
+  URL:=https://www.npmjs.com/package/arduino-firmata
   DEPENDS:=+node +node-npm +node-serialport
 endef
 
 define Package/node-arduino-firmata/description
- Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
+ Arduino Firmata protocol (http://firmata.org) implementation on Node.js.
 endef
 
-define Build/Prepare
-       /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
-       $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; \
+       $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
 endef
 
 define Package/node-arduino-firmata/install
-       mkdir -p $(1)/usr/lib/node
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node
-       rm -rf  $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ \
-               $(1)/usr/lib/node/arduino-firmata/patches \
-               $(1)/usr/lib/node/arduino-firmata/.p* \
-               $(1)/usr/lib/node/arduino-firmata/.quilt* \
-               $(1)/usr/lib/node/arduino-firmata/.built* \
-               $(1)/usr/lib/node/arduino-firmata/.config*
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,README.md} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{tests,*.txt} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
        $(CP) ./files/* $(1)/
 endef
 
 $(eval $(call BuildPackage,node-arduino-firmata))
-
index 578bd402b1733785898324b752d68bd7ce03ba3a..2f9bcf7c1a9a16750bb61b110bfce07d7ee36694 100644 (file)
 (function() {
   'use strict';
-  var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
-    extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
-    hasProp = {}.hasOwnProperty;
+  var ArduinoFirmata, debug, events, exports, serialport;
 
   events = require('eventemitter2');
 
-  SerialPort = (serialport = require('serialport')).SerialPort;
+  serialport = require('serialport');
 
   debug = require('debug')('arduino-firmata');
 
-  exports = module.exports = ArduinoFirmata = (function(superClass) {
-    extend(ArduinoFirmata, superClass);
-
-    ArduinoFirmata.Status = {
-      CLOSE: 0,
-      OPEN: 1
-    };
-
-    ArduinoFirmata.INPUT = 0;
-
-    ArduinoFirmata.OUTPUT = 1;
-
-    ArduinoFirmata.ANALOG = 2;
-
-    ArduinoFirmata.PWM = 3;
-
-    ArduinoFirmata.SERVO = 4;
-
-    ArduinoFirmata.SHIFT = 5;
-
-    ArduinoFirmata.I2C = 6;
-
-    ArduinoFirmata.LOW = 0;
-
-    ArduinoFirmata.HIGH = 1;
-
-    ArduinoFirmata.MAX_DATA_BYTES = 32;
-
-    ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
-
-    ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
-
-    ArduinoFirmata.REPORT_ANALOG = 0xC0;
-
-    ArduinoFirmata.REPORT_DIGITAL = 0xD0;
-
-    ArduinoFirmata.SET_PIN_MODE = 0xF4;
-
-    ArduinoFirmata.REPORT_VERSION = 0xF9;
-
-    ArduinoFirmata.SYSTEM_RESET = 0xFF;
-
-    ArduinoFirmata.START_SYSEX = 0xF0;
-
-    ArduinoFirmata.END_SYSEX = 0xF7;
-
-    ArduinoFirmata.list = function(callback) {
-      return serialport.list(function(err, ports) {
-        var devices, j, len, port;
-        if (err) {
-          return callback(err);
-        }
-        devices = [];
-        for (j = 0, len = ports.length; j < len; j++) {
-          port = ports[j];
-          if (/usb|acm|com\d+/i.test(port.comName)) {
-            devices.push(port.comName);
+  exports = module.exports = ArduinoFirmata = (function() {
+    class ArduinoFirmata extends events.EventEmitter2 {
+      static list(callback) {
+        return serialport.list(function(err, ports) {
+          var devices, j, len, port;
+          if (err) {
+            return callback(err);
           }
-        }
-        return callback(null, devices);
-      });
-    };
-
-    function ArduinoFirmata() {
-      this.status = ArduinoFirmata.Status.CLOSE;
-      this.wait_for_data = 0;
-      this.execute_multi_byte_command = 0;
-      this.multi_byte_channel = 0;
-      this.stored_input_data = [];
-      this.parsing_sysex = false;
-      this.sysex_bytes_read = 0;
-      this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-      this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-      this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-      this.boardVersion = null;
-    }
-
-    ArduinoFirmata.prototype.isOldArduinoDevice = function() {
-      return /usbserial|USB/.test(this.serialport_name);
-    };
+          devices = [];
+          for (j = 0, len = ports.length; j < len; j++) {
+            port = ports[j];
+            if (/usb|acm|com|ama\d+/i.test(port.comName)) {
+              devices.push(port.comName);
+            }
+          }
+          return callback(null, devices);
+        });
+      }
 
-    ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
-      this.serialport_name = serialport_name;
-      if (opts == null) {
-        opts = {
-          baudrate: 57600
-        };
+      constructor() {
+        super();
+        this.status = ArduinoFirmata.Status.CLOSE;
+        this.wait_for_data = 0;
+        this.execute_multi_byte_command = 0;
+        this.multi_byte_channel = 0;
+        this.stored_input_data = [];
+        this.parsing_sysex = false;
+        this.sysex_bytes_read = 0;
+        this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.boardVersion = null;
       }
-      opts.parser = serialport.parsers.raw;
-      if (!this.serialport_name) {
-        ArduinoFirmata.list((function(_this) {
-          return function(err, devices) {
-            return _this.connect(devices[0], opts);
-          };
-        })(this));
-        return this;
+
+      isOldArduinoDevice() {
+        return /usbserial|USB/.test(this.serialport_name);
       }
-      this.once('boardReady', function() {
-        var io_init_wait;
-        debug('boardReady');
-        io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
-        debug("wait " + io_init_wait + "(msec)");
-        return setTimeout((function(_this) {
-          return function() {
+
+      connect(serialport_name, opts = {
+          baudRate: 57600
+        }) {
+        this.serialport_name = serialport_name;
+        opts.parser = serialport.parsers.raw;
+        if (!this.serialport_name) {
+          ArduinoFirmata.list((err, devices) => {
+            return this.connect(devices[0], opts);
+          });
+          return this;
+        }
+        this.once('boardReady', function() {
+          var io_init_wait;
+          debug('boardReady');
+          io_init_wait = this.isOldArduinoDevice() ? (debug(`old arduino device found ${this.serialport_name}`), 3000) : (debug(`new arduino device found ${this.serialport_name}`), 100);
+          debug(`wait ${io_init_wait}(msec)`);
+          return setTimeout(() => {
             var i, j, k;
             for (i = j = 0; j < 6; i = ++j) {
-              _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
+              this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
             }
             for (i = k = 0; k < 2; i = ++k) {
-              _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
+              this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
             }
             debug('init IO ports');
-            return _this.emit('connect');
-          };
-        })(this), io_init_wait);
-      });
-      this.serialport = new SerialPort(this.serialport_name, opts);
-      this.serialport.once('open', (function(_this) {
-        return function() {
+            return this.emit('connect');
+          }, io_init_wait);
+        });
+        this.serialport = new serialport(this.serialport_name, opts);
+        this.serialport.once('open', () => {
           var cid;
-          cid = setInterval(function() {
+          cid = setInterval(() => {
             debug('request REPORT_VERSION');
-            return _this.write([ArduinoFirmata.REPORT_VERSION]);
+            return this.write([ArduinoFirmata.REPORT_VERSION]);
           }, 500);
-          _this.once('boardVersion', function(version) {
+          this.once('boardVersion', (version) => {
             clearInterval(cid);
-            _this.status = ArduinoFirmata.Status.OPEN;
-            return _this.emit('boardReady');
+            this.status = ArduinoFirmata.Status.OPEN;
+            return this.emit('boardReady');
           });
-          return _this.serialport.on('data', function(data) {
+          return this.serialport.on('data', (data) => {
             var byte, j, len, results;
             results = [];
             for (j = 0, len = data.length; j < len; j++) {
               byte = data[j];
-              results.push(_this.process_input(byte));
+              results.push(this.process_input(byte));
             }
             return results;
           });
-        };
-      })(this));
-      return this;
-    };
+        });
+        return this;
+      }
 
-    ArduinoFirmata.prototype.isOpen = function() {
-      return this.status === ArduinoFirmata.Status.OPEN;
-    };
+      isOpen() {
+        return this.status === ArduinoFirmata.Status.OPEN;
+      }
 
-    ArduinoFirmata.prototype.close = function(callback) {
-      this.status = ArduinoFirmata.Status.CLOSE;
-      return this.serialport.close(callback);
-    };
+      close(callback) {
+        this.status = ArduinoFirmata.Status.CLOSE;
+        return this.serialport.close(callback);
+      }
 
-    ArduinoFirmata.prototype.reset = function(callback) {
-      return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
-    };
+      reset(callback) {
+        return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
+      }
 
-    ArduinoFirmata.prototype.write = function(bytes, callback) {
-      return this.serialport.write(bytes, callback);
-    };
+      write(bytes, callback) {
+        return this.serialport.write(bytes, callback);
+      }
 
-    ArduinoFirmata.prototype.sysex = function(command, data, callback) {
-      var write_data;
-      if (data == null) {
-        data = [];
+      sysex(command, data = [], callback) {
+        var write_data;
+        //# http://firmata.org/wiki/V2.1ProtocolDetails#Sysex_Message_Format
+        data = data.map(function(i) {
+          return i & 0b1111111; // 7bit
+        });
+        write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
+        return this.write(write_data, callback);
       }
-      data = data.map(function(i) {
-        return i & 0x7f;
-      });
-      write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
-      return this.write(write_data, callback);
-    };
 
-    ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
-      switch (mode) {
-        case true:
-          mode = ArduinoFirmata.OUTPUT;
-          break;
-        case false:
-          mode = ArduinoFirmata.INPUT;
+      pinMode(pin, mode, callback) {
+        switch (mode) {
+          case true:
+            mode = ArduinoFirmata.OUTPUT;
+            break;
+          case false:
+            mode = ArduinoFirmata.INPUT;
+        }
+        return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
       }
-      return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
-    };
 
-    ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
-      var port_num;
-      this.pinMode(pin, ArduinoFirmata.OUTPUT);
-      port_num = (pin >>> 3) & 0x0F;
-      if (value === 0 || value === false) {
-        this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
-      } else {
-        this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+      digitalWrite(pin, value, callback) {
+        var port_num;
+        this.pinMode(pin, ArduinoFirmata.OUTPUT);
+        port_num = (pin >>> 3) & 0x0F;
+        if (value === 0 || value === false) {
+          this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
+        } else {
+          this.digital_output_data[port_num] |= 1 << (pin & 0x07);
+        }
+        return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
       }
-      return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
-    };
 
-    ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
-      value = Math.floor(value);
-      this.pinMode(pin, ArduinoFirmata.PWM);
-      return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
-    };
+      analogWrite(pin, value, callback) {
+        value = Math.floor(value);
+        this.pinMode(pin, ArduinoFirmata.PWM);
+        return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
+      }
 
-    ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
-      this.pinMode(pin, ArduinoFirmata.SERVO);
-      return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
-    };
+      servoWrite(pin, angle, callback) {
+        this.pinMode(pin, ArduinoFirmata.SERVO);
+        return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
+      }
 
-    ArduinoFirmata.prototype.digitalRead = function(pin) {
-      return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
-    };
+      digitalRead(pin) {
+        return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
+      }
 
-    ArduinoFirmata.prototype.analogRead = function(pin) {
-      return this.analog_input_data[pin];
-    };
+      analogRead(pin) {
+        return this.analog_input_data[pin];
+      }
 
-    ArduinoFirmata.prototype.process_input = function(input_data) {
-      var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
-      if (this.parsing_sysex) {
-        if (input_data === ArduinoFirmata.END_SYSEX) {
-          this.parsing_sysex = false;
-          sysex_command = this.stored_input_data[0];
-          sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
-          return this.emit('sysex', {
-            command: sysex_command,
-            data: sysex_data
-          });
-        } else {
-          this.stored_input_data[this.sysex_bytes_read] = input_data;
-          return this.sysex_bytes_read += 1;
-        }
-      } else if (this.wait_for_data > 0 && input_data < 128) {
-        this.wait_for_data -= 1;
-        this.stored_input_data[this.wait_for_data] = input_data;
-        if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
-          switch (this.execute_multi_byte_command) {
-            case ArduinoFirmata.DIGITAL_MESSAGE:
-              input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
-              diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
-              this.digital_input_data[this.multi_byte_channel] = input_data;
-              if (this.listeners('digitalChange').length > 0) {
-                results = [];
-                for (i = j = 0; j <= 13; i = ++j) {
-                  if (((0x01 << i) & diff) > 0) {
-                    stat = (input_data & diff) > 0;
-                    results.push(this.emit('digitalChange', {
-                      pin: i + this.multi_byte_channel * 8,
-                      value: stat,
-                      old_value: !stat
-                    }));
-                  } else {
-                    results.push(void 0);
+      process_input(input_data) {
+        var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
+        if (this.parsing_sysex) {
+          if (input_data === ArduinoFirmata.END_SYSEX) {
+            this.parsing_sysex = false;
+            sysex_command = this.stored_input_data[0];
+            sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
+            return this.emit('sysex', {
+              command: sysex_command,
+              data: sysex_data
+            });
+          } else {
+            this.stored_input_data[this.sysex_bytes_read] = input_data;
+            return this.sysex_bytes_read += 1;
+          }
+        } else if (this.wait_for_data > 0 && input_data < 128) {
+          this.wait_for_data -= 1;
+          this.stored_input_data[this.wait_for_data] = input_data;
+          if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
+            switch (this.execute_multi_byte_command) {
+              case ArduinoFirmata.DIGITAL_MESSAGE:
+                input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+                diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
+                this.digital_input_data[this.multi_byte_channel] = input_data;
+                if (this.listeners('digitalChange').length > 0) {
+                  results = [];
+                  for (i = j = 0; j <= 13; i = ++j) {
+                    if (((0x01 << i) & diff) > 0) {
+                      stat = (input_data & diff) > 0;
+                      results.push(this.emit('digitalChange', {
+                        pin: i + this.multi_byte_channel * 8,
+                        value: stat,
+                        old_value: !stat
+                      }));
+                    } else {
+                      results.push(void 0);
+                    }
                   }
+                  return results;
+                }
+                break;
+              case ArduinoFirmata.ANALOG_MESSAGE:
+                analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
+                old_analog_value = this.analogRead(this.multi_byte_channel);
+                this.analog_input_data[this.multi_byte_channel] = analog_value;
+                if (old_analog_value !== analog_value) {
+                  return this.emit('analogChange', {
+                    pin: this.multi_byte_channel,
+                    value: analog_value,
+                    old_value: old_analog_value
+                  });
                 }
-                return results;
-              }
-              break;
-            case ArduinoFirmata.ANALOG_MESSAGE:
-              analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
-              old_analog_value = this.analogRead(this.multi_byte_channel);
-              this.analog_input_data[this.multi_byte_channel] = analog_value;
-              if (old_analog_value !== analog_value) {
-                return this.emit('analogChange', {
-                  pin: this.multi_byte_channel,
-                  value: analog_value,
-                  old_value: old_analog_value
-                });
-              }
-              break;
-            case ArduinoFirmata.REPORT_VERSION:
-              this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
-              return this.emit('boardVersion', this.boardVersion);
+                break;
+              case ArduinoFirmata.REPORT_VERSION:
+                this.boardVersion = `${this.stored_input_data[1]}.${this.stored_input_data[0]}`;
+                return this.emit('boardVersion', this.boardVersion);
+            }
           }
-        }
-      } else {
-        if (input_data < 0xF0) {
-          command = input_data & 0xF0;
-          this.multi_byte_channel = input_data & 0x0F;
         } else {
-          command = input_data;
-        }
-        if (command === ArduinoFirmata.START_SYSEX) {
-          this.parsing_sysex = true;
-          return this.sysex_bytes_read = 0;
-        } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
-          this.wait_for_data = 2;
-          return this.execute_multi_byte_command = command;
+          if (input_data < 0xF0) {
+            command = input_data & 0xF0;
+            this.multi_byte_channel = input_data & 0x0F;
+          } else {
+            command = input_data;
+          }
+          if (command === ArduinoFirmata.START_SYSEX) {
+            this.parsing_sysex = true;
+            return this.sysex_bytes_read = 0;
+          } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
+            this.wait_for_data = 2;
+            return this.execute_multi_byte_command = command;
+          }
         }
       }
+
+    };
+
+    ArduinoFirmata.Status = {
+      CLOSE: 0,
+      OPEN: 1
     };
 
+    ArduinoFirmata.INPUT = 0;
+
+    ArduinoFirmata.OUTPUT = 1;
+
+    ArduinoFirmata.ANALOG = 2;
+
+    ArduinoFirmata.PWM = 3;
+
+    ArduinoFirmata.SERVO = 4;
+
+    ArduinoFirmata.SHIFT = 5;
+
+    ArduinoFirmata.I2C = 6;
+
+    ArduinoFirmata.LOW = 0;
+
+    ArduinoFirmata.HIGH = 1;
+
+    ArduinoFirmata.MAX_DATA_BYTES = 32;
+
+    ArduinoFirmata.DIGITAL_MESSAGE = 0x90; // send data for a digital port
+
+    ArduinoFirmata.ANALOG_MESSAGE = 0xE0; // send data for an analog pin (or PWM)
+
+    ArduinoFirmata.REPORT_ANALOG = 0xC0; // enable analog input by pin
+
+    ArduinoFirmata.REPORT_DIGITAL = 0xD0; // enable digital input by port
+
+    ArduinoFirmata.SET_PIN_MODE = 0xF4; // set a pin to INPUT/OUTPUT/PWM/etc
+
+    ArduinoFirmata.REPORT_VERSION = 0xF9; // report firmware version
+
+    ArduinoFirmata.SYSTEM_RESET = 0xFF; // reset from MIDI
+
+    ArduinoFirmata.START_SYSEX = 0xF0; // start a MIDI SysEx message
+
+    ArduinoFirmata.END_SYSEX = 0xF7; // end a MIDI SysEx message
+
     return ArduinoFirmata;
 
-  })(events.EventEmitter2);
+  }).call(this);
 
 }).call(this);
index 6e2fa3c58554b72cbdaf176e8d5fbe332e7b91d2..2e5da4e39b53ade8528ab815a0cc2e0bb1387d22 100644 (file)
@@ -9,20 +9,19 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=cylon
 PKG_NAME:=node-$(PKG_NPM_NAME)
+PKG_SRC_NAME:=$(PKG_NPM_NAME)-firmata
 PKG_VERSION:=0.24.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
-PKG_SOURCE_VERSION:=a930f8446f23ec2cb28aadeff54b79ab7704e3a0
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=dceb75539d32f402db0a5f68f2c7e2b52e5547a5ac2dec875d34fd3cc95cce00
+PKG_SOURCE:=$(PKG_SRC_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_SRC_NAME)/-/
+PKG_HASH:=06ac7a8e2e6012577d2f4b043af766bf28a1d3e2a0d50e46629dab4f0bb65104
+PKG_SOURCE_SUBDIR:=$(PKG_SRC_NAME)-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
@@ -33,7 +32,7 @@ define Package/node-cylon/default
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=CylonJS - $(1)
-  URL:=https://www.npmjs.org/package/cylon
+  URL:=https://www.npmjs.org/package/cylon-firmata
   DEPENDS:=+node +node-npm $(2)
 endef
 
@@ -54,52 +53,55 @@ define Package/node-cylon-firmata
 endef
 
 define Package/node-cylon/description
      JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
+ JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
 endef
 
-define Build/Prepare
-       /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
-       $(Build/Patch)
-endef
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; \
+       $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install -g `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
 endef
 
 define Package/node-cylon/install
-       mkdir -p $(1)/usr/lib/node/cylon
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
 endef
 
 define Package/node-cylon-i2c/install
-       mkdir -p $(1)/usr/lib/node/cylon-i2c
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon-i2c
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
 endef
 
 define Package/node-cylon-gpio/install
-       mkdir -p $(1)/usr/lib/node/cylon-gpio
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon-gpio
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
 endef
 
 define Package/node-cylon-firmata/install
-       mkdir -p $(1)/usr/lib/node/cylon-firmata
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/cylon-firmata
+       $(CP) $(PKG_BUILD_DIR)/{package.json,LICENSE,*.md} \
+               $(1)/usr/lib/node/cylon-firmata/
+       $(CP) $(PKG_BUILD_DIR)/{docs,examples,*.js} \
+               $(1)/usr/lib/node/cylon-firmata/
+       $(CP) $(PKG_BUILD_DIR)/{lib,spec} \
+               $(1)/usr/lib/node/cylon-firmata/
 endef
 
 $(eval $(call BuildPackage,node-cylon))
 $(eval $(call BuildPackage,node-cylon-i2c))
 $(eval $(call BuildPackage,node-cylon-gpio))
 $(eval $(call BuildPackage,node-cylon-firmata))
-
index ec5b19fe703ac60c5656542bbed1e9bf9ac04f09..be75cc49d2e3a15c60c577cf2d0b2bfeb71cb78e 100644 (file)
@@ -7,23 +7,20 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_NPM_NAME:=hid
-PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=0.7.2
-PKG_RELEASE:=2
+PKG_NPM_NAME:=node-hid
+PKG_NAME:=$(PKG_NPM_NAME)
+PKG_VERSION:=0.7.7
+PKG_RELEASE:=1
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=v0.7.2
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=ede801a26a23290ab76d64ab636c3c3e2788030bb830af7006d37444c2a7b2c4
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=ac14467265a64116114e99091cd557ca7953500285c78cb4bdf6b82fe262cca6
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT or X11
 PKG_LICENSE_FILES:=
 
 include $(INCLUDE_DIR)/package.mk
@@ -34,43 +31,49 @@ define Package/node-hid
   CATEGORY:=Languages
   TITLE:=Node.js package to access HID devices
   URL:=https://github.com/node-hid/node-hid
-  DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libstdcpp +libudev-fbsd
+  DEPENDS:=+node +node-npm +libusb-1.0 +hidapi +libudev-fbsd
 endef
 
 define Package/node-hid/description
  Node.js package to access HID devices
 endef
 
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
+
+TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0
 
 define Build/Compile
        git init $(PKG_BUILD_DIR)
-       cd $(PKG_BUILD_DIR) ; \
        $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install --build-from-source --target_arch=$(CPU) -g \
-               `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
 endef
 
 define Package/node-hid/install
-       mkdir -p $(1)/usr/lib/node/node-hid/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/. $(1)/usr/lib/node/
-       $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
-                 $(1)/usr/lib/node/node-hid/.p* \
-                 $(1)/usr/lib/node/node-hid/.quilt* \
-                 $(1)/usr/lib/node/node-hid/.built* \
-                 $(1)/usr/lib/node/node-hid/.config*
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,*.md} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{binding.gyp,*.js} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,src} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/build/Release/HID.node \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/build/Release/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(LN) ../lib/node/node-hid/src/show-devices.js $(1)/usr/bin/hid-showdevices
 endef
 
 $(eval $(call BuildPackage,node-hid))
-
diff --git a/lang/node-homebridge/Makefile b/lang/node-homebridge/Makefile
new file mode 100644 (file)
index 0000000..967506e
--- /dev/null
@@ -0,0 +1,69 @@
+# 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.47
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=c4a77a360f99fbf16247f5f229d29c748c4c54ed790b962ec3dfd5d4cf20a0f0
+
+PKG_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)))))
+
+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 \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g $(DL_DIR)/$(PKG_SOURCE)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
+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 2c75acf0679e69959f17f5e41f480b896f6fa7ea..87dda6e1f41c5a1d8e5bc1b8a21b23ce8941a3b6 100644 (file)
@@ -9,18 +9,18 @@ include $(TOPDIR)/rules.mk
 
 PKG_NPM_NAME:=serialport
 PKG_NAME:=node-$(PKG_NPM_NAME)
-PKG_VERSION:=6.1.1
-PKG_RELEASE:=2
+PKG_VERSION:=7.1.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
-PKG_HASH:=b58c326d217fb0af1639e4ea834d9fca4be16934c486499e2ddac6e52b8dd560
+PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/
+PKG_HASH:=d6f60bd81fe94578dee8e82887a66c5b007ec3f346b13d8156dd94a46f2b4849
 
 PKG_BUILD_DEPENDS:=node/host
-PKG_NODE_VERSION:=`$(STAGING_DIR_HOSTPKG)/bin/node --version`
+PKG_USE_MIPS16:=0
 
-PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
-PKG_LICENSE:=Custom
+PKG_MAINTAINER:=Hirokazu MORIKAWA <morikw2@gmail.com>
+PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
 include $(INCLUDE_DIR)/package.mk
@@ -29,8 +29,8 @@ define Package/node-serialport
   SUBMENU:=Node.js
   SECTION:=lang
   CATEGORY:=Languages
-  TITLE:=Node.js package to access serial ports for reading and writing
-  URL:=https://www.npmjs.org/package/serialport
+  TITLE:=Node.js package to access serial ports
+  URL:=https://serialport.io/
   DEPENDS:=+node +node-npm
 endef
 
@@ -38,39 +38,34 @@ define Package/node-serialport/description
  Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
 endef
 
-define Build/Prepare
-       /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
-       $(Build/Patch)
-endef
-
-CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+TAR_OPTIONS+= --strip-components 1
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
-EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
+NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))))
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; \
+       $(MAKE_VARS) \
        $(MAKE_FLAGS) \
-       npm_config_arch=$(CONFIG_ARCH) \
-       npm_config_nodedir=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/ \
-       npm_config_cache=$(BUILD_DIR)/node-$(PKG_NODE_VERSION)/npm-cache \
-       PREFIX="$(PKG_INSTALL_DIR)/usr/" \
-       npm install --build-from-source --target_arch=$(CPU) -g \
-               `npm pack $(PKG_BUILD_DIR) | tail -n 1`
+       npm_config_arch=$(NODEJS_CPU) \
+       npm_config_target_arch=$(NODEJS_CPU) \
+       npm_config_build_from_source=true \
+       npm_config_nodedir=$(STAGING_DIR)/usr/ \
+       npm_config_prefix=$(PKG_INSTALL_DIR)/usr/ \
+       npm_config_cache=$(TMP_DIR)/npm-cache \
+       npm_config_tmp=$(TMP_DIR)/npm-tmp \
+       npm install -g --build-from-source $(PKG_BUILD_DIR)
+       rm -rf $(TMP_DIR)/npm-tmp
+       rm -rf $(TMP_DIR)/npm-cache
 endef
 
 define Package/node-serialport/install
-       mkdir -p $(1)/usr/lib/node/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
-       $(RM) -rf $(1)/usr/lib/node/node-hid/patches \
-                 $(1)/usr/lib/node/node-hid/.p* \
-                 $(1)/usr/lib/node/node-hid/.quilt* \
-                 $(1)/usr/lib/node/node-hid/.built* \
-                 $(1)/usr/lib/node/node-hid/.config*
-       # Strip PKG_BUILD_DIR from useless metadata inserted by npm install
-       # https://github.com/npm/npm/issues/10393
-       # https://github.com/npm/npm/issues/12110
-       find $(1)/usr/lib/node -name package.json -exec sed -i -e 's,$(PKG_BUILD_DIR),,g' {} +
+       $(INSTALL_DIR) $(1)/usr/lib/node/$(PKG_NPM_NAME)
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{package.json,LICENSE,*.md} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/test.js \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/$(PKG_NPM_NAME)/{node_modules,lib} \
+               $(1)/usr/lib/node/$(PKG_NPM_NAME)/
 endef
 
 $(eval $(call BuildPackage,node-serialport))
-
index 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>
index a2472d2abea86d68e7ec6aa855034a85d08aaa26..9b7d046d0bca79093002c9d696170062f460c800 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=perl-text-csv_xs
-PKG_VERSION:=1.37
+PKG_VERSION:=1.39
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://www.cpan.org/authors/id/H/HM/HMBRAND/
 PKG_SOURCE:=Text-CSV_XS-$(PKG_VERSION).tgz
-PKG_HASH:=20e16da9c38b0938f308c01d954f49d2c6922bac0d2d979bf2ad483fe7476ba2
+PKG_HASH:=aa4e424eaf68bea0d0e8c16b961c942b64926e6183ce1dbbc6c799eafb0a9ebd
 
 PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
 PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>
index aebd9cc04e3a66d714ba8dceb3741317d13745ff..68079048ba2e3162d9ef785ec5b1845334e5d63f 100644 (file)
@@ -49,6 +49,7 @@ CONFIGURE_VARS+= \
 CONFIGURE_ARGS+= \
        --with-http \
        --without-http-shared-deps \
+       --with-http-zlib-dir="$(STAGING_DIR)/usr" \
        --with-http-libcurl-dir="$(STAGING_DIR)/usr" \
        --with-http-libevent-dir="$(STAGING_DIR)/usr" \
        --with-http-libidn-dir="$(STAGING_DIR)/usr" \
index 042d5e9cef21e52fa935e999e2de7278ad7d6ac6..09e8f3a430b751b547e4b474ea77dd628c673c1b 100644 (file)
@@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk
 PECL_NAME:=mcrypt
 PECL_LONGNAME:=Bindings for the libmcrypt library
 
-PKG_VERSION:=1.0.1
+PKG_VERSION:=1.0.2
 PKG_RELEASE:=1
-PKG_HASH:=a3b0e5493b5cd209ab780ee54733667293d369e6b7052b4a7dab9dd0def46ac6
+PKG_HASH:=4d21dd20bfdc3cf4d43c967abdd137224f9c56258ca28ee0bc66ce130e01cae4
 
 PKG_NAME:=php7-pecl-mcrypt
 PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
index a36dfbb1f2042a3d33b4b4067b0ca61655e14427..92709c33b2591094dec3f8be431e4e62feb8a1e5 100644 (file)
@@ -6,17 +6,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=7.2.14
+PKG_VERSION:=7.2.16
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
 PKG_LICENSE:=PHPv3.01
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=ee3f1cc102b073578a3c53ba4420a76da3d9f0c981c02b1664ae741ca65af84f
+PKG_HASH:=7d91ed3c1447c6358a3d53f84599ef854aca4c3622de7435e2df115bf196e482
 
 PKG_FIXUP:=libtool autoreconf
 PKG_BUILD_PARALLEL:=1
index 97fd734af9c73fadba7d59513589f5fadf4740c4..c9c7ffb44586f2af0b898a695a8513090f46d40d 100644 (file)
@@ -1,3 +1,10 @@
+From: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
+Date: Thu, 7 Mar 2019 19:36:30 +0000
+Subject: Add-support-for-use-of-the-system-timezone-database
+
+# License: MIT
+# http://opensource.org/licenses/MIT
+
 # License: MIT
 # http://opensource.org/licenses/MIT
 
@@ -5,6 +12,8 @@ Add support for use of the system timezone database, rather
 than embedding a copy.  Discussed upstream but was not desired.
 
 History:
+r17: adapt for autotool change in 7.2.16RC1
+r16: adapt for timelib 2017.06 (in 7.2.3RC1)
 r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1)
 r14: improve check for valid tz file
 r13: adapt for upstream changes to use PHP allocator
@@ -25,10 +34,39 @@ r4: added "System/Localtime" tzname which uses /etc/localtime
 r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert)
 r2: add filesystem trawl to set up name alias index
 r1: initial revision
+---
+ ext/date/config0.m4     |  13 ++
+ ext/date/lib/parse_tz.c | 536 +++++++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 546 insertions(+), 3 deletions(-)
 
-diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
---- ./ext/date/lib/parse_tz.c.systzdata        2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/parse_tz.c  2017-08-22 12:16:00.370298079 +0200
+diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
+index e464156..00dae8b 100644
+--- a/ext/date/config0.m4
++++ b/ext/date/config0.m4
+@@ -10,6 +10,19 @@ io.h
+ dnl Check for strtoll, atoll
+ AC_CHECK_FUNCS(strtoll atoll)
++PHP_ARG_WITH(system-tzdata, for use of system timezone data,
++[  --with-system-tzdata[=DIR]      to specify use of system timezone data],
++no, no)
++
++if test "$PHP_SYSTEM_TZDATA" != "no"; then
++   AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
++
++   if test "$PHP_SYSTEM_TZDATA" != "yes"; then
++      AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
++                         [Define for location of system timezone data])
++   fi
++fi
++
+ PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
+ timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
+                  lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
+diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
+index 960e528..501b09e 100644
+--- a/ext/date/lib/parse_tz.c
++++ b/ext/date/lib/parse_tz.c
 @@ -25,8 +25,21 @@
  #include "timelib.h"
  #include "timelib_private.h"
@@ -51,7 +89,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
  
  #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
  # if defined(__LITTLE_ENDIAN__)
-@@ -67,6 +80,11 @@ static int read_php_preamble(const unsig
+@@ -67,6 +80,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
  {
        uint32_t version;
  
@@ -63,7 +101,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
        /* read ID */
        version = (*tzf)[3] - '0';
        *tzf += 4;
-@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -374,7 +392,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz)
        }
  }
  
@@ -266,7 +304,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +    }
 +
 +    for (l = li[hash]; l; l = l->next) {
-+        if (strcasecmp(l->name, name) == 0)
++        if (timelib_strcasecmp(l->name, name) == 0)
 +            return l;
 +    }
 +
@@ -290,7 +328,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +{
 +        const timelib_tzdb_index_entry *alpha = first, *beta = second;
 +
-+        return strcasecmp(alpha->id, beta->id);
++        return timelib_strcasecmp(alpha->id, beta->id);
 +}
 +
 +
@@ -493,8 +531,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
  {
        int left = 0, right = tzdb->index_size - 1;
- #ifdef HAVE_SETLOCALE
-@@ -419,9 +859,48 @@ static int seek_to_tz_position(const uns
+@@ -400,9 +840,48 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
        return 0;
  }
  
@@ -542,8 +580,8 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
 +#endif
  }
  
- const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(timelib_tzdb *tzdb, int *count)
-@@ -433,7 +912,30 @@ const timelib_tzdb_index_entry *timelib_
+ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
+@@ -414,7 +893,30 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_
  int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
  {
        const unsigned char *tzf;
@@ -575,7 +613,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
  }
  
  static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -475,12 +977,14 @@ static timelib_tzinfo* timelib_tzinfo_ct
+@@ -456,12 +958,14 @@ static timelib_tzinfo* timelib_tzinfo_ctor(char *name)
  timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, int *error_code)
  {
        const unsigned char *tzf;
@@ -591,7 +629,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
                tmp = timelib_tzinfo_ctor(timezone);
  
                version = read_preamble(&tzf, tmp, &type);
-@@ -503,6 +1007,29 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -484,6 +988,29 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
                        timelib_tzinfo_dtor(tmp);
                        return NULL;
                }
@@ -621,7 +659,7 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
                if (version == 2 || version == 3) {
                        if (!skip_64bit_preamble(&tzf, tmp)) {
                                /* 64 bit preamble is not in place */
-@@ -520,6 +1047,9 @@ timelib_tzinfo *timelib_parse_tzfile(cha
+@@ -501,6 +1028,9 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb, i
                } else {
                        set_default_location_and_comments(&tzf, tmp);
                }
@@ -631,23 +669,3 @@ diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c
        } else {
                *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE;
                tmp = NULL;
-diff -up ./ext/date/lib/timelib.m4.systzdata ./ext/date/lib/timelib.m4
---- ./ext/date/lib/timelib.m4.systzdata        2017-08-22 09:40:38.000000000 +0200
-+++ ./ext/date/lib/timelib.m4  2017-08-22 11:32:29.357799927 +0200
-@@ -81,3 +81,16 @@ io.h
- dnl Check for strtoll, atoll
- AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday)
-+
-+PHP_ARG_WITH(system-tzdata, for use of system timezone data,
-+[  --with-system-tzdata[=DIR]      to specify use of system timezone data],
-+no, no)
-+
-+if test "$PHP_SYSTEM_TZDATA" != "no"; then
-+   AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used])
-+
-+   if test "$PHP_SYSTEM_TZDATA" != "yes"; then
-+      AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA",
-+                         [Define for location of system timezone data])
-+   fi
-+fi
index 5359ab99708ea98a07a6aa1a71d0c690dbd455c7..bd181b81c532e100d08f6e5d1294a842e7409ba0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -453,7 +453,10 @@ PHP_CHECK_FUNC(gethostname, nsl)
+@@ -422,7 +422,10 @@ PHP_CHECK_FUNC(gethostname, nsl)
  PHP_CHECK_FUNC(gethostbyaddr, nsl)
  PHP_CHECK_FUNC(yp_get_default_domain, nsl)
  
    ])
  
    PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
---- a/ext/opcache/config.m4
-+++ b/ext/opcache/config.m4
-@@ -227,7 +227,14 @@ AC_TRY_RUN([
-       flock_type=linux
-     AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
-     AC_MSG_RESULT("yes")
--], AC_MSG_RESULT("no") )
-+], [
-+    AC_MSG_RESULT("no")
-+], [
-+    dnl cross-compiling; assume Linux
-+      flock_type=linux
-+    AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
-+    AC_MSG_RESULT("yes")
-+])
- AC_MSG_CHECKING("whether flock struct is BSD ordered")
- AC_TRY_RUN([
-@@ -243,7 +250,12 @@ AC_TRY_RUN([
-       flock_type=bsd
-     AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
-     AC_MSG_RESULT("yes")
--], AC_MSG_RESULT("no") )
-+], [
-+    AC_MSG_RESULT("no")
-+], [
-+    dnl cross-compiling; assume Linux
-+    AC_MSG_RESULT("no")
-+])
- if test "$flock_type" == "unknown"; then
-       AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
index 5f8b207dcaf1410dc3fce9e95a96c59df4db8879..650005ad8b2560e2c573087279225960580f671b 100644 (file)
@@ -29,8 +29,9 @@ define Package/python3-flask
   URL:=http://github.com/pallets/flask/
   TITLE:=python3-flask
   DEPENDS:=+python3-asyncio +python3-click +python3-codecs +python3-decimal \
-           +python3-itsdangerous +python3-jinja2 +python3-light +python3-logging \
-           +python3-markupsafe +python3-multiprocessing +python3-werkzeug
+           +python3-itsdangerous +python3-jinja2 +python3 +python3-logging \
+           +python3-markupsafe +python3-multiprocessing +python3-setuptools \
+           +python3-werkzeug
   VARIANT:=python3
 endef
 
index 4c9d9eb2ad3b00fcb258c386035b5da7589be220..c9007df7cca147dbc51ae19a86892fa9caca87cb 100644 (file)
@@ -28,7 +28,7 @@ define Package/python3-jinja2
   SUBMENU:=Python
   URL:=http://jinja.pocoo.org/
   TITLE:=python3-jinja2
-  DEPENDS:=+python3-light
+  DEPENDS:=+python3-light +python3-markupsafe
   VARIANT:=python3
 endef
 
index bedcc997d4ca7529a3a7db949addf887af93c045..d3e119a03a3879e5896073151f93c594c4b81c1c 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=MarkupSafe
-PKG_VERSION:=1.1.0
+PKG_VERSION:=1.1.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/M/MarkupSafe
-PKG_HASH:=4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3
+PKG_HASH:=29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b
 PKG_BUILD_DEPENDS:=python python3
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
index 6bbb779a2a52c36b41e2a7bfa689c87fabb644f8..0912aa2cb422e42b4fc31daeec42557408d857b8 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcrypt
-PKG_VERSION:=3.1.5
+PKG_VERSION:=3.1.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=bcrypt-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/b/$(PKG_NAME)
-PKG_HASH:=136243dc44e5bab9b61206bd46fff3018bd80980b1a1dfbab64a22ff5745957f
+PKG_HASH:=44636759d222baa62806bbceb20e96f75a015a6381690d1bc2eda91c01ec02ea
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
diff --git a/lang/python/chardet/Makefile b/lang/python/chardet/Makefile
deleted file mode 100644 (file)
index 27020c7..0000000
+++ /dev/null
@@ -1,52 +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:=chardet
-PKG_VERSION:=3.0.4
-PKG_RELEASE:=1
-PKG_LICENSE:=LGPL-2.1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/
-PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/chardet
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-  TITLE:=Universal encoding detector for Python 2 and 3
-  URL:=https://github.com/chardet/chardet
-  DEPENDS:=+python
-endef
-
-define Package/chardet/description
-  Universal encoding detector for Python 2 and 3
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/chardet/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \
-           $(1)/usr/bin
-       # fix python exec path in scripts
-       sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect
-endef
-
-$(eval $(call BuildPackage,chardet))
diff --git a/lang/python/click-log/Makefile b/lang/python/click-log/Makefile
new file mode 100644 (file)
index 0000000..3da043a
--- /dev/null
@@ -0,0 +1,36 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=click-log
+PKG_VERSION:=0.3.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/click-contrib/click-log/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=16babb66a2ebf22c37c1cf38753a84e6027eb8991fcf9a8487971591b8ca9812
+PKG_LICENSE:=MIT
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-click-log
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=http://github.com/mitsuhiko/click
+  TITLE:=python3-click-log
+  DEPENDS:=+python3-click
+  VARIANT:=python3
+endef
+
+define Package/python3-click-log/description
+  Simple and beautiful logging for click applications
+endef
+
+$(eval $(call Py3Package,python3-click-log))
+$(eval $(call BuildPackage,python3-click-log))
+$(eval $(call BuildPackage,python3-click-log-src))
index dc0760d9afa0d72c48ddf08d6fb1a03c7d96046c..d3f1f05500ba6a6a42c7ab71e678b33b42458259 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pyodbc
-PKG_VERSION:=4.0.24
-PKG_RELEASE:=1
+PKG_VERSION:=4.0.26
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyodbc
-PKG_HASH:=4326abb737dec36156998d52324921673d30f575e1e0998f0c5edd7de20e61d4
+PKG_HASH:=e52700b5d24a846483b5ab80acd9153f8e593999c9184ffea11596288fb33de3
 PKG_BUILD_DEPENDS:=python python3 unixodbc
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
@@ -19,6 +19,9 @@ 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)
 
+PKG_BUILD_DEPENDS:=unixodbc/host
+
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
 include ../python3-package.mk
@@ -28,7 +31,7 @@ define Package/python-pyodbc/Default
   CATEGORY:=Languages
   SUBMENU:=Python
   URL:=https://github.com/mkleehammer/pyodbc
-  DEPENDS:=+unixodbc +libstdcpp
+  DEPENDS:=+unixodbc $(CXX_DEPENDS)
 endef
 
 define Package/python-pyodbc
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-appdirs/Makefile b/lang/python/python-appdirs/Makefile
new file mode 100644 (file)
index 0000000..79662e1
--- /dev/null
@@ -0,0 +1,37 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-appdirs
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/a/appdirs/
+PKG_SOURCE:=appdirs-$(PKG_VERSION).tar.gz
+PKG_HASH:=9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92
+PKG_LICENSE:=MIT
+PKG_BUILD_DIR:=$(BUILD_DIR)/appdirs-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-appdirs
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=https://github.com/ActiveState/appdirs
+  TITLE:=python3-appdirs
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-appdirs/description
+  The Universal Character Encoding Detector
+endef
+
+$(eval $(call Py3Package,python3-appdirs))
+$(eval $(call BuildPackage,python3-appdirs))
+$(eval $(call BuildPackage,python3-appdirs-src))
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))
index 8482486d8ea49960bfed07ace01821e511a74510..251f7638a81a4f76da95f9fb35c2c5323a651bd7 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-attrs
-PKG_VERSION:=18.2.0
+PKG_VERSION:=19.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=attrs-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/a/attrs
-PKG_HASH:=10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69
+PKG_HASH:=f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-attrs-$(PKG_VERSION)
 
@@ -31,19 +31,18 @@ define Package/python-attrs/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://www.attrs.org/
+  TITLE:=Classes Without Boilerplate
+  URL:=https://www.attrs.org/
 endef
 
 define Package/python-attrs
 $(call Package/python-attrs/Default)
-  TITLE:=Classes Without Boilerplate
   DEPENDS:=+PACKAGE_python-attrs:python-light
   VARIANT:=python
 endef
 
 define Package/python3-attrs
 $(call Package/python-attrs/Default)
-  TITLE:=Classes Without Boilerplate
   DEPENDS:=+PACKAGE_python3-attrs:python3-light
   VARIANT:=python3
 endef
index 0c0ae594767f21e80463c58eade7c198b985b6d4..b2b3a660803f814fa8c211ee6b68c24e3fc30ea6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-automat
 PKG_VERSION:=0.7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=Automat-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/A/Automat
@@ -27,16 +27,21 @@ include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
+PYTHON_PKG_SETUP_VARS:= \
+  PKG_VERSION="$(PKG_VERSION)"
+PYTHON3_PKG_SETUP_VARS:= \
+  PKG_VERSION="$(PKG_VERSION)"
+
 define Package/python-automat/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Concise, idiomatic finite-state automata
   URL:=https://github.com/glyph/Automat
 endef
 
 define Package/python-automat
 $(call Package/python-automat/Default)
-  TITLE:=Concise, idiomatic finite-state automata
   DEPENDS:= \
       +PACKAGE_python-automat:python-light \
       +PACKAGE_python-automat:python-attrs \
@@ -46,7 +51,6 @@ endef
 
 define Package/python3-automat
 $(call Package/python-automat/Default)
-  TITLE:=Concise, idiomatic finite-state automata
   DEPENDS:= \
       +PACKAGE_python3-automat:python3-light \
       +PACKAGE_python3-automat:python3-attrs \
@@ -76,20 +80,6 @@ define Py3Package/python3-automat/filespec
 -|$(PYTHON3_PKG_DIR)/automat/_visualize.py
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,, \
-               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
-               PKG_VERSION="$(PKG_VERSION)" \
-       )
-endef
-
-define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,, \
-               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
-               PKG_VERSION="$(PKG_VERSION)" \
-       )
-endef
-
 $(eval $(call PyPackage,python-automat))
 $(eval $(call BuildPackage,python-automat))
 $(eval $(call BuildPackage,python-automat-src))
index deb3f1666262cf7ddc8ceb927ce04fe6450d98f6..00f7e32388151f3b3d1b4c1fb4b8d1b513cdf59a 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-certifi
-PKG_VERSION:=2018.11.29
+PKG_VERSION:=2019.3.9
 PKG_RELEASE:=1
 PKG_LICENSE:=MPL-2.0
 
 PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/certifi
-PKG_HASH:=47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7
+PKG_HASH:=b26104d6835d1f5e49452a26eb2ff87fe7090b89dfcaee5ea2212697e1e1d7ae
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-certifi-$(PKG_VERSION)
 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
index 6f6fbcfc6d3503eb03bf51cc990dc3ee9c3eb540..70ea42d9cd30d979a0b4ec0b60f5e837a06491f4 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cffi
-PKG_VERSION:=1.11.5
+PKG_VERSION:=1.12.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.io/packages/source/c/cffi
-PKG_HASH:=e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cffi
+PKG_HASH:=e113878a446c6228669144ae8a56e268c91b7f1fafae927adc4879d9849e0ea7
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
 
@@ -36,21 +36,24 @@ define Package/python-cffi/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://cffi.readthedocs.org/
+  TITLE:=C Foreign Function Interface
+  URL:=https://cffi.readthedocs.org/
   DEPENDS:=+libffi
 endef
 
 define Package/python-cffi
 $(call Package/python-cffi/Default)
-  TITLE:=python-cffi
-  DEPENDS+=+PACKAGE_python-cffi:python-light +PACKAGE_python-cffi:python-pycparser
+  DEPENDS+= \
+      +PACKAGE_python-cffi:python-light \
+      +PACKAGE_python-cffi:python-pycparser
   VARIANT:=python
 endef
 
 define Package/python3-cffi
 $(call Package/python-cffi/Default)
-  TITLE:=python3-cffi
-  DEPENDS+=+PACKAGE_python3-cffi:python3-light +PACKAGE_python3-cffi:python3-pycparser
+  DEPENDS+= \
+      +PACKAGE_python3-cffi:python3-light \
+      +PACKAGE_python3-cffi:python3-pycparser
   VARIANT:=python3
 endef
 
diff --git a/lang/python/python-chardet/Makefile b/lang/python/python-chardet/Makefile
new file mode 100644 (file)
index 0000000..bce37b3
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2007-2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-chardet
+PKG_VERSION:=3.0.4
+PKG_RELEASE:=1
+PKG_LICENSE:=LGPL-2.1
+
+PKG_SOURCE:=chardet-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/
+PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-chardet-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-chardet/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+  URL:=https://github.com/chardet/chardet
+endef
+
+define Package/python-chardet
+$(call Package/python-chardet/Default)
+  TITLE:=Universal encoding detector for Python 2
+  DEPENDS:=+PACKAGE_python-chardet:python
+  VARIANT:=python
+endef
+
+define Package/python3-chardet
+$(call Package/python-chardet/Default)
+  TITLE:=Universal encoding detector for Python3
+  DEPENDS:=+PACKAGE_python3-chardet:python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-chardet/description
+  Universal encoding detector for Python 2 and 3
+endef
+
+define Package/python3-chardet/description
+$(call Package/python-chardet/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-chardet))
+$(eval $(call BuildPackage,python-chardet))
+$(eval $(call BuildPackage,python-chardet-src))
+
+$(eval $(call Py3Package,python3-chardet))
+$(eval $(call BuildPackage,python3-chardet))
+$(eval $(call BuildPackage,python3-chardet-src))
index e1fa855ffce2affd8a1302aaf58639378e27a188..db502e2ebccbc8a9ddbccf6756a620e097018852 100644 (file)
@@ -31,19 +31,18 @@ define Package/python-constantly/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Symbolic constants in Python
   URL:=https://github.com/twisted/constantly
 endef
 
 define Package/python-constantly
 $(call Package/python-constantly/Default)
-  TITLE:=Symbolic constants in Python
   DEPENDS:=+PACKAGE_python-constantly:python-light
   VARIANT:=python
 endef
 
 define Package/python3-constantly
 $(call Package/python-constantly/Default)
-  TITLE:=Symbolic constants in Python
   DEPENDS:=+PACKAGE_python3-constantly:python3-light
   VARIANT:=python3
 endef
diff --git a/lang/python/python-contextlib2/Makefile b/lang/python/python-contextlib2/Makefile
new file mode 100644 (file)
index 0000000..c1c0ba9
--- /dev/null
@@ -0,0 +1,36 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-contextlib2
+PKG_VERSION:=0.5.5
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/contextlib2/
+PKG_SOURCE:=contextlib2-$(PKG_VERSION).tar.gz
+PKG_HASH:=509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48
+PKG_BUILD_DIR:=$(BUILD_DIR)/contextlib2-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-contextlib2
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=http://contextlib2.readthedocs.org
+  TITLE:=python3-contextlib2
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-contextlib2/description
+  contextlib2 is a backport of the standard library’s contextlib module to earlier Python versions.
+endef
+
+$(eval $(call Py3Package,python3-contextlib2))
+$(eval $(call BuildPackage,python3-contextlib2))
+$(eval $(call BuildPackage,python3-contextlib2-src))
index ae1694a6a7205bccff2029c9e2e88090ac3e86f6..f0f8d659872c9eae350a6cba107bd0563261136d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-crypto
 PKG_VERSION:=2.6.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=pycrypto-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycrypto
@@ -28,24 +28,32 @@ include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
 define Package/python-crypto/Default
   SECTION:=lang-python
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Python Cryptography Toolkit
   URL:=https://www.dlitz.net/software/pycrypto/
+  DEPENDS:=+libgmp
 endef
 
 define Package/python-crypto
 $(call Package/python-crypto/Default)
-  TITLE:=python-crypto
-  DEPENDS:=+libgmp +PACKAGE_python-crypto:python
+  DEPENDS+=+PACKAGE_python-crypto:python
   VARIANT:=python
 endef
 
 define Package/python3-crypto
 $(call Package/python-crypto/Default)
-  TITLE:=python3-crypto
-  DEPENDS:=+libgmp +PACKAGE_python3-crypto:python3
+  DEPENDS+=+PACKAGE_python3-crypto:python3
   VARIANT:=python3
 endef
 
@@ -60,20 +68,6 @@ $(call Package/python-crypto/description)
 (Variant for Python3)
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,,\
-               install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
-               CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
-       )
-endef
-
-define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,,\
-               install --prefix=/usr --root=$(PKG_INSTALL_DIR),\
-               CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)" \
-       )
-endef
-
 $(eval $(call PyPackage,python-crypto))
 $(eval $(call BuildPackage,python-crypto))
 $(eval $(call BuildPackage,python-crypto-src))
diff --git a/lang/python/python-cryptodome/Makefile b/lang/python/python-cryptodome/Makefile
new file mode 100644 (file)
index 0000000..030fd93
--- /dev/null
@@ -0,0 +1,75 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cryptodome
+PKG_VERSION:=3.7.3
+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_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodome-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+define Package/python-cryptodome/Default
+  SECTION:=lang-python
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A self-contained cryptographic library for Python
+  URL:=https://www.pycryptodome.org/
+  DEPENDS:=+libgmp
+endef
+
+define Package/python-cryptodome
+$(call Package/python-cryptodome/Default)
+  DEPENDS+=+PACKAGE_python-cryptodome:python
+  VARIANT:=python
+  CONFLICTS:=python-crypto
+endef
+
+define Package/python3-cryptodome
+$(call Package/python-cryptodome/Default)
+  DEPENDS+=+PACKAGE_python3-cryptodome:python3
+  VARIANT:=python3
+  CONFLICTS:=python3-crypto
+endef
+
+define Package/python-cryptodome/description
+PyCryptodome is a self-contained Python package of low-level
+cryptographic primitives.
+endef
+
+define Package/python3-cryptodome/description
+$(call Package/python-cryptodome/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-cryptodome))
+$(eval $(call BuildPackage,python-cryptodome))
+$(eval $(call BuildPackage,python-cryptodome-src))
+
+$(eval $(call Py3Package,python3-cryptodome))
+$(eval $(call BuildPackage,python3-cryptodome))
+$(eval $(call BuildPackage,python3-cryptodome-src))
diff --git a/lang/python/python-cryptodome/patches/001-fix-libgmp-loading.patch b/lang/python/python-cryptodome/patches/001-fix-libgmp-loading.patch
new file mode 100644 (file)
index 0000000..ea860fa
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/lib/Crypto/Math/_IntegerGMP.py
++++ b/lib/Crypto/Math/_IntegerGMP.py
+@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG;
+         int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d);
+         """
+-lib = load_lib("gmp", gmp_defs)
++lib = load_lib("libgmp.so.10", gmp_defs)
+ implementation = {"library": "gmp", "api": backend}
+ if hasattr(lib, "__mpir_version"):
diff --git a/lang/python/python-cryptodome/patches/002-omit-tests.patch b/lang/python/python-cryptodome/patches/002-omit-tests.patch
new file mode 100644 (file)
index 0000000..6f16b21
--- /dev/null
@@ -0,0 +1,50 @@
+--- 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/*.*",
+-    ],
+ }
+ system_bits = 8 * struct.calcsize("P")
diff --git a/lang/python/python-cryptodomex/Makefile b/lang/python/python-cryptodomex/Makefile
new file mode 100644 (file)
index 0000000..6691b7f
--- /dev/null
@@ -0,0 +1,73 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-cryptodomex
+PKG_VERSION:=3.7.3
+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_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cryptodomex-$(PKG_VERSION)
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON_PKG_SETUP_VARS:= \
+  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+PYTHON3_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_VARS:= \
+  CONFIG_BIG_ENDIAN="$(CONFIG_BIG_ENDIAN)"
+
+define Package/python-cryptodomex/Default
+  SECTION:=lang-python
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=A self-contained cryptographic library for Python
+  URL:=https://www.pycryptodome.org/
+  DEPENDS:=+libgmp
+endef
+
+define Package/python-cryptodomex
+$(call Package/python-cryptodomex/Default)
+  DEPENDS+=+PACKAGE_python-cryptodomex:python
+  VARIANT:=python
+endef
+
+define Package/python3-cryptodomex
+$(call Package/python-cryptodomex/Default)
+  DEPENDS+=+PACKAGE_python3-cryptodomex:python3
+  VARIANT:=python3
+endef
+
+define Package/python-cryptodomex/description
+PyCryptodome is a self-contained Python package of low-level
+cryptographic primitives.
+endef
+
+define Package/python3-cryptodomex/description
+$(call Package/python-cryptodomex/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-cryptodomex))
+$(eval $(call BuildPackage,python-cryptodomex))
+$(eval $(call BuildPackage,python-cryptodomex-src))
+
+$(eval $(call Py3Package,python3-cryptodomex))
+$(eval $(call BuildPackage,python3-cryptodomex))
+$(eval $(call BuildPackage,python3-cryptodomex-src))
diff --git a/lang/python/python-cryptodomex/patches/001-fix-libgmp-loading.patch b/lang/python/python-cryptodomex/patches/001-fix-libgmp-loading.patch
new file mode 100644 (file)
index 0000000..e562df0
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/lib/Cryptodome/Math/_IntegerGMP.py
++++ b/lib/Cryptodome/Math/_IntegerGMP.py
+@@ -92,7 +92,7 @@ gmp_defs = """typedef unsigned long UNIX_ULONG;
+         int __gmpz_divisible_ui_p (const mpz_t n, UNIX_ULONG d);
+         """
+-lib = load_lib("gmp", gmp_defs)
++lib = load_lib("libgmp.so.10", gmp_defs)
+ implementation = {"library": "gmp", "api": backend}
+ if hasattr(lib, "__mpir_version"):
diff --git a/lang/python/python-cryptodomex/patches/002-omit-tests.patch b/lang/python/python-cryptodomex/patches/002-omit-tests.patch
new file mode 100644 (file)
index 0000000..23e264a
--- /dev/null
@@ -0,0 +1,50 @@
+--- 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/*.*",
+-    ],
+ }
+ system_bits = 8 * struct.calcsize("P")
index 9c9e5405a5ea66e0244caffdb2da49b105e30d35..0fe610afea413c0d673d6a7a2e2f88b996b76312 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptography
-PKG_VERSION:=2.4.2
+PKG_VERSION:=2.6.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=cryptography-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= https://files.pythonhosted.org/packages/source/c/cryptography
-PKG_HASH:=05a6052c6a9f17ff78ba78f8e6eb1d777d25db3b763343a1ae89a7a8670386dd
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cryptography
+PKG_HASH:=26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6
 
 PKG_LICENSE:=Apache-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
@@ -31,18 +31,17 @@ define Package/python-cryptography/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Cryptographic recipes and primitives
   URL:=https://github.com/pyca/cryptography
   DEPENDS:=+libopenssl
 endef
 
 define Package/python-cryptography
 $(call Package/python-cryptography/Default)
-  TITLE:=python-cryptography
   DEPENDS+= \
       +PACKAGE_python-cryptography:python \
       +PACKAGE_python-cryptography:python-cffi \
       +PACKAGE_python-cryptography:python-enum34 \
-      +PACKAGE_python-cryptography:python-idna \
       +PACKAGE_python-cryptography:python-ipaddress \
       +PACKAGE_python-cryptography:python-asn1crypto \
       +PACKAGE_python-cryptography:python-six
@@ -51,11 +50,9 @@ endef
 
 define Package/python3-cryptography
 $(call Package/python-cryptography/Default)
-  TITLE:=python3-cryptography
   DEPENDS+= \
       +PACKAGE_python3-cryptography:python3 \
       +PACKAGE_python3-cryptography:python3-cffi \
-      +PACKAGE_python3-cryptography:python3-idna \
       +PACKAGE_python3-cryptography:python3-asn1crypto \
       +PACKAGE_python3-cryptography:python3-six
   VARIANT:=python3
diff --git a/lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch b/lang/python/python-cryptography/patches/002-remove-undefined-dtls-methods.patch
deleted file mode 100644 (file)
index dfceff5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-From e7a6229b332969d621aaf25f3fc5cdd99e3c9072 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 18 Nov 2018 18:04:01 -0800
-Subject: [PATCH] Adjust DTLS check (#4593)
-
-OpenSSL defines these even with OPENSSL_NO_DTLS.
----
- src/_cffi_src/openssl/ssl.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
-index c921dbee..f0b8939c 100644
---- a/src/_cffi_src/openssl/ssl.py
-+++ b/src/_cffi_src/openssl/ssl.py
-@@ -709,7 +709,7 @@ static const long TLS_ST_BEFORE = 0;
- static const long TLS_ST_OK = 0;
- #endif
--#if defined(OPENSSL_NO_DTLS) || CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
-+#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102
- static const long Cryptography_HAS_GENERIC_DTLS_METHOD = 0;
- const SSL_METHOD *(*DTLS_method)(void) = NULL;
- const SSL_METHOD *(*DTLS_server_method)(void) = NULL;
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
+
diff --git a/lang/python/python-decorator/Makefile b/lang/python/python-decorator/Makefile
new file mode 100644 (file)
index 0000000..2d4416e
--- /dev/null
@@ -0,0 +1,32 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-decorator
+PKG_VERSION:=4.3.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/micheles/decorator/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=c053ec881270608a5aef624a45a7700ec76ceca9d96689506411e1f319085380
+PKG_BUILD_DIR:=$(BUILD_DIR)/decorator-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-decorator
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=https://github.com/micheles/decorator
+  TITLE:=python3-decodator
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+$(eval $(call Py3Package,python3-decorator))
+$(eval $(call BuildPackage,python3-decorator))
+$(eval $(call BuildPackage,python3-decorator-src))
index 545a170e3b64db2ddac9009542d9734c072150eb..659f0d62dbc9cd637c84a298ddb88ed71e38f239 100644 (file)
@@ -8,37 +8,58 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-dns
-PKG_RELEASE:=2
-PKG_VERSION:=1.15.0
-PKG_SOURCE_URL:=http://www.dnspython.org/kits/$(PKG_VERSION)
-PKG_HASH:=11598ae5735746e63921f8eebdfdee4a2e7d0ba842ebd57ba02682d4aed8244b
+PKG_VERSION:=1.16.0
+PKG_RELEASE:=1
+
 PKG_SOURCE:=dnspython-$(PKG_VERSION).tar.gz
-PKG_MAINTAINER:=Denis Shulyaka <Shulyaka@gmail.com>
+PKG_SOURCE_URL:=http://www.dnspython.org/kits/1.16.0/
+PKG_HASH:=4bf5c5c12a4478ee7860ab176659cf64c4899ee76752d826b082f8af723c5cf9
+
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=LICENSE
-PKG_BUILD_DIR:=$(BUILD_DIR)/dnspython-$(PKG_VERSION)
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-dnspython-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-dns/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=dnspython
+  URL:=http://www.dnspython.org/
+endef
 
 define Package/python-dns
-       SECTION:=language-python
-       CATEGORY:=Languages
-       SUBMENU:=Python
-       TITLE:=dnspython
-       URL:=http://www.dnspython.org/
-       DEPENDS:=+python
+$(call Package/python-dns/Default)
+  DEPENDS:=+PACKAGE_python-dns:python
+  VARIANT:=python
 endef
 
 define Package/python-dns/description
  dnspython is a DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates. It supports TSIG authenticated messages and EDNS0.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,\
-               install --prefix=/usr --root="$(PKG_INSTALL_DIR)" \
-       )
+define Package/python3-dns
+$(call Package/python-dns/Default)
+  DEPENDS:=+PACKAGE_python3-dns:python3
+  VARIANT:=python3
+endef
+
+define Package/python3-dns/description
+$(call Package/python-dns/description)
+.
+(Variant for Python3)
 endef
 
 $(eval $(call PyPackage,python-dns))
 $(eval $(call BuildPackage,python-dns))
+$(eval $(call BuildPackage,python-dns-src))
+$(eval $(call Py3Package,python3-dns))
+$(eval $(call BuildPackage,python3-dns))
+$(eval $(call BuildPackage,python3-dns-src))
index 90b54c4c14c627377604fcc5bdaa20d18385b77e..16e55fc1ac45ae31b2d6a2e61b45c21832931411 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-enum34
 PKG_VERSION:=1.1.6
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=enum34-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/enum34
 PKG_HASH:=8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-enum34-$(PKG_VERSION)
@@ -30,12 +30,12 @@ define Package/python-enum34/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=https://pypi.python.org/pypi/enum34/
+  TITLE:=Backported Python 3.4 enum
+  URL:=https://bitbucket.org/stoneleaf/enum34
 endef
 
 define Package/python-enum34
 $(call Package/python-enum34/Default)
-  TITLE:=python-enum34
   DEPENDS:=+PACKAGE_python-enum34:python-light
   VARIANT:=python
 endef
index 99174136577a396b0fece4cfb22aaeb0faec818c..df6a30fca36258b35a2f8b6f9f23e76e0e5a5c3a 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-gmpy2
 PKG_VERSION:=2.0.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=gmpy2-$(PKG_VERSION).zip
-PKG_SOURCE_URL:=https://pypi.python.org/packages/90/f4/9a2e384b325b69bc5827b9a6510a8fb4a51698c915c06a3f25a86458892a
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/g/gmpy2
 PKG_HASH:=dd233e3288b90f21b0bb384bcc7a7e73557bb112ccf0032ad52aa614eb373d3f
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-gmpy2-$(PKG_VERSION)
@@ -27,24 +27,27 @@ include ../python3-package.mk
 
 PKG_UNPACK:=unzip -q -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE); mv -f $(PKG_BUILD_DIR)/gmpy2-$(PKG_VERSION)/* $(PKG_BUILD_DIR)
 
+PYTHON_PKG_SETUP_ARGS:=--nompfr
+PYTHON3_PKG_SETUP_ARGS:=--nompfr
+
 define Package/python-gmpy2/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://code.google.com/p/gmpy/
+  TITLE:=GMP/MPIR, MPFR, and MPC interface
+  URL:=https://github.com/aleaxit/gmpy
+  DEPENDS:=+libgmp
 endef
 
 define Package/python-gmpy2
 $(call Package/python-gmpy2/Default)
-  TITLE:=python-gmpy2
-  DEPENDS:=+libgmp +PACKAGE_python-gmpy2:python-light
+  DEPENDS+=+PACKAGE_python-gmpy2:python-light
   VARIANT:=python
 endef
 
 define Package/python3-gmpy2
 $(call Package/python-gmpy2/Default)
-  TITLE:=python3-gmpy2
-  DEPENDS:=+libgmp +PACKAGE_python3-gmpy2:python3-light
+  DEPENDS+=+PACKAGE_python3-gmpy2:python3-light
   VARIANT:=python3
 endef
 
@@ -64,16 +67,10 @@ $(call Package/python-gmpy2/description)
 (Variant for Python3)
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
-endef
-
-define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
-endef
-
 $(eval $(call PyPackage,python-gmpy2))
 $(eval $(call BuildPackage,python-gmpy2))
+$(eval $(call BuildPackage,python-gmpy2-src))
 
 $(eval $(call Py3Package,python3-gmpy2))
 $(eval $(call BuildPackage,python3-gmpy2))
+$(eval $(call BuildPackage,python3-gmpy2-src))
index a963fc53bab66e2c6d27314c72a61a09e8b61423..4aa835a239ef5838c3790c1da8f7b37e1a707301 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-gnupg
-PKG_VERSION:=0.4.3
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-gnupg
-PKG_HASH:=2d158dfc6b54927752b945ebe57e6a0c45da27747fa3b9ae66eccc0d2147ac0d
+PKG_HASH:=45daf020b370bda13a1429c859fcdff0b766c0576844211446f9266cae97fb0e
 
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=LICENSE
index 36613abc1d467c6105e9548f472026da6ecd047e..80b2b44d330fe4f90f4bf0528a5d5c274aa42181 100644 (file)
@@ -31,12 +31,12 @@ define Package/python-hyperlink/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Pure-Python immutable URLs
   URL:=https://github.com/python-hyper/hyperlink
 endef
 
 define Package/python-hyperlink
 $(call Package/python-hyperlink/Default)
-  TITLE:=Pure-Python immutable URLs
   DEPENDS:= \
       +PACKAGE_python-hyperlink:python-light \
       +PACKAGE_python-hyperlink:python-idna
@@ -45,7 +45,6 @@ endef
 
 define Package/python3-hyperlink
 $(call Package/python-hyperlink/Default)
-  TITLE:=Pure-Python immutable URLs
   DEPENDS:= \
       +PACKAGE_python3-hyperlink:python3-light \
       +PACKAGE_python3-hyperlink:python3-idna
index 894e39ee58836797acf7235874068e7c736f8511..d54b91d2db4ca2613f5e063864f2c0a94cdc3fe1 100644 (file)
@@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-idna
 PKG_VERSION:=2.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=idna-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/i/idna
 PKG_HASH:=c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-idna-$(PKG_VERSION)
 
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.rst
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -30,20 +31,23 @@ define Package/python-idna/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=IDNA library
   URL:=https://github.com/kjd/idna
 endef
 
 define Package/python-idna
 $(call Package/python-idna/Default)
-  TITLE:=python-idna
-  DEPENDS:=+PACKAGE_python-idna:python-light +PACKAGE_python-idna:python-codecs
+  DEPENDS:= \
+      +PACKAGE_python-idna:python-light \
+      +PACKAGE_python-idna:python-codecs
   VARIANT:=python
 endef
 
 define Package/python3-idna
 $(call Package/python-idna/Default)
-  TITLE:=python3-idna
-  DEPENDS:=+PACKAGE_python3-idna:python3-light +PACKAGE_python3-idna:python3-codecs
+  DEPENDS:= \
+      +PACKAGE_python3-idna:python3-light \
+      +PACKAGE_python3-idna:python3-codecs
   VARIANT:=python3
 endef
 
index 107cfaf3f54ea1f165dd0b0c16bab27b014f3446..db0ce103adfac672f1506ccec1733a0b8d08c9a9 100644 (file)
@@ -31,19 +31,18 @@ define Package/python-incremental/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Versions your Python projects
   URL:=https://github.com/twisted/incremental
 endef
 
 define Package/python-incremental
 $(call Package/python-incremental/Default)
-  TITLE:=Versions your Python projects
   DEPENDS:=+PACKAGE_python-incremental:python-light
   VARIANT:=python
 endef
 
 define Package/python3-incremental
 $(call Package/python-incremental/Default)
-  TITLE:=Versions your Python projects
   DEPENDS:=+PACKAGE_python3-incremental:python3-light
   VARIANT:=python3
 endef
diff --git a/lang/python/python-influxdb/Makefile b/lang/python/python-influxdb/Makefile
new file mode 100644 (file)
index 0000000..221db92
--- /dev/null
@@ -0,0 +1,37 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-influxdb
+PKG_VERSION:=5.2.2
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/influxdb/
+PKG_SOURCE:=influxdb-$(PKG_VERSION).tar.gz
+PKG_HASH:=afeff28953a91b4ea1aebf9b5b8258a4488d0e49e2471db15ea43fd2c8533143
+PKG_LICENSE:=MIT
+PKG_BUILD_DIR:=$(BUILD_DIR)/influxdb-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-influxdb
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=https://github.com/influxdb/influxdb-python
+  TITLE:=python3-influxdb
+  DEPENDS:=+python3-requests +python3-pytz +python3-six +python3-dateutil
+  VARIANT:=python3
+endef
+
+define Package/python3-influxdb/description
+  Python client for InfluxDB
+endef
+
+$(eval $(call Py3Package,python3-influxdb))
+$(eval $(call BuildPackage,python3-influxdb))
+$(eval $(call BuildPackage,python3-influxdb-src))
index 333ea3ee32759db35bbdf9956ded99581e585d59..ad9d9ce103d8351f89f5d2ab6aceccbc079216fe 100644 (file)
@@ -29,12 +29,12 @@ define Package/python-ipaddress/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Python 3.3+'s ipaddress
   URL:=https://github.com/phihag/ipaddress
 endef
 
 define Package/python-ipaddress
 $(call Package/python-ipaddress/Default)
-  TITLE:=Python 3.3+'s ipaddress
   DEPENDS:=+PACKAGE_python-ipaddress:python-light
   VARIANT:=python
 endef
diff --git a/lang/python/python-jsonpath-ng/Makefile b/lang/python/python-jsonpath-ng/Makefile
new file mode 100644 (file)
index 0000000..468fce3
--- /dev/null
@@ -0,0 +1,32 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-jsonpath-ng
+PKG_VERSION:=1.4.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/j/jsonpath-ng/
+PKG_SOURCE:=jsonpath-ng-$(PKG_VERSION).tar.gz
+PKG_HASH:=b1fc75b877e9b2f46845a455fbdcfb0f0d9c727c45c19a745d02db620a9ef0be
+PKG_BUILD_DIR:=$(BUILD_DIR)/jsonpath-ng-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-jsonpath-ng
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=https://github.com/h2non/jsonpath-ng
+  TITLE:=python3-jsonpath-ng
+  DEPENDS:=+python3-ply +python3-six +python3-decorator
+  VARIANT:=python3
+endef
+
+$(eval $(call Py3Package,python3-jsonpath-ng))
+$(eval $(call BuildPackage,python3-jsonpath-ng))
+$(eval $(call BuildPackage,python3-jsonpath-ng-src))
index 3acaecff6fcc6ee418ea9cbedd558131bafb30d0..1d8b54c7ec326eba75d066c5361286ebf334f43b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-lxml
-PKG_VERSION:=4.3.0
+PKG_VERSION:=4.3.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=lxml-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/l/lxml
-PKG_HASH:=d1e111b3ab98613115a208c1017f266478b0ab224a67bc8eac670fa0bad7d488
+PKG_HASH:=da5e7e941d6e71c9c9a717c93725cda0708c2474f532e3680ac5e39ec57d224d
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-lxml-$(PKG_VERSION)
 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
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 699f00dce808fbc6f0f3bb2dcaacb93d7b7f721a..7b413d90c2f128890823c97755fd322ba7948cae 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-oauthlib
-PKG_VERSION:=2.1.0
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/oauthlib
-PKG_HASH:=ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162
+PKG_HASH:=0ce32c5d989a1827e3f1148f98b9085ed2370fc939bf524c9c851d8714797298
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-oauthlib-$(PKG_VERSION)
 PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
index e5f6ec89389f23cb38993e4cec3182b98ac5380e..2ca2abc16e13e77daf5b9848d2e493084a90d688 100644 (file)
@@ -40,6 +40,13 @@ process_filespec() {
        )
 }
 
+delete_empty_dirs() {
+       local dst_dir="$1"
+       if [ -d "$dst_dir/usr" ] ; then
+               find "$dst_dir/usr" -empty -type d -delete
+       fi
+}
+
 ver="$1"
 src_dir="$2"
 dst_dir="$3"
@@ -47,25 +54,33 @@ python="$4"
 mode="$5"
 filespec="$6"
 
+SED="${SED:-sed -e}"
+
+find "$src_dir" -name "*.exe" -delete
+
 process_filespec "$src_dir" "$dst_dir" "$filespec" || {
        echo "process filespec error-ed"
        exit 1
 }
 
+usr_bin_dir="$dst_dir/usr/bin"
+
+if [ -d "$usr_bin_dir" ] ; then
+       $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" | xargs rm -f
+       find "$dst_dir" -not -type d -not -name "*.py" -delete
 
-       # Delete empty folders (if the case)
-       if [ -d "$dst_dir/usr" ] ; then
-               find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
-               rmdir --ignore-fail-on-non-empty $dst_dir/usr
-       fi
+       delete_empty_dirs "$dst_dir"
        exit 0
 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.
@@ -73,19 +88,15 @@ 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" | xargs rm -f
+find "$dst_dir" -type f -name "*.py" -delete
 
-# Delete empty folders (if the case)
-if [ -d "$dst_dir/usr" ] ; then
-       find $dst_dir/usr -type d | xargs rmdir --ignore-fail-on-non-empty
-       rmdir --ignore-fail-on-non-empty $dst_dir/usr
-fi
+delete_empty_dirs "$dst_dir"
 
 exit 0
index 66a49298370efe3b4825528dbb34b41b08c9df6e..c594f614ed34c240fe027f1da4e91eff2fe5d07c 100644 (file)
@@ -68,8 +68,8 @@ define PyPackage
   $(call shexport,PyPackage/$(1)/filespec)
 
   define Package/$(1)/install
-       $(call PyPackage/$(1)/install,$$(1))
-       find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+       $$(call PyPackage/$(1)/install,$$(1))
+       SED="$(SED)" \
        $(SHELL) $(python_mk_path)python-package-install.sh "2" \
                "$(PKG_INSTALL_DIR)" "$$(1)" \
                "$(HOST_PYTHON_BIN)" "$$(2)" \
@@ -113,17 +113,20 @@ define Build/Compile/PyMod
                cd $(PKG_BUILD_DIR)/$(strip $(1)), \
                ./setup.py $(2), \
                $(3))
-       find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
 endef
 
-PYTHON_PKG_SETUP_ARGS:=--single-version-externally-managed
-PYTHON_PKG_SETUP_VARS:=
+PYTHON_PKG_SETUP_DIR ?=
+PYTHON_PKG_SETUP_GLOBAL_ARGS ?=
+PYTHON_PKG_SETUP_ARGS ?= --single-version-externally-managed
+PYTHON_PKG_SETUP_VARS ?=
 
 define PyBuild/Compile/Default
        $(foreach pkg,$(HOST_PYTHON_PACKAGE_BUILD_DEPENDS),
                $(call host_python_pip_install_host,$(pkg))
        )
-       $(call Build/Compile/PyMod,, \
+       $(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-paho-mqtt/Makefile b/lang/python/python-paho-mqtt/Makefile
new file mode 100644 (file)
index 0000000..1988f9b
--- /dev/null
@@ -0,0 +1,37 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-paho-mqtt
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=1
+PKG_LICENSE:=Eclipse Public License v1.0 / Eclipse Distribution License v1.0
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
+
+PKG_SOURCE:=paho-mqtt-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904
+PKG_HASH:=e440a052b46d222e184be3be38676378722072fcd4dfd2c8f509fb861a7b0b79
+PKG_BUILD_DIR:=$(BUILD_DIR)/paho-mqtt-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-paho-mqtt
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=python3-paho-mqtt
+  URL:=http://eclipse.org/paho
+  DEPENDS:=+python3-light
+  VARIANT:=python3
+endef
+
+define Package/python3-paho-mqtt/description
+  MQTT version 3.1/3.1.1 client class
+endef
+
+$(eval $(call Py3Package,python3-paho-mqtt))
+$(eval $(call BuildPackage,python3-paho-mqtt))
+$(eval $(call BuildPackage,python3-paho-mqtt-src))
index 53b50954c31172e5b0c8ff866b3e95d11f397358..83df113856ef8020138702fbe0ba26b905aeed73 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-parsley
 PKG_VERSION:=1.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=Parsley-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Parsley
 PKG_HASH:=9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-parsley-$(PKG_VERSION)
@@ -27,23 +27,25 @@ include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_ARGS:=
+
 define Package/python-parsley/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Parsing and pattern matching
   URL:=http://launchpad.net/parsley
 endef
 
 define Package/python-parsley
 $(call Package/python-parsley/Default)
-  TITLE:=python-parsley
   DEPENDS:=+PACKAGE_python-parsley:python-light
   VARIANT:=python
 endef
 
 define Package/python3-parsley
 $(call Package/python-parsley/Default)
-  TITLE:=python3-parsley
   DEPENDS:=+PACKAGE_python3-parsley:python3-light
   VARIANT:=python3
 endef
@@ -58,14 +60,6 @@ $(call Package/python-parsley/description)
 (Variant for Python3)
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
-define Py3Build/Compile
-       $(call Build/Compile/Py3Mod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
 $(eval $(call PyPackage,python-parsley))
 $(eval $(call BuildPackage,python-parsley))
 $(eval $(call BuildPackage,python-parsley-src))
index 5ac02e9bb45ef4b3a3443b7eb592b2330c7d87a6..24c2f7c1f0defa1779d9678a547037d4136821eb 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pcapy
 PKG_VERSION:=0.11.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=pcapy-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pcapy
@@ -19,6 +19,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/pcapy-$(PKG_VERSION)
 PKG_MAINTAINER:=Andrew McConachie <andrew@depht.com>
 PKG_LICENSE:=Apache-1.1
 
+include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
 
@@ -28,7 +29,7 @@ define Package/python-pcapy
        SUBMENU:=Python
        TITLE:=python-pcapy
        URL:=https://www.coresecurity.com/corelabs-research/open-source-tools/pcapy
-       DEPENDS:=+python +libpcap +libstdcpp
+       DEPENDS:=+python +libpcap $(CXX_DEPENDS)
 endef
 
 define Package/python-pcapy/description
diff --git a/lang/python/python-pcapy/patches/010-libcxx.patch b/lang/python/python-pcapy/patches/010-libcxx.patch
new file mode 100644 (file)
index 0000000..d27dbdd
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index 4da69bc..165059b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -28,7 +28,7 @@ if sys.platform == 'win32':
+             library_dirs.append(r'c:\wpdpack\Lib')
+     libraries = ['wpcap', 'packet', 'ws2_32']
+ else:
+-    libraries = ['pcap', 'stdc++']
++    libraries = ['pcap']
+ # end of user configurable parameters
index 85aa740a305e654af1dee303a01a750b7633fd13..aacaf15d5d0aa8ab655b070d2a702aaf2a408012 100644 (file)
@@ -32,20 +32,19 @@ define Package/python-ply/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=lex and yacc for Python
   URL:=http://www.dabeaz.com/ply/
 endef
 
 define Package/python-ply
 $(call Package/python-ply/Default)
-  TITLE:=lex and yacc for Python
   DEPENDS:=+PACKAGE_python-ply:python-light
   VARIANT:=python
 endef
 
 define Package/python3-ply
 $(call Package/python-ply/Default)
-  TITLE:=lex and yacc for Python
-  DEPENDS:=+PACKAGE_python3-ply:python3-light
+  DEPENDS:=+python3-light
   VARIANT:=python3
 endef
 
index 8ee4e1d3aeecb5ebf48434cda3a225452b3ad7ed..300c7b8b92671d2d47b7807f6bd925b18daed478 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyasn1-modules
-PKG_VERSION:=0.2.3
-PKG_RELEASE:=1
+PKG_VERSION:=0.2.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=pyasn1-modules-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyasn1-modules
-PKG_HASH:=d14fcb29dabecba3d7b360bf72327c26c385248a5d603cf6be5f566ce999b261
+PKG_HASH:=a52090e8c5841ebbf08ae455146792d9ef3e8445b21055d3a3b7ed9c712b7c7c
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
@@ -31,25 +31,24 @@ define Package/python-pyasn1-modules/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=http://sourceforge.net/projects/pyasn1/
+  TITLE:=Collection of ASN.1 modules
+  URL:=https://github.com/etingof/pyasn1-modules
 endef
 
 define Package/python-pyasn1-modules
 $(call Package/python-pyasn1-modules/Default)
-  TITLE:=python-pyasn1-modules
-  VARIANT:=python
   DEPENDS:= \
       +PACKAGE_python-pyasn1-modules:python-light \
       +PACKAGE_python-pyasn1-modules:python-pyasn1
+  VARIANT:=python
 endef
 
 define Package/python3-pyasn1-modules
 $(call Package/python-pyasn1-modules/Default)
-  TITLE:=python3-pyasn1-modules
-  VARIANT:=python3
   DEPENDS:= \
       +PACKAGE_python3-pyasn1-modules:python3-light \
       +PACKAGE_python3-pyasn1-modules:python3-pyasn1
+  VARIANT:=python3
 endef
 
 define Package/python-pyasn1-modules/description
index ced124fe95ee94b955d0b044013cd562bc5692cc..4a7c5451c176709ae0a1a866580e9e700bc8bfdc 100644 (file)
@@ -31,19 +31,18 @@ define Package/python-pyasn1/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=ASN.1 library for Python
   URL:=https://github.com/etingof/pyasn1
 endef
 
 define Package/python-pyasn1
 $(call Package/python-pyasn1/Default)
-  TITLE:=ASN.1 library for Python
   DEPENDS:=+PACKAGE_python-pyasn1:python-light
   VARIANT:=python
 endef
 
 define Package/python3-pyasn1
 $(call Package/python-pyasn1/Default)
-  TITLE:=ASN.1 library for Python
   DEPENDS:=+PACKAGE_python3-pyasn1:python3-light
   VARIANT:=python3
 endef
index 61fb1a9634ed9113810f1c63728fa23170eac665..77932a04c6ff22a572c63b1aac3f084b6771dc4c 100644 (file)
@@ -9,11 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pycparser
 PKG_VERSION:=2.19
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=pycparser-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pycparser
 PKG_HASH:=a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pycparser-$(PKG_VERSION)
 
 PKG_LICENSE:=BSD-3-Clause
@@ -33,20 +34,23 @@ define Package/python-pycparser/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=C parser in Python
   URL:=https://github.com/eliben/pycparser
 endef
 
 define Package/python-pycparser
 $(call Package/python-pycparser/Default)
-  TITLE:=python-pycparser
-  DEPENDS:=+PACKAGE_python-pycparser:python-light +PACKAGE_python-pycparser:python-ply
+  DEPENDS:= \
+      +PACKAGE_python-pycparser:python-light \
+      +PACKAGE_python-pycparser:python-ply
   VARIANT:=python
 endef
 
 define Package/python3-pycparser
 $(call Package/python-pycparser/Default)
-  TITLE:=python3-pycparser
-  DEPENDS:=+PACKAGE_python3-pycparser:python3-light +PACKAGE_python3-pycparser:python3-ply
+  DEPENDS:= \
+      +PACKAGE_python3-pycparser:python3-light \
+      +PACKAGE_python3-pycparser:python3-ply
   VARIANT:=python3
 endef
 
index 9beefbae36ccbaf79bc5736933b96b491292dba1..fcd1f2f40726bb3744ad5d84f2a04d363cae826e 100644 (file)
@@ -8,13 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyopenssl
-PKG_VERSION:=18.0.0
-PKG_RELEASE:=1
+PKG_VERSION:=19.0.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=pyOpenSSL-$(PKG_VERSION).tar.gz
-
-PKG_SOURCE_URL:=https://pypi.io/packages/source/p/pyOpenSSL
-PKG_HASH:=6488f1423b00f73b7ad5167885312bb0ce410d3312eb212393795b53c8caa580
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyOpenSSL
+PKG_HASH:=aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
@@ -32,27 +31,26 @@ define Package/python-pyopenssl/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=https://github.com/pyca/pyopenssl
+  TITLE:=OpenSSL wrapper
+  URL:=https://pyopenssl.org/
 endef
 
 define Package/python-pyopenssl
 $(call Package/python-pyopenssl/Default)
-  TITLE:=python-pyopenssl
-  VARIANT:=python
   DEPENDS:= \
       +PACKAGE_python-pyopenssl:python-light \
       +PACKAGE_python-pyopenssl:python-cryptography \
       +PACKAGE_python-pyopenssl:python-six
+  VARIANT:=python
 endef
 
 define Package/python3-pyopenssl
 $(call Package/python-pyopenssl/Default)
-  TITLE:=python3-pyopenssl
-  VARIANT:=python3
   DEPENDS:= \
       +PACKAGE_python3-pyopenssl:python3-light \
       +PACKAGE_python3-pyopenssl:python3-cryptography \
       +PACKAGE_python3-pyopenssl:python3-six
+  VARIANT:=python3
 endef
 
 define Package/python-pyopenssl/description
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 b003976a567935d6e9d2fc5ddb408556240da0e2..d2e7f574a4c719977ac6303063b2875c52e856c9 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyptlib
 PKG_VERSION:=0.0.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=pyptlib-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyptlib
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pyptlib
 PKG_HASH:=b98472e3d9e8f4689d3913ca8f89afa5e6cc5383dcd8686987606166f9dac607
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pyptlib-$(PKG_VERSION)
@@ -30,12 +30,12 @@ define Package/python-pyptlib/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=https://pypi.python.org/pypi/pyptlib
+  TITLE:=Pluggable Transports for Tor
+  URL:=https://pypi.org/project/pyptlib/
 endef
 
 define Package/python-pyptlib
 $(call Package/python-pyptlib/Default)
-  TITLE:=python-pyptlib
   DEPENDS:=+PACKAGE_python-pyptlib:python-light
   VARIANT:=python
 endef
diff --git a/lang/python/python-pytz/Makefile b/lang/python/python-pytz/Makefile
new file mode 100644 (file)
index 0000000..069f75b
--- /dev/null
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2007-2019 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pytz
+PKG_VERSION:=2018.9
+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_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-pytz-$(PKG_VERSION)
+
+HOST_BUILD_DEPENDS:=python/host
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-pytz/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+  URL:=https://sourceforge.net/projects/pytz/
+endef
+
+define Package/python-pytz
+$(call Package/python-pytz/Default)
+  TITLE:=World timezone definitions, modern and historical
+  DEPENDS:=+PACKAGE_python-pytz:python-light
+  VARIANT:=python
+endef
+
+define Package/python3-pytz
+$(call Package/python-pytz/Default)
+  TITLE:=World timezone definitions, modern and historical for Python3
+  DEPENDS:=+PACKAGE_python3-pytz:python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-pytz/description
+  World timezone definitions, modern and historical
+endef
+
+define Package/python3-pytz/description
+$(call Package/python-pytz/description)
+.
+(Variant for Python3)
+endef
+
+define Host/Compile
+       $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
+endef
+
+Host/Install:=
+
+$(eval $(call HostBuild))
+
+$(eval $(call PyPackage,python-pytz))
+$(eval $(call BuildPackage,python-pytz))
+$(eval $(call BuildPackage,python-pytz-src))
+
+$(eval $(call Py3Package,python3-pytz))
+$(eval $(call BuildPackage,python3-pytz))
+$(eval $(call BuildPackage,python3-pytz-src))
index cb026a702d54124539c9be0b1cd9c5cb3c7f0cae..a39febfb0669767b5c0cfecfe81e6c1a9f823998 100644 (file)
@@ -8,14 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-qrcode
-PKG_VERSION:=6.0
+PKG_VERSION:=6.1
 PKG_RELEASE:=1
 PKG_LICENSE:=BSD-3-Clause
 
 PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/8d/b6/beed3d50e1047a2aa6437d3a653e5f31feb7f4de8bc054299dc205682e41
-PKG_HASH:=037b0db4c93f44586e37f84c3da3f763874fcac85b2974a69a98e399ac78e1bf
-PKG_BUILD_DIR:=$(BUILD_DIR)/qrcode-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/q/qrcode/
+PKG_HASH:=505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-oauthlib-$(PKG_VERSION)
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
@@ -27,22 +28,14 @@ define Package/python-qrcode
   MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
   TITLE:=QR Code image generator
   URL:=https://github.com/lincolnloop/python-qrcode
-  DEPENDS:=+python +python-six
+  DEPENDS:=+python +python-six +python-setuptools +pillow
+  VARIANT:=python
 endef
 
 define Package/python-qrcode/description
   Pure python QR Code generator
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/python-qrcode/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
+$(eval $(call PyPackage,python-qrcode))
 $(eval $(call BuildPackage,python-qrcode))
+$(eval $(call BuildPackage,python-qrcode-src))
index 17b5fd30c0f1f4162b84b4316d9f5a75715102f4..f4d34c9fd2e6795989a0e5fa1c492725237cb7f9 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-requests-oauthlib
-PKG_VERSION:=1.0.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=1
 PKG_LICENSE:=ISC
 
 PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests-oauthlib
-PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f
+PKG_HASH:=bd6533330e8748e94bf0b214775fed487d309b8b8fe823dc45641ebcd9a32f57
 PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
index cc2648761e8181b83fc551934f15c13c2693d075..36b7302d60c6638ac38db27158fdd36f3b61643c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2016 OpenWrt.org
+# Copyright (C) 2007-2019 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,34 +9,68 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-requests
 PKG_VERSION:=2.21.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Apache-2.0
 
 PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests
 PKG_HASH:=502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e
-PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION)
 
 PKG_CPE_ID:=cpe:/a:python-requests:requests
 
 include $(INCLUDE_DIR)/package.mk
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/python-requests
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-requests/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
-  TITLE:=HTTP library for Python
+  MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com>
   URL:=http://python-requests.org/
-  DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi
+endef
+
+define Package/python-requests
+$(call Package/python-requests/Default)
+  TITLE:=HTTP library for Python
+  DEPENDS:= \
+         +PACKAGE_python-requests:python \
+         +PACKAGE_python-requests:python-chardet \
+         +PACKAGE_python-requests:python-idna \
+         +PACKAGE_python-requests:python-urllib3 \
+         +PACKAGE_python-requests:python-certifi
   VARIANT:=python
 endef
 
+define Package/python3-requests
+$(call Package/python-requests/Default)
+  TITLE:=HTTP library for Python3
+  DEPENDS:= \
+         +python3-light  \
+         +python3-chardet  \
+         +python3-idna  \
+         +python3-urllib3  \
+         +python3-certifi
+  VARIANT:=python3
+endef
+
 define Package/python-requests/description
   Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
 endef
 
+define Package/python3-requests/description
+$(call Package/python-requests/description)
+.
+(Variant for Python3)
+endef
+
 $(eval $(call PyPackage,python-requests))
 $(eval $(call BuildPackage,python-requests))
 $(eval $(call BuildPackage,python-requests-src))
+
+$(eval $(call Py3Package,python3-requests))
+$(eval $(call BuildPackage,python3-requests))
+$(eval $(call BuildPackage,python3-requests-src))
diff --git a/lang/python/python-schema/Makefile b/lang/python/python-schema/Makefile
new file mode 100644 (file)
index 0000000..65ba4fd
--- /dev/null
@@ -0,0 +1,36 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-schema
+PKG_VERSION:=0.7.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+
+PKG_SOURCE_URL:=https://codeload.github.com/keleshev/schema/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=6c6da2154c0f63025127a1ecb3b2f07b95ec8dd029663fc74ab2e972bf770c72
+PKG_BUILD_DIR:=$(BUILD_DIR)/schema-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-schema
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=https://github.com/keleshev/schema
+  TITLE:=python3-schema
+  DEPENDS:=+python3-light +python3-contextlib2
+  VARIANT:=python3
+endef
+
+define Package/python3-schema/description
+  Schema validation just got Pythonic
+endef
+
+$(eval $(call Py3Package,python3-schema))
+$(eval $(call BuildPackage,python3-schema))
+$(eval $(call BuildPackage,python3-schema-src))
index f81ff1ab6c10a06778245997c853a171d552ca23..4015827c119089612b5216bd9df083641473ec4f 100644 (file)
@@ -14,6 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE:=service_identity-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/service_identity
 PKG_HASH:=0858a54aabc5b459d1aafa8a518ed2081a285087f349fe3e55197989232e2e2d
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-service-identity-$(PKG_VERSION)
 
 PKG_LICENSE:=MIT
@@ -30,12 +31,12 @@ define Package/python-service-identity/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
-  URL:=https://github.com/pyca/service_identity
+  TITLE:=Service identity verification
+  URL:=https://service-identity.readthedocs.io/
 endef
 
 define Package/python-service-identity
 $(call Package/python-service-identity/Default)
-  TITLE:=python-service-identity
   DEPENDS:= \
       +PACKAGE_python-service-identity:python-light \
       +PACKAGE_python-service-identity:python-attrs \
@@ -48,7 +49,6 @@ endef
 
 define Package/python3-service-identity
 $(call Package/python-service-identity/Default)
-  TITLE:=python3-service-identity
   DEPENDS:= \
       +PACKAGE_python3-service-identity:python3-light \
       +PACKAGE_python3-service-identity:python3-attrs \
diff --git a/lang/python/python-simplejson/Makefile b/lang/python/python-simplejson/Makefile
new file mode 100644 (file)
index 0000000..11a66a1
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2007-2017 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-simplejson
+PKG_VERSION:=3.16.0
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=simplejson-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
+PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-simplejson-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-simplejson/Default
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+  URL:=https://simplejson.readthedocs.org/
+endef
+
+define Package/python-simplejson
+$(call Package/python-simplejson/Default)
+  TITLE:=Simple, fast, extensible JSON encoder/decoder for Python 2
+  DEPENDS:=+python-light
+  VARIANT:=python
+endef
+
+define Package/python3-simplejson
+$(call Package/python-simplejson/Default)
+  TITLE:=Simple, fast, extensible JSON encoder/decoder for Python3
+  DEPENDS:=+PACKAGE_python3-simplejson:python3-light
+  VARIANT:=python3
+endef
+
+define Package/python-simplejson/description
+  Simple, fast, extensible JSON encoder/decoder for Python
+endef
+
+define Package/python3-simplejson/description
+$(call Package/python-simplejson/description)
+.
+(Variant for Python3)
+endef
+
+$(eval $(call PyPackage,python-simplejson))
+$(eval $(call BuildPackage,python-simplejson))
+$(eval $(call BuildPackage,python-simplejson-src))
+
+$(eval $(call Py3Package,python3-simplejson))
+$(eval $(call BuildPackage,python3-simplejson))
+$(eval $(call BuildPackage,python3-simplejson-src))
index 033329137fe9bb6b4dc530725bea937710f5138d..354f720959f3a5495267d280f809928dc7583741 100644 (file)
@@ -9,16 +9,17 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-six
 PKG_VERSION:=1.12.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=six-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/six
 PKG_HASH:=d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-six-$(PKG_VERSION)
 
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
 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
 
@@ -34,19 +35,18 @@ define Package/python-six/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Python 2 and 3 compatibility library
   URL:=https://github.com/benjaminp/six
 endef
 
 define Package/python-six
 $(call Package/python-six/Default)
-  TITLE:=python-six
   DEPENDS:=+PACKAGE_python-six:python-light
   VARIANT:=python
 endef
 
 define Package/python3-six
 $(call Package/python-six/Default)
-  TITLE:=python3-six
   DEPENDS:=+PACKAGE_python3-six:python3-light
   VARIANT:=python3
 endef
diff --git a/lang/python/python-slugify/Makefile b/lang/python/python-slugify/Makefile
new file mode 100644 (file)
index 0000000..c7442e2
--- /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:=python-slugify
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=python-slugify-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/python-slugify/
+PKG_HASH:=492b27e5a12495340e50652ab4eab3a229ef7167c44b66b3a2861450e68b269a
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-slugify
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Slugify application that handles Unicode
+  URL:=https://github.com/un33k/python-slugify
+  DEPENDS+= \
+      +python3-light \
+      +python3-text-unidecode
+  VARIANT:=python3
+endef
+
+define Package/python3-slugify/description
+A Python slugify application that handles unicode.
+endef
+
+$(eval $(call Py3Package,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify))
+$(eval $(call BuildPackage,python3-slugify-src))
diff --git a/lang/python/python-twisted/Makefile b/lang/python/python-twisted/Makefile
new file mode 100644 (file)
index 0000000..7f50c52
--- /dev/null
@@ -0,0 +1,103 @@
+#
+# Copyright (C) 2006-2011, 2015-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-twisted
+PKG_VERSION:=18.9.0
+PKG_RELEASE:=4
+
+PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/T/Twisted
+PKG_HASH:=294be2c6bf84ae776df2fc98e7af7d6537e1c5e60a46d33c3ce2a197677da395
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libtirpc
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+include ../python-package.mk
+include ../python3-package.mk
+
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xjf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-twisted/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=Asynchronous networking framework
+  URL:=https://twistedmatrix.com/
+endef
+
+define Package/python-twisted
+$(call Package/python-twisted/Default)
+  DEPENDS:= \
+      +PACKAGE_python-twisted:python-light \
+      +PACKAGE_python-twisted:python-attrs \
+      +PACKAGE_python-twisted:python-automat \
+      +PACKAGE_python-twisted:python-constantly \
+      +PACKAGE_python-twisted:python-incremental \
+      +PACKAGE_python-twisted:python-hyperlink \
+      +PACKAGE_python-twisted:python-setuptools \
+      +PACKAGE_python-twisted:python-zope-interface
+  VARIANT:=python
+endef
+
+define Package/python3-twisted
+$(call Package/python-twisted/Default)
+  DEPENDS:= \
+      +PACKAGE_python3-twisted:python3-light \
+      +PACKAGE_python3-twisted:python3-attrs \
+      +PACKAGE_python3-twisted:python3-automat \
+      +PACKAGE_python3-twisted:python3-constantly \
+      +PACKAGE_python3-twisted:python3-incremental \
+      +PACKAGE_python3-twisted:python3-hyperlink \
+      +PACKAGE_python3-twisted:python3-setuptools \
+      +PACKAGE_python3-twisted:python3-zope-interface
+  VARIANT:=python3
+endef
+
+define Package/python-twisted/description
+Twisted is a networking engine written in Python, supporting numerous
+protocols. It contains a web server, numerous chat clients, chat servers,
+mail servers, and more.
+endef
+
+define Package/python3-twisted/description
+$(call Package/python-twisted/description)
+.
+(Variant for Python3)
+endef
+
+define PyPackage/python-twisted/filespec
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
+endef
+
+define Py3Package/python3-twisted/filespec
++|$(PYTHON3_PKG_DIR)
+-|$(PYTHON3_PKG_DIR)/twisted/conch/scripts/tkconch.py
+endef
+
+define Py3Package/python3-twisted/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       for bin in $(1)/usr/bin/*; do \
+               mv $$$$bin $$$${bin}3 ; \
+       done
+endef
+
+$(eval $(call PyPackage,python-twisted))
+$(eval $(call BuildPackage,python-twisted))
+$(eval $(call BuildPackage,python-twisted-src))
+
+$(eval $(call Py3Package,python3-twisted))
+$(eval $(call BuildPackage,python3-twisted))
+$(eval $(call BuildPackage,python3-twisted-src))
diff --git a/lang/python/python-twisted/patches/001-omit-tkconch.patch b/lang/python/python-twisted/patches/001-omit-tkconch.patch
new file mode 100644 (file)
index 0000000..1ec4baf
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/src/twisted/python/_setup.py
++++ b/src/twisted/python/_setup.py
+@@ -144,7 +144,6 @@ _CONSOLE_SCRIPTS = [
+     "conch = twisted.conch.scripts.conch:run",
+     "mailmail = twisted.mail.scripts.mailmail:run",
+     "pyhtmlizer = twisted.scripts.htmlizer:run",
+-    "tkconch = twisted.conch.scripts.tkconch:run",
+     "trial = twisted.scripts.trial:run",
+     "twist = twisted.application.twist._twist:Twist.main",
+     "twistd = twisted.scripts.twistd:run",
+--- a/src/twisted/python/twisted-completion.zsh
++++ b/src/twisted/python/twisted-completion.zsh
+@@ -1,4 +1,4 @@
+-#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconch
++#compdef twist twistd trial conch cftp ckeygen pyhtmlizer
+ #
+ # This is the ZSH completion file for Twisted commands. It calls the current
+ # command-line with the special "--_shell-completion" option which is handled
diff --git a/lang/python/python-twisted/patches/002-omit-tests.patch b/lang/python/python-twisted/patches/002-omit-tests.patch
new file mode 100644 (file)
index 0000000..33ba77a
--- /dev/null
@@ -0,0 +1,37 @@
+--- a/src/twisted/python/_setup.py
++++ b/src/twisted/python/_setup.py
+@@ -169,11 +169,6 @@ class ConditionalExtension(Extension, object):
+ # The C extensions used for Twisted.
+ _EXTENSIONS = [
+-    ConditionalExtension(
+-        "twisted.test.raiser",
+-        sources=["src/twisted/test/raiser.c"],
+-        condition=lambda _: _isCPython),
+-
+     ConditionalExtension(
+         "twisted.internet.iocpreactor.iocpsupport",
+         sources=[
+@@ -238,12 +233,11 @@ def getSetupArgs(extensions=_EXTENSIONS):
+         "incremental >= 16.10.1",
+         "Automat >= 0.3.0",
+         "hyperlink >= 17.1.1",
+-        "PyHamcrest >= 1.9.0",
+         "attrs >= 17.4.0",
+     ]
+     arguments.update(dict(
+-        packages=find_packages("src"),
++        packages=find_packages("src", exclude=["*.test", "*.test.*"]),
+         use_incremental=True,
+         setup_requires=["incremental >= 16.10.1"],
+         install_requires=requirements,
+@@ -253,7 +247,7 @@ def getSetupArgs(extensions=_EXTENSIONS):
+         cmdclass=command_classes,
+         include_package_data=True,
+         exclude_package_data={
+-            "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat"],
++            "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat", "test/*"],
+         },
+         zip_safe=False,
+         extras_require=_EXTRAS_REQUIRE,
index e8a7605b114d607a8ec12092e23b4cfad1a99154..2bc606ea2223cff851ba92f104b58aa6b9f7273a 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-txsocksx
 PKG_VERSION:=1.15.0.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
 
 PKG_SOURCE:=txsocksx-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/t/txsocksx
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/t/txsocksx
 PKG_HASH:=4f79b5225ce29709bfcee45e6f726e65b70fd6f1399d1898e54303dbd6f8065f
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-txsocksx-$(PKG_VERSION)
@@ -26,20 +26,23 @@ include ../python-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
+PYTHON_PKG_SETUP_VARS:= \
+  PKG_VERSION="$(PKG_VERSION)"
+
 define Package/python-txsocksx/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=SOCKS client endpoints for Twisted
   URL:=https://github.com/habnabit/txsocksx
 endef
 
 define Package/python-txsocksx
 $(call Package/python-txsocksx/Default)
-  TITLE:=python-txsocksx
   DEPENDS:= \
       +PACKAGE_python-txsocksx:python-light \
       +PACKAGE_python-txsocksx:python-parsley \
-      +PACKAGE_python-txsocksx:twisted
+      +PACKAGE_python-txsocksx:python-twisted
   VARIANT:=python
 endef
 
@@ -48,13 +51,6 @@ txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or
 greater.
 endef
 
-define PyBuild/Compile
-       $(call Build/Compile/PyMod,, \
-               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
-               PKG_VERSION="$(PKG_VERSION)" \
-       )
-endef
-
 $(eval $(call PyPackage,python-txsocksx))
 $(eval $(call BuildPackage,python-txsocksx))
 $(eval $(call BuildPackage,python-txsocksx-src))
index 0978c927168dcc4a137cce6a349875c25e20c97b..40b147c9532f55e4878bb5275d12c6c7929fd426 100644 (file)
@@ -9,40 +9,54 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-urllib3
 PKG_VERSION:=1.24.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=MIT
 
 PKG_SOURCE:=urllib3-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/u/urllib3
 PKG_HASH:=de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22
-PKG_BUILD_DIR:=$(BUILD_DIR)/urllib3-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-urllib3-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
+
 include ../python-package.mk
+include ../python3-package.mk
 
-define Package/python-urllib3
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
+define Package/python-urllib3/Default
   SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
   TITLE:=HTTP library with thread-safe connection pooling, file post, and more.
   URL:=https://urllib3.readthedocs.io/
-  DEPENDS:=+python
+endef
+
+define Package/python-urllib3
+$(call Package/python-urllib3/Default)
+  DEPENDS:=+PACKAGE_python-urllib3:python
+  VARIANT:=python
 endef
 
 define Package/python-urllib3/description
   HTTP library with thread-safe connection pooling, file post, and more.
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
+define Package/python3-urllib3
+$(call Package/python-urllib3/Default)
+  DEPENDS:=+PACKAGE_python3-urllib3:python3
+  VARIANT:=python3
 endef
 
-define Package/python-urllib3/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
+define Package/python3-urllib3/description
+$(call Package/python-urllib3/description)
+.
+(Variant for Python3)
 endef
 
+$(eval $(call PyPackage,python-urllib3))
 $(eval $(call BuildPackage,python-urllib3))
+$(eval $(call BuildPackage,python-urllib3-src))
+$(eval $(call Py3Package,python3-urllib3))
+$(eval $(call BuildPackage,python3-urllib3))
+$(eval $(call BuildPackage,python3-urllib3-src))
index b04f763f2e2d0f3ab742a0b6804502c3a2558fc0..cba9255f4b0ce8326955dc2c7d4cfd1ce0ae6086 100644 (file)
@@ -6,10 +6,10 @@
 #
 
 PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=15
+PYTHON_VERSION_MICRO:=16
 
-PYTHON_SETUPTOOLS_PKG_RELEASE:=2
-PYTHON_PIP_PKG_RELEASE:=2
+PYTHON_SETUPTOOLS_PKG_RELEASE:=1
+PYTHON_PIP_PKG_RELEASE:=1
 
-PYTHON_SETUPTOOLS_VERSION:=39.0.1
-PYTHON_PIP_VERSION:=9.0.3
+PYTHON_SETUPTOOLS_VERSION:=40.6.2
+PYTHON_PIP_VERSION:=18.1
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))
index 3dac3018632ab61b201b7ff0d7460f8a4e22867f..6912398f44a812cca1e87ceef0246e4b12783c5a 100644 (file)
@@ -31,19 +31,18 @@ define Package/python-zope-interface/Default
   SECTION:=lang
   CATEGORY:=Languages
   SUBMENU:=Python
+  TITLE:=Interfaces for Python
   URL:=https://github.com/zopefoundation/zope.interface
 endef
 
 define Package/python-zope-interface
 $(call Package/python-zope-interface/Default)
-  TITLE:=Interfaces for Python
   DEPENDS:=+PACKAGE_python-zope-interface:python-light
   VARIANT:=python
 endef
 
 define Package/python3-zope-interface
 $(call Package/python-zope-interface/Default)
-  TITLE:=Interfaces for Python
   DEPENDS:=+PACKAGE_python3-zope-interface:python3-light
   VARIANT:=python3
 endef
index a065edaa0d322b117b624687d4d68af1737934cf..6eec6bd362ae850dc7ad640198682766d4da9397 100644 (file)
@@ -16,10 +16,13 @@ PKG_RELEASE:=4
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_HASH:=22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574
+PKG_HASH:=f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7
 
 PKG_LICENSE:=PSF
 PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+PKG_CPE_ID:=cpe:/a:python:python
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 
 # This file provides the necsessary host build variables
 include ../python-host.mk
@@ -51,7 +54,6 @@ define Package/python/Default
   CATEGORY:=Languages
   TITLE:=Python $(PYTHON_VERSION) programming language
   URL:=https://www.python.org/
-  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 endef
 
 define Package/python/Default/description
@@ -106,6 +108,7 @@ define PyBasePackage
       -|/usr/lib/python$(PYTHON_VERSION)/*/tests
     endif
   endef
+  PyPackage/$(1)/install?=:
 endef
 
 include ./files/python-package-*.mk
@@ -191,23 +194,28 @@ define Build/Compile
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
+       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
        $(CP) \
-               $(HOST_PYTHON_LIB_DIR) \
+               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
                $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
                $(1)/usr/lib/
        $(CP) \
-               $(HOST_PYTHON_DIR)/lib/pkgconfig/python.pc \
-               $(HOST_PYTHON_DIR)/lib/pkgconfig/python2.pc \
-               $(HOST_PYTHON_DIR)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
                $(1)/usr/lib/pkgconfig
+       $(INSTALL_BIN) \
+               ./files/python-config.in \
+               $(1)/usr/bin/python$(PYTHON_VERSION)-config
+       $(SED) \
+               's|@EXENAME@|$(HOST_PYTHON_DIR)/bin/python$(PYTHON_VERSION)|' \
+               $(1)/usr/bin/python$(PYTHON_VERSION)-config
        $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
-               $(1)/usr/lib/python$(PYTHON_VERSION)/
+               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py \
+               $(1)/usr/lib/python$(PYTHON_VERSION)-openwrt/_sysconfigdatatarget.py
 endef
 
 PYTHON_BASE_LIB_FILES:= \
@@ -263,6 +271,9 @@ define PyPackage/python-base/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
 endef
 
+PyPackage/python-light/install:=:
+PyPackage/python/install:=:
+
 define PyPackage/python/filespec
 -|$(PYTHON_PKG_DIR)
 endef
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)
+
index b082564646b45c8cd8ef241ced1cdcc830ccdc94..e0c6de97875417480bda7e353566ed88b66ebe80 100644 (file)
@@ -14,8 +14,6 @@ endef
 
 define PyPackage/python-pip/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
-       # Adjust shebang to proper python location on target
-       sed "1s@.*@#\!/usr/bin/python$(PYTHON_VERSION)@" -i $(PKG_BUILD_DIR)/install-pip/bin/*
        $(CP) $(PKG_BUILD_DIR)/install-pip/bin/* $(1)/usr/bin
        $(CP) \
                $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip \
index 413ec7979a0c59a847a519301327c9b226b297e8..f90b018648be35a13fb02dabb7ec9d9ca1628c1a 100644 (file)
@@ -14,8 +14,6 @@ endef
 
 define PyPackage/python-setuptools/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
-       # Adjust shebang to proper python location on target
-       sed "1s@.*@#\!/usr/bin/python$(PYTHON_VERSION)@" -i $(PKG_BUILD_DIR)/install-setuptools/bin/*
        $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/* $(1)/usr/bin
        $(CP) \
                $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
index e85b53c8d970dad829010585888074e86b23acf4..5802e99f64440ab988921bee5b7b35a3a644a284 100644 (file)
@@ -17,4 +17,4 @@ Subject: [PATCH] enable zlib
 +zlib zlibmodule.c -lz
  
  # Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
index 5e6e34b3afff8041352b80a0388a1e0e101725a2..6448f63f029242ee6639618760c9d55cb5d28b81 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -7077,7 +7077,7 @@ sys/param.h sys/poll.h sys/random.h sys/
+@@ -7084,7 +7084,7 @@ sys/param.h sys/poll.h sys/random.h sys/
  sys/termio.h sys/time.h \
  sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
@@ -9,7 +9,7 @@
  do :
    as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-@@ -7299,6 +7299,24 @@ fi
+@@ -7306,6 +7306,24 @@ fi
  fi
  
  
@@ -36,7 +36,7 @@
  do :
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1732,10 +1732,17 @@ sys/param.h sys/poll.h sys/random.h sys/
+@@ -1739,10 +1739,17 @@ sys/param.h sys/poll.h sys/random.h sys/
  sys/termio.h sys/time.h \
  sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
index b4981836032c4796fb159e493ae6fba07a7c03af..8a694a714c47f35e1aedd1cce160fed0b65c025e 100644 (file)
@@ -1,8 +1,6 @@
-diff --git a/Modules/_ssl.c b/Modules/_ssl.c
-index a96c419260..c80437eef7 100644
 --- a/Modules/_ssl.c
 +++ b/Modules/_ssl.c
-@@ -1586,7 +1586,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
+@@ -1590,7 +1590,7 @@ static PyObject *PySSL_version(PySSLSocket *self)
      return PyUnicode_FromString(version);
  }
  
@@ -11,7 +9,7 @@ index a96c419260..c80437eef7 100644
  static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) {
      const unsigned char *out;
      unsigned int outlen;
-@@ -2114,7 +2114,7 @@ static PyMethodDef PySSLMethods[] = {
+@@ -2118,7 +2118,7 @@ static PyMethodDef PySSLMethods[] = {
       PySSL_peercert_doc},
      {"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS},
      {"version", (PyCFunction)PySSL_version, METH_NOARGS},
diff --git a/lang/python/python/patches/014-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch b/lang/python/python/patches/014-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch
deleted file mode 100644 (file)
index b290a28..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-From 18b20bad75b4ff0486940fba4ec680e96e70f3a2 Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Tue, 18 Sep 2018 15:13:09 +0200
-Subject: [PATCH] [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree
- (GH-9146) (GH-9394)
-
-The C accelerated _elementtree module now initializes hash randomization
-salt from _Py_HashSecret instead of libexpat's default CPRNG.
-
-Signed-off-by: Christian Heimes <christian@python.org>
-
-https://bugs.python.org/issue34623.
-(cherry picked from commit cb5778f00ce48631c7140f33ba242496aaf7102b)
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-
-https://bugs.python.org/issue34623
----
- Include/pyexpat.h                                            | 4 +++-
- .../next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst   | 2 ++
- Modules/_elementtree.c                                       | 5 +++++
- Modules/pyexpat.c                                            | 5 +++++
- 4 files changed, 15 insertions(+), 1 deletion(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-
-diff --git a/Include/pyexpat.h b/Include/pyexpat.h
-index 5340ef5fa3..3fc5fa54da 100644
---- a/Include/pyexpat.h
-+++ b/Include/pyexpat.h
-@@ -3,7 +3,7 @@
- /* note: you must import expat.h before importing this module! */
--#define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.0"
-+#define PyExpat_CAPI_MAGIC  "pyexpat.expat_CAPI 1.1"
- #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
- struct PyExpat_CAPI 
-@@ -43,6 +43,8 @@ struct PyExpat_CAPI
-         XML_Parser parser, XML_UnknownEncodingHandler handler,
-         void *encodingHandlerData);
-     void (*SetUserData)(XML_Parser parser, void *userData);
-+    /* might be none for expat < 2.1.0 */
-+    int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
-     /* always add new stuff to the end! */
- };
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-new file mode 100644
-index 0000000000..31ad92ef85
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -0,0 +1,2 @@
-+The C accelerated _elementtree module now initializes hash randomization
-+salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
-index f7f992dd3a..b38e0ab329 100644
---- a/Modules/_elementtree.c
-+++ b/Modules/_elementtree.c
-@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw)
-         PyErr_NoMemory();
-         return NULL;
-     }
-+    /* expat < 2.1.0 has no XML_SetHashSalt() */
-+    if (EXPAT(SetHashSalt) != NULL) {
-+        EXPAT(SetHashSalt)(self->parser,
-+                           (unsigned long)_Py_HashSecret.prefix);
-+    }
-     ALLOC(sizeof(XMLParserObject), "create expatparser");
-diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
-index 2b4d31293c..1f8c0d70a5 100644
---- a/Modules/pyexpat.c
-+++ b/Modules/pyexpat.c
-@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void)
-     capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
-     capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
-     capi.SetUserData = XML_SetUserData;
-+#if XML_COMBINED_VERSION >= 20100
-+    capi.SetHashSalt = XML_SetHashSalt;
-+#else
-+    capi.SetHashSalt = NULL;
-+#endif
-     /* export using capsule */
-     capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);
--- 
-2.19.1
-
diff --git a/lang/python/python/patches/015-2.7-bpo-34623-Mention-CVE-2018-14647-in-news-entry-G.patch b/lang/python/python/patches/015-2.7-bpo-34623-Mention-CVE-2018-14647-in-news-entry-G.patch
deleted file mode 100644 (file)
index 5d7f201..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 10be1d3f802b874914b2a13eb41407c7a582d9b3 Mon Sep 17 00:00:00 2001
-From: "Miss Islington (bot)"
- <31488909+miss-islington@users.noreply.github.com>
-Date: Fri, 21 Sep 2018 21:57:00 -0700
-Subject: [PATCH] [2.7] bpo-34623: Mention CVE-2018-14647 in news entry
- (GH-9482) (GH-9490)
-
-https://bugs.python.org/issue34623
-(cherry picked from commit 026337a7101369297c8083047d2f3c6fc9dd1e2b)
-
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-https://bugs.python.org/issue34623
----
- .../next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst    | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-index 31ad92ef85..cbaa4b7506 100644
---- a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-+++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
-@@ -1,2 +1,2 @@
--The C accelerated _elementtree module now initializes hash randomization
--salt from _Py_HashSecret instead of libexpat's default CSPRNG.
-+CVE-2018-14647: The C accelerated _elementtree module now initializes hash
-+randomization salt from _Py_HashSecret instead of libexpat's default CSPRNG.
--- 
-2.19.1
-
index 5972914bdb9f5914440471414022d3921f41efa2..6a1ef587c479d45c347760a2e763d842a3cb2e47 100644 (file)
@@ -1,8 +1,6 @@
-diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
-index 7841b99..1e0d3b3 100644
 --- a/Lib/lib2to3/refactor.py
 +++ b/Lib/lib2to3/refactor.py
-@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
+@@ -40,6 +40,12 @@ def get_all_fix_names(fixer_pkg, remove_prefix=True):
              if remove_prefix:
                  name = name[4:]
              fix_names.append(name[:-3])
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
index 804a6de031f82b8f23837b5162d51fbfc9712e39..09cd6ee5691b1e070cb87bb083c064c5ac8135ff 100644 (file)
@@ -8,21 +8,25 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python3-bottle
-PKG_VERSION:=0.12.13
+PKG_VERSION:=0.12.16
 PKG_RELEASE:=1
 
 PKG_LICENSE:=MIT
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:bottlepy:bottle
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 
 PKG_SOURCE:=bottle-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/b/bottle
-PKG_HASH:=39b751aee0b167be8dffb63ca81b735bbf1dd0905b3bc42761efedee8f123355
-PKG_BUILD_DIR:=$(BUILD_DIR)/bottle-$(PKG_VERSION)
-PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+PKG_HASH:=9c310da61e7df2b6ac257d8a90811899ccb3a9743e77e947101072a2e3186726
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-bottle-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
 
+PKG_UNPACK=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
+
 define Package/python3-bottle
        SECTION:=lang
        CATEGORY:=Languages
@@ -30,6 +34,7 @@ define Package/python3-bottle
        TITLE:=Bottle is a fast, simple and lightweight WSGI micro web-framework for Python
        URL:=https://bottlepy.org
        DEPENDS:=+python3
+       VARIANT:=python3
 endef
 
 define Package/python3-bottle/description
@@ -38,15 +43,6 @@ define Package/python3-bottle/description
  Python Standard Library.
 endef
 
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/python3-bottle/install
-       $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)
-       $(CP) $(PKG_BUILD_DIR)/bottle.py $(1)$(PYTHON3_PKG_DIR)
-endef
-
+$(eval $(call Py3Package,python3-bottle))
 $(eval $(call BuildPackage,python3-bottle))
+$(eval $(call BuildPackage,python3-bottle-src))
index 9e473b5c5d2e8fcfcbd24dd219f1c1178bada2bc..4a3dddd6439bb867d69d5340157e0ab2aeac5b5e 100644 (file)
@@ -67,8 +67,8 @@ define Py3Package
   $(call shexport,Py3Package/$(1)/filespec)
 
   define Package/$(1)/install
-       $(call Py3Package/$(1)/install,$$(1))
-       find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
+       $$(call Py3Package/$(1)/install,$$(1))
+       SED="$(SED)" \
        $(SHELL) $(python3_mk_path)python-package-install.sh "3" \
                "$(PKG_INSTALL_DIR)" "$$(1)" \
                "$(HOST_PYTHON3_BIN)" "$$(2)" \
@@ -112,17 +112,20 @@ define Build/Compile/Py3Mod
                cd $(PKG_BUILD_DIR)/$(strip $(1)), \
                ./setup.py $(2), \
                $(3))
-       find $(PKG_INSTALL_DIR) -name "*\.exe" | xargs rm -f
 endef
 
-PYTHON3_PKG_SETUP_ARGS:=--single-version-externally-managed
-PYTHON3_PKG_SETUP_VARS:=
+PYTHON3_PKG_SETUP_DIR ?=
+PYTHON3_PKG_SETUP_GLOABL_ARGS ?=
+PYTHON3_PKG_SETUP_ARGS ?= --single-version-externally-managed
+PYTHON3_PKG_SETUP_VARS ?=
 
 define Py3Build/Compile/Default
        $(foreach pkg,$(HOST_PYTHON3_PACKAGE_BUILD_DEPENDS),
                $(call host_python3_pip_install_host,$(pkg))
        )
-       $(call Build/Compile/Py3Mod,, \
+       $(call Build/Compile/Py3Mod, \
+               $(PYTHON3_PKG_SETUP_DIR), \
+               $(PYTHON3_PKG_SETUP_GLOBAL_ARGS) \
                install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
                $(PYTHON3_PKG_SETUP_ARGS), \
                $(PYTHON3_PKG_SETUP_VARS) \
index ebe71b5559a240167a989c7462902186c6abb321..60fe7c69f737aae6a98731cfcb57d8d25b97281d 100644 (file)
@@ -14,7 +14,7 @@ PYTHON_VERSION:=$(PYTHON3_VERSION)
 PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
 
 PKG_NAME:=python3
-PKG_RELEASE:=3
+PKG_RELEASE:=10
 PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -23,6 +23,9 @@ PKG_HASH:=d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb
 
 PKG_LICENSE:=PSF
 PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
+PKG_CPE_ID:=cpe:/a:python:python
+
+PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 
 # This file provides the necsessary host build variables
 include ../python3-host.mk
@@ -54,7 +57,6 @@ define Package/python3/Default
   CATEGORY:=Languages
   TITLE:=Python $(PYTHON_VERSION) programming language
   URL:=https://www.python.org/
-  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 endef
 
 define Package/python3/Default/description
@@ -110,6 +112,7 @@ define Py3BasePackage
       -|/usr/lib/python$(PYTHON_VERSION)/*/tests
     endif
   endef
+  Py3Package/$(1)/install?=:
 endef
 
 include ./files/python3-package-*.mk
@@ -195,23 +198,21 @@ define Build/Compile
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
-       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/bin
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
                $(1)/usr/include/
        $(CP) \
-               $(HOST_PYTHON3_LIB_DIR) \
+               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION) \
                $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
                $(1)/usr/lib/
        $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python3.pc \
-               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python-$(PYTHON3_VERSION).pc \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/python*.pc \
                $(1)/usr/lib/pkgconfig
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
-               $(1)/usr/lib/python$(PYTHON_VERSION)/
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON_VERSION)-config \
+               $(1)/usr/bin/
 endef
 
 PYTHON3_BASE_LIB_FILES:= \
@@ -264,6 +265,9 @@ define Py3Package/python3-base/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
 endef
 
+Py3Package/python3-light/install:=:
+Py3Package/python3/install:=:
+
 define Py3Package/python3/filespec
 -|$(PYTHON3_PKG_DIR)
 endef
index 1aaeaf2ee0c75fd532a2f095e2e82cefda0ca18e..677f61efa30eae70af2800ed7f3ca1fe14e55c4f 100644 (file)
@@ -12,16 +12,17 @@ $(call Package/python3/Default)
   DEPENDS:=+python3 +python3-setuptools +python-pip-conf
 endef
 
-define Package/python3-pip/install
+define Py3Package/python3-pip/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       # Adjust shebang to proper python location on target
-       sed "1s@.*@#\!/usr/bin/python$(PYTHON3_VERSION)@" -i $(PKG_BUILD_DIR)/install-pip/bin/*
        $(CP) $(PKG_BUILD_DIR)/install-pip/bin/pip3* $(1)/usr/bin
        $(CP) \
                $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip \
                $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf
+       for _ in \$(seq 1 10) ; do \
+               find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ -exec rm -rf {} \; || continue ; \
+               break ; \
+       done
 endef
 
 $(eval $(call Py3BasePackage,python3-pip, \
index c8415cbd9306c91691b4bc48c349867f4d3e268f..5cb5f58de0e4ffc30526d5ac23ed04a4cf62a2fc 100644 (file)
@@ -14,8 +14,6 @@ endef
 
 define Py3Package/python3-setuptools/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       # Adjust shebang to proper python location on target
-       sed "1s@.*@#\!/usr/bin/python$(PYTHON3_VERSION)@" -i $(PKG_BUILD_DIR)/install-setuptools/bin/*
        $(CP) $(PKG_BUILD_DIR)/install-setuptools/bin/easy_install-* $(1)/usr/bin
        $(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
        $(CP) \
@@ -24,7 +22,10 @@ define Py3Package/python3-setuptools/install
                $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
                $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf
+       for _ in \$(seq 1 10) ; do \
+               find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ -exec rm -rf {} \; || continue ; \
+               break ; \
+       done
 endef
 
 $(eval $(call Py3BasePackage,python3-setuptools, \
diff --git a/lang/python/python3/files/python3-package-urllib.mk b/lang/python/python3/files/python3-package-urllib.mk
new file mode 100644 (file)
index 0000000..ddd7b1d
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-urllib
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) URL library module
+  DEPENDS:=+python3-light +python3-email
+endef
+
+$(eval $(call Py3BasePackage,python3-urllib, \
+       /usr/lib/python$(PYTHON3_VERSION)/urllib \
+))
index 4ea3f54ada9181268c3cff0b84303cfb0cb7da05..287b147d14ec3fb3618fd8ea1587e9b8bfd6dc2e 100644 (file)
@@ -17,4 +17,4 @@ Subject: [PATCH] enable zlib
 +zlib zlibmodule.c -lz
  
  # Interface to the Expat XML parser
- #
+ # More information on Expat can be found at www.libexpat.org.
index bfcd8d62eb82141ead135d1152f5ae72771b807e..e4fabd43e5596452def8b5a7a144ec740f05dade 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1381,6 +1381,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1389,6 +1389,7 @@ libinstall:      build_all $(srcdir)/Modules/
        $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
                $(DESTDIR)$(LIBDEST); \
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@@ -8,7 +8,7 @@
        if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
                $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
                        $(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1416,6 +1417,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1424,6 +1425,7 @@ libinstall:      build_all $(srcdir)/Modules/
                $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
index 57fc9bc38e0c70aa2a41ddbe95f45f7328e3d85f..72d31be9ad3b7e9d4630fdebb3b02e3f0fb3655f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -537,16 +537,9 @@ class PyBuildExt(build_ext):
+@@ -542,16 +542,9 @@ class PyBuildExt(build_ext):
              os.unlink(tmpfile)
  
      def detect_modules(self):
index be5fcb9408f6b5e6a6ecd142cf672c87c39cb5ba..c5d11d232b5008fe1a32e76eb9b09d568c206e34 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -547,8 +547,9 @@ class PyBuildExt(build_ext):
+@@ -552,8 +552,9 @@ class PyBuildExt(build_ext):
          # directly since an inconsistently reproducible issue comes up where
          # the environment variable is not set even though the value were passed
          # into configure and stored in the Makefile (issue found on OS X 10.3).
index a3bdb33455c1b13e00c9326cd473f05ac9b44047..a31f4c7d26fa7ad71caac2f52a82da3458e2f4ee 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -743,6 +743,16 @@ regen-all: regen-opcode regen-opcode-tar
+@@ -751,6 +751,16 @@ regen-all: regen-opcode regen-opcode-tar
  ############################################################################
  # Special rules for object files
  
@@ -17,7 +17,7 @@
  Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(OBJECT_OBJS) \
                $(PYTHON_OBJS) \
-@@ -750,6 +760,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -758,6 +768,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(MODOBJS) \
                $(srcdir)/Modules/getbuildinfo.c
        $(CC) -c $(PY_CORE_CFLAGS) \
index de7badd998811cd3a49b0cfa18909a4d6622121d..b9d3cd1653b1de216a2a2decca16e2de73f1d796 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -14962,7 +14962,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
+@@ -15129,7 +15129,7 @@ $as_echo_n "checking ABIFLAGS... " >&6;
  $as_echo "$ABIFLAGS" >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
  $as_echo_n "checking SOABI... " >&6; }
@@ -11,7 +11,7 @@
  
 --- a/configure.ac
 +++ b/configure.ac
-@@ -4665,7 +4665,7 @@ AC_SUBST(SOABI)
+@@ -4719,7 +4719,7 @@ AC_SUBST(SOABI)
  AC_MSG_CHECKING(ABIFLAGS)
  AC_MSG_RESULT($ABIFLAGS)
  AC_MSG_CHECKING(SOABI)
index 9d75794186d7674c7e51e9d136e89e42d245b977..5150b77e882ac3a906b7e24a3e34e9764a6b8fb7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/setup.py
 +++ b/setup.py
-@@ -354,6 +354,7 @@ class PyBuildExt(build_ext):
+@@ -359,6 +359,7 @@ class PyBuildExt(build_ext):
              print("Failed to build these modules:")
              print_three_column(failed)
              print()
index dbd15cda99f69681adc57ed1f7fd2e266751a2d2..3749a1590b24e3da36dab5ff3bba0266c7f13715 100644 (file)
@@ -20,7 +20,7 @@
          abi=sys.abiflags,
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1390,7 +1390,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1398,7 +1398,7 @@ libinstall:      build_all $(srcdir)/Modules/
                        esac; \
                done; \
        done
@@ -29,7 +29,7 @@
                $(DESTDIR)$(LIBDEST); \
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  ifeq (@COMPILE_ALL_TESTS@,yes)
-@@ -1525,7 +1525,7 @@ sharedinstall: sharedmods
+@@ -1543,7 +1543,7 @@ sharedinstall: sharedmods
                --install-scripts=$(BINDIR) \
                --install-platlib=$(DESTSHARED) \
                --root=$(DESTDIR)/
@@ -40,7 +40,7 @@
  # Here are a couple of targets for MacOSX again, to install a full
 --- a/configure
 +++ b/configure
-@@ -14981,7 +14981,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -15148,7 +15148,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
  $as_echo "$LDVERSION" >&6; }
  
  
@@ -51,7 +51,7 @@
    LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
 --- a/configure.ac
 +++ b/configure.ac
-@@ -4682,7 +4682,7 @@ AC_MSG_RESULT($LDVERSION)
+@@ -4736,7 +4736,7 @@ AC_MSG_RESULT($LDVERSION)
  
  dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
  AC_SUBST(PY_ENABLE_SHARED)
diff --git a/lang/python/python3/patches/018-bpo-35746-Fix-segfault-in-ssl-s-cert-parser-GH-11569.patch b/lang/python/python3/patches/018-bpo-35746-Fix-segfault-in-ssl-s-cert-parser-GH-11569.patch
new file mode 100644 (file)
index 0000000..f2cc065
--- /dev/null
@@ -0,0 +1,120 @@
+From be5de958e9052e322b0087c6dba81cdad0c3e031 Mon Sep 17 00:00:00 2001
+From: "Miss Islington (bot)"
+ <31488909+miss-islington@users.noreply.github.com>
+Date: Tue, 15 Jan 2019 15:03:36 -0800
+Subject: [PATCH] bpo-35746: Fix segfault in ssl's cert parser (GH-11569)
+
+Fix a NULL pointer deref in ssl module. The cert parser did not handle CRL
+distribution points with empty DP or URI correctly. A malicious or buggy
+certificate can result into segfault.
+
+Signed-off-by: Christian Heimes <christian@python.org>
+
+https://bugs.python.org/issue35746
+(cherry picked from commit a37f52436f9aa4b9292878b72f3ff1480e2606c3)
+
+Co-authored-by: Christian Heimes <christian@python.org>
+---
+ Lib/test/talos-2019-0758.pem                  | 22 +++++++++++++++++++
+ Lib/test/test_ssl.py                          | 22 +++++++++++++++++++
+ .../2019-01-15-18-16-05.bpo-35746.nMSd0j.rst  |  3 +++
+ Modules/_ssl.c                                |  4 ++++
+ 4 files changed, 51 insertions(+)
+ create mode 100644 Lib/test/talos-2019-0758.pem
+ create mode 100644 Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
+
+diff --git a/Lib/test/talos-2019-0758.pem b/Lib/test/talos-2019-0758.pem
+new file mode 100644
+index 0000000000..13b95a77fd
+--- /dev/null
++++ b/Lib/test/talos-2019-0758.pem
+@@ -0,0 +1,22 @@
++-----BEGIN CERTIFICATE-----
++MIIDqDCCApKgAwIBAgIBAjALBgkqhkiG9w0BAQswHzELMAkGA1UEBhMCVUsxEDAO
++BgNVBAMTB2NvZHktY2EwHhcNMTgwNjE4MTgwMDU4WhcNMjgwNjE0MTgwMDU4WjA7
++MQswCQYDVQQGEwJVSzEsMCoGA1UEAxMjY29kZW5vbWljb24tdm0tMi50ZXN0Lmxh
++bC5jaXNjby5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC63fGB
++J80A9Av1GB0bptslKRIUtJm8EeEu34HkDWbL6AJY0P8WfDtlXjlPaLqFa6sqH6ES
++V48prSm1ZUbDSVL8R6BYVYpOlK8/48xk4pGTgRzv69gf5SGtQLwHy8UPBKgjSZoD
++5a5k5wJXGswhKFFNqyyxqCvWmMnJWxXTt2XDCiWc4g4YAWi4O4+6SeeHVAV9rV7C
++1wxqjzKovVe2uZOHjKEzJbbIU6JBPb6TRfMdRdYOw98n1VXDcKVgdX2DuuqjCzHP
++WhU4Tw050M9NaK3eXp4Mh69VuiKoBGOLSOcS8reqHIU46Reg0hqeL8LIL6OhFHIF
++j7HR6V1X6F+BfRS/AgMBAAGjgdYwgdMwCQYDVR0TBAIwADAdBgNVHQ4EFgQUOktp
++HQjxDXXUg8prleY9jeLKeQ4wTwYDVR0jBEgwRoAUx6zgPygZ0ZErF9sPC4+5e2Io
++UU+hI6QhMB8xCzAJBgNVBAYTAlVLMRAwDgYDVQQDEwdjb2R5LWNhggkA1QEAuwb7
++2s0wCQYDVR0SBAIwADAuBgNVHREEJzAlgiNjb2Rlbm9taWNvbi12bS0yLnRlc3Qu
++bGFsLmNpc2NvLmNvbTAOBgNVHQ8BAf8EBAMCBaAwCwYDVR0fBAQwAjAAMAsGCSqG
++SIb3DQEBCwOCAQEAvqantx2yBlM11RoFiCfi+AfSblXPdrIrHvccepV4pYc/yO6p
++t1f2dxHQb8rWH3i6cWag/EgIZx+HJQvo0rgPY1BFJsX1WnYf1/znZpkUBGbVmlJr
++t/dW1gSkNS6sPsM0Q+7HPgEv8CPDNK5eo7vU2seE0iWOkxSyVUuiCEY9ZVGaLVit
++p0C78nZ35Pdv4I+1cosmHl28+es1WI22rrnmdBpH8J1eY6WvUw2xuZHLeNVN0TzV
++Q3qq53AaCWuLOD1AjESWuUCxMZTK9DPS4JKXTK8RLyDeqOvJGjsSWp3kL0y3GaQ+
++10T1rfkKJub2+m9A9duin1fn6tHc2wSvB7m3DA==
++-----END CERTIFICATE-----
+diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
+index f1b9565c8d..b6794ce3a8 100644
+--- a/Lib/test/test_ssl.py
++++ b/Lib/test/test_ssl.py
+@@ -116,6 +116,7 @@ NONEXISTINGCERT = data_file("XXXnonexisting.pem")
+ BADKEY = data_file("badkey.pem")
+ NOKIACERT = data_file("nokia.pem")
+ NULLBYTECERT = data_file("nullbytecert.pem")
++TALOS_INVALID_CRLDP = data_file("talos-2019-0758.pem")
+ DHFILE = data_file("ffdh3072.pem")
+ BYTES_DHFILE = os.fsencode(DHFILE)
+@@ -365,6 +366,27 @@ class BasicSocketTests(unittest.TestCase):
+         self.assertEqual(p['crlDistributionPoints'],
+                          ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))
++    def test_parse_cert_CVE_2019_5010(self):
++        p = ssl._ssl._test_decode_cert(TALOS_INVALID_CRLDP)
++        if support.verbose:
++            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
++        self.assertEqual(
++            p,
++            {
++                'issuer': (
++                    (('countryName', 'UK'),), (('commonName', 'cody-ca'),)),
++                'notAfter': 'Jun 14 18:00:58 2028 GMT',
++                'notBefore': 'Jun 18 18:00:58 2018 GMT',
++                'serialNumber': '02',
++                'subject': ((('countryName', 'UK'),),
++                            (('commonName',
++                              'codenomicon-vm-2.test.lal.cisco.com'),)),
++                'subjectAltName': (
++                    ('DNS', 'codenomicon-vm-2.test.lal.cisco.com'),),
++                'version': 3
++            }
++        )
++
+     def test_parse_cert_CVE_2013_4238(self):
+         p = ssl._ssl._test_decode_cert(NULLBYTECERT)
+         if support.verbose:
+diff --git a/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst b/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
+new file mode 100644
+index 0000000000..dffe347eec
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2019-01-15-18-16-05.bpo-35746.nMSd0j.rst
+@@ -0,0 +1,3 @@
++[CVE-2019-5010] Fix a NULL pointer deref in ssl module. The cert parser did
++not handle CRL distribution points with empty DP or URI correctly. A
++malicious or buggy certificate can result into segfault.
+diff --git a/Modules/_ssl.c b/Modules/_ssl.c
+index 9894ad821d..9baec8a9bc 100644
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -1516,6 +1516,10 @@ _get_crl_dp(X509 *certificate) {
+         STACK_OF(GENERAL_NAME) *gns;
+         dp = sk_DIST_POINT_value(dps, i);
++        if (dp->distpoint == NULL) {
++            /* Ignore empty DP value, CVE-2019-5010 */
++            continue;
++        }
+         gns = dp->distpoint->name.fullname;
+         for (j=0; j < sk_GENERAL_NAME_num(gns); j++) {
+-- 
+2.17.1
+
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/pytz/Makefile b/lang/python/pytz/Makefile
deleted file mode 100644 (file)
index 1aadc3a..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (C) 2007-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pytz
-PKG_VERSION:=2018.9
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/p/pytz
-PKG_HASH:=d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c
-
-PKG_BUILD_DEPENDS:=python/host
-HOST_BUILD_DEPENDS:=python/host
-
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/pytz
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-  TITLE:=World timezone definitions, modern and historical
-  URL:=https://sourceforge.net/projects/pytz/
-  DEPENDS:=+python
-endef
-
-define Package/pytz/description
-  World timezone definitions, modern and historical
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Host/Compile
-       $(call Build/Compile/HostPyMod,,install --prefix="" --root="$(STAGING_DIR_HOSTPKG)")
-endef
-
-Host/Install:=
-
-define Package/pytz/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,pytz))
diff --git a/lang/python/ruamel-yaml/Makefile b/lang/python/ruamel-yaml/Makefile
new file mode 100644 (file)
index 0000000..b363ce6
--- /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.89
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ruamel.yaml-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/ruamel.yaml/
+PKG_HASH:=86d034aa9e2ab3eacc5f75f5cd6a469a2af533b6d9e60ea92edbba540d21b9b7
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-ruamel.yaml-$(PKG_VERSION)
+
+PKG_LICENSE:=MIT
+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/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/simplejson/Makefile b/lang/python/simplejson/Makefile
deleted file mode 100644 (file)
index 0f43a67..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:=simplejson
-PKG_VERSION:=3.16.0
-PKG_RELEASE:=1
-PKG_LICENSE:=MIT
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/s/simplejson
-PKG_HASH:=b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-define Package/simplejson
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
-  TITLE:=Simple, fast, extensible JSON encoder/decoder for Python
-  URL:=https://simplejson.readthedocs.org/
-  DEPENDS:=+python
-endef
-
-define Package/simplejson/description
-  Simple, fast, extensible JSON encoder/decoder for Python
-endef
-
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
-endef
-
-define Package/simplejson/install
-       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
-       $(CP) \
-           $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
-           $(1)$(PYTHON_PKG_DIR)
-endef
-
-$(eval $(call BuildPackage,simplejson))
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/twisted/Makefile b/lang/python/twisted/Makefile
deleted file mode 100644 (file)
index 3b5608d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (C) 2006-2011, 2015-2018 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=twisted
-PKG_VERSION:=18.9.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_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-twisted-$(PKG_VERSION)
-PKG_BUILD_DEPENDS:=libtirpc
-
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-include $(INCLUDE_DIR)/package.mk
-include ../python-package.mk
-
-PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xjf $(DL_DIR)/$(PKG_SOURCE)
-
-define Package/twisted/Default
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  URL:=http://twistedmatrix.com/
-endef
-
-define Package/twisted
-$(call Package/twisted/Default)
-  TITLE:=Python networking engine
-  DEPENDS:= \
-      +PACKAGE_twisted:python-light \
-      +PACKAGE_twisted:python-attrs \
-      +PACKAGE_twisted:python-automat \
-      +PACKAGE_twisted:python-constantly \
-      +PACKAGE_twisted:python-incremental \
-      +PACKAGE_twisted:python-hyperlink \
-      +PACKAGE_twisted:python-zope-interface
-  VARIANT:=python
-endef
-
-define Package/twisted/description
-Twisted is a networking engine written in Python, supporting numerous
-protocols. It contains a web server, numerous chat clients, chat servers,
-mail servers, and more.
-endef
-
-define PyPackage/twisted/filespec
-+|/usr/bin
-+|$(PYTHON_PKG_DIR)
--|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
-endef
-
-$(eval $(call PyPackage,twisted))
-$(eval $(call BuildPackage,twisted))
-$(eval $(call BuildPackage,twisted-src))
diff --git a/lang/python/twisted/patches/001-omit-tkconch.patch b/lang/python/twisted/patches/001-omit-tkconch.patch
deleted file mode 100644 (file)
index 1ec4baf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -144,7 +144,6 @@ _CONSOLE_SCRIPTS = [
-     "conch = twisted.conch.scripts.conch:run",
-     "mailmail = twisted.mail.scripts.mailmail:run",
-     "pyhtmlizer = twisted.scripts.htmlizer:run",
--    "tkconch = twisted.conch.scripts.tkconch:run",
-     "trial = twisted.scripts.trial:run",
-     "twist = twisted.application.twist._twist:Twist.main",
-     "twistd = twisted.scripts.twistd:run",
---- a/src/twisted/python/twisted-completion.zsh
-+++ b/src/twisted/python/twisted-completion.zsh
-@@ -1,4 +1,4 @@
--#compdef twist twistd trial conch cftp ckeygen pyhtmlizer tkconch
-+#compdef twist twistd trial conch cftp ckeygen pyhtmlizer
- #
- # This is the ZSH completion file for Twisted commands. It calls the current
- # command-line with the special "--_shell-completion" option which is handled
diff --git a/lang/python/twisted/patches/002-omit-tests.patch b/lang/python/twisted/patches/002-omit-tests.patch
deleted file mode 100644 (file)
index 33ba77a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/src/twisted/python/_setup.py
-+++ b/src/twisted/python/_setup.py
-@@ -169,11 +169,6 @@ class ConditionalExtension(Extension, object):
- # The C extensions used for Twisted.
- _EXTENSIONS = [
--    ConditionalExtension(
--        "twisted.test.raiser",
--        sources=["src/twisted/test/raiser.c"],
--        condition=lambda _: _isCPython),
--
-     ConditionalExtension(
-         "twisted.internet.iocpreactor.iocpsupport",
-         sources=[
-@@ -238,12 +233,11 @@ def getSetupArgs(extensions=_EXTENSIONS):
-         "incremental >= 16.10.1",
-         "Automat >= 0.3.0",
-         "hyperlink >= 17.1.1",
--        "PyHamcrest >= 1.9.0",
-         "attrs >= 17.4.0",
-     ]
-     arguments.update(dict(
--        packages=find_packages("src"),
-+        packages=find_packages("src", exclude=["*.test", "*.test.*"]),
-         use_incremental=True,
-         setup_requires=["incremental >= 16.10.1"],
-         install_requires=requirements,
-@@ -253,7 +247,7 @@ def getSetupArgs(extensions=_EXTENSIONS):
-         cmdclass=command_classes,
-         include_package_data=True,
-         exclude_package_data={
--            "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat"],
-+            "": ["*.c", "*.h", "*.pxi", "*.pyx", "build.bat", "test/*"],
-         },
-         zip_safe=False,
-         extras_require=_EXTRAS_REQUIRE,
index 68c2dd454b7e09d33ae918dee33e37311e437b5a..f34c4ff293a7298fb7e314067a26c86c53971fee 100644 (file)
@@ -11,7 +11,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ruby
-PKG_VERSION:=2.5.3
+PKG_VERSION:=2.6.2
 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:=1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
+PKG_HASH:=91fcde77eea8e6206d775a48ac58450afe4883af1a42e5b358320beb33a445fa
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=COPYING
@@ -175,7 +175,7 @@ $(call Package/ruby/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+= (shared library)
-  DEPENDS+= +libpthread +librt +libgmp
+  DEPENDS+= +libpthread +librt +libgmp +zlib
   ABI_VERSION:=$(PKG_ABI_VERSION)
 endef
 define Package/libruby/install
@@ -183,6 +183,21 @@ define Package/libruby/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/
 endef
 
+define Package/ruby-dev
+$(call Package/ruby/Default)
+  TITLE+= (dev files)
+  DEPENDS:=+libruby
+endef
+define Package/ruby-dev/description
+  Header files for compiling extension modules for the Ruby $(PKG_ABI_VERSION)
+endef
+define Package/ruby-dev/install
+       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/ruby-$(PKG_ABI_VERSION) $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ruby-$(PKG_ABI_VERSION).pc $(1)/usr/lib/pkgconfig/
+endef
+
 RUBY_STDLIB :=
 define Package/ruby-stdlib
 $(call Package/ruby/Default)
@@ -204,10 +219,19 @@ endef
 
 define Package/ruby-bigdecimal/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal.so
+/usr/lib/ruby/$(PKG_ABI_VERSION)/*/bigdecimal/
 /usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal/
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bigdecimal.rb
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bigdecimal-*.gemspec
 endef
 
+define Package/ruby-bundler/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bundler.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/bundler/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/bundler-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/bundler-*.gemspec
+endef
+
 define Package/ruby-cgi/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/cgi
 /usr/lib/ruby/$(PKG_ABI_VERSION)/cgi.rb
@@ -221,6 +245,7 @@ endef
 
 define Package/ruby-csv/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/csv.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/csv/
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/csv-*.gemspec
 endef
 
@@ -244,7 +269,6 @@ define Package/ruby-debuglib/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/profile.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/profiler.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/debug.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/benchmark.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/objspace.so
 endef
@@ -300,6 +324,12 @@ define Package/ruby-enc/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc/euc_jp.so
 endef
 
+define Package/ruby-e2mmap/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/e2mmap-*.gemspec
+endef
+
 define Package/ruby-enc-extra/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/enc
 endef
@@ -339,9 +369,16 @@ endef
 
 define Package/ruby-fileutils/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/fileutils/
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/fileutils-*.gemspec
 endef
 
+define Package/ruby-forwardable/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/forwardable-*.gemspec
+endef
+
 define Package/ruby-gdbm/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/gdbm.so
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/gdbm-*.gemspec
@@ -383,6 +420,8 @@ endef
 define Package/ruby-irb/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/irb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/irb.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/irb-*/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/irb-*.gemspec
 endef
 define Package/ruby-irb/install
        $(INSTALL_DIR) $(1)/usr/bin
@@ -404,12 +443,13 @@ define Package/ruby-logger/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/logger.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/syslog/logger.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/syslog.so
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/logger-*.gemspec
 endef
 
-define Package/ruby-math/files
-/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb
+define Package/ruby-matrix/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/matrix.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/matrix
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/matrix-*.gemspec
 endef
 
 define Package/ruby-minitest/files
@@ -426,12 +466,11 @@ define Package/ruby-misc/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/English.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/abbrev.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/base64.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/coverage.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/delegate.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/e2mmap.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/expect.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/getoptlong.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/open3.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/securerandom.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/set.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/shellwords.rb
@@ -451,13 +490,15 @@ endef
 define Package/ruby-multithread/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/monitor.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/timeout.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/wait.so
 /usr/lib/ruby/$(PKG_ABI_VERSION)/*/io/nonblock.so
 endef
 
+define Package/ruby-mutex_m/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/mutex_m.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/mutex_m-*.gemspec
+endef
+
 define Package/ruby-net/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/open-uri.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/net/*
@@ -491,11 +532,14 @@ define Package/ruby-optparse/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/optparse
 endef
 
+define Package/ruby-ostruct/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/ostruct.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/ostruct-*.gemspec
+endef
+
 define Package/ruby-patterns/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/observer.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/singleton.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable.rb
-/usr/lib/ruby/$(PKG_ABI_VERSION)/forwardable
 endef
 
 define Package/ruby-powerassert/files
@@ -512,6 +556,11 @@ define Package/ruby-prettyprint/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/prettyprint.rb
 endef
 
+define Package/ruby-prime/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/prime.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/prime-*.gemspec
+endef
+
 define Package/ruby-pstore/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/pstore.rb
 endef
@@ -571,6 +620,7 @@ endef
 
 define Package/ruby-rexml/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/rexml
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rexml-*.gemspec
 endef
 
 define Package/ruby-rinda/files
@@ -586,6 +636,7 @@ endef
 define Package/ruby-rss/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/rss
 /usr/lib/ruby/$(PKG_ABI_VERSION)/rss.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/rss-*.gemspec
 endef
 
 define Package/ruby-scanf/files
@@ -601,6 +652,7 @@ endef
 define Package/ruby-shell/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/shell.rb
 /usr/lib/ruby/$(PKG_ABI_VERSION)/shell
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/shell-*.gemspec
 endef
 
 define Package/ruby-socket/files
@@ -620,6 +672,11 @@ define Package/ruby-strscan/files
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/strscan-*.gemspec
 endef
 
+define Package/ruby-sync/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/sync.rb
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/sync-*.gemspec
+endef
+
 define Package/ruby-testunit/files
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/test-unit-*.gemspec
 /usr/lib/ruby/gems/$(PKG_ABI_VERSION)/gems/test-unit-*
@@ -635,6 +692,18 @@ define Package/ruby-time/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/time.rb
 endef
 
+define Package/ruby-thwait/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/thwait/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/thwait-*.gemspec
+endef
+
+define Package/ruby-tracer/files
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer.rb
+/usr/lib/ruby/$(PKG_ABI_VERSION)/tracer/
+/usr/lib/ruby/gems/$(PKG_ABI_VERSION)/specifications/default/tracer-*.gemspec
+endef
+
 define Package/ruby-unicodenormalize/files
 /usr/lib/ruby/$(PKG_ABI_VERSION)/unicode_normalize
 endef
@@ -740,68 +809,78 @@ endef
 
 $(eval $(call BuildPackage,libruby))
 $(eval $(call BuildPackage,ruby))
+$(eval $(call BuildPackage,ruby-dev))
 $(eval $(call RubyBuildPackage,bigdecimal,Arbitrary-precision decimal floating-point library,))
+$(eval $(call RubyBuildPackage,bundler,Manage dependencies,))
 $(eval $(call RubyBuildPackage,cgi,CGI support toolkit,+ruby-filelib +ruby-pstore +ruby-stringio))
 $(eval $(call RubyBuildPackage,cmath,Trigonometric and transcendental functions for complex numbers,))
-$(eval $(call RubyBuildPackage,csv,CSV Reading and Writing,+ruby-date +ruby-enc +ruby-misc +ruby-patterns +ruby-stringio))
+$(eval $(call RubyBuildPackage,csv,CSV Reading and Writing,+ruby-date +ruby-forwardable +ruby-misc +ruby-stringio +ruby-strscan))
 $(eval $(call RubyBuildPackage,date,Comparable module for handling dates,))
 $(eval $(call RubyBuildPackage,dbm,Wrapper for the UNIX-style Database Manager Library,+libdb47))
-$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-misc +ruby-prettyprint))
+$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-misc +ruby-prettyprint +ruby-tracer))
 $(eval $(call RubyBuildPackage,did-you-mean,did you mean? experience,+ruby-misc))
 $(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl))
 $(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-ipaddr +ruby-patterns))
+$(eval $(call RubyBuildPackage,e2mmap,custom exceptions with specific messages,))
 $(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),))
 $(eval $(call RubyBuildPackage,enc-extra,character re-coding library charset (extra subset),+ruby-enc))
 $(eval $(call RubyBuildPackage,erb,(embedded interpreter),+ruby-cgi +ruby-strscan))
-$(eval $(call RubyBuildPackage,etc,Access to information typically stored in UNIX /etc directory,))
+$(eval $(call RubyBuildPackage,etc,Access info typically stored in /etc,))
 $(eval $(call RubyBuildPackage,fcntl,Loads constants defined in the OS fcntl.h C header file,))
 $(eval $(call RubyBuildPackage,fiddle,Libffi wrapper for Ruby,+libffi))
 $(eval $(call RubyBuildPackage,filelib,file utils library,+ruby-fileutils +ruby-misc))
-$(eval $(call RubyBuildPackage,fileutils,File utility methods for copying moving removing etc,+ruby-enc +ruby-etc))
+$(eval $(call RubyBuildPackage,fileutils,File utility methods for copying moving removing etc,+ruby-enc +ruby-etc +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,forwardable,delegation of methods to a object,))
 $(eval $(call RubyBuildPackage,gdbm,Ruby extension for GNU dbm,+libgdbm))
-$(eval $(call RubyBuildPackage,gems,gems packet management,+ruby-net +ruby-rdoc))
+$(eval $(call RubyBuildPackage,gems,gems packet management,))
 $(eval $(call RubyBuildPackage,io-console,Console interface,))
 $(eval $(call RubyBuildPackage,ipaddr,Set of methods to manipulate an IP address,+ruby-socket))
-$(eval $(call RubyBuildPackage,irb,(interactive shell),+ruby-debuglib +ruby-filelib))
-$(eval $(call RubyBuildPackage,json,JSON Implementation for Ruby,+ruby-date +ruby-misc))
+$(eval $(call RubyBuildPackage,irb,(interactive shell),))
+$(eval $(call RubyBuildPackage,json,JSON Implementation for Ruby,+ruby-date +ruby-ostruct))
 $(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread))
-$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns +ruby-misc))
-$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems))
+$(eval $(call RubyBuildPackage,matrix,implementation of Matrix and Vector classes,+ruby-e2mmap))
+$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-mutex_m))
 $(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),))
-$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse))
 $(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
+$(eval $(call RubyBuildPackage,mutex_m,extend objects to be handled like a Mutex,))
 $(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-time +ruby-digest +ruby-filelib +ruby-socket +ruby-stringio +ruby-strscan +ruby-uri))
 $(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net))
 $(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc))
-$(eval $(call RubyBuildPackage,openssl,SSL TLS and general purpose cryptography,+ruby-enc +ruby-multithread +ruby-stringio +libopenssl))
+$(eval $(call RubyBuildPackage,openssl,SSL TLS and general purpose cryptography,+ruby-enc +ruby-ipaddr +ruby-stringio +libopenssl))
+$(eval $(call RubyBuildPackage,ostruct,build custom data structures,))
 $(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc +ruby-time))
 $(eval $(call RubyBuildPackage,patterns,design patterns implementation,))
 $(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-prettyprint +ruby-ripper))
 $(eval $(call RubyBuildPackage,prettyprint,PrettyPrint library,+ruby-etc))
+$(eval $(call RubyBuildPackage,prime,Prime numbers and factorization library,+ruby-forwardable +ruby-patterns))
 $(eval $(call RubyBuildPackage,pstore,file based persistence,+ruby-digest +ruby-enc))
 $(eval $(call RubyBuildPackage,psych,YAML parser and emitter,+ruby-bigdecimal +ruby-date +ruby-enc +ruby-stringio +ruby-strscan +libyaml))
 $(eval $(call RubyBuildPackage,racc,LALR parser generator,))
-$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-fileutils +ruby-multithread +ruby-optparse +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,rake,Rake (make replacement),+ruby-fileutils +ruby-multithread +ruby-optparse +ruby-ostruct +ruby-patterns))
 $(eval $(call RubyBuildPackage,rbconfig,RbConfig,))
 $(eval $(call RubyBuildPackage,rdoc,RDoc produces HTML and command-line documentation for Ruby projects,+ruby-debuglib +ruby-did-you-mean +ruby-erb +ruby-json +ruby-racc +ruby-rake +ruby-ripper +ruby-yaml +ruby-zlib))
 $(eval $(call RubyBuildPackage,readline,support for readline,+libncurses +libreadline))
-$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-enc +ruby-misc +ruby-patterns +ruby-stringio))
-$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb))
+$(eval $(call RubyBuildPackage,rexml,XML toolkit,+ruby-enc +ruby-forwardable +ruby-misc +ruby-stringio +ruby-strscan))
+$(eval $(call RubyBuildPackage,rinda,Linda paradigm implementation,+ruby-drb +ruby-forwardable))
 $(eval $(call RubyBuildPackage,ripper,script parser,))
 $(eval $(call RubyBuildPackage,rss,RSS toolkit,+ruby-net +ruby-nkf +ruby-rexml))
 $(eval $(call RubyBuildPackage,scanf,Implementation of the C function scanf(3),))
 $(eval $(call RubyBuildPackage,sdbm,simple file-based key-value dbm implementation,))
-$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-patterns +ruby-multithread))
-$(eval $(call RubyBuildPackage,socket,socket support,+ruby-multithread))
+$(eval $(call RubyBuildPackage,shell,idiomatic Ruby interface,+ruby-e2mmap +ruby-forwardable +ruby-sync))
+$(eval $(call RubyBuildPackage,socket,socket support,+ruby-misc +ruby-multithread))
 $(eval $(call RubyBuildPackage,stringio,Pseudo `IO` class from/to `String`,))
 $(eval $(call RubyBuildPackage,strscan,Lexical scanning operations on a String,))
+$(eval $(call RubyBuildPackage,sync,two-phase lock with a counter,))
 $(eval $(call RubyBuildPackage,testunit,Gem test-unit,+ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-rexml +ruby-yaml))
 $(eval $(call RubyBuildPackage,time,Extends Time with additional methods for parsing and converting Times,+ruby-date))
+$(eval $(call RubyBuildPackage,thwait,Watches for termination of multiple threads,+ruby-e2mmap))
+$(eval $(call RubyBuildPackage,tracer,Outputs a source level execution trace of a Ruby program,))
 $(eval $(call RubyBuildPackage,unicodenormalize,String additions for Unicode normalization,+ruby-enc +ruby-enc-extra))
 $(eval $(call RubyBuildPackage,uri,library to handle URI,+ruby-enc))
-$(eval $(call RubyBuildPackage,webrick,HTTP server toolkit,+ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig))
+$(eval $(call RubyBuildPackage,webrick,HTTP server toolkit,+ruby-erb +ruby-net +ruby-patterns))
 $(eval $(call RubyBuildPackage,xmlrpc,XML-RPC toolkit,+ruby-rexml +ruby-webrick))
 $(eval $(call RubyBuildPackage,yaml,YAML toolkit,+ruby-dbm +ruby-pstore +ruby-psych))
-$(eval $(call RubyBuildPackage,zlib,compression/decompression library interface,+zlib))
+$(eval $(call RubyBuildPackage,zlib,compression/decompression library interface,))
 $(eval $(call BuildPackage,ruby-stdlib))
 $(eval $(call HostBuild))
diff --git a/lang/ruby/patches/001_fix_isnan_isinf_finite_with_uclibc.patch b/lang/ruby/patches/001_fix_isnan_isinf_finite_with_uclibc.patch
new file mode 100644 (file)
index 0000000..2919ae8
--- /dev/null
@@ -0,0 +1,86 @@
+From 74f94b3e6ebf15b76f3b357e754095412b006e94 Mon Sep 17 00:00:00 2001
+From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Fri, 8 Feb 2019 07:22:55 +0000
+Subject: [PATCH] configure.ac: check finite,isinf,isnan as macros first
+
+[ruby-core:91487] [Bug #15595]
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+---
+ aclocal.m4                    |  1 +
+ configure.ac                  | 13 ++++---------
+ tool/m4/ruby_replace_funcs.m4 | 13 +++++++++++++
+ 3 files changed, 18 insertions(+), 9 deletions(-)
+ create mode 100644 tool/m4/ruby_replace_funcs.m4
+
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -35,6 +35,7 @@ m4_include([tool/m4/ruby_func_attribute.
+ m4_include([tool/m4/ruby_mingw32.m4])
+ m4_include([tool/m4/ruby_prepend_option.m4])
+ m4_include([tool/m4/ruby_prog_gnu_ld.m4])
++m4_include([tool/m4/ruby_replace_funcs.m4])
+ m4_include([tool/m4/ruby_replace_type.m4])
+ m4_include([tool/m4/ruby_rm_recursive.m4])
+ m4_include([tool/m4/ruby_setjmp_type.m4])
+--- a/configure.ac
++++ b/configure.ac
+@@ -946,9 +946,6 @@ main()
+               ac_cv_func_fsync=yes
+               ac_cv_func_seekdir=yes
+               ac_cv_func_telldir=yes
+-              ac_cv_func_isinf=yes
+-              ac_cv_func_isnan=yes
+-              ac_cv_func_finite=yes
+               ac_cv_func_lchown=yes
+               ac_cv_func_link=yes
+               ac_cv_func_readlink=yes
+@@ -999,9 +996,6 @@ main()
+ [netbsd*], [  LIBS="-lm $LIBS"
+               ],
+ [dragonfly*], [       LIBS="-lm $LIBS"
+-              # isinf() and isnan() are macros on DragonFly.
+-              ac_cv_func_isinf=yes
+-              ac_cv_func_isnan=yes
+               ],
+ [aix*],[      LIBS="-lm $LIBS"
+               ac_cv_func_round=no
+@@ -1724,11 +1718,8 @@ AC_REPLACE_FUNCS(dup2)
+ AC_REPLACE_FUNCS(erf)
+ AC_REPLACE_FUNCS(explicit_bzero)
+ AC_REPLACE_FUNCS(ffs)
+-AC_REPLACE_FUNCS(finite)
+ AC_REPLACE_FUNCS(flock)
+ AC_REPLACE_FUNCS(hypot)
+-AC_REPLACE_FUNCS(isinf)
+-AC_REPLACE_FUNCS(isnan)
+ AC_REPLACE_FUNCS(lgamma_r)
+ AC_REPLACE_FUNCS(memmove)
+ AC_REPLACE_FUNCS(nan)
+@@ -1741,6 +1732,10 @@ AC_REPLACE_FUNCS(strlcpy)
+ AC_REPLACE_FUNCS(strstr)
+ AC_REPLACE_FUNCS(tgamma)
++RUBY_REPLACE_FUNC([finite], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isinf], [@%:@include <math.h>])
++RUBY_REPLACE_FUNC([isnan], [@%:@include <math.h>])
++
+ # for missing/setproctitle.c
+ AS_CASE(["$target_os"],
+ [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
+--- /dev/null
++++ b/tool/m4/ruby_replace_funcs.m4
+@@ -0,0 +1,13 @@
++# -*- Autoconf -*-
++dnl RUBY_REPLACE_FUNC [func] [included]
++AC_DEFUN([RUBY_REPLACE_FUNC], [dnl
++    AC_CHECK_DECL([$1],dnl
++        [AC_DEFINE(AS_TR_CPP(HAVE_[$1]))],dnl
++        [AC_REPLACE_FUNCS($1)],dnl
++        [$2])dnl
++])
++
++dnl RUBY_REPLACE_FUNCS [funcs] [included]
++AC_DEFUN([RUBY_REPLACE_FUNCS] [dnl
++    m4_map_args_w([$1], [RUBY_REPLACE_FUNC(], [), [$2]])dnl
++])
index d9acf37093c09f68b378865c3b804a114f11d7df..4e625ff656db04afbec700802e0e201f7ba7835a 100644 (file)
@@ -26,7 +26,7 @@ require_ignore=%w{drb/invokemethod16 foo rubygems/defaults/operating_system win3
                   builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree
                   nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja
                   iconv uconv win32ole gettext/po_parser gettext/mo libxml psych.jar psych_jars jar-dependencies thread minitest/proveit
-               bundler pry
+               bundler pry bcrypt net/http/pipeline capistrano/version rubygems/builder rubygems/format diff/lcs graphviz
        }
 
 builtin_enc=[
index b76745d25bc5e97b2d9086062d69fcd3a1c7deb0..84880565c49ce4361f20c88f271bc0f2fcf748b5 100644 (file)
@@ -32,10 +32,16 @@ function list_ipkg_files {
 }
 
 
-echo "                   Installed in Staging                                             Packages"
 
+set -e
 : ${1:?First arg is staging_dir}
 : ${2:?Second and following args are ruby ipkg packages}
 STAGING_DIR=$1; shift
+(cd "$STAGING_DIR" )
+if ! [ -e "$1" ]; then
+       echo "$1 does not exist!"
+       exit 1
+fi
+printf '%-62s %-62s\n' "Installed in Staging" "From Packages Files"
 diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")
 
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 ddacce0351256a32a23cf95d05e691b38a6191ce..df9b0f5699534a5dc960829474c3cddb7bc2b910 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avahi
 PKG_VERSION:=0.7
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
@@ -273,8 +273,6 @@ CONFIGURE_ARGS+= \
        --disable-dbm \
        --enable-gdbm \
        --enable-libdaemon \
-       $(and $(CONFIG_PACKAGE_libavahi-compat-libdnssd),ifeq ($(BUILD_VARIANT),dbus),\
-               --enable-compat-libdns_sd) \
        --disable-python \
        --disable-pygtk \
        --disable-python-dbus \
@@ -303,6 +301,10 @@ CONFIGURE_ARGS+= \
 endif
 
 ifeq ($(BUILD_VARIANT),dbus)
+ifneq ($(CONFIG_PACKAGE_libavahi-compat-libdnssd),)
+CONFIGURE_ARGS += \
+       --enable-compat-libdns_sd
+endif
 CONFIGURE_ARGS += \
        --enable-dbus
 else
@@ -348,7 +350,7 @@ endef
 
 define Package/libavahi-compat-libdnssd/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so* $(1)/usr/lib/
 endef
 
 define Package/avahi-utils/install
index 35599b90b1dfca1a245a1933e621081a346b7afe..670b385a55bd911f36bd41f0d6a478b023b00465 100644 (file)
@@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=boost
 PKG_VERSION:=1.69.0
 PKG_SOURCE_VERSION:=1_69_0
-PKG_RELEASE:=1
+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/
@@ -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,,))
@@ -500,7 +500,7 @@ define Build/InstallDev
 
        $(INSTALL_DIR) $(1)/usr/lib
        # copies all compiled archive and shared object files
-       $(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/
+       $(CP) -v $(PKG_INSTALL_DIR)/lib/*.{a,so*} $(1)/usr/lib/ || :
 endef
 
 define Host/Install
diff --git a/libs/botan/Makefile b/libs/botan/Makefile
new file mode 100644 (file)
index 0000000..2b5c8af
--- /dev/null
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 2019 rosysong@rosinson.com
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=botan
+PKG_VERSION:=2.10.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
+
+PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
+PKG_BUILD_DIR:=$(BUILD_DIR)/Botan-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://botan.randombit.net/releases/
+PKG_HASH:=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
+
+PKG_USE_MIPS16:=0
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILE:=license.txt
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/botan/Default
+  SUBMENU:=SSL
+  TITLE:=Crypto and TLS for C++11
+  URL:=https://botan.randombit.net
+endef
+
+define Package/botan/Default/description
+  Botan (Japanese for peony) is a cryptography library written in C++11 and
+  released under the permissive Simplified BSD license.
+endef
+
+define Package/libbotan
+  $(call Package/botan/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= (library)
+  ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
+  DEPENDS:=+libstdcpp +libpthread
+endef
+
+define Package/libbotan/description
+  $(call Package/botan/Default/description)
+  This package contains the botan library.
+endef
+
+CONFIGURE_CMD = ./configure.py
+
+CONFIGURE_ARGS = \
+       --cpu="$(ARCH)" \
+       --cc-bin="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
+       --program-suffix="" \
+       --prefix=$(CONFIGURE_PREFIX) \
+       --exec-prefix=$(CONFIGURE_PREFIX) \
+       --bindir=$(CONFIGURE_PREFIX)/bin \
+       --sbindir=$(CONFIGURE_PREFIX)/sbin \
+       --libexecdir=$(CONFIGURE_PREFIX)/lib \
+       --sysconfdir=/etc \
+       --datadir=$(CONFIGURE_PREFIX)/share \
+       --localstatedir=/var \
+       --mandir=$(CONFIGURE_PREFIX)/man \
+       --infodir=$(CONFIGURE_PREFIX)/info \
+       --optimize-for-size \
+       $(DISABLE_IPV6)
+
+
+TARGET_LDFLAGS += \
+       -Wl,--gc-sections,--as-needed \
+       -lpthread
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/botan* $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
+endef
+
+define Package/libbotan/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libbotan))
diff --git a/libs/czmq/Makefile b/libs/czmq/Makefile
new file mode 100644 (file)
index 0000000..8442c5c
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=czmq
+PKG_VERSION:=4.2.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=cfab29c2b3cc8a845749758a51e1dd5f5160c1ef57e2a41ea96e4c2dcc8feceb
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+PKG_LICENSE:=MPLv2
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+PKG_ABI_VERSION:=4
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/autotools.mk
+
+define Package/czmq
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=CZMQ High-level C binding for ZeroMQ
+       URL:=http://czmq.zeromq.org
+       ABI_VERSION:=$(PKG_ABI_VERSION)
+       DEPENDS:=+libzmq +libuuid +libpcre +libmicrohttpd +liblz4 +libcurl
+endef
+
+define Package/czmq/description
+  High-level C binding for ZeroMQ which is high-performance asynchronous messaging
+  library, aimed at use in distributed or concurrent applications.
+endef
+
+TARGET_CFLAGS += --std=c99
+CONFIGURE_ARGS += --without-docs
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/czmq/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zmakecert $(1)/usr/bin/zmakecert
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/
+       $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so
+       $(LN) /usr/lib/libczmq.so.$(PKG_VERSION) $(1)/usr/lib/libczmq.so.$(PKG_ABI_VERSION)
+endef
+
+$(eval $(call BuildPackage,czmq))
index 39c87c6c7d0a18e533caed3a1ad4ec20321a6c31..a4093e1e51ef313089dac68322629f4664dbebe3 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dtc
-PKG_VERSION:=1.4.7
+PKG_VERSION:=1.5.0
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7
+PKG_HASH:=c672e443c9f7e39f5a7c8e602da6777f9ad55ad70de87de300a43828c8050172
 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=GPL
@@ -74,14 +74,12 @@ define Package/libfdt/install
        $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
 endef
 
-TARGET_CFLAGS += \
-       $(FPIC)
-
 # NO_PYTHON is for disabling pylibfdt
 MAKE_FLAGS += \
        PREFIX= \
        NO_PYTHON=1 \
-       CFLAGS="$(TARGET_CFLAGS)"
+       NO_VALGRIND=1 \
+       NO_YAML=1 \
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/dtc/patches/0001-use-cflags-from-build-system.patch b/libs/dtc/patches/0001-use-cflags-from-build-system.patch
new file mode 100644 (file)
index 0000000..15d47c5
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/Makefile.orig    2019-03-15 03:55:48.407966162 +0000
++++ b/Makefile 2019-03-15 03:56:01.320976021 +0000
+@@ -15,10 +15,10 @@ EXTRAVERSION =
+ LOCAL_VERSION =
+ CONFIG_LOCALVERSION =
+-CPPFLAGS = -I libfdt -I .
++CPPFLAGS += -I libfdt -I .
+ WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+       -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
+-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
++CFLAGS += $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
+ BISON = bison
+ LEX = flex
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 d7a4ae9ebfdba01c7a3b231f64a74516b286104a..3270af354f2c1acdc3374fad155ce28fdc2b04a8 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freetype
-PKG_VERSION:=2.9.1
+PKG_VERSION:=2.10.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/freetype
-PKG_HASH:=db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
+PKG_HASH:=fccc62928c65192fff6c98847233b28eb7ce05f12d2fea3f6cc90e8b4e5fbe06
 
 PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
 PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
@@ -51,6 +51,11 @@ CONFIGURE_ARGS += \
        --with-zlib=yes \
        --with-png=yes
 
+HOST_CONFIGURE_ARGS+= \
+       --with-bzip2=no \
+       --with-zlib=no \
+       --with-png=no
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
 endef
index 562d678928988bc58d3101407ce4e27c9e6b7083..88dbc7a93548aab704b453f284c20a0a6f56801f 100644 (file)
@@ -23,10 +23,6 @@ config GNUTLS_HEARTBEAT
        bool "enable DTLS heartbeat support"
        default y
 
-config GNUTLS_OPENPGP
-       bool "enable OPENPGP authentication support"
-       default n
-
 config GNUTLS_SRP
        bool "enable SRP authentication support"
        default n
index f31a5a8936711ccf8e9cfdade35ae69bdfe0e0f3..b494e9606f775f175143c844ebf8ec28bfba9906 100644 (file)
@@ -8,21 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnutls
-PKG_VERSION:=3.6.5
+PKG_VERSION:=3.6.7
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6
-PKG_HASH:=073eced3acef49a3883e69ffd5f0f0b5f46e2760ad86eddc6c0866df4e7abb35
+PKG_HASH:=5b3409ad5aaf239808730d1ee12fdcd148c0be00262c7edf157af655a8a188e2
 #PKG_FIXUP:=autoreconf gettext-version
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 PKG_LICENSE:=LGPLv2.1+
 PKG_CPE_ID:=cpe:/a:gnu:gnutls
 
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 PKG_LIBTOOL_PATHS:=. lib
-PKG_CHECK_FORMAT_SECURITY:=0
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_GNUTLS_ALPN \
@@ -32,7 +32,6 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_GNUTLS_EXT_LIBTASN1 \
        CONFIG_GNUTLS_HEARTBEAT \
        CONFIG_GNUTLS_OCSP \
-       CONFIG_GNUTLS_OPENPGP \
        CONFIG_GNUTLS_PKCS11 \
        CONFIG_GNUTLS_PSK \
        CONFIG_GNUTLS_SRP \
@@ -97,7 +96,7 @@ endef
 define Package/libgnutls
 $(call Package/gnutls/Default)
   TITLE+= (library)
-  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev
+  DEPENDS+= +libnettle +!LIBNETTLE_MINI:libgmp +GNUTLS_EXT_LIBTASN1:libtasn1 +GNUTLS_PKCS11:p11-kit +GNUTLS_CRYPTODEV:kmod-cryptodev +libatomic
 endef
 
 define Package/libgnutls/description
@@ -109,19 +108,23 @@ endef
 CONFIGURE_ARGS+= \
        --enable-shared \
        --enable-static \
+       --disable-doc \
+       --disable-gcc-warnings \
+       --disable-guile \
        --disable-rpath \
+       --disable-seccomp-tests \
+       --disable-tests \
+       --disable-valgrind-tests \
+       \
        --disable-libdane \
-       --with-included-unistring \
-       --disable-guile \
-       --disable-nls \
-       --without-idn \
-       --without-zlib \
+       --disable-ssl2-support \
+       --disable-ssl3-support \
        --enable-local-libopts \
-       --disable-doc \
-       --disable-tests \
+       --without-idn \
        --with-default-trust-store-dir=/etc/ssl/certs/ \
-       --disable-crywrap \
-       --with-librt-prefix="$(LIBRT_ROOT_DIR)/"
+       --with-included-unistring \
+       --with-librt-prefix="$(LIBRT_ROOT_DIR)/" \
+       --with-pic
 
 ifneq ($(CONFIG_GNUTLS_EXT_LIBTASN1),y)
 CONFIGURE_ARGS += --with-included-libtasn1
@@ -155,10 +158,6 @@ ifneq ($(CONFIG_GNUTLS_PSK),y)
 CONFIGURE_ARGS += --disable-psk-authentication
 endif
 
-ifneq ($(CONFIG_GNUTLS_OPENPGP),y)
-CONFIGURE_ARGS += --disable-openpgp-authentication
-endif
-
 ifneq ($(CONFIG_GNUTLS_ANON),y)
 CONFIGURE_ARGS += --disable-anon-authentication
 endif
@@ -175,8 +174,6 @@ ifeq ($(CONFIG_GNUTLS_CRYPTODEV),y)
 CONFIGURE_ARGS += --enable-cryptodev
 endif
 
-TARGET_CFLAGS += $(FPIC)
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
        $(CP) \
diff --git a/libs/google-authenticator-libpam/Makefile b/libs/google-authenticator-libpam/Makefile
new file mode 100644 (file)
index 0000000..978b563
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+PKG_NAME:=google-authenticator-libpam
+PKG_SOURCE_DATE:=2019-01-03
+PKG_RELEASE:=1
+
+PKG_SOURCE_VERSION:=60207b6c4cebf825863043e963bf67f6a0520076
+PKG_SOURCE_URL:=https://codeload.github.com/google/google-authenticator-libpam/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_HASH:=39267ba837f870b3f4cbf9166a76eed35879d3f87d058740f2c0a5e16570bce3
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/google-authenticator-libpam
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libpam +libqrencode
+  TITLE:=Google Authenticator PAM module
+  URL:=https://github.com/google/google-authenticator-libpam
+  MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
+endef
+
+define Package/google-authenticator-libpam/description
+    Google Authenticator PAM module
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/lib/security
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/* $(1)/lib/security/
+endef
+
+define Package/libpam-google-authenticator/install
+       $(INSTALL_DIR) $(1)/usr/lib/security
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/*.so* \
+           $(1)/usr/lib/security/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,google-authenticator-libpam))
index 43f30d510f34935d669a0022385cab41816ed510..f7a0986f70bd6ac40fd7a711f298696212a52254 100644 (file)
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=icu4c
-PKG_VERSION:=63.1
+MAJOR_VERSION:=64
+MINOR_VERSION:=1
+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:=92f1b7b9d51b396679c17f35a2112423361b8da3c1b9de00aa94fd768ae296e6
 
 PKG_LICENSE:=ICU-1.8.1+
 PKG_LICENSE_FILES:=LICENSE
@@ -109,6 +111,11 @@ HOST_CONFIGURE_ARGS:= \
        --enable-dyload \
        --prefix=$(STAGING_DIR_HOSTPKG)
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       mkdir -p $(PKG_BUILD_DIR)/data/out
+endef
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(INSTALL_DIR) $(1)/usr/lib
diff --git a/libs/icu/patches/001-change_optimization_option.patch b/libs/icu/patches/001-change_optimization_option.patch
new file mode 100644 (file)
index 0000000..6914a07
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/runConfigureICU
++++ b/runConfigureICU
+@@ -239,8 +239,8 @@
+         THE_COMP="the GNU C++"
+         CC=gcc; export CC
+         CXX=g++; export CXX
+-        RELEASE_CFLAGS='-O3'
+-        RELEASE_CXXFLAGS='-O3'
++        RELEASE_CFLAGS=' '
++        RELEASE_CXXFLAGS=' '
+         DEBUG_CFLAGS='-g'
+         DEBUG_CXXFLAGS='-g'
+         ;;
diff --git a/libs/jose/Makefile b/libs/jose/Makefile
new file mode 100644 (file)
index 0000000..f515cf8
--- /dev/null
@@ -0,0 +1,74 @@
+#
+# Author: Tibor Dudlák
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=jose
+PKG_VERSION:=10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/latchset/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=5c9cdcfb535c4d9f781393d7530521c72b1dd81caa9934cab6dd752cc7efcd72
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libjose
+  SECTION:=libs
+  TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+  DEPENDS:=+zlib +jansson +libopenssl +libpthread
+  URL:=https://github.com/latchset/jose
+  MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose
+  SECTION:=utils
+  TITLE:=Provides a full crypto stack including key generation, signing and encryption.
+  DEPENDS:=+libjose
+  URL:=https://github.com/latchset/jose
+  MAINTAINER:=Tibor Dudlák <tibor.dudlak@gmail.com>
+endef
+
+define Package/jose/description
+       jose is a command line utility for performing various tasks on JSON
+       Object Signing and Encryption (JOSE) objects. José provides a full
+       crypto stack including key generation, signing and encryption.
+endef
+
+define Package/libjose/description
+       libjose is a library for performing various tasks on JSON
+       Object Signing and Encryption (JOSE) objects. José provides a full
+       crypto stack including key generation, signing and encryption.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR)  $(1)/usr/lib
+       $(INSTALL_DIR)  $(1)/usr/include
+       $(INSTALL_DIR)  $(1)/usr/include/$(PKG_NAME)
+       $(INSTALL_DIR)  $(1)/usr/lib/pkgconfig
+       $(CP)   $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so*   $(1)/usr/lib
+       $(CP)   $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h  $(1)/usr/include/$(PKG_NAME)
+       $(CP)   $(PKG_BUILD_DIR)/*.pc                           $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libjose/install
+       $(INSTALL_DIR)  $(1)/usr/lib
+       $(CP)           $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so*   $(1)/usr/lib/
+endef
+
+define Package/jose/install
+       $(INSTALL_DIR)  $(1)/usr/bin
+       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)          $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libjose))
+$(eval $(call BuildPackage,jose))
diff --git a/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch b/libs/jose/patches/Fix_minor_leak_upstream_198f720.patch
new file mode 100644 (file)
index 0000000..5075760
--- /dev/null
@@ -0,0 +1,33 @@
+From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001
+From: Nathaniel McCallum <npmccallum@redhat.com>
+Date: Fri, 29 Sep 2017 14:49:57 -0400
+Subject: [PATCH] Fix minor FILE* leak
+
+---
+ cmd/jwe/pwd.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h
+index 0b5be54..2f021eb 100644
+--- a/cmd/jwe/pwd.h
++++ b/cmd/jwe/pwd.h
+@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt)
+     nf.c_lflag &= ~ECHO;
+     nf.c_lflag |= ECHONL;
+-    if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
++    if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
++        fclose(tty);
+         return NULL;
++    }
+     fprintf(tty, "%s", prompt);
+@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt)
+     }
+     tcsetattr(fileno(tty), TCSANOW, &of);
++    fclose(tty);
+     return pwd;
+ }
+ #endif
index 648b288acb7deafe0341a8254bb7c2525fbfecfe..430473cd4630bf300cd68d696c5cd5bc7a9da3c6 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keyutils
 PKG_VERSION:=1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://people.redhat.com/dhowells/keyutils/
diff --git a/libs/keyutils/patches/010-reproducible-build.patch b/libs/keyutils/patches/010-reproducible-build.patch
new file mode 100644 (file)
index 0000000..3cf9b54
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -108,7 +108,7 @@ all: keyctl request-key key.dns_resolver
+ ###############################################################################
+ #RPATH = -Wl,-rpath,$(LIBDIR)
+-VCPPFLAGS     := -DPKGBUILD="\"$(shell date -u +%F)\""
++VCPPFLAGS     := -DPKGBUILD="\"for OpenWrt"\"
+ VCPPFLAGS     += -DPKGVERSION="\"keyutils-$(VERSION)\""
+ VCPPFLAGS     += -DAPIVERSION="\"libkeyutils-$(APIVERSION)\""
index d5dee8ac44d64283d9c3046819ba8e41b51c625c..6d579644bc58125c6f19b781c9085cdba2f05836 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libarchive
 PKG_VERSION:=3.3.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.libarchive.org/downloads
diff --git a/libs/libarchive/patches/104-CVE-2019-1000019.patch b/libs/libarchive/patches/104-CVE-2019-1000019.patch
new file mode 100644 (file)
index 0000000..a7df5a2
--- /dev/null
@@ -0,0 +1,55 @@
+From 65a23f5dbee4497064e9bb467f81138a62b0dae1 Mon Sep 17 00:00:00 2001
+From: Daniel Axtens <dja@axtens.net>
+Date: Tue, 1 Jan 2019 16:01:40 +1100
+Subject: [PATCH] 7zip: fix crash when parsing certain archives
+
+Fuzzing with CRCs disabled revealed that a call to get_uncompressed_data()
+would sometimes fail to return at least 'minimum' bytes. This can cause
+the crc32() invocation in header_bytes to read off into invalid memory.
+
+A specially crafted archive can use this to cause a crash.
+
+An ASAN trace is below, but ASAN is not required - an uninstrumented
+binary will also crash.
+
+==7719==ERROR: AddressSanitizer: SEGV on unknown address 0x631000040000 (pc 0x7fbdb3b3ec1d bp 0x7ffe77a51310 sp 0x7ffe77a51150 T0)
+==7719==The signal is caused by a READ memory access.
+    #0 0x7fbdb3b3ec1c in crc32_z (/lib/x86_64-linux-gnu/libz.so.1+0x2c1c)
+    #1 0x84f5eb in header_bytes (/tmp/libarchive/bsdtar+0x84f5eb)
+    #2 0x856156 in read_Header (/tmp/libarchive/bsdtar+0x856156)
+    #3 0x84e134 in slurp_central_directory (/tmp/libarchive/bsdtar+0x84e134)
+    #4 0x849690 in archive_read_format_7zip_read_header (/tmp/libarchive/bsdtar+0x849690)
+    #5 0x5713b7 in _archive_read_next_header2 (/tmp/libarchive/bsdtar+0x5713b7)
+    #6 0x570e63 in _archive_read_next_header (/tmp/libarchive/bsdtar+0x570e63)
+    #7 0x6f08bd in archive_read_next_header (/tmp/libarchive/bsdtar+0x6f08bd)
+    #8 0x52373f in read_archive (/tmp/libarchive/bsdtar+0x52373f)
+    #9 0x5257be in tar_mode_x (/tmp/libarchive/bsdtar+0x5257be)
+    #10 0x51daeb in main (/tmp/libarchive/bsdtar+0x51daeb)
+    #11 0x7fbdb27cab96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
+    #12 0x41dd09 in _start (/tmp/libarchive/bsdtar+0x41dd09)
+
+This was primarly done with afl and FairFuzz. Some early corpus entries
+may have been generated by qsym.
+---
+ libarchive/archive_read_support_format_7zip.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c
+index bccbf8966..b6d1505d3 100644
+--- a/libarchive/archive_read_support_format_7zip.c
++++ b/libarchive/archive_read_support_format_7zip.c
+@@ -2964,13 +2964,7 @@ get_uncompressed_data(struct archive_read *a, const void **buff, size_t size,
+       if (zip->codec == _7Z_COPY && zip->codec2 == (unsigned long)-1) {
+               /* Copy mode. */
+-              /*
+-               * Note: '1' here is a performance optimization.
+-               * Recall that the decompression layer returns a count of
+-               * available bytes; asking for more than that forces the
+-               * decompressor to combine reads by copying data.
+-               */
+-              *buff = __archive_read_ahead(a, 1, &bytes_avail);
++              *buff = __archive_read_ahead(a, minimum, &bytes_avail);
+               if (bytes_avail <= 0) {
+                       archive_set_error(&a->archive,
+                           ARCHIVE_ERRNO_FILE_FORMAT,
diff --git a/libs/libarchive/patches/105-CVE-2019-1000020.patch b/libs/libarchive/patches/105-CVE-2019-1000020.patch
new file mode 100644 (file)
index 0000000..86bbd9d
--- /dev/null
@@ -0,0 +1,55 @@
+From 8312eaa576014cd9b965012af51bc1f967b12423 Mon Sep 17 00:00:00 2001
+From: Daniel Axtens <dja@axtens.net>
+Date: Tue, 1 Jan 2019 17:10:49 +1100
+Subject: [PATCH] iso9660: Fail when expected Rockridge extensions is missing
+
+A corrupted or malicious ISO9660 image can cause read_CE() to loop
+forever.
+
+read_CE() calls parse_rockridge(), expecting a Rockridge extension
+to be read. However, parse_rockridge() is structured as a while
+loop starting with a sanity check, and if the sanity check fails
+before the loop has run, the function returns ARCHIVE_OK without
+advancing the position in the file. This causes read_CE() to retry
+indefinitely.
+
+Make parse_rockridge() return ARCHIVE_WARN if it didn't read an
+extension. As someone with no real knowledge of the format, this
+seems more apt than ARCHIVE_FATAL, but both the call-sites escalate
+it to a fatal error immediately anyway.
+
+Found with a combination of AFL, afl-rb (FairFuzz) and qsym.
+---
+ libarchive/archive_read_support_format_iso9660.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
+index 28acfefbb..bad8f1dfe 100644
+--- a/libarchive/archive_read_support_format_iso9660.c
++++ b/libarchive/archive_read_support_format_iso9660.c
+@@ -2102,6 +2102,7 @@ parse_rockridge(struct archive_read *a, struct file_info *file,
+     const unsigned char *p, const unsigned char *end)
+ {
+       struct iso9660 *iso9660;
++      int entry_seen = 0;
+       iso9660 = (struct iso9660 *)(a->format->data);
+@@ -2257,8 +2258,16 @@ parse_rockridge(struct archive_read *a, struct file_info *file,
+               }
+               p += p[2];
++              entry_seen = 1;
++      }
++
++      if (entry_seen)
++              return (ARCHIVE_OK);
++      else {
++              archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
++                                "Tried to parse Rockridge extensions, but none found");
++              return (ARCHIVE_WARN);
+       }
+-      return (ARCHIVE_OK);
+ }
+ static int
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 8ec8dc2efa39304199133664f187dd2958795563..29264005c6716238f5cd59abc4d0bc3c32cd3e34 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cups
-PKG_VERSION:=2.2.10
+PKG_VERSION:=2.2.11
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.tar.gz
 PKG_SOURCE_URL:=https://github.com/apple/cups/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=77c8b2b3bb7fe8b5fbfffc307f2c817b2d7ec67b657f261a1dd1c61ab81205bb
+PKG_HASH:=f58010813fd6903f690cdb0c0b91e4d1bc9e5b9570c28734229ba3ed2908b76c
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE.txt
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 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__) || \
index 179bc9a78a5151f3671527c0a0e3679f312c4d00..a314125d966e0fd00dd3fb0e1ac73b54620904cc 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libextractor
-PKG_VERSION:=1.8
+PKG_VERSION:=1.9
 PKG_RELEASE:=1
 
 # ToDo:
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=e235a4aa2623fe458f8fcf1dcbb5be4f03df509aacec86a1de1fc7fcca582cfc
+PKG_HASH:=f08f257d26c5e9b503f068d6753c8e55cb76f47f73a81da6ed2bba3de3fee2ff
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
index e7db323276861ef21a124c321bc6f8a24ebb0e81..5f2a7520b35dddd7967c106388ab5bd7b34a6fba 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libgabe
 PKG_VERSION:=0.99
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 
@@ -12,9 +12,9 @@ PKG_LICENSE_FILES:=COPYING
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=https://github.com/schanzen/libgabe.git
-PKG_SOURCE_VERSION:=f72c594eaed35d5a506e8f6c091200a73e17e702
+PKG_SOURCE_VERSION:=a082729326155207312a5fc280d17844b69450f2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=cc5527f7976d904d6c50f40612c5b3d0617342cfc8cf856434a305cfb42e27ff
+PKG_MIRROR_HASH:=74046e8c5657d2e5bcdc0e806983ad4e205a0ed0945f8ab802d7fe564c32e9bd
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
@@ -39,11 +39,12 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/
        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
 endef
 
 define Package/libgabe/install
-# static library only
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libgabe))
index 98b1970f05a98d94fb0c4213b1e8f26b1fb339f5..dcaab6afb6193e4f8b3646d6f897351c85fe31ba 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glog
-PKG_VERSION:=0.3.5
-PKG_RELEASE:=3
+PKG_VERSION:=0.4.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/google/glog/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0
+PKG_HASH:=f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILE:=COPYING
diff --git a/libs/libglog/patches/100-fix-musl-compilation.patch b/libs/libglog/patches/100-fix-musl-compilation.patch
new file mode 100644 (file)
index 0000000..dab64be
--- /dev/null
@@ -0,0 +1,13 @@
+Index: glog-0.4.0/src/symbolize_unittest.cc
+===================================================================
+--- glog-0.4.0.orig/src/symbolize_unittest.cc
++++ glog-0.4.0/src/symbolize_unittest.cc
+@@ -401,7 +401,7 @@ int main(int argc, char **argv) {
+   FLAGS_logtostderr = true;
+   InitGoogleLogging(argv[0]);
+   InitGoogleTest(&argc, argv);
+-#if defined(HAVE_SYMBOLIZE)
++#if defined(HAVE_SYMBOLIZE) && defined(HAVE_STACKTRACE)
+ # if defined(__ELF__)
+   // We don't want to get affected by the callback interface, that may be
+   // used to install some callback function at InitGoogle() time.
index 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 a90d13c575045dd8bad8aa146b3e22deb7123902..af6f1ac9a5bd5bb0d367f1bce4d4b3be390ea03d 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libinput
 PKG_VERSION:=1.7.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.freedesktop.org/software/libinput/
diff --git a/libs/libinput/patches/010-musl-fix.patch b/libs/libinput/patches/010-musl-fix.patch
new file mode 100644 (file)
index 0000000..8117fa8
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/src/libinput.h
++++ b/src/libinput.h
+@@ -29,6 +29,7 @@
+ extern "C" {
+ #endif
++#include <stdarg.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+ #include <libudev.h>
diff --git a/libs/libmaxminddb/Makefile b/libs/libmaxminddb/Makefile
new file mode 100644 (file)
index 0000000..72cbaff
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmaxminddb
+PKG_VERSION:=1.3.2
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/maxmind/libmaxminddb/releases/download/$(PKG_VERSION)/
+PKG_HASH:=e6f881aa6bd8cfa154a44d965450620df1f714c6dc9dd9971ad98f6e04f6c0f0
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libmaxminddb
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A library for working with MaxMind DB files
+  URL:=https://maxmind.github.io/libmaxminddb/
+endef
+
+define Package/libmaxminddb/description
+ The libmaxminddb library provides functions for working MaxMind DB files.
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libmaxminddb/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmdblookup $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libmaxminddb))
index 559a229c9d11f680c5eaec0d86aad82ed319bbb7..30fb23b516003d0e2b8972232977632f44dd9036 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libp11
 PKG_VERSION:=0.4.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -30,7 +30,7 @@ define Package/libp11
   CATEGORY:=Libraries
   TITLE:=PKCS#11 wrapper library
   URL:=https://www.opensc-project.org/opensc/wiki/libp11
-  DEPENDS:=+libopenssl
+  DEPENDS:=+libopenssl +@OPENSSL_ENGINE
   CONFLICTS:=engine_pkcs11
 endef
 
index 9817f0eb57085c46eeb76886c35d2c8038783042..96d144e707d48175e3dcc3ef2ff0b079b143f1f4 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libseccomp
-PKG_VERSION:=2.3.3
+PKG_VERSION:=2.4.0
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
-PKG_HASH:=7fc28f4294cc72e61c529bedf97e705c3acf9c479a8f1a3028d4cd2ca9f3b155
+PKG_HASH:=2e74c7e8b54b340ad5d472e59286c6758e1e1e96c6b43c3dbdc8ddafbf0e525d
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
 
 PKG_BUILD_PARALLEL:=1
@@ -49,6 +49,12 @@ $(call Package/libseccomp/Default)
   DEPENDS+=
 endef
 
+define Package/scmp_sys_resolver
+$(call Package/libseccomp/Default)
+  TITLE+= scmp_sys_resolver
+  DEPENDS+= libseccomp
+endef
+
 define Package/libseccomp/description
  This package contains the seccomp library.
 endef
@@ -71,4 +77,10 @@ define Package/libseccomp/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libseccomp.so.* $(1)/usr/lib/
 endef
 
+define Package/scmp_sys_resolver/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/scmp_sys_resolver $(1)/usr/bin/
+endef
+
 $(eval $(call BuildPackage,libseccomp))
+$(eval $(call BuildPackage,scmp_sys_resolver))
index e86753eb9bd40f6ce66b01884e0f3d5da0929789..74548defbf7c9486166920ccca25186fec5fd1c3 100644 (file)
@@ -29,7 +29,7 @@ define Package/libsigcxx
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=typesafe callback system for standard C++
-  URL:=http://libsigc.sourceforge.net/
+  URL:=https://libsigcplusplus.github.io/libsigcplusplus/
   DEPENDS:=+libstdcpp
 endef
 
index e6ebe56a94390fee7886060f6971d81b07a81dcb..7d9ee48e98af51fe9572bc3354cca996cd09c021 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.
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/erikd/libsndfile.git
-PKG_SOURCE_DATE:=2019-01-10
-PKG_SOURCE_VERSION:=58c64581407f5547a84292a10933e16c03e4956d
-PKG_MIRROR_HASH:=e78509db376c6194bb9e356bd792658124b7970789ce22afa4fbf4545f61a3a9
+PKG_SOURCE_DATE:=2019-03-08
+PKG_SOURCE_VERSION:=5056a77fdae85f96eee4dff82af462db5a5c341e
+PKG_MIRROR_HASH:=5a695b64885ed3c41910029116de8b713118be6349554685fe53997316c369ea
 
 PKG_LICENSE:=LGPLv2.1
 PKG_LICENSE_FILES:=COPYING
index e872fe9d6d2249ac81cd794131f9a93e2bd0a73d..d26ef00e5b03e9fcf56d52af8663e0ba29a1d383 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libsoup
 PKG_VERSION:=2.65.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.65
@@ -35,13 +35,16 @@ define Package/libsoup
 endef
 
 CONFIGURE_ARGS += \
+               --disable-debug \
                --disable-glibtest \
                --disable-gtk-doc-html \
+               --disable-introspection \
                --disable-more-warnings \
                --disable-vala \
                --without-apache-httpd \
                --without-gnome \
-               --without-gssapi
+               --without-gssapi \
+               --without-ntlm-auth
 
 define package/libsoup/decription
 Libsoup is an HTTP library implementation in C
index 1d6c3479fb56ae84feb154a5714dfc6ebd0d7d12..c2d29ae3a3e75eea4959fd8550bd70a2d23fb379 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libssh2
-PKG_VERSION:=1.8.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.8.2
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.libssh2.org/download
-PKG_HASH:=39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4
+PKG_HASH:=088307d9f6b6c4b8c13f34602e8ff65d21c2dc4d55284dfe15d502c4ee190d67
 
 PKG_FIXUP:=autoreconf
 
@@ -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 8d0152166eb951e5baa23a4b4853991c8f75f4c1..e20fcada5d2d551a5dc4da0f677a527ca3bac8e8 100644 (file)
@@ -9,11 +9,13 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtasn1
 PKG_VERSION:=4.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
 PKG_HASH:=7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca
+
+PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
 PKG_LICENSE:=LGPLv2.1+
 PKG_LICENSE_FILES:=COPYING.LIB
 
@@ -26,7 +28,6 @@ define Package/libtasn1
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=An ASN.1 and DER structures manipulation library
-  MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
   URL:=https://www.gnu.org/software/libtasn1/
 endef
 
@@ -35,12 +36,13 @@ define Package/libtasn1/description
  Distinguish Encoding Rules (DER) manipulation.
 endef
 
-TARGET_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += -Wl,--gc-sections
 
 CONFIGURE_ARGS += \
-               --enable-shared \
-               --disable-gcc-warnings \
-               --enable-static
+       --disable-doc \
+       --disable-gcc-warnings \
+       --disable-ld-version-script \
+       --disable-valgrind-tests
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin
index 07263f133b17ead5d599ecc2a263f6515c8ce12f..af9f278b21b4543a0410cfd87a4e18425f4ace84 100644 (file)
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libudev-fbsd
 
-PKG_RELEASE:=2
-PKG_VERSION:=20160820
-PKG_SOURCE_VERSION:=1f21323b817e70253d3c04bc8bedd61c477d0544
+PKG_RELEASE:=1
+PKG_VERSION:=20171216
+PKG_SOURCE_VERSION:=fa190fdf0b22a41b5f42e3a722f754c08ad7b337
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=cc885851c97dcaef65d7f4fb0899ed1a01412b02e44851476ac47ce4da024d0b
+PKG_MIRROR_HASH:=d4638099fd288a293a165304541eb9c01e828bb358a0091caa02c1327c20964b
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/jiixyj/libudev-fbsd.git
 
diff --git a/libs/libudev-fbsd/patches/001-fix-unused.patch b/libs/libudev-fbsd/patches/001-fix-unused.patch
deleted file mode 100644 (file)
index 1949433..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/src/libudev.c
-+++ b/src/libudev.c
-@@ -354,7 +354,7 @@ udev_device_get_subsystem(struct udev_de
- const char *
- udev_device_get_sysattr_value(
--    struct udev_device *udev_device __unused, const char *sysattr)
-+     __attribute__ ((unused))struct udev_device *udev_device, const char *sysattr)
- {
-       (void)sysattr;
-       LOG("stub: udev_device_get_sysattr_value %s\n", sysattr);
-@@ -469,7 +469,7 @@ udev_device_get_parent_with_subsystem_de
- }
- struct udev_enumerate *
--udev_enumerate_new(struct udev *udev __unused)
-+udev_enumerate_new( __attribute__ ((unused))struct udev *udev)
- {
-       LOG("udev_enumerate_new\n");
-       struct udev_enumerate *u = calloc(1, sizeof(struct udev_enumerate));
-@@ -538,7 +538,7 @@ udev_enumerate_get_list_entry(struct ude
- int
- udev_enumerate_add_match_sysname(
--    struct udev_enumerate *udev_enumerate __unused, const char *sysname)
-+     __attribute__ ((unused))struct udev_enumerate *udev_enumerate, const char *sysname)
- {
-       (void)sysname;
-       LOG("stub: udev_enumerate_add_match_sysname %s\n", sysname);
---- a/src/libudev.h
-+++ b/src/libudev.h
-@@ -24,8 +24,8 @@ void udev_unref(struct udev *udev);
- char const *udev_device_get_devnode(struct udev_device *udev_device);
- dev_t udev_device_get_devnum(struct udev_device *udev_device);
- char const *udev_device_get_property_value(
--    struct udev_device *dummy __unused, char const *property);
--struct udev *udev_device_get_udev(struct udev_device *dummy __unused);
-+     __attribute__ ((unused))struct udev_device *dummy, char const *property);
-+struct udev *udev_device_get_udev( __attribute__ ((unused))struct udev_device *dummy);
- struct udev_device *udev_device_new_from_syspath(
-     struct udev *udev, char const *syspath);
- struct udev_device *udev_device_new_from_devnum(
diff --git a/libs/libudev-fbsd/patches/002-replace-nitems.patch b/libs/libudev-fbsd/patches/002-replace-nitems.patch
deleted file mode 100644 (file)
index 7f4d0de..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/libudev.c
-+++ b/src/libudev.c
-@@ -175,7 +175,7 @@ populate_properties_list(struct udev_dev
-       struct udev_list_entry **list_end = &udev_device->properties_list;
--      for (unsigned i = 0; i < nitems(ids); ++i) {
-+      for (unsigned i = 0; i < (sizeof(ids) / sizeof(ids[0])); ++i) {
-               char const *id = ids[i];
-               struct udev_list_entry *le;
index 9aec7b9b30c8dda78879b7e81fd0f22c6f12cd82..19efcb3c926568421348c31de2fa1657fdaafc6c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -11,6 +11,7 @@ install(TARGETS udev LIBRARY DESTINATION
+@@ -26,6 +26,7 @@ install(TARGETS udev LIBRARY DESTINATION
  install(FILES libudev.h DESTINATION include)
  
  set(PKG_CONFIG_NAME libudev)
index de3ae3524de70e657fd60b0c068461975e4f73ff..1e77bf4c71f4e3642a9530656ae1933b977bf6a0 100644 (file)
@@ -1,9 +1,8 @@
-diff -ruN libudev-fbsd-20160820/src/libudev.h libudev-fbsd-20160820.mod/src/libudev.h
---- libudev-fbsd-20160820/src/libudev.h        2017-11-17 16:46:56.705435146 +0100
-+++ libudev-fbsd-20160820.mod/src/libudev.h    2017-11-17 16:48:07.276021522 +0100
-@@ -11,6 +11,11 @@
- #include <fcntl.h>
- #include <unistd.h>
+--- a/src/libudev.h
++++ b/src/libudev.h
+@@ -7,6 +7,11 @@
+ extern "C" {
+ #endif
  
 +
 +#ifdef __cplusplus
@@ -13,12 +12,14 @@ diff -ruN libudev-fbsd-20160820/src/libudev.h libudev-fbsd-20160820.mod/src/libu
  struct udev;
  struct udev_device;
  struct udev_list_entry;
-@@ -83,4 +88,8 @@
-     struct udev_monitor *udev_monitor);
- void udev_monitor_unref(struct udev_monitor *udev_monitor);
+@@ -76,6 +81,10 @@ void udev_monitor_unref(struct udev_moni
  
-+#ifdef __cplusplus
-+} /* extern "C" */
+ #ifdef __cplusplus
+ } /* extern "C" */
 +#endif
 +
++#ifdef __cplusplus
++} /* extern "C" */
+ #endif
  #endif
index aaa56f3cfd5e4c2ce20fd37f3a657c1923ba56ad..7592c8b6916e34ad45747bb02a052f92dcd962ec 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/libudev.c
 +++ b/src/libudev.c
-@@ -130,6 +130,12 @@ udev_device_get_devnum(struct udev_devic
+@@ -139,6 +139,12 @@ udev_device_get_devnum(struct udev_devic
  }
  
  char const *
@@ -15,7 +15,7 @@
        LOG("udev_device_get_property_value %s\n", property);
 --- a/src/libudev.h
 +++ b/src/libudev.h
-@@ -30,6 +30,7 @@ struct udev_device *udev_device_new_from
+@@ -31,6 +31,7 @@ struct udev_device *udev_device_new_from
      struct udev *udev, char const *syspath);
  struct udev_device *udev_device_new_from_devnum(
      struct udev *udev, char type, dev_t devnum);
index bc12d66a6f76ac9bb241d01deff1a14675adb6e3..47ed81ac29b72a609b0d183cfc7ccc4b9bc88327 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/libudev.c
 +++ b/src/libudev.c
-@@ -26,6 +26,7 @@ struct udev_device {
+@@ -35,6 +35,7 @@ struct udev_device {
        struct udev *udev;
        int refcount;
        char syspath[32];
@@ -8,7 +8,7 @@
        dev_t devnum;
        char const *sysname;
        char const *action;
-@@ -115,6 +116,29 @@ udev_device_new_from_devnum(struct udev
+@@ -124,6 +125,29 @@ udev_device_new_from_devnum(struct udev
        return NULL;
  }
  
@@ -38,7 +38,7 @@
  char const *
  udev_device_get_devnode(struct udev_device *udev_device)
  {
-@@ -132,6 +156,20 @@ udev_device_get_devnum(struct udev_devic
+@@ -141,6 +165,20 @@ udev_device_get_devnum(struct udev_devic
  char const *
  udev_device_get_driver(struct udev_device *udev_device)
  {
@@ -61,7 +61,7 @@
  
 --- a/src/libudev.h
 +++ b/src/libudev.h
-@@ -30,6 +30,8 @@ struct udev_device *udev_device_new_from
+@@ -31,6 +31,8 @@ struct udev_device *udev_device_new_from
      struct udev *udev, char const *syspath);
  struct udev_device *udev_device_new_from_devnum(
      struct udev *udev, char type, dev_t devnum);
index 86e6b96cd9ac01f7f643cef61819dd0557f694e5..f65a2e97817f3ad31e8ee850b10f97a6463805c9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/libudev.c
 +++ b/src/libudev.c
-@@ -162,7 +162,7 @@ udev_device_get_driver(struct udev_devic
+@@ -171,7 +171,7 @@ udev_device_get_driver(struct udev_devic
                char driverlnk[32];
                snprintf(driverlnp, sizeof(driverlnp), "%s/driver",
                         udev_device->sysfspath);
@@ -9,7 +9,7 @@
                {
                        char *drivernm;
                        drivernm = strrchr(driverlnk, '/');
-@@ -600,6 +600,18 @@ udev_enumerate_add_match_property(struct
+@@ -612,6 +612,18 @@ udev_enumerate_add_match_property(struct
            value);
        return -1;
  }
@@ -30,7 +30,7 @@
  udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
 --- a/src/libudev.h
 +++ b/src/libudev.h
-@@ -59,6 +59,8 @@ int udev_enumerate_add_match_sysname(
+@@ -60,6 +60,8 @@ int udev_enumerate_add_match_sysname(
      struct udev_enumerate *udev_enumerate, char const *sysname);
  int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate,
      char const *property, char const *value);
index a086394695ae8eab88660030b0a23bdd9350cb16..407a717c6090ab4a8a7357163d9a1dfe5858565b 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libupnp
 PKG_VERSION:=1.8.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/pupnp
@@ -45,7 +45,7 @@ define Package/libupnp-sample/description
 TVcontrolpoint & tvdevice sample applications run inside /etc/upnp-tvdevice/
 endef
 
-TARGET_CFLAGS += -flto
+TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -flto
 TARGET_LDFLAGS += -flto
 
 CONFIGURE_VARS += ac_cv_lib_compat_ftime=no
index 1abddb1605faaff8f8392116009ca71af783190e..7f4b46f4e6c46493b01c832340dc4a28356ec456 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libuwsc
-PKG_VERSION:=3.2.0
+PKG_VERSION:=3.2.1
 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:=24433f952faead4ace902f93895c02ebe0646c3a32487d7e94a0e47674349973
+PKG_HASH:=0dca131a1046327b6020a190ba8e6d46f62a8367ea91f4e85bf5bfde2aa11415
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
index 0ab9e223de537fb6ce1bbc8e497de223cd3f6926..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
@@ -76,6 +76,7 @@ TARGET_CFLAGS += -flto
 TARGET_LDFLAGS += -largp -Wl,--gc-sections
 
 CONFIGURE_ARGS+= \
+       --disable-bpf \
        --disable-doxygen-doc \
        --disable-libdvbv5 \
        --disable-qv4l2 \
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)
diff --git a/libs/libyubikey/Makefile b/libs/libyubikey/Makefile
new file mode 100644 (file)
index 0000000..b66def3
--- /dev/null
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libyubikey
+PKG_VERSION:=1.13
+PKG_RELEASE:=1
+
+PKG_SOURCE:=libyubikey-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c/Releases
+PKG_HASH:=04edd0eb09cb665a05d808c58e1985f25bb7c5254d2849f36a0658ffc51c3401
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/libyubikey-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libyubikey
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=The Yuibco yubikey c library
+  URL:=https://developers.yubico.com/yubico-c/
+endef
+
+define Package/libyubikey/description
+       The c library for the yubikey from Yubico
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/yubikey.h $(STAGING_DIR)/usr/include
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static
+
+define Package/libyubikey/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/modhex $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykgenerate $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykparse $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libyubikey.so.* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,libyubikey))
diff --git a/libs/log4cplus/Makefile b/libs/log4cplus/Makefile
new file mode 100644 (file)
index 0000000..9167da7
--- /dev/null
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
+# Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=log4cplus
+PKG_VERSION:=2.0.3
+PKG_RELEASE:=1
+PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/
+PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73
+
+PKG_LICENSE_FILE:=LICENSE
+CMAKE_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/log4cplus
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=A simple to use C++ logging API
+  URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
+  DEPENDS:=+libstdcpp
+endef
+
+define Package/log4cplus/description
+  log4cplus is a simple to use C++11 logging API providing thread--safe,
+  flexible, and arbitrarily granular control over log management and
+  configuration. It is modeled after the Java log4j API.
+endef
+
+TARGET_CFLAGS += -flto
+
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
+CMAKE_OPTIONS += \
+       -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
+       -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
+       -DUNICODE:BOOL=OFF \
+       -DWITH_ICONV:BOOL=OFF
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/log4cplus $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+define Package/log4cplus/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,log4cplus))
diff --git a/libs/measurement-kit/Makefile b/libs/measurement-kit/Makefile
new file mode 100644 (file)
index 0000000..c345e81
--- /dev/null
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=measurement-kit
+PKG_VERSION:=0.10.0
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=c31ff8a457dfdbb2d42ef60f82646e508f6649107f15eec31fc22bc140ceb8e6
+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/measurement-kit
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=C++14 library that implements open network measurement methodologies
+  URL:=https://measurement-kit.github.io/
+  DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +ca-bundle
+endef
+
+define Package/measurement-kit/description
+ Measurement Kit is a C++14 library that implements open network measurement methodologies (performance, censorship, etc.)
+endef
+
+CONFIGURE_ARGS+= --with-ca-bundle=/etc/ssl/cert.pem
+
+define Build/Configure
+       ( cd $(PKG_BUILD_DIR); ./autogen.sh )
+       $(call Build/Configure/Default)
+endef
+
+define Package/measurement-kit/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/measurement_kit $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,measurement-kit))
diff --git a/libs/measurement-kit/patches/001-remove-ca-download.patch b/libs/measurement-kit/patches/001-remove-ca-download.patch
new file mode 100644 (file)
index 0000000..b3b9ecc
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -3,7 +3,7 @@
+ set -e
+ export LC_ALL=C  # Stable sorting regardless of the locale
+
+-. script/autogen.d/ca-bundle
++#. script/autogen.d/ca-bundle
+ . script/autogen.d/geoip
+
+ no_geoip=0
+@@ -82,7 +82,7 @@ gen_executables noinst_PROGRAMS example
+ gen_executables ALL_TESTS test libtest_main.la                   >> include.am
+
+ if [ $no_geoip -ne 1 ]; then
+-    autogen_get_ca_bundle
++    #autogen_get_ca_bundle
+     autogen_get_geoip
+ fi
+
diff --git a/libs/measurement-kit/patches/002-replace-curl-with-wget.patch b/libs/measurement-kit/patches/002-replace-curl-with-wget.patch
new file mode 100644 (file)
index 0000000..c7d7112
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/script/autogen.d/geoip
++++ b/script/autogen.d/geoip
+@@ -5,13 +5,13 @@ autogen_get_geoip() {
+     echo "* Fetching geoip databases"
+     base=https://geolite.maxmind.com/download/geoip/database
+     if [ ! -f "country.mmdb" ]; then
+-        curl -fsSLO $base/GeoLite2-Country.tar.gz
++        command -v curl && curl -fsSLO $base/GeoLite2-Country.tar.gz || wget $base/GeoLite2-Country.tar.gz
+         tar -xf GeoLite2-Country.tar.gz
+         mv GeoLite2-Country_20??????/GeoLite2-Country.mmdb country.mmdb
+         rm -rf GeoLite2-Country_20??????
+     fi
+     if [ ! -f "asn.mmdb" ]; then
+-        curl -fsSLO $base/GeoLite2-ASN.tar.gz
++        command -v curl && curl -fsSLO $base/GeoLite2-ASN.tar.gz || wget $base/GeoLite2-ASN.tar.gz
+         tar -xf GeoLite2-ASN.tar.gz
+         mv GeoLite2-ASN_20??????/GeoLite2-ASN.mmdb asn.mmdb
+         rm -rf GeoLite2-ASN_20??????
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..724af38
--- /dev/null
@@ -0,0 +1,138 @@
+#
+# 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:=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/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 +librt +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 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
+#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
+       $(FIND) $(PKG_BUILD_DIR)/nss  -type f -name *.h \
+           -exec $(CP) -a {} $(1)/usr/include/nss/ \;
+       $(FIND) $(PKG_BUILD_DIR)/nss -type f -name *.so \
+           -exec $(CP) -a {} $(1)/usr/lib/ \;
+       $(FIND) $(PKG_BUILD_DIR)/nss -type f -name *.pc \
+           -exec $(CP) -a {} $(1)/usr/lib/pkgconfig/ \;
+endef
+
+define Package/nss-utils/install
+       $(INSTALL_DIR) \
+        $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/nss/cmd/certutil/build_dir/certutil $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/nss/cmd/pk12util/build_dir/pk12util $(1)/usr/bin
+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)/nss/lib/nss/build_dir/libnss3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/nss/lib/smime/build_dir/libsmime3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/nss/lib/ssl/build_dir/libssl3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/nss/lib/util/build_dir/libnssutil3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/nss/lib/softoken/build_dir/libsoftokn3.so $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/nss/lib/freebl/build_dir/$(OS_TARGET)_SINGLE_SHLIB/libfreeblpriv3.so $(1)/usr/lib/
+#      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 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 7fc1f03c83e149ca826f708384fa1d3526f94725..d1f3302874cdd6851c51f3a23cf89bbb52d41388 100644 (file)
@@ -8,13 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.14
+PKG_VERSION:=0.23.15
 PKG_RELEASE:=1
-PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1cb9fa6d237539f25f62f4c3d4ec71a1c8e0772957ec45ec5af92134129e0d70
-PKG_SOURCE_URL:=https://github.com/p11-glue/$(PKG_NAME)/releases/download/$(PKG_VERSION)
+PKG_HASH:=f7c139a0c77a1f0012619003e542060ba8f94799a0ef463026db390680e4d798
+PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION)
+
+PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+PKG_LICENSE:=BSD-3c
+PKG_LICENSE_FILES:=COPYING
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -35,9 +38,12 @@ define Package/p11-kit/description
   way that they are discoverable.
 endef
 
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 CONFIGURE_ARGS+= \
-       --without-libffi \
-       --disable-trust-module
+       --disable-debug \
+       --disable-trust-module \
+       --without-libffi
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/p11-kit-1/p11-kit/
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 4ecab8eb1da2f7aad9787a6203362a5d7ab4c978..d04e13a48aa16a4bd6f39fa0871c1c7343a5b9ba 100644 (file)
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pixman
-PKG_VERSION:=0.36.0
+PKG_VERSION:=0.38.0
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=1ca19c8d4d37682adfbc42741d24977903fec1169b4153ec05bb690d4acf9fae
+PKG_HASH:=a7592bef0156d7c27545487a52245669b00cf7e70054505381cff2136d890ca8
 PKG_SOURCE_URL:=https://www.cairographics.org/releases
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index 926b6f9471a8c6a7c79fd636e28816e5222237a1..37b1c7c0a4867aafc7ee0d270e4cb1f91a7da89c 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=postgresql
-PKG_VERSION:=9.6.11
+PKG_VERSION:=9.6.12
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=PostgreSQL
@@ -16,12 +16,12 @@ PKG_SOURCE_URL:=\
        http://ftp.postgresql.org/pub/source/v$(PKG_VERSION) \
        ftp://ftp.postgresql.org/pub/source/v$(PKG_VERSION)
 
-PKG_HASH:=38250adc69a1e8613fb926c894cda1d01031391a03648894b9a6e13ff354a530
+PKG_HASH:=2e8c8446ba94767bda8a26cf5a2152bf0ae68a86aaebf894132a763084579d84
 
 PKG_USE_MIPS16:=0
 PKG_FIXUP:=autoreconf
 PKG_MACRO_PATHS:=config
-PKG_BUILD_DEPENDS += readline/host postgresql/host
+PKG_BUILD_DEPENDS:=readline/host postgresql/host
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
index 6199766c37859676ef757b731b7d692a7e35fbba..e1f61e962d5abc83f63a681795ea3ee0260f74c7 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)
@@ -43,6 +43,9 @@ define Package/libprotobuf-c/description
   internal RPC protocols and file formats.
 endef
 
+HOST_CONFIGURE_ARGS += \
+       --disable-protoc
+
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
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 b1f55baeaae7a366451a7e8acdecb498614c7054..fd4507d7411db7dc560d968b694c4a80cadbe8c2 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vips
 PKG_VERSION:=8.7.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/libvips/libvips/releases/download/v$(PKG_VERSION)
diff --git a/libs/vips/patches/010-reproducible-build.patch b/libs/vips/patches/010-reproducible-build.patch
new file mode 100644 (file)
index 0000000..54ef6c1
--- /dev/null
@@ -0,0 +1,20 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Reviewed-By: Laszlo Boszormenyi (GCS) <gcs@debian.org>
+Last-Update: 2018-07-24
+
+--- vips-8.6.4.orig/configure.ac
++++ vips-8.6.4/configure.ac
+@@ -26,7 +26,11 @@ VIPS_MAJOR_VERSION=vips_major_version()
+ VIPS_MINOR_VERSION=vips_minor_version()
+ VIPS_MICRO_VERSION=vips_micro_version()
+ VIPS_VERSION=vips_version()
+-VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
++if test "x$SOURCE_DATE_EPOCH" = "x"; then
++  VIPS_VERSION_STRING=$VIPS_VERSION-`date -u -r ChangeLog`
++else
++  VIPS_VERSION_STRING=$VIPS_VERSION-`LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH"`
++fi
+ # libtool library versioning ... not user-visible (except as part of the
+ # library file name) and does not correspond to major/minor/micro above
diff --git a/libs/yubico-pam/Makefile b/libs/yubico-pam/Makefile
new file mode 100644 (file)
index 0000000..69fe4a6
--- /dev/null
@@ -0,0 +1,51 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yubico-pam
+PKG_VERSION:=2.26
+PKG_RELEASE:=1
+
+PKG_SOURCE:=pam_yubico-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-pam/Releases
+PKG_HASH:=2de96495963fefd72b98243952ca5d5ec513e702c596e54bc667ef6b5e252966
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_BUILD_DEPENDS:=ykclient ykpers libyubikey libpam curl
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/pam_yubico-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/yubico-pam
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=The Yuibco PAM module
+       URL:=https://developers.yubico.com/yubico-pam/
+       DEPENDS:=+ykclient +ykpers +libyubikey +libpam +curl
+endef
+
+define Package/yubico-pam/description
+       The Yubico PAM module provides an easy way to integrate the YubiKey 
+       into your existing user authentication infrastructure.
+endef
+       
+CONFIGURE_VARS +=      YKPERS_CFLAGS=-I$(STAGING_DIR)/usr/include \
+                       YKPERS_LIBS=-L$(STAGING_DIR)/usr/lib \
+                       LDFLAGS="-Wl,-rpath-link,$(STAGING_DIR)/usr/lib \
+                                 -L$(STAGING_DIR)/usr/lib"
+
+CONFIGURE_ARGS += --without-ldap \
+                 --enable-shared \
+                 --disable-static \
+
+define Build/Compile
+    $(call Build/Compile/Default, \
+       LDFLAGS="-L$(STAGING_DIR)/usr/lib -lykpers-1")
+endef
+
+define Package/yubico-pam/install
+       $(INSTALL_DIR) $(1)/lib/security
+       $(CP) $(PKG_BUILD_DIR)/.libs/pam_yubico.so* $(1)/lib/security
+endef
+
+$(eval $(call BuildPackage,yubico-pam,+ykclient,+ykpers,+libyubikey))
index 0fbf74fba7993abfcd55b251b176985beee1483c..71768f0cea0ddf8230f0f2779efca38e68253e53 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot
-PKG_VERSION:=2.3.4
-PKG_RELEASE:=2
+PKG_VERSION:=2.3.5.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
-PKG_HASH:=d91b76eff8df6185c1799f1b279f780105bdeeea27e3286b42f4cab18efbef05
+PKG_HASH:=d78f9d479e3b2caa808160f86bfec1c9c7b46344d8b14b88f5fa9bbbf8c7c33f
 PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
 PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
index 529413f63f849d25bdc1c5ac3873befc6d3dacd2..ecb00a77bf5a8a220f09c0db19324de47fabc770 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/src/lib-dcrypt/dcrypt-openssl.c b/src/lib-dcrypt/dcrypt-openssl.c
-index c2dbd30..201ab40 100644
 --- a/src/lib-dcrypt/dcrypt-openssl.c
 +++ b/src/lib-dcrypt/dcrypt-openssl.c
 @@ -20,6 +20,7 @@
@@ -10,8 +8,24 @@ index c2dbd30..201ab40 100644
  #include "dcrypt.h"
  #include "dcrypt-private.h"
  
-diff --git a/src/lib-ssl-iostream/iostream-openssl-context.c b/src/lib-ssl-iostream/iostream-openssl-context.c
-index e3c902e..ad6a9c1 100644
+--- 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)
+               ENGINE_finish(dovecot_openssl_engine);
+               dovecot_openssl_engine = NULL;
+       }
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       /* 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)
+       ERR_free_strings();
+ #ifdef HAVE_OPENSSL_CLEANUP
+       OPENSSL_cleanup();
++#endif
+ #endif
+       return FALSE;
+ }
 --- a/src/lib-ssl-iostream/iostream-openssl-context.c
 +++ b/src/lib-ssl-iostream/iostream-openssl-context.c
 @@ -6,6 +6,9 @@
index 164ec4ef1f277b32c6f50e6558bb6d72c86c2f4d..9859c7328be32310774b92af6c1c2a57c3bc8a74 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,17 +78,21 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -75,10 +78,12 @@ bool dovecot_openssl_common_global_unref(void)
        if (--openssl_init_refcount > 0)
                return TRUE;
  
                dovecot_openssl_engine = NULL;
        }
 +#endif
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
        /* OBJ_cleanup() is called automatically by EVP_cleanup() in
           newer versions. Doesn't hurt to call it anyway. */
-       OBJ_cleanup();
+@@ -86,7 +91,9 @@ bool dovecot_openssl_common_global_unref(void)
  #ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
        SSL_COMP_free_compression_methods();
  #endif
@@ -69,7 +70,7 @@
        EVP_cleanup();
        CRYPTO_cleanup_all_ex_data();
  #ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT
-@@ -107,6 +114,7 @@ bool dovecot_openssl_common_global_unref(void)
+@@ -109,6 +116,7 @@ bool dovecot_openssl_common_global_unref(void)
  int dovecot_openssl_common_global_set_engine(const char *engine,
                                             const char **error_r)
  {
@@ -77,7 +78,7 @@
        if (dovecot_openssl_engine != NULL)
                return 1;
  
-@@ -128,5 +136,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
+@@ -130,5 +138,6 @@ int dovecot_openssl_common_global_set_engine(const char *engine,
                dovecot_openssl_engine = NULL;
                return -1;
        }
index 10396db2a0b0cbc11fac34c4cf9c393148720967..25330a3b1468e07fc90176fc37e6402f5ea79548 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fdm
-PKG_VERSION:=1.9
-PKG_RELEASE:=4
-PKG_LICENSE:=BSD-2-Clause
+PKG_VERSION:=2.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/nicm/fdm/releases/download/$(PKG_VERSION)
-PKG_HASH:=16416c38a9a7e32d187220cc5ae61a51463d5e4e47419c5c513f422523d39914
+PKG_HASH:=06b28cb6b792570bc61d7e29b13d2af46b92fea77e058b2b17e11e8f7ed0cea4
 
-PKG_FIXUP:=autoreconf
+PKG_MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
+PKG_LICENSE:=BSD-2-Clause
 
+PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -28,7 +29,6 @@ define Package/fdm
   CATEGORY:=Mail
   TITLE:=fetch mail and deliver
   URL:=https://github.com/nicm/fdm
-  MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
   MENU:=1
   DEPENDS:=+tdb +zlib +libopenssl +FDM_WITH_PCRE:libpcre
   USERID:=_fdm=99:_fdm=99
@@ -42,14 +42,9 @@ define Package/fdm/description
 endef
 
 ifdef CONFIG_FDM_WITH_PCRE
-       EXTRA_CFLAGS := -DPCRE
-       EXTRA_LDFLAGS += -lpcre
+       CONFIGURE_ARGS += --enable-pcre
 endif
 
-MAKE_FLAGS += \
-       PREFIX="/usr" \
-       $(if $(CONFIG_FDM_WITH_PCRE),PCRE=1)
-
 define Package/fdm/config
        source "$(SOURCE)/Config.in"
 endef
diff --git a/mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch b/mail/fdm/patches/010-Compat-fixes-from-Rosen-Penev.patch
deleted file mode 100644 (file)
index 4a92725..0000000
+++ /dev/null
@@ -1,388 +0,0 @@
-From eb7461e4ceab14020b3a129d826e4ee86f9da8c6 Mon Sep 17 00:00:00 2001
-From: Nicholas Marriott <nicholas.marriott@gmail.com>
-Date: Tue, 26 Jun 2018 12:19:25 +0100
-Subject: [PATCH] Compat fixes from Rosen Penev.
-
----
- Makefile.am     |   6 +
- compat/base64.c | 317 ++++++++++++++++++++++++++++++++++++++++++++++++
- fdm.h           |  18 +++
- 3 files changed, 343 insertions(+), 2 deletions(-)
- create mode 100644 compat/base64.c
-
-diff --git a/Makefile.am b/Makefile.am
-index a4ebbf3..fb25d33 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -110,6 +110,9 @@ dist_fdm_SOURCES = \
-       lex.c
- nodist_fdm_SOURCES =
-+if NO_B64_NTOP
-+nodist_fdm_SOURCES += compat/base64.c
-+endif
- if NO_STRLCAT
- nodist_fdm_SOURCES += compat/strlcat.c
- endif
-diff --git a/compat/base64.c b/compat/base64.c
-new file mode 100644
-index 0000000..4e44d6a
---- /dev/null
-+++ b/compat/base64.c
-@@ -0,0 +1,317 @@
-+/*    $OpenBSD: base64.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $      */
-+
-+/*
-+ * Copyright (c) 1996 by Internet Software Consortium.
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
-+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
-+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-+ * SOFTWARE.
-+ */
-+
-+/*
-+ * Portions Copyright (c) 1995 by International Business Machines, Inc.
-+ *
-+ * International Business Machines, Inc. (hereinafter called IBM) grants
-+ * permission under its copyrights to use, copy, modify, and distribute this
-+ * Software with or without fee, provided that the above copyright notice and
-+ * all paragraphs of this notice appear in all copies, and that the name of IBM
-+ * not be used in connection with the marketing of any product incorporating
-+ * the Software or modifications thereof, without specific, written prior
-+ * permission.
-+ *
-+ * To the extent it has a right to do so, IBM grants an immunity from suit
-+ * under its patents, if any, for the use, sale or manufacture of products to
-+ * the extent that such products are used for performing Domain Name System
-+ * dynamic updates in TCP/IP networks by means of the Software.  No immunity is
-+ * granted for any product per se or for any other function of any product.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-+ * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
-+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
-+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
-+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
-+ */
-+
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <arpa/nameser.h>
-+
-+#include <ctype.h>
-+#include <resolv.h>
-+#include <stdio.h>
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include "fdm.h"
-+
-+static const char Base64[] =
-+      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-+static const char Pad64 = '=';
-+
-+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
-+   The following encoding technique is taken from RFC 1521 by Borenstein
-+   and Freed.  It is reproduced here in a slightly edited form for
-+   convenience.
-+
-+   A 65-character subset of US-ASCII is used, enabling 6 bits to be
-+   represented per printable character. (The extra 65th character, "=",
-+   is used to signify a special processing function.)
-+
-+   The encoding process represents 24-bit groups of input bits as output
-+   strings of 4 encoded characters. Proceeding from left to right, a
-+   24-bit input group is formed by concatenating 3 8-bit input groups.
-+   These 24 bits are then treated as 4 concatenated 6-bit groups, each
-+   of which is translated into a single digit in the base64 alphabet.
-+
-+   Each 6-bit group is used as an index into an array of 64 printable
-+   characters. The character referenced by the index is placed in the
-+   output string.
-+
-+                         Table 1: The Base64 Alphabet
-+
-+      Value Encoding  Value Encoding  Value Encoding  Value Encoding
-+          0 A            17 R            34 i            51 z
-+          1 B            18 S            35 j            52 0
-+          2 C            19 T            36 k            53 1
-+          3 D            20 U            37 l            54 2
-+          4 E            21 V            38 m            55 3
-+          5 F            22 W            39 n            56 4
-+          6 G            23 X            40 o            57 5
-+          7 H            24 Y            41 p            58 6
-+          8 I            25 Z            42 q            59 7
-+          9 J            26 a            43 r            60 8
-+         10 K            27 b            44 s            61 9
-+         11 L            28 c            45 t            62 +
-+         12 M            29 d            46 u            63 /
-+         13 N            30 e            47 v
-+         14 O            31 f            48 w         (pad) =
-+         15 P            32 g            49 x
-+         16 Q            33 h            50 y
-+
-+   Special processing is performed if fewer than 24 bits are available
-+   at the end of the data being encoded.  A full encoding quantum is
-+   always completed at the end of a quantity.  When fewer than 24 input
-+   bits are available in an input group, zero bits are added (on the
-+   right) to form an integral number of 6-bit groups.  Padding at the
-+   end of the data is performed using the '=' character.
-+
-+   Since all base64 input is an integral number of octets, only the
-+         -------------------------------------------------                       
-+   following cases can arise:
-+   
-+       (1) the final quantum of encoding input is an integral
-+           multiple of 24 bits; here, the final unit of encoded
-+         output will be an integral multiple of 4 characters
-+         with no "=" padding,
-+       (2) the final quantum of encoding input is exactly 8 bits;
-+           here, the final unit of encoded output will be two
-+         characters followed by two "=" padding characters, or
-+       (3) the final quantum of encoding input is exactly 16 bits;
-+           here, the final unit of encoded output will be three
-+         characters followed by one "=" padding character.
-+   */
-+
-+int
-+b64_ntop(src, srclength, target, targsize)
-+      u_char const *src;
-+      size_t srclength;
-+      char *target;
-+      size_t targsize;
-+{
-+      size_t datalength = 0;
-+      u_char input[3];
-+      u_char output[4];
-+      int i;
-+
-+      while (2 < srclength) {
-+              input[0] = *src++;
-+              input[1] = *src++;
-+              input[2] = *src++;
-+              srclength -= 3;
-+
-+              output[0] = input[0] >> 2;
-+              output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
-+              output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-+              output[3] = input[2] & 0x3f;
-+
-+              if (datalength + 4 > targsize)
-+                      return (-1);
-+              target[datalength++] = Base64[output[0]];
-+              target[datalength++] = Base64[output[1]];
-+              target[datalength++] = Base64[output[2]];
-+              target[datalength++] = Base64[output[3]];
-+      }
-+    
-+      /* Now we worry about padding. */
-+      if (0 != srclength) {
-+              /* Get what's left. */
-+              input[0] = input[1] = input[2] = '\0';
-+              for (i = 0; i < srclength; i++)
-+                      input[i] = *src++;
-+      
-+              output[0] = input[0] >> 2;
-+              output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
-+              output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
-+
-+              if (datalength + 4 > targsize)
-+                      return (-1);
-+              target[datalength++] = Base64[output[0]];
-+              target[datalength++] = Base64[output[1]];
-+              if (srclength == 1)
-+                      target[datalength++] = Pad64;
-+              else
-+                      target[datalength++] = Base64[output[2]];
-+              target[datalength++] = Pad64;
-+      }
-+      if (datalength >= targsize)
-+              return (-1);
-+      target[datalength] = '\0';      /* Returned value doesn't count \0. */
-+      return (datalength);
-+}
-+
-+/* skips all whitespace anywhere.
-+   converts characters, four at a time, starting at (or after)
-+   src from base - 64 numbers into three 8 bit bytes in the target area.
-+   it returns the number of data bytes stored at the target, or -1 on error.
-+ */
-+
-+int
-+b64_pton(src, target, targsize)
-+      char const *src;
-+      u_char *target;
-+      size_t targsize;
-+{
-+      int tarindex, state, ch;
-+      u_char nextbyte;
-+      char *pos;
-+
-+      state = 0;
-+      tarindex = 0;
-+
-+      while ((ch = (unsigned char)*src++) != '\0') {
-+              if (isspace(ch))        /* Skip whitespace anywhere. */
-+                      continue;
-+
-+              if (ch == Pad64)
-+                      break;
-+
-+              pos = strchr(Base64, ch);
-+              if (pos == 0)           /* A non-base64 character. */
-+                      return (-1);
-+
-+              switch (state) {
-+              case 0:
-+                      if (target) {
-+                              if (tarindex >= targsize)
-+                                      return (-1);
-+                              target[tarindex] = (pos - Base64) << 2;
-+                      }
-+                      state = 1;
-+                      break;
-+              case 1:
-+                      if (target) {
-+                              if (tarindex >= targsize)
-+                                      return (-1);
-+                              target[tarindex]   |=  (pos - Base64) >> 4;
-+                              nextbyte = ((pos - Base64) & 0x0f) << 4;
-+                              if (tarindex + 1 < targsize)
-+                                      target[tarindex+1] = nextbyte;
-+                              else if (nextbyte)
-+                                      return (-1);
-+                      }
-+                      tarindex++;
-+                      state = 2;
-+                      break;
-+              case 2:
-+                      if (target) {
-+                              if (tarindex >= targsize)
-+                                      return (-1);
-+                              target[tarindex]   |=  (pos - Base64) >> 2;
-+                              nextbyte = ((pos - Base64) & 0x03) << 6;
-+                              if (tarindex + 1 < targsize)
-+                                      target[tarindex+1] = nextbyte;
-+                              else if (nextbyte)
-+                                      return (-1);
-+                      }
-+                      tarindex++;
-+                      state = 3;
-+                      break;
-+              case 3:
-+                      if (target) {
-+                              if (tarindex >= targsize)
-+                                      return (-1);
-+                              target[tarindex] |= (pos - Base64);
-+                      }
-+                      tarindex++;
-+                      state = 0;
-+                      break;
-+              }
-+      }
-+
-+      /*
-+       * We are done decoding Base-64 chars.  Let's see if we ended
-+       * on a byte boundary, and/or with erroneous trailing characters.
-+       */
-+
-+      if (ch == Pad64) {                      /* We got a pad char. */
-+              ch = (unsigned char)*src++;     /* Skip it, get next. */
-+              switch (state) {
-+              case 0:         /* Invalid = in first position */
-+              case 1:         /* Invalid = in second position */
-+                      return (-1);
-+
-+              case 2:         /* Valid, means one byte of info */
-+                      /* Skip any number of spaces. */
-+                      for (; ch != '\0'; ch = (unsigned char)*src++)
-+                              if (!isspace(ch))
-+                                      break;
-+                      /* Make sure there is another trailing = sign. */
-+                      if (ch != Pad64)
-+                              return (-1);
-+                      ch = (unsigned char)*src++;             /* Skip the = */
-+                      /* Fall through to "single trailing =" case. */
-+                      /* FALLTHROUGH */
-+
-+              case 3:         /* Valid, means two bytes of info */
-+                      /*
-+                       * We know this char is an =.  Is there anything but
-+                       * whitespace after it?
-+                       */
-+                      for (; ch != '\0'; ch = (unsigned char)*src++)
-+                              if (!isspace(ch))
-+                                      return (-1);
-+
-+                      /*
-+                       * Now make sure for cases 2 and 3 that the "extra"
-+                       * bits that slopped past the last full byte were
-+                       * zeros.  If we don't check them, they become a
-+                       * subliminal channel.
-+                       */
-+                      if (target && tarindex < targsize &&
-+                          target[tarindex] != 0)
-+                              return (-1);
-+              }
-+      } else {
-+              /*
-+               * We ended by seeing the end of the string.  Make sure we
-+               * have no partial bytes lying around.
-+               */
-+              if (state != 0)
-+                      return (-1);
-+      }
-+
-+      return (tarindex);
-+}
-diff --git a/fdm.h b/fdm.h
-index 5de799c..abc52e0 100644
---- a/fdm.h
-+++ b/fdm.h
-@@ -84,6 +84,18 @@ extern char *__progname;
- #define INFTIM -1
- #endif
-+#ifndef WAIT_ANY
-+#define WAIT_ANY -1
-+#endif
-+
-+#ifndef GLOB_BRACE
-+#define GLOB_BRACE 0
-+#endif
-+
-+#ifndef ACCESSPERMS
-+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
-+#endif
-+
- #ifndef __dead
- #define __dead __attribute__ ((__noreturn__))
- #endif
-@@ -707,6 +719,12 @@ size_t             strlcpy(char *, const char *, size_t);
- size_t                 strlcat(char *, const char *, size_t);
- #endif
-+#ifndef HAVE_B64_NTOP
-+/* base64.c */
-+int b64_ntop(src, srclength, target, targsize);
-+int b64_pton(src, target, targsize);
-+#endif
-+
- /* shm.c */
- char          *shm_path(struct shm *);
- void          *shm_create(struct shm *, size_t);
--- 
-2.17.1
-
diff --git a/mail/fdm/patches/010-ntop-fix.patch b/mail/fdm/patches/010-ntop-fix.patch
new file mode 100644 (file)
index 0000000..e324795
--- /dev/null
@@ -0,0 +1,9 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -123,6 +123,3 @@ endif
+ if NO_STRTONUM
+ nodist_fdm_SOURCES += compat/strtonum.c
+ endif
+-if NO_B64_NTOP
+-nodist_fdm_SOURCES += compat/base64.c
+-endif
index 9ce23642af47ee9042d5ec2c2e5eba78323f996a..be914733c156df464e5321abd4f9de2354fac159 100644 (file)
@@ -1,4 +1,4 @@
-From f6c656c5c0368b2fb4284af0484c3bedfc7ae42c Mon Sep 17 00:00:00 2001
+From 3aa079c4885d89257c5033b4992011511b603150 Mon Sep 17 00:00:00 2001
 From: Rosen Penev <rosenp@gmail.com>
 Date: Tue, 26 Jun 2018 14:14:34 -0700
 Subject: [PATCH] Fix compile with OpenSSL 1.1.0
@@ -6,23 +6,20 @@ Subject: [PATCH] Fix compile with OpenSSL 1.1.0
 OpenSSL 1.1.0 deprecared SSL_library_init and SSL_load_error_strings.
 They're part of OPENSSL_init_ssl now.
 ---
- fdm.c | 5 +++++
- 1 file changed, 5 insertions(+)
+ fdm.c | ++
+ 1 file changed, 2 insertions(+)
 
 diff --git a/fdm.c b/fdm.c
-index cdf8383..9355b91 100644
+index cdf8383..6721bbd 100644
 --- a/fdm.c
 +++ b/fdm.c
-@@ -717,8 +717,13 @@ retry:
+@@ -717,8 +717,10 @@ retry:
        }
        conf.lock_file = lock;
  
-+
 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
        SSL_library_init();
        SSL_load_error_strings();
-+#else
-+      OPENSSL_init_ssl(0, NULL);
 +#endif
  
        /* Filter account list. */
diff --git a/mail/fdm/patches/040-openssl-1.1.patch b/mail/fdm/patches/040-openssl-1.1.patch
deleted file mode 100644 (file)
index 5df8b28..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 070cee8d1efba1ca260777a204fba7cdfe676ca5 Mon Sep 17 00:00:00 2001
-From: Nicholas Marriott <nicholas.marriott@gmail.com>
-Date: Tue, 17 Jan 2017 23:14:03 +0000
-Subject: [PATCH] Look for OPENSSL_init_ssl, from Tomasz Miasko.
-
----
- configure.ac | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5793c2d..161040c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -93,11 +93,16 @@ if test "x$found_libcrypto" = xno; then
-       AC_MSG_ERROR("libcrypto not found")
- fi
- AC_SEARCH_LIBS(
--      SSL_library_init,
-+      OPENSSL_init_ssl,
-       [ssl],
-       found_libssl=yes,
-       found_libssl=no
- )
-+AC_SEARCH_LIBS(
-+      SSL_library_init,
-+      [ssl],
-+      found_libssl=yes
-+)
- if test "x$found_libssl" = xno; then
-       AC_MSG_ERROR("libssl not found")
- fi
index 00ff88339bd7203dd3340bbf2a124b77c73a9f53..dbd7185161a1fe4d6503fc9db00512c5425037ab 100644 (file)
@@ -9,17 +9,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=msmtp
-PKG_VERSION:=1.8.2
+PKG_VERSION:=1.8.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
-PKG_HASH:=d1185c1969ed00d0e2c57dbcd5eb09a9f82156042b21309d558f761978a58793
+PKG_HASH:=3cb2eefd33d048f0f82de100ef39a494e44fd1485e376ead31f733d2f36b92b4
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:marlam:msmtp
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
index f9282394ae3642ac704335873281bb246059bd67..f11951225937ab93e20c8ada0a9c9859caee43c2 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mutt
-PKG_VERSION:=1.11.2
+PKG_VERSION:=1.11.4
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=ftp://ftp.mutt.org/pub/mutt/ \
                https://bitbucket.org/mutt/mutt/downloads/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=da5cd4c39f228914d3933d8cf3a017c8271fdd9b9d81c6e4fc42ad22e1a28723
+PKG_HASH:=b651357ea6c8762178080493991c77ecb111d916d171d422500257ab48be2801
 
 PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net>
 PKG_LICENSE:=GPL-2.0+
index 8c4a85ab72ca64187c7f9ddc83d668825b0c74d1..d28479aa321d3cf9981e3d6edc8b063015921a1c 100644 (file)
@@ -8,16 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dovecot-pigeonhole
-PKG_VERSION_PLUGIN:=0.5.4
+PKG_VERSION_PLUGIN:=0.5.5
 PKG_VERSION_DOVECOT:=$(shell make --no-print-directory -C ../dovecot/ val.PKG_VERSION V=s)
 PKG_VERSION:=$(PKG_VERSION_DOVECOT)-$(PKG_VERSION_PLUGIN)
-PKG_RELEASE:=4
+PKG_RELEASE:=1
 
 DOVECOT_VERSION:=2.3
 
 PKG_SOURCE:=dovecot-$(DOVECOT_VERSION)-pigeonhole-$(PKG_VERSION_PLUGIN).tar.gz
 PKG_SOURCE_URL:=https://pigeonhole.dovecot.org/releases/$(DOVECOT_VERSION)
-PKG_HASH:=547999e67a001abc5e654c7e35653d3fe057fa9a47a24257e39a79c41ef08516
+PKG_HASH:=cbaa106e1c2b23824420efdd6a9f8572c64c8dccf75a3101a899b6ddb25149a5
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL
 
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 25a22410f555a35232057ecc47bb9e7300a3e3d0..e6ffcec4ce70baefad22e65db285a61519b77146 100644 (file)
@@ -8,27 +8,27 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=crtmpserver
-PKG_REV:=b6fdcdb953d1e99c48a0c37a8c80f2cad2db443b
-PKG_VERSION:=2012-07-18+git-$(PKG_REV)
-PKG_RELEASE:=4
+PKG_SOURCE_DATE:=2015-10-04
+PKG_SOURCE_VERSION:=b866fffca37c3b967a8878499cd2b91aa2587f34
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/j0sh/crtmpserver/tar.gz/$(PKG_REV)?
-PKG_HASH:=e210eeb99d39334e7beb0a1be27dcf23d1f851383f87cf63d7fb98209ef96cee
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/shiretu/crtmpserver/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=3744bef060129fda6f7902eb64f566b0d5049864dc542b2882c550b083ef82aa
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_PARALLEL:=1
 
-include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/crtmpserver
   SECTION:=multimedia
   CATEGORY:=Multimedia
-  DEPENDS:=$(CXX_DEPENDS) +libopenssl +liblua
+  DEPENDS:=+libstdcpp +libopenssl +liblua
   TITLE:=C++ RTMP Server
 endef
 
diff --git a/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch b/multimedia/crtmpserver/patches/010-link-crypt-for-lua.patch
deleted file mode 100644 (file)
index cc49523..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -72,7 +72,7 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
diff --git a/multimedia/crtmpserver/patches/020-add-rpath.patch b/multimedia/crtmpserver/patches/020-add-rpath.patch
deleted file mode 100644 (file)
index 1ea8320..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -31,8 +31,8 @@ OPTIMIZATIONS = -O3
- COMPILE_FLAGS = $(FPIC) $(OPTIMIZATIONS) $(CFLAGS)
- #linking flags
--dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,"\$$ORIGIN"
--dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,"\$$ORIGIN"
-+dynamic_lib_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-soname,$(DYNAMIC_LIB_PREFIX)$(1)$(DYNAMIC_LIB_SUFIX) -Wl,-rpath,/usr/lib/crtmpserver
-+dynamic_exec_flags = $(FPIC) $(OPTIMIZATIONS) -Wl,-rpath,/usr/lib/crtmpserver
- #compile switches
- PLATFORM_DEFINES = \
index 2975f000c4dc578d2a9862cb3ed2ff18f806f2f4..6580adcd59a21d48961c43445ff6f329e3f24b24 100644 (file)
                        -- the application will also be known by that names. It is optional
                        --aliases=
                        --{
-@@ -89,13 +89,6 @@ configuration=
+@@ -87,13 +87,6 @@ configuration=
+                                       port=1935,
+                                       protocol="inboundRtmp"
                                },
-                               {
-                                       ip="0.0.0.0",
+-                              {
+-                                      ip="0.0.0.0",
 -                                      port=8081,
 -                                      protocol="inboundRtmps",
 -                                      sslKey="server.key",
 -                                      sslCert="server.crt"
 -                              },
--                              {
--                                      ip="0.0.0.0",
+                               {
+                                       ip="0.0.0.0",
                                        port=8080,
-                                       protocol="inboundRtmpt"
-                 },
-@@ -184,6 +177,7 @@ configuration=
+@@ -206,6 +199,7 @@ configuration=
                        name="samplefactory",
                        description="asdsadasdsa",
                        protocol="dynamiclinklibrary",
diff --git a/multimedia/crtmpserver/patches/040-syslog.patch b/multimedia/crtmpserver/patches/040-syslog.patch
new file mode 100644 (file)
index 0000000..d45776d
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/sources/common/src/utils/logging/syslogloglocation.cpp
++++ b/sources/common/src/utils/logging/syslogloglocation.cpp
+@@ -35,8 +35,6 @@ SyslogLogLocation::SyslogLogLocation(Variant &configuration, string identifier,
+       _priorities[_WARNING_] = LOG_WARNING;
+       _priorities[_ERROR_] = LOG_ERR;
+       _priorities[_FATAL_] = LOG_ERR;
+-      _priorities[_PROD_ACCESS_] = LOG_ERR;
+-      _priorities[_PROD_ERROR_] = LOG_ERR;
+       _specificLevel = specificLevel;
+       _enforceLoggerName = (_configuration[CONF_LOG_APPENDER_NAME] != "");
+       _pDefualtFormatter = NULL;
diff --git a/multimedia/crtmpserver/patches/040-use-select.patch b/multimedia/crtmpserver/patches/040-use-select.patch
deleted file mode 100644 (file)
index 380208e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/builders/make/linux.mk
-+++ b/builders/make/linux.mk
-@@ -38,7 +38,7 @@ dynamic_exec_flags = $(FPIC) $(OPTIMIZAT
- PLATFORM_DEFINES = \
-       -DLINUX \
-       -DLITTLE_ENDIAN_BYTE_ALIGNED \
--      -DNET_EPOLL
-+      -DNET_SELECT
- SSL_BASE=/usr/local
diff --git a/multimedia/crtmpserver/patches/050-add-missing-make-defines.patch b/multimedia/crtmpserver/patches/050-add-missing-make-defines.patch
deleted file mode 100644 (file)
index 25694b8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/builders/make/compile.mk
-+++ b/builders/make/compile.mk
-@@ -58,7 +58,7 @@ DEFINES = $(PLATFORM_DEFINES) $(FEATURES
- #library paths
- SSL_INCLUDE=-I$(SSL_BASE)/include
--SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto
-+SSL_LIB=-L$(SSL_BASE)/lib -lssl -lcrypto -ldl
- #lua
- LUA_INCLUDE=-I$(PROJECT_BASE_PATH)/3rdparty/lua-dev
-@@ -72,25 +72,25 @@ TINYXML_OBJS = $(TINYXML_SRCS:.cpp=.tiny
- #common
- COMMON_INCLUDE=$(LUA_INCLUDE) $(TINYXML_INCLUDE) $(SSL_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/common/include
--COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) -llua -ltinyxml -lcrypt
-+COMMON_LIBS=$(SSL_LIB) -L$(OUTPUT_DYNAMIC) $(PROJECT_BASE_PATH)/builders/make/output/dynamic/liblua.so -ltinyxml -lcrypt -ldl
- COMMON_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/common/src -type f -name "*.cpp")
- COMMON_OBJS = $(COMMON_SRCS:.cpp=.common.o)
- #thelib
- THELIB_INCLUDE=$(COMMON_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/thelib/include
--THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon
-+THELIB_LIBS=$(COMMON_LIBS) -L$(OUTPUT_DYNAMIC) -lcommon -ldl
- THELIB_SRCS = $(shell find $(PROJECT_BASE_PATH)/sources/thelib/src -type f -name "*.cpp")
- THELIB_OBJS = $(THELIB_SRCS:.cpp=.thelib.o)
- #tests
- TESTS_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/tests/include
--TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib
-+TESTS_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl
- TESTS_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/tests/src -type f -name "*.cpp")
- TESTS_OBJS=$(TESTS_SRCS:.cpp=.tests.o)
- #crtmpserver
- CRTMPSERVER_INCLUDE=$(THELIB_INCLUDE) -I$(PROJECT_BASE_PATH)/sources/crtmpserver/include
--CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib
-+CRTMPSERVER_LIBS=$(THELIB_LIBS) -L$(OUTPUT_DYNAMIC) -lthelib -ldl
- CRTMPSERVER_SRCS=$(shell find $(PROJECT_BASE_PATH)/sources/crtmpserver/src -type f -name "*.cpp")
- CRTMPSERVER_OBJS_DYNAMIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_dynamic.o)
- CRTMPSERVER_OBJS_STATIC=$(CRTMPSERVER_SRCS:.cpp=.crtmpserver_static.o)
diff --git a/multimedia/crtmpserver/patches/060-add-missing-includes.patch b/multimedia/crtmpserver/patches/060-add-missing-includes.patch
deleted file mode 100644 (file)
index c5241c2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/sources/common/src/utils/logging/fileloglocation.cpp
-+++ b/sources/common/src/utils/logging/fileloglocation.cpp
-@@ -17,6 +17,7 @@
-  *  along with crtmpserver.  If not, see <http://www.gnu.org/licenses/>.
-  */
-+#include <ctime>
- #include "utils/logging/fileloglocation.h"
- #include "utils/lua/luautils.h"
diff --git a/multimedia/crtmpserver/patches/070-disable-apple-streaming.patch b/multimedia/crtmpserver/patches/070-disable-apple-streaming.patch
new file mode 100644 (file)
index 0000000..cde14fe
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/builders/make/apps.mk
++++ b/builders/make/apps.mk
+@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
+ %.vptests.o: %.cpp
+       $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
+-ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
+-ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
+-applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
++ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
++ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
++applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
diff --git a/multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch b/multimedia/crtmpserver/patches/070-missing-include-gcc-47.patch
deleted file mode 100644 (file)
index 534046f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/3rdparty/tinyxml/tinyxml.h
-+++ b/3rdparty/tinyxml/tinyxml.h
-@@ -39,6 +39,7 @@ distribution.
- #include <string>
- #include <iostream>
- #include <sstream>
-+#include "lstate.h"
- using namespace std;
- // Help out windows:
diff --git a/multimedia/crtmpserver/patches/080-disable-apple-streaming.patch b/multimedia/crtmpserver/patches/080-disable-apple-streaming.patch
deleted file mode 100644 (file)
index cde14fe..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/builders/make/apps.mk
-+++ b/builders/make/apps.mk
-@@ -110,6 +110,6 @@ vptests: thelib $(VPTESTS_OBJS)
- %.vptests.o: %.cpp
-       $(CXXCOMPILER) $(COMPILE_FLAGS) $(DEFINES) $(VPTESTS_INCLUDE) -c $< -o $@
--ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPLESTREAMINGCLIENT_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
--ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPLESTREAMINGCLIENT -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
--applications: thelib admin applestreamingclient appselector flvplayback proxypublish samplefactory stresstest vptests
-+ALL_APPS_OBJS= $(ADMIN_OBJS) $(APPSELECTOR_OBJS) $(FLVPLAYBACK_OBJS) $(PROXYPUBLISH_OBJS) $(SAMPLEFACTORY_OBJS) $(STRESSTEST_OBJS) $(VPTESTS_OBJS)
-+ACTIVE_APPS= -DHAS_APP_ADMIN -DHAS_APP_APPSELECTOR -DHAS_APP_FLVPLAYBACK -DHAS_APP_PROXYPUBLISH -DHAS_APP_SAMPLEFACTORY -DHAS_APP_STRESSTEST -DHAS_APP_VPTESTS
-+applications: thelib admin appselector flvplayback proxypublish samplefactory stresstest vptests
diff --git a/multimedia/crtmpserver/patches/080-fix-define.patch b/multimedia/crtmpserver/patches/080-fix-define.patch
new file mode 100644 (file)
index 0000000..f835fc9
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/sources/thelib/include/protocols/ts/basetsappprotocolhandler.h
++++ b/sources/thelib/include/protocols/ts/basetsappprotocolhandler.h
+@@ -18,7 +18,7 @@
+  */
+-#if defined HAS_PROTOCOL_TS && defined HAS_MEDIA_TS
++#if defined HAS_PROTOCOL_TS || defined HAS_MEDIA_TS
+ #ifndef _BASETSAPPPROTOCOLHANDLER_H
+ #define       _BASETSAPPPROTOCOLHANDLER_H
diff --git a/multimedia/crtmpserver/patches/080-musl-uint32_t.patch b/multimedia/crtmpserver/patches/080-musl-uint32_t.patch
deleted file mode 100644 (file)
index 51d6712..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
---- a/sources/common/include/platform/linux/max.h
-+++ b/sources/common/include/platform/linux/max.h
-@@ -21,87 +21,7 @@
- #ifndef _MAX_H
- #define _MAX_H
--#ifdef UINT64_MAX
--#undef UINT64_MAX
--#endif
--
--#ifdef INT64_MAX
--#undef INT64_MAX
--#endif
--
--#ifdef UINT32_MAX
--#undef UINT32_MAX
--#endif
--
--#ifdef INT32_MAX
--#undef INT32_MAX
--#endif
--
--#ifdef UINT16_MAX
--#undef UINT16_MAX
--#endif
--
--#ifdef INT16_MAX
--#undef INT16_MAX
--#endif
--
--#ifdef UINT8_MAX
--#undef UINT8_MAX
--#endif
--
--#ifdef INT8_MAX
--#undef INT8_MAX
--#endif
--
--
--
--#ifndef UINT64_MAX
--#define UINT64_MAX ((uint64_t)(0xffffffffffffffffULL))
--#endif
--
--#ifndef INT64_MAX
--#define INT64_MAX  ((int64_t)(0x7fffffffffffffffLL))
--#endif
--
--#ifndef INT64_MIN
--#define INT64_MIN  ((int64_t)(0x8000000000000000LL))
--#endif
--
--#ifndef UINT32_MAX
--#define UINT32_MAX ((uint32_t)(0xffffffffUL))
--#endif
--
--#ifndef INT32_MAX
--#define INT32_MAX  ((int32_t)(0x7fffffffL))
--#endif
--
--#ifndef INT32_MIN
--#define INT32_MIN  ((int32_t)(0x80000000L))
--#endif
--
--#ifndef UINT16_MAX
--#define UINT16_MAX ((uint16_t)(0xffff))
--#endif
--
--#ifndef INT16_MAX
--#define INT16_MAX  ((int16_t)(0x7fff))
--#endif
--
--#ifndef INT16_MIN
--#define INT16_MIN  ((int16_t)(0x8000))
--#endif
--
--#ifndef UINT8_MAX
--#define UINT8_MAX  ((uint8_t)(0xff))
--#endif
--
--#ifndef INT8_MAX
--#define INT8_MAX   ((int8_t)(0x7f))
--#endif
--
--#ifndef INT8_MIN
--#define INT8_MIN   ((int8_t)(0x80))
--#endif
-+#include <stdint.h>
- #endif /* _MAX_H */
- #endif /* LINUX */
index dfc92462f8c6f05f389e9e13fed9b255864601d3..19ba6716d6af9536609fb3fa33f344f7ea143b8e 100644 (file)
@@ -27,7 +27,7 @@
        delete[] _pIV;
        delete[] _pKey;
  }
-@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Vari
+@@ -60,11 +59,9 @@ bool InboundAESProtocol::Initialize(Variant &parameters) {
        _inputBuffer.IgnoreAll();
        _tempBuffer.IgnoreAll();
  
@@ -42,7 +42,7 @@
  
        return true;
  }
-@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData
+@@ -105,14 +102,14 @@ bool InboundAESProtocol::SignalInputData(IOBuffer &buffer) {
        int decryptedFinalSize = 0;
        uint32_t padding = 0;
  
  };
  
  DLLEXP void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut,
+--- /dev/null
++++ b/sources/common/include/utils/misc/libcrypto-compat.h
+@@ -0,0 +1,26 @@
++#ifndef LIBCRYPTO_COMPAT_H
++#define LIBCRYPTO_COMPAT_H
++
++#include <openssl/opensslv.h>
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
++#include <openssl/bn.h>
++#include <openssl/dh.h>
++#include <openssl/evp.h>
++#include <openssl/hmac.h>
++
++int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
++void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
++int DH_set_length(DH *dh, long length);
++
++EVP_MD_CTX *EVP_MD_CTX_new(void);
++void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
++#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
++
++HMAC_CTX *HMAC_CTX_new(void);
++void HMAC_CTX_free(HMAC_CTX *ctx);
++#define HMAC_CTX_reset HMAC_CTX_cleanup
++
++#endif /* OPENSSL_VERSION_NUMBER */
++
++#endif /* LIBCRYPTO_COMPAT_H */
 --- a/sources/common/src/utils/misc/crypto.cpp
 +++ b/sources/common/src/utils/misc/crypto.cpp
 @@ -35,6 +35,7 @@ DHWrapper::~DHWrapper() {
 -              Cleanup();
 -              return false;
 +              goto return_error;
-       }
--      //4. Set the key length
--      _pDH->length = _bitsCount;
++      }
++
 +      //4. Set internal p and g
 +      if (DH_set0_pqg(_pDH, p, NULL, g) != 1) {
 +              FATAL("Unable to set internal p and g");
 +              goto return_error;
-+      }
+       }
 +      p = g = NULL;
  
--      //5. Generate private and public key
+-      //4. Set the key length
+-      _pDH->length = _bitsCount;
 +      //5. Set the key length
 +      if (DH_set_length(_pDH, _bitsCount) != 1) {
 +              FATAL("Unable to set length");
 +              goto return_error;
 +      }
-+
+-      //5. Generate private and public key
 +      //6. Generate private and public key
        if (DH_generate_key(_pDH) != 1) {
                FATAL("Unable to generate DH public/private keys");
  }
  
  bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
-@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *p
+@@ -90,7 +102,9 @@ bool DHWrapper::CopyPublicKey(uint8_t *pDst, int32_t dstLength) {
                return false;
        }
  
  }
  
  bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
-@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *
+@@ -99,7 +113,9 @@ bool DHWrapper::CopyPrivateKey(uint8_t *pDst, int32_t dstLength) {
                return false;
        }
  
  }
  
  bool DHWrapper::CreateSharedKey(uint8_t *pPeerPublicKey, int32_t length) {
-@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *p
+@@ -153,14 +169,6 @@ bool DHWrapper::CopySharedKey(uint8_t *pDst, int32_t dstLength) {
  
  void DHWrapper::Cleanup() {
        if (_pDH != NULL) {
        int32_t keySize = BN_num_bytes(pNum);
        if ((keySize <= 0) || (dstLength <= 0) || (keySize > dstLength)) {
                FATAL("CopyPublicKey failed due to either invalid DH state or invalid call");
-@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKe
+@@ -197,20 +205,21 @@ void InitRC4Encryption(uint8_t *secretKey, uint8_t *pubKeyIn, uint8_t *pubKeyOut
        uint8_t digest[SHA256_DIGEST_LENGTH];
        unsigned int digestLen = 0;
  
  
        RC4_set_key(rc4keyIn, 16, digest);
  }
-@@ -220,14 +229,17 @@ string md5(string source, bool textResul
+@@ -220,14 +229,17 @@ string md5(string source, bool textResult) {
  }
  
  string md5(uint8_t *pBuffer, uint32_t length, bool textResult) {
  
        if (textResult) {
                string result = "";
-@@ -244,12 +256,12 @@ void HMACsha256(const void *pData, uint3
+@@ -259,12 +271,12 @@ void HMACsha256(const void *pData, uint32_t dataLength,
                const void *pKey, uint32_t keyLength, void *pResult) {
        unsigned int digestLen;
  
  
        o_assert(digestLen == 32);
  }
---- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-@@ -211,6 +211,7 @@ string BaseSSLProtocol::GetSSLErrors() {
- string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
-       string formatString;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       formatString = "method: %p\n";
-       formatString += "callback: %p\n";
-       formatString += "cb_arg: %p\n";
-@@ -240,6 +241,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBI
-                       pBIO->references,
-                       (int64_t) pBIO->num_read,
-                       (int64_t) pBIO->num_write);
-+#else
-+// Some of these are problematic in openssl >= 1.1, since
-+// the BIO struct is opaque.
-+      formatString = "method: %s\n";
-+      formatString += "callback: %p\n";
-+      formatString += "cb_arg: %p\n";
-+      formatString += "init: %d\n";
-+      formatString += "shutdown: %d\n";
-+      formatString += "flags: %d\n";
-+      formatString += "retry_reason: %d\n";
-+      formatString += "num: %d\n";
-+      formatString += "ptr: %p\n";
-+      formatString += "next_bio: %p\n";
-+      formatString += "prev_bio: %s\n";
-+      formatString += "references: %s\n";
-+      formatString += "num_read: %"PRId64"\n";
-+      formatString += "num_write: %"PRId64;
-+      return format(formatString,
-+                      BIO_method_name(pBIO),
-+                      BIO_get_callback(pBIO),
-+                      BIO_get_callback_arg(pBIO),
-+                      BIO_get_init(pBIO),
-+                      BIO_get_shutdown(pBIO),
-+                      BIO_get_flags(pBIO),
-+                      BIO_get_retry_reason(pBIO),
-+                      BIO_get_fd(pBIO, NULL),
-+                      BIO_get_data(pBIO),
-+                      BIO_next(pBIO),
-+                      "unknown", //prev_bio
-+                      "unknown", //references
-+                      BIO_number_read(pBIO),
-+                      BIO_number_written(pBIO));
-+#endif
+@@ -397,8 +409,8 @@ string unhex(const uint8_t *pBuffer, uint32_t length) {
  }
  
- void BaseSSLProtocol::InitRandGenerator() {
---- /dev/null
-+++ b/sources/common/include/utils/misc/libcrypto-compat.h
-@@ -0,0 +1,25 @@
-+#ifndef LIBCRYPTO_COMPAT_H
-+#define LIBCRYPTO_COMPAT_H
-+
-+#include <openssl/opensslv.h>
+ void CleanupSSL() {
+-#ifndef NO_SSL_ENGINE_CLEANUP
+-      ERR_remove_state(0);
 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+
-+#include <openssl/dh.h>
-+#include <openssl/evp.h>
-+#include <openssl/hmac.h>
-+
-+int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
-+void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);
-+int DH_set_length(DH *dh, long length);
-+
-+EVP_MD_CTX *EVP_MD_CTX_new(void);
-+void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
-+#define EVP_MD_CTX_reset EVP_MD_CTX_cleanup
-+
-+HMAC_CTX *HMAC_CTX_new(void);
-+void HMAC_CTX_free(HMAC_CTX *ctx);
-+#define HMAC_CTX_reset HMAC_CTX_cleanup
-+
-+#endif /* OPENSSL_VERSION_NUMBER */
-+
-+#endif /* LIBCRYPTO_COMPAT_H */
++      ERR_remove_thread_state(NULL);
+       ENGINE_cleanup();
+       CONF_modules_unload(1);
+       ERR_free_strings();
 --- /dev/null
 +++ b/sources/common/src/utils/misc/libcrypto-compat.cpp
 @@ -0,0 +1,90 @@
 +}
 +
 +#endif /* OPENSSL_VERSION_NUMBER */
+--- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
+@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
+ bool BaseSSLProtocol::Initialize(Variant &parameters) {
+       //1. Initialize the SSL library
+       if (!_libraryInitialized) {
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+               //3. This is the first time we use the library. So we have to
+               //initialize it first
+               SSL_library_init();
+@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant &parameters) {
+               OpenSSL_add_all_algorithms();
+               OpenSSL_add_all_ciphers();
+               OpenSSL_add_all_digests();
++#endif
+               //initialize the random numbers generator
+               InitRandGenerator();
+@@ -211,6 +213,7 @@ string BaseSSLProtocol::GetSSLErrors() {
+ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+       string formatString;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       formatString = "method: %p\n";
+       formatString += "callback: %p\n";
+       formatString += "cb_arg: %p\n";
+@@ -240,6 +243,39 @@ string BaseSSLProtocol::DumpBIO(BIO *pBIO) {
+                       pBIO->references,
+                       (int64_t) pBIO->num_read,
+                       (int64_t) pBIO->num_write);
++#else
++// Some of these are problematic in openssl >= 1.1, since
++// the BIO struct is opaque.
++      formatString = "method: %s\n";
++      formatString += "callback: %p\n";
++      formatString += "cb_arg: %p\n";
++      formatString += "init: %d\n";
++      formatString += "shutdown: %d\n";
++      formatString += "flags: %d\n";
++      formatString += "retry_reason: %d\n";
++      formatString += "num: %d\n";
++      formatString += "ptr: %p\n";
++      formatString += "next_bio: %p\n";
++      formatString += "prev_bio: %s\n";
++      formatString += "references: %s\n";
++      formatString += "num_read: %"PRId64"\n";
++      formatString += "num_write: %"PRId64;
++      return format(STR(formatString),
++                      BIO_method_name(pBIO),
++                      BIO_get_callback(pBIO),
++                      BIO_get_callback_arg(pBIO),
++                      BIO_get_init(pBIO),
++                      BIO_get_shutdown(pBIO),
++                      BIO_get_flags(pBIO),
++                      BIO_get_retry_reason(pBIO),
++                      BIO_get_fd(pBIO, NULL),
++                      BIO_get_data(pBIO),
++                      BIO_next(pBIO),
++                      "unknown", //prev_bio
++                      "unknown", //references
++                      BIO_number_read(pBIO),
++                      BIO_number_written(pBIO));
++#endif
+ }
+ void BaseSSLProtocol::InitRandGenerator() {
+--- a/sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp
++++ b/sources/thelib/src/protocols/ssl/outboundsslprotocol.cpp
+@@ -33,7 +33,7 @@ bool OutboundSSLProtocol::InitGlobalContext(Variant &parameters) {
+       _pGlobalSSLContext = _pGlobalContexts[hash];
+       if (_pGlobalSSLContext == NULL) {
+               //2. prepare the global ssl context
+-              _pGlobalSSLContext = SSL_CTX_new(TLSv1_method());
++              _pGlobalSSLContext = SSL_CTX_new(SSLv23_method());
+               if (_pGlobalSSLContext == NULL) {
+                       FATAL("Unable to create global SSL context");
+                       return false;
diff --git a/multimedia/crtmpserver/patches/100-openssl-deprecated.patch b/multimedia/crtmpserver/patches/100-openssl-deprecated.patch
deleted file mode 100644 (file)
index 60b362b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
---- a/sources/common/src/utils/misc/crypto.cpp
-+++ b/sources/common/src/utils/misc/crypto.cpp
-@@ -350,6 +350,7 @@ string unhex(string source) {
-       return result;
- }
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- void CleanupSSL() {
-       ERR_remove_state(0);
-       ENGINE_cleanup();
-@@ -358,3 +359,4 @@ void CleanupSSL() {
-       EVP_cleanup();
-       CRYPTO_cleanup_all_ex_data();
- }
-+#endif
---- a/sources/crtmpserver/src/crtmpserver.cpp
-+++ b/sources/crtmpserver/src/crtmpserver.cpp
-@@ -298,8 +298,10 @@ void Cleanup() {
-       delete gRs.pConfigFile;
-       gRs.pConfigFile = NULL;
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-       WARN("Doing final OpenSSL cleanup");
-       CleanupSSL();
-+#endif
-       WARN("Shutting down the logger leaving you in the dark. Bye bye... :(");
-       Logger::Free(true);
---- a/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-+++ b/sources/thelib/src/protocols/ssl/basesslprotocol.cpp
-@@ -43,6 +43,7 @@ BaseSSLProtocol::~BaseSSLProtocol() {
- bool BaseSSLProtocol::Initialize(Variant &parameters) {
-       //1. Initialize the SSL library
-       if (!_libraryInitialized) {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-               //3. This is the first time we use the library. So we have to
-               //initialize it first
-               SSL_library_init();
-@@ -55,6 +56,7 @@ bool BaseSSLProtocol::Initialize(Variant &parameters) {
-               OpenSSL_add_all_algorithms();
-               OpenSSL_add_all_ciphers();
-               OpenSSL_add_all_digests();
-+#endif
-               //initialize the random numbers generator
-               InitRandGenerator();
index 5e0a85a8f29fa0b5fec7b920cfc0ef7b18825268..9dffa515010205fb1e484544f8a7f4a1bdcbb62c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017-2018 Ian Leonard <antonlacon@gmail.com>
+# Copyright (C) 2017-2019 Ian Leonard <antonlacon@gmail.com>
 # Copyright (C) 2018 Ted Hess <thess@kitschensync.net>
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
-PKG_VERSION:=3.2.12
-PKG_RELEASE:=5
+PKG_VERSION:=3.4.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://ffmpeg.org/releases/
-PKG_HASH:=8985cea7b1b3b2e0e2b2a8ac6187a7fb022fe8aa9d35101760a000205c59c412
+PKG_HASH:=741cbd6394eaed370774ca4cc089eaafbc54d0824b9aa360d4b3b0cbcbc4a92c
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Ian Leonard <antonlacon@gmail.com>
 
@@ -453,10 +453,13 @@ FFMPEG_CONFIGURE+= \
 else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
 FFMPEG_CONFIGURE+= \
        --disable-altivec
-# libavcode/mips/aacdec_mips.c build problem
-else ifneq ($(findstring 24kf,$(CONFIG_CPU_TYPE)),)
+endif
+
+# libavcodec/mips/aacdec_mips.c build problem
+# XXX: disable use of assembly on MIPS. Patches welcome.
+ifneq ($(findstring mips,$(CONFIG_ARCH)),)
 FFMPEG_CONFIGURE+= \
-       --disable-inline-asm
+        --disable-asm --disable-inline-asm
 endif
 
 # selectively disable optimizations according to arch/cpu type
@@ -483,11 +486,9 @@ endif
 
 ifneq ($(CONFIG_TARGET_x86),)
 ifeq ($(CONFIG_NASM),y)
-  # Set yasmexe to anything but YASM/NASM (ffmpeg configure will then find NASM correctly)
-  # Newer ffmpeg packages will use --enable-x86asm (with NASM default)
-  FFMPEG_CONFIGURE += --yasmexe=xyzzy
+  FFMPEG_CONFIGURE += --enable-x86asm
 else
-  FFMPEG_CONFIGURE += --disable-yasm
+  FFMPEG_CONFIGURE += --disable-x86asm
 endif
 endif
 
diff --git a/multimedia/ffmpeg/patches/ffmpeg-fix-build-with-fdk-aac-2.0.patch b/multimedia/ffmpeg/patches/ffmpeg-fix-build-with-fdk-aac-2.0.patch
new file mode 100644 (file)
index 0000000..c951a87
--- /dev/null
@@ -0,0 +1,316 @@
+From 9969fbafe2c83aee196c115acdaafbb623727927 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Mon, 28 Jan 2019 21:55:19 +0100
+Subject: package/ffmpeg: fix build with libfdk-aac 2.0.0
+
+Add upstream patches to fix
+http://autobuild.buildroot.net/results/909/9097a2b190f4032ff51eda531f4379a99da5181a/
+
+after fdk-aac was bumped to 2.0.0:
+https://git.buildroot.net/buildroot/commit/package/fdk-aac?id=31ff32824a4f3d09351367c3418b5605f9c40521
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ ...dk-aacenc-Fix-building-with-libfdk-aac-v2.patch | 100 +++++++++++++++++++++
+ ...Consistently-use-a-proper-version-check-m.patch |  99 ++++++++++++++++++++
+ ...-libfdk-aac-Don-t-use-defined-in-a-define.patch |  72 +++++++++++++++
+ 3 files changed, 271 insertions(+)
+ create mode 100644 package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch
+ create mode 100644 package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch
+ create mode 100644 package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
+
+(limited to 'package')
+
+diff --git a/package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch b/package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch
+new file mode 100644
+index 0000000000..3f452242fa
+--- /dev/null
++++ b/package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch
+@@ -0,0 +1,100 @@
++From c60fb550302878aba7e86037451f7996e8069289 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
++Date: Fri, 31 Aug 2018 14:25:30 +0300
++Subject: [PATCH] libfdk-aacenc: Fix building with libfdk-aac v2
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++When flushing the encoder, we now need to provide non-null buffer
++parameters for everything, even if they are unused.
++
++The encoderDelay parameter has been replaced by two, nDelay and
++nDelayCore.
++
++Downloaded from
++http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=141c960e21d2860e354f9b90df136184dd00a9a8
++
++Signed-off-by: Martin Storsjö <martin@martin.st>
++[Bernd: rebased for ffmpeg 3.4.5]
++Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
++---
++ libavcodec/libfdk-aacenc.c | 34 +++++++++++++++++++++++++---------
++ 1 file changed, 25 insertions(+), 9 deletions(-)
++
++diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
++index 0e2051b468..f5adb407ed 100644
++--- a/libavcodec/libfdk-aacenc.c
+++++ b/libavcodec/libfdk-aacenc.c
++@@ -26,6 +26,11 @@
++ #include "audio_frame_queue.h"
++ #include "internal.h"
++ 
+++#define FDKENC_VER_AT_LEAST(vl0, vl1) \
+++    (defined(AACENCODER_LIB_VL0) && \
+++        ((AACENCODER_LIB_VL0 > vl0) || \
+++         (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
+++
++ typedef struct AACContext {
++     const AVClass *class;
++     HANDLE_AACENCODER handle;
++@@ -286,7 +291,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
++     }
++ 
++     avctx->frame_size = info.frameLength;
+++#if FDKENC_VER_AT_LEAST(4, 0)
+++    avctx->initial_padding = info.nDelay;
+++#else
++     avctx->initial_padding = info.encoderDelay;
+++#endif
++     ff_af_queue_init(avctx, &s->afq);
++ 
++     if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
++@@ -319,28 +328,35 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
++     int out_buffer_size, out_buffer_element_size;
++     void *in_ptr, *out_ptr;
++     int ret;
+++    uint8_t dummy_buf[1];
++     AACENC_ERROR err;
++ 
++     /* handle end-of-stream small frame and flushing */
++     if (!frame) {
+++        /* Must be a non-null pointer, even if it's a dummy. We could use
+++         * the address of anything else on the stack as well. */
+++        in_ptr               = dummy_buf;
+++        in_buffer_size       = 0;
+++
++         in_args.numInSamples = -1;
++     } else {
++-        in_ptr                   = frame->data[0];
++-        in_buffer_size           = 2 * avctx->channels * frame->nb_samples;
++-        in_buffer_element_size   = 2;
+++        in_ptr               = frame->data[0];
+++        in_buffer_size       = 2 * avctx->channels * frame->nb_samples;
++ 
++-        in_args.numInSamples     = avctx->channels * frame->nb_samples;
++-        in_buf.numBufs           = 1;
++-        in_buf.bufs              = &in_ptr;
++-        in_buf.bufferIdentifiers = &in_buffer_identifier;
++-        in_buf.bufSizes          = &in_buffer_size;
++-        in_buf.bufElSizes        = &in_buffer_element_size;
+++        in_args.numInSamples = avctx->channels * frame->nb_samples;
++ 
++         /* add current frame to the queue */
++         if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
++             return ret;
++     }
++ 
+++    in_buffer_element_size   = 2;
+++    in_buf.numBufs           = 1;
+++    in_buf.bufs              = &in_ptr;
+++    in_buf.bufferIdentifiers = &in_buffer_identifier;
+++    in_buf.bufSizes          = &in_buffer_size;
+++    in_buf.bufElSizes        = &in_buffer_element_size;
+++
++     /* The maximum packet size is 6144 bits aka 768 bytes per channel. */
++     if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels), 0)) < 0)
++         return ret;
++-- 
++2.20.1
++
+diff --git a/package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch b/package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch
+new file mode 100644
+index 0000000000..c358a045d1
+--- /dev/null
++++ b/package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch
+@@ -0,0 +1,99 @@
++From 48be4c81e0ad081edab65e133e6e1bdec7de3b55 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
++Date: Tue, 4 Sep 2018 08:29:37 +0300
++Subject: [PATCH] libfdk-aac: Consistently use a proper version check macro for
++ detecting features
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++libfdk-aac: Consistently use a proper version check macro for detecting features
++
++The previous version checks checked explicitly for the version
++where the version define was added to the installed headers,
++making an "#ifdef AACDECODER_LIB_VL0" enough. Now that we have
++a need for more diverse version checks than this, convert all checks
++to such checks.
++
++Downloaded from
++http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=ffb9b7a6bab6c6bfd3dd9a7c32e3724209824999
++
++Signed-off-by: Martin Storsjö <martin@martin.st>
++Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
++---
++ libavcodec/libfdk-aacdec.c | 13 ++++++++-----
++ libavcodec/libfdk-aacenc.c |  6 +++---
++ 2 files changed, 11 insertions(+), 8 deletions(-)
++
++diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
++index 2857b9453f..ef51184ebd 100644
++--- a/libavcodec/libfdk-aacdec.c
+++++ b/libavcodec/libfdk-aacdec.c
++@@ -25,9 +25,12 @@
++ #include "avcodec.h"
++ #include "internal.h"
++ 
++-/* The version macro is introduced the same time as the setting enum was
++- * changed, so this check should suffice. */
++-#ifndef AACDECODER_LIB_VL0
+++#define FDKDEC_VER_AT_LEAST(vl0, vl1) \
+++    (defined(AACDECODER_LIB_VL0) && \
+++        ((AACDECODER_LIB_VL0 > vl0) || \
+++         (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)))
+++
+++#if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10
++ #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
++ #endif
++ 
++@@ -72,7 +75,7 @@ static const AVOption fdk_aac_dec_options[] = {
++                      OFFSET(drc_level),      AV_OPT_TYPE_INT,   { .i64 = -1},  -1, 127, AD, NULL    },
++     { "drc_heavy", "Dynamic Range Control: heavy compression, where [1] is on (RF mode) and [0] is off",
++                      OFFSET(drc_heavy),      AV_OPT_TYPE_INT,   { .i64 = -1},  -1, 1,   AD, NULL    },
++-#ifdef AACDECODER_LIB_VL0
+++#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
++     { "level_limit", "Signal level limiting", OFFSET(level_limit), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 1, AD },
++ #endif
++     { NULL }
++@@ -293,7 +296,7 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
++         }
++     }
++ 
++-#ifdef AACDECODER_LIB_VL0
+++#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
++     if (aacDecoder_SetParam(s->handle, AAC_PCM_LIMITER_ENABLE, s->level_limit) != AAC_DEC_OK) {
++         av_log(avctx, AV_LOG_ERROR, "Unable to set in signal level limiting in the decoder\n");
++         return AVERROR_UNKNOWN;
++diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
++index f5adb407ed..91dcb5a1b9 100644
++--- a/libavcodec/libfdk-aacenc.c
+++++ b/libavcodec/libfdk-aacenc.c
++@@ -156,7 +156,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
++     case 6: mode = MODE_1_2_2_1; sce = 2; cpe = 2; break;
++ /* The version macro is introduced the same time as the 7.1 support, so this
++    should suffice. */
++-#ifdef AACENCODER_LIB_VL0
+++#if FDKENC_VER_AT_LEAST(3, 4) // 3.4.12
++     case 8:
++         sce = 2;
++         cpe = 3;
++@@ -291,7 +291,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
++     }
++ 
++     avctx->frame_size = info.frameLength;
++-#if FDKENC_VER_AT_LEAST(4, 0)
+++#if FDKENC_VER_AT_LEAST(4, 0) // 4.0.0
++     avctx->initial_padding = info.nDelay;
++ #else
++     avctx->initial_padding = info.encoderDelay;
++@@ -412,7 +412,7 @@ static const uint64_t aac_channel_layout[] = {
++     AV_CH_LAYOUT_4POINT0,
++     AV_CH_LAYOUT_5POINT0_BACK,
++     AV_CH_LAYOUT_5POINT1_BACK,
++-#ifdef AACENCODER_LIB_VL0
+++#if FDKENC_VER_AT_LEAST(3, 4) // 3.4.12
++     AV_CH_LAYOUT_7POINT1_WIDE_BACK,
++     AV_CH_LAYOUT_7POINT1,
++ #endif
++-- 
++2.20.1
++
+diff --git a/package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch b/package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
+new file mode 100644
+index 0000000000..30357b91e1
+--- /dev/null
++++ b/package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
+@@ -0,0 +1,72 @@
++From 452746d80fdaaaf1b546860eb78449c6de3678d7 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
++Date: Wed, 12 Sep 2018 20:03:12 +0300
++Subject: [PATCH] libfdk-aac: Don't use defined() in a #define
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++libfdk-aac: Don't use defined() in a #define
++
++MSVC expands the preprocessor directives differently, making the
++version check fail in the previous form.
++
++Clang can warn about this with -Wexpansion-to-defined (not currently
++enabled by default):
++warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
++
++Downloaded from
++http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=2a9e1c122eed66be1b26b747342b848300b226c7
++
++Signed-off-by: Martin Storsjö <martin@martin.st>
++Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
++---
++ libavcodec/libfdk-aacdec.c | 9 ++++++---
++ libavcodec/libfdk-aacenc.c | 9 ++++++---
++ 2 files changed, 12 insertions(+), 6 deletions(-)
++
++diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
++index ef51184ebd..0fbab36463 100644
++--- a/libavcodec/libfdk-aacdec.c
+++++ b/libavcodec/libfdk-aacdec.c
++@@ -25,10 +25,13 @@
++ #include "avcodec.h"
++ #include "internal.h"
++ 
+++#ifdef AACDECODER_LIB_VL0
++ #define FDKDEC_VER_AT_LEAST(vl0, vl1) \
++-    (defined(AACDECODER_LIB_VL0) && \
++-        ((AACDECODER_LIB_VL0 > vl0) || \
++-         (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)))
+++    ((AACDECODER_LIB_VL0 > vl0) || \
+++     (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1))
+++#else
+++#define FDKDEC_VER_AT_LEAST(vl0, vl1) 0
+++#endif
++ 
++ #if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10
++ #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS
++diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
++index 91dcb5a1b9..8349e56dcb 100644
++--- a/libavcodec/libfdk-aacenc.c
+++++ b/libavcodec/libfdk-aacenc.c
++@@ -26,10 +26,13 @@
++ #include "audio_frame_queue.h"
++ #include "internal.h"
++ 
+++#ifdef AACENCODER_LIB_VL0
++ #define FDKENC_VER_AT_LEAST(vl0, vl1) \
++-    (defined(AACENCODER_LIB_VL0) && \
++-        ((AACENCODER_LIB_VL0 > vl0) || \
++-         (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
+++    ((AACENCODER_LIB_VL0 > vl0) || \
+++     (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))
+++#else
+++#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
+++#endif
++ 
++ typedef struct AACContext {
++     const AVClass *class;
++-- 
++2.20.1
++
+-- 
+cgit v1.2.1
+
index 2424c94a00fe831f40f9d5152d295b411a6555a0..47a650667d3bcdfd1c556e9fd15b5dd696f626d8 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=graphicsmagick
 PKG_VERSION:=1.3.31
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/GraphicsMagick-$(PKG_VERSION)
 PKG_SOURCE:=GraphicsMagick-$(PKG_VERSION).tar.bz2
@@ -72,6 +72,8 @@ CONFIGURE_ARGS += \
        --without-zstd \
        --without-x
 
+TARGET_CFLAGS += -flto
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) \
index c2733e170798ac93d5b63320d2a859fb315cb650..b10d050ec09b5d0a8a6bf90229bf1f427b3fe8f0 100644 (file)
@@ -8,15 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-libav
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
 
 PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
-PKG_HASH:=dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da
+PKG_HASH:=96241130cb0067e01925a7cfe084dcf05941f139eb1ab45e5556c3f95120ce49
 
 PKG_LICENSE:=GPL-2.0 LGPL-2.0
 PKG_LICENSE_FILES:=COPYING COPYING.LIB
@@ -146,12 +146,27 @@ LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOC
 REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
 
 CONFIGURE_ARGS += \
+       --disable-Bsymbolic \
+       --disable-fatal-warnings \
+       --disable-glib-asserts \
+       --disable-gobject-cast-checks \
+       --disable-gtk-doc-html \
+       --disable-valgrind \
        --without-system-libav \
+       --with-pic \
        --with-libav-extra-configure=" \
        $(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
        --disable-bsfs \
        --disable-programs \
        --disable-devices \
+       --disable-debug \
+       --disable-doc \
+       --disable-extra-warnings \
+       --disable-htmlpages \
+       --disable-manpages \
+       --disable-podpages \
+       --disable-txtpages \
+       --disable-runtime-cpudetect \
        --disable-encoders \
        $(LIBAV_CONFIGURE_ENCODERS) \
        --disable-decoders \
@@ -182,11 +197,7 @@ CONFIGURE_ARGS += \
        --disable-fma4 \
        --disable-avx2 \
        --disable-inline-asm \
-       --disable-yasm"
-
-TARGET_CFLAGS += -D_GNU_SOURCE
-
-TARGET_LDFLAGS += $(FPIC)
+       --disable-x86asm"
 
 define Package/gst1-libav/install
        $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
index 752ee51f0598fcd75223f21d64fd8c1a3675899b..b3044992ae0941b44e300dd5e29f05aa50372515 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-bad
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,9 +20,10 @@ 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:=910b4e0e2e897e8b6d06767af1779d70057c309f67292f485ff988d087aa0de5
+PKG_HASH:=eafbb705190ca6dbf0e5dfbe1bc3d0f217fbc2a828037b5ede12d3611b9f9bd7
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -96,9 +97,16 @@ endef
 GST_VERSION:=1.0
 
 CONFIGURE_ARGS += \
+       --disable-Bsymbolic \
        --disable-debug \
        --disable-examples \
-       --disable-nls   \
+       --disable-fatal-warnings \
+       --disable-glib-asserts \
+       --disable-gobject-cast-checks \
+       --disable-gtk-doc-html \
+       --disable-introspection \
+       --disable-valgrind \
+       --disable-rpath \
        \
        --disable-directsound \
        --disable-directdraw \
@@ -147,17 +155,11 @@ CONFIGURE_ARGS += \
        --disable-zbar \
        --disable-srtp \
        \
+       --without-html-dir \
        --without-libiconv-prefix \
        --without-libintl-prefix \
        --with-libgcrypt-prefix="$(STAGING_DIR)/usr" \
-       --without-x \
-
-TARGET_CFLAGS+= -std=gnu99
-
-EXTRA_LDFLAGS+= \
-       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-       $(if $(ICONV_FULL),-liconv) \
-
+       --with-pic
 
 define Package/gst1-plugins-bad/install
        /bin/true
diff --git a/multimedia/gst1-plugins-bad/patches/002-no-tests.patch b/multimedia/gst1-plugins-bad/patches/002-no-tests.patch
deleted file mode 100644 (file)
index 38c5703..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,11 +2,11 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
- SUBDIRS = \
-       gst-libs gst sys ext pkgconfig \
--      m4 common docs tests tools
-+      m4 common docs tools
- DIST_SUBDIRS = \
-       gst gst-libs sys ext pkgconfig \
--      m4 common docs tests tools
-+      m4 common docs tools
- EXTRA_DIST = \
-       depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -2600,24 +2600,6 @@ sys/vdpau/Makefile
- sys/wasapi/Makefile
- sys/winks/Makefile
- sys/winscreencap/Makefile
--tests/Makefile
--tests/check/Makefile
--tests/files/Makefile
--tests/examples/Makefile
--tests/examples/avsamplesink/Makefile
--tests/examples/camerabin2/Makefile
--tests/examples/codecparsers/Makefile
--tests/examples/compositor/Makefile
--tests/examples/directfb/Makefile
--tests/examples/audiomixmatrix/Makefile
--tests/examples/ipcpipeline/Makefile
--tests/examples/mpegts/Makefile
--tests/examples/mxf/Makefile
--tests/examples/opencv/Makefile
--tests/examples/uvch264/Makefile
--tests/examples/waylandsink/Makefile
--tests/examples/webrtc/Makefile
--tests/icles/Makefile
- ext/voamrwbenc/Makefile
- ext/voaacenc/Makefile
- ext/assrender/Makefile
diff --git a/multimedia/gst1-plugins-bad/patches/003-openssl-deprecated.patch b/multimedia/gst1-plugins-bad/patches/003-openssl-deprecated.patch
deleted file mode 100644 (file)
index 1df1f73..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/ext/dtls/gstdtlsagent.c
-+++ b/ext/dtls/gstdtlsagent.c
-@@ -124,11 +124,11 @@ _gst_dtls_init_openssl (void)
-     }
-     GST_INFO_OBJECT (NULL, "initializing openssl %lx", OPENSSL_VERSION_NUMBER);
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     SSL_library_init ();
-     SSL_load_error_strings ();
-     ERR_load_BIO_strings ();
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-     {
-       gint i;
-       gint num_locks;
-@@ -197,7 +197,7 @@ gst_dtls_agent_init (GstDtlsAgent * self)
-   SSL_CTX_set_cipher_list (priv->ssl_context,
-       "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
-   SSL_CTX_set_read_ahead (priv->ssl_context, 1);
--#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
-+#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
-   SSL_CTX_set_ecdh_auto (priv->ssl_context, 1);
- #endif
- }
---- a/ext/dtls/gstdtlscertificate.c
-+++ b/ext/dtls/gstdtlscertificate.c
-@@ -45,8 +45,15 @@
- #endif
- #endif
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
- #include <openssl/ssl.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- GST_DEBUG_CATEGORY_STATIC (gst_dtls_certificate_debug);
- #define GST_CAT_DEFAULT gst_dtls_certificate_debug
-@@ -240,8 +247,8 @@ init_generated (GstDtlsCertificate * self)
-   X509_set_version (priv->x509, 2);
-   ASN1_INTEGER_set (X509_get_serialNumber (priv->x509), 0);
--  X509_gmtime_adj (X509_get_notBefore (priv->x509), 0);
--  X509_gmtime_adj (X509_get_notAfter (priv->x509), 31536000L);  /* A year */
-+  X509_gmtime_adj (X509_getm_notBefore (priv->x509), 0);
-+  X509_gmtime_adj (X509_getm_notAfter (priv->x509), 31536000L);  /* A year */
-   X509_set_pubkey (priv->x509, priv->private_key);
-   name = X509_get_subject_name (priv->x509);
index 88e48edb05cde90336c941fa1dae5fcf287d2ad1..d38cbedaf9c7ed983febbf6537abbf6fd6763004 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-base
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -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:=ca6139490e48863e7706d870ff4e8ac9f417b56f3b9e4b3ce490c13b09a77461
+PKG_HASH:=6952be988abe67b5affd46b194e97863b160cd58846199873b4315fe5e1cdbf0
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_gst1-mod-alsa \
@@ -40,6 +40,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_libgst1app \
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -117,6 +118,15 @@ GST_VERSION:=1.0
 CONFIGURE_ARGS += \
        --disable-debug \
        --disable-examples \
+       --disable-fatal-warnings \
+       --disable-glib-asserts \
+       --disable-gobject-cast-checks \
+       --disable-gtk-doc-html \
+       --disable-introspection \
+       --disable-rpath \
+       --disable-valgrind \
+       --without-html-dir \
+       --with-pic \
        \
        $(call GST_COND_SELECT,alsa) \
        $(call GST_COND_SELECT,app) \
@@ -125,7 +135,6 @@ CONFIGURE_ARGS += \
        $(call GST_COND_SELECT,audioresample) \
        $(call GST_COND_SELECT,audiotestsrc) \
        --disable-cdparanoia \
-       --disable-freetypetest \
        $(call GST_COND_SELECT,gio) \
        --disable-libvisual \
        $(call GST_COND_SELECT,ogg) \
@@ -145,14 +154,9 @@ CONFIGURE_ARGS += \
        \
        --without-libiconv-prefix \
        --without-libintl-prefix \
-       --without-x \
        \
        --with-audioresample-format=int \
 
-EXTRA_LDFLAGS+= \
-       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-       $(if $(ICONV_FULL),-liconv) \
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
        ( cd $(PKG_INSTALL_DIR); $(CP) \
index 0164df44497a85a367f4c4299f88a9a4614d6925..ce6b43baf2571ff40fe3c020291681b7adec47b5 100644 (file)
@@ -1,6 +1,18 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -13,7 +13,6 @@ SUBDIRS =                    \
+diff -u --recursive gst-plugins-base-1.15.2-vanilla/configure.ac gst-plugins-base-1.15.2/configure.ac
+--- gst-plugins-base-1.15.2-vanilla/configure.ac       2019-02-26 06:39:03.000000000 -0500
++++ gst-plugins-base-1.15.2/configure.ac       2019-03-16 13:30:18.212618930 -0400
+@@ -1044,7 +1044,6 @@
+ docs/libs/Makefile
+ docs/plugins/Makefile
+ docs/version.entities
+-po/Makefile.in
+ common/Makefile
+ common/m4/Makefile
+ m4/Makefile
+diff -u --recursive gst-plugins-base-1.15.2-vanilla/Makefile.am gst-plugins-base-1.15.2/Makefile.am
+--- gst-plugins-base-1.15.2-vanilla/Makefile.am        2019-01-26 13:51:01.000000000 -0500
++++ gst-plugins-base-1.15.2/Makefile.am        2019-03-16 13:30:03.006572636 -0400
+@@ -13,7 +13,6 @@
        tools                   \
        tests                   \
        docs                    \
@@ -8,7 +20,7 @@
        common                  \
        m4
  
-@@ -24,7 +23,6 @@ DIST_SUBDIRS =                       \
+@@ -24,7 +23,6 @@
        gst sys ext             \
        tools                   \
        tests                   \
        common                  \
        m4
  
---- a/configure.ac
-+++ b/configure.ac
-@@ -1030,7 +1030,6 @@ docs/Makefile
- docs/libs/Makefile
- docs/plugins/Makefile
- docs/version.entities
--po/Makefile.in
- common/Makefile
- common/m4/Makefile
- m4/Makefile
diff --git a/multimedia/gst1-plugins-base/patches/002-no-tests.patch b/multimedia/gst1-plugins-base/patches/002-no-tests.patch
deleted file mode 100644 (file)
index 7d53ec4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -11,7 +11,6 @@ SUBDIRS =                    \
-       gst-libs                \
-       gst sys $(SUBDIRS_EXT)  \
-       tools                   \
--      tests                   \
-       docs                    \
-       common                  \
-       m4
-@@ -22,7 +21,6 @@ DIST_SUBDIRS =                       \
-       gst-libs                \
-       gst sys ext             \
-       tools                   \
--      tests                   \
-       common                  \
-       m4
---- a/configure.ac
-+++ b/configure.ac
-@@ -992,40 +992,6 @@ pkgconfig/gstreamer-gl.pc
- pkgconfig/gstreamer-gl-uninstalled.pc
- pkgconfig/gstreamer-plugins-base.pc
- pkgconfig/gstreamer-plugins-base-uninstalled.pc
--tests/Makefile
--tests/check/Makefile
--tests/examples/Makefile
--tests/examples/app/Makefile
--tests/examples/audio/Makefile
--tests/examples/decodebin_next/Makefile
--tests/examples/dynamic/Makefile
--tests/examples/encoding/Makefile
--tests/examples/fft/Makefile
--tests/examples/gio/Makefile
--tests/examples/gl/Makefile
--tests/examples/gl/generic/Makefile
--tests/examples/gl/generic/cube/Makefile
--tests/examples/gl/generic/doublecube/Makefile
--tests/examples/gl/generic/recordgraphic/Makefile
--tests/examples/gl/generic/cubeyuv/Makefile
--tests/examples/gl/qt/Makefile
--tests/examples/gl/gtk/Makefile
--tests/examples/gl/gtk/fxtest/Makefile
--tests/examples/gl/gtk/3dvideo/Makefile
--tests/examples/gl/gtk/switchvideooverlay/Makefile
--tests/examples/gl/gtk/filternovideooverlay/Makefile
--tests/examples/gl/gtk/filtervideooverlay/Makefile
--tests/examples/gl/cocoa/Makefile
--tests/examples/gl/sdl/Makefile
--tests/examples/gl/clutter/Makefile
--tests/examples/overlay/Makefile
--tests/examples/seek/Makefile
--tests/examples/snapshot/Makefile
--tests/examples/playback/Makefile
--tests/examples/playrec/Makefile
--tests/files/Makefile
--tests/icles/Makefile
--tests/icles/playback/Makefile
- docs/Makefile
- docs/libs/Makefile
- docs/plugins/Makefile
diff --git a/multimedia/gst1-plugins-base/patches/003-no-docs.patch b/multimedia/gst1-plugins-base/patches/003-no-docs.patch
deleted file mode 100644 (file)
index 8746358..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -11,13 +11,11 @@ SUBDIRS =                  \
-       gst-libs                \
-       gst sys $(SUBDIRS_EXT)  \
-       tools                   \
--      docs                    \
-       common                  \
-       m4
- DIST_SUBDIRS =                        \
-       pkgconfig               \
--      docs                    \
-       gst-libs                \
-       gst sys ext             \
-       tools                   \
---- a/configure.ac
-+++ b/configure.ac
-@@ -992,10 +992,6 @@ pkgconfig/gstreamer-gl.pc
- pkgconfig/gstreamer-gl-uninstalled.pc
- pkgconfig/gstreamer-plugins-base.pc
- pkgconfig/gstreamer-plugins-base-uninstalled.pc
--docs/Makefile
--docs/libs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- common/Makefile
- common/m4/Makefile
- m4/Makefile
index 5f27dca19d4d20cf7ab9f17846393f904c1a2eef..729972215af30c759539fe80eb5a3939f5dcde5b 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-good
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,13 +20,14 @@ 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:=5f8b553260cb0aac56890053d8511db1528d53cae10f0287cfce2cb2acc70979
+PKG_HASH:=b805962a2d777ff6145f6ca2ca8458499c9e23236cbcc41787c69ac51b02c818
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_gst1-mod-lame \
        CONFIG_PACKAGE_gst1-mod-mpg123 \
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -97,8 +98,15 @@ CONFIGURE_ARGS += \
        $(call GST_COND_SELECT,lame) \
         $(call GST_COND_SELECT,mpg123) \
        \
+       --disable-Bsymbolic \
        --disable-debug \
        --disable-examples \
+       --disable-fatal-warnings \
+       --disable-glib-asserts \
+       --disable-gobject-cast-checks \
+       --disable-gtk-doc-html \
+       --disable-rpath \
+       --disable-valgrind \
        \
        --disable-aalib \
        --disable-annodex \
@@ -127,14 +135,10 @@ CONFIGURE_ARGS += \
        --disable-y4m \
        --disable-zlib \
        \
+       --without-gudev \
+       --without-libv4l2 \
        --without-libiconv-prefix \
-       --without-libintl-prefix \
-       --without-x \
-
-EXTRA_LDFLAGS+= \
-       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-       $(if $(ICONV_FULL),-liconv) \
-
+       --without-libintl-prefix
 
 define Package/gst1-plugins-good/install
        /bin/true
diff --git a/multimedia/gst1-plugins-good/patches/002-no-tests.patch b/multimedia/gst1-plugins-good/patches/002-no-tests.patch
deleted file mode 100644 (file)
index de22948..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,7 +2,6 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
- ALWAYS_SUBDIRS =              \
-       gst sys ext             \
--      tests                   \
-       docs                    \
-       common                  \
-       m4                      \
---- a/configure.ac
-+++ b/configure.ac
-@@ -1292,22 +1292,6 @@ sys/osxvideo/Makefile
- sys/v4l2/Makefile
- sys/waveform/Makefile
- sys/ximage/Makefile
--tests/Makefile
--tests/check/Makefile
--tests/examples/Makefile
--tests/examples/audiofx/Makefile
--tests/examples/cairo/Makefile
--tests/examples/equalizer/Makefile
--tests/examples/gtk/Makefile
--tests/examples/jack/Makefile
--tests/examples/level/Makefile
--tests/examples/rtp/Makefile
--tests/examples/rtsp/Makefile
--tests/examples/shapewipe/Makefile
--tests/examples/spectrum/Makefile
--tests/examples/v4l2/Makefile
--tests/files/Makefile
--tests/icles/Makefile
- common/Makefile
- common/m4/Makefile
- m4/Makefile
diff --git a/multimedia/gst1-plugins-good/patches/003-no-docs.patch b/multimedia/gst1-plugins-good/patches/003-no-docs.patch
deleted file mode 100644 (file)
index f962059..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,7 +2,6 @@ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
- ALWAYS_SUBDIRS =              \
-       gst sys ext             \
--      docs                    \
-       common                  \
-       m4                      \
-       pkgconfig
---- a/configure.ac
-+++ b/configure.ac
-@@ -1295,9 +1295,6 @@ sys/ximage/Makefile
- common/Makefile
- common/m4/Makefile
- m4/Makefile
--docs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-good-uninstalled.pc
- )
index 6b307f8f89977f62bc4124d4afbbabf91fc2f7c7..b1dbf85fa3db337bbe05bc4e452bb0df6756c4f7 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-ugly
-PKG_VERSION:=1.14.4
-PKG_RELEASE:=1
+PKG_VERSION:=1.15.2
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
                Ted Hess <thess@kitschensync.net>
@@ -20,13 +20,14 @@ 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:=ac02d837f166c35ff6ce0738e281680d0b90052cfb1f0255dcf6aaca5f0f6d23
+PKG_HASH:=6e802c63680ac24b6970a35b3001e5c96e57f1b19814cd3916d52a32d33123b2
 
 PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_gst1-mod-asf \
        CONFIG_PACKAGE_gst1-mod-mpeg2dec \
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -96,6 +97,12 @@ GST_VERSION:=1.0
 CONFIGURE_ARGS += \
        --disable-debug \
        --disable-examples \
+       --disable-fatal-warnings \
+       --disable-glib-asserts \
+       --disable-gobject-cast-checks \
+       --disable-gtk-doc-html \
+       --disable-valgrind \
+       --disable-rpath \
        \
        --disable-a52dec \
        --disable-amrnb \
@@ -117,11 +124,7 @@ CONFIGURE_ARGS += \
        \
        --without-libiconv-prefix \
        --without-libintl-prefix \
-
-EXTRA_LDFLAGS+= \
-       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-       $(if $(ICONV_FULL),-liconv) \
-
+       --with-pic
 
 define Package/gst1-plugins-ugly/install
        /bin/true
diff --git a/multimedia/gst1-plugins-ugly/patches/002-no-tests.patch b/multimedia/gst1-plugins-ugly/patches/002-no-tests.patch
deleted file mode 100644 (file)
index 79bd86f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
- SUBDIRS = \
--      gst-libs gst ext docs m4 tests common pkgconfig
-+      gst-libs gst ext docs m4 common pkgconfig
-       
- EXTRA_DIST = \
-       depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -423,9 +423,6 @@ ext/x264/Makefile
- docs/Makefile
- docs/plugins/Makefile
- docs/version.entities
--tests/Makefile
--tests/check/Makefile
--tests/files/Makefile
- m4/Makefile
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
diff --git a/multimedia/gst1-plugins-ugly/patches/003-no-docs.patch b/multimedia/gst1-plugins-ugly/patches/003-no-docs.patch
deleted file mode 100644 (file)
index 4c29c79..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,7 +1,7 @@
- DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
- SUBDIRS = \
--      gst-libs gst ext docs m4 common pkgconfig
-+      gst-libs gst ext m4 common pkgconfig
-       
- EXTRA_DIST = \
-       depcomp \
---- a/configure.ac
-+++ b/configure.ac
-@@ -420,9 +420,6 @@ ext/dvdread/Makefile
- ext/mpeg2dec/Makefile
- ext/sidplay/Makefile
- ext/x264/Makefile
--docs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- m4/Makefile
- pkgconfig/Makefile
- pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
index 75bdb9866aa74e8d7cd41a65ca30eeb33d30b211..2beaf66d759726564c727dae6de87bf10a4cc43a 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gstreamer1
-PKG_VERSION:=1.14.4
+PKG_VERSION:=1.15.2
 PKG_RELEASE:=2
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
@@ -20,11 +20,12 @@ 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:=f94f6696c5f05a3b3a9183e39c5f5c0b779f75a04c0efa497e7920afa985ffc7
+PKG_HASH:=27a3211eb5c3f6929c5f123ffecaac0ea6e9ed6b93be879c033a7d5af13ad7e6
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
 
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -118,13 +119,20 @@ GST_VERSION:=1.0
 
 CONFIGURE_ARGS += \
        --enable-static \
+       --disable-Bsymbolic \
        --disable-benchmarks \
+       --disable-debug \
        --disable-examples \
        --disable-failing-tests \
        --disable-fatal-warnings \
        --disable-introspection \
+       --disable-glib-asserts \
+       --disable-gobject-cast-checks \
        --disable-gst-tracer-hooks \
+       --disable-gst-debug \
        --disable-gtk-doc-html \
+       --disable-option-parsing \
+       --disable-rpath \
        --disable-tests \
        --disable-valgrind \
        --without-dw \
@@ -132,10 +140,6 @@ CONFIGURE_ARGS += \
        --without-libintl-prefix \
        --without-unwind
 
-EXTRA_LDFLAGS+= \
-       -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-       $(if $(ICONV_FULL),-liconv)
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
        ( cd $(PKG_INSTALL_DIR); $(CP) \
index ae6cc27d80b782fc2349303a8c76c11732011b3f..e6c686401185cc857ac12b55e192416c996761d2 100644 (file)
@@ -18,7 +18,7 @@
        data
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1086,7 +1086,6 @@ libs/gst/net/Makefile
+@@ -1108,7 +1108,6 @@ libs/gst/net/Makefile
  plugins/Makefile
  plugins/elements/Makefile
  plugins/tracers/Makefile
diff --git a/multimedia/gstreamer1/patches/002-no-tests.patch b/multimedia/gstreamer1/patches/002-no-tests.patch
deleted file mode 100644 (file)
index f3d7115..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -7,7 +7,7 @@ aclocaldir = $(datadir)/aclocal
- aclocal_DATA = gst-element-check-1.0.m4
- SUBDIRS = pkgconfig \
--      gst libs plugins tests \
-+      gst libs plugins \
-       docs \
-       m4 \
-       common \
-@@ -19,7 +19,7 @@ endif
- # These are all the possible subdirs
- DIST_SUBDIRS = pkgconfig \
--      gst libs plugins tools tests \
-+      gst libs plugins tools \
-       docs \
-       m4 \
-       common \
---- a/configure.ac
-+++ b/configure.ac
-@@ -1086,20 +1086,6 @@ libs/gst/net/Makefile
- plugins/Makefile
- plugins/elements/Makefile
- plugins/tracers/Makefile
--tests/Makefile
--tests/benchmarks/Makefile
--tests/check/Makefile
--tests/misc/Makefile
--tests/examples/Makefile
--tests/examples/adapter/Makefile
--tests/examples/controller/Makefile
--tests/examples/stepping/Makefile
--tests/examples/helloworld/Makefile
--tests/examples/memory/Makefile
--tests/examples/netclock/Makefile
--tests/examples/ptp/Makefile
--tests/examples/streamiddemux/Makefile
--tests/examples/streams/Makefile
- tools/Makefile
- common/Makefile
- common/m4/Makefile
diff --git a/multimedia/gstreamer1/patches/003-no-docs.patch b/multimedia/gstreamer1/patches/003-no-docs.patch
deleted file mode 100644 (file)
index b0f0e14..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -8,7 +8,6 @@ aclocal_DATA = gst-element-check-1.0.m4
- SUBDIRS = pkgconfig \
-       gst libs plugins \
--      docs \
-       m4 \
-       common \
-       data
-@@ -20,7 +19,6 @@ endif
- # These are all the possible subdirs
- DIST_SUBDIRS = pkgconfig \
-       gst libs plugins tools \
--      docs \
-       m4 \
-       common \
-       data
---- a/configure.ac
-+++ b/configure.ac
-@@ -1089,12 +1089,6 @@ plugins/tracers/Makefile
- tools/Makefile
- common/Makefile
- common/m4/Makefile
--docs/Makefile
--docs/gst/Makefile
--docs/gst/gstreamer.types
--docs/libs/Makefile
--docs/plugins/Makefile
--docs/version.entities
- m4/Makefile
- pkgconfig/Makefile
- stamp.h
index 976237b82f4f96b08bd92ca8d46938842f4b70a4..ab72a4ffad295662db1371b27de128017614259d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/gst/gstplugin.c
 +++ b/gst/gstplugin.c
-@@ -776,15 +776,8 @@ _priv_gst_plugin_load_file_for_registry (const gchar * filename,
+@@ -777,15 +777,8 @@ _priv_gst_plugin_load_file_for_registry (const gchar * filename,
      goto return_error;
    }
  
index fc80e56660e32594742a69dc7bd3e2e16ef0560d..f11375bb4c0e33957210ba4dd82492c644eef07e 100644 (file)
@@ -8,12 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minidlna
-PKG_VERSION:=1.2.1
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=@SF/minidlna
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=67388ba23ab0c7033557a32084804f796aa2a796db7bb2b770fb76ac2a742eec
+PKG_SOURCE_URL=git://minidlna.git.sourceforge.net/gitroot/minidlna/minidlna
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2018-04-10
+PKG_SOURCE_VERSION:=799e6cf505ec470b2bf0ae4118143380aa16b837
+PKG_MIRROR_HASH:=67cc817e671de99e5a3f5ed237f89e22470f1de94819bcaba86c0ba821104af5
 
 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
@@ -36,6 +37,7 @@ define Package/minidlna
   DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
        +libid3tag +libflac +libvorbis +libuuid \
        $(ICONV_DEPENDS) $(INTL_DEPENDS)
+  USERID:=minidlna:minidlna
 endef
 
 define Package/minidlna/description
index 924a99ea9da59c1f5f248e4efd8300123f296ba1..756983567d5487a2d65ac7346de186dcfb27d708 100644 (file)
@@ -1,10 +1,11 @@
 config minidlna config
-       option 'enabled' '1'
+       option 'enabled' '0'
+       option user 'minidlna'
        option port '8200'
        option interface 'br-lan'
        option friendly_name 'OpenWrt DLNA Server'
        option db_dir '/var/run/minidlna'
-       option log_dir '/var/log'
+       option log_dir '/var/log/minidlna'
        option inotify '1'
        option enable_tivo '0'
        option wide_links '0'
index c894186d342cd440d812c8ec0d431ef54c0eae86..0cf3467a47ff54202d94ff30fb176b6464c6b295 100644 (file)
@@ -6,7 +6,7 @@ START=50
 SERVICE_USE_PID=1
 SERVICE_PID_FILE=/var/run/minidlna/minidlna.pid
 
-MINIDLNA_CONFIG_FILE="/tmp/minidlna.conf"
+MINIDLNA_CONFIG_FILE="/var/etc/minidlna.conf"
 
 minidlna_cfg_append() {
        echo "$1" >> "$MINIDLNA_CONFIG_FILE"
@@ -35,7 +35,6 @@ minidlna_cfg_addstr() {
 
 minidlna_cfg_add_media_dir() {
        local val=$1
-
        minidlna_cfg_append "media_dir=$val"
 }
 
@@ -44,31 +43,33 @@ minidlna_create_config() {
        local port
        local interface
 
-       config_get port $cfg port
-       config_get interface $cfg interface
+       config_get port "$cfg" port
+       config_get interface "$cfg" interface
 
        [ -z "$interface" -o -t "$port" ] && return 1
 
+       mkdir -p /var/etc
        echo "# this file is generated automatically, don't edit" > "$MINIDLNA_CONFIG_FILE"
 
        minidlna_cfg_append "port=$port"
        minidlna_cfg_append "network_interface=$interface"
 
-       minidlna_cfg_addstr $cfg friendly_name
-       minidlna_cfg_addstr $cfg db_dir
-       minidlna_cfg_addstr $cfg log_dir
-       minidlna_cfg_addstr $cfg log_level 'error'
-       minidlna_cfg_addbool $cfg inotify '1'
-       minidlna_cfg_addbool $cfg enable_tivo '0'
-       minidlna_cfg_addbool $cfg wide_links '0'
-       minidlna_cfg_addbool $cfg strict_dlna '0'
-       minidlna_cfg_addstr $cfg album_art_names
-       minidlna_cfg_addstr $cfg presentation_url
-       minidlna_cfg_addstr $cfg notify_interval '900'
-       minidlna_cfg_addstr $cfg serial '12345678'
-       minidlna_cfg_addstr $cfg model_number '1'
-       minidlna_cfg_addstr $cfg minissdpsocket
-       minidlna_cfg_addstr $cfg root_container '.'
+       minidlna_cfg_addstr "$cfg" friendly_name
+       minidlna_cfg_addstr "$cfg" user
+       minidlna_cfg_addstr "$cfg" db_dir
+       minidlna_cfg_addstr "$cfg" log_dir
+       minidlna_cfg_addstr "$cfg" log_level 'error'
+       minidlna_cfg_addbool "$cfg" inotify '1'
+       minidlna_cfg_addbool "$cfg" enable_tivo '0'
+       minidlna_cfg_addbool "$cfg" wide_links '0'
+       minidlna_cfg_addbool "$cfg" strict_dlna '0'
+       minidlna_cfg_addstr "$cfg" album_art_names
+       minidlna_cfg_addstr "$cfg" presentation_url
+       minidlna_cfg_addstr "$cfg" notify_interval '900'
+       minidlna_cfg_addstr "$cfg" serial '12345678'
+       minidlna_cfg_addstr "$cfg" model_number '1'
+       minidlna_cfg_addstr "$cfg" minissdpsocket
+       minidlna_cfg_addstr "$cfg" root_container '.'
        config_list_foreach "$cfg" "media_dir" minidlna_cfg_add_media_dir
 
        return 0
@@ -78,6 +79,7 @@ start() {
        local enabled
        local db_dir
        local log_dir
+       local user
 
        config_load 'minidlna'
        config_get_bool enabled config 'enabled' '0'
@@ -87,10 +89,12 @@ start() {
        minidlna_create_config config || return 1
        
        config_get db_dir config 'db_dir' '/var/run/minidlna'
-       config_get log_dir config 'log_dir' '/var/log'
+       config_get log_dir config 'log_dir' '/var/log/minidlna'
+       config_get user config 'user' 'root'
+
+       mkdir -m 0755 -p "$db_dir" "$log_dir"
+       chown -R "$user" "$db_dir" "$log_dir"
 
-       mkdir -m 0755 -p $db_dir
-       mkdir -m 0755 -p $log_dir
        service_start /usr/bin/minidlna -f "$MINIDLNA_CONFIG_FILE"
 }
 
diff --git a/multimedia/minidlna/patches/001-dont-build-po-files.patch b/multimedia/minidlna/patches/001-dont-build-po-files.patch
new file mode 100644 (file)
index 0000000..7d9f6b6
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -17,7 +17,7 @@
+ AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
+-SUBDIRS=po
++SUBDIRS=
+ sbin_PROGRAMS = minidlnad
+ check_PROGRAMS = testupnpdescgen
+--- a/configure.ac
++++ b/configure.ac
+@@ -647,6 +647,8 @@ case "$target_os" in
+ esac
+-AC_OUTPUT([ po/Makefile.in
+-Makefile
+-])
++# AC_OUTPUT([ po/Makefile.in
++# Makefile
++# ])
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
diff --git a/multimedia/minidlna/patches/002-dont-build-po-files.patch b/multimedia/minidlna/patches/002-dont-build-po-files.patch
deleted file mode 100644 (file)
index 3862324..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -17,7 +17,7 @@
- AM_CFLAGS = -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 @STATIC_CFLAGS@
--SUBDIRS=po
-+SUBDIRS=
- sbin_PROGRAMS = minidlnad
- check_PROGRAMS = testupnpdescgen
---- a/configure.ac
-+++ b/configure.ac
-@@ -644,6 +644,8 @@ case "$target_os" in
- esac
--AC_OUTPUT([ po/Makefile.in
--Makefile
--])
-+# AC_OUTPUT([ po/Makefile.in
-+# Makefile
-+# ])
-+AC_CONFIG_FILES([Makefile])
-+AC_OUTPUT
diff --git a/multimedia/minidlna/patches/002-mark_all_instances_of_magic_container_s_as_const.patch b/multimedia/minidlna/patches/002-mark_all_instances_of_magic_container_s_as_const.patch
new file mode 100644 (file)
index 0000000..cb1f2fe
--- /dev/null
@@ -0,0 +1,125 @@
+From d297624e533d6d4274c750e3769749c3d7f121c8 Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sat, 15 Dec 2018 16:34:30 +0100
+Subject: [PATCH] Mark all instances of magic_container_s as const
+
+---
+ containers.c | 38 +++++++++++++++++++-------------------
+ containers.h |  6 +++---
+ scanner.c    |  2 +-
+ upnpsoap.c   |  6 +++---
+ 4 files changed, 26 insertions(+), 26 deletions(-)
+
+--- a/containers.c
++++ b/containers.c
+@@ -25,23 +25,23 @@
+ #define NINETY_DAYS "7776000"
+-const char *music_id = MUSIC_ID;
+-const char *music_all_id = MUSIC_ALL_ID;
+-const char *music_genre_id = MUSIC_GENRE_ID;
+-const char *music_artist_id = MUSIC_ARTIST_ID;
+-const char *music_album_id = MUSIC_ALBUM_ID;
+-const char *music_plist_id = MUSIC_PLIST_ID;
+-const char *music_dir_id = MUSIC_DIR_ID;
+-const char *video_id = VIDEO_ID;
+-const char *video_all_id = VIDEO_ALL_ID;
+-const char *video_dir_id = VIDEO_DIR_ID;
+-const char *image_id = IMAGE_ID;
+-const char *image_all_id = IMAGE_ALL_ID;
+-const char *image_date_id = IMAGE_DATE_ID;
+-const char *image_camera_id = IMAGE_CAMERA_ID;
+-const char *image_dir_id = IMAGE_DIR_ID;
++static const char *music_id = MUSIC_ID;
++static const char *music_all_id = MUSIC_ALL_ID;
++static const char *music_genre_id = MUSIC_GENRE_ID;
++static const char *music_artist_id = MUSIC_ARTIST_ID;
++static const char *music_album_id = MUSIC_ALBUM_ID;
++static const char *music_plist_id = MUSIC_PLIST_ID;
++static const char *music_dir_id = MUSIC_DIR_ID;
++static const char *video_id = VIDEO_ID;
++static const char *video_all_id = VIDEO_ALL_ID;
++static const char *video_dir_id = VIDEO_DIR_ID;
++static const char *image_id = IMAGE_ID;
++static const char *image_all_id = IMAGE_ALL_ID;
++static const char *image_date_id = IMAGE_DATE_ID;
++static const char *image_camera_id = IMAGE_CAMERA_ID;
++static const char *image_dir_id = IMAGE_DIR_ID;
+-struct magic_container_s magic_containers[] =
++const struct magic_container_s magic_containers[] =
+ {
+       /* Alternate root container */
+       { NULL,
+@@ -124,7 +124,7 @@ struct magic_container_s magic_container
+       { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 }
+ };
+-struct magic_container_s *
++const struct magic_container_s *
+ in_magic_container(const char *id, int flags, const char **real_id)
+ {
+       size_t len;
+@@ -154,7 +154,7 @@ in_magic_container(const char *id, int f
+       return NULL;
+ }
+-struct magic_container_s *
++const struct magic_container_s *
+ check_magic_container(const char *id, int flags)
+ {
+       int i;
+--- a/containers.h
++++ b/containers.h
+@@ -30,7 +30,7 @@ struct magic_container_s {
+       int required_flags;
+ };
+-extern struct magic_container_s magic_containers[];
++extern const struct magic_container_s magic_containers[];
+-struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id);
+-struct magic_container_s *check_magic_container(const char *id, int flags);
++const struct magic_container_s *in_magic_container(const char *id, int flags, const char **real_id);
++const struct magic_container_s *check_magic_container(const char *id, int flags);
+--- a/scanner.c
++++ b/scanner.c
+@@ -587,7 +587,7 @@ CreateDatabase(void)
+       }
+       for( i=0; magic_containers[i].objectid_match; i++ )
+       {
+-              struct magic_container_s *magic = &magic_containers[i];
++              const struct magic_container_s *magic = &magic_containers[i];
+               if (!magic->name)
+                       continue;
+               if( sql_get_int_field(db, "SELECT 1 from OBJECTS where OBJECT_ID = '%s'", magic->objectid_match) == 0 )
+--- a/upnpsoap.c
++++ b/upnpsoap.c
+@@ -800,7 +800,7 @@ add_res(char *size, char *duration, char
+ }
+ static int
+-get_child_count(const char *object, struct magic_container_s *magic)
++get_child_count(const char *object, const struct magic_container_s *magic)
+ {
+       int ret;
+@@ -1292,7 +1292,7 @@ BrowseContentDirectory(struct upnphttp *
+                       "<Result>"
+                       "&lt;DIDL-Lite"
+                       CONTENT_DIRECTORY_SCHEMAS;
+-      struct magic_container_s *magic;
++      const struct magic_container_s *magic;
+       char *zErrMsg = NULL;
+       char *sql, *ptr;
+       struct Response args;
+@@ -1807,7 +1807,7 @@ SearchContentDirectory(struct upnphttp *
+                       "<Result>"
+                       "&lt;DIDL-Lite"
+                       CONTENT_DIRECTORY_SCHEMAS;
+-      struct magic_container_s *magic;
++      const struct magic_container_s *magic;
+       char *zErrMsg = NULL;
+       char *sql, *ptr;
+       struct Response args;
diff --git a/multimedia/minidlna/patches/003-wrap_container_definitions_into_a_structure.patch b/multimedia/minidlna/patches/003-wrap_container_definitions_into_a_structure.patch
new file mode 100644 (file)
index 0000000..a4fb39b
--- /dev/null
@@ -0,0 +1,118 @@
+From e0065b8343bc963a89556449e00f1d20086cc1f1 Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sat, 15 Dec 2018 16:26:37 +0100
+Subject: [PATCH] Wrap container definitions into a structure
+
+---
+ containers.c | 25 +++++++++++++++++++++++++
+ containers.h |  8 ++++++++
+ scanner.c    | 33 ++++++---------------------------
+ 3 files changed, 39 insertions(+), 27 deletions(-)
+
+--- a/containers.c
++++ b/containers.c
+@@ -23,6 +23,31 @@
+ #include "containers.h"
+ #include "log.h"
++const struct container_s containers[] = {
++              { "0","-1",   "root" },
++              { MUSIC_ID, "0", "Music" },
++              { MUSIC_ALL_ID, MUSIC_ID, "All Music" },
++              { MUSIC_GENRE_ID, MUSIC_ID, "Genre" },
++              { MUSIC_ARTIST_ID, MUSIC_ID, "Artist" },
++              { MUSIC_ALBUM_ID, MUSIC_ID, "Album" },
++              { MUSIC_DIR_ID, MUSIC_ID, "Folders" },
++              { MUSIC_PLIST_ID, MUSIC_ID, "Playlists" },
++
++              { VIDEO_ID, "0", "Video" },
++              { VIDEO_ALL_ID, VIDEO_ID, "All Video" },
++              { VIDEO_DIR_ID, VIDEO_ID, "Folders" },
++
++              { IMAGE_ID, "0", "Pictures" },
++              { IMAGE_ALL_ID, IMAGE_ID, "All Pictures" },
++              { IMAGE_DATE_ID, IMAGE_ID, "Date Taken" },
++              { IMAGE_CAMERA_ID, IMAGE_ID, "Camera" },
++              { IMAGE_DIR_ID, IMAGE_ID, "Folders" },
++
++              { BROWSEDIR_ID, "0", "Browse Folders" },
++
++              { 0, 0, 0 }
++};
++
+ #define NINETY_DAYS "7776000"
+ static const char *music_id = MUSIC_ID;
+--- a/containers.h
++++ b/containers.h
+@@ -16,6 +16,14 @@
+  * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
+  */
++struct container_s {
++      const char *object_id;
++      const char *parent_id;
++      const char *name;
++};
++
++extern const struct container_s containers[];
++
+ struct magic_container_s {
+       const char *name;
+       const char *objectid_match;
+--- a/scanner.c
++++ b/scanner.c
+@@ -529,30 +529,7 @@ insert_file(const char *name, const char
+ int
+ CreateDatabase(void)
+ {
+-      int ret, i;
+-      const char *containers[] = { "0","-1",   "root",
+-                              MUSIC_ID, "0", _("Music"),
+-                          MUSIC_ALL_ID, MUSIC_ID, _("All Music"),
+-                        MUSIC_GENRE_ID, MUSIC_ID, _("Genre"),
+-                       MUSIC_ARTIST_ID, MUSIC_ID, _("Artist"),
+-                        MUSIC_ALBUM_ID, MUSIC_ID, _("Album"),
+-                          MUSIC_DIR_ID, MUSIC_ID, _("Folders"),
+-                        MUSIC_PLIST_ID, MUSIC_ID, _("Playlists"),
+-
+-                              VIDEO_ID, "0", _("Video"),
+-                          VIDEO_ALL_ID, VIDEO_ID, _("All Video"),
+-                          VIDEO_DIR_ID, VIDEO_ID, _("Folders"),
+-
+-                              IMAGE_ID, "0", _("Pictures"),
+-                          IMAGE_ALL_ID, IMAGE_ID, _("All Pictures"),
+-                         IMAGE_DATE_ID, IMAGE_ID, _("Date Taken"),
+-                       IMAGE_CAMERA_ID, IMAGE_ID, _("Camera"),
+-                          IMAGE_DIR_ID, IMAGE_ID, _("Folders"),
+-
+-                          BROWSEDIR_ID, "0", _("Browse Folders"),
+-                      0 };
+-
+-      ret = sql_exec(db, create_objectTable_sqlite);
++      int ret = sql_exec(db, create_objectTable_sqlite);
+       if( ret != SQLITE_OK )
+               goto sql_failed;
+       ret = sql_exec(db, create_detailTable_sqlite);
+@@ -576,16 +553,18 @@ CreateDatabase(void)
+       ret = sql_exec(db, "INSERT into SETTINGS values ('UPDATE_ID', '0')");
+       if( ret != SQLITE_OK )
+               goto sql_failed;
+-      for( i=0; containers[i]; i=i+3 )
++      for( int i=0; containers[i].name; ++i )
+       {
++              const struct container_s *c = &containers[i];
++              const char *name = _(c->name);
+               ret = sql_exec(db, "INSERT into OBJECTS (OBJECT_ID, PARENT_ID, DETAIL_ID, CLASS, NAME)"
+                                  " values "
+                                  "('%s', '%s', %lld, 'container.storageFolder', '%q')",
+-                                 containers[i], containers[i+1], GetFolderMetadata(containers[i+2], NULL, NULL, NULL, 0), containers[i+2]);
++                                 c->object_id, c->parent_id, GetFolderMetadata(name, NULL, NULL, NULL, 0), name);
+               if( ret != SQLITE_OK )
+                       goto sql_failed;
+       }
+-      for( i=0; magic_containers[i].objectid_match; i++ )
++      for( int i=0; magic_containers[i].objectid_match; i++ )
+       {
+               const struct magic_container_s *magic = &magic_containers[i];
+               if (!magic->name)
diff --git a/multimedia/minidlna/patches/004-reduce_duplication_in_sql_c.patch b/multimedia/minidlna/patches/004-reduce_duplication_in_sql_c.patch
new file mode 100644 (file)
index 0000000..c237217
--- /dev/null
@@ -0,0 +1,192 @@
+From be9de8b2e0864b46498496af9ffdc31c0e7b764a Mon Sep 17 00:00:00 2001
+From: Daniel Kamil Kozar <dkk089@gmail.com>
+Date: Sun, 16 Dec 2018 14:21:58 +0100
+Subject: [PATCH] Reduce duplication in sql.c
+
+---
+ sql.c | 166 ++++++++++++++++++++--------------------------------------
+ 1 file changed, 58 insertions(+), 108 deletions(-)
+
+--- a/sql.c
++++ b/sql.c
+@@ -65,122 +65,72 @@ sql_get_table(sqlite3 *db, const char *s
+       return ret;
+ }
++#define sql_get_field(type, column_get_fn) \
++              va_list         ap;\
++              int             counter, result;\
++              char            *sql;\
++              type            ret;\
++              sqlite3_stmt    *stmt;\
++              \
++              va_start(ap, fmt);\
++              sql = sqlite3_vmprintf(fmt, ap);\
++              va_end(ap);\
++\
++              /*DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql); */ \
++\
++              switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))\
++              {\
++                      case SQLITE_OK:\
++                              break;\
++                      default:\
++                              DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);\
++                              sqlite3_free(sql);\
++                              return -1;\
++              }\
++\
++              for (counter = 0;\
++                   ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;\
++                   counter++) {\
++                      /* While SQLITE_BUSY has a built in timeout,\
++                       * SQLITE_LOCKED does not, so sleep */\
++                      if (result == SQLITE_LOCKED)\
++                              sleep(1);\
++              }\
++\
++              switch (result)\
++              {\
++                      case SQLITE_DONE:\
++                              /* no rows returned */\
++                              ret = 0;\
++                              break;\
++                      case SQLITE_ROW:\
++                              if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)\
++                              {\
++                                      ret = 0;\
++                                      break;\
++                              }\
++                              ret = column_get_fn(stmt, 0);\
++                              break;\
++                      default:\
++                              DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);\
++                              ret = -1;\
++                              break;\
++              }\
++              sqlite3_free(sql);\
++              sqlite3_finalize(stmt);\
++\
++              return ret;
++
+ int
+ sql_get_int_field(sqlite3 *db, const char *fmt, ...)
+ {
+-      va_list         ap;
+-      int             counter, result;
+-      char            *sql;
+-      int             ret;
+-      sqlite3_stmt    *stmt;
+-      
+-      va_start(ap, fmt);
+-      sql = sqlite3_vmprintf(fmt, ap);
+-      va_end(ap);
+-
+-      //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
+-
+-      switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
+-      {
+-              case SQLITE_OK:
+-                      break;
+-              default:
+-                      DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
+-                      sqlite3_free(sql);
+-                      return -1;
+-      }
+-
+-      for (counter = 0;
+-           ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;
+-           counter++) {
+-              /* While SQLITE_BUSY has a built in timeout,
+-               * SQLITE_LOCKED does not, so sleep */
+-              if (result == SQLITE_LOCKED)
+-                      sleep(1);
+-      }
+-
+-      switch (result)
+-      {
+-              case SQLITE_DONE:
+-                      /* no rows returned */
+-                      ret = 0;
+-                      break;
+-              case SQLITE_ROW:
+-                      if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)
+-                      {
+-                              ret = 0;
+-                              break;
+-                      }
+-                      ret = sqlite3_column_int(stmt, 0);
+-                      break;
+-              default:
+-                      DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);
+-                      ret = -1;
+-                      break;
+-      }
+-      sqlite3_free(sql);
+-      sqlite3_finalize(stmt);
+-
+-      return ret;
++      sql_get_field(int, sqlite3_column_int)
+ }
+ int64_t
+ sql_get_int64_field(sqlite3 *db, const char *fmt, ...)
+ {
+-      va_list         ap;
+-      int             counter, result;
+-      char            *sql;
+-      int64_t         ret;
+-      sqlite3_stmt    *stmt;
+-      
+-      va_start(ap, fmt);
+-      sql = sqlite3_vmprintf(fmt, ap);
+-      va_end(ap);
+-
+-      //DPRINTF(E_DEBUG, L_DB_SQL, "sql: %s\n", sql);
+-
+-      switch (sqlite3_prepare_v2(db, sql, -1, &stmt, NULL))
+-      {
+-              case SQLITE_OK:
+-                      break;
+-              default:
+-                      DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql);
+-                      sqlite3_free(sql);
+-                      return -1;
+-      }
+-
+-      for (counter = 0;
+-           ((result = sqlite3_step(stmt)) == SQLITE_BUSY || result == SQLITE_LOCKED) && counter < 2;
+-           counter++) {
+-              /* While SQLITE_BUSY has a built in timeout,
+-               * SQLITE_LOCKED does not, so sleep */
+-              if (result == SQLITE_LOCKED)
+-                      sleep(1);
+-      }
+-
+-      switch (result)
+-      {
+-              case SQLITE_DONE:
+-                      /* no rows returned */
+-                      ret = 0;
+-                      break;
+-              case SQLITE_ROW:
+-                      if (sqlite3_column_type(stmt, 0) == SQLITE_NULL)
+-                      {
+-                              ret = 0;
+-                              break;
+-                      }
+-                      ret = sqlite3_column_int64(stmt, 0);
+-                      break;
+-              default:
+-                      DPRINTF(E_WARN, L_DB_SQL, "%s: step failed: %s\n%s\n", __func__, sqlite3_errmsg(db), sql);
+-                      ret = -1;
+-                      break;
+-      }
+-      sqlite3_free(sql);
+-      sqlite3_finalize(stmt);
+-
+-      return ret;
++      sql_get_field(int64_t, sqlite3_column_int64)
+ }
+ char *
index 671e6cf7c80a9e2b6fc72e320319a80c9075ee8f..4ea69b2bc2d745027398b07fb2a923e0370a3f8b 100644 (file)
@@ -7,23 +7,23 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=v4l2rtspserver
-PKG_VERSION:=0.1.1
+PKG_VERSION:=0.1.6
 PKG_RELEASE:=1
 
 #cannot use codeload as this uses submodules
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=3e3c106b41562be010ba2132903ebf9cdc75a2caceca468b10e2cd0d2939e940
+PKG_MIRROR_HASH:=9e076d2ecac08d5cbd0af7cfaa355e077e03fe35be73259ae7f520e2ef4243f8
+
+LIVE555_VERSION:=2019.02.03
+LIVE555_HASH:=1c938d91553eff224c7a860f8f38b3256028704b474a3fc6bcf2eddc42268710
+LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
 
 PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
 PKG_LICENSE:=Unlicense
 PKG_LICENSE_FILES:=LICENSE
 
-LIVE555_VERSION:=2018.12.14
-LIVE555_HASH:=8dc31f76909602c3c07c8f876237e6ab7ac674d00f1bb065eda20e719f772a47
-LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
-
 PKG_BUILD_PARALLEL:=1
 CMAKE_INSTALL:=1
 
@@ -57,38 +57,19 @@ TARGET_CFLAGS += -flto
 TARGET_CXXFLAGS += -fno-rtti
 TARGET_LDFLAGS += -Wl,--gc-sections
 
-define Build/Prepare
-       $(Build/Prepare/Default)
-
-       ## need to compile some dependencies so that cmake will find them
-
-       # build live555
-       $(eval $(call Download,live555))
+CMAKE_OPTIONS += -DALSA=OFF -DLIVE555CFLAGS="-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1" 
 
-       mkdir -p $(PKG_BUILD_DIR)/live555
-       $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live555
-       $(CP) files/config.openwrt $(PKG_BUILD_DIR)/live555
-       ( cd $(PKG_BUILD_DIR)/live555; ./genMakefiles openwrt )
 
-       +$(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555
-        $(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/live555 PREFIX="$(STAGING_DIR)/usr/" install
-
-       # build v4l2wrapper
-       +$(MAKE_VARS) $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/v4l2wrapper
-       $(CP) $(PKG_BUILD_DIR)/v4l2wrapper/libv4l2wrapper.a $(PKG_BUILD_DIR)
-
-       # cmake patches (these are very hacky and should be a lot cleaner)
-
-       # prevent root path override
-       $(SED) 's/SET(CMAKE_FIND_ROOT_PATH/#SET(CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
-
-       # set search path for v4l2wrapper to current build dir
-       $(SED) 's/V4L2WRAPPER_LIBRARY libv4l2wrapper.a/V4L2WRAPPER_LIBRARY libv4l2wrapper.a PATHS "." NO_CMAKE_FIND_ROOT_PATH/' $(PKG_BUILD_DIR)/CMakeLists.txt
+define Build/Prepare   
+       $(Build/Prepare/Default)
 
-       # disable ALSA
-       $(SED) 's/find_package(ALSA QUIET)//' $(PKG_BUILD_DIR)/CMakeLists.txt
+       # download live555
+       $(eval $(call Download,live555))
+       mkdir -p $(PKG_BUILD_DIR)/live
+       $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live
 endef
 
+
 define Package/v4l2rtspserver/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/v4l2rtspserver-$(PKG_VERSION) $(1)/usr/bin/
diff --git a/multimedia/v4l2rtspserver/files/config.openwrt b/multimedia/v4l2rtspserver/files/config.openwrt
deleted file mode 100644 (file)
index 382a11e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-COMPILE_OPTS =                 $(INCLUDES) -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1 
-C =                            c
-C_COMPILER =                   $(GCC)
-CFLAGS +=                      $(COMPILE_OPTS)
-C_FLAGS =                      $(CFLAGS)
-CPP =                          cpp
-CPLUSPLUS_COMPILER =           $(AS) # optimizations are only in AR apparently, so use instead of CXX
-CPLUSPLUS_FLAGS =              $(COMPILE_OPTS) -Wall -DBSD=1
-CPLUSPLUS_FLAGS +=             $(CPPFLAGS) -fexceptions
-OBJ =                          o
-LINK =                         $(CXX) -o
-LINK_OPTS =                    -L. $(LDFLAGS)
-CONSOLE_LINK_OPTS =            $(LINK_OPTS)
-LIBRARY_LINK =                 $(AR) cr 
-LIBRARY_LINK_OPTS =    
-LIB_SUFFIX =                   a
-LIBS_FOR_CONSOLE_APPLICATION = $(CXXLIBS)
-LIBS_FOR_GUI_APPLICATION =     $(LIBS_FOR_CONSOLE_APPLICATION)
-EXE =
index e4c837e8f16b55dbb85bc613381d49c8ff08e9bf..7a19ef5202a6b19d448a6f36c5dd3366af0c74a3 100644 (file)
@@ -40,10 +40,6 @@ start_instance() {
        config_get path "$s" 'path'
        config_get format "$s" 'format'
 
-       # pull out resolution width and height from string
-       local w="$(echo $resolution | cut -d'x' -f1)"
-       local h="$(echo $resolution | cut -d'x' -f2)"
-       
        # make sure format is uppercase
        format="$(echo $format | tr a-z A-Z)"
 
@@ -52,9 +48,10 @@ start_instance() {
        args="$args -P $port"
        args="$args -u ${path}"
        args="$args -F $fps"
-       args="$args -W $w"
-       args="$args -H $h"
-       args="$args -f$format"
+       args="$args -G ${resolution}"
+        if [ ! -z "$format" ]; then
+                args="$args -f$format"
+        fi
        args="$args -c" # fixes issue with corrupt frames with H264
                
        if [ -n "$username" ]; then
diff --git a/multimedia/v4l2rtspserver/patches/010-Add-a-few-missing-headers.patch b/multimedia/v4l2rtspserver/patches/010-Add-a-few-missing-headers.patch
deleted file mode 100644 (file)
index 57b14c0..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-From 9977cc5a4b35809bed04be543cf38e32d8f175c5 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sat, 15 Dec 2018 15:02:34 -0800
-Subject: [PATCH] Add a few missing headers
-
-Helps to compile with alternative c++ libraries.
----
- inc/DeviceSource.h     | 2 ++
- inc/MemoryBufferSink.h | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/inc/DeviceSource.h b/inc/DeviceSource.h
-index 7d4aa18..0e2f996 100755
---- a/inc/DeviceSource.h
-+++ b/inc/DeviceSource.h
-@@ -18,6 +18,8 @@
- #include <iostream>
- #include <iomanip>
-+#include <pthread.h>
-+
- // live555
- #include <liveMedia.hh>
-diff --git a/inc/MemoryBufferSink.h b/inc/MemoryBufferSink.h
-index 97e1db1..fc6de20 100644
---- a/inc/MemoryBufferSink.h
-+++ b/inc/MemoryBufferSink.h
-@@ -12,6 +12,7 @@
- #pragma once
- #include <map>
-+#include <string>
- #include "MediaSink.hh"
--- 
-2.20.1
-
diff --git a/multimedia/v4l2rtspserver/patches/020-replace-std-stoi-with-atoi.patch b/multimedia/v4l2rtspserver/patches/020-replace-std-stoi-with-atoi.patch
deleted file mode 100644 (file)
index 5940359..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 6e569797c0691d7fb2ba72952f81806d0477ca03 Mon Sep 17 00:00:00 2001
-From: Michel Promonet <michel.promonet@free.fr>
-Date: Tue, 11 Dec 2018 08:25:35 +0100
-Subject: [PATCH] replace std::stoi with atoi
-
----
- src/ServerMediaSubsession.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ServerMediaSubsession.cpp b/src/ServerMediaSubsession.cpp
-index c90555e..9ac9a76 100755
---- a/src/ServerMediaSubsession.cpp
-+++ b/src/ServerMediaSubsession.cpp
-@@ -99,7 +99,7 @@ RTPSink*  BaseServerMediaSubsession::createSink(UsageEnvironment& env, Groupsock
-               getline(is, sampleRate, '/');   
-               std::string channels("2");
-               getline(is, channels);  
--              videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, std::stoi(sampleRate), "audio", "L16", std::stoi(channels), True, False); 
-+              videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, atoi(sampleRate), "audio", "L16", atoi(channels), True, False); 
-       }
-       return videoSink;
- }
--- 
-2.20.1
-
diff --git a/multimedia/v4l2rtspserver/patches/030-fix-build.patch b/multimedia/v4l2rtspserver/patches/030-fix-build.patch
deleted file mode 100644 (file)
index 07b5d6d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From be6dc4592e91841cfe593d88bfe8a8f068671c74 Mon Sep 17 00:00:00 2001
-From: Michel Promonet <michel.promonet@free.fr>
-Date: Tue, 11 Dec 2018 08:34:14 +0100
-Subject: [PATCH] fix build
-
----
- src/ServerMediaSubsession.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ServerMediaSubsession.cpp b/src/ServerMediaSubsession.cpp
-index 9ac9a76..a8b0bb3 100755
---- a/src/ServerMediaSubsession.cpp
-+++ b/src/ServerMediaSubsession.cpp
-@@ -99,7 +99,7 @@ RTPSink*  BaseServerMediaSubsession::createSink(UsageEnvironment& env, Groupsock
-               getline(is, sampleRate, '/');   
-               std::string channels("2");
-               getline(is, channels);  
--              videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, atoi(sampleRate), "audio", "L16", atoi(channels), True, False); 
-+              videoSink = SimpleRTPSink::createNew(env, rtpGroupsock,rtpPayloadTypeIfDynamic, atoi(sampleRate.c_str()), "audio", "L16", atoi(channels.c_str()), True, False); 
-       }
-       return videoSink;
- }
--- 
-2.20.1
-
diff --git a/multimedia/v4l2rtspserver/patches/040-Switch-Makefile-to-compile-with-g.patch b/multimedia/v4l2rtspserver/patches/040-Switch-Makefile-to-compile-with-g.patch
deleted file mode 100644 (file)
index 0277d8a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From f732d44c2bc47e6eccf65e5eb3160734f11e5d3e Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Thu, 27 Dec 2018 20:16:59 -0800
-Subject: [PATCH] Switch Makefile to compile with g++
-
-With this change I managed to get OpenWrt to compile with uclibcxx
-instead of libstdcpp.
-
-Made CXX adjustable by the shell as OpenWrt needs to override this.
-It also has its own ar.
-
-EXTRA_CXXFLAGS seems to be the proper variable based on usage in the
-OpenWrt tree.
----
- Makefile | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 51aaa37..f05bf0d 100644
---- a/v4l2wrapper/Makefile
-+++ b/v4l2wrapper/Makefile
-@@ -1,12 +1,12 @@
--CFLAGS = -W -Wall -pthread -g -pipe $(CFLAGS_EXTRA)
--CFLAGS += -I inc
-+CXXFLAGS ?= -W -Wall -pthread -g -pipe $(EXTRA_CXXFLAGS)
-+CXXFLAGS += -I inc
- RM = rm -rf
--CC = $(CROSS)gcc
--AR = $(CROSS)ar
-+CXX ?= $(CROSS)g++
-+AR ?= $(CROSS)ar
- PREFIX?=/usr
- ifneq ($(wildcard $(SYSROOT)$(PREFIX)/include/log4cpp/Category.hh),)
--CFLAGS += -DHAVE_LOG4CPP -I $(SYSROOT)$(PREFIX)/include
-+CXXFLAGS += -DHAVE_LOG4CPP -I $(SYSROOT)$(PREFIX)/include
- endif
- V4L2WRAPPER_CPP:=$(wildcard src/*.cpp)
-@@ -17,7 +17,7 @@ V4L2WRAPPER_OBJ:=$(V4L2WRAPPER_CPP:%.cpp=%.o)
- all: libv4l2wrapper.a
- %.o: %.cpp
--      $(CC) -c -o $@ $< $(CFLAGS)
-+      $(CXX) -c -o $@ $< $(CXXFLAGS)
- libv4l2wrapper.a: $(V4L2WRAPPER_OBJ)
-       $(AR) rcs $@ $^
--- 
-2.20.1
-
index c50d7c7b7eb6b3b7f487c1237de8a62661da7937..05289b83df05ddacbc65568a584c452d30b2efc9 100644 (file)
@@ -8,46 +8,47 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=youtube-dl
-PKG_VERSION:=2019.01.30.1
+PKG_VERSION:=2019.4.7
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/rg3/youtube-dl/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=6ce95ef3d290c4254fbdc50d5514a1259479486e183b63dee9a4163244035d97
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=youtube_dl-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/y/youtube_dl/
+PKG_HASH:=d8250c9fedea3bcf5c2df62012e9814c96db53540a2842b8f8345885adfd0a85
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/youtube_dl-$(PKG_VERSION)
 
 PKG_LICENSE:=Unlicense
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Adrian Panella <ianchi74@outlook.com>, Josef Schlehofer <pepe.schlehofer@gmail.com>
 
-PKG_BUILD_DEPENDS:=python/host zip/host
-
 include $(INCLUDE_DIR)/package.mk
+include ../../lang/python/python3-package.mk
 
-define Package/youtube-dl
+define Package/youtube-dl/Default
   SECTION:=multimedia
   CATEGORY:=Multimedia
-  TITLE:=utility to download videos from YouTube.com
-  DEPENDS:=+python-openssl +python-email +python-xml +python-codecs +python-ctypes +ca-certificates
-  URL:=https://youtube-dl.org
+  TITLE:=Utility to download videos from YouTube.com
+  DEPENDS:=+ca-certificates
+  URL:=https://yt-dl.org
 endef
 
 define Package/youtube-dl/description
   youtube-dl is a small command-line program to download videos
-  from YouTube.com and a few more sites.
-  It requires the Python interpreter.
+  from YouTube.com and other video sites.
+  It requires the Python3 interpreter.
 endef
 
-define Package/youtube-dl/install
-       $(INSTALL_DIR) $(1)/usr/bin
-
-       python -m compileall $(PKG_BUILD_DIR)/youtube_dl/
-       cd $(PKG_BUILD_DIR) && zip --quiet youtube-dl-c.zip youtube_dl/*.pyc youtube_dl/*/*.pyc
-       cd $(PKG_BUILD_DIR) && zip --quiet --junk-paths youtube-dl-c.zip youtube_dl/__main__.pyc
-       echo '#!/usr/bin/env python' > $(PKG_BUILD_DIR)/youtube-dl-c
-       cat $(PKG_BUILD_DIR)/youtube-dl-c.zip >> $(PKG_BUILD_DIR)/youtube-dl-c
-
-       $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/youtube-dl-c $(1)/usr/bin/youtube-dl
+define Package/youtube-dl
+$(call Package/youtube-dl/Default)
+  DEPENDS+= \
+       +PACKAGE_youtube-dl:python3 \
+       +PACKAGE_youtube-dl:python3-email \
+       +PACKAGE_youtube-dl:python3-xml \
+       +PACKAGE_youtube-dl:python3-codecs \
+       +PACKAGE_youtube-dl:python3-ctypes
+  VARIANT:=python3
 endef
 
+$(eval $(call Py3Package,youtube-dl))
 $(eval $(call BuildPackage,youtube-dl))
+$(eval $(call BuildPackage,youtube-dl-src))
diff --git a/multimedia/youtube-dl/patches/dont-use-pandoc.patch b/multimedia/youtube-dl/patches/dont-use-pandoc.patch
deleted file mode 100644 (file)
index 51b3dd5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 4a62f44..fee93e8 100644
---- a/Makefile
-+++ b/Makefile
-@@ -85,12 +85,12 @@ supportedsites:
-       $(PYTHON) devscripts/make_supportedsites.py docs/supportedsites.md
- README.txt: README.md
--      pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
-+#     pandoc -f $(MARKDOWN) -t plain README.md -o README.txt
- youtube-dl.1: README.md
--      $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
--      pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
--      rm -f youtube-dl.1.temp.md
-+#     $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
-+#     pandoc -s -f $(MARKDOWN) -t man youtube-dl.1.temp.md -o youtube-dl.1
-+#     rm -f youtube-dl.1.temp.md
- youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
-       $(PYTHON) devscripts/bash-completion.py
index 3feb74478b3ecda38c576c8a187a943186c89f3c..412e7019c0d3cf80eb52df442dcd032a9388c420 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acme
 PKG_VERSION:=2.7.9
-PKG_RELEASE:=6
+PKG_RELEASE:=8
 PKG_LICENSE:=GPLv3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -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 233abee68667cca2bbbb3355ae665844d1cf60d5..b7a6f1899bfca6a1a2c5dff36b4b08e7cc3b12dc 100644 (file)
@@ -129,16 +129,16 @@ post_checks()
     iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
     ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
 
-    if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ $UPDATE_UHTTPD -eq 1 ] ); then
+    if [ -e /etc/init.d/uhttpd ] && ( [ -n "$UHTTPD_LISTEN_HTTP" ] || [ "$UPDATE_UHTTPD" -eq 1 ] ); then
         if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
             uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
-            uci commit uhttpd
             UHTTPD_LISTEN_HTTP=
         fi
+        uci commit uhttpd
         /etc/init.d/uhttpd reload
     fi
 
-    if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ $UPDATE_NGINX -eq 1 ] ); then
+    if [ -e /etc/init.d/nginx ] && ( [ "$NGINX_WEBSERVER" -eq 1 ] || [ "$UPDATE_NGINX" -eq 1 ] ); then
         NGINX_WEBSERVER=0
         /etc/init.d/nginx restart
     fi
@@ -180,6 +180,7 @@ issue_cert()
     local failed_dir
     local webroot
     local dns
+    local ret
 
     config_get_bool enabled "$section" enabled 0
     config_get_bool use_staging "$section" use_staging
@@ -204,6 +205,12 @@ issue_cert()
 
     log "Running ACME for $main_domain"
 
+    handle_credentials() {
+        local credential="$1"
+        eval export $credential
+    }
+    config_list_foreach "$section" credentials handle_credentials
+
     if [ -e "$STATE_DIR/$main_domain" ]; then
         if [ "$use_staging" -eq "0" ] && is_staging "$main_domain"; then
             log "Found previous cert issued using staging server. Moving it out of the way."
@@ -211,8 +218,9 @@ issue_cert()
             moved_staging=1
         else
             log "Found previous cert config. Issuing renew."
-            $ACME --home "$STATE_DIR" --renew -d "$main_domain" $acme_args || return 1
-            return 0
+            $ACME --home "$STATE_DIR" --renew -d "$main_domain" $acme_args && ret=0 || ret=1
+            post_checks
+            return $ret
         fi
     fi
 
@@ -231,18 +239,13 @@ issue_cert()
     else
         if [ ! -d "$webroot" ]; then
             err "$main_domain: Webroot dir '$webroot' does not exist!"
+            post_checks
             return 1
         fi
         log "Using webroot dir: $webroot"
         acme_args="$acme_args --webroot $webroot"
     fi
 
-    handle_credentials() {
-        local credential="$1"
-        eval export $credential
-    }
-    config_list_foreach "$section" credentials handle_credentials
-
     if ! $ACME --home "$STATE_DIR" --issue $acme_args; then
         failed_dir="$STATE_DIR/${main_domain}.failed-$(date +%s)"
         err "Issuing cert for $main_domain failed. Moving state to $failed_dir"
index 1eb3d2ee7621a245b1f1ef3cb466c6a9af908841..c20f95bae7cb296c75cc781451b0cd2f24cdb451 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=aggregate
 PKG_VERSION:=1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.isc.org/isc/aggregate/
diff --git a/net/aggregate/patches/500-cross_compile_flags.patch b/net/aggregate/patches/500-cross_compile_flags.patch
new file mode 100644 (file)
index 0000000..b7392fb
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25,8 +25,9 @@
+ INSTALL = @INSTALL@
+ DEFS = @DEFS@
+ LIBS = @LIBS@
+-CFLAGS = -O
+-LDFLAGS = -s
++CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
+ prefix = @prefix@
+ SHELL = /bin/sh
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 99e2476fc40cde17d91ecc3ac3b05e16759e6e65..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' \
@@ -94,6 +94,9 @@ aria2_validate() {
                'all_proxy_user:string' \
                'auto_save_interval:range(0,600)' \
                'bt_enable_lpd:or("true","false")' \
+               'bt_detach_seed_only:or("true","false")' \
+               'bt_load_saved_metadata:or("true","false")' \
+               'bt_prioritize_piece:string' \
                'bt_max_open_files:uinteger' \
                'bt_max_peers:uinteger' \
                'bt_remove_unselected_file:or("true","false")' \
@@ -105,6 +108,7 @@ aria2_validate() {
                'ca_certificate:file' \
                'certificate:file' \
                'check_certificate:or("true","false"):true' \
+               'check_integrity:or("true","false")' \
                'connect_timeout:uinteger' \
                'dht_listen_port:string' \
                'dir:string' \
@@ -154,39 +158,39 @@ 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; }
-       [ -n "$dir" ] || { _err "Please set downlod dir."; return 1; }
-       [ -d "$dir" ] || { _err "Please create downlod dir first."; return 1; }
+       [ "$enabled" = "1" ] || { _info "Instance \"$section\" disabled."; return 1; }
+       [ -n "$dir" ] || { _err "Please set download dir."; return 1; }
+       [ -d "$dir" ] || { _err "Please create download dir first."; return 1; }
 
-       config_file="${config_dir}/${NAME}.conf.${section}"
-       config_file_tmp="${config_dir}/${NAME}.conf.tmp"
-       session_file="${config_dir}/${NAME}.session.${section}"
+       config_file="$config_dir/$NAME.conf.$section"
+       config_file_tmp="$config_dir/$NAME.conf.tmp"
+       session_file="$config_dir/$NAME.session.$section"
 
        _make_dir "$config_dir" || {
-               _err "Can't create config dir: ${config_dir}"
+               _err "Can't create config dir: $config_dir"
                return 1
        }
 
        _create_file "$session_file" "$config_file" "$config_file_tmp" || {
-               _err "Can't create files: ${session_file}, ${config_file}, ${config_file_tmp}"
+               _err "Can't create files: $session_file, $config_file, $config_file_tmp"
                return 1
        }
 
        # create tmp file
        cat >"$config_file_tmp" <<-EOF
-               # Auto generated file, changes to this file will lost.
+               # Auto generated file, changes to this file will be lost.
        EOF
 
-       append_setting "dir=${dir}"
+       append_setting "dir=$dir"
        append_setting "enable-rpc=true"
        append_setting "rpc-allow-origin-all=true"
        append_setting "rpc-listen-all=true"
        append_setting "quiet=true"
        append_setting "continue=true"
-       append_setting "input-file=${session_file}"
-       append_setting "save-session=${session_file}"
+       append_setting "input-file=$session_file"
+       append_setting "save-session=$session_file"
 
        if [ -z "$enable_logging" ]; then
                append_options "log" "log_level"
@@ -197,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
 
@@ -214,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 recommand to set RPC secret."
+                       _info "It is recommended to set RPC secret."
                fi
        elif [ "$rpc_auth_method" = "token" ]; then
                if [ -n "$rpc_secret" ]; then
-                       append_setting "rpc-secret=${rpc_secret}"
+                       append_setting "rpc-secret=$rpc_secret"
                else
                        unset_auth_method
                fi
        elif [ "$rpc_auth_method" = "user_pass" ]; then
                if [ -n "$rpc_user" ]; then
-                       append_setting "rpc-user=${rpc_user}"
-                       append_setting "rpc-passwd=${rpc_passwd}"
+                       append_setting "rpc-user=$rpc_user"
+                       append_setting "rpc-passwd=$rpc_passwd"
                else
                        _info "Please set RPC user."
                        unset_auth_method
@@ -257,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
@@ -284,18 +288,20 @@ 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" \
-               "bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_save_metadata" "bt_seed_unverified" \
-               "bt_stop_timeout" "certificate" "connect_timeout" "dht_listen_port" "disable_ipv6" "disk_cache" \
-               "enable_peer_exchange" "event_poll" "file_allocation" "follow_torrent" "force_save" "http_accept_gzip" \
-               "http_no_cache" "listen_port" "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
+               "bt_remove_unselected_file" "bt_request_peer_speed_limit" "bt_prioritize_piece" \
+               "bt_stop_timeout" "bt_detach_seed_only" "bt_save_metadata" "bt_load_saved_metadata" \
+               "bt_seed_unverified" "certificate" "check_integrity" "connect_timeout" "dht_listen_port" \
+               "disable_ipv6" "disk_cache" "enable_peer_exchange" "event_poll" "file_allocation" \
+               "follow_torrent" "force_save" "http_accept_gzip" "http_no_cache" "listen_port" \
+               "lowest_speed_limit" "max_concurrent_downloads" "max_connection_per_server" \
                "max_download_limit" "max_overall_download_limit" "max_overall_upload_limit" "max_tries" \
                "max_upload_limit" "min_split_size" "pause" "pause_metadata" "peer_id_prefix" "private_key" \
                "retry_wait" "rpc_listen_port" "save_session_interval" "seed_ratio" "seed_time" "split" "timeout" \
@@ -312,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 "Set run user to '${user}' failed, default user will be used."
+                       _info "Setting run user to '$user' failed, default user will be used."
                        user=
                fi
        fi
 
-       procd_open_instance "${NAME}.${section}"
+       procd_open_instance "$NAME.$section"
        procd_set_param command "$PROG"
-       procd_append_param command --conf-path="${config_file}"
+       procd_append_param command --conf-path="$config_file"
 
        procd_set_param respawn
        procd_set_param stdout 1
@@ -334,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
@@ -342,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 70ac63c81580626ff444e3f2ab18636901278302..1ca8ab9b69ad429582b0fb08efa706b57163ad26 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcp38
 PKG_VERSION:=5
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_LICENCE:=GPL-3.0+
 
 include $(INCLUDE_DIR)/package.mk
@@ -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 fc785ebe71a5f1b12ae75b5778cdd559370159da..488daab68f8af1bfdfbce7073f43e92e9228ba52 100644 (file)
@@ -3,8 +3,6 @@ config bcp38
        option interface 'eth1'
        option detect_upstream 1
        list match '127.0.0.0/8'
-       list match '0.0.0.0/8'       # RFC 1700
-       list match '240.0.0.0/4'     # RFC 5745
        list match '192.0.2.0/24'    # RFC 5737
        list match '198.51.100.0/24' # RFC 5737
        list match '203.0.113.0/24'  # RFC 5737
index 52f203dc01c0832750b53d3de88303e88d801481..ed11b2eee0b754cd82cd1637431fcfb270c1fae0 100644 (file)
@@ -9,24 +9,26 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bind
-PKG_VERSION:=9.11.5-P1
+PKG_VERSION:=9.12.3-P4
 PKG_RELEASE:=1
 USERID:=bind=57:bind=57
 
 PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
 PKG_LICENSE := MPL-2.0
+PKG_CPE_ID:=cpe:/a:isc:bind
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:= \
        https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \
        https://ftp.isc.org/isc/bind9/$(PKG_VERSION)
-PKG_HASH:=6cd6dbf016569f12d4a0ed629e44e895d9ed41c6908274ed2e617666c5491928
+PKG_HASH:=d1014453c62623e42323fd83fc89444c12ae6b707fd586466959a052fe21f206
 
 PKG_FIXUP:=autoreconf
 PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
 
 PKG_INSTALL:=1
 PKG_USE_MIPS16:=0
+PKG_BUILD_PARALLEL:=1
 
 PKG_CONFIG_DEPENDS := \
        CONFIG_BIND_ENABLE_FILTER_AAAA \
@@ -117,9 +119,10 @@ endef
 
 export BUILD_CC="$(TARGET_CC)"
 
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 CONFIGURE_ARGS += \
-       --enable-shared \
-       --enable-static \
+       --enable-ipv6=$(if $(CONFIG_IPV6),yes,no) \
        --with-randomdev="/dev/urandom" \
        --disable-threads \
        --disable-linux-caps \
index 4a4fa44e81699ea0afdb2e2ecac6acf7bd385fe5..02049fd32e5c47a5679176f735e3be9711f294ea 100644 (file)
@@ -1,7 +1,5 @@
-Index: bind-9.11.5/bin/Makefile.in
-===================================================================
---- bind-9.11.5.orig/bin/Makefile.in
-+++ bind-9.11.5/bin/Makefile.in
+--- a/bin/Makefile.in
++++ b/bin/Makefile.in
 @@ -12,7 +12,7 @@ VPATH =              @srcdir@
  top_srcdir =  @top_srcdir@
  
index 9d47bf2052c546df4296756c82f696bf657f5fc2..1bf444c8d4bfe31fbcd5a1835a128d877b80f46d 100644 (file)
@@ -1,8 +1,6 @@
-Index: bind-9.11.5/configure.in
-===================================================================
---- bind-9.11.5.orig/configure.in
-+++ bind-9.11.5/configure.in
-@@ -181,26 +181,11 @@ esac
+--- a/configure.in
++++ b/configure.in
+@@ -182,26 +182,11 @@ esac
  #
  AC_CONFIG_FILES([make/rules make/includes])
  
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 95db33a37365d920b871448cf920ebf5e1f86386..b8d0625a973847531a2b036783f13eaf701197d6 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=clamav
-PKG_VERSION:=0.101.1
+PKG_VERSION:=0.101.2
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
@@ -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 a02468e0737aebd12281155f588944c65edf0ba9..38b1c3238f09d43983a4002cc381be4f0a2d61e1 100644 (file)
@@ -9,7 +9,7 @@ PROG=/usr/sbin/clamd
 CLAMD_CONFIGFILE="/tmp/clamav/clamd.conf"
 
 validate_clamav_section() {
-       uci_validate_section clamav clamav "${1}" \
+       uci_load_validate clamav clamav "$1" "$2" \
                'clamd_config_file:string' \
                'LogFile:string' \
                'LogFileMaxSize:string' \
@@ -46,15 +46,8 @@ validate_clamav_section() {
                'DatabaseDirectory:string'
 }
 
-start_service() {
-       local clamd_config_file LogFile LogTime StreamMinPort \
-               StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \
-               FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \
-               ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \
-               ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User \
-               DatabaseDirectory
-
-       validate_clamav_section clamav || {
+start_clamav_instance() {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -107,9 +100,14 @@ start_service() {
        procd_close_instance
 }
 
+start_service()
+{
+       validate_clamav_section clamav start_clamav_instance
+}
+
 stop_service()
 {
-       service_stop ${PROG}
+       service_stop $PROG
 }
 
 service_triggers()
index 9504b7ffaae7654f1d1a7b4b87bf19cffbf99998..120dc803f60d0e1f8f07e7aba597360d139caa22 100644 (file)
@@ -9,7 +9,7 @@ PROG=/usr/sbin/freshclam
 FRESHCLAM_CONFIGFILE="/tmp/clamav/freshclam.conf"
 
 validate_freshclam_section() {
-       uci_validate_section freshclam freshclam "${1}" \
+       uci_load_validate freshclam freshclam "$1" "$2" \
                'freshclam_config_file:string' \
                'UpdateLogFile:string' \
                'DatabaseMirror:string' \
@@ -19,11 +19,8 @@ validate_freshclam_section() {
                'DatabaseDirectory:string:'
 }
 
-start_service() {
-       local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror \
-       DatabaseDirectory
-
-       validate_freshclam_section freshclam || {
+start_freshclam_instance() {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -51,6 +48,11 @@ start_service() {
        procd_close_instance
 }
 
+start_service()
+{
+       validate_freshclam_section freshclam start_freshclam_instance
+}
+
 stop_service()
 {
        [ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0
index 7243f8818077187ed37b8c56a44a41cbe83cc29a..a9a72d08247cd27a9f5f5b72743acc25f5966544 100644 (file)
@@ -8,15 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=conserver
-PKG_VERSION:=8.2.2
-PKG_RELEASE:=2
+PKG_VERSION:=8.2.4
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Bjørn Mork <bjorn@mork.no>
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/conserver/conserver.git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_SOURCE_URL:=https://codeload.github.com/conserver/conserver/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MIRROR_HASH:=27d92e6c04e97cd0884774eace0b44f30087695927bcce8addc11dba9c090d7c
+PKG_HASH:=8d8b263d9531ebb827257bd67baf9200cac4fb7ffbe033122686e39ca42cddd6
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -57,10 +55,17 @@ endef
 
 CONFIGURE_ARGS += \
        --with-openssl \
+       $(if $(CONFIG_IPV6),--with-ipv6) \
        --sysconfdir=/etc/conserver \
        --with-port=3109 \
        --with-logfile=/var/log/conserver/server.log
 
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(CP) ./files/config.sub $(PKG_BUILD_DIR)/
+       $(CP) ./files/config.guess $(PKG_BUILD_DIR)/
+endef
+
 define Package/conserver/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/conserver $(1)/usr/sbin/
diff --git a/net/conserver/files/config.guess b/net/conserver/files/config.guess
new file mode 100644 (file)
index 0000000..79d1317
--- /dev/null
@@ -0,0 +1,1645 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-03-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+       { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+       { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+       { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+       ,,)    echo "int x;" > "$dummy.c"
+              for driver in cc gcc c89 c99 ; do
+                  if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+                      CC_FOR_BUILD="$driver"
+                      break
+                  fi
+              done
+              if test x"$CC_FOR_BUILD" = x ; then
+                  CC_FOR_BUILD=no_compiler_found
+              fi
+              ;;
+       ,,*)   CC_FOR_BUILD=$CC ;;
+       ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "$UNAME_SYSTEM" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       set_cc_for_build
+       cat <<-EOF > "$dummy.c"
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+       # If ldd exists, use it to detect musl libc.
+       if command -v ldd >/dev/null && \
+               ldd --version 2>&1 | grep -q ^musl
+       then
+           LIBC=musl
+       fi
+       ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+           "/sbin/$sysctl" 2>/dev/null || \
+           "/usr/sbin/$sysctl" 2>/dev/null || \
+           echo unknown)`
+       case "$UNAME_MACHINE_ARCH" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
+           earmv*)
+               arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+               endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+               machine="${arch}${endian}"-unknown
+               ;;
+           *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently (or will in the future) and ABI.
+       case "$UNAME_MACHINE_ARCH" in
+           earm*)
+               os=netbsdelf
+               ;;
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep -q __ELF__
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # Determine ABI tags.
+       case "$UNAME_MACHINE_ARCH" in
+           earm*)
+               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+               abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "$UNAME_VERSION" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "$machine-${os}${release}${abi-}"
+       exit ;;
+    *:Bitrig:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+       echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+       exit ;;
+    *:LibertyBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+       echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+       exit ;;
+    *:MidnightBSD:*:*)
+       echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
+       exit ;;
+    *:SolidBSD:*:*)
+       echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
+       exit ;;
+    *:MirBSD:*:*)
+       echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
+       exit ;;
+    *:Sortix:*:*)
+       echo "$UNAME_MACHINE"-unknown-sortix
+       exit ;;
+    *:Redox:*:*)
+       echo "$UNAME_MACHINE"-unknown-redox
+       exit ;;
+    mips:OSF1:*.*)
+        echo mips-dec-osf1
+        exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE=alpha ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE=alpha ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE=alpha ;;
+           "EV5 (21164)")
+               UNAME_MACHINE=alphaev5 ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE=alphaev56 ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE=alphapca56 ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE=alphapca57 ;;
+           "EV6 (21264)")
+               UNAME_MACHINE=alphaev6 ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE=alphaev67 ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE=alphaev68 ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE=alphaev68 ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE=alphaev68 ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE=alphaev69 ;;
+           "EV7 (21364)")
+               UNAME_MACHINE=alphaev7 ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE=alphaev79 ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       exitcode=$?
+       trap '' 0
+       exit $exitcode ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo "$UNAME_MACHINE"-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo "$UNAME_MACHINE"-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+       echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix"$UNAME_RELEASE"
+       exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    s390x:SunOS:*:*)
+       echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+       exit ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+       exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+       echo i386-pc-auroraux"$UNAME_RELEASE"
+       exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+       set_cc_for_build
+       SUN_ARCH=i386
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH=x86_64
+           fi
+       fi
+       echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos"$UNAME_RELEASE"
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos"$UNAME_RELEASE"
+               ;;
+           sun4)
+               echo sparc-sun-sunos"$UNAME_RELEASE"
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos"$UNAME_RELEASE"
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint"$UNAME_RELEASE"
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint"$UNAME_RELEASE"
+       exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+       echo m68k-atari-mint"$UNAME_RELEASE"
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+       echo m68k-milan-mint"$UNAME_RELEASE"
+       exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+       echo m68k-hades-mint"$UNAME_RELEASE"
+       exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+       echo m68k-unknown-mint"$UNAME_RELEASE"
+       exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten"$UNAME_RELEASE"
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten"$UNAME_RELEASE"
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix"$UNAME_RELEASE"
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix"$UNAME_RELEASE"
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix"$UNAME_RELEASE"
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       set_cc_for_build
+       sed 's/^        //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+         dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos"$UNAME_RELEASE"
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+       # DG/UX returns AViiON for all architectures
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+       then
+           if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+              [ "$TARGET_BINARY_INTERFACE"x = x ]
+           then
+               echo m88k-dg-dgux"$UNAME_RELEASE"
+           else
+               echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+           fi
+       else
+           echo i586-dg-dgux"$UNAME_RELEASE"
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+       fi
+       echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               set_cc_for_build
+               sed 's/^                //' << EOF > "$dummy.c"
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[4567])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/lslpp ] ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+       else
+               IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+       fi
+       echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+       case "$UNAME_MACHINE" in
+           9000/31?)            HP_ARCH=m68000 ;;
+           9000/[34]??)         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                   case "$sc_cpu_version" in
+                     523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+                     532)                      # CPU_PA_RISC2_0
+                       case "$sc_kernel_bits" in
+                         32) HP_ARCH=hppa2.0n ;;
+                         64) HP_ARCH=hppa2.0w ;;
+                         '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+                       esac ;;
+                   esac
+               fi
+               if [ "$HP_ARCH" = "" ]; then
+                   set_cc_for_build
+                   sed 's/^            //' << EOF > "$dummy.c"
+
+               #define _HPUX_SOURCE
+               #include <stdlib.h>
+               #include <unistd.h>
+
+               int main ()
+               {
+               #if defined(_SC_KERNEL_BITS)
+                   long bits = sysconf(_SC_KERNEL_BITS);
+               #endif
+                   long cpu  = sysconf (_SC_CPU_VERSION);
+
+                   switch (cpu)
+                       {
+                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+                       case CPU_PA_RISC2_0:
+               #if defined(_SC_KERNEL_BITS)
+                           switch (bits)
+                               {
+                               case 64: puts ("hppa2.0w"); break;
+                               case 32: puts ("hppa2.0n"); break;
+                               default: puts ("hppa2.0"); break;
+                               } break;
+               #else  /* !defined(_SC_KERNEL_BITS) */
+                           puts ("hppa2.0"); break;
+               #endif
+                       default: puts ("hppa1.0"); break;
+                       }
+                   exit (0);
+               }
+EOF
+                   (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ "$HP_ARCH" = hppa2.0w ]
+       then
+           set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep -q __LP64__
+           then
+               HP_ARCH=hppa2.0w
+           else
+               HP_ARCH=hppa64
+           fi
+       fi
+       echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux"$HPUX_REV"
+       exit ;;
+    3050*:HI-UX:*:*)
+       set_cc_for_build
+       sed 's/^        //' << EOF > "$dummy.c"
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo "$UNAME_MACHINE"-unknown-osf1mk
+       else
+           echo "$UNAME_MACHINE"-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+       exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+       exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+       exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+       exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+       FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    5000:UNIX_System_V:4.*:*)
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+       FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi"$UNAME_RELEASE"
+       exit ;;
+    *:BSD/OS:*:*)
+       echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+       exit ;;
+    arm:FreeBSD:*:*)
+       UNAME_PROCESSOR=`uname -p`
+       set_cc_for_build
+       if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_PCS_VFP
+       then
+           echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+       else
+           echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+       fi
+       exit ;;
+    *:FreeBSD:*:*)
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       case "$UNAME_PROCESSOR" in
+           amd64)
+               UNAME_PROCESSOR=x86_64 ;;
+           i386)
+               UNAME_PROCESSOR=i586 ;;
+       esac
+       echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+       exit ;;
+    i*:CYGWIN*:*)
+       echo "$UNAME_MACHINE"-pc-cygwin
+       exit ;;
+    *:MINGW64*:*)
+       echo "$UNAME_MACHINE"-pc-mingw64
+       exit ;;
+    *:MINGW*:*)
+       echo "$UNAME_MACHINE"-pc-mingw32
+       exit ;;
+    *:MSYS*:*)
+       echo "$UNAME_MACHINE"-pc-msys
+       exit ;;
+    i*:PW*:*)
+       echo "$UNAME_MACHINE"-pc-pw32
+       exit ;;
+    *:Interix*:*)
+       case "$UNAME_MACHINE" in
+           x86)
+               echo i586-pc-interix"$UNAME_RELEASE"
+               exit ;;
+           authenticamd | genuineintel | EM64T)
+               echo x86_64-unknown-interix"$UNAME_RELEASE"
+               exit ;;
+           IA64)
+               echo ia64-unknown-interix"$UNAME_RELEASE"
+               exit ;;
+       esac ;;
+    i*:UWIN*:*)
+       echo "$UNAME_MACHINE"-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-pc-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
+       exit ;;
+    *:Minix:*:*)
+       echo "$UNAME_MACHINE"-unknown-minix
+       exit ;;
+    aarch64:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    aarch64_be:Linux:*:*)
+       UNAME_MACHINE=aarch64_be
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+       esac
+       objdump --private-headers /bin/sh | grep -q ld.so.1
+       if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    arm*:Linux:*:*)
+       set_cc_for_build
+       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+           | grep -q __ARM_EABI__
+       then
+           echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       else
+           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+               | grep -q __ARM_PCS_VFP
+           then
+               echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+           else
+               echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+           fi
+       fi
+       exit ;;
+    avr32*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    cris:Linux:*:*)
+       echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+       exit ;;
+    crisv32:Linux:*:*)
+       echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+       exit ;;
+    e2k:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    frv:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    hexagon:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    i*86:Linux:*:*)
+       echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+       exit ;;
+    ia64:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    k1om:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    m32r*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    m68*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+       set_cc_for_build
+       IS_GLIBC=0
+       test x"${LIBC}" = xgnu && IS_GLIBC=1
+       sed 's/^        //' << EOF > "$dummy.c"
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #undef mips64
+       #undef mips64el
+       #if ${IS_GLIBC} && defined(_ABI64)
+       LIBCABI=gnuabi64
+       #else
+       #if ${IS_GLIBC} && defined(_ABIN32)
+       LIBCABI=gnuabin32
+       #else
+       LIBCABI=${LIBC}
+       #endif
+       #endif
+
+       #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+       CPU=mipsisa64r6
+       #else
+       #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+       CPU=mipsisa32r6
+       #else
+       #if defined(__mips64)
+       CPU=mips64
+       #else
+       CPU=mips
+       #endif
+       #endif
+       #endif
+
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       MIPS_ENDIAN=el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       MIPS_ENDIAN=
+       #else
+       MIPS_ENDIAN=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+       test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+       ;;
+    mips64el:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-"$LIBC"
+       exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-"$LIBC"
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-"$LIBC"
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+         PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+         *)    echo hppa-unknown-linux-"$LIBC" ;;
+       esac
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-"$LIBC"
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-"$LIBC"
+       exit ;;
+    ppc64le:Linux:*:*)
+       echo powerpc64le-unknown-linux-"$LIBC"
+       exit ;;
+    ppcle:Linux:*:*)
+       echo powerpcle-unknown-linux-"$LIBC"
+       exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
+       exit ;;
+    sh64*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    sh*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    tile*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    vax:Linux:*:*)
+       echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
+       exit ;;
+    x86_64:Linux:*:*)
+       echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+       exit ;;
+    xtensa*:Linux:*:*)
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+       exit ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+       # Unixware is an offshoot of SVR4, but it has its own version
+       # number series starting with 2...
+       # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+       # Use sysv4.2uw... so that sysv4* matches it.
+       echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo "$UNAME_MACHINE"-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo "$UNAME_MACHINE"-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo "$UNAME_MACHINE"-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo "$UNAME_MACHINE"-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+       echo i386-unknown-lynxos"$UNAME_RELEASE"
+       exit ;;
+    i*86:*DOS:*:*)
+       echo "$UNAME_MACHINE"-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:*)
+       UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+       else
+               echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+       else
+               echo "$UNAME_MACHINE"-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+       # uname -m prints for DJGPP always 'pc', but it prints nothing about
+       # the processor, so we play safe by assuming i586.
+       # Note: whatever this is, it MUST be the same as what config.sub
+       # prints for the "djgpp" host, or else GDB configure will decide that
+       # this is a cross-build.
+       echo i586-pc-msdosdjgpp
+       exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos"$UNAME_RELEASE"
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos"$UNAME_RELEASE"
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos"$UNAME_RELEASE"
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+       echo powerpc-unknown-lynxos"$UNAME_RELEASE"
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv"$UNAME_RELEASE"
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo "$UNAME_MACHINE"-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                       # says <Richard.M.Bartel@ccMail.Census.GOV>
+       echo i586-unisys-sysv4
+       exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo "$UNAME_MACHINE"-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux"$UNAME_RELEASE"
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv"$UNAME_RELEASE"
+       else
+               echo mips-unknown-sysv"$UNAME_RELEASE"
+       fi
+       exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
+       echo i586-pc-haiku
+       exit ;;
+    x86_64:Haiku:*:*)
+       echo x86_64-unknown-haiku
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    SX-ACE:SUPER-UX:*:*)
+       echo sxace-nec-superux"$UNAME_RELEASE"
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody"$UNAME_RELEASE"
+       exit ;;
+    *:Rhapsody:*:*)
+       echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+           if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
+               # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+               if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_PPC >/dev/null
+               then
+                   UNAME_PROCESSOR=powerpc
+               fi
+           fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
+       fi
+       echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = x86; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+       echo nsv-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+       echo nsx-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       # shellcheck disable=SC2154
+       if test "$cputype" = 386; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo "$UNAME_MACHINE"-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+       echo mips-sei-seiux"$UNAME_RELEASE"
+       exit ;;
+    *:DragonFly:*:*)
+       echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "$UNAME_MACHINE" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
+       exit ;;
+    i*86:rdos:*:*)
+       echo "$UNAME_MACHINE"-pc-rdos
+       exit ;;
+    i*86:AROS:*:*)
+       echo "$UNAME_MACHINE"-pc-aros
+       exit ;;
+    x86_64:VMkernel:*:*)
+       echo "$UNAME_MACHINE"-unknown-esx
+       exit ;;
+    amd64:Isilon\ OneFS:*:*)
+       echo x86_64-unknown-onefs
+       exit ;;
+    *:Unleashed:*:*)
+       echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+       exit ;;
+esac
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) /* >= ULTRIX4 */
+  printf ("mips-dec-ultrix4\n"); exit (0);
+#else
+#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST)
+  printf ("mips-dec-ultrix3\n"); exit (0);
+#endif
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+    mips:Linux | mips64:Linux)
+       # If we got here on MIPS GNU/Linux, output extra information.
+       cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+       ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/net/conserver/files/config.sub b/net/conserver/files/config.sub
new file mode 100644 (file)
index 0000000..3b4c762
--- /dev/null
@@ -0,0 +1,1795 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2019 Free Software Foundation, Inc.
+
+timestamp='2019-01-05'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2019 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+
+# Separate into logical components for further validation
+case $1 in
+       *-*-*-*-*)
+               echo Invalid configuration \`"$1"\': more than four components >&2
+               exit 1
+               ;;
+       *-*-*-*)
+               basic_machine=$field1-$field2
+               os=$field3-$field4
+               ;;
+       *-*-*)
+               # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+               # parts
+               maybe_os=$field2-$field3
+               case $maybe_os in
+                       nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+                       | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+                       | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+                       | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+                       | storm-chaos* | os2-emx* | rtmk-nova*)
+                               basic_machine=$field1
+                               os=$maybe_os
+                               ;;
+                       android-linux)
+                               basic_machine=$field1-unknown
+                               os=linux-android
+                               ;;
+                       *)
+                               basic_machine=$field1-$field2
+                               os=$field3
+                               ;;
+               esac
+               ;;
+       *-*)
+               # A lone config we happen to match not fitting any pattern
+               case $field1-$field2 in
+                       decstation-3100)
+                               basic_machine=mips-dec
+                               os=
+                               ;;
+                       *-*)
+                               # Second component is usually, but not always the OS
+                               case $field2 in
+                                       # Prevent following clause from handling this valid os
+                                       sun*os*)
+                                               basic_machine=$field1
+                                               os=$field2
+                                               ;;
+                                       # Manufacturers
+                                       dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+                                       | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+                                       | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+                                       | convergent* | ncr* | news | 32* | 3600* | 3100* \
+                                       | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+                                       | ultra | tti* | harris | dolphin | highlevel | gould \
+                                       | cbm | ns | masscomp | apple | axis | knuth | cray \
+                                       | microblaze* | sim | cisco \
+                                       | oki | wec | wrs | winbond)
+                                               basic_machine=$field1-$field2
+                                               os=
+                                               ;;
+                                       *)
+                                               basic_machine=$field1
+                                               os=$field2
+                                               ;;
+                               esac
+                       ;;
+               esac
+               ;;
+       *)
+               # Convert single-component short-hands not valid as part of
+               # multi-component configurations.
+               case $field1 in
+                       386bsd)
+                               basic_machine=i386-pc
+                               os=bsd
+                               ;;
+                       a29khif)
+                               basic_machine=a29k-amd
+                               os=udi
+                               ;;
+                       adobe68k)
+                               basic_machine=m68010-adobe
+                               os=scout
+                               ;;
+                       alliant)
+                               basic_machine=fx80-alliant
+                               os=
+                               ;;
+                       altos | altos3068)
+                               basic_machine=m68k-altos
+                               os=
+                               ;;
+                       am29k)
+                               basic_machine=a29k-none
+                               os=bsd
+                               ;;
+                       amdahl)
+                               basic_machine=580-amdahl
+                               os=sysv
+                               ;;
+                       amiga)
+                               basic_machine=m68k-unknown
+                               os=
+                               ;;
+                       amigaos | amigados)
+                               basic_machine=m68k-unknown
+                               os=amigaos
+                               ;;
+                       amigaunix | amix)
+                               basic_machine=m68k-unknown
+                               os=sysv4
+                               ;;
+                       apollo68)
+                               basic_machine=m68k-apollo
+                               os=sysv
+                               ;;
+                       apollo68bsd)
+                               basic_machine=m68k-apollo
+                               os=bsd
+                               ;;
+                       aros)
+                               basic_machine=i386-pc
+                               os=aros
+                               ;;
+                       aux)
+                               basic_machine=m68k-apple
+                               os=aux
+                               ;;
+                       balance)
+                               basic_machine=ns32k-sequent
+                               os=dynix
+                               ;;
+                       blackfin)
+                               basic_machine=bfin-unknown
+                               os=linux
+                               ;;
+                       cegcc)
+                               basic_machine=arm-unknown
+                               os=cegcc
+                               ;;
+                       convex-c1)
+                               basic_machine=c1-convex
+                               os=bsd
+                               ;;
+                       convex-c2)
+                               basic_machine=c2-convex
+                               os=bsd
+                               ;;
+                       convex-c32)
+                               basic_machine=c32-convex
+                               os=bsd
+                               ;;
+                       convex-c34)
+                               basic_machine=c34-convex
+                               os=bsd
+                               ;;
+                       convex-c38)
+                               basic_machine=c38-convex
+                               os=bsd
+                               ;;
+                       cray)
+                               basic_machine=j90-cray
+                               os=unicos
+                               ;;
+                       crds | unos)
+                               basic_machine=m68k-crds
+                               os=
+                               ;;
+                       da30)
+                               basic_machine=m68k-da30
+                               os=
+                               ;;
+                       decstation | pmax | pmin | dec3100 | decstatn)
+                               basic_machine=mips-dec
+                               os=
+                               ;;
+                       delta88)
+                               basic_machine=m88k-motorola
+                               os=sysv3
+                               ;;
+                       dicos)
+                               basic_machine=i686-pc
+                               os=dicos
+                               ;;
+                       djgpp)
+                               basic_machine=i586-pc
+                               os=msdosdjgpp
+                               ;;
+                       ebmon29k)
+                               basic_machine=a29k-amd
+                               os=ebmon
+                               ;;
+                       es1800 | OSE68k | ose68k | ose | OSE)
+                               basic_machine=m68k-ericsson
+                               os=ose
+                               ;;
+                       gmicro)
+                               basic_machine=tron-gmicro
+                               os=sysv
+                               ;;
+                       go32)
+                               basic_machine=i386-pc
+                               os=go32
+                               ;;
+                       h8300hms)
+                               basic_machine=h8300-hitachi
+                               os=hms
+                               ;;
+                       h8300xray)
+                               basic_machine=h8300-hitachi
+                               os=xray
+                               ;;
+                       h8500hms)
+                               basic_machine=h8500-hitachi
+                               os=hms
+                               ;;
+                       harris)
+                               basic_machine=m88k-harris
+                               os=sysv3
+                               ;;
+                       hp300)
+                               basic_machine=m68k-hp
+                               ;;
+                       hp300bsd)
+                               basic_machine=m68k-hp
+                               os=bsd
+                               ;;
+                       hp300hpux)
+                               basic_machine=m68k-hp
+                               os=hpux
+                               ;;
+                       hppaosf)
+                               basic_machine=hppa1.1-hp
+                               os=osf
+                               ;;
+                       hppro)
+                               basic_machine=hppa1.1-hp
+                               os=proelf
+                               ;;
+                       i386mach)
+                               basic_machine=i386-mach
+                               os=mach
+                               ;;
+                       vsta)
+                               basic_machine=i386-pc
+                               os=vsta
+                               ;;
+                       isi68 | isi)
+                               basic_machine=m68k-isi
+                               os=sysv
+                               ;;
+                       m68knommu)
+                               basic_machine=m68k-unknown
+                               os=linux
+                               ;;
+                       magnum | m3230)
+                               basic_machine=mips-mips
+                               os=sysv
+                               ;;
+                       merlin)
+                               basic_machine=ns32k-utek
+                               os=sysv
+                               ;;
+                       mingw64)
+                               basic_machine=x86_64-pc
+                               os=mingw64
+                               ;;
+                       mingw32)
+                               basic_machine=i686-pc
+                               os=mingw32
+                               ;;
+                       mingw32ce)
+                               basic_machine=arm-unknown
+                               os=mingw32ce
+                               ;;
+                       monitor)
+                               basic_machine=m68k-rom68k
+                               os=coff
+                               ;;
+                       morphos)
+                               basic_machine=powerpc-unknown
+                               os=morphos
+                               ;;
+                       moxiebox)
+                               basic_machine=moxie-unknown
+                               os=moxiebox
+                               ;;
+                       msdos)
+                               basic_machine=i386-pc
+                               os=msdos
+                               ;;
+                       msys)
+                               basic_machine=i686-pc
+                               os=msys
+                               ;;
+                       mvs)
+                               basic_machine=i370-ibm
+                               os=mvs
+                               ;;
+                       nacl)
+                               basic_machine=le32-unknown
+                               os=nacl
+                               ;;
+                       ncr3000)
+                               basic_machine=i486-ncr
+                               os=sysv4
+                               ;;
+                       netbsd386)
+                               basic_machine=i386-pc
+                               os=netbsd
+                               ;;
+                       netwinder)
+                               basic_machine=armv4l-rebel
+                               os=linux
+                               ;;
+                       news | news700 | news800 | news900)
+                               basic_machine=m68k-sony
+                               os=newsos
+                               ;;
+                       news1000)
+                               basic_machine=m68030-sony
+                               os=newsos
+                               ;;
+                       necv70)
+                               basic_machine=v70-nec
+                               os=sysv
+                               ;;
+                       nh3000)
+                               basic_machine=m68k-harris
+                               os=cxux
+                               ;;
+                       nh[45]000)
+                               basic_machine=m88k-harris
+                               os=cxux
+                               ;;
+                       nindy960)
+                               basic_machine=i960-intel
+                               os=nindy
+                               ;;
+                       mon960)
+                               basic_machine=i960-intel
+                               os=mon960
+                               ;;
+                       nonstopux)
+                               basic_machine=mips-compaq
+                               os=nonstopux
+                               ;;
+                       os400)
+                               basic_machine=powerpc-ibm
+                               os=os400
+                               ;;
+                       OSE68000 | ose68000)
+                               basic_machine=m68000-ericsson
+                               os=ose
+                               ;;
+                       os68k)
+                               basic_machine=m68k-none
+                               os=os68k
+                               ;;
+                       paragon)
+                               basic_machine=i860-intel
+                               os=osf
+                               ;;
+                       parisc)
+                               basic_machine=hppa-unknown
+                               os=linux
+                               ;;
+                       pw32)
+                               basic_machine=i586-unknown
+                               os=pw32
+                               ;;
+                       rdos | rdos64)
+                               basic_machine=x86_64-pc
+                               os=rdos
+                               ;;
+                       rdos32)
+                               basic_machine=i386-pc
+                               os=rdos
+                               ;;
+                       rom68k)
+                               basic_machine=m68k-rom68k
+                               os=coff
+                               ;;
+                       sa29200)
+                               basic_machine=a29k-amd
+                               os=udi
+                               ;;
+                       sei)
+                               basic_machine=mips-sei
+                               os=seiux
+                               ;;
+                       sequent)
+                               basic_machine=i386-sequent
+                               os=
+                               ;;
+                       sps7)
+                               basic_machine=m68k-bull
+                               os=sysv2
+                               ;;
+                       st2000)
+                               basic_machine=m68k-tandem
+                               os=
+                               ;;
+                       stratus)
+                               basic_machine=i860-stratus
+                               os=sysv4
+                               ;;
+                       sun2)
+                               basic_machine=m68000-sun
+                               os=
+                               ;;
+                       sun2os3)
+                               basic_machine=m68000-sun
+                               os=sunos3
+                               ;;
+                       sun2os4)
+                               basic_machine=m68000-sun
+                               os=sunos4
+                               ;;
+                       sun3)
+                               basic_machine=m68k-sun
+                               os=
+                               ;;
+                       sun3os3)
+                               basic_machine=m68k-sun
+                               os=sunos3
+                               ;;
+                       sun3os4)
+                               basic_machine=m68k-sun
+                               os=sunos4
+                               ;;
+                       sun4)
+                               basic_machine=sparc-sun
+                               os=
+                               ;;
+                       sun4os3)
+                               basic_machine=sparc-sun
+                               os=sunos3
+                               ;;
+                       sun4os4)
+                               basic_machine=sparc-sun
+                               os=sunos4
+                               ;;
+                       sun4sol2)
+                               basic_machine=sparc-sun
+                               os=solaris2
+                               ;;
+                       sun386 | sun386i | roadrunner)
+                               basic_machine=i386-sun
+                               os=
+                               ;;
+                       sv1)
+                               basic_machine=sv1-cray
+                               os=unicos
+                               ;;
+                       symmetry)
+                               basic_machine=i386-sequent
+                               os=dynix
+                               ;;
+                       t3e)
+                               basic_machine=alphaev5-cray
+                               os=unicos
+                               ;;
+                       t90)
+                               basic_machine=t90-cray
+                               os=unicos
+                               ;;
+                       toad1)
+                               basic_machine=pdp10-xkl
+                               os=tops20
+                               ;;
+                       tpf)
+                               basic_machine=s390x-ibm
+                               os=tpf
+                               ;;
+                       udi29k)
+                               basic_machine=a29k-amd
+                               os=udi
+                               ;;
+                       ultra3)
+                               basic_machine=a29k-nyu
+                               os=sym1
+                               ;;
+                       v810 | necv810)
+                               basic_machine=v810-nec
+                               os=none
+                               ;;
+                       vaxv)
+                               basic_machine=vax-dec
+                               os=sysv
+                               ;;
+                       vms)
+                               basic_machine=vax-dec
+                               os=vms
+                               ;;
+                       vxworks960)
+                               basic_machine=i960-wrs
+                               os=vxworks
+                               ;;
+                       vxworks68)
+                               basic_machine=m68k-wrs
+                               os=vxworks
+                               ;;
+                       vxworks29k)
+                               basic_machine=a29k-wrs
+                               os=vxworks
+                               ;;
+                       xbox)
+                               basic_machine=i686-pc
+                               os=mingw32
+                               ;;
+                       ymp)
+                               basic_machine=ymp-cray
+                               os=unicos
+                               ;;
+                       *)
+                               basic_machine=$1
+                               os=
+                               ;;
+               esac
+               ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+       # Here we handle the default manufacturer of certain CPU types.  It is in
+       # some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               cpu=hppa1.1
+               vendor=winbond
+               ;;
+       op50n)
+               cpu=hppa1.1
+               vendor=oki
+               ;;
+       op60c)
+               cpu=hppa1.1
+               vendor=oki
+               ;;
+       ibm*)
+               cpu=i370
+               vendor=ibm
+               ;;
+       orion105)
+               cpu=clipper
+               vendor=highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               cpu=m68k
+               vendor=apple
+               ;;
+       pmac | pmac-mpw)
+               cpu=powerpc
+               vendor=apple
+               ;;
+
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               cpu=m68000
+               vendor=att
+               ;;
+       3b*)
+               cpu=we32k
+               vendor=att
+               ;;
+       bluegene*)
+               cpu=powerpc
+               vendor=ibm
+               os=cnk
+               ;;
+       decsystem10* | dec10*)
+               cpu=pdp10
+               vendor=dec
+               os=tops10
+               ;;
+       decsystem20* | dec20*)
+               cpu=pdp10
+               vendor=dec
+               os=tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               cpu=m68k
+               vendor=motorola
+               ;;
+       dpx2*)
+               cpu=m68k
+               vendor=bull
+               os=sysv3
+               ;;
+       encore | umax | mmax)
+               cpu=ns32k
+               vendor=encore
+               ;;
+       elxsi)
+               cpu=elxsi
+               vendor=elxsi
+               os=${os:-bsd}
+               ;;
+       fx2800)
+               cpu=i860
+               vendor=alliant
+               ;;
+       genix)
+               cpu=ns32k
+               vendor=ns
+               ;;
+       h3050r* | hiux*)
+               cpu=hppa1.1
+               vendor=hitachi
+               os=hiuxwe2
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               cpu=hppa1.0
+               vendor=hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               cpu=m68000
+               vendor=hp
+               ;;
+       hp9k3[2-9][0-9])
+               cpu=m68k
+               vendor=hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               cpu=hppa1.0
+               vendor=hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               cpu=hppa1.1
+               vendor=hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               cpu=hppa1.1
+               vendor=hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               cpu=hppa1.1
+               vendor=hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               cpu=hppa1.1
+               vendor=hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               cpu=hppa1.0
+               vendor=hp
+               ;;
+       i*86v32)
+               cpu=`echo "$1" | sed -e 's/86.*/86/'`
+               vendor=pc
+               os=sysv32
+               ;;
+       i*86v4*)
+               cpu=`echo "$1" | sed -e 's/86.*/86/'`
+               vendor=pc
+               os=sysv4
+               ;;
+       i*86v)
+               cpu=`echo "$1" | sed -e 's/86.*/86/'`
+               vendor=pc
+               os=sysv
+               ;;
+       i*86sol2)
+               cpu=`echo "$1" | sed -e 's/86.*/86/'`
+               vendor=pc
+               os=solaris2
+               ;;
+       j90 | j90-cray)
+               cpu=j90
+               vendor=cray
+               os=${os:-unicos}
+               ;;
+       iris | iris4d)
+               cpu=mips
+               vendor=sgi
+               case $os in
+                   irix*)
+                       ;;
+                   *)
+                       os=irix4
+                       ;;
+               esac
+               ;;
+       miniframe)
+               cpu=m68000
+               vendor=convergent
+               ;;
+       *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               cpu=m68k
+               vendor=atari
+               os=mint
+               ;;
+       news-3600 | risc-news)
+               cpu=mips
+               vendor=sony
+               os=newsos
+               ;;
+       next | m*-next)
+               cpu=m68k
+               vendor=next
+               case $os in
+                   nextstep* )
+                       ;;
+                   ns2*)
+                     os=nextstep2
+                       ;;
+                   *)
+                     os=nextstep3
+                       ;;
+               esac
+               ;;
+       np1)
+               cpu=np1
+               vendor=gould
+               ;;
+       op50n-* | op60c-*)
+               cpu=hppa1.1
+               vendor=oki
+               os=proelf
+               ;;
+       pa-hitachi)
+               cpu=hppa1.1
+               vendor=hitachi
+               os=hiuxwe2
+               ;;
+       pbd)
+               cpu=sparc
+               vendor=tti
+               ;;
+       pbb)
+               cpu=m68k
+               vendor=tti
+               ;;
+       pc532)
+               cpu=ns32k
+               vendor=pc532
+               ;;
+       pn)
+               cpu=pn
+               vendor=gould
+               ;;
+       power)
+               cpu=power
+               vendor=ibm
+               ;;
+       ps2)
+               cpu=i386
+               vendor=ibm
+               ;;
+       rm[46]00)
+               cpu=mips
+               vendor=siemens
+               ;;
+       rtpc | rtpc-*)
+               cpu=romp
+               vendor=ibm
+               ;;
+       sde)
+               cpu=mipsisa32
+               vendor=sde
+               os=${os:-elf}
+               ;;
+       simso-wrs)
+               cpu=sparclite
+               vendor=wrs
+               os=vxworks
+               ;;
+       tower | tower-32)
+               cpu=m68k
+               vendor=ncr
+               ;;
+       vpp*|vx|vx-*)
+               cpu=f301
+               vendor=fujitsu
+               ;;
+       w65)
+               cpu=w65
+               vendor=wdc
+               ;;
+       w89k-*)
+               cpu=hppa1.1
+               vendor=winbond
+               os=proelf
+               ;;
+       none)
+               cpu=none
+               vendor=none
+               ;;
+       leon|leon[3-9])
+               cpu=sparc
+               vendor=$basic_machine
+               ;;
+       leon-*|leon[3-9]-*)
+               cpu=sparc
+               vendor=`echo "$basic_machine" | sed 's/-.*//'`
+               ;;
+
+       *-*)
+               # shellcheck disable=SC2162
+               IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+               ;;
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+               cpu=$basic_machine
+               vendor=pc
+               ;;
+       # These rules are duplicated from below for sake of the special case above;
+       # i.e. things that normalized to x86 arches should also default to "pc"
+       pc98)
+               cpu=i386
+               vendor=pc
+               ;;
+       x64 | amd64)
+               cpu=x86_64
+               vendor=pc
+               ;;
+       # Recognize the basic CPU types without company name.
+       *)
+               cpu=$basic_machine
+               vendor=unknown
+               ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+       # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+       # some cases the only manufacturer, in others, it is the most popular.
+       craynv-unknown)
+               vendor=cray
+               os=${os:-unicosmp}
+               ;;
+       c90-unknown | c90-cray)
+               vendor=cray
+               os=${os:-unicos}
+               ;;
+       fx80-unknown)
+               vendor=alliant
+               ;;
+       romp-unknown)
+               vendor=ibm
+               ;;
+       mmix-unknown)
+               vendor=knuth
+               ;;
+       microblaze-unknown | microblazeel-unknown)
+               vendor=xilinx
+               ;;
+       rs6000-unknown)
+               vendor=ibm
+               ;;
+       vax-unknown)
+               vendor=dec
+               ;;
+       pdp11-unknown)
+               vendor=dec
+               ;;
+       we32k-unknown)
+               vendor=att
+               ;;
+       cydra-unknown)
+               vendor=cydrome
+               ;;
+       i370-ibm*)
+               vendor=ibm
+               ;;
+       orion-unknown)
+               vendor=highlevel
+               ;;
+       xps-unknown | xps100-unknown)
+               cpu=xps100
+               vendor=honeywell
+               ;;
+
+       # Here we normalize CPU types with a missing or matching vendor
+       dpx20-unknown | dpx20-bull)
+               cpu=rs6000
+               vendor=bull
+               os=${os:-bosx}
+               ;;
+
+       # Here we normalize CPU types irrespective of the vendor
+       amd64-*)
+               cpu=x86_64
+               ;;
+       blackfin-*)
+               cpu=bfin
+               os=linux
+               ;;
+       c54x-*)
+               cpu=tic54x
+               ;;
+       c55x-*)
+               cpu=tic55x
+               ;;
+       c6x-*)
+               cpu=tic6x
+               ;;
+       e500v[12]-*)
+               cpu=powerpc
+               os=$os"spe"
+               ;;
+       mips3*-*)
+               cpu=mips64
+               ;;
+       ms1-*)
+               cpu=mt
+               ;;
+       m68knommu-*)
+               cpu=m68k
+               os=linux
+               ;;
+       m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+               cpu=s12z
+               ;;
+       openrisc-*)
+               cpu=or32
+               ;;
+       parisc-*)
+               cpu=hppa
+               os=linux
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               cpu=i586
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+               cpu=i686
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               cpu=i686
+               ;;
+       pentium4-*)
+               cpu=i786
+               ;;
+       pc98-*)
+               cpu=i386
+               ;;
+       ppc-* | ppcbe-*)
+               cpu=powerpc
+               ;;
+       ppcle-* | powerpclittle-*)
+               cpu=powerpcle
+               ;;
+       ppc64-*)
+               cpu=powerpc64
+               ;;
+       ppc64le-* | powerpc64little-*)
+               cpu=powerpc64le
+               ;;
+       sb1-*)
+               cpu=mipsisa64sb1
+               ;;
+       sb1el-*)
+               cpu=mipsisa64sb1el
+               ;;
+       sh5e[lb]-*)
+               cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+               ;;
+       spur-*)
+               cpu=spur
+               ;;
+       strongarm-* | thumb-*)
+               cpu=arm
+               ;;
+       tx39-*)
+               cpu=mipstx39
+               ;;
+       tx39el-*)
+               cpu=mipstx39el
+               ;;
+       x64-*)
+               cpu=x86_64
+               ;;
+       xscale-* | xscalee[bl]-*)
+               cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+               ;;
+
+       # Recognize the canonical CPU Types that limit and/or modify the
+       # company names they are paired with.
+       cr16-*)
+               os=${os:-elf}
+               ;;
+       crisv32-* | etraxfs*-*)
+               cpu=crisv32
+               vendor=axis
+               ;;
+       cris-* | etrax*-*)
+               cpu=cris
+               vendor=axis
+               ;;
+       crx-*)
+               os=${os:-elf}
+               ;;
+       neo-tandem)
+               cpu=neo
+               vendor=tandem
+               ;;
+       nse-tandem)
+               cpu=nse
+               vendor=tandem
+               ;;
+       nsr-tandem)
+               cpu=nsr
+               vendor=tandem
+               ;;
+       nsv-tandem)
+               cpu=nsv
+               vendor=tandem
+               ;;
+       nsx-tandem)
+               cpu=nsx
+               vendor=tandem
+               ;;
+       s390-*)
+               cpu=s390
+               vendor=ibm
+               ;;
+       s390x-*)
+               cpu=s390x
+               vendor=ibm
+               ;;
+       tile*-*)
+               os=${os:-linux-gnu}
+               ;;
+
+       *)
+               # Recognize the canonical CPU types that are allowed with any
+               # company name.
+               case $cpu in
+                       1750a | 580 \
+                       | a29k \
+                       | aarch64 | aarch64_be \
+                       | abacus \
+                       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+                       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+                       | alphapca5[67] | alpha64pca5[67] \
+                       | am33_2.0 \
+                       | amdgcn \
+                       | arc | arceb \
+                       | arm  | arm[lb]e | arme[lb] | armv* \
+                       | avr | avr32 \
+                       | asmjs \
+                       | ba \
+                       | be32 | be64 \
+                       | bfin | bs2000 \
+                       | c[123]* | c30 | [cjt]90 | c4x \
+                       | c8051 | clipper | craynv | csky | cydra \
+                       | d10v | d30v | dlx | dsp16xx \
+                       | e2k | elxsi | epiphany \
+                       | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+                       | h8300 | h8500 \
+                       | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+                       | hexagon \
+                       | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+                       | ip2k | iq2000 \
+                       | k1om \
+                       | le32 | le64 \
+                       | lm32 \
+                       | m32c | m32r | m32rle \
+                       | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+                       | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+                       | m88110 | m88k | maxq | mb | mcore | mep | metag \
+                       | microblaze | microblazeel \
+                       | mips | mipsbe | mipseb | mipsel | mipsle \
+                       | mips16 \
+                       | mips64 | mips64eb | mips64el \
+                       | mips64octeon | mips64octeonel \
+                       | mips64orion | mips64orionel \
+                       | mips64r5900 | mips64r5900el \
+                       | mips64vr | mips64vrel \
+                       | mips64vr4100 | mips64vr4100el \
+                       | mips64vr4300 | mips64vr4300el \
+                       | mips64vr5000 | mips64vr5000el \
+                       | mips64vr5900 | mips64vr5900el \
+                       | mipsisa32 | mipsisa32el \
+                       | mipsisa32r2 | mipsisa32r2el \
+                       | mipsisa32r6 | mipsisa32r6el \
+                       | mipsisa64 | mipsisa64el \
+                       | mipsisa64r2 | mipsisa64r2el \
+                       | mipsisa64r6 | mipsisa64r6el \
+                       | mipsisa64sb1 | mipsisa64sb1el \
+                       | mipsisa64sr71k | mipsisa64sr71kel \
+                       | mipsr5900 | mipsr5900el \
+                       | mipstx39 | mipstx39el \
+                       | mmix \
+                       | mn10200 | mn10300 \
+                       | moxie \
+                       | mt \
+                       | msp430 \
+                       | nds32 | nds32le | nds32be \
+                       | nfp \
+                       | nios | nios2 | nios2eb | nios2el \
+                       | none | np1 | ns16k | ns32k | nvptx \
+                       | open8 \
+                       | or1k* \
+                       | or32 \
+                       | orion \
+                       | picochip \
+                       | pdp10 | pdp11 | pj | pjl | pn | power \
+                       | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+                       | pru \
+                       | pyramid \
+                       | riscv | riscv32 | riscv64 \
+                       | rl78 | romp | rs6000 | rx \
+                       | score \
+                       | sh | shl \
+                       | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+                       | sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+                       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+                       | sparclite \
+                       | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+                       | spu \
+                       | tahoe \
+                       | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+                       | tron \
+                       | ubicom32 \
+                       | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+                       | vax \
+                       | visium \
+                       | w65 | wasm32 \
+                       | we32k \
+                       | x86 | x86_64 | xc16x | xgate | xps100 \
+                       | xstormy16 | xtensa* \
+                       | ymp \
+                       | z8k | z80)
+                               ;;
+
+                       *)
+                               echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+                               exit 1
+                               ;;
+               esac
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+       digital*)
+               vendor=dec
+               ;;
+       commodore*)
+               vendor=cbm
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x$os != x ]
+then
+case $os in
+       # First match some system type aliases that might get confused
+       # with valid system types.
+       # solaris* is a basic system type, with this one exception.
+       auroraux)
+               os=auroraux
+               ;;
+       bluegene*)
+               os=cnk
+               ;;
+       solaris1 | solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       solaris)
+               os=solaris2
+               ;;
+       unixware*)
+               os=sysv4.2uw
+               ;;
+       gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # es1800 is here to avoid being matched by es* (a different OS)
+       es1800*)
+               os=ose
+               ;;
+       # Some version numbers need modification
+       chorusos*)
+               os=chorusos
+               ;;
+       isc)
+               os=isc2.2
+               ;;
+       sco6)
+               os=sco5v6
+               ;;
+       sco5)
+               os=sco3.2v5
+               ;;
+       sco4)
+               os=sco3.2v4
+               ;;
+       sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               ;;
+       sco3.2v[4-9]* | sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               ;;
+       scout)
+               # Don't match below
+               ;;
+       sco*)
+               os=sco3.2v2
+               ;;
+       psos*)
+               os=psos
+               ;;
+       # Now accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST end in a * to match a version number.
+       # sysv* is not here because it comes later, after sysvr4.
+       gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+            | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+            | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+            | sym* | kopensolaris* | plan9* \
+            | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+            | aos* | aros* | cloudabi* | sortix* \
+            | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+            | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+            | knetbsd* | mirbsd* | netbsd* \
+            | bitrig* | openbsd* | solidbsd* | libertybsd* \
+            | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+            | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+            | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+            | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+            | chorusrdb* | cegcc* | glidix* \
+            | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+            | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+            | linux-newlib* | linux-musl* | linux-uclibc* \
+            | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+            | interix* | uwin* | mks* | rhapsody* | darwin* \
+            | openstep* | oskit* | conix* | pw32* | nonstopux* \
+            | storm-chaos* | tops10* | tenex* | tops20* | its* \
+            | os2* | vos* | palmos* | uclinux* | nucleus* \
+            | morphos* | superux* | rtmk* | windiss* \
+            | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+            | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+            | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+            | midnightbsd* | amdhsa* | unleashed* | emscripten*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       qnx*)
+               case $cpu in
+                   x86 | i*86)
+                       ;;
+                   *)
+                       os=nto-$os
+                       ;;
+               esac
+               ;;
+       hiux*)
+               os=hiuxwe2
+               ;;
+       nto-qnx*)
+               ;;
+       nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       sim | xray | os68k* | v88r* \
+           | windows* | osx | abug | netware* | os9* \
+           | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+               ;;
+       linux-dietlibc)
+               os=linux-dietlibc
+               ;;
+       linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       lynx*178)
+               os=lynxos178
+               ;;
+       lynx*5)
+               os=lynxos5
+               ;;
+       lynx*)
+               os=lynxos
+               ;;
+       mac*)
+               os=`echo "$os" | sed -e 's|mac|macos|'`
+               ;;
+       opened*)
+               os=openedition
+               ;;
+       os400*)
+               os=os400
+               ;;
+       sunos5*)
+               os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+               ;;
+       sunos6*)
+               os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+               ;;
+       wince*)
+               os=wince
+               ;;
+       utek*)
+               os=bsd
+               ;;
+       dynix*)
+               os=bsd
+               ;;
+       acis*)
+               os=aos
+               ;;
+       atheos*)
+               os=atheos
+               ;;
+       syllable*)
+               os=syllable
+               ;;
+       386bsd)
+               os=bsd
+               ;;
+       ctix* | uts*)
+               os=sysv
+               ;;
+       nova*)
+               os=rtmk-nova
+               ;;
+       ns2)
+               os=nextstep2
+               ;;
+       nsk*)
+               os=nsk
+               ;;
+       # Preserve the version number of sinix5.
+       sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       sinix*)
+               os=sysv4
+               ;;
+       tpf*)
+               os=tpf
+               ;;
+       triton*)
+               os=sysv3
+               ;;
+       oss*)
+               os=sysv3
+               ;;
+       svr4*)
+               os=sysv4
+               ;;
+       svr3)
+               os=sysv3
+               ;;
+       sysvr4)
+               os=sysv4
+               ;;
+       # This must come after sysvr4.
+       sysv*)
+               ;;
+       ose*)
+               os=ose
+               ;;
+       *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+               os=mint
+               ;;
+       zvmoe)
+               os=zvmoe
+               ;;
+       dicos*)
+               os=dicos
+               ;;
+       pikeos*)
+               # Until real need of OS specific support for
+               # particular features comes up, bare metal
+               # configurations are quite functional.
+               case $cpu in
+                   arm*)
+                       os=eabi
+                       ;;
+                   *)
+                       os=elf
+                       ;;
+               esac
+               ;;
+       nacl*)
+               ;;
+       ios)
+               ;;
+       none)
+               ;;
+       *-eabi)
+               ;;
+       *)
+               echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $cpu-$vendor in
+       score-*)
+               os=elf
+               ;;
+       spu-*)
+               os=elf
+               ;;
+       *-acorn)
+               os=riscix1.2
+               ;;
+       arm*-rebel)
+               os=linux
+               ;;
+       arm*-semi)
+               os=aout
+               ;;
+       c4x-* | tic4x-*)
+               os=coff
+               ;;
+       c8051-*)
+               os=elf
+               ;;
+       clipper-intergraph)
+               os=clix
+               ;;
+       hexagon-*)
+               os=elf
+               ;;
+       tic54x-*)
+               os=coff
+               ;;
+       tic55x-*)
+               os=coff
+               ;;
+       tic6x-*)
+               os=coff
+               ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=tops20
+               ;;
+       pdp11-*)
+               os=none
+               ;;
+       *-dec | vax-*)
+               os=ultrix4.2
+               ;;
+       m68*-apollo)
+               os=domain
+               ;;
+       i386-sun)
+               os=sunos4.0.2
+               ;;
+       m68000-sun)
+               os=sunos3
+               ;;
+       m68*-cisco)
+               os=aout
+               ;;
+       mep-*)
+               os=elf
+               ;;
+       mips*-cisco)
+               os=elf
+               ;;
+       mips*-*)
+               os=elf
+               ;;
+       or32-*)
+               os=coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=sysv3
+               ;;
+       sparc-* | *-sun)
+               os=sunos4.1.1
+               ;;
+       pru-*)
+               os=elf
+               ;;
+       *-be)
+               os=beos
+               ;;
+       *-ibm)
+               os=aix
+               ;;
+       *-knuth)
+               os=mmixware
+               ;;
+       *-wec)
+               os=proelf
+               ;;
+       *-winbond)
+               os=proelf
+               ;;
+       *-oki)
+               os=proelf
+               ;;
+       *-hp)
+               os=hpux
+               ;;
+       *-hitachi)
+               os=hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=sysv
+               ;;
+       *-cbm)
+               os=amigaos
+               ;;
+       *-dg)
+               os=dgux
+               ;;
+       *-dolphin)
+               os=sysv3
+               ;;
+       m68k-ccur)
+               os=rtu
+               ;;
+       m88k-omron*)
+               os=luna
+               ;;
+       *-next)
+               os=nextstep
+               ;;
+       *-sequent)
+               os=ptx
+               ;;
+       *-crds)
+               os=unos
+               ;;
+       *-ns)
+               os=genix
+               ;;
+       i370-*)
+               os=mvs
+               ;;
+       *-gould)
+               os=sysv
+               ;;
+       *-highlevel)
+               os=bsd
+               ;;
+       *-encore)
+               os=bsd
+               ;;
+       *-sgi)
+               os=irix
+               ;;
+       *-siemens)
+               os=sysv4
+               ;;
+       *-masscomp)
+               os=rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=uxpv
+               ;;
+       *-rom68k)
+               os=coff
+               ;;
+       *-*bug)
+               os=coff
+               ;;
+       *-apple)
+               os=macos
+               ;;
+       *-atari*)
+               os=mint
+               ;;
+       *-wrs)
+               os=vxworks
+               ;;
+       *)
+               os=none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+       unknown)
+               case $os in
+                       riscix*)
+                               vendor=acorn
+                               ;;
+                       sunos*)
+                               vendor=sun
+                               ;;
+                       cnk*|-aix*)
+                               vendor=ibm
+                               ;;
+                       beos*)
+                               vendor=be
+                               ;;
+                       hpux*)
+                               vendor=hp
+                               ;;
+                       mpeix*)
+                               vendor=hp
+                               ;;
+                       hiux*)
+                               vendor=hitachi
+                               ;;
+                       unos*)
+                               vendor=crds
+                               ;;
+                       dgux*)
+                               vendor=dg
+                               ;;
+                       luna*)
+                               vendor=omron
+                               ;;
+                       genix*)
+                               vendor=ns
+                               ;;
+                       clix*)
+                               vendor=intergraph
+                               ;;
+                       mvs* | opened*)
+                               vendor=ibm
+                               ;;
+                       os400*)
+                               vendor=ibm
+                               ;;
+                       ptx*)
+                               vendor=sequent
+                               ;;
+                       tpf*)
+                               vendor=ibm
+                               ;;
+                       vxsim* | vxworks* | windiss*)
+                               vendor=wrs
+                               ;;
+                       aux*)
+                               vendor=apple
+                               ;;
+                       hms*)
+                               vendor=hitachi
+                               ;;
+                       mpw* | macos*)
+                               vendor=apple
+                               ;;
+                       *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               ;;
+esac
+
+echo "$cpu-$vendor-$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/net/conserver/patches/010-openssl-deprecated.patch b/net/conserver/patches/010-openssl-deprecated.patch
deleted file mode 100644 (file)
index 8e34d3f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/conserver/cutil.h
-+++ b/conserver/cutil.h
-@@ -7,6 +7,8 @@
- #include <stdarg.h>
- #if HAVE_OPENSSL
- # include <openssl/ssl.h>
-+# include <openssl/bn.h>
-+# include <openssl/dh.h>
- # include <openssl/err.h>
- # if OPENSSL_VERSION_NUMBER < 0x10100000L
- #  define TLS_method SSLv23_method
index 4afc1a2705a1c1876bcb2b4b120b22ece8f18a30..4a1960e9736bc5242192a61ad59c9664a1e32c12 100644 (file)
@@ -12,7 +12,7 @@ PKG_VERSION:=1.4
 PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
-PKG_RELEASE:=7
+PKG_RELEASE:=9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
@@ -139,7 +139,6 @@ define Package/coova-chilli/install
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli
        $(INSTALL_DIR) $(1)/lib/firewall
-       $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh
 endef
 
 $(eval $(call BuildPackage,coova-chilli))
index 4c037c62da3ba5a27a85c9c20fc68b5c36d07feb..41ee6cd26886959ddcaf37e8c667c1d3895c30ed 100644 (file)
@@ -71,14 +71,14 @@ config chilli
     # Script executed after network interface has been brought up.
     # Executed with the following parameters: <devicename> <ip address>
     # <mask>
-    # Normally you do not need to uncomment this option.
-    #option ipup /etc/chilli.ipup
+    # Normally you do not need to modify this option.
+    option ipup /etc/chilli/up.sh
 
     # Script executed after network interface has been taken down.
     # Executed with the following parameters: <devicename> <ip address>
     # <mask>
-    # Normally you do not need to uncomment this option.
-    #option ipdown /etc/chilli.ipdown
+    # Normally you do not need to modify this option.
+    option ipdown /etc/chilli/down.sh
 
 
     # Radius parameters
diff --git a/net/coova-chilli/files/chilli.firewall b/net/coova-chilli/files/chilli.firewall
deleted file mode 100644 (file)
index a5b1d00..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-chilli_firewall() {
-    local cfg="$1"
-
-    local network ifname tun
-
-    config_get network "$cfg" network
-
-    . /lib/functions/network.sh
-    network_get_device ifname ${network:-lan}
-
-    if [ "$ifname" = "" ]
-    then
-       config_get ifname "$cfg" dhcpif
-    fi
-
-    config_get tun "$cfg" tundev
-
-    for n in ACCEPT DROP REJECT
-    do
-       iptables -F zone_${network}_${n}
-       iptables -I zone_${network}_${n} -i $tun -j $n
-       iptables -I zone_${network}_${n} -o $tun -j $n
-    done
-
-    iptables -D forward -i ${ifname} -j zone_${network}_forward
-    iptables -A forward -i ${ifname} -j DROP
-    iptables -A forward -i $tun -j zone_${network}_forward
-
-    iptables -D input -i ${ifname} -j zone_${network}
-    iptables -A input -i $tun -j zone_${network}
-
-    iptables -I zone_${network} -p tcp --dport 3990 -j ACCEPT
-    iptables -I zone_${network} -p tcp --dport 3991 -j ACCEPT
-}
-
-chilli_post_core_cb() {
-    config_load chilli
-    config_foreach chilli_firewall chilli
-}
index 1b2e0003dc122136e143c4812b33098120780a4f..e1d3202fd3a5b9cf2ee6d303344eab407f8fc47c 100644 (file)
@@ -8,14 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=davfs2
-PKG_VERSION:=1.5.4
-PKG_RELEASE:=3
+PKG_VERSION:=1.5.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/davfs2/
-PKG_HASH:=c9c4e0f0912a782386216b2147eb9c36c47f193b8fcf3d637719e0b9fe7c96e0
+PKG_SOURCE_URL:=@SAVANNAH/davfs2
+PKG_HASH:=587c6a25ad78109995a7ccb8e60aa1c491b149f2c99d47033f3d5e648430ad2f
+
+PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
+PKG_LICENSE:=GPL-3
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=gettext-version autoreconf
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -26,8 +31,7 @@ define Package/davfs2
   SUBMENU:=Filesystem
   DEPENDS=+libneon +kmod-fuse +libfuse $(ICONV_DEPENDS) $(INTL_DEPENDS)
   TITLE:=Mount a WebDAV resource as a regular file system.
-  URL:=http://savannah.nongnu.org/projects/davfs2/
-  MAINTAINER:=Federico Di Marco <fededim@gmail.com>
+  URL:=https://savannah.nongnu.org/projects/davfs2/
 endef
 
 define Package/davfs2/description
index d91336d2734f9baf2426333773d94d0f5fb70557..99b588f8f5c18e996ee9ad4495de1a463c2add04 100644 (file)
@@ -1,17 +1,6 @@
---- a/src/cache.c
-+++ b/src/cache.c
-@@ -58,7 +58,7 @@
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
--#include <sys/xattr.h>
-+#include <linux/xattr.h>
- #include <ne_alloc.h>
- #include <ne_string.h>
 --- a/src/webdav.c
 +++ b/src/webdav.c
-@@ -2033,7 +2033,7 @@ ssl_verify(void *userdata, int failures,
+@@ -2037,7 +2037,7 @@ ssl_verify(void *userdata, int failures, const ne_ssl_certificate *cert)
              len = getline(&s, &n, stdin);
              if (len < 0)
                  abort();
index e819cbc83a516c68128516afd77b07d9980b93e9..67a926c24cf30423b7c42f3fa952a933a8682473 100644 (file)
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
+--- /dev/null
++++ b/src/compat.h
+@@ -0,0 +1,64 @@
++#ifndef _COMPAT_H
++#define _COMPAT_H
++
++#ifndef _PATH_MOUNTED
++# define _PATH_MOUNTED "/proc/mounts"
++#endif
++
++#ifndef _PATH_MNTTAB
++# define _PATH_MNTTAB "/etc/fstab"
++#endif
++
++#ifdef HAVE_ERROR_H
++# include <error.h>
++#else
++# include <stdio.h>
++# include <stdarg.h>
++# include <stdlib.h>
++# include <string.h>
++static void error_at_line(int status, int errnum, const char *filename,
++                          unsigned int linenum, const char *format, ...)
++{
++      va_list ap;
++
++      fflush(stdout);
++
++      if (filename != NULL)
++              fprintf(stderr, "%s:%u: ", filename, linenum);
++
++      va_start(ap, format);
++      vfprintf(stderr, format, ap);
++      va_end(ap);
++
++      if (errnum != 0)
++              fprintf(stderr, ": %s", strerror(errnum));
++
++      fprintf(stderr, "\n");
++
++      if (status != 0)
++              exit(status);
++}
++
++#define error(status, errnum, format...) \
++      error_at_line(status, errnum, NULL, 0, format)
++
++#endif /* HAVE_ERROR_H */
++
++#ifndef HAVE_CANONICALIZE_FILE_NAME
++#include <limits.h>
++#include <string.h>
++#include <stdlib.h>
++static char * canonicalize_file_name(const char *path)
++{
++      char buf[PATH_MAX] = { };
++
++      snprintf(buf, sizeof(buf) - 1, "%s", path);
++
++      if (!realpath(path, buf))
++              return NULL;
++
++      return strdup(buf);
++}
++#endif
++
++#endif /* _COMPAT_H */
 --- a/src/dav_fuse.c
 +++ b/src/dav_fuse.c
 @@ -47,6 +47,9 @@
      }
  
      session = ne_session_create(args->scheme, args->host, args->port);
---- /dev/null
-+++ b/src/compat.h
-@@ -0,0 +1,64 @@
-+#ifndef _COMPAT_H
-+#define _COMPAT_H
-+
-+#ifndef _PATH_MOUNTED
-+# define _PATH_MOUNTED "/proc/mounts"
-+#endif
-+
-+#ifndef _PATH_MNTTAB
-+# define _PATH_MNTTAB "/etc/fstab"
-+#endif
-+
-+#ifdef HAVE_ERROR_H
-+# include <error.h>
-+#else
-+# include <stdio.h>
-+# include <stdarg.h>
-+# include <stdlib.h>
-+# include <string.h>
-+static void error_at_line(int status, int errnum, const char *filename,
-+                          unsigned int linenum, const char *format, ...)
-+{
-+      va_list ap;
-+
-+      fflush(stdout);
-+
-+      if (filename != NULL)
-+              fprintf(stderr, "%s:%u: ", filename, linenum);
-+
-+      va_start(ap, format);
-+      vfprintf(stderr, format, ap);
-+      va_end(ap);
-+
-+      if (errnum != 0)
-+              fprintf(stderr, ": %s", strerror(errnum));
-+
-+      fprintf(stderr, "\n");
-+
-+      if (status != 0)
-+              exit(status);
-+}
-+
-+#define error(status, errnum, format...) \
-+      error_at_line(status, errnum, NULL, 0, format)
-+
-+#endif /* HAVE_ERROR_H */
-+
-+#ifndef HAVE_CANONICALIZE_FILE_NAME
-+#include <limits.h>
-+#include <string.h>
-+#include <stdlib.h>
-+static char * canonicalize_file_name(const char *path)
-+{
-+      char buf[PATH_MAX] = { };
-+
-+      snprintf(buf, sizeof(buf) - 1, "%s", path);
-+
-+      if (!realpath(path, buf))
-+              return NULL;
-+
-+      return strdup(buf);
-+}
-+#endif
-+
-+#endif /* _COMPAT_H */
index f581e053224a3ed852b29b65d845072a908a1f18..86f1775322a38877351b94529baf9ec0c5ad4c8a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -32,8 +32,7 @@ mount_davfs_SOURCES = cache.c dav_coda.c
+@@ -32,8 +32,7 @@ mount_davfs_SOURCES = cache.c dav_coda.c \
          kernel_interface.h mount_davfs.h webdav.h
  umount_davfs_SOURCES = umount_davfs.c defaults.h
  
index c126b5aac352dbbe8a3278886c927178c57eaf1f..6bf95a24a8f7d3c9656e588dabe0b914f120abb7 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/src/webdav.c b/src/webdav.c
-index 1ff7c7f..74cd957 100644
 --- a/src/webdav.c
 +++ b/src/webdav.c
 @@ -25,7 +25,7 @@
index fa947aaa1bf684bfed9b3a96dd09584ceffcf278..bc3784dc0ac34def25234de70009a79f50765a2a 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:=6
+PKG_RELEASE:=7
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=
index 2143d8453876e87f02ceeb91d0d527d323d04917..f409d16c6704220da76696a3f21957f79815dfd5 100755 (executable)
@@ -698,7 +698,7 @@ do_transfer() {
 
        # lets prefer GNU Wget because it does all for us - IPv4/IPv6/HTTPS/PROXY/force IP version
        if [ -n "$WGET_SSL" -a $USE_CURL -eq 0 ]; then                  # except global option use_curl is set to "1"
-               __PROG="$WGET_SSL -nv -t 1 -O $DATFILE -o $ERRFILE"     # non_verbose no_retry outfile errfile
+               __PROG="$WGET_SSL --hsts-file=/tmp/.wget-hsts -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile
                # force network/ip to use for communication
                if [ -n "$bind_network" ]; then
                        local __BINDIP
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 35d472f7364b36e11ca41cd3aa6f13ffae41ed5e..11b448150511f10874d763000d5fac74442c8c96 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_17
-PKG_RELEASE:=2
+PKG_VERSION:=release_3_0_18
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
+PKG_HASH:=c6802e3ec675b1cf59c850b0f01ed088e2983c5c4daa7f64cc22be4e6ad13ae5
 
-PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
+PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYRIGHT LICENSE
 
@@ -54,7 +54,7 @@ endef
 define Package/freeradius3-common
   $(call Package/freeradius3/Default)
   TITLE:=common files
-  DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +PACKAGE_libpcre:libpcre +libreadline +libtalloc
+  DEPENDS:=+USE_GLIBC:libpthread +FREERADIUS3_OPENSSL:libopenssl +libcap +libpcap +libncurses +PACKAGE_libpcre:libpcre +libreadline +libtalloc +libatomic
 endef
 
 define Package/freeradius3-default
@@ -349,7 +349,75 @@ define Package/freeradius3-mod-realm/conffiles
 /etc/freeradius3/mods-enabled/realm
 endef
 
-# SQL support has not been ported
+define Package/freeradius3-mod-sql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3
+  TITLE:=Radius generic SQL front-end
+endef
+
+define Package/freeradius3-mod-sql/conffiles
+/etc/freeradius3/mods-available/sql
+endef
+
+define Package/freeradius3-mod-sql-mysql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql +libmysqlclient
+  TITLE:=Radius MySQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/mysql
+endef
+
+define Package/freeradius3-mod-sql-null
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql
+  TITLE:=Radius Dummy SQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-postgresql
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql +libpq
+  TITLE:=Radius PostgreSQL back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/postgresql
+endef
+
+define Package/freeradius3-mod-sql-sqlite
+  $(call Package/freeradius3/Default)
+  DEPENDS:=freeradius3-mod-sql +libsqlite3
+  TITLE:=Radius SQLite back-end drivers
+endef
+
+define Package/freeradius3-mod-sql-mysql/conffiles
+/etc/freeradius3/mods-config/sql/main/sqlite
+endef
+
+define Package/freeradius3-mod-sqlcounter
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql
+  TITLE:=Packet counter using accounting records written into an SQL database
+endef
+
+define Package/freeradius3-mod-sqlcounter/conffiles
+/etc/freeradius3/mods-config/sql/counter
+/etc/freeradius3/mods-available/sqlcounter
+endef
+
+define Package/freeradius3-mod-sqlippool
+  $(call Package/freeradius3/Default)
+  DEPENDS:=+freeradius3-mod-sql
+  TITLE:=Radius SQL Based IP Pool module
+endef
+
+define Package/freeradius3-mod-sqlippool/conffiles
+/etc/freeradius3/mods-config/sql/ippool
+/etc/freeradius3/mods-config/sql/ippool-dhcp
+/etc/freeradius3/mods-available/dhcp_sqlippool
+/etc/freeradius3/mods-available/sqlippool
+endef
 
 define Package/freeradius3-mod-radutmp
   $(call Package/freeradius3/Default)
@@ -381,6 +449,13 @@ define Package/freeradius3-utils
   TITLE:=Misc. client utilities
 endef
 
+# This is a workaround for a bug in configure.ac, that does not check
+# for the openss/rand.h header.  Setting the macro is safe for openwrt,
+# and faster than rebuilding configure.
+# This has been fixed upstream in the 3.0.x branch, and should not be
+# needed in a future release.
+EXTRA_CFLAGS+= -DHAVE_OPENSSL_RAND_H
+
 CONFIGURE_ARGS+= \
        --libdir=/usr/lib/freeradius3 \
        --libexecdir=/usr/lib/freeradius3 \
@@ -420,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 \
@@ -484,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
@@ -634,5 +742,12 @@ $(eval $(call BuildPlugin,freeradius3-mod-passwd,rlm_passwd,))
 $(eval $(call BuildPlugin,freeradius3-mod-preprocess,rlm_preprocess,))
 $(eval $(call BuildPlugin,freeradius3-mod-radutmp,rlm_radutmp,))
 $(eval $(call BuildPlugin,freeradius3-mod-realm,rlm_realm,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql,rlm_sql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-mysql,rlm_sql_mysql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-null,rlm_sql_null,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-postgresql,rlm_sql_postgresql,))
+$(eval $(call BuildPlugin,freeradius3-mod-sql-sqlite,rlm_sql_sqlite,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlcounter,rlm_sqlcounter,))
+$(eval $(call BuildPlugin,freeradius3-mod-sqlippool,rlm_sqlippool,))
 $(eval $(call BuildPlugin,freeradius3-mod-unix,rlm_unix,))
 $(eval $(call BuildPackage,freeradius3-utils))
index b909e1df4bfb321cf6a4dff8a353954cd51d993e..801550b06680c73375ad769407507efdc6f5550f 100644 (file)
@@ -27,7 +27,7 @@ Last-Update: 2017-05-30
  
        return state;
  }
-@@ -3151,7 +3151,7 @@ post_ca:
+@@ -3277,7 +3277,7 @@ post_ca:
        /*
         *      Callbacks, etc. for session resumption.
         */
@@ -36,7 +36,7 @@ Last-Update: 2017-05-30
                /*
                 *      Cache sessions on disk if requested.
                 */
-@@ -3221,7 +3221,7 @@ post_ca:
+@@ -3347,7 +3347,7 @@ post_ca:
        /*
         *      Setup session caching
         */
index 3b8017948be4138a2e902251a4d357ff005b43a7..aa7186127b3fd5993b8dfb782f12f69a1a783797 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=git
-PKG_VERSION:=2.20.1
+PKG_VERSION:=2.21.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_HASH:=9d2e91e2faa2ea61ba0a70201d023b36f54d846314591a002c610ea2ab81c3e9
+PKG_HASH:=8ccb1ce743ee991d91697e163c47c11be4bf81efbdd9fb0b4a7ad77cc0020d28
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
diff --git a/net/git/patches/300-openssl-deprecated.patch b/net/git/patches/300-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..e3a9ad8
--- /dev/null
@@ -0,0 +1,32 @@
+From fa37195d8378ac958d1f9bd884b47bd73730040e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 27 Dec 2018 09:58:07 -0800
+Subject: [PATCH] imap-send: Fix compilation without deprecated OpenSSL APIs
+
+Initialization in OpenSSL has been deprecated in version 1.1. This makes
+compilation fail when deprecated APIs for OpenSSL are compile-time
+disabled.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ imap-send.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/imap-send.c b/imap-send.c
+index b4eb886e2..877a4e368 100644
+--- a/imap-send.c
++++ b/imap-send.c
+@@ -284,8 +284,10 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
+       int ret;
+       X509 *cert;
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
+       SSL_library_init();
+       SSL_load_error_strings();
++#endif
+       meth = SSLv23_method();
+       if (!meth) {
+-- 
+2.20.1
+
index 4ab7fcaed7608f1d8ce5a999479f607e794e23c8..4edcd9cbafc6dcc4aafda3be08fc53dd6e00c2b2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gitolite
 PKG_VERSION:=3.6.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=2166a61b14de19e605b14f4a13a070fbfd5ecd247b6fd725108f111198a2c121
@@ -21,7 +21,21 @@ define Package/gitolite
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Version Control Systems
-  DEPENDS:=+perlbase-essential +perlbase-sys +perlbase-data +perlbase-digest +perlbase-env +perlbase-time +git +perlbase-findbin +perlbase-storable +perlbase-text +perlbase-getopt +perlbase-utf8 +openssh-keygen +openssh-server +openssh-moduli perl
+  DEPENDS:= \
+       +git \
+       +perlbase-essential \
+       +perlbase-data \
+       +perlbase-digest \
+       +perlbase-env \
+       +perlbase-findbin \
+       +perlbase-getopt \
+       +perlbase-mime \
+       +perlbase-storable \
+       +perlbase-sys \
+       +perlbase-text \
+       +perlbase-time \
+       +perlbase-utf8 \
+
   TITLE:=Easy administration of git repositories
   URL:=http://gitolite.com/gitolite
   MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
@@ -29,10 +43,11 @@ define Package/gitolite
 endef
 
 define Package/gitolite/description
-  Gitolite is a system for managing access to git repositories.  Note you will need to make
-  sure dropbear does not interfere with OpenSSH as gitolite depends on feature not in
-  dropbear (to my knowledge).
-  See https://openwrt.org/docs/guide-user/services/gitolite for a guide on installation.
+  Gitolite is a system for managing access to git repositories.
+  See https://openwrt.org/docs/guide-user/services/gitolite for a guide
+  to installation.
+  NB: You will need an SSH server to use gitolite: dropbear is now sufficient
+  for gitolite purposes.
 endef
 
 define Package/gitolite/postinst
diff --git a/net/gitolite/patches/0100-avoid-ssh-keygen.patch b/net/gitolite/patches/0100-avoid-ssh-keygen.patch
new file mode 100644 (file)
index 0000000..f74e517
--- /dev/null
@@ -0,0 +1,132 @@
+Author: Daniel F. Dickinson <cshored@thecshore.com>
+Date:   Sun Jan 27 01:04:25 2019 -0500
+
+gitolite: Eliminate the need for ssh-keygen dependency
+
+  Previously gitolite used ssh-keygen to generate fingerprints
+  from OpenSSH keys to ensure non-duplication of keys when
+  processing them to create / manage user ssh access to the
+  git repositories.  This ends up depending on openssl,
+  which is large and unnecessary when we are running on an
+  embedded distro such as OpenWrt.
+
+Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
+Index: gitolite-3.6.11/src/lib/Gitolite/Common.pm
+===================================================================
+--- gitolite-3.6.11.orig/src/lib/Gitolite/Common.pm
++++ gitolite-3.6.11/src/lib/Gitolite/Common.pm
+@@ -26,6 +26,8 @@ package Gitolite::Common;
+ use Exporter 'import';
+ use File::Path qw(mkpath);
+ use File::Temp qw(tempfile);
++use MIME::Base64 qw(decode_base64);
++use Digest::SHA qw(sha256_base64);
+ use Carp qw(carp cluck croak confess);
+ use strict;
+@@ -352,43 +352,82 @@ sub logger_plus_stderr {
+ }
+ # ----------------------------------------------------------------------
++# Decode OpenSSH key
++# If the key cannot be parsed it will be undef
++# Returns (algorithm_name, algo_data1, algo_data2, ...)
++sub ssh_decode_key($) {
++    my $key = shift;
++    my $keydata = decode_base64($key);
++    my @keyparts = ();
++    my $partlen;
++    my $algorithm;
++    my $data;
++    my $pos = 0;
++    $partlen = unpack('N',  substr $keydata, $pos, 4) or return undef;
++    $algorithm = substr $keydata, $pos + 4, $partlen or return undef;
++    $pos = $pos + 4 + $partlen;
++    while ( $pos <= length($keydata) ) {
++        $partlen = unpack('N',  substr $keydata, $pos, 4) or last;
++        $data = unpack('s>*',  substr $keydata, $pos + 4, 4) or last;
++      $pos = $pos + 4 + $partlen;
++        push @keyparts, $data;
++    }
++    return ( $algorithm, @keyparts );
++}
++
++# ----------------------------------------------------------------------
++# Parse OpenSSH line
++# If the file cannot be parsed it will be undef
++# Returns (restrictions, algorithm, PEMkey, comment)
++sub ssh_parse_line($) {
++   my $ssh_line = shift;
++   my @ssh_parts = split / /, $ssh_line, 5;
++   if (scalar @ssh_parts < 4)  {
++      @ssh_parts = ('', @ssh_parts);
++   }
++   if (scalar @ssh_parts > 4) {
++      @ssh_parts = @ssh_parts[0,3]
++   }
++   if (scalar @ssh_parts < 4) {
++      @ssh_parts = undef;
++   }
++   return ( @ssh_parts );
++}
++
++# ----------------------------------------------------------------------
++# Get the SSH fingerprint of a line of text
++# If the fingerprint cannot be parsed, it will be undef
++# In a scalar context, returns the fingerprint
++# In a list context, returns (fingerprint, output) where output
++# is the parsed input line (less algorithm)
++sub ssh_fingerprint_line($) {
++    my $ssh_line = shift;
++    my @parsed_line = ssh_parse_line($ssh_line) or return undef;
++    my @ssh_parts = ssh_decode_key($parsed_line[2]) or return undef;
++    ( $parsed_line[1] eq $ssh_parts[0] ) or die "algorithm mismatch: $parsed_line[1] vs. $ssh_parts[0]";
++    my $fp = sha256_base64(join(' ', @ssh_parts[1,-1]));
++    return wantarray ? ($fp, join(' ', @ssh_parts[1,-1])) : $fp;
++}
++
++# ----------------------------------------------------------------------
+ # Get the SSH fingerprint of a file
+ # If the fingerprint cannot be parsed, it will be undef
+ # In a scalar context, returns the fingerprint
+ # In a list context, returns (fingerprint, output) where output
+-# is the raw output of the ssh-keygen command
+-sub ssh_fingerprint_file {
++# is the raw input line
++sub ssh_fingerprint_file($) {
+     my $in = shift;
+     -f $in or die "file not found: $in\n";
+     my $fh;
+-    open( $fh, "ssh-keygen -l -f $in |" ) or die "could not fork: $!\n";
++    open( $fh, $in ) or die "could not open $in: $!\n";
+     my $output = <$fh>;
+     chomp $output;
+-    # dbg("fp = $fp");
+     close $fh;
+     # Return a valid fingerprint or undef
+-    my $fp = undef;
+-    if($output =~ /((?:MD5:)?(?:[0-9a-f]{2}:){15}[0-9a-f]{2})/i or
+-       $output =~ m{((?:RIPEMD|SHA)\d+:[A-Za-z0-9+/=]+)}i) {
+-        $fp = $1;
+-    }
++    my $fp = ssh_fingerprint_line($output);
+     return wantarray ? ($fp, $output) : $fp;
+ }
+-# Get the SSH fingerprint of a line of text
+-# If the fingerprint cannot be parsed, it will be undef
+-# In a scalar context, returns the fingerprint
+-# In a list context, returns (fingerprint, output) where output
+-# is the raw output of the ssh-keygen command
+-sub ssh_fingerprint_line {
+-    my ( $fh, $fn ) = tempfile();
+-    print $fh shift() . "\n";
+-    close $fh;
+-    my ($fp,$output) = ssh_fingerprint_file($fn);
+-    unlink $fn;
+-    return wantarray ? ($fp,$output) : $fp;
+-}
+-
+ # ----------------------------------------------------------------------
+ # bare-minimum subset of 'Tsh' (see github.com/sitaramc/tsh)
diff --git a/net/gnunet-fuse/Makefile b/net/gnunet-fuse/Makefile
new file mode 100644 (file)
index 0000000..6d67796
--- /dev/null
@@ -0,0 +1,40 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gnunet-fuse
+
+PKG_VERSION:=0.11.0
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/gnunet
+PKG_HASH:=4ddf258336c9ce111fe71372aad0bfd792311f6d92753c29293b2cca1fe3bf16
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=gettext-version
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/gnunet-fuse
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet filesystem mount via FUSE
+  URL:=https://www.gnunet.org/
+  DEPENDS:=gnunet +gnunet-fs +libfuse
+endef
+
+CONFIGURE_ARGS+= \
+       --with-libiconv-prefix="$(ICONV_PREFIX)" \
+       --with-libintl-prefix="$(INTL_PREFIX)" \
+       --with-gnunet="$(STAGING_DIR)/usr"
+
+define Package/gnunet-fuse/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-fuse $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,gnunet-fuse))
diff --git a/net/gnunet-fuse/patches/001-musl-compat.patch b/net/gnunet-fuse/patches/001-musl-compat.patch
new file mode 100644 (file)
index 0000000..daa65d1
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/src/fuse/mutex.c
++++ b/src/fuse/mutex.c
+@@ -71,8 +71,13 @@ GNUNET_mutex_create (int isRecursive)
+   if (isRecursive)
+     {
+ #if LINUX
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+       GNUNET_assert (0 == pthread_mutexattr_setkind_np
+                    (&attr, PTHREAD_MUTEX_RECURSIVE_NP));
++#else
++      GNUNET_assert (0 == pthread_mutexattr_settype
++                   (&attr, PTHREAD_MUTEX_RECURSIVE));
++#endif
+ #elif SOMEBSD || GNUNET_freeBSD || GNUNET_freeBSD5
+       GNUNET_assert (0 == pthread_mutexattr_setkind_np
+                    (&attr, PTHREAD_MUTEX_RECURSIVE));
+@@ -84,11 +89,16 @@ GNUNET_mutex_create (int isRecursive)
+   else
+     {
+ #if LINUX
++#if defined(__UCLIBC__) || defined(__GLIBC__)
+       GNUNET_assert (0 == pthread_mutexattr_setkind_np
+                    (&attr, PTHREAD_MUTEX_ERRORCHECK_NP));
+ #else
+       GNUNET_assert (0 == pthread_mutexattr_settype
+                    (&attr, PTHREAD_MUTEX_ERRORCHECK));
++#endif
++#else
++      GNUNET_assert (0 == pthread_mutexattr_settype
++                   (&attr, PTHREAD_MUTEX_ERRORCHECK));
+ #endif
+     }
+   mut = GNUNET_new (struct GNUNET_Mutex);
diff --git a/net/gnunet-secushare/Makefile b/net/gnunet-secushare/Makefile
new file mode 100644 (file)
index 0000000..ae98cb7
--- /dev/null
@@ -0,0 +1,107 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gnunet-secushare
+
+PKG_SOURCE_VERSION:=81939cb93670efcee8e99884d10d2676b02edba9
+PKG_SOURCE_DATE:=20190228
+PKG_MIRROR_HASH:=64a0fb7ad6a515559360de71df85dde152f55a60585668f15114bc1f55cf2742
+PKG_RELEASE:=2
+PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git
+PKG_SOURCE_PROTO:=git
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=gettext-version
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/gnunet-secushare
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet Secushare
+  URL:=https://www.secushare.org/
+  DEPENDS:=gnunet +gnunet-reclaim
+endef
+
+define Package/gnunet-secushare-mysql
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet Secushare (mySQL)
+  URL:=https://www.secushare.org/
+  DEPENDS:=gnunet +gnunet-secushare +gnunet-mysql
+endef
+
+define Package/gnunet-secushare-pgsql
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet Secushare (PostgreSQL)
+  URL:=https://www.secushare.org/
+  DEPENDS:=gnunet +gnunet-secushare +gnunet-pgsql
+endef
+
+define Package/gnunet-secushare-sqlite
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet Secushare (SQLite)
+  URL:=https://www.secushare.org/
+  DEPENDS:=gnunet +gnunet-secushare +gnunet-sqlite
+endef
+
+
+CONFIGURE_ARGS+= \
+       --with-libiconv-prefix="$(ICONV_PREFIX)" \
+       --with-libintl-prefix="$(INTL_PREFIX)" \
+       --with-gnunet="$(STAGING_DIR)/usr" \
+       $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mysql),--with-mysql="$(STAGING_DIR)/usr",--without-mysql) \
+       $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pgsql),--with-postgresql="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql) \
+       $(if $(CONFIG_PACKAGE_$(PKG_NAME)-sqlite),--with-sqlite="$(STAGING_DIR)/usr",--without-sqlite) \
+       --enable-testing \
+       --disable-testruns \
+       --enable-experimental
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
+endef
+
+define Package/gnunet-secushare/install
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet $(1)/usr/lib/gnunet-secushare/libexec
+       $(INSTALL_DIR) $(1)/usr/share/gnunet-secushare/config.d $(1)/usr/share/gnunet/config.d
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-multicast $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-social $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet-secushare/libexec/* $(1)/usr/lib/gnunet-secushare/libexec/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet-secushare/config.d/* $(1)/usr/share/gnunet-secushare/config.d
+endef
+
+define Package/gnunet-secushare-mysql/install
+       $(INSTALL_DIR) $(1)/usr/lib/gnunet
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/gnunet-secushare-mysql.defaults $(1)/etc/uci-defaults/gnunet-secushare-mysql
+endef
+
+define Package/gnunet-secushare-pgsql/install
+       $(INSTALL_DIR) $(1)/usr/lib/gnunet
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/gnunet-secushare-pgsql.defaults $(1)/etc/uci-defaults/gnunet-secushare-pgsql
+endef
+
+define Package/gnunet-secushare-sqlite/install
+       $(INSTALL_DIR) $(1)/usr/lib/gnunet
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/
+       $(INSTALL_DIR) $(1)/etc/uci-defaults
+       $(INSTALL_BIN) ./files/gnunet-secushare-sqlite.defaults $(1)/etc/uci-defaults/gnunet-secushare-sqlite
+endef
+
+$(eval $(call BuildPackage,gnunet-secushare))
+$(eval $(call BuildPackage,gnunet-secushare-mysql))
+$(eval $(call BuildPackage,gnunet-secushare-pgsql))
+$(eval $(call BuildPackage,gnunet-secushare-sqlite))
diff --git a/net/gnunet-secushare/files/gnunet-secushare-mysql.defaults b/net/gnunet-secushare/files/gnunet-secushare-mysql.defaults
new file mode 100644 (file)
index 0000000..9954a60
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
+
+uci -q batch <<EOF
+       set gnunet.psycstore.DATABASE=mysql
+       commit gnunet
+EOF
diff --git a/net/gnunet-secushare/files/gnunet-secushare-pgsql.defaults b/net/gnunet-secushare/files/gnunet-secushare-pgsql.defaults
new file mode 100644 (file)
index 0000000..fe74e11
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
+
+uci -q batch <<EOF
+       set gnunet.psycstore.DATABASE=postgres
+       commit gnunet
+EOF
diff --git a/net/gnunet-secushare/files/gnunet-secushare-sqlite.defaults b/net/gnunet-secushare/files/gnunet-secushare-sqlite.defaults
new file mode 100644 (file)
index 0000000..9bf57db
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
+
+uci -q batch <<EOF
+       del gnunet.psycstore_sqlite
+       set gnunet.psycstore_sqlite=gnunet-config
+       set gnunet.psycstore_sqlite.FILENAME=/etc/gnunet/psycstore.sqlite
+       set gnunet.psycstore.DATABASE=sqlite
+       commit gnunet
+EOF
index 983f2e9f0833e1ce32f01ac5fd773bc53506f3db..ee0869b0c6dbe7e44fcac8f027c182b753963705 100644 (file)
@@ -1,16 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=d80214febe4e0e4cc64dddc74e990b3c5ca8a5df
-PKG_MIRROR_HASH:=12d6f8e8c9e17217db16fbb89d023f50dcf54b8ec1959c4a248880be9b11ef3c
 
-PKG_VERSION:=0.10.2-git-20190128-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=2
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://gnunet.org/git/gnunet.git
-PKG_SOURCE_PROTO:=git
+PKG_VERSION:=0.11.2
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/gnunet
+PKG_HASH:=cac5c6c692d8375de733371ee777481d11bf6f2276c951b8759d8f870a1515b5
 
 PKG_LICENSE:=AGPL-3.0
 PKG_LICENSE_FILES:=COPYING
@@ -53,8 +49,8 @@ endef
 define Package/gnunet
 $(call Package/gnunet/Default)
   TITLE+= - a peer-to-peer framework focusing on security
-  DEPENDS:=+libgcrypt +libgpg-error +libidn2 +libltdl +libunistring +librt +zlib \
-           $(ICONV_DEPENDS) $(INTL_DEPENDS)
+  DEPENDS:=+libatomic +libgcrypt +libgpg-error +libidn2 +libltdl +libunistring \
+           +librt +zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
   USERID:=gnunet=958:gnunet=958
   MENU:=1
 endef
@@ -134,36 +130,37 @@ define Package/gnunet/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
        $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
 
-       ( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
-           peerinfo revocation scalarproduct scrypt statistics transport uri; do \
+       ( for bin in arm ats ats-new cadet core config ecc identity nat nat-auto nat-server nse \
+           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 block blockgroup cadet core datacache dht \
-           dns dnsparser fragmentation friends hello identity natauto natnew nse \
-           nt peerinfo regexblock regex revocation scalarproduct set \
-           statistics transport util; do \
+       ( for lib in arm ats atsapplication atstransport block blockgroup cadet \
+           core datacache dht dns dnsparser fragmentation friends hello \
+           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 \
-           service-transport; do \
+           service-transport timeout; do \
                $(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 )
 
@@ -185,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
@@ -211,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
 
@@ -219,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
@@ -232,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
@@ -241,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
@@ -259,12 +259,15 @@ LIB_datastore:=datastore
 LIBEXEC_datastore:=service-datastore
 CONF_datastore:=datastore
 
-BIN_peerstore:=peerstore
-LIB_peerstore:=peerstore
-LIBEXEC_peerstore:=service-peerstore
-CONF_peerstore:=peerstore
 
-DEPENDS_rest:=+gnunet-gns +gnunet-social +libmicrohttpd-ssl +jansson
+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 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
 LIB_rest:=rest json
 PLUGIN_rest:=rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim
 LIBEXEC_rest:=rest-server
@@ -275,20 +278,12 @@ LIB_rps:=rps
 LIBEXEC_rps:=service-rps
 CONF_rps:=rps
 
-DEPENDS_social:=+gnunet-gns +libmicrohttpd-ssl +jansson +libpbc +libgabe
-BIN_social:=credential identity-token multicast reclaim social
-LIB_social:=abe consensus credential identityprovider multicast psyc psycstore psycutil reclaim reclaimattribute secretsharing social
-LIBEXEC_social:=service-consensus service-credential service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-reclaim service-secretsharing service-social
-CONF_social:=consensus credential multicast psyc psycstore reclaim secretsharing social
-PLUGIN_social:=block_consensus gnsrecord_credential gnsrecord_reclaim reclaim_attribute_gnuid
-
 PLUGIN_dhtcache-heap:=datacache_heap
 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
@@ -298,9 +293,6 @@ CONFLICTS_fs-heap:=gnunet-fs-mysql gnunet-fs-pgsql gnunet-fs-sqlite
 DEPENDS_mysql:=+libmysqlclient
 LIB_mysql:=mysql my
 
-DEPENDS_social-mysql:=+gnunet-mysql +gnunet-social
-PLUGIN_social-mysql:=psycstore_mysql
-CONFLICTS_social-mysql:=gnunet-social-sqlite
 
 DEPENDS_fs-mysql:=+gnunet-mysql +gnunet-datastore
 PLUGIN_fs-mysql:=datastore_mysql
@@ -321,9 +313,6 @@ DEPENDS_gns-pgsql:=+gnunet-pgsql +gnunet-gns
 PLUGIN_gns-pgsql:=namecache_postgres namestore_postgres
 CONFLICTS_gns-pgsql:=gnunet-gns-sqlite gnunet-gns-flat
 
-DEPENDS_social-pgsql:=+gnunet-pgsql +gnunet-social
-PLUGIN_social-pgsql:=psycstore_postgres
-CONFLICTS_social-pgsql:=gnunet-social-sqlite gnunet-social-mysql
 
 DEPENDS_sqlite:=+libsqlite3
 LIB_sqlite:=sq
@@ -332,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
 
@@ -342,8 +331,6 @@ PLUGIN_dhtcache-sqlite:=datacache_sqlite
 DEPENDS_fs-sqlite:=+gnunet-datastore +gnunet-sqlite
 PLUGIN_fs-sqlite:=datastore_sqlite
 
-DEPENDS_social-sqlite:=+gnunet-social +gnunet-sqlite
-PLUGIN_social-sqlite:=psycstore_sqlite reclaim_sqlite
 
 
 DEPENDS_utils:=+certtool +openssl-util
@@ -401,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,))
@@ -411,10 +399,9 @@ $(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))
-$(eval $(call BuildComponent,social,social components,))
 $(eval $(call BuildComponent,namestore-fcfsd,first-come-first-serve registration server,))
 $(eval $(call BuildComponent,dhtcache-heap,heap-based dhtcache plugin,y))
 $(eval $(call BuildComponent,fs-heap,heap-based filesharing plugin,))
@@ -422,25 +409,20 @@ $(eval $(call BuildComponent,gns-flat,flat storage GNS plugins,y))
 $(eval $(call BuildComponent,peerstore-flat,flat storage peerstore plugin,))
 $(eval $(call BuildComponent,mysql,mySQL backend,))
 $(eval $(call BuildComponent,fs-mysql,mySQL filesharing plugins,))
-$(eval $(call BuildComponent,social-mysql,mySQL social plugins,))
 $(eval $(call BuildComponent,pgsql,PostgreSQL backend,))
 $(eval $(call BuildComponent,dhtcache-pgsql,PostgreSQL dhtcache plugin,))
 $(eval $(call BuildComponent,fs-pgsql,PostgreSQL filesharing plugin,))
 $(eval $(call BuildComponent,gns-pgsql,PostgreSQL GNS plugins,))
-$(eval $(call BuildComponent,social-pgsql,PostgreSQL social plugin,))
 $(eval $(call BuildComponent,sqlite,libsqlite3 backend,))
 $(eval $(call BuildComponent,dhtcache-sqlite,libsqlite3 dhtcache plugin,))
 $(eval $(call BuildComponent,fs-sqlite,libsqlite3 filesharing plugin,))
 $(eval $(call BuildComponent,gns-sqlite,libsqlite3 gns plugins,))
 $(eval $(call BuildComponent,peerstore-sqlite,libsqlite3 peerstore plugin,))
-$(eval $(call BuildComponent,social-sqlite,libsqlite3 social plugins,))
 $(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,))
 $(eval $(call BuildComponent,transport-http_client,HTTP/HTTPS client transport,y))
 $(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/files/gnunet-social-pgsql.defaults b/net/gnunet/files/gnunet-social-pgsql.defaults
deleted file mode 100644 (file)
index fe74e11..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
-
-uci -q batch <<EOF
-       set gnunet.psycstore.DATABASE=postgres
-       commit gnunet
-EOF
diff --git a/net/gnunet/files/gnunet-social-sqlite.defaults b/net/gnunet/files/gnunet-social-sqlite.defaults
deleted file mode 100644 (file)
index 9bf57db..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-uci -q get gnunet.psycstore || uci set gnunet.psycstore=gnunet-config
-
-uci -q batch <<EOF
-       del gnunet.psycstore_sqlite
-       set gnunet.psycstore_sqlite=gnunet-config
-       set gnunet.psycstore_sqlite.FILENAME=/etc/gnunet/psycstore.sqlite
-       set gnunet.psycstore.DATABASE=sqlite
-       commit gnunet
-EOF
diff --git a/net/gnunet/patches/001-fix-dist.patch b/net/gnunet/patches/001-fix-dist.patch
new file mode 100644 (file)
index 0000000..eb0e775
--- /dev/null
@@ -0,0 +1,115 @@
+diff --git a/src/include/Makefile.am b/src/include/Makefile.am
+index ca0f6050d..bd8eca256 100644
+--- a/src/include/Makefile.am
++++ b/src/include/Makefile.am
+@@ -127,6 +127,7 @@ gnunetinclude_HEADERS = \
+   gnunet_time_lib.h \
+   gnunet_transport_service.h \
+   gnunet_transport_address_service.h \
++      gnunet_transport_application_service.h \
+   gnunet_transport_communication_service.h \
+   gnunet_transport_core_service.h \
+   gnunet_transport_hello_service.h \
+--- /dev/null  2019-04-03 22:31:17.799489053 +0200
++++ b/src/include/gnunet_transport_application_service.h       2019-04-05 14:30:10.326602964 +0200
+@@ -0,0 +1,100 @@
++/*
++ This file is part of GNUnet.
++ Copyright (C) 2010-2015, 2018, 2019 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
++ * Bandwidth allocation API for applications to interact with
++ *
++ * @author Christian Grothoff
++ * @author Matthias Wachs
++ *
++ * @defgroup TRANSPORT service
++ * Bandwidth allocation
++ *
++ * @{
++ */
++#ifndef GNUNET_TRANSPORT_APPLICATION_SERVICE_H
++#define GNUNET_TRANSPORT_APPLICATION_SERVICE_H
++
++#include "gnunet_constants.h"
++#include "gnunet_util_lib.h"
++
++/**
++ * Handle to the TRANSPORT subsystem for making suggestions about
++ * connections the peer would like to have.
++ */
++struct GNUNET_TRANSPORT_ApplicationHandle;
++
++
++/**
++ * Initialize the TRANSPORT application client handle.
++ *
++ * @param cfg configuration to use
++ * @return ats application handle, NULL on error
++ */
++struct GNUNET_TRANSPORT_ApplicationHandle *
++GNUNET_TRANSPORT_application_init (const struct GNUNET_CONFIGURATION_Handle *cfg);
++
++
++/**
++ * Shutdown TRANSPORT application client.
++ *
++ * @param ch handle to destroy
++ */
++void
++GNUNET_TRANSPORT_application_done (struct GNUNET_TRANSPORT_ApplicationHandle *ch);
++
++
++/**
++ * Handle for suggestion requests.
++ */
++struct GNUNET_TRANSPORT_ApplicationSuggestHandle;
++
++
++/**
++ * An application would like to communicate with a peer.  TRANSPORT should
++ * allocate bandwith using a suitable address for requiremetns @a pk
++ * to transport.
++ *
++ * @param ch handle
++ * @param peer identity of the peer we need an address for
++ * @param pk what kind of application will the application require (can be
++ *         #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect)
++ * @param bw desired bandwith, can be zero (we will still try to connect)
++ * @return suggestion handle, NULL if request is already pending
++ */
++struct GNUNET_TRANSPORT_ApplicationSuggestHandle *
++GNUNET_TRANSPORT_application_suggest (struct GNUNET_TRANSPORT_ApplicationHandle *ch,
++                                      const struct GNUNET_PeerIdentity *peer,
++                                      enum GNUNET_MQ_PreferenceKind pk,
++                                      struct GNUNET_BANDWIDTH_Value32NBO bw);
++
++
++/**
++ * We no longer care about communicating with a peer.
++ *
++ * @param sh handle
++ */
++void
++GNUNET_TRANSPORT_application_suggest_cancel (struct GNUNET_TRANSPORT_ApplicationSuggestHandle *sh);
++
++/** @} */  /* end of group */
++
++#endif
++/* end of file gnunet_ats_application_service.h */
diff --git a/net/gnunet/patches/002-include-credential_.h-in-dist.patch b/net/gnunet/patches/002-include-credential_.h-in-dist.patch
new file mode 100644 (file)
index 0000000..c71ef48
--- /dev/null
@@ -0,0 +1,227 @@
+From 53969c9d9a95234ee845fa0542a330f788ad2a2c Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Fri, 5 Apr 2019 14:41:44 +0200
+Subject: [PATCH] include credential_*.h in dist
+
+---
+ src/credential/Makefile.am | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/credential/Makefile.am b/src/credential/Makefile.am
+index aaac0d2c2..f2550eca6 100644
+--- a/src/credential/Makefile.am
++++ b/src/credential/Makefile.am
+@@ -70,7 +70,9 @@ gnunet_service_credential_LDADD = \
+ libgnunetcredential_la_SOURCES = \
+  credential_api.c credential.h \
+  credential_serialization.c \
+- credential_misc.c
++ credential_serialization.h \
++ credential_misc.c \
++ credential_misc.h
+ libgnunetcredential_la_LIBADD = \
+  $(top_builddir)/src/util/libgnunetutil.la $(XLIB)
+ libgnunetcredential_la_LDFLAGS = \
+-- 
+2.21.0
+
+--- /dev/null  2019-04-03 22:31:17.799489053 +0200
++++ b/src/credential/credential_serialization.h        2019-01-28 21:42:05.304419524 +0100
+@@ -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 */
+--- /dev/null  2019-04-03 22:31:17.799489053 +0200
++++ b/src/credential/credential_misc.h 2019-01-28 21:42:05.304419524 +0100
+@@ -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
index 0d5ca2418a55242680a45a30974bfef83dac99ac..0a64aca83af512b7a1ae89f8f09c1f58cec8a15a 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnurl
-PKG_VERSION:=7.63.0
+PKG_VERSION:=7.64.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://ftp.gnu.org/gnu/gnunet
 
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=d435d9e35d6d1afda3a2a66db9f364d18a9f199d5f7b70e7296cd863bcf4c497
+PKG_HASH:=68b68a1be6a04f514a863eaac0d6b89f935833aff4e60bc2bcac472a465c755f
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
index 18dd7d46fca71ff5f042ea9366d55eb54f709aa0..e01785a9722ea54e5701a12829fe949d724006b3 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=haproxy
-PKG_VERSION:=1.8.17
-PKG_RELEASE:=2
+PKG_VERSION:=1.8.19
+PKG_RELEASE:=3
 
 PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.haproxy.org/download/1.8/src/
-PKG_HASH:=7b789b177875afdd5ddeff058e7efde73aa895dc2dcf728b464358635ae3948e
+PKG_HASH:=64f5fbfd4e09ffeaf26cb6667398ba780704a14e96e60000caa8bf69962ba734
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_LICENSE:=GPL-2.0
@@ -70,11 +70,6 @@ $(call Package/haproxy/Default/description)
  This package is built with SSL and LUA support.
 endef
 
-define Package/haproxy/config
-       select CONFIG_OPENSSL_WITH_DEPRECATED
-       $(call Package/haproxy/Default/config)
-endef
-
 define Package/haproxy-nossl
   TITLE+= (without SSL support)
   VARIANT:=nossl
index c6ed562cc0401d78ec26c540ead3ad38a73dd93d..e6cd59c5552e34266db63d4560add45c299a488e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 CLONEURL=http://git.haproxy.org/git/haproxy-1.8.git
-BASE_TAG=v1.8.17
+BASE_TAG=v1.8.19
 TMP_REPODIR=tmprepo
 PATCHESDIR=patches
 
diff --git a/net/haproxy/patches/000-BUG-MAJOR-listener-Make-sure-the-listener-exist-before-using-it.patch b/net/haproxy/patches/000-BUG-MAJOR-listener-Make-sure-the-listener-exist-before-using-it.patch
new file mode 100644 (file)
index 0000000..7d9708e
--- /dev/null
@@ -0,0 +1,50 @@
+commit 7c3fd37724c58cf09359e0d381a9be305dd7869b
+Author: Olivier Houchard <cognet@ci0.org>
+Date:   Mon Feb 25 16:18:16 2019 +0100
+
+    BUG/MAJOR: listener: Make sure the listener exist before using it.
+    
+    In listener_accept(), make sure we have a listener before attempting to
+    use it.
+    An another thread may have closed the FD meanwhile, and set fdtab[fd].owner
+    to NULL.
+    As the listener is not free'd, it is ok to attempt to accept() a new
+    connection even if the listener was closed. At worst the fd has been
+    reassigned to another connection, and accept() will fail anyway.
+    
+    Many thanks to Richard Russo for reporting the problem, and suggesting the
+    fix.
+    
+    This should be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit d16a9dfed80e75d730754b717370515265698cdd)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit a2511ed1fcdfa8047dbe2268fc0259f9b06cf891)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/listener.c b/src/listener.c
+index a30efe03..5f6fafbc 100644
+--- a/src/listener.c
++++ b/src/listener.c
+@@ -441,8 +441,8 @@ void delete_listener(struct listener *listener)
+ void listener_accept(int fd)
+ {
+       struct listener *l = fdtab[fd].owner;
+-      struct proxy *p = l->bind_conf->frontend;
+-      int max_accept = l->maxaccept ? l->maxaccept : 1;
++      struct proxy *p;
++      int max_accept;
+       int expire;
+       int cfd;
+       int ret;
+@@ -450,6 +450,10 @@ void listener_accept(int fd)
+       static int accept4_broken;
+ #endif
++      if (!l)
++              return;
++      p = l->bind_conf->frontend;
++      max_accept = l->maxaccept ? l->maxaccept : 1;
+       if (HA_SPIN_TRYLOCK(LISTENER_LOCK, &l->lock))
+               return;
diff --git a/net/haproxy/patches/000-DOC-http-request-cache-use-http-response-cache-store-expects-cache-name.patch b/net/haproxy/patches/000-DOC-http-request-cache-use-http-response-cache-store-expects-cache-name.patch
deleted file mode 100644 (file)
index 01b9a89..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-commit 6648ff0cccee04a6a0c0e64050151b5d6c5bac51
-Author: Jarno Huuskonen <jarno.huuskonen@uef.fi>
-Date:   Fri Jan 4 14:05:02 2019 +0200
-
-    DOC: http-request cache-use / http-response cache-store expects cache name
-    
-    Adds missing cache name option to http-request cache-use and
-    http-response cache-store documentation.
-    
-    Also adds optional if/unless condition to
-    10.2.2. Proxy section: http-request cache-use / http-response cache-store
-    
-    (cherry picked from commit 251a6b72a8b6f0a4b167f6a2960e422d682aed80)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 5376f6af9239fdf8a79b6c912387de12e3c9d6cd)
-    [wla: no http-request/response section in 1.8]
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/doc/configuration.txt b/doc/configuration.txt
-index 4f999e25..712e56e2 100644
---- a/doc/configuration.txt
-+++ b/doc/configuration.txt
-@@ -17157,13 +17157,13 @@ max-age <seconds>
- 10.2.2. Proxy section
- ---------------------
--http-request cache-use <name>
-+http-request cache-use <name> [ { if | unless } <condition> ]
-   Try to deliver a cached object from the cache <name>. This directive is also
-   mandatory to store the cache as it calculates the cache hash. If you want to
-   use a condition for both storage and delivering that's a good idea to put it
-   after this one.
--http-response cache-store <name>
-+http-response cache-store <name> [ { if | unless } <condition> ]
-   Store an http-response within the cache. The storage of the response headers
-   is done at this step, which means you can use others http-response actions
-   to modify headers before or after the storage of the response. This action
diff --git a/net/haproxy/patches/001-BUG-MAJOR-cache-fix-confusion-between-zero-and-uninitialized-cache-key.patch b/net/haproxy/patches/001-BUG-MAJOR-cache-fix-confusion-between-zero-and-uninitialized-cache-key.patch
deleted file mode 100644 (file)
index 2a185a2..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-commit a64e5574e40e3e0819c82e35a7e3d2fa65febc73
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Fri Jan 11 19:38:25 2019 +0100
-
-    BUG/MAJOR: cache: fix confusion between zero and uninitialized cache key
-    
-    The cache uses the first 32 bits of the uri's hash as the key to reference
-    the object in the cache. It makes a special case of the value zero to mean
-    that the object is not in the cache anymore. The problem is that when an
-    object hashes as zero, it's still inserted but the eb32_delete() call is
-    skipped, resulting in the object still being chained in the memory area
-    while the block has been reclaimed and used for something else. Then when
-    objects which were chained below it (techically any object since zero is
-    at the root) are deleted, the walk through the upper object may encounter
-    corrupted values where valid pointers were expected.
-    
-    But while this should only happen statically once on 4 billion, the problem
-    gets worse when the cache-use conditions don't match the cache-store ones,
-    because cache-store runs with an uninitialized key, which can create objects
-    that will never be found by the lookup code, or worse, entries with a zero
-    key preventing eviction of the tree node and resulting in a crash. It's easy
-    to accidently end up on such a config because the request rules generally
-    can't be used to decide on the response :
-    
-      http-request  cache-use cache   if { path_beg /images }
-      http-response cache-store cache
-    
-    In this test, mixing traffic with /images/$RANDOM and /foo/$RANDOM will
-    result in random keys being inserted, some of them possibly being zero,
-    and crashes will quickly happen.
-    
-    The fix consists in 1) always initializing the transaction's cache_hash
-    to zero, and 2) never storing a response for which the hash has not been
-    calculated, as indicated by the value zero.
-    
-    It is worth noting that objects hashing as value zero will never be cached,
-    but given that there's only one chance among 4 billion that this happens,
-    this is totally harmless.
-    
-    This fix must be backported to 1.9 and 1.8.
-    
-    (cherry picked from commit c9036c00044a8d81561113886ecec9a9ce71bd3b)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 5a6279fcc16da479304bcabc1705e8653f274337)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/cache.c b/src/cache.c
-index 667cede3..3d8ed241 100644
---- a/src/cache.c
-+++ b/src/cache.c
-@@ -400,7 +400,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
-       struct cache *cache = (struct cache *)rule->arg.act.p[0];
-       struct shared_context *shctx = shctx_ptr(cache);
-       struct cache_entry *object;
--
-+      unsigned int key = *(unsigned int *)txn->cache_hash;
-       /* Don't cache if the response came from a cache */
-       if ((obj_type(s->target) == OBJ_TYPE_APPLET) &&
-@@ -420,6 +420,10 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
-       if (txn->meth != HTTP_METH_GET)
-               goto out;
-+      /* cache key was not computed */
-+      if (!key)
-+              goto out;
-+
-       /* cache only 200 status code */
-       if (txn->status != 200)
-               goto out;
-@@ -478,7 +482,7 @@ enum act_return http_action_store_cache(struct act_rule *rule, struct proxy *px,
-                                       cache_ctx->first_block = first;
--                                      object->eb.key = (*(unsigned int *)&txn->cache_hash);
-+                                      object->eb.key = key;
-                                       memcpy(object->hash, txn->cache_hash, sizeof(object->hash));
-                                       /* Insert the node later on caching success */
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 7e4a8351..29a1083a 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -8210,6 +8210,7 @@ void http_init_txn(struct stream *s)
-       txn->flags = 0;
-       txn->status = -1;
-+      *(unsigned int *)txn->cache_hash = 0;
-       txn->cookie_first_date = 0;
-       txn->cookie_last_date = 0;
diff --git a/net/haproxy/patches/001-BUG-MINOR-listener-keep-accept-rate-counters-accurate-under-saturation.patch b/net/haproxy/patches/001-BUG-MINOR-listener-keep-accept-rate-counters-accurate-under-saturation.patch
new file mode 100644 (file)
index 0000000..1edac3a
--- /dev/null
@@ -0,0 +1,67 @@
+commit 78714ea673cefa83d3dff5aa9aa5e97726cfb5cd
+Author: Willy Tarreau <w@1wt.eu>
+Date:   Mon Feb 25 15:02:04 2019 +0100
+
+    BUG/MINOR: listener: keep accept rate counters accurate under saturation
+    
+    The test on l->nbconn forces to exit the loop before updating the freq
+    counters, so the last session which reaches a listener's limit will not
+    be accounted for in the session rate measurement.
+    
+    Let's move the test at the beginning of the loop and mark the listener
+    as saturated on exit.
+    
+    This may be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit 741b4d6b7aad1e4a66dd8584b5eff729b08fade7)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+    (cherry picked from commit 5c7c7e447df84a04bda88c40382b652cdb77a079)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/listener.c b/src/listener.c
+index 5f6fafbc..b94d823c 100644
+--- a/src/listener.c
++++ b/src/listener.c
+@@ -457,11 +457,6 @@ void listener_accept(int fd)
+       if (HA_SPIN_TRYLOCK(LISTENER_LOCK, &l->lock))
+               return;
+-      if (unlikely(l->nbconn >= l->maxconn)) {
+-              listener_full(l);
+-              goto end;
+-      }
+-
+       if (!(l->options & LI_O_UNLIMITED) && global.sps_lim) {
+               int max = freq_ctr_remain(&global.sess_per_sec, global.sps_lim, 0);
+@@ -520,7 +515,7 @@ void listener_accept(int fd)
+        * worst case. If we fail due to system limits or temporary resource
+        * shortage, we try again 100ms later in the worst case.
+        */
+-      while (max_accept--) {
++      while (l->nbconn < l->maxconn && max_accept--) {
+               struct sockaddr_storage addr;
+               socklen_t laddr = sizeof(addr);
+               unsigned int count;
+@@ -627,11 +622,6 @@ void listener_accept(int fd)
+                       goto transient_error;
+               }
+-              if (l->nbconn >= l->maxconn) {
+-                      listener_full(l);
+-                      goto end;
+-              }
+-
+               /* increase the per-process number of cumulated connections */
+               if (!(l->options & LI_O_UNLIMITED)) {
+                       count = update_freq_ctr(&global.sess_per_sec, 1);
+@@ -659,6 +649,9 @@ void listener_accept(int fd)
+       limit_listener(l, &global_listener_queue);
+       task_schedule(global_listener_queue_task, tick_first(expire, global_listener_queue_task->expire));
+  end:
++      if (l->nbconn >= l->maxconn)
++              listener_full(l);
++
+       HA_SPIN_UNLOCK(LISTENER_LOCK, &l->lock);
+ }
diff --git a/net/haproxy/patches/002-BUG-MEDIUM-logs-Only-attempt-to-free-startup_logs-once.patch b/net/haproxy/patches/002-BUG-MEDIUM-logs-Only-attempt-to-free-startup_logs-once.patch
new file mode 100644 (file)
index 0000000..d726360
--- /dev/null
@@ -0,0 +1,37 @@
+commit 4c82743abd299f0aa8105e98ec92b76375a7f344
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date:   Thu Mar 7 14:19:24 2019 +0100
+
+    BUG/MEDIUM: logs: Only attempt to free startup_logs once.
+    
+    deinit_log_buffers() can be called once per thread, however startup_logs
+    is common to all threads. So only attempt to free it once.
+    
+    This should be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit 7c49711d6041d1afc42d5b310ddfd7d6f6817c3c)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+    (cherry picked from commit bc3e21b27849275306a0580488613b7dfd4d8eb5)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/log.c b/src/log.c
+index b3f33662..9c112255 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -1380,11 +1380,15 @@ int init_log_buffers()
+ /* Deinitialize log buffers used for syslog messages */
+ void deinit_log_buffers()
+ {
++      void *tmp_startup_logs;
++
+       free(logheader);
+       free(logheader_rfc5424);
+       free(logline);
+       free(logline_rfc5424);
+-      free(startup_logs);
++      tmp_startup_logs = HA_ATOMIC_XCHG(&startup_logs, NULL);
++      free(tmp_startup_logs);
++
+       logheader         = NULL;
+       logheader_rfc5424 = NULL;
+       logline           = NULL;
diff --git a/net/haproxy/patches/002-BUG-MEDIUM-ssl-Disable-anti-replay-protection-and-set-max-data-with-0RTT.patch b/net/haproxy/patches/002-BUG-MEDIUM-ssl-Disable-anti-replay-protection-and-set-max-data-with-0RTT.patch
deleted file mode 100644 (file)
index cd26ede..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-commit 9f01534cd68de78c74b50d7b8def07a72c2a3b49
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date:   Wed Jan 2 18:46:41 2019 +0100
-
-    BUG/MEDIUM: ssl: Disable anti-replay protection and set max data with 0RTT.
-    
-    When using early data, disable the OpenSSL anti-replay protection, and set
-    the max amount of early data we're ready to accept, based on the size of
-    buffers, or early data won't work with the released OpenSSL 1.1.1.
-    
-    This should be backported to 1.8.
-    
-    (cherry picked from commit 51088ce68fee0bae52118d6823873417046f9efe)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 6703b633078b6bae12395ee3e310427b37965d68)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 24ccc4b1..11655533 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -3821,6 +3821,10 @@ ssl_sock_initial_ctx(struct bind_conf *bind_conf)
-       SSL_CTX_set_select_certificate_cb(ctx, ssl_sock_switchctx_cbk);
-       SSL_CTX_set_tlsext_servername_callback(ctx, ssl_sock_switchctx_err_cbk);
- #elif (OPENSSL_VERSION_NUMBER >= 0x10101000L)
-+      if (bind_conf->ssl_conf.early_data) {
-+              SSL_CTX_set_options(ctx, SSL_OP_NO_ANTI_REPLAY);
-+              SSL_CTX_set_max_early_data(ctx, global.tune.bufsize - global.tune.maxrewrite);
-+      }
-       SSL_CTX_set_client_hello_cb(ctx, ssl_sock_switchctx_cbk, NULL);
-       SSL_CTX_set_tlsext_servername_callback(ctx, ssl_sock_switchctx_err_cbk);
- #else
diff --git a/net/haproxy/patches/003-BUG-MEDIUM-51d-fix-possible-segfault-on-deinit_51degrees.patch b/net/haproxy/patches/003-BUG-MEDIUM-51d-fix-possible-segfault-on-deinit_51degrees.patch
new file mode 100644 (file)
index 0000000..3c9078f
--- /dev/null
@@ -0,0 +1,35 @@
+commit 63f5dbf1b9fcdc5b10537d733b0e0798905ff1dc
+Author: Dragan Dosen <ddosen@haproxy.com>
+Date:   Thu Mar 7 15:24:23 2019 +0100
+
+    BUG/MEDIUM: 51d: fix possible segfault on deinit_51degrees()
+    
+    When haproxy is built with 51Degrees support, but not configured to use
+    51Degrees database, a segfault can occur when deinit_51degrees()
+    function is called, eg. during soft-stop on SIGUSR1 signal.
+    
+    Only builds that use Pattern algorithm are affected.
+    
+    This fix must be backported to all stable branches where 51Degrees
+    support is available. Additional adjustments are required for some
+    branches due to API and naming changes.
+    
+    (cherry picked from commit bc6218e1b02860c6cdad0d2bb4dc8874557087f8)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+    (cherry picked from commit 4e0363e84cb3f6ca341e1f83c6fd490c76c9ae6b)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/51d.c b/src/51d.c
+index a36333ef..03101136 100644
+--- a/src/51d.c
++++ b/src/51d.c
+@@ -639,7 +639,8 @@ static void deinit_51degrees(void)
+       free(global_51degrees.header_names);
+ #ifdef FIFTYONEDEGREES_H_PATTERN_INCLUDED
+-      fiftyoneDegreesWorksetPoolFree(global_51degrees.pool);
++      if (global_51degrees.pool)
++              fiftyoneDegreesWorksetPoolFree(global_51degrees.pool);
+ #endif
+ #ifdef FIFTYONEDEGREES_H_TRIE_INCLUDED
+       free(global_51degrees.device_offsets.firstOffset);
diff --git a/net/haproxy/patches/003-DOC-Be-a-bit-more-explicit-about-allow-0rtt-security-implications.patch b/net/haproxy/patches/003-DOC-Be-a-bit-more-explicit-about-allow-0rtt-security-implications.patch
deleted file mode 100644 (file)
index cd86868..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-commit aca7e5aed7e036489ccc83d925103e94653b8670
-Author: Olivier Houchard <ohouchard@haproxy.com>
-Date:   Tue Jan 8 15:35:32 2019 +0100
-
-    DOC: Be a bit more explicit about allow-0rtt security implications.
-    
-    Document a bit better than allow-0rtt can trivially be used for replay attacks,
-    and so should only be used when it's safe to replay a request.
-    
-    This should probably be backported to 1.8 and 1.9.
-    
-    (cherry picked from commit 69752964944ef9c8dc03477ee95bc7d149a72089)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit bb0df71201ad5b2d0cec514773d244275e5240df)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/doc/configuration.txt b/doc/configuration.txt
-index 712e56e2..72b769a4 100644
---- a/doc/configuration.txt
-+++ b/doc/configuration.txt
-@@ -10483,7 +10483,10 @@ accept-proxy
- allow-0rtt
-   Allow receiving early data when using TLSv1.3. This is disabled by default,
--  due to security considerations.
-+  due to security considerations. Because it is vulnerable to replay attacks,
-+  you should only allow if for requests that are safe to replay, ie requests
-+  that are idempotent. You can use the "wait-for-handshake" action for any
-+  request that wouldn't be safe with early data.
- alpn <protocols>
-   This enables the TLS ALPN extension and advertises the specified protocol
diff --git a/net/haproxy/patches/004-BUG-MEDIUM-ssl-missing-allocation-failure-checks-loading-tls-key-file.patch b/net/haproxy/patches/004-BUG-MEDIUM-ssl-missing-allocation-failure-checks-loading-tls-key-file.patch
deleted file mode 100644 (file)
index e2cea9e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-commit 30cd01cbfd40201f3abe246216a85c69352aa79c
-Author: Emeric Brun <ebrun@haproxy.com>
-Date:   Thu Jan 10 10:51:13 2019 +0100
-
-    BUG/MEDIUM: ssl: missing allocation failure checks loading tls key file
-    
-    This patch fixes missing allocation checks loading tls key file
-    and avoid memory leak in some error cases.
-    
-    This patch should be backport on branches 1.9 and 1.8
-    
-    (cherry picked from commit 09852f70e0ed0f23cf9287b1ce55bb6a60112f32)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit a1dc55a63cfbc8f440b72b6def3957bf1fad12b2)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 11655533..7884c411 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -7627,15 +7627,36 @@ static int bind_parse_tls_ticket_keys(char **args, int cur_arg, struct proxy *px
-       }
-       keys_ref = malloc(sizeof(*keys_ref));
-+      if (!keys_ref) {
-+              if (err)
-+                       memprintf(err, "'%s' : allocation error", args[cur_arg+1]);
-+              return ERR_ALERT | ERR_FATAL;
-+      }
-+
-       keys_ref->tlskeys = malloc(TLS_TICKETS_NO * sizeof(struct tls_sess_key));
-+      if (!keys_ref->tlskeys) {
-+              free(keys_ref);
-+              if (err)
-+                       memprintf(err, "'%s' : allocation error", args[cur_arg+1]);
-+              return ERR_ALERT | ERR_FATAL;
-+      }
-       if ((f = fopen(args[cur_arg + 1], "r")) == NULL) {
-+              free(keys_ref->tlskeys);
-+              free(keys_ref);
-               if (err)
-                       memprintf(err, "'%s' : unable to load ssl tickets keys file", args[cur_arg+1]);
-               return ERR_ALERT | ERR_FATAL;
-       }
-       keys_ref->filename = strdup(args[cur_arg + 1]);
-+      if (!keys_ref->filename) {
-+              free(keys_ref->tlskeys);
-+              free(keys_ref);
-+              if (err)
-+                       memprintf(err, "'%s' : allocation error", args[cur_arg+1]);
-+              return ERR_ALERT | ERR_FATAL;
-+      }
-       while (fgets(thisline, sizeof(thisline), f) != NULL) {
-               int len = strlen(thisline);
-@@ -7647,6 +7668,9 @@ static int bind_parse_tls_ticket_keys(char **args, int cur_arg, struct proxy *px
-                       thisline[--len] = 0;
-               if (base64dec(thisline, len, (char *) (keys_ref->tlskeys + i % TLS_TICKETS_NO), sizeof(struct tls_sess_key)) != sizeof(struct tls_sess_key)) {
-+                      free(keys_ref->filename);
-+                      free(keys_ref->tlskeys);
-+                      free(keys_ref);
-                       if (err)
-                               memprintf(err, "'%s' : unable to decode base64 key on line %d", args[cur_arg+1], i + 1);
-                       fclose(f);
-@@ -7656,6 +7680,9 @@ static int bind_parse_tls_ticket_keys(char **args, int cur_arg, struct proxy *px
-       }
-       if (i < TLS_TICKETS_NO) {
-+              free(keys_ref->filename);
-+              free(keys_ref->tlskeys);
-+              free(keys_ref);
-               if (err)
-                       memprintf(err, "'%s' : please supply at least %d keys in the tls-tickets-file", args[cur_arg+1], TLS_TICKETS_NO);
-               fclose(f);
diff --git a/net/haproxy/patches/004-BUG-MINOR-ssl-fix-warning-about-ssl-min-max-ver-support.patch b/net/haproxy/patches/004-BUG-MINOR-ssl-fix-warning-about-ssl-min-max-ver-support.patch
new file mode 100644 (file)
index 0000000..6c1fac8
--- /dev/null
@@ -0,0 +1,34 @@
+commit 57e2606f70fa8d26fe4b5563ba72a6c7f2a25655
+Author: Lukas Tribus <lukas@ltri.eu>
+Date:   Tue Mar 5 23:14:32 2019 +0100
+
+    BUG/MINOR: ssl: fix warning about ssl-min/max-ver support
+    
+    In 84e417d8 ("MINOR: ssl: support Openssl 1.1.1 early callback for
+    switchctx") the code was extended to also support OpenSSL 1.1.1
+    (code already supported BoringSSL). A configuration check warning
+    was updated but with the wrong logic, the #ifdef needs a && instead
+    of an ||.
+    
+    Reported in #54.
+    
+    Should be backported to 1.8.
+    
+    (cherry picked from commit 1aabc939780d5eab1f88089d01fb077ad9315c65)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+    (cherry picked from commit f407d16b8f4cf2afb148668a23a1ba1cc4dd942a)
+    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
+
+diff --git a/src/ssl_sock.c b/src/ssl_sock.c
+index 7736c324..afdb1fce 100644
+--- a/src/ssl_sock.c
++++ b/src/ssl_sock.c
+@@ -7418,7 +7418,7 @@ static int parse_tls_method_minmax(char **args, int cur_arg, struct tls_version_
+ static int ssl_bind_parse_tls_method_minmax(char **args, int cur_arg, struct proxy *px, struct ssl_bind_conf *conf, char **err)
+ {
+-#if (OPENSSL_VERSION_NUMBER < 0x10101000L) || !defined(OPENSSL_IS_BORINGSSL)
++#if (OPENSSL_VERSION_NUMBER < 0x10101000L) && !defined(OPENSSL_IS_BORINGSSL)
+       ha_warning("crt-list: ssl-min-ver and ssl-max-ver are not supported with this Openssl version (skipped).\n");
+ #endif
+       return parse_tls_method_minmax(args, cur_arg, &conf->ssl_methods, err);
diff --git a/net/haproxy/patches/005-BUG-MINOR-backend-dont-use-url_param_name-as-a-hint-for-BE_LB_ALGO_PH.patch b/net/haproxy/patches/005-BUG-MINOR-backend-dont-use-url_param_name-as-a-hint-for-BE_LB_ALGO_PH.patch
deleted file mode 100644 (file)
index 24ba55c..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-commit 98f9549fa466e3b73a04f17dbc05fd88427c72f4
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Mon Jan 14 15:17:46 2019 +0100
-
-    BUG/MINOR: backend: don't use url_param_name as a hint for BE_LB_ALGO_PH
-    
-    At a few places in the code we used to rely on this variable to guess
-    what LB algo was in place. This is wrong because if the defaults section
-    presets "balance url_param foo" and a backend uses "balance roundrobin",
-    these locations will still see this url_param_name set and consider it.
-    The harm is limited, as this only causes the beginning of the request
-    body to be buffered. And in general this is a bad practice which prevents
-    us from cleaning the lbprm stuff. Let's explicitly check the LB algo
-    instead.
-    
-    This may be backported to all currently maintained versions.
-    
-    (cherry picked from commit 089eaa0ba73913187e93d52c3ea34faa01fd8f9c)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 70d1744bb41daab4110071e4855504b6dc47bda9)
-    [wla: no htx in 1.8]
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 29a1083a..5dc562ff 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -3935,7 +3935,8 @@ int http_process_request(struct stream *s, struct channel *req, int an_bit)
-        * that parameter. This will be done in another analyser.
-        */
-       if (!(s->flags & (SF_ASSIGNED|SF_DIRECT)) &&
--          s->txn->meth == HTTP_METH_POST && s->be->url_param_name != NULL &&
-+          s->txn->meth == HTTP_METH_POST &&
-+          (s->be->lbprm.algo & BE_LB_ALGO) == BE_LB_ALGO_PH &&
-           (msg->flags & (HTTP_MSGF_CNT_LEN|HTTP_MSGF_TE_CHNK))) {
-               channel_dont_connect(req);
-               req->analysers |= AN_REQ_HTTP_BODY;
diff --git a/net/haproxy/patches/005-MEDIUM-threads-Use-__ATOMIC_SEQ_CST-when-using-the-newer-atomic-API.patch b/net/haproxy/patches/005-MEDIUM-threads-Use-__ATOMIC_SEQ_CST-when-using-the-newer-atomic-API.patch
new file mode 100644 (file)
index 0000000..4acae7d
--- /dev/null
@@ -0,0 +1,49 @@
+commit 62aec002ccd6a7129b4f5e2e88be1957a6b2308b
+Author: Olivier Houchard <ohouchard@haproxy.com>
+Date:   Thu Mar 7 18:48:22 2019 +0100
+
+    MEDIUM: threads: Use __ATOMIC_SEQ_CST when using the newer atomic API.
+    
+    When using the new __atomic* API, ask the compiler to generate barriers.
+    A variant of those functions that don't generate barriers will be added later.
+    Before that, using HA_ATOMIC* would not generate any barrier, and some parts
+    of the code should be reviewed and missing barriers should be added.
+    
+    This should probably be backported to 1.8 and 1.9.
+    
+    (cherry picked from commit 113537967c8680f94977473e18c9e14dc09c3356)
+    [wt: this is in fact a real bug fix : all these atomics do not provide
+     the slightest sequential consistency by default as the value 0 is
+     __ATOMIC_RELAXED, which will definitely cause random issues with
+     threads on non-x86 platforms].
+    Signed-off-by: Willy Tarreau <w@1wt.eu>
+    (cherry picked from commit e5d1670f5fa95972fed6391201c0da8982bb9f94)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/include/common/hathreads.h b/include/common/hathreads.h
+index 24fb1d1a..8a738aaf 100644
+--- a/include/common/hathreads.h
++++ b/include/common/hathreads.h
+@@ -213,14 +213,14 @@ static inline unsigned long thread_isolated()
+       })
+ #else
+ /* gcc >= 4.7 */
+-#define HA_ATOMIC_CAS(val, old, new) __atomic_compare_exchange_n(val, old, new, 0, 0, 0)
+-#define HA_ATOMIC_ADD(val, i)        __atomic_add_fetch(val, i, 0)
+-#define HA_ATOMIC_XADD(val, i)       __atomic_fetch_add(val, i, 0)
+-#define HA_ATOMIC_SUB(val, i)        __atomic_sub_fetch(val, i, 0)
+-#define HA_ATOMIC_AND(val, flags)    __atomic_and_fetch(val, flags, 0)
+-#define HA_ATOMIC_OR(val, flags)     __atomic_or_fetch(val,  flags, 0)
+-#define HA_ATOMIC_XCHG(val, new)     __atomic_exchange_n(val, new, 0)
+-#define HA_ATOMIC_STORE(val, new)    __atomic_store_n(val, new, 0)
++#define HA_ATOMIC_CAS(val, old, new) __atomic_compare_exchange_n(val, old, new, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_ADD(val, i)        __atomic_add_fetch(val, i, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_XADD(val, i)       __atomic_fetch_add(val, i, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_SUB(val, i)        __atomic_sub_fetch(val, i, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_AND(val, flags)    __atomic_and_fetch(val, flags, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_OR(val, flags)     __atomic_or_fetch(val,  flags, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_XCHG(val, new)     __atomic_exchange_n(val, new, __ATOMIC_SEQ_CST)
++#define HA_ATOMIC_STORE(val, new)    __atomic_store_n(val, new, __ATOMIC_SEQ_CST)
+ #endif
+ #define HA_ATOMIC_UPDATE_MAX(val, new)                                        \
diff --git a/net/haproxy/patches/006-BUG-MEDIUM-threads-fd-do-not-forget-to-take-into-account-epoll_fd-pipes.patch b/net/haproxy/patches/006-BUG-MEDIUM-threads-fd-do-not-forget-to-take-into-account-epoll_fd-pipes.patch
new file mode 100644 (file)
index 0000000..68cd98a
--- /dev/null
@@ -0,0 +1,34 @@
+commit 1dfa4fd4be313a87f2a4861e81d0ad8ea8214223
+Author: Willy Tarreau <w@1wt.eu>
+Date:   Thu Mar 14 19:10:55 2019 +0100
+
+    BUG/MEDIUM: threads/fd: do not forget to take into account epoll_fd/pipes
+    
+    Each thread uses one epoll_fd or kqueue_fd, and a pipe (thus two FDs).
+    These ones have to be accounted for in the maxsock calculation, otherwise
+    we can reach maxsock before maxconn. This is difficult to observe but it
+    in fact happens when a server connects back to the frontend and has checks
+    enabled : the check uses its FD and serves to fill the loop. In this case
+    all FDs planed for the datapath are used for this.
+    
+    This needs to be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit 2c58b41c96e70f567d0f9ae876a80770630c06ee)
+    Signed-off-by: Willy Tarreau <w@1wt.eu>
+    (cherry picked from commit 26d110ba04cba02b337beff53a83847320e4fcdb)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/haproxy.c b/src/haproxy.c
+index 68367627..5c3febdd 100644
+--- a/src/haproxy.c
++++ b/src/haproxy.c
+@@ -1828,6 +1828,9 @@ static void init(int argc, char **argv)
+       global.hardmaxconn = global.maxconn;  /* keep this max value */
+       global.maxsock += global.maxconn * 2; /* each connection needs two sockets */
+       global.maxsock += global.maxpipes * 2; /* each pipe needs two FDs */
++      global.maxsock += global.nbthread;     /* one epoll_fd/kqueue_fd per thread */
++      global.maxsock += 2 * global.nbthread; /* one wake-up pipe (2 fd) per thread */
++
+       /* compute fd used by async engines */
+       if (global.ssl_used_async_engines) {
+               int sides = !!global.ssl_used_frontend + !!global.ssl_used_backend;
diff --git a/net/haproxy/patches/006-BUG-MINOR-backend-balance-uri-specific-options-were-lost-across-defaults.patch b/net/haproxy/patches/006-BUG-MINOR-backend-balance-uri-specific-options-were-lost-across-defaults.patch
deleted file mode 100644 (file)
index 022998d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-commit a5027f804144536f79829443b33e6c19c32b690a
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Mon Jan 14 16:29:52 2019 +0100
-
-    BUG/MINOR: backend: balance uri specific options were lost across defaults
-    
-    The "balance uri" options "whole", "len" and "depth" were not properly
-    inherited from the defaults sections. In addition, "whole" and "len"
-    were not even reset when parsing "uri", meaning that 2 subsequent
-    "balance uri" statements would not have the expected effect as the
-    options from the first one would remain for the second one.
-    
-    This may be backported to all maintained versions.
-    
-    (cherry picked from commit 602a499da5e81d6b4cfe8410f0fc6d53c1e06745)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit f00758fde5961e3bebc508852faeee4d9d80b0e0)
-    [wla: cfg_parse_listen() is still in cfgparse.c in 1.8]
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/backend.c b/src/backend.c
-index 87327f19..4c4044a6 100644
---- a/src/backend.c
-+++ b/src/backend.c
-@@ -1516,6 +1516,8 @@ int backend_parse_balance(const char **args, char **err, struct proxy *curproxy)
-               curproxy->lbprm.algo |= BE_LB_ALGO_UH;
-               curproxy->uri_whole = 0;
-+              curproxy->uri_len_limit = 0;
-+              curproxy->uri_dirs_depth1 = 0;
-               while (*args[arg]) {
-                       if (!strcmp(args[arg], "len")) {
-diff --git a/src/cfgparse.c b/src/cfgparse.c
-index 94f29637..91bb802e 100644
---- a/src/cfgparse.c
-+++ b/src/cfgparse.c
-@@ -2844,7 +2844,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
-                       if (defproxy.url_param_name)
-                               curproxy->url_param_name = strdup(defproxy.url_param_name);
--                      curproxy->url_param_len = defproxy.url_param_len;
-+                      curproxy->url_param_len   = defproxy.url_param_len;
-+                      curproxy->uri_whole       = defproxy.uri_whole;
-+                      curproxy->uri_len_limit   = defproxy.uri_len_limit;
-+                      curproxy->uri_dirs_depth1 = defproxy.uri_dirs_depth1;
-                       if (defproxy.hh_name)
-                               curproxy->hh_name = strdup(defproxy.hh_name);
diff --git a/net/haproxy/patches/007-BUG-MAJOR-spoe-Fix-initialization-of-thread-dependent-fields.patch b/net/haproxy/patches/007-BUG-MAJOR-spoe-Fix-initialization-of-thread-dependent-fields.patch
new file mode 100644 (file)
index 0000000..f4d448c
--- /dev/null
@@ -0,0 +1,54 @@
+commit a3cfe8f4bc2ec98fdbe25c49f2c21699b6d09d2b
+Author: Christopher Faulet <cfaulet@haproxy.com>
+Date:   Mon Mar 18 13:57:42 2019 +0100
+
+    BUG/MAJOR: spoe: Fix initialization of thread-dependent fields
+    
+    A bug was introduced in the commit b0769b ("BUG/MEDIUM: spoe: initialization
+    depending on nbthread must be done last"). The code depending on global.nbthread
+    was moved from cfg_parse_spoe_agent() to spoe_check() but the pointer on the
+    agent configuration was not updated to use the filter's one. The variable
+    curagent is a global variable only valid during the configuration parsing. In
+    spoe_check(), conf->agent must be used instead.
+    
+    This patch must be backported to 1.9 and 1.8.
+    
+    (cherry picked from commit fe261551b9980fe33990eb34d2153bf1de24b20f)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+    (cherry picked from commit 7a93d271d549144a8ed8c816f5694a51ab62b90c)
+    Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
+
+diff --git a/src/flt_spoe.c b/src/flt_spoe.c
+index e4453882..66d26f34 100644
+--- a/src/flt_spoe.c
++++ b/src/flt_spoe.c
+@@ -2937,20 +2937,20 @@ spoe_check(struct proxy *px, struct flt_conf *fconf)
+       if (global.nbthread == 1)
+               conf->agent->flags |= SPOE_FL_ASYNC;
+-      if ((curagent->rt = calloc(global.nbthread, sizeof(*curagent->rt))) == NULL) {
++      if ((conf->agent->rt = calloc(global.nbthread, sizeof(*conf->agent->rt))) == NULL) {
+               ha_alert("Proxy %s : out of memory initializing SPOE agent '%s' declared at %s:%d.\n",
+                        px->id, conf->agent->id, conf->agent->conf.file, conf->agent->conf.line);
+               return 1;
+       }
+       for (i = 0; i < global.nbthread; ++i) {
+-              curagent->rt[i].frame_size   = curagent->max_frame_size;
+-              curagent->rt[i].applets_act  = 0;
+-              curagent->rt[i].applets_idle = 0;
+-              curagent->rt[i].sending_rate = 0;
+-              LIST_INIT(&curagent->rt[i].applets);
+-              LIST_INIT(&curagent->rt[i].sending_queue);
+-              LIST_INIT(&curagent->rt[i].waiting_queue);
+-              HA_SPIN_INIT(&curagent->rt[i].lock);
++              conf->agent->rt[i].frame_size   = conf->agent->max_frame_size;
++              conf->agent->rt[i].applets_act  = 0;
++              conf->agent->rt[i].applets_idle = 0;
++              conf->agent->rt[i].sending_rate = 0;
++              LIST_INIT(&conf->agent->rt[i].applets);
++              LIST_INIT(&conf->agent->rt[i].sending_queue);
++              LIST_INIT(&conf->agent->rt[i].waiting_queue);
++              HA_SPIN_INIT(&conf->agent->rt[i].lock);
+       }
+       free(conf->agent->b.name);
diff --git a/net/haproxy/patches/007-BUG-MINOR-backend-BE_LB_LKUP_CHTREE-is-a-value-not-a-bit.patch b/net/haproxy/patches/007-BUG-MINOR-backend-BE_LB_LKUP_CHTREE-is-a-value-not-a-bit.patch
deleted file mode 100644 (file)
index 96c83d0..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-commit 7c6a6149a91d2e240a5a63f981c5d07d681df725
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Mon Jan 14 17:07:39 2019 +0100
-
-    BUG/MINOR: backend: BE_LB_LKUP_CHTREE is a value, not a bit
-    
-    There are a few instances where the lookup algo is tested against
-    BE_LB_LKUP_CHTREE using a binary "AND" operation while this macro
-    is a value among a set, and not a bit. The test happens to work
-    because the value is exactly 4 and no bit overlaps with the other
-    possible values but this is a latent bug waiting for a new LB algo
-    to appear to strike. At the moment the only other algo sharing a bit
-    with it is the "first" algo which is never supported in the same code
-    places.
-    
-    This fix should be backported to maintained versions for safety if it
-    passes easily, otherwise it's not important as it will not fix any
-    visible issue.
-    
-    (cherry picked from commit 6c30be52da3d949a8dd6fb5e2de7319c031e656e)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 48147c424680b7e887fb176662d58d87baa16098)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/backend.c b/src/backend.c
-index 4c4044a6..0cf14cfd 100644
---- a/src/backend.c
-+++ b/src/backend.c
-@@ -183,7 +183,7 @@ static struct server *get_server_sh(struct proxy *px, const char *addr, int len,
-       if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
-               h = full_hash(h);
-  hash_done:
--      if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+      if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-               return chash_get_server_hash(px, h, avoid);
-       else
-               return map_get_server_hash(px, h);
-@@ -236,7 +236,7 @@ static struct server *get_server_uh(struct proxy *px, char *uri, int uri_len, co
-       if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
-               hash = full_hash(hash);
-  hash_done:
--      if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+      if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-               return chash_get_server_hash(px, hash, avoid);
-       else
-               return map_get_server_hash(px, hash);
-@@ -293,7 +293,7 @@ static struct server *get_server_ph(struct proxy *px, const char *uri, int uri_l
-                               if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
-                                       hash = full_hash(hash);
--                              if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+                              if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-                                       return chash_get_server_hash(px, hash, avoid);
-                               else
-                                       return map_get_server_hash(px, hash);
-@@ -367,7 +367,7 @@ static struct server *get_server_ph_post(struct stream *s, const struct server *
-                               if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
-                                       hash = full_hash(hash);
--                              if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+                              if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-                                       return chash_get_server_hash(px, hash, avoid);
-                               else
-                                       return map_get_server_hash(px, hash);
-@@ -463,7 +463,7 @@ static struct server *get_server_hh(struct stream *s, const struct server *avoid
-       if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
-               hash = full_hash(hash);
-  hash_done:
--      if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+      if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-               return chash_get_server_hash(px, hash, avoid);
-       else
-               return map_get_server_hash(px, hash);
-@@ -507,7 +507,7 @@ static struct server *get_server_rch(struct stream *s, const struct server *avoi
-       if ((px->lbprm.algo & BE_LB_HASH_MOD) == BE_LB_HMOD_AVAL)
-               hash = full_hash(hash);
-  hash_done:
--      if (px->lbprm.algo & BE_LB_LKUP_CHTREE)
-+      if ((px->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-               return chash_get_server_hash(px, hash, avoid);
-       else
-               return map_get_server_hash(px, hash);
-@@ -615,7 +615,7 @@ int assign_server(struct stream *s)
-               case BE_LB_LKUP_CHTREE:
-               case BE_LB_LKUP_MAP:
-                       if ((s->be->lbprm.algo & BE_LB_KIND) == BE_LB_KIND_RR) {
--                              if (s->be->lbprm.algo & BE_LB_LKUP_CHTREE)
-+                              if ((s->be->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-                                       srv = chash_get_next_server(s->be, prev_srv);
-                               else
-                                       srv = map_get_server_rr(s->be, prev_srv);
-@@ -691,7 +691,7 @@ int assign_server(struct stream *s)
-                        * back to round robin on the map.
-                        */
-                       if (!srv) {
--                              if (s->be->lbprm.algo & BE_LB_LKUP_CHTREE)
-+                              if ((s->be->lbprm.algo & BE_LB_LKUP) == BE_LB_LKUP_CHTREE)
-                                       srv = chash_get_next_server(s->be, prev_srv);
-                               else
-                                       srv = map_get_server_rr(s->be, prev_srv);
diff --git a/net/haproxy/patches/008-BUG-MINOR-stick_table-Prevent-conn_cur-from-underflowing.patch b/net/haproxy/patches/008-BUG-MINOR-stick_table-Prevent-conn_cur-from-underflowing.patch
deleted file mode 100644 (file)
index 4e0d014..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-commit 93b3994091b5bd17b43c9d91ecae470d33157e25
-Author: Tim Duesterhus <tim@bastelstu.be>
-Date:   Fri Jan 4 00:11:59 2019 +0100
-
-    BUG/MINOR: stick_table: Prevent conn_cur from underflowing
-    
-    When using the peers feature a race condition could prevent
-    a connection from being properly counted. When this connection
-    exits it is being "uncounted" nonetheless, leading to a possible
-    underflow (-1) of the conn_curr stick table entry in the following
-    scenario :
-    
-      - Connect to peer A     (A=1, B=0)
-      - Peer A sends 1 to B   (A=1, B=1)
-      - Kill connection to A  (A=0, B=1)
-      - Connect to peer B     (A=0, B=2)
-      - Peer A sends 0 to B   (A=0, B=0)
-      - Peer B sends 0/2 to A (A=?, B=0)
-      - Kill connection to B  (A=?, B=-1)
-      - Peer B sends -1 to A  (A=-1, B=-1)
-    
-    This fix may be backported to all supported branches.
-    
-    (cherry picked from commit 8b87c01c4d59247d9fb51a38cd12d5d94324b6a4)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 4ceecc8a4ee6f46f20c7729056e14af5a8757121)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/include/proto/session.h b/include/proto/session.h
-index f48c0d4f..7265f5a7 100644
---- a/include/proto/session.h
-+++ b/include/proto/session.h
-@@ -59,7 +59,8 @@ static inline void session_store_counters(struct session *sess)
-               if (ptr) {
-                       HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock);
--                      stktable_data_cast(ptr, conn_cur)--;
-+                      if (stktable_data_cast(ptr, conn_cur) > 0)
-+                              stktable_data_cast(ptr, conn_cur)--;
-                       HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
-diff --git a/include/proto/stream.h b/include/proto/stream.h
-index 8521957e..c9bcac37 100644
---- a/include/proto/stream.h
-+++ b/include/proto/stream.h
-@@ -104,7 +104,8 @@ static inline void stream_store_counters(struct stream *s)
-               if (ptr) {
-                       HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock);
--                      stktable_data_cast(ptr, conn_cur)--;
-+                      if (stktable_data_cast(ptr, conn_cur) > 0)
-+                              stktable_data_cast(ptr, conn_cur)--;
-                       HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
-@@ -142,7 +143,8 @@ static inline void stream_stop_content_counters(struct stream *s)
-               if (ptr) {
-                       HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock);
--                      stktable_data_cast(ptr, conn_cur)--;
-+                      if (stktable_data_cast(ptr, conn_cur) > 0)
-+                              stktable_data_cast(ptr, conn_cur)--;
-                       HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock);
diff --git a/net/haproxy/patches/008-deprecated-openssl.patch b/net/haproxy/patches/008-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
+ }
diff --git a/net/haproxy/patches/009-BUG-MINOR-server-dont-always-trust-srv_check_health-when-loading-a-server-state.patch b/net/haproxy/patches/009-BUG-MINOR-server-dont-always-trust-srv_check_health-when-loading-a-server-state.patch
deleted file mode 100644 (file)
index f3de085..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-commit 1c95076d881b7508a8d0819b1cfd642e364b255c
-Author: Jérôme Magnin <jmagnin@haproxy.com>
-Date:   Sun Jan 20 11:27:40 2019 +0100
-
-    BUG/MINOR: server: don't always trust srv_check_health when loading a server state
-    
-    When we load health values from a server state file, make sure what we assign
-    to srv->check.health actually matches the state we restore.
-    
-    This should be backported as far as 1.6.
-    
-    (cherry picked from commit f57afa453a685cfd92b7a27ef6e6035cb384ff57)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 75455a0b78ce4ac723698df26c014b38467843b1)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/server.c b/src/server.c
-index a86db3db..28414780 100644
---- a/src/server.c
-+++ b/src/server.c
-@@ -2843,16 +2843,37 @@ static void srv_update_state(struct server *srv, int version, char **params)
-                       HA_SPIN_LOCK(SERVER_LOCK, &srv->lock);
-                       /* recover operational state and apply it to this server
-                        * and all servers tracking this one */
-+                      srv->check.health = srv_check_health;
-                       switch (srv_op_state) {
-                               case SRV_ST_STOPPED:
-                                       srv->check.health = 0;
-                                       srv_set_stopped(srv, "changed from server-state after a reload", NULL);
-                                       break;
-                               case SRV_ST_STARTING:
-+                                      /* If rise == 1 there is no STARTING state, let's switch to
-+                                       * RUNNING
-+                                       */
-+                                      if (srv->check.rise == 1) {
-+                                              srv->check.health = srv->check.rise + srv->check.fall - 1;
-+                                              srv_set_running(srv, "", NULL);
-+                                              break;
-+                                      }
-+                                      if (srv->check.health < 1 || srv->check.health >= srv->check.rise)
-+                                              srv->check.health = srv->check.rise - 1;
-                                       srv->next_state = srv_op_state;
-                                       break;
-                               case SRV_ST_STOPPING:
--                                      srv->check.health = srv->check.rise + srv->check.fall - 1;
-+                                      /* If fall == 1 there is no STOPPING state, let's switch to
-+                                       * STOPPED
-+                                       */
-+                                      if (srv->check.fall == 1) {
-+                                              srv->check.health = 0;
-+                                              srv_set_stopped(srv, "changed from server-state after a reload", NULL);
-+                                              break;
-+                                      }
-+                                      if (srv->check.health < srv->check.rise ||
-+                                          srv->check.health > srv->check.rise + srv->check.fall - 2)
-+                                              srv->check.health = srv->check.rise;
-                                       srv_set_stopping(srv, "changed from server-state after a reload", NULL);
-                                       break;
-                               case SRV_ST_RUNNING:
-@@ -2906,7 +2927,6 @@ static void srv_update_state(struct server *srv, int version, char **params)
-                       srv->last_change = date.tv_sec - srv_last_time_change;
-                       srv->check.status = srv_check_status;
-                       srv->check.result = srv_check_result;
--                      srv->check.health = srv_check_health;
-                       /* Only case we want to apply is removing ENABLED flag which could have been
-                        * done by the "disable health" command over the stats socket
diff --git a/net/haproxy/patches/010-BUG-MINOR-check-Wake-the-check-task-if-the-check-is-finished-in-wake_srv_chk.patch b/net/haproxy/patches/010-BUG-MINOR-check-Wake-the-check-task-if-the-check-is-finished-in-wake_srv_chk.patch
deleted file mode 100644 (file)
index a4eb897..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-commit 7a74ffef9f356304b46ab862858cead85d451b5f
-Author: Christopher Faulet <cfaulet@haproxy.com>
-Date:   Mon Jan 21 14:15:50 2019 +0100
-
-    BUG/MINOR: check: Wake the check task if the check is finished in wake_srv_chk()
-    
-    With tcp-check, the result of the check is set by the function tcpcheck_main()
-    from the I/O layer. So it is important to wake up the check task to handle the
-    result and finish the check. Otherwise, we will wait the task timeout to handle
-    the result of a tcp-check, delaying the next check by as much.
-    
-    This patch also fixes a problem about email alerts reported by PiBa-NL (Pieter)
-    on the ML [1] on all versions since the 1.6. So this patch must be backported
-    from 1.9 to 1.6.
-    
-    [1] https://www.mail-archive.com/haproxy@formilux.org/msg32190.html
-    
-    (cherry picked from commit 774c486cece942570b6a9d16afe236a16ee12079)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 3722dfbbfadf8f83f82feb3e67fbe482a5c94840)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/checks.c b/src/checks.c
-index 74958b2d..e04f1146 100644
---- a/src/checks.c
-+++ b/src/checks.c
-@@ -1403,12 +1403,13 @@ static int wake_srv_chk(struct conn_stream *cs)
-       }
-       if (check->result != CHK_RES_UNKNOWN) {
--              /* We're here because nobody wants to handle the error, so we
--               * sure want to abort the hard way.
--               */
-+              /* Check complete or aborted. If connection not yet closed do it
-+               * now and wake the check task up to be sure the result is
-+               * handled ASAP. */
-               conn_sock_drain(conn);
-               cs_close(cs);
-               ret = -1;
-+              task_wakeup(check->task, TASK_WOKEN_IO);
-       }
-       HA_SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
diff --git a/net/haproxy/patches/011-BUG-MEDIUM-ssl-Fix-handling-of-TLS-1-3-KeyUpdate-messages.patch b/net/haproxy/patches/011-BUG-MEDIUM-ssl-Fix-handling-of-TLS-1-3-KeyUpdate-messages.patch
deleted file mode 100644 (file)
index 6d99778..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-commit b68a427a236e7b9b0cf8b1c4a5360d960cdf9458
-Author: Dirkjan Bussink <d.bussink@gmail.com>
-Date:   Mon Jan 21 09:35:03 2019 -0800
-
-    BUG/MEDIUM: ssl: Fix handling of TLS 1.3 KeyUpdate messages
-    
-    In OpenSSL 1.1.1 TLS 1.3 KeyUpdate messages will trigger the callback
-    that is used to verify renegotiation is disabled. This means that these
-    KeyUpdate messages fail. In OpenSSL 1.1.1 a better mechanism is
-    available with the SSL_OP_NO_RENEGOTIATION flag that disables any TLS
-    1.2 and earlier negotiation.
-    
-    So if this SSL_OP_NO_RENEGOTIATION flag is available, instead of having
-    a manual check, trust OpenSSL and disable the check. This means that TLS
-    1.3 KeyUpdate messages will work properly.
-    
-    Reported-By: Adam Langley <agl@imperialviolet.org>
-    (cherry picked from commit 526894ff3925d272c13e57926aa6b5d9d8ed5ee3)
-    [wt: gh issue #24; Needs to be backported till 1.8]
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 062c5a190d50c4aa9c5bde88c8c5c85c5f15fc7b)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/src/ssl_sock.c b/src/ssl_sock.c
-index 7884c411..7736c324 100644
---- a/src/ssl_sock.c
-+++ b/src/ssl_sock.c
-@@ -1406,6 +1406,10 @@ void ssl_sock_infocbk(const SSL *ssl, int where, int ret)
-       BIO *write_bio;
-       (void)ret; /* shut gcc stupid warning */
-+#ifndef SSL_OP_NO_RENEGOTIATION
-+      /* Please note that BoringSSL defines this macro to zero so don't
-+       * change this to #if and do not assign a default value to this macro!
-+       */
-       if (where & SSL_CB_HANDSHAKE_START) {
-               /* Disable renegotiation (CVE-2009-3555) */
-               if ((conn->flags & (CO_FL_CONNECTED | CO_FL_EARLY_SSL_HS | CO_FL_EARLY_DATA)) == CO_FL_CONNECTED) {
-@@ -1413,6 +1417,7 @@ void ssl_sock_infocbk(const SSL *ssl, int where, int ret)
-                       conn->err_code = CO_ER_SSL_RENEG;
-               }
-       }
-+#endif
-       if ((where & SSL_CB_ACCEPT_LOOP) == SSL_CB_ACCEPT_LOOP) {
-               if (!(conn->xprt_st & SSL_SOCK_ST_FL_16K_WBFSIZE)) {
-@@ -3806,6 +3811,11 @@ ssl_sock_initial_ctx(struct bind_conf *bind_conf)
-               options |= SSL_OP_NO_TICKET;
-       if (bind_conf->ssl_options & BC_SSL_O_PREF_CLIE_CIPH)
-               options &= ~SSL_OP_CIPHER_SERVER_PREFERENCE;
-+
-+#ifdef SSL_OP_NO_RENEGOTIATION
-+      options |= SSL_OP_NO_RENEGOTIATION;
-+#endif
-+
-       SSL_CTX_set_options(ctx, options);
- #if (OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(OPENSSL_NO_ASYNC)
diff --git a/net/haproxy/patches/012-DOC-mention-the-effect-of-nf_conntrack_tcp_loose-on-src-dst.patch b/net/haproxy/patches/012-DOC-mention-the-effect-of-nf_conntrack_tcp_loose-on-src-dst.patch
deleted file mode 100644 (file)
index 9e8bd45..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 2e405726a0c6be6617905522bde9038f75e623c4
-Author: Willy Tarreau <w@1wt.eu>
-Date:   Wed Jan 23 10:02:15 2019 +0100
-
-    DOC: mention the effect of nf_conntrack_tcp_loose on src/dst
-    
-    On rare occasions the logs may report inverted src/dst when using
-    conntrack with this sysctl. Add a mention for it in the doc. More
-    info here :
-    
-         https://www.spinics.net/lists/netdev/msg544878.html
-    
-    (cherry picked from commit 64ded3db2c686bad582cf9bb9fcabf21cb4becb7)
-    Signed-off-by: Willy Tarreau <w@1wt.eu>
-    (cherry picked from commit 037f9ac4a2cc4b344859af1cff7b30d5ecabe9e0)
-    Signed-off-by: William Lallemand <wlallemand@haproxy.org>
-
-diff --git a/doc/configuration.txt b/doc/configuration.txt
-index 72b769a4..bc8ae4f8 100644
---- a/doc/configuration.txt
-+++ b/doc/configuration.txt
-@@ -13822,7 +13822,12 @@ dst : ip
-   which is the address the client connected to. It can be useful when running
-   in transparent mode. It is of type IP and works on both IPv4 and IPv6 tables.
-   On IPv6 tables, IPv4 address is mapped to its IPv6 equivalent, according to
--  RFC 4291.
-+  RFC 4291. When the incoming connection passed through address translation or
-+  redirection involving connection tracking, the original destination address
-+  before the redirection will be reported. On Linux systems, the source and
-+  destination may seldom appear reversed if the nf_conntrack_tcp_loose sysctl
-+  is set, because a late response may reopen a timed out connection and switch
-+  what is believed to be the source and the destination.
- dst_conn : integer
-   Returns an integer value corresponding to the number of currently established
-@@ -14127,7 +14132,13 @@ src : ip
-   behind a proxy. However if the "accept-proxy" or "accept-netscaler-cip" bind
-   directive is used, it can be the address of a client behind another
-   PROXY-protocol compatible component for all rule sets except
--  "tcp-request connection" which sees the real address.
-+  "tcp-request connection" which sees the real address. When the incoming
-+  connection passed through address translation or redirection involving
-+  connection tracking, the original destination address before the redirection
-+  will be reported. On Linux systems, the source and destination may seldom
-+  appear reversed if the nf_conntrack_tcp_loose sysctl is set, because a late
-+  response may reopen a timed out connection and switch what is believed to be
-+  the source and the destination.
-   Example:
-        # add an HTTP header in requests with the originating address' country
diff --git a/net/haproxy/patches/013-deprecated-openssl.patch b/net/haproxy/patches/013-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
- }
index b1b396839a6eb5e0a05744d6ed6299d4b1008a1d..c2e484cec836f434ffed1b753e96e506b5a1b197 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=i2pd
-PKG_VERSION:=2.22.0
+PKG_VERSION:=2.23.0
 PKG_RELEASE:=1
 PKG_BUILD_PARALLEL:=1
 
 PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=6547d7a560482c5eda9106ae19267bc8afbb6af48fed3bebf423ade28103e173
+PKG_HASH:=19e8573b44b94ce83bd5705569934049cb1dc39db11449abcb9e4b36afe5a279
 PKG_LICENSE:=BSD-3-clause
 
 include $(INCLUDE_DIR)/package.mk
@@ -38,8 +38,8 @@ define Package/i2pd/description
 endef
 
 define Package/i2pd/conffiles
+       /etc/config/i2pd
        /etc/i2pd/i2pd.conf
-       /etc/i2pd/subscriptions.txt
        /etc/i2pd/tunnels.conf
 endef
 
@@ -51,14 +51,15 @@ define Package/i2pd/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
        $(INSTALL_DIR) $(1)/usr/share/i2pd
        $(CP) $(PKG_BUILD_DIR)/contrib/certificates  $(1)/usr/share/i2pd
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/i2pd.config $(1)/etc/config/i2pd
        $(INSTALL_DIR) $(1)/etc/i2pd
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
        $(SED) ' \
                s/127.0.0.1/192.168.1.1/g; \
                s/datadir = \/var\/lib/datadir = \/etc/ \
        ' $(1)/etc/i2pd/i2pd.conf
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
 endef
diff --git a/net/i2pd/files/i2pd.config b/net/i2pd/files/i2pd.config
new file mode 100644 (file)
index 0000000..ca6f3c7
--- /dev/null
@@ -0,0 +1,15 @@
+config i2pd
+       # Set where i2pd should store its data (netDB, certificates, addresses, etc)
+       # By default we store it in RAM so no data is written to ROM.
+       # IMPORTANT!
+       # Data is consistently rewritten. DO NOT POINT IT TO INNER ROM. Flash will
+       # die.
+       option data_dir '/var/lib/i2pd'
+
+       # If you don't store i2pd data permanently, you can still choose to store only
+       # addressbook. If not, i2pd will be forced to do HTTP reseeding reseeding on
+       # every start. Storing addressbook may be useful if HTTP reseeding is not
+       # possible or blocked (by censorship).
+       # Even addressbook doesn't take up too much space, extroot is still strongly
+       # recommended to avoid flash wear-out.
+       #option addressbook_dir '/etc/i2pd/addressbook'
index 81e97cdce53eadce7b137152649f8c2efd3a7470..4af1013637478dd1617e9ac0a1d02b54c48a4bb0 100755 (executable)
@@ -6,36 +6,54 @@ USE_PROCD=1
 START=90
 STOP=10
 
+# default params
 PROG=/usr/sbin/i2pd
 USER="i2pd"
 GROUP="i2pd"
 PIDFILE=/var/run/i2pd.pid
-DATADIR=/var/lib/i2pd
+#DATADIR=/var/lib/i2pd
+CONFFILE=/etc/i2pd/i2pd.conf
+
+. /lib/functions.sh
+
 
 
 start_service() {
-       ## RAM
-       if [ ! -d $DATADIR ]; then
-               mkdir -p $DATADIR
-               ln -s /usr/share/i2pd/certificates  $DATADIR/certificates
-               ln -s /etc/i2pd/tunnels.conf $DATADIR/tunnels.conf
-               # for peoples who not possible to use http reseeding
-               ln -s /etc/i2pd/addressbook $DATADIR/addressbook
+       local data_dir
+       local addressbook_dir
+
+       config_load i2pd
+
+       config_get data_dir i2pd data_dir
+       config_get addressbook_dir i2pd addressbook_dir
+
+       ## Setting up data dir
+       if [ ! -d "$data_dir" ]; then
+               mkdir -p "$data_dir"
+               ln -s /usr/share/i2pd/certificates "$data_dir/certificates"
+               ln -s /etc/i2pd/tunnels.conf "$data_dir/tunnels.conf"
+               if [ -n "$addressbook_dir" ]; then
+                       if [ ! -d "$addressbook_dir" ]; then
+                               mkdir -p "$addressbook_dir"
+                       fi
+                       ln -s "$addressbook_dir" "$data_dir/addressbook"
+               fi
        fi
 
        ## We need permissions
-       chown $USER:$GROUP $DATADIR
-       touch $PIDFILE
-       chown $USER:adm $PIDFILE
+       chown "$USER:$GROUP" "$data_dir"
+       chown "$USER:$GROUP" "$addressbook_dir"
+       touch "$PIDFILE"
+       chown "$USER:adm" "$PIDFILE"
 
        procd_open_instance
-       procd_set_param command $PROG --service --conf=/etc/i2pd/i2pd.conf --pidfile $PIDFILE
+       procd_set_param command "$PROG" --service --conf="$CONFFILE" --pidfile "$PIDFILE"
        ## Don't know about i2pd user's HOME
-       procd_set_param env HOME=$DATADIR
+       procd_set_param env "HOME=$DATADIR"
        procd_set_param limits nofile=4096
        procd_set_param stdout 1
        procd_set_param stderr 1
-       procd_set_param user $USER
-       procd_set_param pidfile $PIDFILE
+       procd_set_param user "$USER"
+       procd_set_param pidfile "$PIDFILE"
        procd_close_instance
 }
index f31adbd9c3bb93381bbf68af211cfb9aac12f5d2..9158831ce6379c1f48119b08d3513fa18b2e1a71 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iotivity
 PKG_VERSION:=1.2.1
-PKG_RELEASE=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
 PKG_SOURCE_URL:=http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
diff --git a/net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch b/net/iotivity/patches/300-resource-Include-functional-header-for-g-7.1.0.patch
new file mode 100644 (file)
index 0000000..13102ce
--- /dev/null
@@ -0,0 +1,58 @@
+From 26c2798188497da22e0a70efebc47991dd755db2 Mon Sep 17 00:00:00 2001
+From: Philippe Coval <philippe.coval@osg.samsung.com>
+Date: Wed, 28 Jun 2017 04:54:05 +0200
+Subject: [PATCH] resource: Include functional header for g++-7.1.0
+
+It was tested on yocto poky master on iotivity-1.2.1 (and later):
+
+  resource/include/OCUtilities.h: \
+  In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)':
+  resource/include/OCUtilities.h:85:21: \
+  error: 'bind' is not a member of 'std'
+  return std::bind(fn, p, std::ref(params)...)();
+
+  resource/include/OCApi.h: At global scope:
+  resource/include/OCApi.h:362:18: \
+  error: 'function' in namespace 'std' does not name a template type
+  typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback;
+
+Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396
+Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/
+Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
+Reviewed-on: https://gerrit.iotivity.org/gerrit/21067
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+Tested-by: jenkins-iotivity <jenkins@iotivity.org>
+---
+ resource/include/OCApi.h       | 2 --
+ resource/include/OCUtilities.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/resource/include/OCApi.h b/resource/include/OCApi.h
+index 4e14f29cc..af9721554 100644
+--- a/resource/include/OCApi.h
++++ b/resource/include/OCApi.h
+@@ -27,9 +27,7 @@
+ #include <map>
+ #include <memory>
+ #include <iterator>
+-#if defined(_MSC_VER)
+ #include <functional>
+-#endif
+ #include "octypes.h"
+ #include "OCHeaderOption.h"
+diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h
+index 85039d0c1..f1c93045f 100644
+--- a/resource/include/OCUtilities.h
++++ b/resource/include/OCUtilities.h
+@@ -26,6 +26,7 @@
+ #include <memory>
+ #include <utility>
+ #include <exception>
++#include <functional>
+ #include <OCException.h>
+ #include <StringConstants.h>
+-- 
+2.17.1
+
index 746ddff18c15dd11a9654921da3d7e3c1b45d1b5..20c3324651d95bda445d10fd6e40533aade11d3b 100644 (file)
@@ -8,19 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irssi
-PKG_VERSION:=1.1.2
-PKG_RELEASE:=1
+PKG_VERSION:=1.2.0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.1.2/
-PKG_HASH:=5ccc2b89a394e91bea0aa83a951c3b1d471c76da87b4169ec435530a31bf9732
+PKG_SOURCE_URL:=https://github.com/irssi/irssi/releases/download/1.2.0/
+PKG_HASH:=1643fca1d8b35e5a5d7b715c9c889e1e9cdb7e578e06487901ea959e6ab3ebe5
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-
 PKG_CPE_ID:=cpe:/a:irssi:irssi
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -40,16 +40,14 @@ define Package/irssi/description
        Irssi is a terminal based IRC client for UNIX systems.
 endef
 
+TARGET_LDFLAGS += -Wl,--gc-sections
+
 CONFIGURE_ARGS += \
-       --with-perl=no \
-       --with-glib-prefix="$(STAGING_DIR)/usr" \
-       --with-ssl="$(STAGING_DIR)/usr" \
+       --disable-glibtest \
        --with-textui \
        --without-bot \
-       --disable-proxy
-
-EXTRA_CFLAGS+=$(TARGET_CPPFLAGS)
-EXTRA_LDFLAGS+=-lncurses
+       --without-perl \
+       --without-proxy
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/irssi
diff --git a/net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch b/net/irssi/patches/010-Fix-finding-OpenSSL-when-1.1-with-deprecated-APIs-di.patch
new file mode 100644 (file)
index 0000000..ac3f309
--- /dev/null
@@ -0,0 +1,27 @@
+From cff1385b398b59c74c535d6c0cd9deec561101fd Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Fri, 15 Feb 2019 15:02:34 -0800
+Subject: [PATCH] Fix finding OpenSSL when 1.1 with deprecated APIs disabled
+
+SSL_library_init is a deprecated function. OPENSSL_init_ssl is not in 1.0.2.
+SSL_CTX_new is in both.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e8290dfd..8dde6095 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -319,7 +319,7 @@ PKG_CHECK_MODULES([OPENSSL], [openssl], [
+       CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+       LIBS="$LIBS $OPENSSL_LIBS"
+ ], [
+-      AC_CHECK_LIB([ssl], [SSL_library_init], [
++      AC_CHECK_LIB([ssl], [SSL_CTX_new], [
+               LIBS="$LIBS -lssl -lcrypto"
+       ], [
+               AC_MSG_ERROR([The OpenSSL library was not found])
+-- 
+2.17.1
+
diff --git a/net/kea/Makefile b/net/kea/Makefile
new file mode 100644 (file)
index 0000000..e66aedd
--- /dev/null
@@ -0,0 +1,201 @@
+#
+# 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:=1
+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" \
+       $(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"
+
+HOST_LDFLAGS += \
+               -Wl,--gc-sections,--as-needed
+
+TARGET_CXXFLAGS += \
+               -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..40a4750
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -594,10 +594,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..8933b881045526edd1787b9dc6cabfe250550402 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keepalived
-PKG_VERSION:=2.0.10
+PKG_VERSION:=2.0.14
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.keepalived.org/software
-PKG_HASH:=40e0e55afed9ca313d621a9c5878579696fafb5504dab521aadaf20ba6e7f597
+PKG_HASH:=1bf586e56ee38b47b82f2a27b27e04d0e5b23f1810db6a8e801bde9d3eb8617b
 
 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() {
diff --git a/net/keepalived/patches/001-fix-systemd.patch b/net/keepalived/patches/001-fix-systemd.patch
new file mode 100644 (file)
index 0000000..51f36fb
--- /dev/null
@@ -0,0 +1,212 @@
+--- a/configure.ac     2019-03-30 12:47:15.935627522 +0000
++++ b/configure.ac     2019-03-30 12:47:55.590028792 +0000
+@@ -272,8 +272,7 @@ AC_ARG_ENABLE(Werror,
+   [AS_HELP_STRING([--enable-Werror], [compile with warnings being errors])])
+ AC_ARG_WITH([systemdsystemunitdir],
+-      AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+-      [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
++      AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])])
+ # Set the kernel headers path
+ if test -n "$kernel_src_path"; then
+@@ -551,7 +550,7 @@ do
+       eval $LOCAL_WARN_VAR=yes
+       add_to_var([KA_CFLAGS], [-W$WARN])
+       AC_DEFINE_UNQUOTED([$WARN_VAR], [ 1 ])
+-      AS_IF([test -z $WARN_VAR_SHORT], [],
++      AS_IF([test -z "$WARN_VAR_SHORT"], [],
+           [AC_DEFINE_UNQUOTED([$WARN_VAR_SHORT], [ 1 ])]
+          )
+     ],
+@@ -2451,41 +2450,39 @@ AM_CONDITIONAL([RPM_BIP], [test $RPM_NO_
+ dnl ----[ Determine system init type]----
+ INIT_TYPE=
+-if test -z $init_type; then
++AS_IF(
++  [test -n "$init_type"], [INIT_TYPE=$init_type],
++  [test -n "$with_systemdsystemunitdir"], [INIT_TYPE=systemd],
++  [
+   /sbin/init --version 2>/dev/null | grep -q upstart
+-  if test $? -eq 0; then
+-    INIT_TYPE=upstart
+-  else
++    AS_IF(
++      [test $? -eq 0], [INIT_TYPE=upstart],
++      [
+     init_path=`which systemctl 2>/dev/null`
+-    if test \( $? -eq 0 -a -x "$init_path" \); then
++        AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
++        [
+       systemctl | grep -q -- "-\.mount"
+-      if test $? -eq 0; then
+-      INIT_TYPE=systemd
+-      fi
+-    fi
+-    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then
++          AS_IF([test $? -eq 0], [INIT_TYPE=systemd])
++          ])
++        AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \)],
++        [
+       init_path=`which openrc-run 2>/dev/null`
+-      if test \( $? -eq 0 -a -x "$init_path" \); then
++          AS_IF([test \( $? -eq 0 -a -x "$init_path" \)],
++            [
+       head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
+-      if test $? -eq 0; then
+-        INIT_TYPE=openrc
+-      fi
+-      fi
+-    fi
+-    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then
+-      INIT_TYPE=SYSV
+-    fi
+-  fi
+-else
+-  INIT_TYPE=$init_type
+-fi
++              AS_IF([test $? -eq 0], [INIT_TYPE=openrc])
++            ])
++          ])
++        AS_IF([test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \)], [INIT_TYPE=SYSV])
++      ])
++  ])
++AS_IF([test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \)], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
+ dnl ----[Default keepalived configuration file]----
+ AS_IF([test $default_config_file],
+   [
+     AS_IF([test $default_config_file = yes -o $default_config_file = no],
+-          AC_MSG_ERROR([A filename must be specified for default-config-file])
+-      ])
++        [AC_MSG_ERROR([A filename must be specified for default-config-file])])
+     CONFIG_FILE=$default_config_file
+     add_config_opt([DEFAULT_CONFIG_FILE=${default_config_file}])
+   ],
+@@ -2493,7 +2490,7 @@ AS_IF([test $default_config_file],
+ AC_DEFINE_UNQUOTED([DEFAULT_CONFIG_FILE], ["$default_config_file"], [The default configuration file])
+ AC_SUBST([DEFAULT_CONFIG_FILE], [$default_config_file])
+-if test -z $INIT_TYPE; then
++if test -z "$INIT_TYPE"; then
+   INIT_TYPE=undetected
+ elif test $INIT_TYPE = systemd; then
+   AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+--- a/configure        2019-03-30 12:47:25.313485929 +0000
++++ b/configure        2019-03-30 12:48:08.009841269 +0000
+@@ -1631,7 +1631,7 @@ Optional Packages:
+   --with-default-config-file=FILE
+                           Default configuration file
+   --with-systemdsystemunitdir=DIR
+-                          Directory for systemd service files
++                          Directory for systemd service files]
+ Some influential environment variables:
+   PKG_CONFIG  path to pkg-config utility
+@@ -3858,8 +3858,6 @@ fi
+ # Check whether --with-systemdsystemunitdir was given.
+ if test "${with_systemdsystemunitdir+set}" = set; then :
+   withval=$with_systemdsystemunitdir;
+-else
+-  with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+ fi
+@@ -5931,7 +5929,7 @@ $as_echo "yes" >&6; }
+ #define $WARN_VAR  1
+ _ACEOF
+-      if test -z $WARN_VAR_SHORT; then :
++      if test -z "$WARN_VAR_SHORT"; then :
+ else
+   cat >>confdefs.h <<_ACEOF
+@@ -12520,44 +12518,58 @@ fi
+ INIT_TYPE=
+-if test -z $init_type; then
++if test -n "$init_type"; then :
++  INIT_TYPE=$init_type
++elif test -n "$with_systemdsystemunitdir"; then :
++  INIT_TYPE=systemd
++else
++
+   /sbin/init --version 2>/dev/null | grep -q upstart
+-  if test $? -eq 0; then
++    if test $? -eq 0; then :
+     INIT_TYPE=upstart
+-  else
++else
++
+     init_path=`which systemctl 2>/dev/null`
+-    if test \( $? -eq 0 -a -x "$init_path" \); then
++        if test \( $? -eq 0 -a -x "$init_path" \); then :
++
+       systemctl | grep -q -- "-\.mount"
+-      if test $? -eq 0; then
++          if test $? -eq 0; then :
+       INIT_TYPE=systemd
+-      fi
+-    fi
+-    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then
++fi
++
++fi
++        if test \( -z "$INIT_TYPE" -a -f /etc/init.d/networking \); then :
++
+       init_path=`which openrc-run 2>/dev/null`
+-      if test \( $? -eq 0 -a -x "$init_path" \); then
++          if test \( $? -eq 0 -a -x "$init_path" \); then :
++
+       head -1 /etc/init.d/networking | grep -q "^#! */.*/openrc-run$"
+-      if test $? -eq 0; then
++              if test $? -eq 0; then :
+         INIT_TYPE=openrc
+-      fi
+-      fi
+-    fi
+-    if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then
++fi
++
++fi
++
++fi
++        if test \( -z "$INIT_TYPE" -a -f /etc/init.d/cron -a ! -h /etc/init.d/cron \); then :
+       INIT_TYPE=SYSV
+-    fi
+-  fi
+-else
+-  INIT_TYPE=$init_type
++fi
++
++fi
++
++fi
++if test \( .$INIT_TYPE = .systemd -a -z "$with_systemdsystemunitdir" \); then :
++  with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+ fi
+ if test $default_config_file; then :
+     if test $default_config_file = yes -o $default_config_file = no; then :
+   as_fn_error $? "A filename must be specified for default-config-file" "$LINENO" 5
+-
+ fi
+     CONFIG_FILE=$default_config_file
+     CONFIG_OPTIONS="$CONFIG_OPTIONS DEFAULT_CONFIG_FILE=${default_config_file}"
+-  ]
++
+ else
+   default_config_file="/etc/$PACKAGE/$PACKAGE.conf"
+ fi
+@@ -12569,7 +12581,7 @@ _ACEOF
+ DEFAULT_CONFIG_FILE=$default_config_file
+-if test -z $INIT_TYPE; then
++if test -z "$INIT_TYPE"; then
+   INIT_TYPE=undetected
+ elif test $INIT_TYPE = systemd; then
+   systemdsystemunitdir=$with_systemdsystemunitdir
index db5b96887e1b927fedce9b494e39d05c1b35711e..ed740f06c4e48b170690b009322c330c3762936e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knot
-PKG_VERSION:=2.7.6
+PKG_VERSION:=2.8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
-PKG_HASH:=a1cb1877f04f7c2549c977c2658cfafd07c7e0e924f8e8aa8d4ae4b707f697a2
+PKG_HASH:=494ad926705018bd754d96711dc2129f3173f326a0b57d33978090ba4eef87ef
 
 PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
 PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD BSD-3-Clause OLDAP-2.8
@@ -234,9 +234,9 @@ define Package/knot-tests/install
        $(INSTALL_DIR)                                          $(1)/usr/share/knot
        $(INSTALL_BIN) ./files/runtests.sh                      $(1)/usr/share/knot/
 
-       $(INSTALL_DIR)                                          $(1)/usr/share/knot/tap
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/runtests      $(1)/usr/share/knot/tap/
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh     $(1)/usr/share/knot/tap/
+       $(INSTALL_DIR)                                                  $(1)/usr/share/knot/tap
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/.libs/runtests        $(1)/usr/share/knot/tap/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tests/tap/libtap.sh             $(1)/usr/share/knot/tap/
 
        $(INSTALL_DIR)                                                          $(1)/usr/share/knot/tests
 
@@ -249,7 +249,7 @@ define Package/knot-tests/install
                find $(PKG_BUILD_DIR)/tests/$$$${module}/.libs -maxdepth 1 -executable -type f | \
                        xargs -I{} basename {} | \
                        xargs -I{} $(INSTALL_BIN) -T $(PKG_BUILD_DIR)/tests/$$$${module}/.libs/{} \
-                                                                                       $(1)/usr/share/knot/tests/$$$${module}_{}; \
+                                                                               $(1)/usr/share/knot/tests/$$$${module}_{}; \
        done
 endef
 
index fff1ec30c409c43e56dbd2ef9408ee079080ee80..bd147ddc1949bfa2b57e1355ab2e6c399bf992e0 100644 (file)
@@ -21,5 +21,5 @@ index 2c0c27526..72b2124c7 100644
 -ZSCANNER_TOOL="$BUILD"/zscanner-tool
 +ZSCANNER_TOOL="$SOURCE"/zscanner-tool
  
- plan 80
+ plan 84
  
index 39c5345cc8ec51a6bc74896b9afe2eeb8066d6ff..fd1e86b37d630bb375c330eec17b9581b7f5cee1 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=krb5
-PKG_VERSION:=1.16.2
+PKG_VERSION:=1.17
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
@@ -17,8 +17,8 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=NOTICE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.16
-PKG_HASH:=9f721e1fe593c219174740c71de514c7228a97d23eb7be7597b2ae14e487f027
+PKG_SOURCE_URL:=https://web.mit.edu/kerberos/dist/krb5/1.17
+PKG_HASH:=5a6e2284a53de5702d3dc2be3b9339c963f9b5397d3fbbc53beb249380a781f5
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -136,6 +136,10 @@ define Package/krb5-server/install
 #      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sim_server $(1)/usr/sbin
 endef
 
+define Package/krb5-server/postinst
+touch $${IPKG_INSTROOT}/etc/krb5kdc/kadm5.acl
+endef
+
 $(eval $(call BuildPackage,krb5-libs))
 $(eval $(call BuildPackage,krb5-server))
 $(eval $(call BuildPackage,krb5-client))
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")
index 1dcecef2aeab0b29b6f1fee8f6bb32788fce67ac..7500259638b0ac856dc183cc9a4058b7d606bac0 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lighttpd
-PKG_VERSION:=1.4.49
-PKG_RELEASE:=5
+PKG_VERSION:=1.4.53
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://download.lighttpd.net/lighttpd/releases-1.4.x
-PKG_HASH:=aedf49d7127d9e4c0ea56618e9e945a17674dc46a37ac7990120f87dd939ce09
+PKG_HASH:=3bdfce1cf3e9650a556a8c26fb15342c5717c63f530c54693db632b0371dcb78
 
 PKG_LICENSE:=BSD-3c
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:lighttpd:lighttpd
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
diff --git a/net/lighttpd/patches/010-openssl-deprecated.patch b/net/lighttpd/patches/010-openssl-deprecated.patch
deleted file mode 100644 (file)
index 0b2176b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/rand.c b/src/rand.c
-index 10cd025..63fbb0d 100644
---- a/src/rand.c
-+++ b/src/rand.c
-@@ -226,7 +226,9 @@ int li_rand_bytes (unsigned char *buf, int num)
- void li_rand_cleanup (void)
- {
-   #ifdef USE_OPENSSL_CRYPTO
-+  #if OPENSSL_VERSION_NUMBER < 0x10100000L
-     RAND_cleanup();
-+  #endif
-   #endif
-     safe_memclear(xsubi, sizeof(xsubi));
- }
diff --git a/net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch b/net/lighttpd/patches/020-Disable-auto-loading-mod_authn_file.patch
deleted file mode 100644 (file)
index 22f3e66..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From 72f2c7559a1cd75b6d86e72358b4b78cdeefa5f4 Mon Sep 17 00:00:00 2001
-From: yangfl <yangfl@users.noreply.github.com>
-Date: Fri, 1 Feb 2019 15:05:32 +0800
-Subject: [PATCH] Disable auto loading mod_authn_file
-
-Which will cause openwrt/packages#7737
----
- src/configfile.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/configfile.c b/src/configfile.c
-index 1b2651b9..29bb2aa4 100644
---- a/src/configfile.c
-+++ b/src/configfile.c
-@@ -482,9 +482,9 @@ static int config_insert(server *srv) {
-                * existing lighttpd 1.4.x configs */
-               if (contains_mod_auth) {
-                       if (append_mod_authn_file) {
--                              ds = data_string_init();
-+                              /* ds = data_string_init();
-                               buffer_copy_string_len(ds->value, CONST_STR_LEN("mod_authn_file"));
--                              array_insert_unique(srv->srvconf.modules, (data_unset *)ds);
-+                              array_insert_unique(srv->srvconf.modules, (data_unset *)ds); */
-                       }
-                       if (append_mod_authn_ldap) {
-                             #if defined(HAVE_LDAP_H) && defined(HAVE_LBER_H) && defined(HAVE_LIBLDAP) && defined(HAVE_LIBLBER)
--- 
-2.20.1
-
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 f4ac111f79a56830236943350ad643ccdba4569c..2a1ee5914a639f69994126d02a9fccf9d1f63206 100644 (file)
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mosquitto
-PKG_VERSION:=1.5.5
+PKG_VERSION:=1.5.8
 PKG_RELEASE:=1
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE.txt
@@ -17,7 +17,7 @@ PKG_CPE_ID:=cpe:/a:eclipse:mosquitto
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://mosquitto.org/files/source/
-PKG_HASH:=fcdb47e340864c545146681af7253399cc292e41775afd76400fda5b0d23d668
+PKG_HASH:=78d7e70c3794dc3a1d484b4f2f8d3addebe9c2da3f5a1cebe557f7d13beb0da4
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
index 5ad3e7e3f6eca5903ac9f807d14781672d484184..03fb2be88bc1e37461637de7f6afb719cf0607ea 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.7.10
+PKG_VERSION:=2.7.12
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE:=GPLv2
index a3343739b682008b4bea7b81324c776aa88b0cf0..4bb8f34a947a9b14f3446f5c87b805a90f73fcf7 100644 (file)
@@ -32,6 +32,8 @@ MM_BLACKHOLE=""
 MMX_UNREACHABLE=""
 MM_UNREACHABLE=""
 
+# return true(=0) if has any mwan3 interface enabled
+# otherwise return false
 mwan3_rtmon_ipv4()
 {
        local tid=1
@@ -61,6 +63,8 @@ mwan3_rtmon_ipv4()
        return $ret
 }
 
+# return true(=0) if has any mwan3 interface enabled
+# otherwise return false
 mwan3_rtmon_ipv6()
 {
        local tid=1
index f68c298cd0b95e128fea02de0797ef8ed26432f1..9165de554f68a91ae16a586d69617ca225215420 100755 (executable)
@@ -25,14 +25,14 @@ main() {
        sleep 3
        while true; do
                mwan3_lock "service" "mwan3rtmon"
-               [ mwan3_remon_ipv4 = "1" ] || \
-               [ mwan3_rtmon_ipv6 = "1" ] && break
+               mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6
+               ret=$?
                mwan3_unlock "service" "mwan3rtmon"
+               [ "$ret" = "0" ] || break
                [ "$rtmon_interval" = "0" ] && break
                sleep "$rtmon_interval" &
                wait
        done
-       mwan3_unlock "service" "mwan3rtmon"
 }
 
 main "$@"
index 375e62a0f1073420ca90b26255f823da98ab4285..09ee3c119b951790cd5f0c370830f68f4e2982d8 100755 (executable)
@@ -221,11 +221,7 @@ main() {
 
                        if [ $score -eq $up ]; then
                                echo "offline" > /var/run/mwan3track/$1/STATUS
-                               echo "0" > /var/run/mwan3track/$1/UPTIME
-                               echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
-                               $LOG notice "Interface $1 ($2) is offline"
                                env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
-                               env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
                                score=0
                        fi
                else
index 8fa011523af05616bef194c78fd7f3668da9492d..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
 
@@ -128,6 +128,7 @@ SNMP_MIB_MODULES_INCLUDED = \
        host/hr_system \
        ieee802dot11 \
        if-mib/ifXTable \
+       ip-mib/inetNetToMediaTable \
        mibII/at \
        mibII/icmp \
        mibII/ifTable \
@@ -164,6 +165,7 @@ SNMP_MIB_MODULES_EXCLUDED = \
        hardware \
        host \
        if-mib \
+       ip-mib \
        mibII \
        notification \
        notification-log-mib \
@@ -206,6 +208,9 @@ CONFIGURE_ARGS += \
        --without-zlib \
        --with-nl \
         $(call autoconf_bool,CONFIG_IPV6,ipv6) \
+       --disable-perl-cc-checks \
+       --disable-embedded-perl \
+       --without-perl-modules
 
 CONFIGURE_VARS += \
        ac_cv_header_netlink_netlink_h=yes \
index e9f2fd574fd7fddd01a35f2e6ea237d1f11109b1..4cdfc136975697c04ba88a7cd322899ca42f66e5 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
 PKG_VERSION:=2.3.3
-PKG_RELEASE:=2
+PKG_RELEASE:=5
 PKG_HASH:=3c8c63611c7e78b7a3b2f8a28b9928a5b5e66d5e9ad09a1e54681508884320a4
 
 PKG_SOURCE_URL:=@SF/nfs
@@ -18,7 +18,7 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION)
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=$(PKG_NAME)/host
+PKG_BUILD_DEPENDS:=$(PKG_NAME)/host libevent2
 HOST_BUILD_DEPENDS:=libtirpc/host
 
 PKG_CONFIG_DEPENDS:= \
@@ -69,7 +69,7 @@ define Package/nfs-utils/Default
   $(call Package/nfs-kernel-server/Default)
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS+= +libevent2 +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
+  DEPENDS+= +NFS_KERNEL_SERVER_V4:libkeyutils +NFS_KERNEL_SERVER_V4:libdevmapper
   URL:=http://nfs.sourceforge.net/
   MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
@@ -197,7 +197,7 @@ endef
 
 define Package/nfs-utils-libs/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.so* $(1)/usr/lib/
+       $(if $(CONFIG_NFS_KERNEL_SERVER_V4),$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfsidmap.so* $(1)/usr/lib/,)
 endef
 
 $(eval $(call HostBuild))
index 394bf2efd2cee3516c32d73fa1f76a0cef7da806..ccf676dcbcff75d89a06e18362decf9f02a9f12f 100644 (file)
@@ -9,6 +9,7 @@ USE_PROCD=1
 NFS_D=/var/lib/nfs
 RECOVERY_D=$NFS_D/v4recovery
 LOCK_D=/var/lib/nfs/sm
+VAR_NFS=/var/lib/nfs
 
 start_service() {
        grep -q /proc/fs/nfsd /proc/mounts || \
@@ -18,6 +19,9 @@ start_service() {
        mkdir -p $LOCK_D
        touch $NFS_D/rmtab
 
+       mkdir -p $VAR_NFS
+       chown nfs:nfs $VAR_NFS
+
         sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null
 
        procd_open_instance
@@ -25,7 +29,7 @@ start_service() {
        procd_close_instance
 
        /usr/sbin/exportfs -r
-       /usr/sbin/rpc.nfsd
+       /usr/sbin/rpc.nfsd --grace-time 10
 
        procd_open_instance
        procd_set_param command /usr/sbin/rpc.mountd -p 32780 -F
diff --git a/net/nfs-kernel-server/patches/0001-don-t-free-ai-ai_canonname.patch b/net/nfs-kernel-server/patches/0001-don-t-free-ai-ai_canonname.patch
new file mode 100644 (file)
index 0000000..98f7c04
--- /dev/null
@@ -0,0 +1,187 @@
+From 4bc0dcae0b64eccd63f753d05b505b0becdcb2c8 Mon Sep 17 00:00:00 2001
+From: Peter Wagner <tripolar@gmx.at>
+Date: Tue, 19 Feb 2019 19:50:03 +0100
+Subject: [PATCH 1/2] don't free ai->ai_canonname
+
+---
+ support/export/hostname.c | 58 ++++++++-------------------------------
+ utils/mountd/auth.c       | 16 +++++------
+ 2 files changed, 20 insertions(+), 54 deletions(-)
+
+diff --git a/support/export/hostname.c b/support/export/hostname.c
+index 5c4c824..96c5449 100644
+--- a/support/export/hostname.c
++++ b/support/export/hostname.c
+@@ -264,9 +264,9 @@ host_canonname(const struct sockaddr *sap)
+  * Reverse and forward lookups are performed to ensure the address has
+  * matching forward and reverse mappings.
+  *
+- * Returns addrinfo structure with just the provided address with
+- * ai_canonname filled in. If there is a problem with resolution or
+- * the resolved records don't match up properly then it returns NULL
++ * Returns addrinfo structure with just the provided address. If there
++ * is a problem with resolution or the resolved records don't match up
++ * properly then returns NULL.
+  *
+  * Caller must free the returned structure with freeaddrinfo(3).
+  */
+@@ -277,13 +277,15 @@ host_reliable_addrinfo(const struct sockaddr *sap)
+       struct addrinfo *ai, *a;
+       char *hostname;
++      ai = NULL;
+       hostname = host_canonname(sap);
+       if (hostname == NULL)
+-              return NULL;
++              goto out;
+       ai = host_addrinfo(hostname);
++      free(hostname);
+       if (!ai)
+-              goto out_free_hostname;
++              goto out;
+       /* make sure there's a matching address in the list */
+       for (a = ai; a; a = a->ai_next)
+@@ -291,22 +293,15 @@ host_reliable_addrinfo(const struct sockaddr *sap)
+                       break;
+       freeaddrinfo(ai);
++      ai = NULL;
+       if (!a)
+-              goto out_free_hostname;
++              goto out;
+       /* get addrinfo with just the original address */
+       ai = host_numeric_addrinfo(sap);
+-      if (!ai)
+-              goto out_free_hostname;
+-      /* and populate its ai_canonname field */
+-      free(ai->ai_canonname);
+-      ai->ai_canonname = hostname;
++out:
+       return ai;
+-
+-out_free_hostname:
+-      free(hostname);
+-      return NULL;
+ }
+ /**
+@@ -323,7 +318,6 @@ host_numeric_addrinfo(const struct sockaddr *sap)
+ {
+       socklen_t salen = nfs_sockaddr_length(sap);
+       char buf[INET6_ADDRSTRLEN];
+-      struct addrinfo *ai;
+       int error;
+       if (salen == 0) {
+@@ -348,21 +342,7 @@ host_numeric_addrinfo(const struct sockaddr *sap)
+               return NULL;
+       }
+-      ai = host_pton(buf);
+-
+-      /*
+-       * getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname
+-       */
+-      if (ai != NULL) {
+-              free(ai->ai_canonname);         /* just in case */
+-              ai->ai_canonname = strdup(buf);
+-              if (ai->ai_canonname == NULL) {
+-                      freeaddrinfo(ai);
+-                      ai = NULL;
+-              }
+-      }
+-
+-      return ai;
++      return host_pton(buf);
+ }
+ #else /* !HAVE_GETNAMEINFO */
+ __attribute__((__malloc__))
+@@ -372,7 +352,6 @@ host_numeric_addrinfo(const struct sockaddr *sap)
+       const struct sockaddr_in *sin = (const struct sockaddr_in *)sap;
+       const struct in_addr *addr = &sin->sin_addr;
+       char buf[INET_ADDRSTRLEN];
+-      struct addrinfo *ai;
+       if (sap->sa_family != AF_INET)
+               return NULL;
+@@ -382,19 +361,6 @@ host_numeric_addrinfo(const struct sockaddr *sap)
+                                       (socklen_t)sizeof(buf)) == NULL)
+               return NULL;
+-      ai = host_pton(buf);
+-
+-      /*
+-       * getaddrinfo(AI_NUMERICHOST) never fills in ai_canonname
+-       */
+-      if (ai != NULL) {
+-              ai->ai_canonname = strdup(buf);
+-              if (ai->ai_canonname == NULL) {
+-                      freeaddrinfo(ai);
+-                      ai = NULL;
+-              }
+-      }
+-
+-      return ai;
++      return host_pton(buf);
+ }
+ #endif        /* !HAVE_GETNAMEINFO */
+diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
+index 8299256..cb4848c 100644
+--- a/utils/mountd/auth.c
++++ b/utils/mountd/auth.c
+@@ -261,40 +261,40 @@ auth_authenticate(const char *what, const struct sockaddr *caller,
+               *p = '\0';
+       }
++      host_ntop(caller, buf, sizeof(buf));
+       switch (error) {
+       case bad_path:
+               xlog(L_WARNING, "bad path in %s request from %s: \"%s\"",
+-                   what, host_ntop(caller, buf, sizeof(buf)), path);
++                   what, buf, path);
+               break;
+       case unknown_host:
+               xlog(L_WARNING, "refused %s request from %s for %s (%s): unmatched host",
+-                   what, host_ntop(caller, buf, sizeof(buf)), path, epath);
++                   what, buf, path, epath);
+               break;
+       case no_entry:
+               xlog(L_WARNING, "refused %s request from %s for %s (%s): no export entry",
+-                   what, ai->ai_canonname, path, epath);
++                   what, buf, path, epath);
+               break;
+       case not_exported:
+               xlog(L_WARNING, "refused %s request from %s for %s (%s): not exported",
+-                   what, ai->ai_canonname, path, epath);
++                   what, buf, path, epath);
+               break;
+       case illegal_port:
+               xlog(L_WARNING, "refused %s request from %s for %s (%s): illegal port %u",
+-                   what, ai->ai_canonname, path, epath, nfs_get_port(caller));
++                   what, buf, path, epath, nfs_get_port(caller));
+               break;
+       case success:
+               xlog(L_NOTICE, "authenticated %s request from %s:%u for %s (%s)",
+-                   what, ai->ai_canonname, nfs_get_port(caller), path, epath);
++                   what, buf, nfs_get_port(caller), path, epath);
+               break;
+       default:
+               xlog(L_NOTICE, "%s request from %s:%u for %s (%s) gave %d",
+-                   what, ai->ai_canonname, nfs_get_port(caller),
+-                      path, epath, error);
++                   what, buf, nfs_get_port(caller), path, epath, error);
+       }
+       freeaddrinfo(ai);
+-- 
+2.20.1
+
diff --git a/net/nfs-kernel-server/patches/0002-define-and-use-wrapper-function-nfs_freeaddrin.patch b/net/nfs-kernel-server/patches/0002-define-and-use-wrapper-function-nfs_freeaddrin.patch
new file mode 100644 (file)
index 0000000..49d3630
--- /dev/null
@@ -0,0 +1,566 @@
+From 877184f733d13d7db0ec9265a53ede9c30d03ba4 Mon Sep 17 00:00:00 2001
+From: Peter Wagner <tripolar@gmx.at>
+Date: Tue, 19 Feb 2019 20:00:22 +0100
+Subject: [PATCH 2/2] define and use wrapper function nfs_freeaddrinfo
+ to handle freeaddrinfo versions that don't tolerate NULL pointers
+
+Signed-off-by: Peter Wagner <tripolar@gmx.at>
+---
+ support/export/client.c       |  6 +++---
+ support/export/hostname.c     |  4 ++--
+ support/include/exportfs.h    | 11 +++++++++++
+ support/nfs/getport.c         |  7 ++++---
+ support/nfs/svc_create.c      |  8 +++++---
+ support/nfsidmap/umich_ldap.c |  2 +-
+ tests/nsm_client/nsm_client.c |  2 +-
+ utils/exportfs/exportfs.c     | 10 +++++-----
+ utils/gssd/gssd.c             |  4 ++--
+ utils/gssd/krb5_util.c        |  2 +-
+ utils/mount/network.c         |  7 ++++---
+ utils/mount/stropts.c         |  3 ++-
+ utils/mountd/auth.c           |  2 +-
+ utils/mountd/cache.c          | 10 +++++-----
+ utils/mountd/mountd.c         |  4 ++--
+ utils/mountd/rmtab.c          |  2 +-
+ utils/nfsd/nfssvc.c           |  4 ++--
+ utils/statd/hostname.c        | 11 ++++++-----
+ utils/statd/sm-notify.c       | 14 +++++++-------
+ 19 files changed, 65 insertions(+), 48 deletions(-)
+
+diff --git a/support/export/client.c b/support/export/client.c
+index baf59c8..a1fba01 100644
+--- a/support/export/client.c
++++ b/support/export/client.c
+@@ -210,7 +210,7 @@ init_subnetwork(nfs_client *clp)
+       set_addrlist(clp, 0, ai->ai_addr);
+       family = ai->ai_addr->sa_family;
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       switch (family) {
+       case AF_INET:
+@@ -309,7 +309,7 @@ client_lookup(char *hname, int canonical)
+               init_addrlist(clp, ai);
+ out:
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return clp;
+ }
+@@ -674,7 +674,7 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
+       tmp = host_pton(hname);
+       if (tmp != NULL) {
+               char *cname = host_canonname(tmp->ai_addr);
+-              freeaddrinfo(tmp);
++              nfs_freeaddrinfo(tmp);
+               /* The resulting FQDN may be in our netgroup. */
+               if (cname != NULL) {
+diff --git a/support/export/hostname.c b/support/export/hostname.c
+index 96c5449..be4d7f6 100644
+--- a/support/export/hostname.c
++++ b/support/export/hostname.c
+@@ -130,7 +130,7 @@ host_pton(const char *paddr)
+               if (!inet4 && ai->ai_addr->sa_family == AF_INET) {
+                       xlog(D_GENERAL, "%s: failed to convert %s",
+                                       __func__, paddr);
+-                      freeaddrinfo(ai);
++                      nfs_freeaddrinfo(ai);
+                       break;
+               }
+               return ai;
+@@ -292,7 +292,7 @@ host_reliable_addrinfo(const struct sockaddr *sap)
+               if (nfs_compare_sockaddr(a->ai_addr, sap))
+                       break;
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       ai = NULL;
+       if (!a)
+               goto out;
+diff --git a/support/include/exportfs.h b/support/include/exportfs.h
+index 4e0d9d1..b81f963 100644
+--- a/support/include/exportfs.h
++++ b/support/include/exportfs.h
+@@ -47,6 +47,17 @@ typedef struct mclient {
+       int                     m_count;
+ } nfs_client;
++/*
++ * Some versions of freeaddrinfo(3) do not tolerate being
++ * passed a NULL pointer.
++ */
++static inline void nfs_freeaddrinfo(struct addrinfo *ai)
++{
++      if (ai) {
++              freeaddrinfo(ai);
++      }
++}
++
+ static inline const struct sockaddr *
+ get_addrlist(const nfs_client *clp, const int i)
+ {
+diff --git a/support/nfs/getport.c b/support/nfs/getport.c
+index 081594c..26ec85e 100644
+--- a/support/nfs/getport.c
++++ b/support/nfs/getport.c
+@@ -47,6 +47,7 @@
+ #include "sockaddr.h"
+ #include "nfsrpc.h"
++#include "exportfs.h"
+ /*
+  * Try a local socket first to access the local rpcbind daemon
+@@ -109,7 +110,7 @@ static int nfs_gp_loopback_address(struct sockaddr *sap, socklen_t *salen)
+               ret = 1;
+       }
+-      freeaddrinfo(gai_results);
++      nfs_freeaddrinfo(gai_results);
+       return ret;
+ }
+@@ -134,8 +135,8 @@ static in_port_t nfs_gp_getservbyname(const char *service,
+       sin = (const struct sockaddr_in *)gai_results->ai_addr;
+       port = sin->sin_port;
+-      
+-      freeaddrinfo(gai_results);
++
++      nfs_freeaddrinfo(gai_results);
+       return port;
+ }
+diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c
+index ef7ff05..d0b747b 100644
+--- a/support/nfs/svc_create.c
++++ b/support/nfs/svc_create.c
+@@ -39,6 +39,8 @@
+ #include <rpc/rpc.h>
+ #include <rpc/svc.h>
++#include "exportfs.h"
++
+ #ifdef HAVE_TCP_WRAPPER
+ #include "tcpwrapper.h"
+ #endif
+@@ -273,7 +275,7 @@ svc_create_nconf_rand_port(const char *name, const rpcprog_t program,
+       bindaddr.qlen = SOMAXCONN;
+       xprt = svc_tli_create(RPC_ANYFD, nconf, &bindaddr, 0, 0);
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       if (xprt == NULL) {
+               xlog(L_ERROR, "Failed to create listener xprt "
+                       "(%s, %u, %s)", name, version, nconf->nc_netid);
+@@ -364,11 +366,11 @@ svc_create_nconf_fixed_port(const char *name, const rpcprog_t program,
+       svc_create_cache_xprt(xprt);
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return 1;
+ out_free:
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return 0;
+ }
+diff --git a/support/nfsidmap/umich_ldap.c b/support/nfsidmap/umich_ldap.c
+index b661110..b8ee184 100644
+--- a/support/nfsidmap/umich_ldap.c
++++ b/support/nfsidmap/umich_ldap.c
+@@ -1089,7 +1089,7 @@ get_canonical_hostname(const char *inname)
+       return_name = strdup (tmphost);
+ out_free:
+-      freeaddrinfo(ap);
++      nfs_freeaddrinfo(ap);
+ out_err:
+       return return_name;
+ }
+diff --git a/tests/nsm_client/nsm_client.c b/tests/nsm_client/nsm_client.c
+index 0fa3422..8dc0591 100644
+--- a/tests/nsm_client/nsm_client.c
++++ b/tests/nsm_client/nsm_client.c
+@@ -243,7 +243,7 @@ nsm_client_get_rpcclient(const char *node)
+               printf("RPC client creation failed\n");
+       }
+ out:
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return client;
+ }
+diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
+index cd3c979..333eadc 100644
+--- a/utils/exportfs/exportfs.c
++++ b/utils/exportfs/exportfs.c
+@@ -282,7 +282,7 @@ exportfs_parsed(char *hname, char *path, char *options, int verbose)
+       validate_export(exp);
+ out:
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+ }
+ static int exportfs_generic(char *arg, char *options, int verbose)
+@@ -395,7 +395,7 @@ unexportfs_parsed(char *hname, char *path, int verbose)
+       if (!success)
+               xlog(L_ERROR, "Could not find '%s:%s' to unexport.", hname, path);
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+ }
+ static int unexportfs_generic(char *arg, int verbose)
+@@ -588,7 +588,7 @@ address_list(const char *hostname)
+       if (ai != NULL) {
+               /* @hostname was a presentation address */
+               cname = host_canonname(ai->ai_addr);
+-              freeaddrinfo(ai);
++              nfs_freeaddrinfo(ai);
+               if (cname != NULL)
+                       goto out;
+       }
+@@ -639,8 +639,8 @@ matchhostname(const char *hostname1, const char *hostname2)
+                       }
+ out:
+-      freeaddrinfo(results1);
+-      freeaddrinfo(results2);
++      nfs_freeaddrinfo(results1);
++      nfs_freeaddrinfo(results2);
+       return result;
+ }
+diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
+index 2e92f28..7eeb05f 100644
+--- a/utils/gssd/gssd.c
++++ b/utils/gssd/gssd.c
+@@ -172,14 +172,14 @@ gssd_addrstr_to_sockaddr(struct sockaddr *sa, const char *node, const char *port
+               if (sin6->sin6_scope_id) {
+                       printerr(0, "ERROR: address %s has non-zero "
+                                   "sin6_scope_id!\n", node);
+-                      freeaddrinfo(res);
++                      nfs_freeaddrinfo(res);
+                       return false;
+               }
+       }
+ #endif /* IPV6_SUPPORTED */
+       memcpy(sa, res->ai_addr, res->ai_addrlen);
+-      freeaddrinfo(res);
++      nfs_freeaddrinfo(res);
+       return true;
+ }
+diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
+index eba1aac..adbde93 100644
+--- a/utils/gssd/krb5_util.c
++++ b/utils/gssd/krb5_util.c
+@@ -587,7 +587,7 @@ get_full_hostname(const char *inhost, char *outhost, int outhostlen)
+               goto out;
+       }
+       strncpy(outhost, addrs->ai_canonname, outhostlen);
+-      freeaddrinfo(addrs);
++      nfs_freeaddrinfo(addrs);
+       for (c = outhost; *c != '\0'; c++)
+           *c = tolower(*c);
+diff --git a/utils/mount/network.c b/utils/mount/network.c
+index 356f663..fcb0b9f 100644
+--- a/utils/mount/network.c
++++ b/utils/mount/network.c
+@@ -53,6 +53,7 @@
+ #include <net/if.h>
+ #include <ifaddrs.h>
++#include "exportfs.h"
+ #include "sockaddr.h"
+ #include "xcommon.h"
+ #include "mount.h"
+@@ -250,7 +251,7 @@ int nfs_lookup(const char *hostname, const sa_family_t family,
+               break;
+       }
+-      freeaddrinfo(gai_results);
++      nfs_freeaddrinfo(gai_results);
+       return ret;
+ }
+@@ -307,7 +308,7 @@ int nfs_string_to_sockaddr(const char *address, struct sockaddr *sap,
+                       }
+                       break;
+               }
+-              freeaddrinfo(gai_results);
++              nfs_freeaddrinfo(gai_results);
+       }
+       return ret;
+@@ -1180,7 +1181,7 @@ static int nfs_ca_gai(const struct sockaddr *sap,
+       *buflen = gai_results->ai_addrlen;
+       memcpy(buf, gai_results->ai_addr, *buflen);
+-      freeaddrinfo(gai_results);
++      nfs_freeaddrinfo(gai_results);
+       return 1;
+ }
+diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
+index 0a25b1f..b170552 100644
+--- a/utils/mount/stropts.c
++++ b/utils/mount/stropts.c
+@@ -35,6 +35,7 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include "exportfs.h"
+ #include "sockaddr.h"
+ #include "xcommon.h"
+ #include "mount.h"
+@@ -1268,7 +1269,7 @@ int nfsmount_string(const char *spec, const char *node, char *type,
+       } else
+               nfs_error(_("%s: internal option parsing error"), progname);
+-      freeaddrinfo(mi.address);
++      nfs_freeaddrinfo(mi.address);
+       free(mi.hostname);
+       return retval;
+ }
+diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
+index cb4848c..67627f7 100644
+--- a/utils/mountd/auth.c
++++ b/utils/mountd/auth.c
+@@ -297,7 +297,7 @@ auth_authenticate(const char *what, const struct sockaddr *caller,
+                    what, buf, nfs_get_port(caller), path, epath, error);
+       }
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return exp;
+ }
+diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
+index 7e8d403..2cb370f 100644
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -113,7 +113,7 @@ static void auth_unix_ip(int f)
+               ai = client_resolve(tmp->ai_addr);
+               if (ai) {
+                       client = client_compose(ai);
+-                      freeaddrinfo(ai);
++                      nfs_freeaddrinfo(ai);
+               }
+       }
+       bp = buf; blen = sizeof(buf);
+@@ -133,7 +133,7 @@ static void auth_unix_ip(int f)
+       xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT");
+       free(client);
+-      freeaddrinfo(tmp);
++      nfs_freeaddrinfo(tmp);
+ }
+@@ -667,7 +667,7 @@ static struct addrinfo *lookup_client_addr(char *dom)
+       if (tmp == NULL)
+               return NULL;
+       ret = client_resolve(tmp->ai_addr);
+-      freeaddrinfo(tmp);
++      nfs_freeaddrinfo(tmp);
+       return ret;
+ }
+@@ -834,7 +834,7 @@ static void nfsd_fh(int f)
+ out:
+       if (found_path)
+               free(found_path);
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       free(dom);
+       xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path : NULL);
+ }
+@@ -1355,7 +1355,7 @@ static void nfsd_export(int f)
+       xlog(D_CALL, "nfsd_export: found %p path %s", found, path ? path : NULL);
+       if (dom) free(dom);
+       if (path) free(path);
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+ }
+diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
+index 086c39b..fb7bba4 100644
+--- a/utils/mountd/mountd.c
++++ b/utils/mountd/mountd.c
+@@ -578,10 +578,10 @@ static void prune_clients(nfs_export *exp, struct exportnode *e)
+                               *cp = c->gr_next;
+                               xfree(c->gr_name);
+                               xfree(c);
+-                              freeaddrinfo(ai);
++                              nfs_freeaddrinfo(ai);
+                               continue;
+                       }
+-                      freeaddrinfo(ai);
++                      nfs_freeaddrinfo(ai);
+               }
+               cp = &(c->gr_next);
+       }
+diff --git a/utils/mountd/rmtab.c b/utils/mountd/rmtab.c
+index 3ae0dbb..c896243 100644
+--- a/utils/mountd/rmtab.c
++++ b/utils/mountd/rmtab.c
+@@ -226,7 +226,7 @@ mountlist_list(void)
+                               ai = host_pton(rep->r_client);
+                               if (ai != NULL) {
+                                       m->ml_hostname = host_canonname(ai->ai_addr);
+-                                      freeaddrinfo(ai);
++                                      nfs_freeaddrinfo(ai);
+                               }
+                       }
+                       if (m->ml_hostname == NULL)
+diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
+index 1e6ffd6..47b1882 100644
+--- a/utils/nfsd/nfssvc.c
++++ b/utils/nfsd/nfssvc.c
+@@ -25,6 +25,7 @@
+ #include "nfslib.h"
+ #include "xlog.h"
+ #include "nfssvc.h"
++#include "exportfs.h"
+ #include "../mount/version.h"
+ #ifndef NFSD_FS_DIR
+@@ -246,8 +247,7 @@ error:
+               close(fd);
+       if (sockfd >= 0)
+               close(sockfd);
+-      if (addrhead)
+-              freeaddrinfo(addrhead);
++      nfs_freeaddrinfo(addrhead);
+       return (bounded ? 0 : rc);
+ }
+diff --git a/utils/statd/hostname.c b/utils/statd/hostname.c
+index 8cccdb8..c9e22d3 100644
+--- a/utils/statd/hostname.c
++++ b/utils/statd/hostname.c
+@@ -35,6 +35,7 @@
+ #include <netdb.h>
+ #include <arpa/inet.h>
++#include "exportfs.h"
+ #include "sockaddr.h"
+ #include "statd.h"
+ #include "xlog.h"
+@@ -203,7 +204,7 @@ statd_canonical_name(const char *hostname)
+               _Bool result;
+               result = get_nameinfo(ai->ai_addr, ai->ai_addrlen,
+                                       buf, (socklen_t)sizeof(buf));
+-              freeaddrinfo(ai);
++              nfs_freeaddrinfo(ai);
+               if (!result || buf[0] == '\0')
+                       /* OK to use presentation address,
+                        * if no reverse map exists */
+@@ -217,7 +218,7 @@ statd_canonical_name(const char *hostname)
+       if (ai == NULL)
+               return NULL;
+       strcpy(buf, ai->ai_canonname);
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return strdup(buf);
+ }
+@@ -253,7 +254,7 @@ statd_canonical_list(const char *hostname)
+               _Bool result;
+               result = get_nameinfo(ai->ai_addr, ai->ai_addrlen,
+                                       buf, (socklen_t)sizeof(buf));
+-              freeaddrinfo(ai);
++              nfs_freeaddrinfo(ai);
+               if (result)
+                       goto out;
+       }
+@@ -308,8 +309,8 @@ statd_matchhostname(const char *hostname1, const char *hostname2)
+                       }
+ out:
+-      freeaddrinfo(results2);
+-      freeaddrinfo(results1);
++      nfs_freeaddrinfo(results2);
++      nfs_freeaddrinfo(results1);
+       xlog(D_CALL, "%s: hostnames %s and %s %s", __func__,
+                       hostname1, hostname2,
+diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c
+index 29dad38..05d72a3 100644
+--- a/utils/statd/sm-notify.c
++++ b/utils/statd/sm-notify.c
+@@ -37,6 +37,7 @@
+ #include "xlog.h"
+ #include "nsm.h"
+ #include "nfsrpc.h"
++#include "exportfs.h"
+ /* glibc before 2.3.4 */
+ #ifndef AI_NUMERICSERV
+@@ -179,7 +180,7 @@ smn_verify_my_name(const char *name)
+       case 0:
+               /* @name was a presentation address */
+               retval = smn_get_hostname(ai->ai_addr, ai->ai_addrlen, name);
+-              freeaddrinfo(ai);
++              nfs_freeaddrinfo(ai);
+               if (retval == NULL)
+                       return NULL;
+               break;
+@@ -253,8 +254,7 @@ static void smn_forget_host(struct nsm_host *host)
+       free((void *)host->my_name);
+       free((void *)host->mon_name);
+       free(host->name);
+-      if (host->ai)
+-              freeaddrinfo(host->ai);
++      nfs_freeaddrinfo(host->ai);
+       free(host);
+ }
+@@ -430,7 +430,7 @@ retry:
+       if (srcport) {
+               if (bind(sock, ai->ai_addr, ai->ai_addrlen) == -1) {
+                       xlog(L_ERROR, "Failed to bind RPC socket: %m");
+-                      freeaddrinfo(ai);
++                      nfs_freeaddrinfo(ai);
+                       (void)close(sock);
+                       return -1;
+               }
+@@ -440,7 +440,7 @@ retry:
+               if (smn_bindresvport(sock, ai->ai_addr) == -1) {
+                       xlog(L_ERROR,
+                               "bindresvport on RPC socket failed: %m");
+-                      freeaddrinfo(ai);
++                      nfs_freeaddrinfo(ai);
+                       (void)close(sock);
+                       return -1;
+               }
+@@ -449,13 +449,13 @@ retry:
+               se = getservbyport((int)nfs_get_port(ai->ai_addr), "udp");
+               if (se != NULL && retry_cnt < 100) {
+                       retry_cnt++;
+-                      freeaddrinfo(ai);
++                      nfs_freeaddrinfo(ai);
+                       (void)close(sock);
+                       goto retry;
+               }
+       }
+-      freeaddrinfo(ai);
++      nfs_freeaddrinfo(ai);
+       return sock;
+ }
+-- 
+2.20.1
+
index 61361c15462a807b77d8f1027d6a70670ef7d410..78e0ec2b954ff3730f68754636430165dfcd33ec 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nft-qos
-PKG_VERSION:=1.0.4
+PKG_VERSION:=1.0.6
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0
 
@@ -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 a3032086f51b1f7cf84ea926b0fd9352d7d72fdd..207daca3f67408bb82f8c0d0f68b8e74b1c89ad6 100644 (file)
@@ -5,6 +5,14 @@
 
 . /lib/nft-qos/core.sh
 
+qosdef_validate_dynamic() {
+       uci_load_validate nft-qos default "$1" "$2" \
+               'limit_enable:bool:0' \
+               'limit_type:maxlength(8)' \
+               'dynamic_bw_up:uinteger:100' \
+               'dynamic_bw_down:uinteger:100'
+}
+
 # return average rate for dhcp leases
 qosdef_dynamic_rate() { # <bandwidth>
        local c=0 c6=0
@@ -55,16 +63,9 @@ qosdef_flush_dynamic() {
 
 # init dynamic qos
 qosdef_init_dynamic() {
-       local dynamic_bw_up dynamic_bw_down limit_enable limit_type
        local hook_ul="prerouting" hook_dl="postrouting"
 
-       uci_validate_section nft-qos default default \
-               'limit_enable:bool:0' \
-               'limit_type:maxlength(8)' \
-               'dynamic_bw_up:uinteger:100' \
-               'dynamic_bw_down:uinteger:100'
-
-       [ $? -ne 0 ] && {
+       [ "$2" = 0 ] || {
                logger -t nft-qos-dynamic "validation failed"
                return 1
        }
index 59288b85cf335033e1570578118901b64448e581..081b13f48c7eabac4ff2b1b23cf6263691625657 100644 (file)
@@ -9,6 +9,12 @@
 P1=""; P2=""; P3=""; P4=""; P5=""; P6="";
 P7=""; P8=""; P9=""; P10=""; P11="";
 
+qosdef_validate_priority() {
+       uci_load_validate nft-qos default "$1" "$2" \
+               'priority_enable:bool:0' \
+               'priority_netdev:maxlength(8)'
+}
+
 _qosdef_handle_protox() { # <priority> <rule>
        case "$1" in
                -400) P1="$P1""$2";;
@@ -61,13 +67,9 @@ qosdef_remove_priority() {
 
 # init traffic priority
 qosdef_init_priority() {
-       local priority_enable priority_netdev ifname="br-lan"
+       local ifname="br-lan"
 
-       uci_validate_section nft-qos default default \
-               'priority_enable:bool:0' \
-               'priority_netdev:maxlength(8)'
-
-       [ $? -ne 0 ] && {
+       [ "$2" = 0 ] || {
                logger -t nft-qos-priority "validation failed"
                return 1
        }
@@ -82,6 +84,7 @@ qosdef_init_priority() {
                ;;
                wan*) network_get_device ifname "$priority_netdev" || \
                        ifname="$(uci_get network.$priority_netdev.ifname)"
+               ;;
        esac
 
        qosdef_appendx "table netdev nft-qos-priority {\n"
index 95d3162b1d5fdd96adcf1e3c892e1e0ddcb2f58a..051c0ba3d6e6e20cd60ac8ca8b547d0e4046c5b6 100644 (file)
@@ -5,6 +5,16 @@
 
 . /lib/nft-qos/core.sh
 
+qosdef_validate_static() {
+       uci_load_validate nft-qos default "$1" "$2" \
+               'limit_enable:bool:0' \
+               'limit_type:maxlength(8)' \
+               'static_unit_dl:string:kbytes' \
+               'static_unit_ul:string:kbytes' \
+               'static_rate_dl:uinteger:50' \
+               'static_rate_ul:uinteger:50'
+}
+
 # append rule for static qos
 qosdef_append_rule_sta() { # <section> <operator> <default-unit> <default-rate>
        local ipaddr unit rate
@@ -42,18 +52,9 @@ qosdef_flush_static() {
 
 # static limit rate init
 qosdef_init_static() {
-       local unit_dl unit_ul rate_dl rate_ul
-       local limit_enable limit_type hook_ul="prerouting" hook_dl="postrouting"
-
-       uci_validate_section nft-qos default default \
-               'limit_enable:bool:0' \
-               'limit_type:maxlength(8)' \
-               'static_unit_dl:string:kbytes' \
-               'static_unit_ul:string:kbytes' \
-               'static_rate_dl:uinteger:50' \
-               'static_rate_ul:uinteger:50'
+       local hook_ul="prerouting" hook_dl="postrouting"
 
-       [ $? -ne 0 ] && {
+       [ "$2" = 0 ] || {
                logger -t nft-qos-static "validation failed"
                return 1
        }
@@ -67,7 +68,7 @@ qosdef_init_static() {
        }
 
        qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-static {\n"
-       qosdef_append_chain_sta $hook_ul upload upload $unit_ul $rate_ul
-       qosdef_append_chain_sta $hook_dl download download $unit_dl $rate_dl
+       qosdef_append_chain_sta $hook_ul upload upload $static_unit_ul $static_rate_ul
+       qosdef_append_chain_sta $hook_dl download download $static_unit_dl $static_rate_dl
        qosdef_appendx "}\n"
 }
index 598fc39e7efe40d02104e31f51092f19b99455be..b81fa94a892882b9dd1d956ecefa54a085ff1296 100644 (file)
@@ -11,13 +11,7 @@ export initscript="nft-qos-dynamic"
 
 NFT_QOS_DYNAMIC_ON=
 
-qosdef_validate_section_dynamic() {
-       local limit_enable limit_type
-
-       uci_validate_section nft-qos default default \
-               'limit_enable:bool:0' \
-               'limit_type:maxlength(8)'
-
+qosdef_check_if_dynamic() {
        [ $limit_enable -eq 1 -a \
          "$limit_type" = "dynamic" ] && \
            NFT_QOS_DYNAMIC_ON="y"
@@ -28,14 +22,14 @@ logger -t nft-qos-dynamic "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOS
 
 case "$ACTION" in
        add | update | remove)
-               qosdef_validate_section_dynamic
+               qosdef_validate_dynamic default qosdef_check_if_dynamic
                [ -z "$NFT_QOS_DYNAMIC_ON" ] && return
 
                qosdef_init_env
                qosdef_flush_dynamic
 
                qosdef_init_header
-               qosdef_init_dynamic
+               qosdef_validate_dynamic default qosdef_init_dynamic
                qosdef_init_done
                qosdef_start
                ;;
index d18949007180d62342ef1e2e0220eba0b9565091..82e3b3928d710f9f10656d8805422507d28e76c5 100644 (file)
@@ -77,8 +77,9 @@ config default default
 # Traffic Priority Samples :
 #
 # protocol : tcp, udp, udplite, sctp, dccp, tcp is default
-# priority : integer between 1-11, 1 is default
-# service : you can input a integer or service name, e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
+# priority : integer between 1-11, 1 is default and the highest
+# service : you can input a integer or service name,
+#           e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
 #
 #config priority
 #      option protocol 'tcp'
index e48418c754f3359055c49de4aac2fe13f9826958..7a56ec7c69149ab632ed715a401cfda47c5773c1 100755 (executable)
@@ -14,6 +14,12 @@ USE_PROCD=1
 
 service_triggers() {
        procd_add_reload_trigger nft-qos
+
+       procd_open_validate
+       qosdef_validate_dynamic
+       qosdef_validate_static
+       qosdef_validate_priority
+       procd_close_validate
 }
 
 start_service() {
@@ -26,9 +32,9 @@ start_service() {
 
        qosdef_init_header
        qosdef_init_monitor
-       qosdef_init_dynamic
-       qosdef_init_static
-       qosdef_init_priority
+       qosdef_validate_dynamic default qosdef_init_dynamic
+       qosdef_validate_static default qosdef_init_static
+       qosdef_validate_priority default qosdef_init_priority
        qosdef_init_done
        qosdef_start
 }
index 4a52720594b1d427cc957cd1a46f0a7704ef8532..17794f87f4e7e47ec498a3d3dae2927b7b00ba0b 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nginx
-PKG_VERSION:=1.15.8
+PKG_VERSION:=1.15.10
 PKG_RELEASE:=1
 
 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://nginx.org/download/
-PKG_HASH:=a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787
+PKG_HASH:=b865743abd52bce4745d0f7e7fedde3cafbaaab617b022c105e3e4e456537c3c
 
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de> \
                                Ansuel Smith <ansuelsmth@gmail.com>
@@ -71,6 +71,7 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_NGINX_STREAM_SSL_PREREAD_MODULE \
        CONFIG_NGINX_RTMP_MODULE \
        CONFIG_NGINX_TS_MODULE \
+       CONFIG_OPENSSL_ENGINE \
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -80,7 +81,7 @@ define Package/nginx/default
   SUBMENU:=Web Servers/Proxies
   TITLE:=Nginx web server
   URL:=http://nginx.org/
-  DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl \
+  DEPENDS:=+NGINX_PCRE:libpcre +NGINX_SSL:libopenssl \
        +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread +NGINX_DAV:libexpat
 endef
 
@@ -104,7 +105,7 @@ define Package/nginx-ssl
 endef
 
 Package/nginx-ssl/description = $(Package/nginx/description) \
-  This varian is compiled with SSL support enabled. To enable additional module \
+  This variant is compiled with SSL support enabled. To enable additional module \
   select them in the nginx default configuration menu.
 
 define Package/nginx-all-module
@@ -116,7 +117,7 @@ define Package/nginx-all-module
 endef
 
 Package/nginx-all-module/description = $(Package/nginx/description) \
-  This varian is compiled with ALL module selected.
+  This variant is compiled with ALL module selected.
 
 define Package/nginx/config
   source "$(SOURCE)/Config.in"
index 385d25cb4e272b58e7b14d19e44c2380326bc638..48773f4eae1a3d05a057b430979220f22774baa9 100644 (file)
@@ -8,22 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ngircd
-PKG_VERSION:=24
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Claudio Leite <leitec@staticky.com>
+PKG_VERSION:=25
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://ngircd.barton.de/pub/ngircd
+PKG_HASH:=c4997cae3e3dd6ff6a605ca274268f2b8c9ba0b1a96792c7402e5594222eee4e
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:= \
-        http://ngircd.barton.de/pub/ngircd/ \
-        ftp://ftp.berlios.de/pub/ngircd/
-PKG_HASH:=3e00a7da52c81fc1e02bb996a27bf43da905ba7037bf8c6bb3bd13321e0c85ab
-
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ngircd/Default
@@ -32,7 +31,7 @@ define Package/ngircd/Default
   SUBMENU:=Instant Messaging
   DEPENDS:=+zlib
   TITLE:=Next Generation IRC Server
-  URL:=http://ngircd.barton.de
+  URL:=https://ngircd.barton.de
 endef
 
 define Package/ngircd/Default/description
diff --git a/net/ngircd/patches/010-Fix-compilation-without-deprecated-OpenSSL-APIs.patch b/net/ngircd/patches/010-Fix-compilation-without-deprecated-OpenSSL-APIs.patch
deleted file mode 100644 (file)
index dbea14c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From d7bf6c919259a65d78b5bf67a3c75838f8894e91 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 25 Nov 2018 19:59:49 -0800
-Subject: [PATCH] Fix compilation without deprecated OpenSSL APIs
-
----
- src/ngircd/conf-ssl.h | 4 ++++
- src/ngircd/conn-ssl.c | 3 ++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/ngircd/conf-ssl.h b/src/ngircd/conf-ssl.h
-index c2373797..af715af8 100644
---- a/src/ngircd/conf-ssl.h
-+++ b/src/ngircd/conf-ssl.h
-@@ -13,6 +13,10 @@
- #ifdef HAVE_LIBSSL
- #define SSL_SUPPORT
- #include <openssl/ssl.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define OpenSSL_version SSLeay_version
-+#define OPENSSL_VERSION SSLEAY_VERSION
-+#endif
- #endif
- #ifdef HAVE_LIBGNUTLS
- #define SSL_SUPPORT
-diff --git a/src/ngircd/conn-ssl.c b/src/ngircd/conn-ssl.c
-index 705c29d5..ba47e513 100644
---- a/src/ngircd/conn-ssl.c
-+++ b/src/ngircd/conn-ssl.c
-@@ -42,6 +42,7 @@ extern struct SSLOptions Conf_SSLOptions;
- #ifdef HAVE_LIBSSL
- #include <openssl/err.h>
- #include <openssl/rand.h>
-+#include <openssl/dh.h>
- static SSL_CTX * ssl_ctx;
- static DH *dh_params;
-@@ -326,7 +327,7 @@ ConnSSL_InitLibrary( void )
-                          Verify_openssl);
-       SSL_CTX_free(ssl_ctx);
-       ssl_ctx = newctx;
--      Log(LOG_INFO, "%s initialized.", SSLeay_version(SSLEAY_VERSION));
-+      Log(LOG_INFO, "%s initialized.", OpenSSL_version(OPENSSL_VERSION));
-       return true;
- out:
-       SSL_CTX_free(newctx);
index 8c16d7b285161e1decb31b12b1fe6a22ab9bf8ce..e98924a7ae8387c8e7e067be20b52e5d1246baa0 100644 (file)
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntp
-PKG_VERSION:=4.2.8p12
+PKG_VERSION:=4.2.8p13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
-PKG_HASH:=709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
+PKG_HASH:=288772cecfcd9a53694ffab108d1825a31ba77f3a8466b0401baeca3bc232a38
 
 PKG_LICENSE:=Unique
 PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html
+PKG_CPE_ID:=cpe:/a:ntp:ntp
 
 PKG_FIXUP:=autoreconf
 PKG_LIBTOOL_PATHS:=. sntp
index 0aaf132a4406a198acd6b981658e5ab71a8a2e1e..6e73489d4ae8e7842eaf0a2c753b314c1dd1fd7f 100644 (file)
@@ -8,7 +8,7 @@ USE_PROCD=1
 PROG=/sbin/ntpd
 HOTPLUG_HELPER=/usr/sbin/ntpd.hotplug-helper
 
-config_file=/var/run/ntpd.conf
+config_file=/var/etc/ntpd.conf
 
 trunc() {
        echo -n "" > $config_file
@@ -19,15 +19,15 @@ emit() {
 }
 
 validate_ntp_section() {
-       uci_validate_section system timeserver "${1}" \
+       uci_load_validate system timeserver "$1" "$2" \
                'server:list(host)' 'enabled:bool:1' 'enable_server:bool:0' \
                'interface:list(string)'
 }
 
-start_service() {
-       local server enabled enable_server interface intf
+start_ntpd_instance() {
+       local intf i
 
-       validate_ntp_section ntp || {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
@@ -85,3 +85,12 @@ start_service() {
        procd_set_param command $HOTPLUG_HELPER
        procd_close_instance
 }
+
+start_service() {
+       validate_ntp_section ntp start_ntpd_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger "system"
+       procd_add_validation validate_ntp_section
+}
index 0fc60f17d3d6d0099f99ada0ac260df5285d57a5..9b4c4332f9d8a67303b5d7ef39dfece25c55be12 100644 (file)
@@ -8,14 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=obfs4proxy
-PKG_VERSION:=0.0.7
-PKG_RELEASE:=1
+PKG_VERSION:=0.0.9
+PKG_RELEASE:=2
 
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.torproject.org/pluggable-transports/obfs4.git
-PKG_SOURCE_VERSION:=8256fac93c2cf79742725e3aaced5bbe3380fd32
-PKG_SOURCE_DATE:=20161115
-PKG_MIRROR_HASH:=9c504337f7a2b46310083224cf0998fc7645f8af5d50657cf74358d39916eddc
+PKG_SOURCE:=obfs4-$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4/-/archive/$(PKG_NAME)-$(PKG_VERSION)/
+PKG_HASH:=ab2608014fae15b4e0dad2f8128e81f912ab27277539004b759180c1fb5007dd
+PKG_BUILD_DIR:=$(BUILD_DIR)/obfs4-$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE
@@ -25,14 +24,14 @@ PKG_BUILD_DEPENDS:=golang/host
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
-GO_PKG:=git.torproject.org/pluggable-transports/obfs4.git
+GO_PKG:=gitlab.com/yawning/obfs4.git
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/golang/golang-package.mk
 
 define Package/obfs4proxy/Default
   TITLE:=A Tor pluggable transport proxy, implementing obfs4
-  URL:=https://gitweb.torproject.org/pluggable-transports/obfs4.git/
+  URL:=https://gitlab.com/yawning/obfs4
   DEPENDS:=$(GO_ARCH_DEPENDS)
 endef
 
@@ -42,16 +41,10 @@ $(call Package/obfs4proxy/Default)
   CATEGORY:=Network
 endef
 
-define Package/golang-torproject-pluggable-transports-obfs4-dev
+define Package/golang-gitlab-yawning-obfs4-dev
 $(call Package/obfs4proxy/Default)
 $(call GoPackage/GoSubMenu)
   TITLE+= (source files)
-  DEPENDS+= \
-    +golang-github-agl-ed25519-dev \
-    +golang-github-dchest-siphash-dev \
-    +golang-golang-x-crypto-dev \
-    +golang-golang-x-net-dev \
-    +golang-torproject-pluggable-transports-goptlib-dev
   PKGARCH:=all
 endef
 
@@ -76,7 +69,7 @@ This package contains both the client and the bridge in a single
 program.
 endef
 
-define Package/golang-torproject-pluggable-transports-obfs4-dev/description
+define Package/golang-gitlab-yawning-obfs4-dev/description
 $(call Package/obfs4proxy/Default/description)
 
 This package provides the source files for the client/bridge program.
@@ -84,6 +77,5 @@ endef
 
 $(eval $(call GoBinPackage,obfs4proxy))
 $(eval $(call BuildPackage,obfs4proxy))
-
-$(eval $(call GoSrcPackage,golang-torproject-pluggable-transports-obfs4-dev))
-$(eval $(call BuildPackage,golang-torproject-pluggable-transports-obfs4-dev))
+$(eval $(call GoSrcPackage,golang-gitlab-yawning-obfs4-dev))
+$(eval $(call BuildPackage,golang-gitlab-yawning-obfs4-dev))
diff --git a/net/obfs4proxy/patches/bug-24793-send-correct-http-header-for-basic-auth.patch b/net/obfs4proxy/patches/bug-24793-send-correct-http-header-for-basic-auth.patch
deleted file mode 100644 (file)
index 42042f2..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-From af4824cb0b2c36a0eba4bc1590eb0737302e992e Mon Sep 17 00:00:00 2001
-From: Yawning Angel <yawning@schwanenlied.me>
-Date: Wed, 10 Jan 2018 15:11:44 +0000
-Subject: Bug 24793: Send the correct authorization HTTP header for basic auth.
-
-Apparently I didn't test the "connect via HTTP(s)" proxy with
-authentication at all when I added that functionality, so it has been
-broken for years.
-
-This should fix it now.
----
- obfs4proxy/proxy_http.go | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go
-index 6f11790..a5c2100 100644
---- a/obfs4proxy/proxy_http.go
-+++ b/obfs4proxy/proxy_http.go
-@@ -29,6 +29,7 @@ package main
- import (
-       "bufio"
-+      "encoding/base64"
-       "fmt"
-       "net"
-       "net/http"
-@@ -90,7 +91,9 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
-       }
-       req.Close = false
-       if s.haveAuth {
--              req.SetBasicAuth(s.username, s.password)
-+              // SetBasicAuth doesn't quite do what is appropriate, because
-+              // the correct header is `Proxy-Authorization`.
-+              req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username + ":" + s.password)))
-       }
-       req.Header.Set("User-Agent", "")
--- 
-cgit v1.1
-
index fbf308e412b728af5bbb58a1e686dc2ebbe8b8e7..cca8f2b7677f34ff28d739f21b5f9700fc0db266 100644 (file)
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=obfsproxy
 PKG_VERSION:=0.2.13
-PKG_RELEASE:=1
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://pypi.python.org/packages/source/o/obfsproxy
+PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/o/obfsproxy
 PKG_HASH:=1e26c2faef1cfcf856ddf60e9647058a7c78fb0d47f05b58a0f847ed7cc41a66
 
 PKG_LICENSE:=BSD-3-Clause
@@ -23,11 +23,18 @@ include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python-package.mk
 
 define Package/obfsproxy
-       SECTION:=net
-       CATEGORY:=Network
-       TITLE:=A pluggable transport proxy written in Python
-       URL:=https://www.torproject.org/projects/obfsproxy.html.en
-       DEPENDS:=+python-light +python-crypto +python-pyptlib +python-setuptools +python-yaml +twisted
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=A pluggable transport proxy written in Python
+  URL:=https://gitweb.torproject.org/pluggable-transports/obfsproxy.git/
+  DEPENDS:= \
+      +python-light \
+      +python-crypto \
+      +python-pyptlib \
+      +python-setuptools \
+      +python-twisted \
+      +python-yaml
+  VARIANT:=python
 endef
 
 define Package/obfsproxy/description
@@ -42,10 +49,6 @@ define Package/obfsproxy/conffiles
 /etc/config/obfsproxy
 endef
 
-define Build/Compile
-       $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
-endef
-
 define PyPackage/obfsproxy/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfsproxy $(1)/usr/bin/
@@ -57,3 +60,4 @@ endef
 
 $(eval $(call PyPackage,obfsproxy))
 $(eval $(call BuildPackage,obfsproxy))
+$(eval $(call BuildPackage,obfsproxy-src))
index 7338a30f2c300b7f212468bc7357ea9acdfab680..dbffd3aeffeee48ace39f08deb6d5d6555284845 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocserv
-PKG_VERSION:=0.12.2
+PKG_VERSION:=0.12.3
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_HASH:=71ccf1dfe9e13a05d9dc1104256cad6ff91e7b7d8c07a02398842ce018a3897d
+PKG_HASH:=42f8f459dae6f88862d4098997d8f5668d97439ec78beede3985f6ff24d91edd
 
 PKG_LICENSE:=GPLv2+
 PKG_LICENSE_FILES:=COPYING
index e37920bd2bc7360780786916ca8a0c813251034a..39b02758f084d5049ffb08f9c0c0fb0d42b51855 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssh
 PKG_VERSION:=7.9p1
-PKG_RELEASE:=3
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@@ -180,7 +180,7 @@ CONFIGURE_ARGS += \
        --without-pam
 endif
 
-ifeq ($(CONFIG_OPENSSL_ENGINE_CRYPTO),y)
+ifeq ($(CONFIG_OPENSSL_ENGINE),y)
 CONFIGURE_ARGS+= \
        --with-ssl-engine
 endif
index a75daae4cd3f9229be0183c505d266f6c7aa6ec1..680da400129d3fbda4c2f78d57b5be5698914dcc 100644 (file)
@@ -8,7 +8,8 @@ USE_PROCD=1
 PROG=/usr/sbin/sshd
 
 start_service() {
-       for type in rsa ecdsa ed25519; do {
+       for type in rsa ecdsa ed25519
+       do
                # check for keys
                key=/etc/ssh/ssh_host_${type}_key
                [ ! -f $key ] && {
@@ -17,11 +18,11 @@ start_service() {
                                /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&-
                        }
                }
-       }; done
+       done
        mkdir -m 0700 -p /var/empty
 
-       local lport=`grep ^Port /etc/ssh/sshd_config | cut -d " " -f 2`
-       [ -z $lport ] && lport=22
+       local lport=$(awk '/^Port / { print $2; exit }' /etc/ssh/sshd_config)
+       [ -z "$lport" ] && lport=22
 
        procd_open_instance
        procd_add_mdns "ssh" "tcp" "$lport"
@@ -31,16 +32,13 @@ start_service() {
 
 shutdown() {
        local pid
-       local pids
-       local pid_mine
 
        stop
 
        # kill active clients
-       pid_mine="$$"
-       pids="$(pidof sshd)"
-       for pid in $pids; do
-               [ "$pid" = "$pid_mine" ] && continue
+       for pid in $(pidof sshd)
+       do
+               [ "$pid" == "$$" ] && continue
                [ -e "/proc/$pid/stat" ] && kill $pid
        done
 }
diff --git a/net/openssh/patches/0001-fix-compilation-with-openssl-built-without-ECC.patch b/net/openssh/patches/0001-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/0001-fix-key-type-check.patch b/net/openssh/patches/0001-fix-key-type-check.patch
new file mode 100644 (file)
index 0000000..c5b9f0e
--- /dev/null
@@ -0,0 +1,82 @@
+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-Fix-OPENSSL_init_crypto-call-for-openssl-1.1.patch b/net/openssh/patches/0002-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 |
diff --git a/net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch b/net/openssh/patches/0002-request-rsa-sha2-cert-signatures.patch
new file mode 100644 (file)
index 0000000..2c876be
--- /dev/null
@@ -0,0 +1,39 @@
+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
new file mode 100644 (file)
index 0000000..347382b
--- /dev/null
@@ -0,0 +1,258 @@
+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
new file mode 100644 (file)
index 0000000..f89ee17
--- /dev/null
@@ -0,0 +1,108 @@
+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
new file mode 100644 (file)
index 0000000..519358c
--- /dev/null
@@ -0,0 +1,187 @@
+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
new file mode 100644 (file)
index 0000000..0cbdcfd
--- /dev/null
@@ -0,0 +1,353 @@
+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
new file mode 100644 (file)
index 0000000..e430dfe
--- /dev/null
@@ -0,0 +1,70 @@
+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
new file mode 100644 (file)
index 0000000..7c1e15d
--- /dev/null
@@ -0,0 +1,20 @@
+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 1a0f7672f8b5acaaca344bb2ca526dd438a95e4b..9dfe83277b2ffb8fdff17d139fadebff98418b6e 100644 (file)
@@ -15,11 +15,11 @@ include $(INCLUDE_DIR)/kernel.mk
 #  - Check and update kmod dependencies when necessary (runtime module load check in the least)
 #
 PKG_NAME:=openvswitch
-PKG_VERSION:=2.10.1
+PKG_VERSION:=2.11.0
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
-PKG_HASH:=4f93c764295952848a924271250d7c6a6a53747d0019ef6ff880aa8ea6897c80
+PKG_HASH:=f4b01d7376d7298bc6e7fa7a6067229ca7c7e299394e5ea9aff651d52edfdbee
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
@@ -39,7 +39,7 @@ include ../../lang/python/python-package.mk
 
 ovs_kmod_packages:=
 ovs_kmod_intree_kernel_patchver_min:=3.10
-ovs_kmod_intree_kernel_patchver_max:=4.15
+ovs_kmod_intree_kernel_patchver_max:=4.18
 ovs_kmod_intree_not_supported:=$(strip $(call kernel_patchver_lt,$(ovs_kmod_intree_kernel_patchver_min))$(call kernel_patchver_gt,$(ovs_kmod_intree_kernel_patchver_max)))
 ovs_kmod_intree_dir:=$(PKG_BUILD_DIR)/datapath/linux
 ovs_kmod_upstream_dir:=$(LINUX_DIR)/net/openvswitch
@@ -144,7 +144,7 @@ define OvsPackageTemplate
      URL:=https://www.openvswitch.org
      TITLE:=$(ovs_$(1)_title)
      HIDDEN:=$(ovs_$(1)_hidden)
-     DEPENDS:=$(ovs_$(1)_depends) +libunbound
+     DEPENDS:=$(ovs_$(1)_depends) +libatomic +libunbound
   endef
 
   define Package/$(call ovs_package_name,$(1))/install
diff --git a/net/openvswitch/patches/0001-musl-compatibility.patch b/net/openvswitch/patches/0001-musl-compatibility.patch
deleted file mode 100644 (file)
index b648add..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -122,7 +122,6 @@ OVS_CHECK_SOCKET_LIBS
- OVS_CHECK_XENSERVER_VERSION
- OVS_CHECK_GROFF
- OVS_CHECK_TLS
--OVS_CHECK_ATOMIC_LIBS
- OVS_CHECK_GCC4_ATOMICS
- OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
- OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
---- a/lib/netdev-linux.c
-+++ b/lib/netdev-linux.c
-@@ -39,7 +39,9 @@
- #include <netpacket/packet.h>
- #include <net/if.h>
- #include <net/if_arp.h>
-+#if defined(__UCLIBC__) || defined(__GLIBC__)
- #include <net/if_packet.h>
-+#endif
- #include <net/route.h>
- #include <poll.h>
- #include <stdlib.h>
---- a/lib/ovs-atomic.h
-+++ b/lib/ovs-atomic.h
-@@ -320,7 +320,7 @@
- #include "util.h"
- #define IN_OVS_ATOMIC_H
--    #if __CHECKER__
-+    #if 1
-         /* sparse doesn't understand some GCC extensions we use. */
-         #include "ovs-atomic-pthreads.h"
-     #elif __has_extension(c_atomic)
diff --git a/net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch b/net/openvswitch/patches/0001-netdev-linux-Let-interface-flag-survive-internal-por.patch
new file mode 100644 (file)
index 0000000..52ad7c7
--- /dev/null
@@ -0,0 +1,38 @@
+From c7247a20c7779dbeafda7767f4a3c090da37c0c0 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
+ setup
+
+Due to a race condition when bringing up an internal port on Linux
+some interface flags (e.g. IFF_MULTICAST) are falsely reset. This
+happens because netlink events may be processed after the according
+netdev has been brought up (which sets interface flags).
+
+Fix this by reading the interface flags just before updating them
+if they have not been updated by from the kernel yet.
+
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+---
+ lib/netdev-linux.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
+index 25d037cb6..ba1427986 100644
+--- a/lib/netdev-linux.c
++++ b/lib/netdev-linux.c
+@@ -3117,7 +3117,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
+     unsigned int old_flags, new_flags;
+     int error = 0;
+-    old_flags = netdev->ifi_flags;
++    if (!(netdev->cache_valid & VALID_DRVINFO)) {
++        /* Most likely the debvice flags are not in sync yet, fetch them now */
++        get_flags(&netdev->up, &old_flags);
++    } else {
++        old_flags = netdev->ifi_flags;
++    }
++
+     *old_flagsp = iff_to_nd_flags(old_flags);
+     new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
+     if (new_flags != old_flags) {
diff --git a/net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch b/net/openvswitch/patches/0002-python-separate-host-target-python-for-cross-compile.patch
new file mode 100644 (file)
index 0000000..404e22c
--- /dev/null
@@ -0,0 +1,41 @@
+From 38d142005a0b582efdad5580e311d815ad1f34a4 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
+
+At the moment, python-six is a requirement for openvswitch python
+library on target machine.
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ Makefile.am       | 2 +-
+ m4/openvswitch.m4 | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ff1f94b48..417f53230 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -60,7 +60,7 @@ endif
+ # foo/__init__.pyc will cause Python to ignore foo.py.
+ run_python = \
+       PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
+-      PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
++      PYTHONDONTWRITEBYTECODE=yes $(PYTHON_HOST)
+ ALL_LOCAL =
+ BUILT_SOURCES =
+diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
+index 41042c98e..4a5f0a84a 100644
+--- a/m4/openvswitch.m4
++++ b/m4/openvswitch.m4
+@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
+       fi])
+     AC_SUBST([PYTHON])
+     PYTHON=$ovs_cv_python
++    PYTHON_HOST=$ovs_cv_python_host
+     AC_SUBST([HAVE_PYTHON])
++    AM_MISSING_PROG([PYTHON_HOST], [python])
+     HAVE_PYTHON=yes
+     AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
diff --git a/net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch b/net/openvswitch/patches/0003-ovs-lib-fix-install_dir.patch
new file mode 100644 (file)
index 0000000..f09f6e9
--- /dev/null
@@ -0,0 +1,28 @@
+From b476094a64213da20f88976d7562cb4e8d9f2101 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()
+
+The command "install" is not available in OpenWrt by default
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ utilities/ovs-lib.in | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
+index 9a0af2e82..68ab3f250 100644
+--- a/utilities/ovs-lib.in
++++ b/utilities/ovs-lib.in
+@@ -159,7 +159,10 @@ install_dir () {
+     [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
+     if test ! -d "$DIR"; then
+-        install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
++        mkdir -p "$DIR"
++        chmod "$INSTALL_MODE" "$DIR"
++        chown "$INSTALL_USER" "$DIR"
++        chgrp "$INSTALL_GROUP" "$DIR"
+         restorecon "$DIR" >/dev/null 2>&1
+     fi
+ }
diff --git a/net/openvswitch/patches/0004-build-disable-building-tests.patch b/net/openvswitch/patches/0004-build-disable-building-tests.patch
new file mode 100644 (file)
index 0000000..8f8d960
--- /dev/null
@@ -0,0 +1,22 @@
+From d0ffc7cc1a0eb217963099fd90bd437b09b6068d 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
+
+Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
+---
+ Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 417f53230..3fc630f33 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -480,7 +480,6 @@ include m4/automake.mk
+ include lib/automake.mk
+ include ofproto/automake.mk
+ include utilities/automake.mk
+-include tests/automake.mk
+ include include/automake.mk
+ include third-party/automake.mk
+ include debian/automake.mk
diff --git a/net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch b/net/openvswitch/patches/0100-netdev-linux-Use-unsigned-int-for-ifi_flags.patch
deleted file mode 100644 (file)
index 9c2a154..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From e4ac9741a99866976322c21605b312bc27633c92 Mon Sep 17 00:00:00 2001
-From: Helmut Schaa <helmut.schaa@googlemail.com>
-Date: Wed, 8 Jan 2014 13:48:33 +0100
-Subject: [PATCH 100/107] netdev-linux: Use unsigned int for ifi_flags
-
-ifi_flags is unsigned, the local equivalents should do the same.
-
-Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
----
- lib/netdev-linux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index e16ea58a0..5ada9a21f 100644
---- a/lib/netdev-linux.c
-+++ b/lib/netdev-linux.c
-@@ -3115,7 +3115,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
-              enum netdev_flags on, enum netdev_flags *old_flagsp)
-     OVS_REQUIRES(netdev->mutex)
- {
--    int old_flags, new_flags;
-+    unsigned int old_flags, new_flags;
-     int error = 0;
-     old_flags = netdev->ifi_flags;
diff --git a/net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch b/net/openvswitch/patches/0101-netdev-linux-Let-interface-flag-survive-internal-por.patch
deleted file mode 100644 (file)
index 45770b7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-From 9f4775d9a2541e8128ea99f3b02925cc1ee05374 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 101/107] netdev-linux: Let interface flag survive internal
- port setup
-
-Due to a race condition when bringing up an internal port on Linux
-some interface flags (e.g. IFF_MULTICAST) are falsely reset. This
-happens because netlink events may be processed after the according
-netdev has been brought up (which sets interface flags).
-
-Fix this by reading the interface flags just before updating them
-if they have not been updated by from the kernel yet.
-
-Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
----
- lib/netdev-linux.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
-index 5ada9a21f..bb8275cfa 100644
---- a/lib/netdev-linux.c
-+++ b/lib/netdev-linux.c
-@@ -3118,7 +3118,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off,
-     unsigned int old_flags, new_flags;
-     int error = 0;
--    old_flags = netdev->ifi_flags;
-+    if (!(netdev->cache_valid & VALID_DRVINFO)) {
-+        /* Most likely the debvice flags are not in sync yet, fetch them now */
-+        get_flags(&netdev->up, &old_flags);
-+    } else {
-+        old_flags = netdev->ifi_flags;
-+    }
-+
-     *old_flagsp = iff_to_nd_flags(old_flags);
-     new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on);
-     if (new_flags != old_flags) {
diff --git a/net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch b/net/openvswitch/patches/0102-python-separate-host-target-python-for-cross-compile.patch
deleted file mode 100644 (file)
index e403f26..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From e451d74788c73e8679e6a2268185a08901ac7f8c Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Tue, 21 Aug 2018 12:21:05 +0000
-Subject: [PATCH 102/107] python: separate host/target python for cross-compile
-
-At the moment, python-six is a requirement for openvswitch python
-library on target machine.
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- Makefile.am       | 2 +-
- m4/openvswitch.m4 | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 788972804..cd90cc176 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -60,7 +60,7 @@ endif
- # foo/__init__.pyc will cause Python to ignore foo.py.
- run_python = \
-       PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
--      PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
-+      PYTHONDONTWRITEBYTECODE=yes $(PYTHON_HOST)
- ALL_LOCAL =
- BUILT_SOURCES =
-diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
-index 5743f83ce..acb6b140e 100644
---- a/m4/openvswitch.m4
-+++ b/m4/openvswitch.m4
-@@ -449,7 +449,9 @@ AC_DEFUN([OVS_CHECK_PYTHON],
-       fi])
-     AC_SUBST([PYTHON])
-     PYTHON=$ovs_cv_python
-+    PYTHON_HOST=$ovs_cv_python_host
-     AC_SUBST([HAVE_PYTHON])
-+    AM_MISSING_PROG([PYTHON_HOST], [python])
-     HAVE_PYTHON=yes
-     AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
diff --git a/net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch b/net/openvswitch/patches/0103-ovs-ctl-fix-setting-hostname.patch
deleted file mode 100644 (file)
index 5910a6b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6b9732c8851c5466f2a363d88b5acae320801efe Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 14 Mar 2018 16:40:01 +0800
-Subject: [PATCH 103/107] ovs-ctl: fix setting hostname
-
-The command "hostname" is not available in OpenWrt by default.
-
-The other thing to note is that currently kernel.hostname is not a fully
-qualitied name
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- utilities/ovs-ctl.in | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
-index 43c8f32b7..6203ecff5 100755
---- a/utilities/ovs-ctl.in
-+++ b/utilities/ovs-ctl.in
-@@ -36,9 +36,7 @@ insert_mod_if_required () {
- }
- set_hostname () {
--    # 'hostname -f' needs network connectivity to work.  So we should
--    # call this only after ovs-vswitchd is running.
--    ovs_vsctl set Open_vSwitch . external-ids:hostname="$(hostname -f)"
-+    ovs_vsctl set Open_vSwitch . external-ids:hostname="$(sysctl -n kernel.hostname)"
- }
- set_system_ids () {
diff --git a/net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch b/net/openvswitch/patches/0104-ovs-lib-fix-install_dir.patch
deleted file mode 100644 (file)
index 86c329f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From 940441e2982cb35765830060e8203e5dd1a0f967 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 14 Mar 2018 16:44:13 +0800
-Subject: [PATCH 104/107] ovs-lib: fix install_dir()
-
-The command "install" is not available in OpenWrt by default
-
-Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
----
- utilities/ovs-lib.in | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
-index 090a14434..f2a30e065 100644
---- a/utilities/ovs-lib.in
-+++ b/utilities/ovs-lib.in
-@@ -159,7 +159,10 @@ install_dir () {
-     [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
-     if test ! -d "$DIR"; then
--        install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
-+        mkdir -p "$DIR"
-+        chmod "$INSTALL_MODE" "$DIR"
-+        chown "$INSTALL_USER" "$DIR"
-+        chgrp "$INSTALL_GROUP" "$DIR"
-         restorecon "$DIR" >/dev/null 2>&1
-     fi
- }
diff --git a/net/openvswitch/patches/0105-build-disable-building-tests.patch b/net/openvswitch/patches/0105-build-disable-building-tests.patch
deleted file mode 100644 (file)
index 424b85a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From d0cad5ac122aca722dc2013c1f53fda44c477cf2 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Tue, 21 Aug 2018 13:02:21 +0000
-Subject: [PATCH 105/107] build: disable building tests
-
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- Makefile.am | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index cd90cc176..2e9e50f3a 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -477,7 +477,6 @@ include m4/automake.mk
- include lib/automake.mk
- include ofproto/automake.mk
- include utilities/automake.mk
--include tests/automake.mk
- include include/automake.mk
- include third-party/automake.mk
- include debian/automake.mk
diff --git a/net/openvswitch/patches/0106-ovs-save-compatible-with-busybox-ip-command.patch b/net/openvswitch/patches/0106-ovs-save-compatible-with-busybox-ip-command.patch
deleted file mode 100644 (file)
index 412cad3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From 2a59f2b60e8a22dc93d48c511b5c4255b429ff66 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Wed, 5 Sep 2018 12:32:54 +0000
-Subject: [PATCH 106/107] ovs-save: compatible with busybox ip command
-
-Busybox ip command will have exit code 1 for `ip -V` or `ip help` etc.,
-use `ip rule list` to cover both iproute2 and busybox ip command
-
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- utilities/ovs-save | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utilities/ovs-save b/utilities/ovs-save
-index ea8fb6a45..72d460df4 100755
---- a/utilities/ovs-save
-+++ b/utilities/ovs-save
-@@ -38,7 +38,7 @@ EOF
- }
- save_interfaces () {
--    if (ip -V) > /dev/null 2>&1; then :; else
-+    if (ip rule list) > /dev/null 2>&1; then :; else
-         echo "$0: ip not found in $PATH" >&2
-         exit 1
-     fi
diff --git a/net/openvswitch/patches/0107-datapath-use-KARCH-when-building-linux-datapath-modu.patch b/net/openvswitch/patches/0107-datapath-use-KARCH-when-building-linux-datapath-modu.patch
deleted file mode 100644 (file)
index ddfc397..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From 1e859f407b94a0f549fc41fceec11ca12653878b Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <zhouyousong@yunionyun.com>
-Date: Thu, 6 Sep 2018 11:48:20 +0000
-Subject: [PATCH 107/107] datapath: use KARCH when building linux datapath
- modules
-
-Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
----
- datapath/linux/Makefile.main.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/datapath/linux/Makefile.main.in b/datapath/linux/Makefile.main.in
-index 7d18253be..039485d16 100644
---- a/datapath/linux/Makefile.main.in
-+++ b/datapath/linux/Makefile.main.in
-@@ -68,10 +68,10 @@ ifeq (,$(wildcard $(CONFIG_FILE)))
- endif
- default:
--      $(MAKE) -C $(KSRC) M=$(builddir) modules
-+      $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules
- modules_install:
--      $(MAKE) -C $(KSRC) M=$(builddir) modules_install
-+      $(MAKE) -C $(KSRC) $(if @KARCH@,ARCH=@KARCH@) M=$(builddir) modules_install
-       depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' $(KSRC)/include/generated/utsrelease.h`
- endif
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 605d09922c574ac29db1dbbce44995fe1237510b..d350875d3c15cc4639165deec7ffa0dc88cc4e49 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=privoxy
-PKG_VERSION:=3.0.26
-PKG_RELEASE:=4
+PKG_VERSION:=3.0.28
+PKG_RELEASE:=1
 
 PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz
 PKG_SOURCE_URL:=@SF/ijbswa
-PKG_HASH:=57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8
+PKG_HASH:=b5d78cc036aaadb3b7cf860e9d598d7332af468926a26e2d56167f1cb6f2824a
 PKG_BUILD_DIR:=$(BUILD_DIR)/privoxy-$(PKG_VERSION)-stable
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index f08b7d2636ac1ec589876ff3eef103c2c02eac4a..c5c0d89138d91f7d35c06eb5e7941186c17aee09 100644 (file)
@@ -8,14 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prosody
-PKG_VERSION:=0.9.12
-PKG_RELEASE:=1
+PKG_VERSION:=0.11.2
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://prosody.im/downloads/source
-PKG_HASH:=1a59a322b71928a21985522aa00d0eab3552208d7bf9ecb318542a1b2fee3e8d
+PKG_SOURCE_URL:=https://prosody.im/downloads/source
+PKG_HASH:=8911f6dc29b9e0c4edf9e61dc23fa22d77bc42c4caf28b809ab843b2f08e4831
 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
 PKG_LICENSE:=MIT/X11
+PKG_BUILD_DEPENDS:=lua/host
+PKG_CPE_ID:=cpe:/a:prosody:prosody
+HOST_BUILD_DEPENDS:=$(PKG_BUILD_DEPENDS)
 
 PKG_INSTALL:=1
 
@@ -25,9 +28,9 @@ define Package/prosody
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Instant Messaging
-  DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua 
+  DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua +luabitop
   TITLE:=XMPP server
-  URL:=http://prosody.im/
+  URL:=https://prosody.im/
   USERID:=prosody=54:prosody=54
 endef
 
@@ -41,30 +44,24 @@ 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
        (cd $(PKG_BUILD_DIR); ./configure \
                --prefix=/usr \
-               --with-lua="$(STAGING_DIR_HOSTPKG)/bin" \
+               --with-lua="$(STAGING_DIR_HOSTPKG)" \
                --with-lua-include="$(STAGING_DIR)/usr/include" \
                --with-lua-lib="$(STAGING_DIR)/usr/lib" \
                --cflags="$(TARGET_CFLAGS)" \
-               --ldflags="$(TARGET_LDFLAGS) -llua -lm -ldl -shared" \
+               --ldflags="$(TARGET_LDFLAGS)" \
                --c-compiler="$(CC)" \
-               --linker="$(LD)" \
                --datadir="/etc/prosody/data" \
        )
 endef
-#      LDFLAGS="$(TARGET_LDFLAGS) -llua -lm -ldl" \
-
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
-       PREFIX="/usr" \
 
 define Package/prosody/install
        $(INSTALL_DIR) $(1)/etc/init.d
@@ -81,7 +78,7 @@ define Package/prosody/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/core
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/
-       $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
+       #$(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
        #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/modules
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/
@@ -91,12 +88,20 @@ define Package/prosody/install
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_s2s/*.lua $(1)/usr/lib/prosody/modules/mod_s2s/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/muc
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/muc/*.lua $(1)/usr/lib/prosody/modules/muc/
-       $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/
+       $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_pubsub
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_pubsub/*.lua $(1)/usr/lib/prosody/modules/mod_pubsub/
+       $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_mam
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_mam/*.lua $(1)/usr/lib/prosody/modules/mod_mam/
+       #$(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage
+       #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/net
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/net/http
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/http/*.lua $(1)/usr/lib/prosody/net/http/
+       $(INSTALL_DIR) $(1)/usr/lib/prosody/net/resolvers
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/resolvers/*.lua $(1)/usr/lib/prosody/net/resolvers/
+       $(INSTALL_DIR) $(1)/usr/lib/prosody/net/websocket
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/websocket/*.lua $(1)/usr/lib/prosody/net/websocket/
        $(INSTALL_DIR) $(1)/usr/lib/prosody/util
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/
@@ -113,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 0fe42163d00812656947225e51806544ee5cbe3d..2ec0ff52c7b0766679a9f94a42c62ff9316a818b 100644 (file)
@@ -1,10 +1,11 @@
 -- Prosody Example Configuration File
 --
 -- Information on configuring Prosody can be found on our
--- website at http://prosody.im/doc/configure
+-- website at https://prosody.im/doc/configure
 --
 -- Tip: You can check that the syntax of this file is correct
--- when you have finished by running: luac -p prosody.cfg.lua
+-- when you have finished by running this command:
+--     prosodyctl check config
 -- If there are any errors, it will let you know what and where
 -- they are, otherwise it will keep quiet.
 --
 
 -- This is a (by default, empty) list of accounts that are admins
 -- for the server. Note that you must create the accounts separately
--- (see http://prosody.im/doc/creating_accounts for info)
+-- (see https://prosody.im/doc/creating_accounts for info)
 -- Example: admins = { "user1@example.com", "user2@example.net" }
 admins = { }
 
 -- Enable use of libevent for better performance under high load
--- For more information see: http://prosody.im/doc/libevent
---use_libevent = true;
+-- For more information see: https://prosody.im/doc/libevent
+--use_libevent = true
+
+-- Prosody will always look in its source directory for modules, but
+-- this option allows you to specify additional locations where Prosody
+-- will look for modules first. For community modules, see https://modules.prosody.im/
+--plugin_paths = {}
 
 -- This is the list of modules Prosody will load on startup.
 -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
@@ -39,74 +45,91 @@ modules_enabled = {
                "disco"; -- Service discovery
 
        -- Not essential, but recommended
+               "carbons"; -- Keep multiple clients in sync
+               "pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
                "private"; -- Private XML storage (for room bookmarks, etc.)
-               "vcard"; -- Allow users to set vCards
-               --"privacy"; -- Support privacy lists
-               --"compression"; -- Stream compression
+               "blocklist"; -- Allow users to block communications with other users
+               "vcard4"; -- User profiles (stored in PEP)
+               "vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
 
        -- Nice to have
-               "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
                "version"; -- Replies to server version requests
                "uptime"; -- Report how long server has been running
                "time"; -- Let others know the time here on this server
                "ping"; -- Replies to XMPP pings with pongs
-               "pep"; -- Enables users to publish their mood, activity, playing music and more
                "register"; -- Allow users to register on this server using a client and change passwords
-               "adhoc"; -- Support for "ad-hoc commands" that can be executed with an XMPP client
+               --"mam"; -- Store messages in an archive and allow users to access it
+               --"csi_simple"; -- Simple Mobile optimizations
 
        -- Admin interfaces
                "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
                --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
 
-       -- Other specific functionality
-               "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+       -- HTTP modules
                --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
-               --"httpserver"; -- Serve static files from a directory over HTTP
+               --"websocket"; -- XMPP over WebSockets
+               --"http_files"; -- Serve static files from a directory over HTTP
+
+       -- Other specific functionality
+               --"limits"; -- Enable bandwidth limiting for XMPP connections
                --"groups"; -- Shared roster support
+               --"server_contact_info"; -- Publish contact information for this service
                --"announce"; -- Send announcement to all online users
                --"welcome"; -- Welcome users who register accounts
                --"watchregistrations"; -- Alert admins of registrations
                --"motd"; -- Send a message to users when they log in
-};
+               --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
+               --"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
+}
 
--- These modules are auto-loaded, should you
--- (for some mad reason) want to disable
--- them then uncomment them below
+-- These modules are auto-loaded, but should you want
+-- to disable them then uncomment them here:
 modules_disabled = {
-       -- "presence"; -- Route user/contact status information
-       -- "message"; -- Route messages
-       -- "iq"; -- Route info queries
        -- "offline"; -- Store offline messages
-};
+       -- "c2s"; -- Handle client connections
+       -- "s2s"; -- Handle server-to-server connections
+       -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+}
 
 -- Disable account creation by default, for security
--- For more information see http://prosody.im/doc/creating_accounts
-allow_registration = false;
+-- For more information see https://prosody.im/doc/creating_accounts
+allow_registration = false
+
+-- Force clients to use encrypted connections? This option will
+-- prevent clients from authenticating unless they are using encryption.
+
+c2s_require_encryption = true
+
+-- Force servers to use encrypted connections? This option will
+-- prevent servers from authenticating unless they are using encryption.
+
+s2s_require_encryption = true
+
+-- Force certificate authentication for server-to-server connections?
 
--- Only allow encrypted streams? Encryption is already used when
--- available. These options will cause Prosody to deny connections that
--- are not encrypted. Note that some servers do not support s2s
--- encryption or have it disabled, including gmail.com and Google Apps
--- domains.
+s2s_secure_auth = false
 
---c2s_require_encryption = false
---s2s_require_encryption = false
+-- Some servers have invalid or self-signed certificates. You can list
+-- remote domains here that will not be required to authenticate using
+-- certificates. They will be authenticated using DNS instead, even
+-- when s2s_secure_auth is enabled.
+
+--s2s_insecure_domains = { "insecure.example" }
+
+-- Even if you disable s2s_secure_auth, you can still require valid
+-- certificates for some domains by specifying a list here.
+
+--s2s_secure_domains = { "jabber.org" }
 
 -- Select the authentication backend to use. The 'internal' providers
 -- use Prosody's configured data storage to store the authentication data.
--- To allow Prosody to offer secure authentication mechanisms to clients, the
--- default provider stores passwords in plaintext. If you do not trust your
--- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
--- for information about using the hashed backend.
--- See http://prosody.im/doc/authentication for other possibilities including
--- Cyrus SASL.
 
-authentication = "internal_plain"
+authentication = "internal_hashed"
 
 -- Select the storage backend to use. By default Prosody uses flat files
 -- in its configured data directory, but it also supports more backends
 -- through modules. An "sql" backend is included by default, but requires
--- additional dependencies. See http://prosody.im/doc/storage for more info.
+-- additional dependencies. See https://prosody.im/doc/storage for more info.
 
 --storage = "sql" -- Default is "internal"
 
@@ -115,6 +138,17 @@ authentication = "internal_plain"
 --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
 --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
 
+-- Archiving configuration
+-- If mod_mam is enabled, Prosody will store a copy of every message. This
+-- is used to synchronize conversations between multiple clients, even if
+-- they are offline. This setting controls how long Prosody will keep
+-- messages in the archive before removing them.
+
+archive_expires_after = "1w" -- Remove archived messages after 1 week
+
+-- You can also configure messages to be stored in-memory only. For more
+-- archiving options, see https://prosody.im/doc/modules/mod_mam
+
 -- Logging configuration
 -- For advanced logging see http://prosody.im/doc/logging
 log = {
@@ -124,6 +158,10 @@ log = {
        -- "*console"; -- Log to the console, useful for debugging with daemonize=false
 }
 
+-- Uncomment to enable statistics
+-- For more info see https://prosody.im/doc/statistics
+-- statistics = "internal"
+
 -- Pidfile, used by prosodyctl and the init.d script
 pidfile = "/var/run/prosody/prosody.pid"
 
@@ -131,6 +169,19 @@ pidfile = "/var/run/prosody/prosody.pid"
 prosody_user = "prosody"
 prosody_group = "prosody"
 
+-- Certificates
+-- Every virtual host and component needs a certificate so that clients and
+-- servers can securely verify its identity. Prosody will automatically load
+-- certificates/keys from the directory specified here.
+-- For more information, including how to use 'prosodyctl' to auto-import certificates
+-- (from e.g. Let's Encrypt) see https://prosody.im/doc/certificates
+
+-- Location of directory to find certificates in (relative to main config file):
+--certificates = "certs"
+
+-- HTTPS currently only supports a single certificate, specify it here:
+--https_certificate = "certs/localhost.crt"
+
 ----------- Virtual hosts -----------
 -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
 -- Settings under each VirtualHost entry apply *only* to that host.
@@ -156,9 +207,10 @@ VirtualHost "example.com"
 
 ---Set up a MUC (multi-user chat) room server on conference.example.com:
 --Component "conference.example.com" "muc"
-
 -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
 --Component "proxy.example.com" "proxy65"
+--- Store MUC messages in an archive and allow users to access it
+--modules_enabled = { "muc_mam" }
 
 ---Set up an external component (default component port is 5347)
 --
index da3cc45edec0999659aeca6f3c149088bdd38ab9..cb71a7df8f4c9a3826a18132a29895b467b8f1f6 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ptunnel-ng
-PKG_VERSION:=1.32
+PKG_VERSION:=1.41
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/lnslbrty/ptunnel-ng/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0e51f6fa2fb5b11e9cd5303e450a4e236e4688560ad2a14b0b6e01e9fc2970db
+PKG_HASH:=b61855dcffe920fd188e5239464b049231f83e550e24e76669eb49d59991baff
 
 PKG_LICENSE:=BSD-3
 PKG_LICENSE_FILES:=COPYING
@@ -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 434f7a974d401acb9275fb66b65c2f3ae3fa0a6a..39cb60c3729a477549296c071cdd91abe990e7e4 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcbind
 PKG_VERSION:=1.2.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=@SF/rpcbind
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -10,14 +10,14 @@ 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_WARMSTARTS
+       CONFIG_RPCBIND_LIBWRAP
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -43,27 +43,19 @@ if PACKAGE_rpcbind
        config RPCBIND_LIBWRAP
                bool "Enable libwrap (TCP wrappers) support."
                default y
-
-       config RPCBIND_WARMSTARTS
-               bool "Enable warmstarts support"
-               default y
-               help
-                 The warmstart feature saves RPC registrations on termination.
 endif
 endef
 
 CONFIGURE_ARGS += \
        --with-rpcuser=rpc \
-       --without-systemdsystemunitdir
+       --without-systemdsystemunitdir \
+       --enable-warmstarts
 
 ifeq ($(CONFIG_RPCBIND_LIBWRAP),y)
        CONFIGURE_ARGS += --enable-libwrap
 else
        CONFIGURE_ARGS += --disable-libwrap
 endif
-ifeq ($(CONFIG_RPCBIND_WARMSTARTS),y)
-       CONFIGURE_ARGS += --enable-warmstarts
-endif
 
 define Package/rpcbind/install
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/net/rpcbind/patches/001-CVE-2017-8779-dos-via-memory-consumption.patch b/net/rpcbind/patches/001-CVE-2017-8779-dos-via-memory-consumption.patch
new file mode 100644 (file)
index 0000000..d8137d3
--- /dev/null
@@ -0,0 +1,29 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2017-05-29
+Initial Package Version: 0.2.4 (also affects earlier versions)
+Upstream Status: Unknown
+Origin: Guido Vranken
+Description: Fixes CVE-2017-8779 (DOS by remote attackers - memory consumption
+without subsequent free).
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 5862c26..e11f61b 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -48,6 +48,7 @@
+ #include <rpc/rpc.h>
+ #include <rpc/rpcb_prot.h>
+ #include <rpc/svc_dg.h>
++#include <rpc/rpc_com.h>
+ #include <netconfig.h>
+ #include <errno.h>
+ #include <syslog.h>
+@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/,
+ static bool_t
+ xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
+ {
+-      return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));
++      return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE));
+ }
+ /*
index c59c7b291e8c899f919b582e0173c08688a8d4e1..f56bc4e6f8023621eafb3b2cec43b4dd6c5f38ff 100644 (file)
@@ -76,7 +76,7 @@ config SAMBA4_SERVER_NETBIOS
                WSD (Web Services for Devices) replaces the functionality of NetBIOS and is provided by the wsdd2 package (selected by default).
                Note: As of Windows 10 Fall Creators Update (1709) NetBIOS isn't supported unless the old SMB1 feature is reinstalled (not recommended).
                Network shares can be directly accessed via network paths '\\hostname\sharename' and mounted via 'map network drive' without NetBIOS or WSD.
-       default n
+       default y
 
 config SAMBA4_SERVER_WINBIND
        bool "Winbind support"
index 06976f2359e85169646fbf652bfa604e02e0a32e..e520c1059b0a2b76039b8b7fcba4c7974c977e70 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=4.9.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-3.0-only
diff --git a/net/samba4/patches/104-tmsize-overflow-check.patch b/net/samba4/patches/104-tmsize-overflow-check.patch
new file mode 100644 (file)
index 0000000..8a35a78
--- /dev/null
@@ -0,0 +1,32 @@
+diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
+index 14d7a797451..1982f128cb3 100644
+--- a/source3/modules/vfs_fruit.c
++++ b/source3/modules/vfs_fruit.c
+@@ -119,6 +119,18 @@ static struct global_fruit_config {
+ #define AFPRESOURCE_EA_NETATALK "user." NETATALK_RSRC_XATTR
+ #endif
++#ifndef OFF_T_MAX
++#if SIZEOF_OFF_T == SIZEOF_INT8_T
++#define OFF_T_MAX INT8_MAX
++#elif SIZEOF_OFF_T == SIZEOF_INT16_T
++#define OFF_T_MAX INT16_MAX
++#elif SIZEOF_OFF_T == SIZEOF_INT32_T
++#define OFF_T_MAX INT32_MAX
++#elif SIZEOF_OFF_T == SIZEOF_INT64_T
++#define OFF_T_MAX INT64_MAX
++#endif
++#endif
++
+ enum apple_fork {APPLE_FORK_DATA, APPLE_FORK_RSRC};
+ enum fruit_rsrc {FRUIT_RSRC_STREAM, FRUIT_RSRC_ADFILE, FRUIT_RSRC_XATTR};
+@@ -6867,7 +6879,7 @@ static bool fruit_tmsize_do_dirent(vfs_handle_struct *handle,
+               return true;
+       }
+-      if (bandsize > SIZE_MAX/nbands) {
++      if (bandsize > OFF_T_MAX/nbands) {
+               DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
+                       bandsize, nbands);
+               return false;
index 8b08d5c7540ae17c1ceeb9a285fe5b589b868946..9278ddd0b4b8e99e0be39e96d34850100d6473c1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-seahub
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Apache-2.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)
 PKG_HASH:=53a9efdb6791fd3a2a191e89cb0f133632056046ec08adbb2ad72088e6161430
 PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
 
-PKG_BUILD_DEPENDS:=pytz/host
+PKG_BUILD_DEPENDS:=python-pytz/host
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python-package.mk
@@ -28,12 +28,12 @@ define Package/seafile-seahub
     TITLE:=Seafile server - seahub component
     MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
     URL:=https://seafile.com/
-    DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \
+    DEPENDS:=+python-simplejson +python +pillow +python-chardet +django +django-appconf \
                +django-compressor +django-constance +django-formtools +django-jsonfield \
                +django-picklefield +django-postoffice +django-restframework \
                +django-simple-captcha +django-statici18n +django-webpack-loader +et_xmlfile \
                +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql \
-               +python-qrcode +python-requests +python-requests-oauthlib +pytz +rcssmin
+               +python-qrcode +python-requests +python-requests-oauthlib +python-pytz +rcssmin
 endef
 
 define Build/Configure
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..78fd3069f7ca5e95bd6b81ce7887a34c9768c819 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-server
 PKG_VERSION:=6.3.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -24,6 +24,15 @@ 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
@@ -33,7 +42,6 @@ define Package/seafile-server
     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 98b579305efa51869bca6ad17b2be1e0d99aa9db..3214a3cc597829ff6eff63927f326925a23ae2e6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017-2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -13,12 +13,12 @@ include $(TOPDIR)/rules.mk
 # - check if default mode has changed from being tcp_only
 #
 PKG_NAME:=shadowsocks-libev
-PKG_VERSION:=3.2.3
-PKG_RELEASE:=3
+PKG_VERSION:=3.2.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
-PKG_HASH:=2befc27b1cc62af0450702343d17e347936f0d4e3d4b04ba9246c4f9b409b742
+PKG_HASH:=02273d571b8bea067eefb203a43c142d052042179904f9050a1f20cb8dc5d242
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
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 23cb873cc681c4836241122903e2af8d89095810..42ffe9e0ddd5d8f27da41f07d52bf4e16c3be251 100644 (file)
@@ -11,26 +11,6 @@ START=99
 
 ss_confdir=/var/etc/shadowsocks-libev
 ss_bindir=/usr/bin
-q='"'
-
-ss_mkjson() {
-       echo "{" >"$confjson"
-       if ss_mkjson_ "$@" >>$confjson; then
-               sed -i -e '/^\s*$/d' -e '2,$s/^/\t/' -e '$s/,$//' "$confjson"
-               echo "}" >>"$confjson"
-       else
-               rm -f "$confjson"
-               return 1
-       fi
-}
-
-ss_mkjson_() {
-       local func
-
-       for func in "$@"; do
-               "$func" || return 1
-       done
-}
 
 ss_mkjson_server_conf() {
        local cfgserver
@@ -45,32 +25,11 @@ ss_mkjson_server_conf() {
 
 ss_mkjson_server_conf_() {
        [ -n "$server_port" ] || return 1
-       password="${password//\"/\\\"}"
-       cat <<-EOF
-               ${server:+${q}server${q}: ${q}$server${q},}
-               "server_port": $server_port,
-               ${method:+${q}method${q}: ${q}$method${q},}
-               ${key:+${q}key${q}: ${q}$key${q},}
-               ${password:+${q}password${q}: ${q}$password${q},}
-       EOF
-}
-
-ss_mkjson_common_conf() {
-       [ "$ipv6_first" = 0 ] && ipv6_first=false || ipv6_first=true
-       [ "$fast_open" = 0 ] && fast_open=false || fast_open=true
-       [ "$reuse_port" = 0 ] && reuse_port=false || reuse_port=true
-       cat <<-EOF
-               "use_syslog": true,
-               "ipv6_first": $ipv6_first,
-               "fast_open": $fast_open,
-               "reuse_port": $reuse_port,
-               ${local_address:+${q}local_address${q}: ${q}$local_address${q},}
-               ${local_port:+${q}local_port${q}: $local_port,}
-               ${mode:+${q}mode${q}: ${q}$mode${q},}
-               ${mtu:+${q}mtu${q}: $mtu,}
-               ${timeout:+${q}timeout${q}: $timeout,}
-               ${user:+${q}user${q}: ${q}$user${q},}
-       EOF
+       [ -z "$server" ] || json_add_string server "$server"
+       json_add_int server_port "$server_port"
+       [ -z "$method" ] || json_add_string method "$method"
+       [ -z "$key" ] || json_add_string key "$key"
+       [ -z "$password" ] || json_add_string password "$password"
 }
 
 ss_mkjson_ss_local_conf() {
@@ -88,9 +47,7 @@ ss_mkjson_ss_server_conf() {
 ss_mkjson_ss_tunnel_conf() {
        ss_mkjson_server_conf || return 1
        [ -n "$tunnel_address" ] || return 1
-       cat <<-EOF
-               ${tunnel_address:+${q}tunnel_address${q}: ${q}$tunnel_address${q},}
-       EOF
+       json_add_string tunnel_address "$tunnel_address"
 }
 
 ss_xxx() {
@@ -101,23 +58,32 @@ ss_xxx() {
 
        [ -x "$bin" ] || return
        eval "$("validate_${cfgtype}_section" "$cfg" ss_validate_mklocal)"
-       "validate_${cfgtype}_section" "$cfg" || return 1
+       "validate_${cfgtype}_section" "$cfg" || return
        [ "$disabled" = 0 ] || return
 
-       if ss_mkjson \
-                       ss_mkjson_common_conf \
-                       ss_mkjson_${cfgtype}_conf \
-                       ; then
-               procd_open_instance "$cfgtype.$cfg"
-               procd_set_param command "$bin" -c "$confjson"
-               [ "$verbose" = 0 ] || procd_append_param command -v
-               [ "$no_delay" = 0 ] || procd_append_param command --no-delay
-               [ -z "$bind_address" ] || procd_append_param command -b "$bind_address"
-               procd_set_param file "$confjson"
-               procd_set_param respawn
-               procd_close_instance
-               ss_rules_cb
-       fi
+       json_init
+       ss_mkjson_${cfgtype}_conf || return
+       json_add_boolean use_syslog 1
+       json_add_boolean ipv6_first "$ipv6_first"
+       json_add_boolean fast_open "$fast_open"
+       json_add_boolean reuse_port "$reuse_port"
+       json_add_boolean no_delay "$no_delay"
+       [ -z "$local_address" ] || json_add_string local_address "$local_address"
+       [ -z "$local_port" ] || json_add_int local_port "$local_port"
+       [ -z "$mode" ] || json_add_string mode "$mode"
+       [ -z "$mtu" ] || json_add_int mtu "$mtu"
+       [ -z "$timeout" ] || json_add_int timeout "$timeout"
+       [ -z "$user" ] || json_add_string user "$user"
+       json_dump -i >"$confjson"
+
+       procd_open_instance "$cfgtype.$cfg"
+       procd_set_param command "$bin" -c "$confjson"
+       [ "$verbose" = 0 ] || procd_append_param command -v
+       [ -z "$bind_address" ] || procd_append_param command -b "$bind_address"
+       procd_set_param file "$confjson"
+       procd_set_param respawn
+       procd_close_instance
+       ss_rules_cb
 }
 
 ss_rules_cb() {
@@ -144,12 +110,15 @@ ss_rules() {
        local args
 
        [ -x "$bin" ] || return 1
+       "$bin" -f
+       "$bin" -6 -f
+
        config_get cfgtype "$cfg" TYPE
        [ "$cfgtype" = ss_rules ] || return 1
 
        eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
        validate_ss_rules_section "$cfg" || return 1
-       [ "$disabled" = 0 ] || return 1
+       [ "$disabled" = 0 ] || return 0
 
        eval local_port_tcp="\$ss_rules_redir_tcp_$redir_tcp"
        eval local_port_udp="\$ss_rules_redir_udp_$redir_udp"
@@ -196,7 +165,10 @@ start_service() {
 stop_service() {
        local bin="$ss_bindir/ss-rules"
 
-       [ -x "$bin" ] && "$bin" -f
+       [ -x "$bin" ] && {
+               "$bin" -f
+               "$bin" -6 -f
+       }
        rm -rf "$ss_confdir"
 }
 
index b3dda4fef56fb05c12e754d1bc5a39c07a824f5b..2016667f01ccc36b0df5989d06dbd778591a0ffa 100755 (executable)
@@ -13,8 +13,8 @@ __errmsg() {
 }
 
 if [ "$1" = "-6" ]; then
-       if ! ip6tables -t nat -L -n >/dev/null; then
-               __errmsg "Skipping ipv6.  Please install ip6tables-mod-nat"
+       if ! ip6tables -t nat -L -n &>/dev/null; then
+               __errmsg "Skipping ipv6.  Requires ip6tables-mod-nat"
                exit 1
        fi
        o_use_ipv6=1; shift
@@ -210,7 +210,7 @@ ss_rules_iptchains_init_tcp() {
                :ss_rules_local_out -
                -I OUTPUT 1 -p tcp -j ss_rules_local_out
                -A ss_rules_local_out -m set --match-set ss_rules${o_af}_dst_bypass_ dst -j RETURN
-               -A ss_rules_local_out -p tcp $o_ipt_extra -j $local_target -m comment --comment "local_default: $o_local_default"
+               -A ss_rules_local_out $o_ipt_extra -j $local_target
                COMMIT
        EOF
 }
@@ -265,15 +265,15 @@ ss_rules_iptchains_init_() {
                :ss_rules_forward -
                $(ss_rules_iptchains_mkprerules "$proto")
                -A ss_rules_pre_src -m set --match-set ss_rules${o_af}_dst_bypass_ dst -j RETURN
-               -A ss_rules_pre_src -p $proto $o_ipt_extra -j ss_rules_src
+               -A ss_rules_pre_src $o_ipt_extra -j ss_rules_src
                -A ss_rules_src -m set --match-set ss_rules${o_af}_src_bypass src -j RETURN
                -A ss_rules_src -m set --match-set ss_rules${o_af}_src_forward src -j ss_rules_forward
                -A ss_rules_src -m set --match-set ss_rules${o_af}_src_checkdst src -j ss_rules_dst
-               -A ss_rules_src -j $src_default_target -m comment --comment "src_default: $o_src_default"
+               -A ss_rules_src -j $src_default_target
                -A ss_rules_dst -m set --match-set ss_rules${o_af}_dst_bypass dst -j RETURN
                -A ss_rules_dst -m set --match-set ss_rules${o_af}_dst_forward dst -j ss_rules_forward
                $recentrst_addset_rules
-               -A ss_rules_dst -j $dst_default_target -m comment --comment "dst_default: $o_dst_default"
+               -A ss_rules_dst -j $dst_default_target
                $forward_rules
                COMMIT
                $recentrst_mangle_rules
index 50cb2eb49fa869b870ca74429921fea8f5dd998e..bc07b3b8becd24f4abad025eaa2587ef0ea901ca 100644 (file)
@@ -10,8 +10,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-core
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.2
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
 PKG_RELEASE:=1
@@ -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:=48195c9e4f9ecd75014a36219e4c7b8c15bff36d149284bc6ac29696b475971d
+PKG_HASH:=fa71e435ba3ffa3b424c3fe4dfb405c536e4c8d837e8f0936486f7673478ce5b
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index f87df0adbd3a11b2b07428719db84f9a818ed846..649eacddaf428fc661e934e54aaf1ee2fc7c1a8c 100644 (file)
@@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.2
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -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:=d322121f03a2d6c0845f46a3f1a7d98f9fb0660e6d65b30622154799682ec55f
+PKG_HASH:=0469486e8087502b59f8a4531bb476d3a929e4e59b4a0492f54e85ae2a8bebff
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index 90ed80c8c5c2c8b2370db055f3934c2754a88cff..367cea6f48e000e96fb4624825b52b9d34980bd1 100644 (file)
@@ -1,13 +1,19 @@
 #!/bin/sh
 
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
 
 case "$ACTION" in
     ifup)
-        /etc/init.d/shorewall-lite restart
+        if [ "$INTERFACE" = "lan" ]; then
+            /usr/sbin/shorewall -l start
+       elif [ "${INTERFACE:0:3}" = "wan" ] &&
+             [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+           /etc/shorewall-lite/state/firewall enable "$DEVICE"
+       fi
         ;;
     ifdown)
-        # might need to restore some routing
-        /etc/init.d/shorewall-lite restart
+       if [ "${INTERFACE:0:3}" = "wan" ]; then
+           /etc/shorewall-lite/state/firewall disable "$DEVICE"
+       fi
         ;;
-esac
\ No newline at end of file
+esac
index 0ab410b1afaea0ac82bd3fa53a761c54fe4a281a..d404e1d3f40e9dc82e2e8f978be58d7143826096 100644 (file)
@@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.2
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -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:=420ba5a66b348990388131cdc3821f79d87f00fd1266c904a701b8a5823756e0
+PKG_HASH:=58615c40598d3f2f71e6aab286ebd281c9018dea584ee658e5609ea0e434b242
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index f787424c1946b4e45e62baf0447818082a2bb8f7..0071e4ff4074404c1765da40a6ce857944c9bd84 100644 (file)
@@ -1,13 +1,19 @@
 #!/bin/sh
 
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
 
 case "$ACTION" in
     ifup)
-        /etc/init.d/shorewall restart
+        if [ "$INTERFACE" = "lan" ]; then
+            /usr/sbin/shorewall start
+       elif [ "${INTERFACE:0:3}" = "wan" ] &&
+             [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+           /etc/shorewall/state/firewall enable "$DEVICE"
+       fi
         ;;
     ifdown)
-        # might need to restore some routing
-        /etc/init.d/shorewall restart
+       if [ "${INTERFACE:0:3}" = "wan" ]; then
+           /etc/shorewall/state/firewall disable "$DEVICE"
+       fi
         ;;
 esac
index 24ca7371bd6472c02e370f2c135f3481a75a53eb..425bdcdc7f547ff396693dcfd2e2808203358db5 100644 (file)
@@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall6-lite
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.2
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -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:=6dad347b2202334b9da44b316a25273cdb28401623a6fd0c6bba9c7731e0a280
+PKG_HASH:=82cbb075d7575400d859b59142f1e36ac8c575d35f19bf3a263278c67be5a3ea
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index bb8973b7bfb0b8c48b6c36f7b90634793d2582d0..410266aae5808bb187e702fc30201f7fd3d1d4ea 100644 (file)
@@ -1,13 +1,19 @@
 #!/bin/sh
 
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
 
 case "$ACTION" in
     ifup)
-        /etc/init.d/shorewall6-lite restart
+        if [ "$INTERFACE" = "lan" ]; then
+            /usr/sbin/shorewall -6 -l start
+       elif [ "${INTERFACE:0:3}" = "wan" ] &&
+             [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+           /etc/shorewall6-lite/state/firewall enable "$DEVICE"
+       fi
         ;;
     ifdown)
-        # might need to restore some routing
-        /etc/init.d/shorewall6-lite restart
+       if [ "${INTERFACE:0:3}" = "wan" ]; then
+           /etc/shorewall6-lite/state/firewall disable "$DEVICE"
+       fi
         ;;
-esac
\ No newline at end of file
+esac
index 3def88c2da55d4760a3e0ab1c07edbf7eb83d717..7aa3d26c978fe07c57418406ecfe1a0c0a668bc9 100644 (file)
@@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shorewall6
 PKG_MAJOR_MINOR_VERSION:=5.2
-PKG_BUGFIX_MAJOR_VERSION:=1
-PKG_BUGFIX_MINOR_VERSION:=.4
+PKG_BUGFIX_MAJOR_VERSION:=3
+PKG_BUGFIX_MINOR_VERSION:=.2
 PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
 PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
        http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
@@ -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:=eaf6b55c8e9801c89114371dbda37f635ad95cba35519b94b7536c1c7ecb53fa
+PKG_HASH:=43d48d47929fdef29023ff2659550f0b2289064d54b7abe64f79efeb1613146a
 
 PKG_MAINTAINER:=Willem van den Akker <wvdakker@wilsoft.nl>
 PKG_LICENSE:=GPL-2.0+
index aaa03e8a92588ef93564e6725ef416fc2bb3556b..bfe2bf7b1a876d08cd988fe8b4be6dce45d8ae9b 100644 (file)
@@ -1,13 +1,19 @@
 #!/bin/sh
 
-# should restart shorewall when an interface comes up
+DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
 
 case "$ACTION" in
     ifup)
-        /etc/init.d/shorewall6 restart
+        if [ "$INTERFACE" = "lan" ]; then
+            /usr/sbin/shorewall -6 start
+       elif [ "${INTERFACE:0:3}" = "wan" ] &&
+             [ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
+           /etc/shorewall6/state/firewall enable "$DEVICE"
+       fi
         ;;
     ifdown)
-        # might need to restore some routing
-        /etc/init.d/shorewall6 restart
+       if [ "${INTERFACE:0:3}" = "wan" ]; then
+           /etc/shorewall6/state/firewall disable "$DEVICE"
+       fi
         ;;
 esac
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..34efb7a
--- /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:=2
+
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+
+PKG_SOURCE:=snort-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
+PKG_HASH:=ea4079c551002e4d83586f05b3ecdae72706a46ec223339b87ce60f7ae30b8a2
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/snort-$(PKG_VERSION_SHORT)
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/snort3
+  SUBMENU:=Firewall
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libstdcpp +libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +libhwloc +libtirpc +luajit
+  TITLE:=Lightweight Network Intrusion Detection System
+  URL:=http://www.snort.org/
+  MENU:=1
+endef
+
+define Package/snort3/description
+  Snort is an open source network intrusion detection and prevention system.
+  It is capable of performing real-time traffic analysis, alerting, blocking
+  and packet logging on IP networks.  It utilizes a combination of protocol
+  analysis and pattern matching in order to detect anomalies, misuse and
+  attacks.
+endef
+
+CMAKE_OPTIONS += \
+       -DENABLE_STATIC_DAQ:BOOL=NO \
+       -DENABLE_COREFILES:BOOL=NO \
+       -DENABLE_GDB:BOOL=NO \
+       -DMAKE_DOC:BOOL=NO \
+       -DMAKE_HTML_DOC:BOOL=NO \
+       -DMAKE_PDF_DOC:BOOL=NO \
+       -DMAKE_TEXT_DOC:BOOL=NO \
+       -DHAVE_LZMA=OFF
+
+TARGET_CFLAGS  += -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -ltirpc
+
+define Package/snort3/conffiles
+/etc/config/snort
+endef
+
+define Package/snort3/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/snort  \
+               $(1)/usr/bin/
+
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \
+               $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/usr/lib/snort
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_hext.so \
+               $(1)/usr/lib/snort/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/snort/daqs/daq_file.so \
+               $(1)/usr/lib/snort/
+
+       $(INSTALL_DIR) $(1)/usr/share/lua
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_plugin.lua \
+               $(1)/usr/share/lua/
+
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/snort/lua/snort_config.lua \
+               $(1)/usr/share/lua/
+
+       $(INSTALL_DIR) $(1)/etc/snort
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) \
+               ./files/snort.init \
+               $(1)/etc/init.d/snort
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) \
+               ./files/snort.config \
+               $(1)/etc/config/snort
+endef
+
+$(eval $(call BuildPackage,snort3))
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)
index 00e95f0d17ead07fa985fe905271bc21fa554673..7a822490c662a41bd24621432c362e0b8d55edb8 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=socat
 PKG_VERSION:=1.7.3.2
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
index 379dc070fec38b6887a390f223e5c0a9544965c1..b4129357377a57f47751885b2353090332c9c6b7 100644 (file)
@@ -10,30 +10,32 @@ NAME=socat
 
 validate_section_socat()
 {
-       uci_validate_section socat socat "${1}" \
+       uci_load_validate socat socat "$1" "$2" \
                'enable:bool:1' \
                'SocatOptions:string'
-       return $?
 }
 
 socat_instance()
 {
-       local SocatOptions enable
-
-       validate_section_socat "${1}" || {
+       [ "$2" = 0 ] || {
                echo "validation failed"
                return 1
        }
 
-       [ "${enable}" = "0" ] && return 1
+       [ "$enable" = "0" ] && return 1
 
        procd_open_instance
        procd_set_param command "$PROG"
-       procd_append_param command ${SocatOptions}
+       procd_append_param command $SocatOptions
        procd_close_instance
 }
 
 start_service () {
-       config_load "${NAME}"
-       config_foreach socat_instance socat
+       config_load "$NAME"
+       config_foreach validate_section_socat socat socat_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger "$NAME"
+       procd_add_validation validate_section_socat
 }
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 c0885f0bdfcbfa10bf9d86bd8032da9ad4ac557b..8eaba1dcdd2adf3da88d7336c977d01f38583e33 100644 (file)
@@ -3,19 +3,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=softethervpn5
-PKG_VERSION:=5.01.9667
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_SOURCE:=softether-vpn-src-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/SoftEtherVPN/SoftEtherVPN/releases/download/$(PKG_VERSION)
-PKG_HASH:=c99142c5e55fae055955332964c56d29aba10bec9764ab961aebabf6c3ee1462
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
+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
 
 HOST_BUILD_DEPENDS:=ncurses/host readline/host
 PKG_BUILD_DEPENDS:=softethervpn5/host
@@ -25,7 +23,6 @@ include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
 
 define Package/softethervpn5/Default
   SECTION:=net
index 1311e652b0ef7643866ce204c0f9977b292b0d17..955067195faa2d769055d8551038a9625ad69143 100644 (file)
@@ -20,9 +20,3 @@ start_service(){
     procd_set_param respawn
     procd_close_instance
 }
-
-stop_service(){
-       logger -t 'softethervpn5' "Stopping softether bridge service."
-       
-       /var/softethervpn/vpnbridge stop
-}
index e4766f0fe800c6f0033dc5c3d873ccfc9eefdf11..743846a04e7ceaf48ec5a17045198571e2a8e762 100644 (file)
@@ -20,9 +20,3 @@ start_service(){
     procd_set_param respawn
     procd_close_instance
 }
-
-stop_service(){
-       logger -t 'softethervpn5' "Stopping softether client service."
-       
-       /var/softethervpn/vpnclient stop
-}
index e6f73da315248fa2f76fe188407d92ee8da292d0..fbc94ed4510c9d2673514278395097db05057537 100644 (file)
@@ -20,9 +20,3 @@ start_service(){
     procd_set_param respawn
     procd_close_instance
 }
-
-stop_service(){
-       logger -t 'softethervpn5' "Stopping softether vpnserver service."
-       
-       /var/softethervpn/vpnserver stop
-}
diff --git a/net/speedtest-netperf/Makefile b/net/speedtest-netperf/Makefile
new file mode 100644 (file)
index 0000000..cc3a5cc
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2018 Tony Ambardar
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=speedtest-netperf
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/speedtest-netperf
+       SECTION:=net
+       CATEGORY:=Network
+       TITLE:=Script to measure the performance of your network and router
+       DEPENDS:=+netperf
+       CONFLICTS:=speedtest
+       PKGARCH:=all
+endef
+
+define Package/speedtest-netperf/description
+Script to measure the performance of your network and router.
+
+Please see https://github.com/openwrt/packages/blob/master/net/speedtest-netperf/files/README.md for further information.
+endef
+
+define Build/Prepare
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+endef
+
+define Package/speedtest-netperf/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) ./files/speedtest-netperf.sh $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,speedtest-netperf))
diff --git a/net/speedtest-netperf/files/README.md b/net/speedtest-netperf/files/README.md
new file mode 100644 (file)
index 0000000..7627748
--- /dev/null
@@ -0,0 +1,131 @@
+Network Performance Testing
+===========================
+
+## Introduction
+
+The `speedtest-netperf` package provides a convenient means of on-device network performance testing for OpenWrt routers. Such performance testing primarily includes characterizing the network throughput and latency, but CPU usage can also be an important secondary measurement. These aspects of network testing are motivated chiefly by the following:
+
+1. **Throughput:** Network speed measurements can help troubleshoot transfer problems, and be used to determine the truth of an ISP's promised speed claims. Accurate throughput numbers also provide guidance for configuring other software's settings, such as SQM ingress/egress rates, or bandwidth limits for Bittorrent.
+
+2. **Latency:** Network latency is a key factor in high-quality experiences with real-time or interactive applications such as VOIP, gaming, or video conferencing, and excessive latency can lead to undesirable dropouts, freezes and lag. Such latency problems are endemic on the Internet and often the result of [bufferbloat](https://www.bufferbloat.net/projects/). Systematic latency measurements are an important part of identifying and mitigating this bufferbloat.
+
+3. **CPU Usage:**  Observing CPU usage under network load gives insight into whether the router is CPU-bound, or if there is CPU "headroom" to support even higher network throughput. In addition to managing network traffic, a router actively running a speed test will also use CPU cycles to generate network load, and measuring this distinct CPU usage also helps gauge its impact.
+
+**Note:** _The `speedtest-netperf.sh` script uses servers and network bandwidth that are provided by generous volunteers (not some wealthy "big company"). Feel free to use the script to test your SQM configuration or troubleshoot network and latency problems. Continuous or high rate use of this script may result in denied access. Happy testing!_
+
+
+## Theory of Operation
+
+When launched, `speedtest-netperf.sh` uses the local `netperf` application to run several upload and download streams (files) to a server on the Internet. This places a heavy load on the bottleneck link of your network (probably your connection to the Internet) while measuring the total bandwidth of the link during the transfers. Under this network load, the script simultaneously measures the latency of pings to see whether the file transfers affect the responsiveness of your network. Additionally, the script tracks the per-CPU processor usage, as well as the CPU usage of the `netperf` instances used for the test. On systems that report CPU frequency scaling, the script can also report per-CPU frequencies.
+
+The script operates in two distict modes for network loading: *sequential* and *concurrent*. In the default sequential mode, the script emulates a web-based speed test by first downloading and then uploading network streams. In concurrent mode, the script mimics the stress test of the [FLENT](https://github.com/tohojo/flent) program by dowloading and uploading streams simultaneously.
+
+Sequential mode is preferred when measuring peak upload and download speeds for SQM configuration or testing ISP speed claims, because the measurements are unimpacted by traffic in the opposite direction.
+
+Concurrent mode places greater stress on the network, and can expose additional latency problems. It provides a more realistic estimate of expected bidirectional throughput. However, the download and upload speeds reported may be considerably lower than your line's rated speed. This is not a bug, nor is it a problem with your internet connection. It's because the ACK (acknowledge) messages sent back to the sender may consume a significant fraction of a link's capacity (as much as 50% with highly asymmetric links, e.g 15:1 or 20:1).
+
+After running `speedtest-netperf.sh`, if latency is seen to increase much during the data transfers, then other network activity, such as voice or video chat, gaming, and general interactive usage will likely suffer. Gamers will see this as frustrating lag when someone else uses the network, Skype and FaceTime users will see dropouts or freezes, and VOIP service may be unusable.
+
+## Installation
+
+This package and its dependencies should be installed from the official OpenWrt software repository with the command:
+`opkg install speedtest-netperf`
+
+If unavailable, search for and try to directly download the same package for a newer OpenWrt release, since it is architecture-independent and very portable.
+
+As a last resort, you may download and install the latest version directly from the author's personal repo: e.g.
+```
+cd /tmp
+uclient-fetch https://github.com/guidosarducci/papal-repo/raw/master/speedtest-netperf_1.0.0-1_all.ipk
+opkg install speedtest-netperf_1.0.0-1_all.ipk
+```
+
+## Usage
+
+The speedtest-netperf.sh script measures throughput, latency and CPU usage during file transfers. To invoke it:
+
+    speedtest-netperf.sh [-4 | -6] [-H netperf-server] [-t duration] [-p host-to-ping] [-n simultaneous-streams ] [-s | -c]
+
+Options, if present, are:
+
+    -4 | -6:           Enable ipv4 or ipv6 testing (default - ipv4)
+    -H | --host:       DNS or Address of a netperf server (default - netperf.bufferbloat.net)
+                       Alternate servers are netperf-east (US, east coast),
+                       netperf-west (US, California), and netperf-eu (Denmark).
+    -t | --time:       Duration for how long each direction's test should run - (default - 60 seconds)
+    -p | --ping:       Host to ping to measure latency (default - gstatic.com)
+    -n | --number:     Number of simultaneous sessions (default - 5 sessions)
+    -s | --sequential: Sequential download/upload (default - sequential)
+    -c | --concurrent: Concurrent download/upload
+
+The primary script output shows download and upload speeds, together with the percent packet loss, and a summary of latencies, including min, max, average, median, and 10th and 90th percentiles so you can get a sense of the distribution.
+
+The tool also summarizes CPU usage statistics during the test, to highlight whether speeds may be CPU-bound during testing, and to provide a better sense of how much CPU "headroom" would be available during normal operation. The data includes per-CPU load and frequency (if supported), and CPU usage of the `netperf` test programs.
+
+### Examples
+Below is a comparison of sequential speed testing runs showing the benefits of SQM. On the left is a test without SQM. Note that the latency gets large (greater than half a second), meaning that network performance would be poor for anyone else using the network. On the right is a test using SQM: the latency goes up a little (less than 21 msec under load), and network performance remains good.
+
+Notice also that the activation of SQM requires greater CPU, but that in both cases the router is not CPU-bound and likely capable of supporting higher throughputs.
+
+```
+[Sequential Test: NO SQM, POOR LATENCY]                       [Sequential Test: WITH SQM, GOOD LATENCY]
+# speedtest-netperf.sh                                        # speedtest-netperf.sh
+[date/time] Starting speedtest for 60 seconds per transfer    [date/time] Starting speedtest for 60 seconds per transfer
+session. Measure speed to netperf.bufferbloat.net (IPv4)      session. Measure speed to netperf.bufferbloat.net (IPv4)
+while pinging gstatic.com. Download and upload sessions are   while pinging gstatic.com. Download and upload sessions are
+sequential, each with 5 simultaneous streams.                 sequential, each with 5 simultaneous streams.
+
+ Download:  35.40 Mbps                                         Download:  32.69 Mbps
+  Latency: (in msec, 61 pings, 0.00% packet loss)               Latency: (in msec, 61 pings, 0.00% packet loss)
+      Min: 10.228                                                   Min: 9.388
+    10pct: 38.864                                                 10pct: 12.038
+   Median: 47.027                                                Median: 14.550
+      Avg: 45.953                                                   Avg: 14.827
+    90pct: 51.867                                                 90pct: 17.122
+      Max: 56.758                                                   Max: 20.558
+Processor: (in % busy, avg +/- stddev, 57 samples)            Processor: (in % busy, avg +/- stddev, 55 samples)
+     cpu0: 56 +/-  6                                               cpu0: 82 +/-  5
+ Overhead: (in % total CPU used)                               Overhead: (in % total CPU used)
+  netperf: 34                                                   netperf: 51
+
+   Upload:   5.38 Mbps                                           Upload:   5.16 Mbps
+  Latency: (in msec, 62 pings, 0.00% packet loss)               Latency: (in msec, 62 pings, 0.00% packet loss)
+      Min: 11.581                                                   Min: 9.153
+    10pct: 424.616                                                10pct: 10.401
+   Median: 504.339                                               Median: 14.151
+      Avg: 491.511                                                  Avg: 14.056
+    90pct: 561.466                                                90pct: 17.241
+      Max: 580.896                                                  Max: 20.733
+Processor: (in % busy, avg +/- stddev, 60 samples)            Processor: (in % busy, avg +/- stddev, 59 samples)
+     cpu0: 11 +/-  5                                               cpu0: 16 +/-  5
+ Overhead: (in % total CPU used)                               Overhead: (in % total CPU used)
+  netperf:  1                                                   netperf:  1
+```
+
+Below is another comparison of SQM, but now using a concurrent speedtest. Notice that without SQM, the total throughput drops nearly 11 Mbps compared to the above sequential test without SQM. This is due to both poorer latencies and the consumption of bandwidth by ACK messages. As before, the use of SQM on the right not only yields a marked improvement in latencies, but also recovers almost 6 Mbps in throughput (with SQM using CAKE's ACK filtering).
+```
+[Concurrent Test: NO SQM, POOR LATENCY]                       [Concurrent Test: WITH SQM, GOOD LATENCY]
+# speedtest-netperf.sh --concurrent                           # speedtest-netperf.sh --concurrent
+[date/time] Starting speedtest for 60 seconds per transfer    [date/time] Starting speedtest for 60 seconds per transfer
+session. Measure speed to netperf.bufferbloat.net (IPv4)      session. Measure speed to netperf.bufferbloat.net (IPv4)
+while pinging gstatic.com. Download and upload sessions are   while pinging gstatic.com. Download and upload sessions are
+concurrent, each with 5 simultaneous streams.                 concurrent, each with 5 simultaneous streams.
+
+ Download:  25.24 Mbps                                         Download:  31.92 Mbps
+   Upload:   4.75 Mbps                                           Upload:   4.41 Mbps
+  Latency: (in msec, 59 pings, 0.00% packet loss)               Latency: (in msec, 61 pings, 0.00% packet loss)
+      Min: 9.401                                                    Min: 10.244
+    10pct: 129.593                                                10pct: 13.161
+   Median: 189.312                                               Median: 16.885
+      Avg: 195.418                                                  Avg: 17.219
+    90pct: 226.628                                                90pct: 21.166
+      Max: 416.665                                                  Max: 28.224
+Processor: (in % busy, avg +/- stddev, 59 samples)            Processor: (in % busy, avg +/- stddev, 56 samples)
+     cpu0: 45 +/- 12                                               cpu0: 86 +/-  4
+ Overhead: (in % total CPU used)                               Overhead: (in % total CPU used)
+  netperf: 25                                                   netperf: 42
+```
+
+## Provenance
+
+The `speedtest-netperf.sh` utility leverages earlier scripts from the CeroWrt project used to measure network throughput and latency: [betterspeedtest.sh](https://github.com/richb-hanover/OpenWrtScripts#betterspeedtestsh) and [netperfrunner.sh](https://github.com/richb-hanover/OpenWrtScripts#netperfrunnersh). Both scripts are gratefully used with the permission of their author, [Rich Brown](https://github.com/richb-hanover/OpenWrtScripts).
diff --git a/net/speedtest-netperf/files/speedtest-netperf.sh b/net/speedtest-netperf/files/speedtest-netperf.sh
new file mode 100644 (file)
index 0000000..f303f63
--- /dev/null
@@ -0,0 +1,408 @@
+#!/bin/sh
+
+# This speed testing script provides a convenient means of on-device network
+# performance testing for OpenWrt routers, and subsumes functionality of the
+# earlier CeroWrt scripts betterspeedtest.sh and netperfrunner.sh written by
+# Rich Brown.
+#
+# When launched, the script uses netperf to run several upload and download
+# streams to an Internet server. This places heavy load on the bottleneck link
+# of your network (probably your Internet connection) while measuring the total
+# bandwidth of the link during the transfers. Under this network load, the
+# script simultaneously measures the latency of pings to see whether the file
+# transfers affect the responsiveness of your network. Additionally, the script
+# tracks the per-CPU processor usage, as well as the netperf CPU usage used for
+# the test. On systems that report CPU frequency scaling, the script can also
+# report per-CPU frequencies.
+#
+# The script operates in two modes of network loading: sequential and
+# concurrent. The default sequential mode emulates a web-based speed test by
+# first downloading and then uploading network streams, while concurrent mode
+# provides a stress test by dowloading and uploading streams simultaneously.
+#
+# NOTE: The script uses servers and network bandwidth that are provided by
+# generous volunteers (not some wealthy "big company"). Feel free to use the
+# script to test your SQM configuration or troubleshoot network and latency
+# problems.  Continuous or high rate use of this script may result in denied
+# access. Happy testing!
+#
+# For more information, consult the online README.md:
+# https://github.com/openwrt/packages/blob/master/net/speedtest-netperf/files/README.md
+
+# Usage: speedtest-netperf.sh [-4 | -6] [ -H netperf-server ] [ -t duration ] [ -p host-to-ping ] [ -n simultaneous-streams ] [ -s | -c ]
+
+# Options: If options are present:
+#
+# -H | --host:   netperf server name or IP (default netperf.bufferbloat.net)
+#                Alternate servers are netperf-east (east coast US),
+#                netperf-west (California), and netperf-eu (Denmark)
+# -4 | -6:       Enable ipv4 or ipv6 testing (ipv4 is the default)
+# -t | --time:   Duration of each direction's test - (default - 60 seconds)
+# -p | --ping:   Host to ping to measure latency (default - gstatic.com)
+# -n | --number: Number of simultaneous sessions (default - 5 sessions)
+#                based on whether concurrent or sequential upload/downloads)
+# -s | -c:       Sequential or concurrent download/upload (default - sequential)
+
+# Copyright (c) 2014 - Rich Brown <rich.brown@blueberryhillsoftware.com>
+# Copyright (c) 2018 - Tony Ambardar <itugrok@yahoo.com>
+# GPLv2
+
+
+# Summarize contents of the ping's output file as min, avg, median, max, etc.
+#   input parameter ($1) file contains the output of the ping command
+
+summarize_pings() {
+
+# Process the ping times, and summarize the results
+# grep to keep lines with "time=", and sed to isolate time stamps and sort them
+# awk builds an array of those values, prints first & last (which are min, max)
+# and computes average.
+# If the number of samples is >= 10, also computes median, and 10th and 90th
+# percentile readings.
+       sed 's/^.*time=\([^ ]*\) ms/\1 pingtime/' < $1 | grep -v "PING" | sort -n | awk '
+BEGIN {numdrops=0; numrows=0;}
+{
+       if ( $2 == "pingtime" ) {
+               numrows += 1;
+               arr[numrows]=$1; sum+=$1;
+       } else {
+               numdrops += 1;
+       }
+}
+END {
+       pc10="-"; pc90="-"; med="-";
+       if (numrows>=10) {
+               ix=int(numrows/10); pc10=arr[ix]; ix=int(numrows*9/10);pc90=arr[ix];
+               if (numrows%2==1) med=arr[(numrows+1)/2]; else med=(arr[numrows/2]);
+       }
+       pktloss = numdrops>0 ? numdrops/(numdrops+numrows) * 100 : 0;
+       printf("  Latency: [in msec, %d pings, %4.2f%% packet loss]\n",numdrops+numrows,pktloss)
+       if (numrows>0) {
+               fmt="%9s: %7.3f\n"
+               printf(fmt fmt fmt fmt fmt fmt, "Min",arr[1],"10pct",pc10,"Median",med,
+                       "Avg",sum/numrows,"90pct",pc90,"Max",arr[numrows])
+       }
+}'
+}
+
+# Summarize the contents of the load file, speedtest process stat file, cpuinfo
+# file to show mean/stddev CPU utilization, CPU freq, netperf CPU usage.
+#   input parameter ($1) file contains CPU load/frequency samples
+
+summarize_load() {
+       cat $1 /proc/$$/stat | awk -v SCRIPT_PID=$$ '
+# track CPU frequencies
+$1 == "cpufreq" {
+       sum_freq[$2]+=$3/1000
+       n_freq_samp[$2]++
+}
+# total CPU of speedtest processes
+$1 == SCRIPT_PID {
+       tot=$16+$17
+       if (init_proc_cpu=="") init_proc_cpu=tot
+       proc_cpu=tot-init_proc_cpu
+}
+# track aggregate CPU stats
+$1 == "cpu" {
+       tot=0; for (f=2;f<=8;f++) tot+=$f
+       if (init_cpu=="") init_cpu=tot
+       tot_cpu=tot-init_cpu
+       n_load_samp++
+}
+# track per-CPU stats
+$1 ~ /cpu[0-9]+/ {
+       tot=0; for (f=2;f<=8;f++) tot+=$f
+       usg=tot-($5+$6)
+       if (init_tot[$1]=="") {
+               init_tot[$1]=tot
+               init_usg[$1]=usg
+               cpus[n_cpus++]=$1
+       }
+       if (last_tot[$1]>0) {
+               sum_usg_2[$1] += ((usg-last_usg[$1])/(tot-last_tot[$1]))^2
+       }
+       last_tot[$1]=tot
+       last_usg[$1]=usg
+}
+END {
+       printf(" CPU Load: [in %% busy (avg +/- std dev)")
+       for (i in sum_freq) if (sum_freq[i]>0) {printf(" @ avg frequency"); break}
+       if (n_load_samp>0) n_load_samp--
+       printf(", %d samples]\n", n_load_samp)
+       for (i=0;i<n_cpus;i++) {
+               c=cpus[i]
+               if (n_load_samp>0) {
+                       avg_usg=(last_tot[c]-init_tot[c])
+                       avg_usg=avg_usg>0 ? (last_usg[c]-init_usg[c])/avg_usg : 0
+                       std_usg=sum_usg_2[c]/n_load_samp-avg_usg^2
+                       std_usg=std_usg>0 ? sqrt(std_usg) : 0
+                       printf("%9s: %5.1f +/- %4.1f", c, avg_usg*100, std_usg*100)
+                       avg_freq=n_freq_samp[c]>0 ? sum_freq[c]/n_freq_samp[c] : 0
+                       if (avg_freq>0) printf("  @ %4d MHz", avg_freq)
+                       printf("\n")
+               }
+       }
+       printf(" Overhead: [in %% used of total CPU available]\n")
+       printf("%9s: %5.1f\n", "netperf", tot_cpu>0 ? proc_cpu/tot_cpu*100 : 0)
+}'
+}
+
+# Summarize the contents of the speed file to show formatted transfer rate.
+#   input parameter ($1) indicates transfer direction
+#   input parameter ($2) file contains speed info from netperf
+
+summarize_speed() {
+       printf "%9s: %6.2f Mbps\n" $1 $(awk '{s+=$1} END {print s}' $2)
+}
+
+# Capture process load, then per-CPU load/frequency info at 1-second intervals.
+
+sample_load() {
+       local cpus="$(find /sys/devices/system/cpu -name 'cpu[0-9]*' 2>/dev/null)"
+       local f="cpufreq/scaling_cur_freq"
+       cat /proc/$$/stat
+       while : ; do
+               sleep 1s
+               egrep "^cpu[0-9]*" /proc/stat
+               for c in $cpus; do
+                       [ -r $c/$f ] && echo "cpufreq $(basename $c) $(cat $c/$f)"
+               done
+       done
+}
+
+# Print a line of dots as a progress indicator.
+
+print_dots() {
+       while : ; do
+               printf "."
+               sleep 1s
+       done
+}
+
+# Start $MAXSESSIONS datastreams between netperf client and server
+# netperf writes the sole output value (in Mbps) to stdout when completed
+
+start_netperf() {
+       for i in $( seq $MAXSESSIONS ); do
+               netperf $TESTPROTO -H $TESTHOST -t $1 -l $TESTDUR -v 0 -P 0 >> $2 &
+#              echo "Starting PID $! params: $TESTPROTO -H $TESTHOST -t $1 -l $TESTDUR -v 0 -P 0 >> $2"
+       done
+}
+
+# Wait until each of the background netperf processes completes
+
+wait_netperf() {
+       # gets a list of PIDs for child processes named 'netperf'
+#      echo "Process is $$"
+#      echo $(pgrep -P $$ netperf)
+       local err=0
+       for i in $(pgrep -P $$ netperf); do
+#      echo "Waiting for $i"
+               wait $i || err=1
+       done
+       return $err
+}
+
+# Stop the background netperf processes
+
+kill_netperf() {
+       # gets a list of PIDs for child processes named 'netperf'
+#      echo "Process is $$"
+#      echo $(pgrep -P $$ netperf)
+       for i in $(pgrep -P $$ netperf); do
+#      echo "Stopping $i"
+               kill -9 $i
+               wait $i 2>/dev/null
+       done
+}
+
+# Stop the current sample_load() process
+
+kill_load() {
+#      echo "Load: $LOAD_PID"
+       kill -9 $LOAD_PID
+       wait $LOAD_PID 2>/dev/null
+       LOAD_PID=0
+}
+
+# Stop the current print_dots() process
+
+kill_dots() {
+#      echo "Dots: $DOTS_PID"
+       kill -9 $DOTS_PID
+       wait $DOTS_PID 2>/dev/null
+       DOTS_PID=0
+}
+
+# Stop the current ping process
+
+kill_pings() {
+#      echo "Pings: $PING_PID"
+       kill -9 $PING_PID
+       wait $PING_PID 2>/dev/null
+       PING_PID=0
+}
+
+# Stop the current load, pings and dots, and exit
+# ping command catches and handles first Ctrl-C, so you have to hit it again...
+
+kill_background_and_exit() {
+       kill_netperf
+       kill_load
+       kill_dots
+       rm -f $DLFILE
+       rm -f $ULFILE
+       rm -f $LOADFILE
+       rm -f $PINGFILE
+       echo; echo "Stopped"
+       exit 1
+}
+
+# Measure speed, ping latency and cpu usage of netperf data transfers
+# Called with direction parameter: "Download", "Upload", or "Bidirectional"
+# The function gets other info from globals and command-line arguments.
+
+measure_direction() {
+
+       # Create temp files for netperf up/download results
+       ULFILE=$(mktemp /tmp/netperfUL.XXXXXX) || exit 1
+       DLFILE=$(mktemp /tmp/netperfDL.XXXXXX) || exit 1
+       PINGFILE=$(mktemp /tmp/measurepings.XXXXXX) || exit 1
+       LOADFILE=$(mktemp /tmp/measureload.XXXXXX) || exit 1
+#      echo $ULFILE $DLFILE $PINGFILE $LOADFILE
+
+       local dir=$1
+       local spd_test
+
+       # Start dots
+       print_dots &
+       DOTS_PID=$!
+#      echo "Dots PID: $DOTS_PID"
+
+       # Start Ping
+       if [ $TESTPROTO -eq "-4" ]; then
+               ping  $PINGHOST > $PINGFILE &
+       else
+               ping6 $PINGHOST > $PINGFILE &
+       fi
+       PING_PID=$!
+#      echo "Ping PID: $PING_PID"
+
+       # Start CPU load sampling
+       sample_load > $LOADFILE &
+       LOAD_PID=$!
+#      echo "Load PID: $LOAD_PID"
+
+       # Start netperf datastreams between client and server
+       if [ $dir = "Bidirectional" ]; then
+               start_netperf TCP_STREAM $ULFILE
+               start_netperf TCP_MAERTS $DLFILE
+       else
+               # Start unidirectional netperf with the proper direction
+               case $dir in
+                       Download) spd_test="TCP_MAERTS";;
+                       Upload) spd_test="TCP_STREAM";;
+               esac
+               start_netperf $spd_test $DLFILE
+       fi
+
+       # Wait until background netperf processes complete, check errors
+       if ! wait_netperf; then
+               echo;echo "WARNING: netperf returned errors. Results may be inaccurate!"
+       fi
+
+       # When netperf completes, stop the CPU monitor, dots and pings
+       kill_load
+       kill_pings
+       kill_dots
+       echo
+
+       # Print TCP Download/Upload speed
+       if [ $dir = "Bidirectional" ]; then
+               summarize_speed Download $DLFILE
+               summarize_speed Upload $ULFILE
+       else
+               summarize_speed $dir $DLFILE
+       fi
+
+       # Summarize the ping data
+       summarize_pings $PINGFILE
+
+       # Summarize the load data
+       summarize_load $LOADFILE
+
+       # Clean up
+       rm -f $DLFILE
+       rm -f $ULFILE
+       rm -f $PINGFILE
+       rm -f $LOADFILE
+}
+
+# ------- Start of the main routine --------
+
+# set an initial values for defaults
+TESTHOST="netperf.bufferbloat.net"
+TESTDUR="60"
+PINGHOST="gstatic.com"
+MAXSESSIONS=5
+TESTPROTO="-4"
+TESTSEQ=1
+
+# read the options
+
+# extract options and their arguments into variables.
+while [ $# -gt 0 ]
+do
+       case "$1" in
+               -s|--sequential) TESTSEQ=1 ; shift 1 ;;
+               -c|--concurrent) TESTSEQ=0 ; shift 1 ;;
+               -4|-6) TESTPROTO=$1 ; shift 1 ;;
+               -H|--host)
+                       case "$2" in
+                               "") echo "Missing hostname" ; exit 1 ;;
+                               *) TESTHOST=$2 ; shift 2 ;;
+                       esac ;;
+               -t|--time)
+                       case "$2" in
+                               "") echo "Missing duration" ; exit 1 ;;
+                               *) TESTDUR=$2 ; shift 2 ;;
+                       esac ;;
+               -p|--ping)
+                       case "$2" in
+                               "") echo "Missing ping host" ; exit 1 ;;
+                               *) PINGHOST=$2 ; shift 2 ;;
+                       esac ;;
+               -n|--number)
+                       case "$2" in
+                               "") echo "Missing number of simultaneous streams" ; exit 1 ;;
+                               *) MAXSESSIONS=$2 ; shift 2 ;;
+                       esac ;;
+               --) shift ; break ;;
+               *) echo "Usage: speedtest-netperf.sh [ -s | -c ] [-4 | -6] [ -H netperf-server ] [ -t duration ] [ -p host-to-ping ] [ -n simultaneous-sessions ]" ; exit 1 ;;
+       esac
+done
+
+# Check dependencies
+
+if ! netperf -V >/dev/null 2>&1; then
+       echo "Missing netperf program, please install" ; exit 1
+fi
+
+# Start the main test
+
+DATE=$(date "+%Y-%m-%d %H:%M:%S")
+echo "$DATE Starting speedtest for $TESTDUR seconds per transfer session."
+echo "Measure speed to $TESTHOST (IPv${TESTPROTO#-}) while pinging $PINGHOST."
+echo -n "Download and upload sessions are "
+[ "$TESTSEQ " -eq "1" ] && echo -n "sequential," || echo -n "concurrent,"
+echo " each with $MAXSESSIONS simultaneous streams."
+
+# Catch a Ctl-C and stop background netperf, CPU stats, pinging and print_dots
+trap kill_background_and_exit HUP INT TERM
+
+if [ $TESTSEQ -eq "1" ]; then
+       measure_direction "Download"
+       measure_direction "Upload"
+else
+       measure_direction "Bidirectional"
+fi
index c2dc44b290397fac100b55748a0b9d26f45343be..1630771a5988643441874ce711049b14f8139b86 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2018 The Regents of the University of California
+# Copyright (C) 2019 The Regents of the University of California
 #
 # This is free software, licensed under the GNU General Public License v3.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=spoofer
-PKG_VERSION:=1.4.1
+PKG_VERSION:=1.4.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
-PKG_HASH:=e6d9e954709a15dc55187a962e8698d880f3df3ce8b914097c576a3a1f852d0d
+PKG_HASH:=994555b360a095f0e9baed2469ef26bd29610af155ce58b3984d2f1616a74526
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=LICENSE
index 4433d0668eb0b686163fddd6d4bbb9985cac6e74..bd56d067fc88f452839966bb08fe0f68d3d62d5d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squid
 PKG_VERSION:=4.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
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 b277e22c5cc1127f1e51020b4e80ebb65007502e..f2c2e00cf5154ae9417095181697d51ecf460570 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sshtunnel
 PKG_VERSION:=4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0+
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
@@ -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 a6d9aa78cac7bae8aeb460de5c356e54d8cf2032..fa5509e02bff1cd6d10a321525f5f0c605e9fc86 100644 (file)
@@ -29,7 +29,7 @@ append_params() {
 }
 
 append_string() {
-       local varname="$1"; local add="$2"; local separator="${3:- }"; local actual
+       local varname="$1"; local add="$2"; local separator="${3:- }"; local actual new
        eval "actual=\$$varname"
 
        new="${actual:+$actual$separator}$add"
@@ -37,7 +37,7 @@ append_string() {
 }
 
 validate_server_section() {
-       uci_validate_section sshtunnel server "$1" \
+       uci_load_validate sshtunnel server "$1" "$2" \
                'user:string(1)' \
                'hostname:host' \
                'port:port' \
@@ -49,14 +49,14 @@ validate_server_section() {
                'IdentityFile:file' \
                'LogLevel:or("QUIET", "FATAL", "ERROR", "INFO", "VERBOSE", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3"):INFO' \
                'ServerAliveCountMax:min(1)' \
-               'ServerAliveInterval:min(1)' \
-               'StrictHostKeyChecking:or("yes", "no")' \
+               'ServerAliveInterval:min(0)' \
+               'StrictHostKeyChecking:or("yes", "no", "accept-new")' \
                'TCPKeepAlive:or("yes", "no")' \
                'VerifyHostKeyDNS:or("yes", "no")'
 }
 
 validate_tunnelR_section() {
-       uci_validate_section sshtunnel tunnelR "$1" \
+       uci_load_validate sshtunnel tunnelR "$1" "$2" \
                'remoteaddress:or(host, "*"):*' \
                'remoteport:port' \
                'localaddress:host' \
@@ -64,7 +64,7 @@ validate_tunnelR_section() {
 }
 
 validate_tunnelL_section() {
-       uci_validate_section sshtunnel tunnelL "$1" \
+       uci_load_validate sshtunnel tunnelL "$1" "$2" \
                'remoteaddress:host' \
                'remoteport:port' \
                'localaddress:or(host, "*"):*' \
@@ -72,13 +72,13 @@ validate_tunnelL_section() {
 }
 
 validate_tunnelD_section() {
-       uci_validate_section sshtunnel tunnelD "$1" \
+       uci_load_validate sshtunnel tunnelD "$1" "$2" \
                'localaddress:or(host, "*"):*' \
                'localport:port'
 }
 
 validate_tunnelW_section() {
-       uci_validate_section sshtunnel tunnelW "$1" \
+       uci_load_validate sshtunnel tunnelW "$1" "$2" \
                'vpntype:or("ethernet", "point-to-point"):point-to-point' \
                'localdev:or("any", min(1))' \
                'remotedev:or("any", min(1))'
@@ -91,15 +91,14 @@ load_tunnelR() {
        [ "$server" = "$section_server" ] || return 0
 
        # validate and load this remote tunnel config
-       local remoteaddress remoteport localaddress localport
-       validate_tunnelR_section "$1" || { _err "tunnelR ${1}: validation failed"; return 1; }
+       [ "$2" = 0 ] || { _err "tunnelR $1: validation failed"; return 1; }
 
-       [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelR ${1}: missing required options"; return 1; }
+       [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelR $1: missing required options"; return 1; }
 
        # count nr of valid sections to make sure there are at least one
        let count++
 
-       _log "tunnelR at ${server}: -R $remoteaddress:$remoteport:$localaddress:$localport"
+       _log "tunnelR at $server: -R $remoteaddress:$remoteport:$localaddress:$localport"
        append_string "ARGS_tunnels" "-R $remoteaddress:$remoteport:$localaddress:$localport"
 }
 
@@ -110,15 +109,14 @@ load_tunnelL() {
        [ "$server" = "$section_server" ] || return 0
 
        # validate and load this remote tunnel config
-       local remoteaddress remoteport localaddress localport
-       validate_tunnelL_section "$1" || { _err "tunnelL ${1}: validation failed"; return 1; }
+       [ "$2" = 0 ] || { _err "tunnelL $1: validation failed"; return 1; }
 
-       [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelL ${1}: missing required options"; return 1; }
+       [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelL $1: missing required options"; return 1; }
 
        # count nr of valid sections to make sure there are at least one
        let count++
 
-       _log "tunnelL at ${server}: -L $localaddress:$localport:$remoteaddress:$remoteport"
+       _log "tunnelL at $server: -L $localaddress:$localport:$remoteaddress:$remoteport"
        append_string "ARGS_tunnels" "-L $localaddress:$localport:$remoteaddress:$remoteport"
 }
 
@@ -129,15 +127,14 @@ load_tunnelD() {
        [ "$server" = "$section_server" ] || return 0
 
        # validate and load this remote tunnel config
-       local localaddress localport
-       validate_tunnelD_section "$1" || { _err "tunnelD ${1}: validation failed"; return 1; }
+       [ "$2" = 0 ] || { _err "tunnelD $1: validation failed"; return 1; }
 
-       [ -n "$localport" ] || { _err "tunnelD ${1}: missing localport"; return 1; }
+       [ -n "$localport" ] || { _err "tunnelD $1: missing localport"; return 1; }
 
        # count nr of valid sections to make sure there are at least one
        let count++
 
-       _log "proxy via ${server}: -D $localaddress:$localport"
+       _log "proxy via $server: -D $localaddress:$localport"
        append_string "ARGS_tunnels" "-D $localaddress:$localport"
 }
 
@@ -148,38 +145,34 @@ load_tunnelW() {
        [ "$server" = "$section_server" ] || return 0
 
        # validate and load this remote tunnel config
-       local localdev remotedev vpntype
-       validate_tunnelW_section "$1" || { _err "tunnelW ${1}: validation failed"; return 1; }
+       [ "$2" = 0 ] || { _err "tunnelW $1: validation failed"; return 1; }
 
        [ -n "$vpntype" -a -n "$localdev" -a -n "$remotedev" ] || { _err "tunnelW $1: missing or bad options"; return 1; }
 
-       [ "$user" == "root" ] || { _err "tunnelW ${1}: root is required for tun"; return 1; }
+       [ "$user" = "root" ] || { _err "tunnelW $1: root is required for tun"; return 1; }
 
        # count nr of valid sections to make sure there are at least one
        let count++
 
-       _log "tunnelW to ${server}: -w $localdev:$remotedev -o Tunnel=$vpntype"
+       _log "tunnelW to $server: -w $localdev:$remotedev -o Tunnel=$vpntype"
        append_string "ARGS_tunnels" "-w $localdev:$remotedev -o Tunnel=$vpntype"
 }
 
 load_server() {
-       server="$1"
-       local user hostname port retrydelay PKCS11Provider CheckHostIP Compression \
-               CompressionLevel IdentityFile LogLevel ServerAliveCountMax \
-               ServerAliveInterval StrictHostKeyChecking TCPKeepAlive VerifyHostKeyDNS
+       local server="$1"
 
-       validate_server_section "$server" || { _err "server ${server}: validation failed"; return 1; }
+       [ "$2" = 0 ] || { _err "server $server: validation failed"; return 1; }
 
-       ARGS=""
-       ARGS_options=""
-       ARGS_tunnels=""
-       count=0
+       local ARGS=""
+       local ARGS_options=""
+       local ARGS_tunnels=""
+       local count=0
 
-       config_foreach load_tunnelR "tunnelR"
-       config_foreach load_tunnelL "tunnelL"
-       config_foreach load_tunnelD "tunnelD"
-       config_foreach load_tunnelW "tunnelW"
-       [ "$count" -eq 0 ] && { _err "tunnels to ${server} not started - no tunnels defined"; return 1; }
+       config_foreach validate_tunnelR_section "tunnelR" load_tunnelR
+       config_foreach validate_tunnelL_section "tunnelL" load_tunnelL
+       config_foreach validate_tunnelD_section "tunnelD" load_tunnelD
+       config_foreach validate_tunnelW_section "tunnelW" load_tunnelW
+       [ "$count" -eq 0 ] && { _err "tunnels to $server not started - no tunnels defined"; return 1; }
 
        append_params CheckHostIP Compression CompressionLevel IdentityFile \
                LogLevel PKCS11Provider ServerAliveCountMax ServerAliveInterval \
@@ -197,7 +190,7 @@ load_server() {
 
 start_service() {
        config_load "sshtunnel"
-       config_foreach load_server "server"
+       config_foreach validate_server_section "server" load_server
 }
 
 service_triggers() {
index 52e688193e2ad79a0e2781b95b160bf400dc6397..6f7a24c0940533b408f670f6fb9fc4368fc86414 100644 (file)
@@ -18,7 +18,7 @@
 #      option PKCS11Provider           /lib/pteidpkcs11.so
 #      option ServerAliveCountMax      3
 #      option ServerAliveInterval      0
-#      option StrictHostKeyChecking    ask
+#      option StrictHostKeyChecking    accept-new
 #      option TCPKeepAlive             yes
 #      option VerifyHostKeyDNS         yes
 
index 5bb78aeb82313b81860761cb42c7daf3e1d5eada..567e4aec5bb2947813f5dac2fceb36bc6613ca4f 100644 (file)
@@ -1,5 +1,6 @@
-menu "Configuration"
-       depends on PACKAGE_strongswan
+
+if PACKAGE_strongswan
+comment Configuration
 
 # --with-routing-table
 config STRONGSWAN_ROUTING_TABLE
@@ -13,4 +14,6 @@ config STRONGSWAN_ROUTING_TABLE_PRIO
        prompt "Set the IPsec routing table priority"
        default "220"
 
-endmenu
+comment Packages
+
+endif
index 396b3a5f0ae7df6abd151abe8961a95adc860d66..13d351b361d5d2c554158bcde4b7779746cdb915 100644 (file)
@@ -120,6 +120,7 @@ endef
 
 define Package/strongswan
 $(call Package/strongswan/Default)
+  MENU:=1
   DEPENDS:= +libpthread +ip \
        +kmod-crypto-authenc \
        +kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6 \
@@ -138,7 +139,7 @@ endef
 define Package/strongswan-full
 $(call Package/strongswan/Default)
   TITLE+= (full)
-  DEPENDS:= +strongswan \
+  DEPENDS:= strongswan \
        +strongswan-charon \
        +strongswan-charon-cmd \
        +strongswan-ipsec \
@@ -231,7 +232,7 @@ endef
 define Package/strongswan-default
 $(call Package/strongswan/Default)
   TITLE+= (default)
-  DEPENDS:= +strongswan \
+  DEPENDS:= strongswan \
        +strongswan-charon \
        +strongswan-ipsec \
        +strongswan-mod-aes \
@@ -274,7 +275,7 @@ endef
 define Package/strongswan-isakmp
 $(call Package/strongswan/Default)
   TITLE+= (isakmp)
-  DEPENDS:= +strongswan \
+  DEPENDS:= strongswan \
        +strongswan-charon \
        +strongswan-ipsec \
        +strongswan-mod-aes \
@@ -304,7 +305,7 @@ endef
 define Package/strongswan-minimal
 $(call Package/strongswan/Default)
   TITLE+= (minimal)
-  DEPENDS:= +strongswan \
+  DEPENDS:= strongswan \
        +strongswan-charon \
        +strongswan-mod-aes \
        +strongswan-mod-gmp \
@@ -329,7 +330,7 @@ endef
 define Package/strongswan-charon
 $(call Package/strongswan/Default)
   TITLE+= IKEv1/IKEv2 keying daemon
-  DEPENDS:= +strongswan
+  DEPENDS:= strongswan
 endef
 
 define Package/strongswan-charon/description
@@ -340,7 +341,7 @@ endef
 define Package/strongswan-charon-cmd
 $(call Package/strongswan/Default)
   TITLE+= charon-cmd utility
-  DEPENDS:= +strongswan +strongswan-charon
+  DEPENDS:= strongswan +strongswan-charon
 endef
 
 define Package/strongswan-charon-cmd/description
@@ -351,7 +352,7 @@ endef
 define Package/strongswan-ipsec
 $(call Package/strongswan/Default)
   TITLE+= utilities
-  DEPENDS:= +strongswan
+  DEPENDS:= strongswan
 endef
 
 define Package/strongswan-ipsec/description
@@ -362,7 +363,7 @@ endef
 define Package/strongswan-pki
 $(call Package/strongswan/Default)
   TITLE+= PKI tool
-  DEPENDS:= +strongswan
+  DEPENDS:= strongswan
 endef
 
 define Package/strongswan-pki/description
@@ -373,7 +374,7 @@ endef
 define Package/strongswan-scepclient
 $(call Package/strongswan/Default)
   TITLE+= SCEP client
-  DEPENDS:= +strongswan
+  DEPENDS:= strongswan
 endef
 
 define Package/strongswan-scepclient/description
@@ -384,7 +385,7 @@ endef
 define Package/strongswan-swanctl
 $(call Package/strongswan/Default)
   TITLE+= swanctl utility
-  DEPENDS:= +strongswan +strongswan-mod-vici
+  DEPENDS:= strongswan +strongswan-mod-vici
 endef
 
 define Package/strongswan-swanctl/description
@@ -395,7 +396,7 @@ endef
 define Package/strongswan-libtls
 $(call Package/strongswan/Default)
   TITLE+= libtls
-  DEPENDS:= +strongswan
+  DEPENDS:= strongswan
 endef
 
 define Package/strongswan-libtls/description
@@ -408,7 +409,7 @@ define BuildPlugin
   define Package/strongswan-mod-$(1)
     $$(call Package/strongswan/Default)
     TITLE:= StrongSwan $(2) plugin
-    DEPENDS:= +strongswan $(3)
+    DEPENDS:= strongswan $(3)
   endef
 
   define Package/strongswan-mod-$(1)/install
index 9703573ec0a594bd2edc339016bb40072ce6f9e7..800e9545ebb38035d8f5630595f7827a3d7d67f7 100644 (file)
@@ -388,7 +388,7 @@ the supplied server certificate
 #### `list spki`
 
 This list specifies the SPKI pinset which is verified against the keys in the
-server cerrtificate. The values takes the form `'<digest type>/value>'`, where
+server cerrtificate. The value takes the form `'<digest type>/value>'`, where
 the `digest type` is the hashing algorithm used, and the value is the Base64
 encoded hash of the public key. At present, only `sha256` is
 supported for the digest type.
index 655352deb2b4fbeee35c5bd5d82cad771fb4927e..b935f3169fc7b3b3612a27228724718233fd0f72 100644 (file)
@@ -17,7 +17,7 @@ dns_transport_list:
 upstream_recursive_servers:
   - address_data: 2606:4700:4700::1111
     tls_auth_name: "cloudflare-dns.com"
-  - address_data: 2606:4700:4700::1111
+  - address_data: 2606:4700:4700::1001
     tls_auth_name: "cloudflare-dns.com"
   - address_data: 1.1.1.1
     tls_auth_name: "cloudflare-dns.com"
index a9736c1a2cd0e72cdb712ab4b46462a5bff3f882..c5337777d5bd89bb9514a61457e7db5aa40460da 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stunnel
-PKG_VERSION:=5.49
-PKG_RELEASE:=2
+PKG_VERSION:=5.50
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0+
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
@@ -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:=3d6641213a82175c19f23fde1c3d1c841738385289eb7ca1554f4a58b96d955e
+PKG_HASH:=951d92502908b852a297bd9308568f7c36598670b84286d3e05d4a3a550c0149
 
 PKG_FIXUP:=autoreconf
 PKG_FIXUP:=patch-libtool
@@ -58,8 +58,7 @@ CONFIGURE_ARGS+= \
        --with-threads=pthread \
        --with-ssl=$(STAGING_DIR)/usr \
        --disable-libwrap \
-       --disable-systemd \
-       --disable-fips
+       --disable-systemd
 
 ifeq ($(CONFIG_IPV6),n)
 CONFIGURE_ARGS+= \
index 73d62da7cdd6fc5120476f09a03b3bfef87e3514..5a45af74c9bb53153395c511442c96d60940a424 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tcpreplay
-PKG_VERSION:=4.3.1
+PKG_VERSION:=4.3.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION)
-PKG_HASH:=108924a25e616e3465139410c49cae629c338df73443dfc8fc155ea9f099c659
+PKG_HASH:=955aed6a40f49a5b8c1234fd0a928edc5c665d94b7755ab5769c30938e33f380
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=docs/LICENSE
index cba1d50c0ff7b08b5224c470dfc481680009b846..97f47037245b4d05c860fd2b541230b6da49741d 100644 (file)
@@ -1,18 +1,15 @@
-#
-# Copyright (C) 2012-2016 OpenWrt.org
-#
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tgt
-PKG_VERSION:=1.0.74
-PKG_RELEASE:=1
+PKG_VERSION:=1.0.75
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=bfc202790d5326d7a18bd3928b4bb204ffb0acf443a5ec5c16a1a0fbc53be99f
+PKG_HASH:=1c719fdccc6ddc8e5de57a6e546aa64f41056a2fb1d710b8b2a22f65e08f5b90
 
 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
 PKG_LICENSE:=GPL-2.0
@@ -30,10 +27,10 @@ define Package/tgt
 endef
 
 define Package/tgt/description
-Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance.
-Key goals of the project are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space.
-Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20.
-Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine).
+The Linux target framework (tgt) is a user space SCSI target framework
+that supports the iSCSI and iSER transport protocols and that also
+supports multiple methods for accessing block storage. Tgt consists of
+a user-space daemon and user-space tools.
 endef
 
 define Build/Compile
@@ -50,11 +47,10 @@ define Package/tgt/conffiles
 endef
 
 define Package/tgt/install
-       $(INSTALL_DIR) $(1)/
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) ./files/* $(1)/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(1)/usr/sbin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin
+       $(INSTALL_DATA) ./files/tgt.config $(1)/etc/config/tgt
+       $(INSTALL_BIN) ./files/tgt.init $(1)/etc/init.d/tgt
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,tgt))
diff --git a/net/tgt/files/etc/config/tgt b/net/tgt/files/etc/config/tgt
deleted file mode 100644 (file)
index de5239d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-config options 'tgt'
-# iothreads limits number of worker threads per rdwr target, default is 16
-# which seems to be too much for an avarage router
-       option iothreads '2'
-#      option nop_count '3'
-#      option nop_interval '1'
-#      list portal '[::1]'
-#      list portal '127.0.0.1:3261'
-#      list portal '0.0.0.0:3262'
-#      list portal '[::]:3263'
-
-config target 1
-       option name 'iqn.2012-06.org.openwrt:target1'
-#      list allow_name 'iqn.1994-05.org.example:fedcba987654'
-#      list allow_address '192.168.2.128/27'
-
-#config target 2
-#      option name 'iqn.2012-06.org.openwrt:t2'
-
-# all options are set to default, except for the device
-# lun "name" is constructed as TGTID_LUN
-#config lun                        1_1
-#      option 'device' '/dev/sda'
-# type of scsi device. available options: disk, cd, pt (sg passthrough)
-#      option 'type' 'disk'
-# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN)
-#      option 'bstype' 'aio'
-# set sync and/or direct flags when opening device, affect only rdwr
-#      option 'sync' '0'
-#      option 'direct' '0'
-# block size for lun, default is 512
-#      option 'blocksize' 4096
-# override SCSI mode page, see tgtadm man page for details
-#      option 'mode_page' 'string'
-# vendor, product, revision, SCSI ID and SCSI Serial number
-#      option 'vendor_id' 'string'
-#      option 'product_id' 'string'
-#      option 'product_rev' 'string'
-#      option 'scsi_id' 'string'
-#      option 'scsi_sn' 'string'
-# refuse write attempts. applies only to disk type
-#      option 'readonly' '0'
-# Disk devices default to non-removable, cd - to removable
-#      option 'removable' '0'
-#  0 = Classic sense format, 1 = Support descriptor format.
-#      option 'sense_format' '0'
-
-#config lun 2_1
-#      option device /mnt/iscsi.img
-
-#config lun 2_2
-#      option device /dev/sdc
-
-#config account
-#      list target 1
-#      list target 2
-#      option user "username1"
-#      option password "pass1"
-
-#config account
-#      option target 2
-#      option user "user2"
-#      option password "pwd2"
-#      option outgoing 1
diff --git a/net/tgt/files/etc/init.d/tgt b/net/tgt/files/etc/init.d/tgt
deleted file mode 100755 (executable)
index bd5f983..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=91
-STOP=10
-
-EXTRA_COMMANDS="show"
-EXTRA_HELP="   show    Show current configuration of tgtd"
-
-NAME=tgt
-PROG=/usr/sbin/tgtd
-USE_PROCD=1
-
-tgtadm="/usr/sbin/tgtadm --lld iscsi"
-logger="logger -p daemon.err -s -t $NAME"
-
-validate_lun_section() {
-       uci_validate_section tgt lun $1 \
-               'device:or(file, device)' \
-               'type:or("disk", "cd", "pt"):disk' \
-               'bstype:or("rdwr", "aio", "sg"):rdwr' \
-               'sync:bool:0' \
-               'direct:bool:0' \
-               'blocksize:uinteger' \
-               'mode_page:string' \
-               'product_id:string' \
-               'product_rev:string' \
-               'readonly:bool:0' \
-               'removable:bool' \
-               'scsi_id:string' \
-               'scsi_sn:string' \
-               'sense_format:range(0, 1)' \
-               'vendor_id:string'
-}
-
-handle_lun() {
-       local tgt_lun=$1
-       local tgtid=$2
-       local readonly device type bstype sync direct
-       local my_tgtid=${tgt_lun%_*}
-       local lun=${tgt_lun#*_}
-
-       [ $my_tgtid -eq $tgtid ] || return 0
-
-       validate_lun_section $tgt_lun || {
-               $logger "Validation failed for LUN $tgt_lun"
-               return 1
-       }
-       [ "$device" ] || {
-               $logger "Device is required for target $tgt_lun"
-               return 1
-       }
-
-       if [ $sync -ne 0 -o $direct -ne 0 ]; then
-               local bsoflags
-               [ $sync -ne 0 ] && bsoflags="sync"
-               [ $direct -ne 0 ] && bsoflags="direct"
-               [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct"
-               bsoflags="--bsoflags $bsoflags"
-       fi
-
-       blocksize=${blocksize+--blocksize=$blocksize}
-       local params='' i
-       for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do
-               eval params=\${$i+$i=\$$i,}\$params
-       done
-
-       local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
-       $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype --bstype $bstype $bsoflags $blocksize || {
-               $logger "Failed to create lun $tgt_lun"
-               return 1
-       }
-       $_tgtadm --op update --param $params || {
-               $logger "Failed to update lun $tgt_lun"
-               return 1
-       }
-}
-
-validate_account_section () {
-       uci_validate_section tgt account $1 \
-               'target:list(uinteger)' \
-               'user:string' \
-               'password:string' \
-               'outgoing:bool:0'
-}
-
-handle_account() {
-       local _tgtadm="$tgtadm --mode account"
-       local user password target outgoing
-
-       validate_account_section $1 || {
-               $logger "Validation failed for account ${user:-$1}"
-               return 1
-       }
-       [ "$user" ] || {
-               $logger "User is required for account $1. Run 'uci show tgt.$1' and check options"
-               return 1
-       }
-       [ "$target" ] || {
-               $logger "Target is required for account $user"
-               return 1
-       }
-       [ "$password" ] || {
-               $logger "Password is required for account $user"
-               return 1
-       }
-       $_tgtadm --op new --user "$user" --password "$password" || {
-               $logger "Failed to create user $username"
-               return 1
-       }
-}
-
-bind_account_to_target() {
-       local _tgtadm="$tgtadm --mode account"
-       local tgtid=$2 user password outgoing
-
-       validate_account_section $1 || {
-               $logger "Validation failed for account ${user:-$1}"
-               return 1
-       }
-
-       [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing=""
-       local t
-       for t in $target; do
-               [ "$t" -eq "$tgtid" ] && {
-                       $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || {
-                               $logger "Failed to bind user $username to target $tgtid"
-                               return 1
-                       }
-               }
-       done
-       return 0
-}
-
-validate_target_section() {
-       uci_validate_section tgt target $1 \
-               'name:string:iqn.2012-06.org.openwrt' \
-               'allow_address:list(string):ALL' \
-               'allow_name:list(string)'
-}
-
-handle_target() {
-       local tgtid=$1
-       local _tgtadm="$tgtadm --mode target"
-       local name allow
-
-       [ $tgtid -ge 0 ] || return 1
-       validate_target_section $tgtid || {
-               $logger "Validation failed for target $tgtid"
-               return 1
-       }
-       $_tgtadm --op new --tid $tgtid --targetname $name || {
-               $logger "Failed to create target $tgtid"
-               return 1
-       }
-       local i
-       for i in $allow_address; do
-               $_tgtadm --op bind --tid $tgtid --initiator-address $i || {
-                       $logger "Failed to set allow $i to connect to target $tgtid"
-                       return 1
-               }
-       done
-       for i in $allow_name; do
-               $_tgtadm --op bind --tid $tgtid --initiator-name $i || {
-                       $logger "Failed to set allow $i to connect to target $tgtid"
-                       return 1
-               }
-       done
-       config_foreach handle_lun lun $tgtid || return 1
-       config_foreach bind_account_to_target account $tgtid || return 1
-}
-
-configure() {
-       config_load $NAME
-       $tgtadm --mode sys --op update --name State -v offline || {
-               $logger "Failed to set system state to Offline"
-               return 1
-       }
-       config_foreach handle_account account || return 1
-       config_foreach handle_target target || return 1
-       $tgtadm --mode sys --op update --name State -v ready || {
-               $logger "Failed to set system state to Ready"
-               return 1
-       }
-       return 0
-}
-
-validate_tgt_section() {
-       uci_validate_section tgt options $1 \
-               'iothreads:uinteger' \
-               'portal:list(string)' \
-               'nop_interval:uinteger' \
-               'nop_count:uinteger'
-}
-
-start_service() {
-       local iothreads portal nop_interval nop_count
-       validate_tgt_section tgt || {
-               $logger "Validation failed for tgt options"
-               return 1
-       }
-       procd_open_instance
-       procd_set_param command $PROG -f
-       [ "$iothreads" ] && procd_append_param command -t $iothreads
-       [ "${portal}${nop_interval}${nop_count}" ] && {
-               local iscsi="" i
-               for i in nop_interval nop_count; do
-                       eval iscsi=\${$i+$i=\$$i,}\$iscsi
-               done
-               for i in $portal; do
-                       iscsi="portal=$i,$iscsi"
-               done
-               procd_append_param command --iscsi $iscsi
-       }
-       procd_set_param respawn
-       procd_close_instance
-       logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds"
-       ( sleep 5; configure || { stop_service; exit 1; } ) &
-}
-
-stop_service() {
-       $tgtadm --mode sys --op update --name State -v offline || {
-               $logger "Failed to set system state to Offline"
-               return 1
-       }
-       $tgtadm --mode target --op show \
-               | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \
-               | xargs -r -n1 $tgtadm --mode target --op delete --force --tid
-       $tgtadm --mode sys --op delete
-}
-
-reload_service() {
-       stop_service
-       start_service
-}
-
-show() {
-       $tgtadm --mode target --op show
-}
diff --git a/net/tgt/files/tgt.config b/net/tgt/files/tgt.config
new file mode 100644 (file)
index 0000000..de5239d
--- /dev/null
@@ -0,0 +1,64 @@
+config options 'tgt'
+# iothreads limits number of worker threads per rdwr target, default is 16
+# which seems to be too much for an avarage router
+       option iothreads '2'
+#      option nop_count '3'
+#      option nop_interval '1'
+#      list portal '[::1]'
+#      list portal '127.0.0.1:3261'
+#      list portal '0.0.0.0:3262'
+#      list portal '[::]:3263'
+
+config target 1
+       option name 'iqn.2012-06.org.openwrt:target1'
+#      list allow_name 'iqn.1994-05.org.example:fedcba987654'
+#      list allow_address '192.168.2.128/27'
+
+#config target 2
+#      option name 'iqn.2012-06.org.openwrt:t2'
+
+# all options are set to default, except for the device
+# lun "name" is constructed as TGTID_LUN
+#config lun                        1_1
+#      option 'device' '/dev/sda'
+# type of scsi device. available options: disk, cd, pt (sg passthrough)
+#      option 'type' 'disk'
+# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN)
+#      option 'bstype' 'aio'
+# set sync and/or direct flags when opening device, affect only rdwr
+#      option 'sync' '0'
+#      option 'direct' '0'
+# block size for lun, default is 512
+#      option 'blocksize' 4096
+# override SCSI mode page, see tgtadm man page for details
+#      option 'mode_page' 'string'
+# vendor, product, revision, SCSI ID and SCSI Serial number
+#      option 'vendor_id' 'string'
+#      option 'product_id' 'string'
+#      option 'product_rev' 'string'
+#      option 'scsi_id' 'string'
+#      option 'scsi_sn' 'string'
+# refuse write attempts. applies only to disk type
+#      option 'readonly' '0'
+# Disk devices default to non-removable, cd - to removable
+#      option 'removable' '0'
+#  0 = Classic sense format, 1 = Support descriptor format.
+#      option 'sense_format' '0'
+
+#config lun 2_1
+#      option device /mnt/iscsi.img
+
+#config lun 2_2
+#      option device /dev/sdc
+
+#config account
+#      list target 1
+#      list target 2
+#      option user "username1"
+#      option password "pass1"
+
+#config account
+#      option target 2
+#      option user "user2"
+#      option password "pwd2"
+#      option outgoing 1
diff --git a/net/tgt/files/tgt.init b/net/tgt/files/tgt.init
new file mode 100755 (executable)
index 0000000..b627d5d
--- /dev/null
@@ -0,0 +1,247 @@
+#!/bin/sh /etc/rc.common
+START=91
+STOP=10
+
+EXTRA_COMMANDS="show"
+EXTRA_HELP="   show    Show current configuration of tgtd"
+
+NAME=tgt
+PROG=/usr/sbin/tgtd
+USE_PROCD=1
+
+tgtadm="/usr/sbin/tgtadm --lld iscsi"
+logger="logger -p daemon.err -s -t $NAME"
+
+validate_lun_section() {
+       uci_load_validate tgt lun "$1" "$2" \
+               'device:or(file, device)' \
+               'type:or("disk", "cd", "pt"):disk' \
+               'bstype:or("rdwr", "aio", "sg"):rdwr' \
+               'sync:bool:0' \
+               'direct:bool:0' \
+               'blocksize:uinteger' \
+               'mode_page:string' \
+               'product_id:string' \
+               'product_rev:string' \
+               'readonly:bool:0' \
+               'removable:bool' \
+               'scsi_id:string' \
+               'scsi_sn:string' \
+               'sense_format:range(0, 1)' \
+               'vendor_id:string'
+}
+
+handle_lun() {
+       local tgt_lun=$1
+       local my_tgtid=${tgt_lun%_*}
+       local lun=${tgt_lun#*_}
+
+       [ $my_tgtid -eq $tgtid ] || return 0
+
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for LUN $tgt_lun"
+               return 1
+       }
+       [ "$device" ] || {
+               $logger "Device is required for target $tgt_lun"
+               return 1
+       }
+
+       if [ $sync -ne 0 -o $direct -ne 0 ]; then
+               local bsoflags
+               [ $sync -ne 0 ] && bsoflags="sync"
+               [ $direct -ne 0 ] && bsoflags="direct"
+               [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct"
+               bsoflags="--bsoflags $bsoflags"
+       fi
+
+       blocksize=${blocksize+--blocksize=$blocksize}
+       local params='' i
+       for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do
+               eval params=\${$i+$i=\$$i,}\$params
+       done
+
+       local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun"
+       $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype $bsoflags $blocksize || {
+               $logger "Failed to create lun $tgt_lun"
+               return 1
+       }
+       $_tgtadm --op update --param $params || {
+               $logger "Failed to update lun $tgt_lun"
+               return 1
+       }
+}
+
+validate_account_section () {
+       uci_load_validate tgt account "$1" "$2" \
+               'target:list(uinteger)' \
+               'user:string' \
+               'password:string' \
+               'outgoing:bool:0'
+}
+
+handle_account() {
+       local _tgtadm="$tgtadm --mode account"
+
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for account ${user:-$1}"
+               return 1
+       }
+       [ "$user" ] || {
+               $logger "User is required for account $1. Run 'uci show tgt.$1' and check options"
+               return 1
+       }
+       [ "$target" ] || {
+               $logger "Target is required for account $user"
+               return 1
+       }
+       [ "$password" ] || {
+               $logger "Password is required for account $user"
+               return 1
+       }
+       $_tgtadm --op new --user "$user" --password "$password" || {
+               $logger "Failed to create user $username"
+               return 1
+       }
+}
+
+bind_account_to_target() {
+       local _tgtadm="$tgtadm --mode account"
+
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for account ${user:-$1}"
+               return 1
+       }
+
+       [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing=""
+       local t
+       for t in $target; do
+               [ "$t" -eq "$tgtid" ] && {
+                       $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || {
+                               $logger "Failed to bind user $username to target $tgtid"
+                               return 1
+                       }
+               }
+       done
+       return 0
+}
+
+validate_target_section() {
+       uci_load_validate tgt target "$1" "$2" \
+               'name:string:iqn.2012-06.org.openwrt' \
+               'allow_address:list(string):ALL' \
+               'allow_name:list(string)'
+}
+
+handle_target() {
+       local tgtid=$1
+       local _tgtadm="$tgtadm --mode target"
+
+       [ $tgtid -ge 0 ] || return 1
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for target $tgtid"
+               return 1
+       }
+       $_tgtadm --op new --tid $tgtid --targetname $name || {
+               $logger "Failed to create target $tgtid"
+               return 1
+       }
+       local i
+       for i in $allow_address; do
+               $_tgtadm --op bind --tid $tgtid --initiator-address $i || {
+                       $logger "Failed to set allow $i to connect to target $tgtid"
+                       return 1
+               }
+       done
+       for i in $allow_name; do
+               $_tgtadm --op bind --tid $tgtid --initiator-name $i || {
+                       $logger "Failed to set allow $i to connect to target $tgtid"
+                       return 1
+               }
+       done
+       config_foreach validate_lun_section lun handle_lun || return 1
+       config_foreach validate_account_section account bind_account_to_target || return 1
+}
+
+configure() {
+       config_load $NAME
+       $tgtadm --mode sys --op update --name State -v offline || {
+               $logger "Failed to set system state to Offline"
+               return 1
+       }
+       config_foreach validate_account_section account handle_account || return 1
+       config_foreach validate_target_section target handle_target || return 1
+       $tgtadm --mode sys --op update --name State -v ready || {
+               $logger "Failed to set system state to Ready"
+               return 1
+       }
+       return 0
+}
+
+validate_tgt_section() {
+       uci_load_validate tgt options "$1" "$2" \
+               'iothreads:uinteger' \
+               'portal:list(string)' \
+               'nop_interval:uinteger' \
+               'nop_count:uinteger'
+}
+
+start_tgt_instance() {
+       [ "$2" = 0 ] || {
+               $logger "Validation failed for tgt options"
+               return 1
+       }
+       procd_open_instance
+       procd_set_param command $PROG -f
+       [ "$iothreads" ] && procd_append_param command -t $iothreads
+       [ "$portal$nop_interval$nop_count" ] && {
+               local iscsi="" i
+               for i in nop_interval nop_count; do
+                       eval iscsi=\${$i+$i=\$$i,}\$iscsi
+               done
+               for i in $portal; do
+                       iscsi="portal=$i,$iscsi"
+               done
+               procd_append_param command --iscsi $iscsi
+       }
+       procd_set_param respawn
+       procd_close_instance
+       logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds"
+       ( sleep 5; configure || { stop_service; exit 1; } ) &
+}
+
+start_service() {
+       validate_tgt_section tgt start_tgt_instance
+}
+
+stop_service() {
+       $tgtadm --mode sys --op update --name State -v offline || {
+               $logger "Failed to set system state to Offline"
+               return 1
+       }
+       $tgtadm --mode target --op show \
+               | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \
+               | xargs -r -n1 $tgtadm --mode target --op delete --force --tid
+       $tgtadm --mode sys --op delete
+       procd_kill tgt
+}
+
+reload_service() {
+       stop_service
+       start_service
+}
+
+service_triggers() {
+       procd_add_reload_trigger "tgt"
+
+       procd_open_validate
+       validate_tgt_section
+       validate_account_section
+       validate_target_section
+       validate_lun_section
+       procd_close_validate
+}
+
+show() {
+       $tgtadm --mode target --op show
+}
index bc206e26b0f09209ce75cf128d312f32a58fc20d..ae4cb962cdd58cf4a4275082beb0d18464e9f04a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2016 OpenWrt.org
+# Copyright (C) 2008-2019 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
-PKG_VERSION:=0.3.5.7
-PKG_RELEASE:=1
+PKG_VERSION:=0.3.5.8
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
        https://archive.torproject.org/tor-package-archive
-PKG_HASH:=1b0887fc21ac535befea7243c5d5f1e31394d7458d64b30807a3e98cca0d839e
+PKG_HASH:=d5c56603942a8927670f50a4a469fb909e29d3571fdd013389d567e57abc0b47
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
                Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:torproject:tor
 
 PKG_INSTALL:=1
 PKG_FIXUP:=autoreconf
@@ -99,6 +100,7 @@ CONFIGURE_ARGS += \
        --disable-libscrypt \
        --disable-unittests \
        --disable-lzma \
+       --disable-zstd \
        --with-tor-user=tor \
        --with-tor-group=tor
 
index 6974057d45d83e6901502fb5ec9e064b96a86501..ee0818d9d13afce182f8290b6aeb690d1164ed10 100644 (file)
@@ -7,19 +7,15 @@ STOP=50
 USE_PROCD=1
 
 start_service() {
-       [ -f /var/run/tor.pid ] || {
-               touch /var/run/tor.pid
-               chown tor:tor /var/run/tor.pid
-       }
-       [ -d /var/lib/tor ] || {
-               mkdir -m 0755 -p /var/lib/tor
-               chmod 0700 /var/lib/tor
-               chown tor:tor /var/lib/tor
-       }
-       [ -d /var/log/tor ] || {
-               mkdir -m 0755 -p /var/log/tor
-               chown tor:tor /var/log/tor
-       }
+       touch /var/run/tor.pid
+       chown tor:tor /var/run/tor.pid
+
+       mkdir -m 0700 -p /var/lib/tor
+       chown -R tor:tor /var/lib/tor
+
+       mkdir -m 0755 -p /var/log/tor
+       chown -R tor:tor /var/log/tor
+
        procd_open_instance
        procd_set_param command /usr/sbin/tor --runasdaemon 0
        procd_close_instance
diff --git a/net/torsocks/Makefile b/net/torsocks/Makefile
new file mode 100644 (file)
index 0000000..7cd1323
--- /dev/null
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2017-2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=torsocks
+PKG_VERSION:=2.3.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://people.torproject.org/~dgoulet/torsocks/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_HASH:=b9f1b981d6b3fd4e1820de1eee325f8a7038c84765d5a6cd9af12571d5cc3622
+
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/torsocks
+       SECTION:=net
+       CATEGORY:=Network
+       SUBMENU:=IP Addresses and Names
+       TITLE:=torsocks
+       URL:=https://trac.torproject.org/projects/tor/wiki/doc/torsocks
+       DEPENDS:=+tor
+endef
+
+define Package/torsocks/description
+ Torsocks allows you to use most applications in a safe way with Tor.
+ It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you're using.
+endef
+
+define Build/Configure
+       $(call Build/Configure/Default)
+ifeq ($(CONFIG_USE_UCLIBC),y)
+       find $(PKG_BUILD_DIR) -name 'Makefile' -exec sed -i 's|--param ssp-buffer-size=1 -fstack-protector-all||' \{\} \+
+endif
+endef
+
+define Package/conffiles
+/etc/tor/torsocks.conf
+endef
+
+define Package/torsocks/install
+       $(INSTALL_DIR) $(1)/etc/tor/
+       $(CP) $(PKG_INSTALL_DIR)/etc/tor/torsocks.conf $(1)/etc/tor/
+       $(INSTALL_DIR) $(1)/usr/lib/torsocks
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/torsocks/libtorsocks.so* $(1)/usr/lib/torsocks/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torsocks $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,torsocks))
diff --git a/net/trafficshaper/Makefile b/net/trafficshaper/Makefile
new file mode 100644 (file)
index 0000000..939c37a
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2018 Luiz Angelo Daros de Luca
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=trafficshaper
+PKG_VERSION:=1.0.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+PKG_LICENSE:=GPLv2
+PKG_ARCH:=all
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+include $(INCLUDE_DIR)/package.mk
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/trafficshaper
+   SECTION:=net
+   CATEGORY:=Network
+   DEPENDS:=+tc +kmod-sched-core +kmod-sched-connmark +kmod-ifb +iptables +kmod-sched-cake +iptables-mod-conntrack-extra
+   TITLE:=WAN traffic shaper based on LAN addresses
+   MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
+   PKGARCH:=all
+endef
+
+define Package/trafficshaper/description
+Setup QoS rules to limit (or reserve) traffic used by classes of clients.
+Uplink and downlink can be controled (or not controlled) independently.
+Client classes are defined by its network addresses (IPv4 or IPv6). Each
+client class can define absolute or relative (to wan) bandwith, and also
+the use (or not) of spare wan bandwidth when avaiable.
+
+endef
+
+define Package/trafficshaper/conffiles
+/etc/config/trafficshaper
+endef
+
+define Build/Compile
+endef
+
+define Package/trafficshaper/install
+$(CP) ./files/* $(1)
+endef
+
+$(eval $(call BuildPackage,trafficshaper))
diff --git a/net/trafficshaper/files/etc/config/trafficshaper b/net/trafficshaper/files/etc/config/trafficshaper
new file mode 100644 (file)
index 0000000..daee103
--- /dev/null
@@ -0,0 +1,42 @@
+package trafficshaper
+
+config globals 'globals'
+       option mark_mask '0xFF'
+
+config wan 'wan'
+       option downlink '20000'
+       option uplink '20000'
+
+config wan 'wanb'
+       option downlink '15000'
+       option uplink '5000'
+
+config class 'corp'
+       list network '192.168.1.0/24'
+       list network 'fdc8:1234:1234:1::/64'
+       option reserved_downlink '50%'
+       option reserved_uplink '35%'
+       option allowed_downlink '100%'
+       option allowed_uplink '100%'
+
+config class 'vpn'
+       list network '192.168.2.0/24'
+       list network 'fdc8:1234:1234:2::/64'
+       option reserved_downlink '25%'
+       option reserved_uplink '50%'
+       option allowed_downlink '100%'
+       option allowed_uplink '100%'
+
+config class 'guest'
+       list network '192.168.3.0/24'
+       list network 'fdc8:1234:1234:3::/64'
+       option reserved_downlink '25%'
+       option reserved_uplink '15%'
+       option allowed_downlink '25%'
+       option allowed_uplink '15%'
+
+config class 'default'
+       option reserved_downlink '1000'
+       option reserved_uplink '1000'
+       option allowed_downlink '100%'
+       option allowed_uplink '100%'
diff --git a/net/trafficshaper/files/etc/init.d/trafficshaper b/net/trafficshaper/files/etc/init.d/trafficshaper
new file mode 100755 (executable)
index 0000000..445f50e
--- /dev/null
@@ -0,0 +1,477 @@
+#!/bin/sh /etc/rc.common
+
+# Internal uci firewall chains are flushed and recreated on reload, so
+# put custom rules into the root chains e.g. INPUT or FORWARD or into the
+# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
+
+START=25
+USE_PROCD=1
+
+echo_err() {
+       echo "$@" >&2
+}
+
+msg() {
+       local level=$1; shift
+       echo_err "$APPNAME[$level]: $*"
+}
+
+LOGLEVEL=${LOGLEVEL:-2}
+
+die() {
+       local err=$1; shift
+       e "$*"
+       exit $err
+}
+
+APPNAME="trafficshaper"
+IPT_CHAIN=$APPNAME
+
+debug_exec(){
+       local err
+       d "exec: $*"
+       if "$@"; then
+               return 0
+       else
+               err="$?"
+       fi
+       e "exec[err=$err]: $*"
+       return "$err"
+}
+
+IP="debug_exec ip"
+TC="debug_exec tc"
+IP4T="debug_exec iptables -w 5"
+IP6T="debug_exec ip6tables -w 5"
+
+#QDISC="cake autorate_ingress internet ethernet diffserv4 triple-isolate"
+QDISC="cake"
+
+REQ_MODULES="sch_htb sch_cake act_connmark act_mirred em_u32"
+REQ_CMDS="ip tc iptables"
+
+preinit(){
+       [ "$LOGLEVEL" -ge 1 ] && e() { msg ERROR "$@"; } || e() { true; }
+       [ "$LOGLEVEL" -ge 2 ] && v() { msg INFO "$@"; } || v() { true; }
+       [ "$LOGLEVEL" -ge 3 ] && d() { msg DEBUG "$@"; } || d() { true; }
+       [ "$LOGLEVEL" -ge 4 ] && set -x
+       set -e
+}
+
+requires() {
+       for module in $REQ_MODULES; do
+               [ -d /sys/module/$module ] || insert_modules "$module" ||
+                       die 2 "cannot load $module. Please install kmod-$module"
+       done
+       for cmd in $REQ_CMDS; do
+               which $cmd &>/dev/null ||
+                       die 2 "cannot find command $cmd. Please install $cmd"
+       done
+
+       if ! which ip6tables &>/dev/null; then
+               v "Disabling IPv6 as ip6tables was not found"
+               IP6T=true
+       fi
+
+       . /lib/functions/network.sh
+
+       config_load $APPNAME
+}
+
+do_stop() {
+       local only_int=$1
+
+       preinit
+       requires
+
+       v "Stopping $APPNAME${only_int:+ for interface $only_int}"
+       if [ -z "$only_int" ]; then
+               d "Cleaning iptables"
+               # Cleaning iptables
+               for IPT in "$IP4T" "$IP6T"; do
+                       $IPT -t mangle -D FORWARD -j $IPT_CHAIN &>/dev/null || :
+                       $IPT -t mangle -F $IPT_CHAIN &>/dev/null || :
+                       $IPT -t mangle -X $IPT_CHAIN &>/dev/null || :
+                       $IPT -t mangle -F $IPT_CHAIN-classify &>/dev/null || :
+                       $IPT -t mangle -X $IPT_CHAIN-classify &>/dev/null || :
+               done
+       fi
+
+       d "Cleaning tc"
+       local dev_done int dev ifb interfaces
+       if [ "$only_int" ]; then
+               config_get type $only_int TYPE
+               if [ "$type" != "wan" ]; then
+                       d "interface $only_int not found in trafficshaper config. Ignoring"
+                       return 0
+               fi
+               interfaces="$only_int"
+
+       else
+               interfaces="$(config_foreach echo wan)"
+       fi
+
+       for int in $interfaces; do
+               d "Cleaning tc for interface $int"
+               network_get_physdev dev "$int" ||
+                       die 1 "failed to get physical dev of interface $int"
+
+               if echo "$dev_done" | grep -x -F -q "$dev"; then
+                       continue
+               fi
+               ifb="ifb_$dev"
+               if [ ${#ifb} -gt 15 ]; then
+                       die 1 "ifb name too long: ${ifb}"
+               fi
+
+               $TC qdisc del dev ${ifb} root 2> /dev/null || :
+               $TC qdisc del dev ${dev} root 2> /dev/null || :
+               $TC qdisc del dev ${dev} ingress 2> /dev/null || :
+
+               d "Removing ${ifb}..."
+               $IP link set dev ${ifb} down 2>/dev/null || :
+               $IP link delete dev ${ifb} 2>/dev/null || :
+
+               intdev_done="$(echo "$dev_done"; echo -n $dev)"
+       done
+}
+
+
+calc_bw() {
+       local value=$1 reference=$2
+       case "${value}" in
+               *%) echo "$((${value%\%} * reference / 100 ))";;
+               *) echo ${value};;
+       esac
+}
+
+mask_range() {
+       local mask=$(($1)) n=0 fsb
+       if [ $mask -le 0 ]; then
+               e "mask '$1' must be greater than 0 (have a sequence of set bit)"
+               return 2
+       fi
+       while [ "$((mask & 0x1))" -eq 0 ]; do
+               mask=$((mask >> 1))
+               : $((n++))
+       done
+       fsb="$n"
+       while [ "$((mask & 0x1))" -eq 1 ]; do
+               mask=$((mask >> 1))
+               : $((n++))
+       done
+       if [ $mask -ne 0 ]; then
+               e "mask '$1' must be a continuos sequence of set bit"
+               return 2
+       fi
+       echo $fsb $((n-1))
+       return 0
+}
+
+start_iptables(){
+       d "Creating iptables mangle rules"
+
+       config_get mark_mask globals mark_mask 0xFF
+       mark_mask=$(printf '0x%X\n' $(($mark_mask)))
+
+       local fsb_lst class_id_max class_id_shift
+       fsb_lst=$(mask_range $mark_mask)
+       class_id_max=$(((1<<(${fsb_lst#* } - ${fsb_lst% *} +1))+1))
+       class_id_shift=$((${fsb_lst% *}))
+
+       d "General iptables rules:"
+       for IPT in "$IP4T" "$IP6T"; do
+               $IPT -t mangle -N $IPT_CHAIN
+               $IPT -t mangle -N $IPT_CHAIN-classify
+
+               $IPT -t mangle -A FORWARD       -j $IPT_CHAIN
+               $IPT -t mangle -A $IPT_CHAIN    -j CONNMARK --restore-mark --nfmask $mark_mask --ctmask $mark_mask \
+                       -m comment --comment "Get previous class"
+               $IPT -t mangle -A $IPT_CHAIN -m mark --mark 0x0/$mark_mask -j $IPT_CHAIN-classify \
+                       -m comment --comment "If no class, try to classify"
+       done
+
+       d "Classes iptables rules:"
+       local class_reserved_uplink class_reserved_downlink class_nets i=2 xi default_class_id
+       for class in $(config_foreach echo class); do
+               config_get class_reserved_uplink   $class reserved_uplink
+               config_get class_reserved_downlink $class reserved_downlink
+               config_get class_nets     $class network
+               if [ "$class" = default ]; then
+                       default_class_id=$i
+                       if [ -z "$class_reserved_uplink" -a -z "$class_reserved_downlink" ] ; then
+                               die 2 "class default must defined either reserved uplink or downlink!"
+                       fi
+                       if [ "$class_nets" ]; then
+                               die 2 "class default must not have any network defined!"
+                       fi
+               else
+                       if [ "$i" -ge "$class_id_max" ]; then
+                               die 1 "Max client classes reached. Please, use less classes or increase option mark_mask '$mark_mask' in globals. Current mask allows only $((class_id_max-2)) classes if default is the last one."
+                       fi
+               fi
+
+               xi=$(printf '0x%X\n' $(((i-1)<<class_id_shift)))
+
+               for class_net in $class_nets; do
+                       case $class_net in
+                               *:*) IPT="$IP6T" ;;
+                               *.*) IPT="$IP4T" ;;
+                               *) die 2 "Unknown address family of network $class_net in class $class!"
+                       esac
+                       if [ "$class_reserved_uplink" ]; then
+                               $IPT -t mangle -A $IPT_CHAIN-classify -s $class_net -m mark --mark 0x0/$mark_mask -j MARK --set-mark ${xi}/$mark_mask \
+                                       -m comment --comment "$APPNAME-$class up"
+                       fi
+                       if [ "$class_reserved_downlink" ]; then
+                               $IPT -t mangle -A $IPT_CHAIN-classify -d $class_net -m mark --mark 0x0/$mark_mask -j MARK --set-mark ${xi}/$mark_mask \
+                                       -m comment --comment "$APPNAME-$class down"
+                       fi
+               done
+               : $((i++))
+       done
+       if [ -z "$default_class_id" ]; then
+               die 2 "No default class defined!"
+       fi
+
+       $IP4T -t mangle -A $IPT_CHAIN-classify -j CONNMARK --save-mark --nfmask $mark_mask --ctmask $mark_mask
+       $IP6T -t mangle -A $IPT_CHAIN-classify -j CONNMARK --save-mark --nfmask $mark_mask --ctmask $mark_mask
+}
+
+
+
+start_tc_interface() {
+       local int=$1; shift
+       local dev=$1; shift
+       local default_class_id=$1; shift
+
+       config_get mark_mask globals mark_mask 0xFF
+       local fsb_lst class_id_max class_id_shift
+       fsb_lst=$(mask_range $mark_mask)
+       class_id_max=$(((1<<(${fsb_lst#* } - ${fsb_lst% *} +1))))
+       class_id_shift=$((${fsb_lst% *}))
+
+       local downlink uplink type
+       config_get downlink $int downlink
+       config_get uplink   $int uplink
+
+       d "Creating tc rules for $int ($dev)"
+       local dev_down dev_up
+       if [ "$downlink" ]; then
+               local ifb="ifb_$dev"
+               if [ ${#ifb} -gt 15 ]; then
+                       die 1 "ifb name too long: ${ifb}"
+               fi
+
+               d "Creating ${ifb}..."
+               $IP link add name ${ifb} type ifb
+               $IP link set dev $ifb up
+               d "Redirect ingress $dev to $ifb..."
+               $TC qdisc  add dev $dev handle ffff: ingress
+               $TC filter add dev $dev parent ffff: protocol all u32 match u32 0 0 action connmark action mirred egress redirect dev $ifb
+               dev_down=$ifb
+       else
+               dev_down=
+       fi
+       if [ "$uplink" ]; then
+               dev_up="$dev"
+       fi
+
+       # Download/Upload
+       if [ "$dev_down" ]; then
+               tc qdisc add dev $dev_down root handle 1: htb default "$default_class_id"
+               tc class add dev $dev_down parent 1: classid 1:1 htb rate $(calc_bw ${downlink})kbit burst 500k quantum 1500
+       fi
+
+       if [ "$dev_up" ]; then
+               tc qdisc add dev $dev_up   root handle 1: htb default "$default_class_id"
+               tc class add dev $dev_up   parent 1: classid 1:1 htb rate $(calc_bw ${uplink})kbit   burst 500k quantum 1500
+       fi
+
+       v "$int($dev):" \
+               "${downlink:+downlink of ${downlink}kbit}"\
+               "${uplink:+uplink of ${uplink}kbit}"\
+
+       local class class_reserved_downlink class_reserved_uplink class_allowed_downlink class_allowed_uplink class_nets class_net i=2
+       for class in $(config_foreach echo class); do
+               config_get class_reserved_downlink $class reserved_downlink
+               if [ "$class_reserved_downlink" ]; then
+                       if [ "$dev_down" ]; then
+                               class_reserved_downlink=$(calc_bw $class_reserved_downlink $downlink)
+                               config_get class_allowed_downlink $class allowed_downlink "$class_reserved_downlink"
+                               class_allowed_downlink=$(calc_bw $class_allowed_downlink $downlink)
+                       else
+                               e "class $class defines reserved downlink but not wan $int. Downlink shapping will be ignored"
+                               class_reserved_downlink=
+                       fi
+               elif [ "$dev_down" ]; then
+                       e "class $class does not define reserved downlink but wan $int does. Downlink shapping will use default class"
+               fi
+
+               if [ "$class_allowed_downlink" -lt "$class_reserved_downlink" ]; then
+                       die 1 "Allowed downlink bandwitdh in class $class must not be smaller than reserved downlink."
+               fi
+
+               config_get class_reserved_uplink $class reserved_uplink
+               if [ "$class_reserved_uplink" ]; then
+                       if [ "$dev_up" ]; then
+                               class_reserved_uplink=$(calc_bw $class_reserved_uplink $uplink)
+                               config_get class_allowed_uplink $class allowed_uplink "$class_reserved_uplink"
+                               class_allowed_uplink=$(calc_bw $class_allowed_uplink $uplink)
+                       else
+                               e "class $class defines reserved uplink but not wan $int. Downlink shapping will be ignored"
+                               class_reserved_uplink=
+                       fi
+               elif [ "$dev_up" ]; then
+                       e "class $class does not define reserved uplink but wan $int does. Downlink shapping will use default class"
+               fi
+
+               if [ -n "$class_allowed_uplink" -a -n "$class_reserved_uplink" ] && [ "$class_allowed_uplink" -lt "$class_reserved_uplink" ]; then
+                       die 1 "Allowed uplink bandwitdh in class $class must not be smaller than reserved uplink."
+               fi
+
+               v "$int($dev): $class(class 1:$i) will have" \
+                       "${class_reserved_downlink:+download of ${class_reserved_downlink}kbit (up to ${class_allowed_downlink}kbit)}"\
+                       "${class_reserved_uplink:+upload of ${class_reserved_uplink}kbit up (up to ${class_allowed_uplink}kbit)}"
+
+               xi=$(printf '0x%X\n' $(((i-1)<<class_id_shift)))
+               if [ "$class_reserved_uplink" ]; then
+                       $TC class  add dev $dev_up   parent 1:1  classid  1:$i htb rate ${class_reserved_uplink}kbit ceil ${class_allowed_uplink}kbit   quantum 1500 burst 50k
+                       $TC qdisc  add dev $dev_up   parent 1:$i handle   $i:  $QDISC
+                       if [ "$class" != default ]; then
+                               $TC filter add dev $dev_up   parent 1:   protocol ip prio $i handle ${xi}/$mark_mask fw flowid 1:$i
+                       fi
+               fi
+               if [ "$class_reserved_downlink" ]; then
+                       $TC class  add dev $dev_down parent 1:1  classid  1:$i htb rate ${class_reserved_downlink}kbit ceil ${class_allowed_downlink}kbit quantum 1500 burst 50k
+                       $TC qdisc  add dev $dev_down parent 1:$i handle   $i:  $QDISC
+                       if [ "$class" != default ]; then
+                               $TC filter add dev $dev_down parent 1:   protocol ip   prio $i handle ${xi}/$mark_mask fw flowid 1:$i
+                       fi
+               fi
+               : $((i++))
+       done
+}
+
+start_tc() {
+       d "Creating tc rules"
+       local dev_done int dev interfaces
+       local default_class_id=$1; shift
+       local only_int=$1
+
+       if [ "$only_int" ]; then
+               config_get type $only_int TYPE
+               if [ "$type" != "wan" ]; then
+                       d "interface $only_int not found in trafficshaper config. Ignoring"
+                       return 0
+               fi
+               interfaces="$only_int"
+
+       else
+               interfaces="$(config_foreach echo wan)"
+       fi
+
+       for int in $interfaces; do
+               network_get_physdev dev "$int" ||
+                       die 1 "failed to get physical dev of interface $int"
+
+               if echo "$dev_done" | grep -x -F -q "$dev"; then
+                       e "$int uses $dev which was already configured. Only list each WAN once. Skipping..."
+                       continue
+               fi
+
+               start_tc_interface $int $dev $ifb "$default_class_id"
+               intdev_done="$(echo "$dev_done"; echo -n $dev)"
+       done
+}
+
+do_start() {
+       local only_int=$1 type
+
+       preinit
+       (LOGLEVEL=0 do_stop "$only_int")
+       requires
+
+       trap "set +e; do_stop $only_int" EXIT
+
+       v "Starting $APPNAME${only_int:+ for interface $only_int}"
+
+       local default_class_id
+       if ! default_class_id=$(i=2 config_foreach 'eval echo $((i++))' class '| grep " default"'); then
+               die 2 "No default class defined!"
+       fi
+       default_class_id=${default_class_id% *}
+
+       [ "$only_int" ] || start_iptables
+       start_tc "$default_class_id" "$only_int"
+
+       trap - EXIT
+}
+
+start_service() {
+       ( do_start )
+}
+
+stop_service() {
+       ( do_stop )
+}
+
+restart_service() {
+       ( do_start )
+}
+
+is_running() {
+       $IP4T -t mangle -L $IPT_CHAIN &>/dev/null
+}
+
+reload_service() {
+       preinit
+       if ! is_running; then
+               d "Not running. Nothing to reload"
+               return 0
+       fi
+       logger -t "$APPNAME" "Reloading $*..."
+       ( do_start "$@" )
+}
+
+add_interface_trigger() {
+        procd_add_interface_trigger "interface.update" "$1" /etc/init.d/$APPNAME reload $1
+}
+
+service_triggers() {
+       preinit; set +e
+       requires
+
+       procd_add_reload_trigger "$APPNAME"
+       config_foreach add_interface_trigger wan
+
+       procd_open_validate
+       validate_trafficshaper_global
+       validate_trafficshaper_wan
+       validate_trafficshaper_class
+       procd_close_validate
+}
+
+validate_trafficshaper_global() {
+        uci_validate_section $APPNAME global "${1}" \
+                'mark_mask:uinteger:0xFF'
+}
+
+validate_trafficshaper_wan() {
+       uci_validate_section "$APPNAME" wan "${1}" \
+                'downlink:uinteger' \
+                'uplink:uinteger'
+}
+
+validate_trafficshaper_class() {
+        uci_validate_section "$APPNAME" class "${1}" \
+               'network:cidr' \
+               'reserved_downlink:or(uinteger, string)' \
+               'reserved_uplink:or(uinteger, string)' \
+               'allowed_downlink:or(uinteger, string)' \
+               'allowed_uplink:or(uinteger, string)'
+}
+
+boot() {
+       LOGLEVEL=1 start
+}
index 6dfd4b32e0b16f85f58614af2727ac27646f7ab0..87a6ed406ff1a32f6fe1fb8cbe58b1b3c7993ebf 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=transmission
 PKG_VERSION:=2.94
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GITHUB/transmission/transmission-releases/master
@@ -119,19 +119,18 @@ define Package/transmission-daemon-openssl/conffiles
 endef
 Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles)
 
+TARGET_CFLAGS += -flto
+TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
 
 CONFIGURE_ARGS += \
-       --enable-daemon \
        --enable-cli \
-       --without-gtk \
+       --enable-daemon \
        --enable-external-natpmp \
        --enable-largefile \
-       --enable-lightweight
-
-ifeq ($(BUILD_VARIANT),openssl)
-  CONFIGURE_ARGS += \
-       --with-crypto=openssl
-endif
+       --enable-lightweight \
+       --without-gtk \
+       --without-kqueue \
+       --without-systemd-daemon
 
 ifeq ($(BUILD_VARIANT),mbedtls)
   CONFIGURE_ARGS += \
@@ -139,6 +138,9 @@ ifeq ($(BUILD_VARIANT),mbedtls)
   CONFIGURE_VARS += \
        MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \
        MBEDTLS_LIBS="-lmbedtls -lmbedcrypto"
+else
+  CONFIGURE_ARGS += \
+       --with-crypto=openssl
 endif
 
 define Package/transmission-daemon-openssl/install
index fd4e959394a490e0479601dd71e56e7a37acfb66..0937f656f14630ea4c0fd090fd8eefa782a14352 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=travelmate
-PKG_VERSION:=1.3.4
+PKG_VERSION:=1.4.4
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index 2c657b48a2e43710a449bb6d88e15fde624ad322..e261e76614d7fe0fe05252654150035e7ff09881 100644 (file)
@@ -3,7 +3,7 @@
 ## Description
 If you’re planning an upcoming vacation or a business trip, taking your laptop, tablet or smartphone give you the ability to connect with friends or complete work on the go. But many hotels don’t have a secure wireless network setup or you’re limited on using a single device at once. Investing in a portable, mini travel router is a great way to connect all of your devices at once while having total control over your own personalized wireless network.  
 A logical combination of AP+STA mode on one physical radio allows most of OpenWrt supported router devices to connect to a wireless hotspot/station (STA) and provide a wireless access point (AP) from that hotspot at the same time. Downside of this solution: whenever the STA interface looses the connection it will go into an active scan cycle which renders the radio unusable for AP mode operation, therefore the AP is taken down if the STA looses its association.  
-To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots.  
+To avoid these kind of deadlocks, travelmate will set all station interfaces to an "always off" mode and connects automatically to available/configured hotspots.  
 
 ## Main Features
 * STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible
@@ -24,6 +24,7 @@ To avoid these kind of deadlocks, travelmate set all station interfaces in an "a
 * [OpenWrt](https://openwrt.org), tested with the stable release series (18.06.x) and with the latest OpenWrt snapshot
 * iwinfo for wlan scanning, uclient-fetch for captive portal detection
 * optional: qrencode 4.x for QR code support
+* optional: wpad (the full version, not wpad-mini) to use Enterprise WiFi
 
 ## Installation & Usage
 * download the package [here](https://downloads.openwrt.org/snapshots/packages/x86_64/packages)
@@ -124,14 +125,6 @@ edit /etc/config/travelmate and set 'trm_enabled' to '1'
 /etc/init.d/travelmate restart
 </code></pre>
 
-## FAQ
-**Q:** What happen with misconfigured, faulty uplinks, e.g. due to outdated wlan passwords?  
-**A:** Travelmate tries n times (default 3) to connect, then the respective uplink will be marked as "faulty" in the JSON runtime file and hereafter ignored. To reset the JSON runtime file, simply restart travelmate.  
-**Q:** How to connect to hidden uplinks?  
-**A:** See 'example\_hidden' STA configuration above, option 'SSID' and 'BSSID' must be specified for successful connections.  
-**Q:** Any recommendations regarding suitable DNS settings to easily connect to captive portals?  
-**A:** Use a simple DNS forwarder like dnsmasq and disable the option 'rebind_protection'.  
-
 ## Support
 Please join the travelmate discussion in this [forum thread](https://forum.lede-project.org/t/travelmate-support-thread/5155) or contact me by [mail](mailto:dev@brenken.org)  
 
index 18d3d0089c54a066e10bf250d84f458211547b73..e7d40c80138b7bafaa964ca7e585f5312773c030 100755 (executable)
@@ -31,8 +31,20 @@ start_service()
 
 reload_service()
 {
-       [ -s "${trm_pidfile}" ] && return 1
-       rc_procd start_service
+       local ppid pid timeout="$(uci_get travelmate global trm_timeout)"
+
+       if [ -s "${trm_pidfile}" ]
+       then
+               ppid="$(cat "${trm_pidfile}" 2>/dev/null)"
+               if [ -n "${ppid}" ]
+               then
+                       pid="$(pgrep -xnf "sleep ${timeout:-60} 0" -P ${ppid} 2>/dev/null)"
+                       if [ -n "${pid}" ]
+                       then
+                               kill -INT ${pid} 2>/dev/null
+                       fi
+               fi
+       fi
 }
 
 stop_service()
@@ -67,6 +79,7 @@ service_triggers()
        local delay="$(uci_get travelmate global trm_triggerdelay)"
 
        PROCD_RELOAD_DELAY=$((${delay:-2} * 1000))
-       procd_add_interface_trigger "interface.*.down" "${trigger}" "${trm_init}" reload
-       procd_add_reload_trigger "travelmate"
+       procd_add_interface_trigger "interface.*.down" "${trigger:-"trm_wwan"}" "${trm_init}" reload
+       procd_add_config_trigger "config.change" "wireless" "${trm_init}" reload
+       procd_add_config_trigger "config.change" "travelmate" "${trm_init}" restart
 }
index fbc1422322a870657c625a823f211c99bca44bb5..f541963166ac7f7a3b1e8fce27c630d3543de286 100755 (executable)
 #
 LC_ALL=C
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-trm_ver="1.3.4"
+trm_ver="1.4.4"
 trm_sysver="unknown"
 trm_enabled=0
 trm_debug=0
+trm_iface="trm_wwan"
 trm_captive=1
 trm_proactive=1
 trm_captiveurl="http://captive.apple.com"
@@ -34,7 +35,7 @@ trm_pidfile="/var/run/travelmate.pid"
 #
 f_trim()
 {
-       local trim="$1"
+       local IFS trim="${1}"
 
        trim="${trim#"${trim%%[![:space:]]*}"}"
        trim="${trim%"${trim##*[![:space:]]}"}"
@@ -45,7 +46,11 @@ f_trim()
 #
 f_envload()
 {
-       local sys_call sys_desc sys_model sys_ver
+       local IFS sys_call sys_desc sys_model
+
+       # (re-)initialize global list variables
+       #
+       unset trm_devlist trm_stalist trm_radiolist trm_active_sta
 
        # get system information
        #
@@ -57,17 +62,29 @@ f_envload()
                trm_sysver="${sys_model}, ${sys_desc}"
        fi
 
-       # (re-)initialize global list variables
+       # get eap capabilities and rebind protection setting
        #
-       unset trm_devlist trm_stalist trm_radiolist trm_active_sta
+       trm_eap="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
+       trm_rebind="$(uci_get dhcp "@dnsmasq[0]" rebind_protection)"
 
        # load config and check 'enabled' option
        #
-       option_cb()
+       config_cb()
        {
-               local option="${1}"
-               local value="${2}"
-               eval "${option}=\"${value}\""
+               local name="${1}" type="${2}"
+               if [ "${name}" = "travelmate" ] && [ "${type}" = "global" ]
+               then
+                       option_cb()
+                       {
+                               local option="${1}" value="${2}"
+                               eval "${option}=\"${value}\""
+                       }
+               else
+                       option_cb()
+                       {
+                               return 0
+                       }
+               fi
        }
        config_load travelmate
 
@@ -95,63 +112,68 @@ f_envload()
        then
                trm_timeout=60
        fi
+
+       # load json runtime file
+       #
+       json_load_file "${trm_rtfile}" >/dev/null 2>&1
+       json_select data >/dev/null 2>&1
+       if [ ${?} -ne 0 ]
+       then
+               > "${trm_rtfile}"
+               json_init
+               json_add_object "data"
+       fi
 }
 
 # gather radio information & bring down all STA interfaces
 #
 f_prep()
 {
-       local eap_rc=0 config="${1}" proactive="${2}"
+       local IFS config="${1}" proactive="${2}"
        local mode="$(uci_get wireless "${config}" mode)"
        local network="$(uci_get wireless "${config}" network)"
        local radio="$(uci_get wireless "${config}" device)"
        local disabled="$(uci_get wireless "${config}" disabled)"
        local eaptype="$(uci_get wireless "${config}" eap_type)"
 
-       if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
-       then
-               trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
-       elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
+       if [ -n "${config}" ] && [ -n "${radio}" ] && [ -n "${mode}" ] && [ -n "${network}" ]
        then
-               trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" | \
-                       awk '{while(match(tolower($0),/radio[0-9]/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')")"
-       fi
-       if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
-       then
-               if ([ -z "${disabled}" ] || [ "${disabled}" = "0" ]) && ([ ${proactive} -eq 0 ] || [ "${trm_ifstatus}" != "true" ])
+               if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
                then
-                       uci_set wireless "${config}" disabled 1
-               elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ -z "${trm_active_sta}" ] && [ ${proactive} -eq 1 ]
-               then
-                       trm_active_sta="${config}"
-               fi
-               if [ -n "${eaptype}" ]
+                       trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
+               elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
                then
-                       eap_rc="$("${trm_wpa}" -veap >/dev/null 2>&1; printf "%u" ${?})"
+                       trm_radiolist="$(f_trim "$(printf "%s" "${trm_radio}" | \
+                               awk '{while(match(tolower($0),/radio[0-9]/)){ORS=" ";print substr(tolower($0),RSTART,RLENGTH);$0=substr($0,RSTART+RLENGTH)}}')")"
                fi
-               if [ -z "${eaptype}" ] || [ ${eap_rc} -eq 0 ]
+               if [ "${mode}" = "sta" ] && [ "${network}" = "${trm_iface}" ]
                then
-                       trm_stalist="$(f_trim "${trm_stalist} ${config}-${radio}")"
+                       if ([ -z "${disabled}" ] || [ "${disabled}" = "0" ]) && ([ ${proactive} -eq 0 ] || [ "${trm_ifstatus}" != "true" ])
+                       then
+                               uci_set wireless "${config}" disabled 1
+                       elif [ "${disabled}" = "0" ] && [ "${trm_ifstatus}" = "true" ] && [ -z "${trm_active_sta}" ] && [ ${proactive} -eq 1 ]
+                       then
+                               trm_active_sta="${config}"
+                       fi
+                       if [ -z "${eaptype}" ] || ([ -n "${eaptype}" ] && [ ${trm_eap:-1} -eq 0 ])
+                       then
+                               trm_stalist="$(f_trim "${trm_stalist} ${config}-${radio}")"
+                       fi
                fi
        fi
-       f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, eap_rc: ${eap_rc}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, disabled: ${disabled}"
+       f_log "debug" "f_prep ::: config: ${config}, mode: ${mode}, network: ${network}, radio: ${radio}, trm_radio: ${trm_radio:-"-"}, trm_active_sta: ${trm_active_sta:-"-"}, proactive: ${proactive}, trm_eap: ${trm_eap:-"-"}, trm_rebind: ${trm_rebind:-"-"}, disabled: ${disabled}"
 }
 
 # check interface status
 #
 f_check()
 {
-       local IFS ifname radio dev_status config sta_essid sta_bssid result wait=1 mode="${1}" status="${2:-"false"}"
+       local IFS ifname radio dev_status last_status config sta_essid sta_bssid result cp_domain wait=1 mode="${1}" status="${2:-"false"}"
 
        trm_ifquality=0
-       if [ "${mode}" = "initial" ]
+       if [ "${mode}" != "initial" ] && [ "${status}" = "false" ]
        then
-               trm_ifstatus="false"
-       else
-               if [ "${status}" = "false" ]
-               then
-                       ubus call network reload
-               fi
+               ubus call network reload
        fi
        while [ ${wait} -le ${trm_maxwait} ]
        do
@@ -193,29 +215,49 @@ f_check()
                                        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} ]
+                                       elif [ "${mode}" = "initial" ] && [ ${trm_ifquality} -lt ${trm_minquality} ] && [ "${trm_ifstatus}" != "${status}" ]
                                        then
                                                trm_ifstatus="${status}"
                                                sta_essid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.ssid')"
                                                sta_bssid="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].*.bssid')"
                                                f_log "info" "uplink '${sta_essid:-"-"}/${sta_bssid:-"-"}' is out of range (${trm_ifquality}/${trm_minquality}), uplink disconnected (${trm_sysver})"
                                        fi
+                               else
+                                       if [ "${trm_ifstatus}" != "${status}" ]
+                                       then
+                                               trm_ifstatus="${status}"
+                                       fi
                                fi
                        fi
                        if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ]
                        then
-                               if ([ "${trm_ifstatus}" != "true" ] && [ "${trm_ifstatus}" != "${status}" ]) || \
+                               json_get_var last_status "travelmate_status"
+                               if ([ "${trm_ifstatus}" = "false" ] && [ "${trm_ifstatus}" != "${status}" ]) || \
                                        ([ "${trm_ifstatus}" = "true" ] && [ "${mode}" = "sta" ] && [ -n "${trm_active_sta}" ]) || \
-                                       [ ${trm_ifquality} -lt ${trm_minquality} ]
+                                       [ -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 '/^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%/*}" ])
+                                               awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')"
+                                       cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')"
+                                       if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ] || [ -n "${cp_domain}" ])
                                        then
+                                               if [ "${trm_rebind:-0}" -eq 1 ] && [ -x "/etc/init.d/dnsmasq" ]
+                                               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
                                                trm_connection="${result}/${trm_ifquality}"
                                                f_jsnup
                                        fi
@@ -233,7 +275,7 @@ f_check()
 #
 f_jsnup()
 {
-       local config sta_iface sta_radio sta_essid sta_bssid dev_status status="${trm_ifstatus}" faulty_list faulty_station="${1}"
+       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
@@ -279,8 +321,7 @@ f_jsnup()
 #
 f_log()
 {
-       local class="${1}"
-       local log_msg="${2}"
+       local IFS class="${1}" log_msg="${2}"
 
        if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ])
        then
@@ -300,7 +341,7 @@ f_log()
 f_main()
 {
        local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
-       local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
+       local station_id sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
 
        f_check "initial"
        f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
@@ -308,7 +349,7 @@ f_main()
        then
                config_load wireless
                config_foreach f_prep wifi-iface ${trm_proactive}
-               if [ "${trm_ifstatus}" = "true" ] && [ ${trm_proactive} -eq 1 ]
+               if [ "${trm_ifstatus}" = "true" ] && [ -n "${trm_active_sta}" ] && [ ${trm_proactive} -eq 1 ]
                then
                        json_get_var station_id "station_id"
                        active_radio="${station_id%%/*}"
@@ -316,118 +357,125 @@ f_main()
                        active_essid="${active_essid#*/}"
                        active_bssid="${station_id##*/}"
                        f_check "dev" "true"
+                       f_log "debug" "f_main ::: active_radio: ${active_radio}, active_essid: \"${active_essid}\", active_bssid: ${active_bssid:-"-"}"
                else
                        uci_commit wireless
                        f_check "dev"
                fi
                json_get_var faulty_list "faulty_stations"
                f_log "debug" "f_main ::: iwinfo: ${trm_iwinfo:-"-"}, dev_list: ${trm_devlist:-"-"}, sta_list: ${trm_stalist:0:800}, faulty_list: ${faulty_list:-"-"}"
+               # radio loop
+               #
                for dev in ${trm_devlist}
                do
-                       f_log "debug" "f_main ::: device: ${dev}"
                        if [ -z "$(printf "%s" "${trm_stalist}" | grep -o "\-${dev}")" ]
                        then
                                f_log "debug" "f_main ::: no station on '${dev}' - continue"
                                continue
                        fi
-                       cnt=1
-                       while [ ${cnt} -le ${trm_maxretry} ]
+                       # station loop
+                       #
+                       for sta in ${trm_stalist}
                        do
-                               f_log "debug" "f_main ::: cnt: ${cnt}, max_cnt: ${trm_maxretry}"
-                               for sta in ${trm_stalist}
-                               do
-                                       config="${sta%%-*}"
-                                       sta_radio="${sta##*-}"
-                                       sta_essid="$(uci_get wireless "${config}" ssid)"
-                                       sta_bssid="$(uci_get wireless "${config}" bssid)"
-                                       sta_iface="$(uci_get wireless "${config}" network)"
-                                       json_get_var faulty_list "faulty_stations"
-                                       if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+                               config="${sta%%-*}"
+                               sta_radio="${sta##*-}"
+                               sta_essid="$(uci_get wireless "${config}" ssid)"
+                               sta_bssid="$(uci_get wireless "${config}" bssid)"
+                               sta_iface="$(uci_get wireless "${config}" network)"
+                               json_get_var faulty_list "faulty_stations"
+                               if [ -n "$(printf "%s" "${faulty_list}" | grep -Fo "${sta_radio}/${sta_essid}/${sta_bssid}")" ]
+                               then
+                                       f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
+                                       continue
+                               fi
+                               if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
+                               then
+                                       f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
+                                       break 2
+                               fi
+                               f_log "debug" "f_main ::: sta_radio: ${sta_radio}, sta_essid: \"${sta_essid}\", sta_bssid: ${sta_bssid:-"-"}"
+                               if [ -z "${scan_list}" ]
+                               then
+                                       scan_list="$(f_trim "$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
+                                               awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++)if(var2==""){var2=$i}else{var2=var2" "$i};gsub(/,/,".",var2)}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
+                                               sort -rn | awk 'BEGIN{ORS=","}{print $0}' | awk '{print substr($0,1,4096)}')")"
+                                       f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
+                                       if [ -z "${scan_list}" ]
                                        then
-                                               f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
-                                               continue
+                                               f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
+                                               continue 2
                                        fi
-                                       if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
+                               fi
+                               # scan loop
+                               #
+                               IFS=","
+                               for scan in ${scan_list}
+                               do
+                                       if [ -z "${scan_quality}" ]
                                        then
-                                               f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
-                                               break 3
-                                       fi
-                                       if [ -z "${scan_list}" ]
+                                               scan_quality="${scan}"
+                                       elif [ -z "${scan_bssid}" ]
                                        then
-                                               scan_list="$(f_trim "$("${trm_iwinfo}" "${dev}" scan 2>/dev/null | \
-                                                       awk 'BEGIN{FS="[/ ]"}/Address:/{var1=$NF}/ESSID:/{var2="";for(i=12;i<=NF;i++) \
-                                                       if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
-                                                       sort -rn | awk '{ORS=",";print $0}')")"
-                                               f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
-                                               if [ -z "${scan_list}" ]
-                                               then
-                                                       f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
-                                                       continue 3
-                                               fi
+                                               scan_bssid="${scan}"
+                                       elif [ -z "${scan_essid}" ]
+                                       then
+                                               scan_essid="${scan}"
                                        fi
-                                       IFS=","
-                                       for scan in ${scan_list}
-                                       do
-                                               if [ -z "${scan_quality}" ]
-                                               then
-                                                       scan_quality="${scan}"
-                                               elif [ -z "${scan_bssid}" ]
-                                               then
-                                                       scan_bssid="${scan}"
-                                               elif [ -z "${scan_essid}" ]
-                                               then
-                                                       scan_essid="${scan}"
-                                               fi
-                                               if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+                                       if [ -n "${scan_quality}" ] && [ -n "${scan_bssid}" ] && [ -n "${scan_essid}" ]
+                                       then
+                                               if [ ${scan_quality} -ge ${trm_minquality} ]
                                                then
-                                                       if [ ${scan_quality} -ge ${trm_minquality} ]
+                                                       if (([ "${scan_essid}" = "\"${sta_essid//,/.}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
+                                                               ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
                                                        then
-                                                               if (([ "${scan_essid}" = "\"${sta_essid}\"" ] && ([ -z "${sta_bssid}" ] || [ "${scan_bssid}" = "${sta_bssid}" ])) || \
-                                                                       ([ "${scan_bssid}" = "${sta_bssid}" ] && [ "${scan_essid}" = "unknown" ])) && [ "${dev}" = "${sta_radio}" ]
+                                                               f_log "debug" "f_main ::: scan_quality: ${scan_quality}, scan_essid: ${scan_essid}, scan_bssid: ${scan_bssid:-"-"}"
+                                                               if [ "${dev}" = "${active_radio}" ]
                                                                then
-                                                                       f_log "debug" "f_main ::: scan_quality: ${scan_quality}, sta_bssid: ${sta_bssid}, scan_bssid: ${scan_bssid}, sta_essid: \"${sta_essid}\", scan_essid: ${scan_essid}"
-                                                                       if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
-                                                                       then
-                                                                               uci_set wireless "${trm_active_sta}" disabled 1
-                                                                               unset trm_connection
-                                                                       fi
+                                                                       unset trm_connection active_radio active_essid active_bssid
+                                                                       uci_set wireless "${trm_active_sta}" disabled 1
+                                                                       uci_commit wireless
+                                                               fi
+                                                               # retry loop
+                                                               #
+                                                               cnt=1
+                                                               while [ ${cnt} -le ${trm_maxretry} ]
+                                                               do
                                                                        uci_set wireless "${config}" disabled 0
                                                                        f_check "sta"
                                                                        if [ "${trm_ifstatus}" = "true" ]
                                                                        then
+                                                                               unset IFS scan_list
                                                                                uci_commit wireless
-                                                                               f_check "initial"
-                                                                               f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
+                                                                               f_log "info" "connected to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
                                                                                return 0
-                                                                       elif [ ${cnt} -eq ${trm_maxretry} ]
-                                                                       then
+                                                                       else
                                                                                uci -q revert wireless
                                                                                f_check "rev"
-                                                                               if [ "${dev}" = "${active_radio}" ] && [ -n "${trm_active_sta}" ]
+                                                                               if [ ${cnt} -eq ${trm_maxretry} ]
                                                                                then
-                                                                                       f_check "initial"
+                                                                                       faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
+                                                                                       f_jsnup "${faulty_station}"
+                                                                                       f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
+                                                                                       break 2
+                                                                               else
+                                                                                       f_jsnup
+                                                                                       f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${cnt}/${trm_maxretry}, ${trm_sysver})"
                                                                                fi
-                                                                               faulty_station="${sta_radio}/${sta_essid}/${sta_bssid:-"-"}"
-                                                                               f_jsnup "${faulty_station}"
-                                                                               f_log "info" "uplink disabled '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
-                                                                               break
-                                                                       else
-                                                                               uci -q revert wireless
-                                                                               f_check "rev"
-                                                                               f_jsnup
-                                                                               f_log "info" "can't connect to uplink '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' (${trm_sysver})"
-                                                                               unset scan_list
-                                                                               break
                                                                        fi
-                                                               fi
+                                                                       cnt=$(( cnt + 1 ))
+                                                                       sleep $(( ${trm_maxwait} / 6 ))
+                                                               done
+                                                       else
+                                                               unset scan_quality scan_bssid scan_essid
+                                                               continue
                                                        fi
+                                               else
                                                        unset scan_quality scan_bssid scan_essid
+                                                       continue
                                                fi
-                                       done
-                                       unset IFS scan_quality scan_bssid scan_essid
+                                       fi
                                done
-                               cnt=$(( cnt + 1 ))
-                               sleep $(( ${trm_maxwait} / 6 ))
+                               unset IFS scan_quality scan_bssid scan_essid
                        done
                        unset scan_list
                done
@@ -444,24 +492,31 @@ else
        f_log "err" "system libraries not found"
 fi
 
-# initialize json runtime file
-#
-json_load_file "${trm_rtfile}" >/dev/null 2>&1
-json_select data >/dev/null 2>&1
-if [ ${?} -ne 0 ]
-then
-       > "${trm_rtfile}"
-       json_init
-       json_add_object "data"
-fi
-
 # control travelmate actions
 #
+f_envload
 while true
 do
        if [ -z "${trm_action}" ]
        then
-               sleep ${trm_timeout}
+               rc=0
+               while true
+               do
+                       if [ ${rc} -eq 0 ]
+                       then
+                               f_check "initial"
+                       fi
+                       sleep ${trm_timeout} 0
+                       rc=${?}
+                       if [ ${rc} -ne 0 ]
+                       then
+                               f_check "initial"
+                       fi
+                       if [ ${rc} -eq 0 ] || ([ ${rc} -ne 0 ] && [ "${trm_ifstatus}" = "false" ])
+                       then
+                               break
+                       fi
+               done
        elif [ "${trm_action}" = "stop" ]
        then
                > "${trm_rtfile}"
@@ -471,6 +526,7 @@ do
                f_log "info" "travelmate instance started ::: action: ${trm_action}, pid: ${$}"
                unset trm_action
        fi
+       json_cleanup
        f_envload
        f_main
 done
index ad629cf1a8235ba9a2f05ea6f55463f588dd81a6..22c13051fb4c769bac3c523c8b741570bd742d68 100644 (file)
@@ -8,16 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=unbound
-PKG_VERSION:=1.8.3
+PKG_VERSION:=1.9.1
 PKG_RELEASE:=2
 
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://www.unbound.net/downloads
+PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5
+
+PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Eric Luehrsen <ericluehrsen@gmail.com>
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_HASH:=2b692b8311edfad41e7d0380aac34576060d4176add81dc5db419c79b2a4cecc
+PKG_CPE_ID:=cpe:/a:nlnetlabs:unbound
 
 PKG_BUILD_PARALLEL:=1
 PKG_FIXUP:=autoreconf
@@ -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" \
diff --git a/net/unbound/patches/101-dns64-crash.patch b/net/unbound/patches/101-dns64-crash.patch
deleted file mode 100644 (file)
index e27f072..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-From 023411f97505c8c7e375112ad853b6a40ef848a6 Mon Sep 17 00:00:00 2001
-From: Wouter Wijngaards <wouter@nlnetlabs.nl>
-Date: Wed, 12 Dec 2018 16:03:05 +0000
-Subject: [PATCH] - Fix for crash in dns64 module if response is null.
-
-git-svn-id: file:///svn/unbound/trunk@5025 be551aaa-1e26-0410-a405-d3ace91eadb9
----
- dns64/dns64.c | 1 +
- doc/Changelog | 3 +++
- 2 files changed, 4 insertions(+)
-
-diff --git a/dns64/dns64.c b/dns64/dns64.c
-index 77e68900..f2834da2 100644
---- a/dns64/dns64.c
-+++ b/dns64/dns64.c
-@@ -628,6 +628,7 @@ handle_event_moddone(struct module_qstate* qstate, int id)
-       /* Store the response in cache. */
-       if ( (!iq || !iq->started_no_cache_store) &&
-+              qstate->return_msg && qstate->return_msg->rep &&
-               !dns_cache_store(qstate->env, &qstate->qinfo, qstate->return_msg->rep,
-               0, 0, 0, NULL, qstate->query_flags))
-               log_err("out of memory");
diff --git a/net/unbound/patches/200-openssl-deprecated.patch b/net/unbound/patches/200-openssl-deprecated.patch
deleted file mode 100644 (file)
index 6eaa082..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-Index: daemon/daemon.c
-===================================================================
---- a/daemon/daemon.c
-+++ b/daemon/daemon.c
-@@ -769,7 +769,7 @@ daemon_delete(struct daemon* daemon)
- #  endif
- #  ifdef HAVE_OPENSSL_CONFIG
-       EVP_cleanup();
--#  if OPENSSL_VERSION_NUMBER < 0x10100000
-+#  if (OPENSSL_VERSION_NUMBER < 0x10100000) || !defined(OPENSSL_NO_ENGINE)
-       ENGINE_cleanup();
- #  endif
-       CONF_modules_free();
-Index: util/net_help.c
-===================================================================
---- a/util/net_help.c
-+++ b/util/net_help.c
-@@ -1006,10 +1006,10 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
- static lock_basic_type *ub_openssl_locks = NULL;
- /** callback that gets thread id for openssl */
--static unsigned long
--ub_crypto_id_cb(void)
-+static void
-+ub_crypto_id_cb(CRYPTO_THREADID *id)
- {
--      return (unsigned long)log_thread_get();
-+      CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
- }
- static void
-@@ -1035,7 +1035,7 @@ int ub_openssl_lock_init(void)
-       for(i=0; i<CRYPTO_num_locks(); i++) {
-               lock_basic_init(&ub_openssl_locks[i]);
-       }
--      CRYPTO_set_id_callback(&ub_crypto_id_cb);
-+      CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
-       CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
- #endif /* OPENSSL_THREADS */
-       return 1;
-@@ -1047,7 +1047,7 @@ void ub_openssl_lock_delete(void)
-       int i;
-       if(!ub_openssl_locks)
-               return;
--      CRYPTO_set_id_callback(NULL);
-+      CRYPTO_THREADID_set_callback(NULL);
-       CRYPTO_set_locking_callback(NULL);
-       for(i=0; i<CRYPTO_num_locks(); i++) {
-               lock_basic_destroy(&ub_openssl_locks[i]);
index bd3cbf3ddb1669fdce5a8174dba8c89e185cddba..f57476eea32f805a0cbeacdb7466469538239922 100644 (file)
@@ -1,12 +1,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uwsgi-cgi
-PKG_VERSION:=2.0.17.1
-PKG_RELEASE:=5
+PKG_VERSION:=2.0.18
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL=https://codeload.github.com/unbit/uwsgi/tar.gz/$(PKG_VERSION)?
+PKG_SOURCE_URL= \
+       https://projects.unbit.it/downloads \
+       https://codeload.github.com/unbit/uwsgi/tar.gz/$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=d2318235c74665a60021a4fc7770e9c2756f9fc07de7b8c22805efe85b5ab277
+PKG_HASH:=4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583
 PKG_BUILD_DIR:=$(BUILD_DIR)/uwsgi-$(PKG_VERSION)
 
 PKG_LICENSE:=GPL-2.0-or-later
@@ -21,7 +23,7 @@ define Package/uwsgi-cgi
   CATEGORY:=Network
   SUBMENU:=Web Servers/Proxies
   TITLE:=The uWSGI server
-  URL:=http://unbit.com/
+  URL:=https://projects.unbit.it/uwsgi
   DEPENDS:=+libcap +jansson +libuuid
 endef
 
@@ -30,7 +32,6 @@ define Package/uwsgi-cgi-luci-support
   CATEGORY:=Network
   SUBMENU:=Web Servers/Proxies
   TITLE:=Support files for LuCI on Nginx
-  URL:=http://unbit.com/
   DEPENDS:=+uwsgi-cgi
 endef
 
index c9e553182cd0dc21fbdcea498439590bb1b3d062..26949f658d62052bc1ebd99c4f71b05819d16518 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vallumd
-PKG_VERSION:=0.1.3
+PKG_VERSION:=0.1.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/stintel/vallumd/archive/$(PKG_VERSION)/
-PKG_HASH:=b40bede34ea321daf799276111e0e804007dc7c10eb031a0a654982957dcfb25
+PKG_HASH:=d6119f84840ff36f05c273f0a6f3e0f9eacf3a07c1583271c4fef62a7b199428
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
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 ea7eb595d5f42ac237321e3ee899f1d0e99aedf0..75900f33c437a4946a0bb6b446c4fcd62b0f458e 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=vpnc
 PKG_REV:=550
 PKG_VERSION:=0.5.3.r$(PKG_REV)
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://svn.unix-ag.uni-kl.de/vpnc/trunk/
index bc3f912b36c83ce5683f9f1daed1ddb4697fe24c..d7980ca5264cdae40a15badf489d21f430304115 100755 (executable)
@@ -42,7 +42,7 @@ proto_vpnc_setup() {
 
        logger -t vpnc "initializing..."
        serv_addr=
-       for ip in $(resolveip -t 10 "$server"); do
+       for ip in $(resolveip -4t 10 "$server"); do
                ( proto_add_host_dependency "$config" "$ip" $interface )
                serv_addr=1
        done
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
+
diff --git a/net/xtables-addons/patches/001-fix-kernel-version-detection.patch b/net/xtables-addons/patches/001-fix-kernel-version-detection.patch
new file mode 100644 (file)
index 0000000..775ccf6
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+ if test -n "$kbuilddir"; then
+       AC_MSG_CHECKING([kernel version that we will build against])
+-      krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
++      krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
+       save_IFS="$IFS"
+       IFS='.'
+       set x $krel
diff --git a/net/xtables-addons/patches/002-build-support-for-Linux-4.15.patch b/net/xtables-addons/patches/002-build-support-for-Linux-4.15.patch
new file mode 100644 (file)
index 0000000..99b0cfe
--- /dev/null
@@ -0,0 +1,50 @@
+From 2b76b68c65c97fc11409088c3c30993324df8500 Mon Sep 17 00:00:00 2001
+From: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+Date: Thu, 4 Jan 2018 18:50:50 +0100
+Subject: [PATCH] build: support for Linux 4.15
+
+Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+---
+ extensions/pknock/xt_pknock.c | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c
+index 6fbdea4..31d4bc8 100644
+--- a/extensions/pknock/xt_pknock.c
++++ b/extensions/pknock/xt_pknock.c
+@@ -358,10 +358,20 @@ has_logged_during_this_minute(const struct peer *peer)
+  * @r: rule
+  */
+ static void
+-peer_gc(unsigned long r)
++peer_gc(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++      struct timer_list *tl
++#else
++      unsigned long r
++#endif
++)
+ {
+       unsigned int i;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++      struct xt_pknock_rule *rule = from_timer(rule, tl, timer);
++#else
+       struct xt_pknock_rule *rule = (struct xt_pknock_rule *)r;
++#endif
+       struct peer *peer;
+       struct list_head *pos, *n;
+@@ -469,9 +479,13 @@ add_rule(struct xt_pknock_mtinfo *info)
+       if (rule->peer_head == NULL)
+               goto out;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++      timer_setup(&rule->timer, peer_gc, 0);
++#else
+       init_timer(&rule->timer);
+       rule->timer.function    = peer_gc;
+       rule->timer.data        = (unsigned long)rule;
++#endif
+       rule->status_proc = proc_create_data(info->rule_name, 0, pde,
+                           &pknock_proc_ops, rule);
diff --git a/net/xtables-addons/patches/002-fix-kernel-version-detection.patch b/net/xtables-addons/patches/002-fix-kernel-version-detection.patch
deleted file mode 100644 (file)
index 775ccf6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
- if test -n "$kbuilddir"; then
-       AC_MSG_CHECKING([kernel version that we will build against])
--      krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
-+      krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"
-       save_IFS="$IFS"
-       IFS='.'
-       set x $krel
diff --git a/net/xtables-addons/patches/003-build-add-support-for-Linux-4.18.patch b/net/xtables-addons/patches/003-build-add-support-for-Linux-4.18.patch
new file mode 100644 (file)
index 0000000..a6f31cf
--- /dev/null
@@ -0,0 +1,25 @@
+From 3ea761a1ed338241fbc79bef8e433307e108b6cd Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh@inai.de>
+Date: Tue, 14 Aug 2018 14:29:30 +0200
+Subject: [PATCH] build: add support for Linux 4.18
+
+---
+ extensions/xt_DNETMAP.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/extensions/xt_DNETMAP.c b/extensions/xt_DNETMAP.c
+index 1b415c3..de7d4ec 100644
+--- a/extensions/xt_DNETMAP.c
++++ b/extensions/xt_DNETMAP.c
+@@ -367,7 +367,11 @@ dnetmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
+       __be32 prenat_ip, postnat_ip, prenat_ip_prev;
+       const struct xt_DNETMAP_tginfo *tginfo = par->targinfo;
+       const struct nf_nat_range *mr = &tginfo->prefix;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
++      struct nf_nat_range2 newrange;
++#else
+       struct nf_nat_range newrange;
++#endif
+       struct dnetmap_entry *e;
+       struct dnetmap_prefix *p;
+       __s32 jttl;
diff --git a/net/yggdrasil/Makefile b/net/yggdrasil/Makefile
new file mode 100644 (file)
index 0000000..9c35ace
--- /dev/null
@@ -0,0 +1,72 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yggdrasil
+PKG_VERSION:=0.3.5
+PKG_RELEASE:=4
+
+PKG_SOURCE_URL:=https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=2c69029adeb053ad049e90f1e4b7efa986094779868da77464d3c869984e861b
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-go-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-3.0
+PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/yggdrasil-network/yggdrasil-go
+GO_PKG_BUILD_PKG:=github.com/yggdrasil-network/yggdrasil-go/cmd/...
+
+GO_PKG_LDFLAGS_X:= \
+  github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil.buildName=yggdrasil-openwrt \
+  github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil.buildVersion=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/yggdrasil
+       SECTION:=net
+       CATEGORY:=Network
+       SUBMENU:=Routing and Redirection
+       TITLE:=Yggdrasil supports end-to-end encrypted IPv6 networks
+       URL:=https://yggdrasil-network.github.io/
+       DEPENDS:=$(GO_ARCH_DEPENDS) @IPV6 +kmod-tun
+endef
+
+define Package/yggdrasil/description
+ Yggdrasil builds end-to-end encrypted networks with IPv6.
+ Beyond the similarities with cjdns is a different routing
+ algorithm. This globally-agreed spanning tree uses greedy
+ routing in a metric space. Back-pressure routing techniques
+ allow advanced link aggregation bonding on per-stream basis.
+ In turn, a single stream will span across multiple network
+ interfaces simultaneously with much greater throughput.
+endef
+
+define Package/yggdrasil/install
+       $(INSTALL_DIR) \
+               $(1)/etc/init.d \
+               $(1)/etc/uci-defaults \
+               $(1)/usr/sbin
+
+       $(INSTALL_BIN) \
+               $(GO_PKG_BUILD_BIN_DIR)/yggdrasil \
+               $(1)/usr/sbin
+
+       $(INSTALL_BIN) \
+               $(GO_PKG_BUILD_BIN_DIR)/yggdrasilctl \
+               $(1)/usr/sbin
+
+       $(INSTALL_BIN) \
+               ./files/yggdrasil.defaults \
+               $(1)/etc/uci-defaults/yggdrasil
+
+       $(INSTALL_BIN) \
+               ./files/yggdrasil.init \
+               $(1)/etc/init.d/yggdrasil
+endef
+
+$(eval $(call GoBinPackage,yggdrasil))
+$(eval $(call BuildPackage,yggdrasil))
diff --git a/net/yggdrasil/files/yggdrasil.defaults b/net/yggdrasil/files/yggdrasil.defaults
new file mode 100644 (file)
index 0000000..3687500
--- /dev/null
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+yggConfig="/etc/yggdrasil.conf"
+
+first_boot_genConfig()
+{
+  . /usr/share/libubox/jshn.sh
+  boardcfg=$(ubus call system board)
+  yggcfg=$(yggdrasil -genconf -json | grep NodeInfo -v)
+
+  json_load "$boardcfg"
+  json_get_var kernel     kernel
+  json_get_var hostname   hostname
+  json_get_var system     system
+  json_get_var model      model
+  json_get_var board_name board_name
+
+  json_load "$yggcfg"
+  json_add_string "IfName" "ygg0"
+  json_add_object "NodeInfo"
+  json_add_string "kernel"      "$kernel"
+  json_add_string "hostname"    "$hostname"
+  json_add_string "system"      "$system"
+  json_add_string "model"       "$model"
+  json_add_string "board_name"  "$board_name"
+  json_close_object
+  json_dump
+}
+
+if [ ! -e ${yggConfig} ]; then
+  echo "first_boot: adding system board details to NodeInfo[] in NEW config: ${yggConfig}" | logger -t yggdrasil
+
+  first_boot_genConfig > ${yggConfig}
+
+  # create the network interface
+  uci -q batch <<-EOF >/dev/null
+    set network.yggdrasil=interface
+    set network.yggdrasil.ifname=ygg0
+    set network.yggdrasil.proto=none
+EOF
+
+  # create the firewall zone
+  uci -q batch <<-EOF >/dev/null
+    add firewall zone
+    set firewall.@zone[-1].name=yggdrasil
+    add_list firewall.@zone[-1].network=yggdrasil
+    set firewall.@zone[-1].input=REJECT
+    set firewall.@zone[-1].output=ACCEPT
+    set firewall.@zone[-1].forward=REJECT
+    set firewall.@zone[-1].conntrack=1
+    set firewall.@zone[-1].family=ipv6
+EOF
+
+  # allow ICMP from yggdrasil zone, e.g. ping6
+  uci -q batch <<-EOF >/dev/null
+    add firewall rule
+    set firewall.@rule[-1].name='Allow-ICMPv6-yggdrasil'
+    set firewall.@rule[-1].src=yggdrasil
+    set firewall.@rule[-1].proto=icmp
+    add_list firewall.@rule[-1].icmp_type=echo-request
+    add_list firewall.@rule[-1].icmp_type=echo-reply
+    add_list firewall.@rule[-1].icmp_type=destination-unreachable
+    add_list firewall.@rule[-1].icmp_type=packet-too-big
+    add_list firewall.@rule[-1].icmp_type=time-exceeded
+    add_list firewall.@rule[-1].icmp_type=bad-header
+    add_list firewall.@rule[-1].icmp_type=unknown-header-type
+    set firewall.@rule[-1].limit='1000/sec'
+    set firewall.@rule[-1].family=ipv6
+    set firewall.@rule[-1].target=ACCEPT
+EOF
+
+  # allow SSH from yggdrasil zone, needs to be explicitly enabled
+  uci -q batch <<-EOF >/dev/null
+    add firewall rule
+    set firewall.@rule[-1].enabled=0
+    set firewall.@rule[-1].name='Allow-SSH-yggdrasil'
+    set firewall.@rule[-1].src=yggdrasil
+    set firewall.@rule[-1].proto=tcp
+    set firewall.@rule[-1].dest_port=22
+    set firewall.@rule[-1].target=ACCEPT
+EOF
+
+  # allow LuCI access from yggdrasil zone, needs to be explicitly enabled
+  uci -q batch <<-EOF >/dev/null
+    add firewall rule
+    set firewall.@rule[-1].enabled=0
+    set firewall.@rule[-1].name='Allow-HTTP-yggdrasil'
+    set firewall.@rule[-1].src=yggdrasil
+    set firewall.@rule[-1].proto=tcp
+    set firewall.@rule[-1].dest_port=80
+    set firewall.@rule[-1].target=ACCEPT
+EOF
+
+  uci commit firewall
+  uci commit network
+
+else
+  :
+fi
+
+exit 0
diff --git a/net/yggdrasil/files/yggdrasil.init b/net/yggdrasil/files/yggdrasil.init
new file mode 100755 (executable)
index 0000000..afdcdb4
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh /etc/rc.common
+
+START=90
+STOP=85
+
+USE_PROCD=1
+
+start_service()
+{
+       [ -f /etc/uci-defaults/yggdrasil ] && ( . /etc/uci-defaults/yggdrasil )
+
+       procd_open_instance
+       procd_set_param respawn
+       procd_set_param command /bin/ash -c "/usr/sbin/yggdrasil -useconffile /etc/yggdrasil.conf | logger -t yggdrasil"
+
+       procd_close_instance
+}
+
+stop_service()
+{
+       killall yggdrasil
+}
+
+reload_service()
+{
+       restart
+}
+
+service_triggers()
+{
+       procd_add_reload_trigger yggdrasil
+}
index a75693ac5f548193f81de0d0091ee75ca0b9a8b5..1d325735d7d358acce14fd0d714eeda13ceca197 100644 (file)
@@ -8,21 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
-PKG_VERSION:=1.7.1
-PKG_RELEASE:=4
+PKG_VERSION:=1.7.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://znc.in/releases \
                https://znc.in/releases/archive
-PKG_HASH:=44cfea7158ea05dc2547c7c6bc22371e66c869def90351de0ab90a9c200d39c4
+PKG_HASH:=1e4cc31837a1e8e6cc310873659a167cec16a3fd4281cbc3bf364e42352c113d
 
 PKG_MAINTAINER:=Jonas Gorski <jonas.gorski@gmail.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:znc:znc
 
-PKG_FIXUP:=autoreconf
-
 PKG_USE_MIPS16:=0
 PKG_BUILD_PARALLEL:=1
 
index 6395af59187d59f7674fa9093265a63312bc1c55..ea6247296ac46e4f657614bd26ee7581c97aa303 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/main.cpp
 +++ b/src/main.cpp
-@@ -412,12 +412,14 @@ int main(int argc, char** argv) {
+@@ -422,12 +422,14 @@ int main(int argc, char** argv) {
                  "No modules found. Perhaps you didn't install ZNC properly?");
              CUtils::PrintError(
                  "Read https://wiki.znc.in/Installation for instructions.");
index 9c206f7f09d47a019a2a7af4ad66c01b1ff62b51..c8fdda85561748ecd808c9ae42cdd7e1d98867cb 100644 (file)
@@ -1,74 +1,3 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -368,8 +368,9 @@ if test "x$SSL" != "xno"; then
-               AC_LINK_IFELSE([
-                       AC_LANG_PROGRAM([[
-                               #include <openssl/ssl.h>
-+                              #include <openssl/dh.h>
-                       ]], [[
--                              SSL_CTX* ctx = SSL_CTX_new(TLSv1_method());
-+                              SSL_CTX* ctx = SSL_CTX_new(SSLv23_method());
-                               SSL* ssl = SSL_new(ctx);
-                               DH* dh = DH_new();
-                               DH_free(dh);
---- a/include/znc/Utils.h
-+++ b/include/znc/Utils.h
-@@ -219,6 +219,11 @@ class CTable : protected std::vector<std::vector<CString>> {
- #include <openssl/aes.h>
- #include <openssl/blowfish.h>
- #include <openssl/md5.h>
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_getm_notBefore X509_get_notBefore
-+#define X509_getm_notAfter X509_get_notAfter
-+#endif
-+
- //! does Blowfish w/64 bit feedback, no padding
- class CBlowfish {
-   public:
---- a/src/Utils.cpp
-+++ b/src/Utils.cpp
-@@ -27,6 +27,8 @@
- #include <znc/Message.h>
- #ifdef HAVE_LIBSSL
- #include <openssl/ssl.h>
-+#include <openssl/bn.h>
-+#include <openssl/rsa.h>
- #endif /* HAVE_LIBSSL */
- #include <memory>
- #include <unistd.h>
-@@ -93,8 +95,8 @@ void CUtils::GenerateCert(FILE* pOut, const CString& sHost) {
-     X509_set_version(pCert.get(), 2);
-     ASN1_INTEGER_set(X509_get_serialNumber(pCert.get()), serial);
--    X509_gmtime_adj(X509_get_notBefore(pCert.get()), 0);
--    X509_gmtime_adj(X509_get_notAfter(pCert.get()),
-+    X509_gmtime_adj(X509_getm_notBefore(pCert.get()), 0);
-+    X509_gmtime_adj(X509_getm_notAfter(pCert.get()),
-                     (long)60 * 60 * 24 * days * years);
-     X509_set_pubkey(pCert.get(), pKey.get());
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -46,8 +46,8 @@ static void locking_callback(int mode, int type, const char* file, int line) {
-     }
- }
--static unsigned long thread_id_callback() {
--    return (unsigned long)pthread_self();
-+static void thread_id_callback(CRYPTO_THREADID *id) {
-+    CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
- }
- static CRYPTO_dynlock_value* dyn_create_callback(const char* file, int line) {
-@@ -78,7 +78,7 @@ static void thread_setup() {
-     for (std::unique_ptr<CMutex>& mtx : lock_cs)
-         mtx = std::unique_ptr<CMutex>(new CMutex());
--    CRYPTO_set_id_callback(&thread_id_callback);
-+    CRYPTO_THREADID_set_callback(&thread_id_callback);
-     CRYPTO_set_locking_callback(&locking_callback);
-     CRYPTO_set_dynlock_create_callback(&dyn_create_callback);
 --- a/third_party/Csocket/Csocket.cc
 +++ b/third_party/Csocket/Csocket.cc
 @@ -47,10 +47,16 @@
index ed9606be51dad094a5fe853eaded92cabc44b3e3..6e2ffff9bcf25ecae51ccea8e99a46ff358e34a5 100644 (file)
@@ -6,15 +6,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fdk-aac
-PKG_VERSION:=0.1.6
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.0
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_LICENSE:=Fraunhofer-FDK-AAC-for-Android
 PKG_LICENSE_FILES:=NOTICE
 
 PKG_SOURCE_URL=https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=adbcd793e406e1b88b3c1c41382d49f8c27371485b823c0fdab69c9124fd2ce3
+PKG_HASH:=6e6c7921713788e31df655911e1d42620b057180b00bf16874f5d630e1d5b9a2
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
diff --git a/sound/fdk-aac/patches/001-fix-overflow.patch b/sound/fdk-aac/patches/001-fix-overflow.patch
deleted file mode 100644 (file)
index 89728d9..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From a50eecf65b5ce5d4f03768c5c2cb4b492d2badad Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin@martin.st>
-Date: Fri, 4 May 2018 12:46:44 +0300
-Subject: [PATCH] Fix overflows in accumulation, fixing crashes
-
-This fixes github issue #83.
----
- libSBRenc/src/tran_det.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libSBRenc/src/tran_det.cpp b/libSBRenc/src/tran_det.cpp
-index 0e35ec3..51d6efe 100644
---- a/libSBRenc/src/tran_det.cpp
-+++ b/libSBRenc/src/tran_det.cpp
-@@ -256,12 +256,12 @@ static FIXP_DBL addLowbandEnergies(FIXP_DBL **Energies,
-   /* freqBandTable[LORES] has MAX_FREQ_COEFFS/2 +1 coeefs max. */
-   for (ts=tran_offdiv2; ts<YBufferWriteOffset; ts++) {
-     for (k = 0; k < freqBandTable[0]; k++) {
--      accu1 += Energies[ts][k] >> 6;
-+      accu1 = fAddSaturate(accu1, Energies[ts][k] >> 6);
-     }
-   }
-   for (; ts<tran_offdiv2+(slots>>nrgSzShift); ts++) {
-     for (k = 0; k < freqBandTable[0]; k++) {
--      accu2 += Energies[ts][k] >> 9;
-+      accu2 = fAddSaturate(accu2, Energies[ts][k] >> 9);
-     }
-   }
index ebd2fc7804fa285894ed6c85ab2e1151d2d90e9a..f5e97e97c7b2c2cfe05032b832f2f9abec95e922 100644 (file)
@@ -8,21 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairplay
-PKG_VERSION:=2016-01-01
-PKG_RELEASE:=2
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/juhovh/shairplay
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=ce80e005908f41d0e6fde1c4a21e9cb8ee54007b
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=a77e42fcde7b0d023c94d748e62c100bb0bc06da2adc5d4aff19361e4f1a313d
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_SOURCE_DATE:=2018-08-24
+PKG_SOURCE_VERSION:=096b61ad14c90169f438e690d096e3fcf87e504e
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/juhovh/shairplay/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=7e2b013ffe75ea2f13fb12b1aa38b8e2e8b1899ac292d57f05d7b352a3a181cf
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
 
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/sound/shairplay/patches/002-libavahi-compat-dnssd.patch b/sound/shairplay/patches/002-libavahi-compat-dnssd.patch
deleted file mode 100644 (file)
index ff70e24..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/lib/dnssd.c
-+++ b/src/lib/dnssd.c
-@@ -167,7 +167,7 @@ dnssd_init(int *error)
-               return NULL;
-       }
- #elif USE_LIBDL
--      dnssd->module = dlopen("libdns_sd.so", RTLD_LAZY);
-+      dnssd->module = dlopen("libdns_sd.so.1", RTLD_LAZY);
-       if (!dnssd->module) {
-               if (error) *error = DNSSD_ERROR_LIBNOTFOUND;
-               free(dnssd);
diff --git a/sound/shairplay/patches/010-configure-only-check-for-dns_sd.h-in-case-libdl-was-.patch b/sound/shairplay/patches/010-configure-only-check-for-dns_sd.h-in-case-libdl-was-.patch
new file mode 100644 (file)
index 0000000..5aa5c53
--- /dev/null
@@ -0,0 +1,26 @@
+From 031c3d802e51bbc233b1044f812402a66bfcf237 Mon Sep 17 00:00:00 2001
+From: Memphiz <memphis@machzwo.de>
+Date: Fri, 21 Dec 2018 20:39:11 +0100
+Subject: [PATCH] [configure] - only check for dns_sd.h in case libdl was not
+ found
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a4b8ad..682d74b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ LT_LIB_DLLOAD
+ # Checks for header files.
+ AC_HEADER_STDC
+-if test yes = "$libltdl_cv_func_dlopen" || test yes = "$libltdl_cv_lib_dl_dlopen"
++if test no = "$libltdl_cv_func_dlopen" && test no = "$libltdl_cv_lib_dl_dlopen"
+ then
+   AC_CHECK_HEADERS([dns_sd.h], [],
+                    [AC_MSG_ERROR([Could not find dns_sd.h header, please install libavahi-compat-libdnssd-dev or equivalent.])])
+-- 
+2.17.1
+
index 122a0957981810b03bc0f55b759997972d9aea8b..d64ff5941b68985db259d517b1de727ca85b3c7e 100644 (file)
@@ -6,8 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squeezelite
-PKG_VERSION:=1.8.4-743
-PKG_RELEASE=2
+PKG_VERSION:=1.9.1-1130
+PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=LICENSE.txt
@@ -16,9 +16,9 @@ PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e
+PKG_SOURCE_VERSION:=451cad8da651073d18118fb9ca39faef550825ff
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_MIRROR_HASH:=b6ea4a11366330790f5e36bd875b45bb19a9772dfc984c462f436dfca30256c0
+PKG_MIRROR_HASH:=e6082b486e364c8cbd7db96fc06dc5243242a3ac786113e42e3061c06ea8889e
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
@@ -82,52 +82,49 @@ define Package/squeezelite-mini/config
 endef
 
 define Package/squeezelite/description/default
-    Squeezelite is a small headless squeezebox emulator for linux using alsa audio output 
-    It is aimed at supporting high quality audio at multiple sample rates including 
-    44.1/48/88.2/96/176.4/192k/352.8/384kHz 
-    Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg) 
+    Squeezelite is a small headless squeezebox emulator for linux using alsa audio output
+    It is aimed at supporting high quality audio at multiple sample rates including
+    44.1/48/88.2/96/176.4/192k/352.8/384kHz
+    Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg)
     Native support for PCM builtin
     Optional support of DSD playback via PCM for DoP capable DAC
     Optional resampling to match sound device
 endef
 
-define Package/squeezelite/description
+define Package/squeezelite-full/description
     $(call Package/squeezelite/description/default)
-    .
+
     This package has all the audio codecs compiled in.
 endef
 
 define Package/squeezelite-mini/description
     $(call Package/squeezelite/description/default)
-    .
+
     This package will dynamically load installed codecs.
 endef
 
-#ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
-#    PKG_BUILD_DEPENDS+= libffmpeg-audio-dec
-#endif
-
-TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE
-
 ifeq ($(CONFIG_SQUEEZELITE_WMA),y)
-    TARGET_CFLAGS+= -DFFMPEG
+    opts+= -DFFMPEG
 endif
 
 ifeq ($(CONFIG_SQUEEZELITE_DSD),y)
-    TARGET_CFLAGS+= -DDSD
+    opts+= -DDSD
 endif
 
 ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y)
-    TARGET_CFLAGS+= -DRESAMPLE
+    opts+= -DRESAMPLE
 endif
 
-TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt
-
 ifeq ($(BUILD_VARIANT),full)
-    TARGET_CFLAGS+= -DLINKALL
-    TARGET_LDFLAGS+= -lvorbis -logg
+    opts+= -DLINKALL
 endif
 
+MAKE_FLAGS+=OPTS="$(opts)"
+
+# Squeezelite uses functions which are deprecated in recent ffmpeg versions.
+# See https://github.com/ralph-irving/squeezelite/issues/60
+TARGET_CFLAGS+=-Wno-deprecated-declarations
+
 define Package/squeezelite/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin
diff --git a/sound/squeezelite/patches/005-respect_LDFLAGS.patch b/sound/squeezelite/patches/005-respect_LDFLAGS.patch
deleted file mode 100644 (file)
index d8df7ca..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 1c53ed7db5b49ebf347efe65dbf9b740f9d54557 Mon Sep 17 00:00:00 2001
-From: Carlo Landmeter <clandmeter@gmail.com>
-Date: Tue, 31 Mar 2015 09:52:53 +0000
-Subject: [PATCH] respect LDFLAGS
-
----
- Makefile | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,7 @@
- # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
--CFLAGS  ?= -Wall -fPIC -O2 $(OPTS)
--LDFLAGS ?= -lasound -lpthread -lm -lrt
-+CFLAGS  ?= -Wall -O2
-+CFLAGS  += -fPIC $(OPTS)
-+LIBS ?= -lasound -lpthread -lm -lrt
- EXECUTABLE ?= squeezelite
- # passing one or more of these in $(OPTS) enables optional feature inclusion
-@@ -52,20 +53,20 @@ endif
- # add optional link options
- ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS)))
--      LDFLAGS += $(LINKALL)
-+      LIBS += $(LINKALL)
- ifneq (,$(findstring $(OPT_FF), $(CFLAGS)))
--      LDFLAGS += $(LINKALL_FF)
-+      LIBS += $(LINKALL_FF)
- endif
- ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS)))
--      LDFLAGS += $(LINKALL_RESAMPLE)
-+      LIBS += $(LINKALL_RESAMPLE)
- endif
- ifneq (,$(findstring $(OPT_IR), $(CFLAGS)))
--      LDFLAGS += $(LINKALL_IR)
-+      LIBS += $(LINKALL_IR)
- endif
- else
- # if not LINKALL and linux add LINK_LINUX
- ifeq ($(UNAME), Linux)
--      LDFLAGS += $(LINK_LINUX)
-+      LIBS += $(LINK_LINUX)
- endif
- endif
-@@ -74,7 +75,7 @@ OBJECTS = $(SOURCES:.c=.o)
- all: $(EXECUTABLE)
- $(EXECUTABLE): $(OBJECTS)
--      $(CC) $(OBJECTS) $(LDFLAGS) -o $@
-+      $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@
- $(OBJECTS): $(DEPS)
index 465f61a000322743e23a334d9c3cd1e3c9a7a44a..e016d2bfce394808997e669afa72c8386d7f8fb5 100644 (file)
@@ -1,15 +1,17 @@
---- a/main.c
-+++ b/main.c
-@@ -78,6 +78,7 @@ static void usage(const char *argv0) {
+Index: squeezelite-1.9.1-1130/main.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/main.c
++++ squeezelite-1.9.1-1130/main.c
+@@ -84,6 +84,7 @@ static void usage(const char *argv0) {
  #if IR
                   "  -i [<filename>]\tEnable lirc remote control support (lirc config file ~/.lircrc used if filename not specified)\n"
  #endif
-+                 "  -I <interface>\t\tNetwork interface used to send discovery\n"
++                 "  -I <interface>\tNetwork interface used to send discovery\n"
                   "  -m <mac addr>\t\tSet mac address, format: ab:cd:ef:12:34:56\n"
                   "  -M <modelname>\tSet the squeezelite player model name sent to the server (default: " MODEL_NAME_STRING ")\n"
                   "  -n <name>\t\tSet the player name\n"
-@@ -233,6 +234,8 @@ int main(int argc, char **argv) {
-       extern bool pcm_check_header;
+@@ -267,6 +268,8 @@ int main(int argc, char **argv) {
+       extern bool user_rates;
        char *logfile = NULL;
        u8_t mac[6];
 +      char *iface = NULL;
@@ -17,7 +19,7 @@
        unsigned stream_buf_size = STREAMBUF_SIZE;
        unsigned output_buf_size = 0; // set later
        unsigned rates[MAX_SUPPORTED_SAMPLERATES] = { 0 };
-@@ -271,6 +274,7 @@ int main(int argc, char **argv) {
+@@ -307,6 +310,7 @@ int main(int argc, char **argv) {
  
        int maxSampleRate = 0;
  
@@ -25,7 +27,7 @@
        char *optarg = NULL;
        int optind = 1;
        int i;
-@@ -278,8 +282,6 @@ int main(int argc, char **argv) {
+@@ -314,8 +318,6 @@ int main(int argc, char **argv) {
  #define MAXCMDLINE 512
        char cmdline[MAXCMDLINE] = "";
  
        for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) {
                strcat(cmdline, argv[i]);
                strcat(cmdline, " ");
-@@ -287,7 +289,7 @@ int main(int argc, char **argv) {
+@@ -323,7 +325,7 @@ int main(int argc, char **argv) {
  
        while (optind < argc && strlen(argv[optind]) >= 2 && argv[optind][0] == '-') {
                char *opt = argv[optind] + 1;
 -              if (strstr("oabcCdefmMnNpPrs"
 +              if (strstr("oabcCdefImMnNpPrs"
  #if ALSA
-                                  "UV"
+                                  "UVO"
  #endif
-@@ -382,6 +384,9 @@ int main(int argc, char **argv) {
+@@ -424,6 +426,9 @@ int main(int argc, char **argv) {
                case 'f':
                        logfile = optarg;
                        break;
@@ -53,7 +55,7 @@
                case 'm':
                        {
                                int byte = 0;
-@@ -667,6 +672,11 @@ int main(int argc, char **argv) {
+@@ -733,6 +738,11 @@ int main(int argc, char **argv) {
        winsock_init();
  #endif
  
@@ -65,7 +67,7 @@
        stream_init(log_stream, stream_buf_size);
  
        if (!strcmp(output_device, "-")) {
-@@ -710,7 +720,7 @@ int main(int argc, char **argv) {
+@@ -776,7 +786,7 @@ int main(int argc, char **argv) {
                exit(1);
        }
  
  
        decode_close();
        stream_close();
---- a/squeezelite.h
-+++ b/squeezelite.h
-@@ -403,7 +403,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
+Index: squeezelite-1.9.1-1130/squeezelite.h
+===================================================================
+--- squeezelite-1.9.1-1130.orig/squeezelite.h
++++ squeezelite-1.9.1-1130/squeezelite.h
+@@ -414,7 +414,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_
  
  char *next_param(char *src, char c);
  u32_t gettime_ms(void);
@@ -85,7 +89,7 @@
  void set_nonblock(sockfd s);
  int connect_timeout(sockfd sock, const struct sockaddr *addr, socklen_t addrlen, int timeout);
  void server_addr(char *server, in_addr_t *ip_ptr, unsigned *port_ptr);
-@@ -459,7 +459,7 @@ void buf_init(struct buffer *buf, size_t
+@@ -470,7 +470,7 @@ void buf_init(struct buffer *buf, size_t
  void buf_destroy(struct buffer *buf);
  
  // slimproto.c
  void slimproto_stop(void);
  void wake_controller(void);
  
---- a/slimproto.c
-+++ b/slimproto.c
-@@ -119,7 +119,7 @@ void send_packet(u8_t *packet, size_t le
+Index: squeezelite-1.9.1-1130/slimproto.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/slimproto.c
++++ squeezelite-1.9.1-1130/slimproto.c
+@@ -113,7 +113,7 @@ void send_packet(u8_t *packet, size_t le
        }
  }
  
        const char *base_cap = "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION;
        struct HELO_packet pkt;
  
-@@ -782,7 +782,7 @@ void wake_controller(void) {
+@@ -757,7 +757,7 @@ void wake_controller(void) {
        wake_signal(wake_e);
  }
  
--in_addr_t discover_server(void) {
-+in_addr_t discover_server(in_addr_t bcast_addr) {
+-in_addr_t discover_server(char *default_server) {
++in_addr_t discover_server(char *default_server, in_addr_t bcast_addr) {
        struct sockaddr_in d;
        struct sockaddr_in s;
        char *buf;
-@@ -798,7 +798,7 @@ in_addr_t discover_server(void) {
+@@ -774,7 +774,7 @@ in_addr_t discover_server(char *default_
        memset(&d, 0, sizeof(d));
        d.sin_family = AF_INET;
        d.sin_port = htons(PORT);
  
        pollinfo.fd = disc_sock;
        pollinfo.events = POLLIN;
-@@ -829,7 +829,7 @@ in_addr_t discover_server(void) {
+@@ -809,7 +809,7 @@ in_addr_t discover_server(char *default_
  #define FIXED_CAP_LEN 256
  #define VAR_CAP_LEN   128
  
        struct sockaddr_in serv_addr;
        static char fixed_cap[FIXED_CAP_LEN], var_cap[VAR_CAP_LEN] = "";
        bool reconnect = false;
-@@ -849,7 +849,7 @@ void slimproto(log_level level, char *se
+@@ -830,7 +830,7 @@ void slimproto(log_level level, char *se
        }
  
        if (!slimproto_ip) {
--              slimproto_ip = discover_server();
-+              slimproto_ip = discover_server(bcast_addr);
+-              slimproto_ip = discover_server(server);
++              slimproto_ip = discover_server(server, bcast_addr);
        }
  
        if (!slimproto_port) {
-@@ -924,7 +924,7 @@ void slimproto(log_level level, char *se
+@@ -911,7 +911,7 @@ void slimproto(log_level level, char *se
  
                        // rediscover server if it was not set at startup
                        if (!server && ++failed_connect > 5) {
--                              slimproto_ip = serv_addr.sin_addr.s_addr = discover_server();
-+                              slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(bcast_addr);
+-                              slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(NULL);
++                              slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(NULL, bcast_addr);
                        }
  
                } else {
---- a/utils.c
-+++ b/utils.c
+Index: squeezelite-1.9.1-1130/utils.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/utils.c
++++ squeezelite-1.9.1-1130/utils.c
 @@ -22,11 +22,11 @@
  #include "squeezelite.h"
  
  // logging functions
  const char *logtime(void) {
        static char buf[100];
-@@ -114,58 +110,101 @@ u32_t gettime_ms(void) {
+@@ -114,58 +110,94 @@ u32_t gettime_ms(void) {
  #endif
  }
  
 +      loglevel = level;
 +
 +      // Check for non-zero MAC
-+      if ((mac[0] | mac[1] | mac[2]) != 0)
++      if (mac[0] | mac[1] | mac[2] != 0)
 +              have_mac = 1;
 +
-+        // Copy interface name, if it was provided.
-+        if (iface != NULL)
-+        {
-+                if( strlen(iface) > sizeof(ifname) )
-+                        return -1;
-+                strncpy(ifname, iface, sizeof(ifname));
-+                have_ifname = 1;
++      // Copy interface name, if it was provided.
++      if (iface != NULL) {
++              if (strlen(iface) > sizeof(ifname))
++                      return -1;
++              strncpy(ifname, iface, sizeof(ifname));
++              have_ifname = 1;
        }
  
 -      mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0;
 +              for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
 +                      // Skip LOOPBACK interfaces, DOWN interfaces and interfaces that
 +                      // don't support BROADCAST.
-+                      if ((ifa->ifa_flags & IFF_LOOPBACK)
-+                                || !(ifa->ifa_flags & IFF_UP)
-+                                || !(ifa->ifa_flags & IFF_BROADCAST))
-+                      {
++                      if (ifa->ifa_flags & IFF_LOOPBACK
++                                || !ifa->ifa_flags & IFF_UP
++                                || !ifa->ifa_flags & IFF_BROADCAST) {
 +                              continue;
 +                      }
  
 -      int s = socket(AF_INET, SOCK_DGRAM, 0);
-+                      if (!have_ifname)
-+                      {
++                      if (!have_ifname) {
 +                              // We have found a valid interface name. Keep it.
 +                              strncpy(ifname, ifa->ifa_name, sizeof(ifname));
 +                              have_ifname = 1;
 +                      } else {
-+                              if (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) != 0)
-+                              {
++                              if (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) != 0) {
 +                                      // This is not the interface we're looking for.
 +                                      continue;
 +                              }
 -      if (ioctl(s, SIOCGIFCONF, &ifc) == 0) {
 -              ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq));
 +                      // Check address family.
-+                      if ((ifa->ifa_addr->sa_family == AF_INET) &&
-+                          (((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0))
-+                      {
++                      if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET &&
++                          ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0) {
 +                              // Get broadcast address and MAC address
 +                              bcast_addr = ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr;
 +                              break;
 +                      }
-+                      else
-+                      {
++                      else {
 +                              // Address is not IPv4
 +                              if (iface == NULL)
 +                                      have_ifname = 0;
 +                      }
-+
 +              }
  
 -              for (ifr = ifc.ifc_req; ifr < ifend; ifr++) {
 -                                              break;
 -                                      }
 +              // Find MAC address matching interface
-+              if (!have_mac && (bcast_addr != 0)) {
++              if (!have_mac && bcast_addr != 0) {
 +                      for (ifa = addrs; ifa; ifa = ifa->ifa_next) {
-+                              if ((ifa->ifa_addr->sa_family == PF_PACKET) &&
-+                                  (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) == 0)) {
++                              if (ifa->ifa_addr && ifa->ifa_addr->sa_family == PF_PACKET &&
++                                  strncmp(ifname, ifa->ifa_name, sizeof(ifname)) == 0) {
 +                                      sdl = (struct sockaddr *)(ifa->ifa_addr);
 +                                      ptr = (unsigned char *)sdl->sa_data;
 +                                      memcpy(mac, ptr + 10, 6);
  #if SUN
  void get_mac(u8_t mac[]) {
        struct  arpreq          parpreq;
-@@ -232,30 +271,6 @@ void get_mac(u8_t mac[]) {
+@@ -232,30 +264,6 @@ void get_mac(u8_t mac[]) {
  }
  #endif
  
index cb619c651db9a12c8cebb58bedf7450ec53852fb..4504a55374489cce14ce3b884edb42dc0e9d3746 100644 (file)
@@ -1,83 +1,88 @@
---- a/Makefile
-+++ b/Makefile
-@@ -15,7 +15,7 @@ OPT_IR      = -DIR
+Index: squeezelite-1.9.1-1130/Makefile
+===================================================================
+--- squeezelite-1.9.1-1130.orig/Makefile
++++ squeezelite-1.9.1-1130/Makefile
+@@ -17,7 +17,7 @@ OPT_NO_FAAD = -DNO_FAAD
  SOURCES = \
        main.c slimproto.c buffer.c stream.c utils.c \
        output.c output_alsa.c output_pa.c output_stdout.c output_pack.c decode.c \
--      flac.c pcm.c mad.c vorbis.c faad.c mpg.c
-+      flac.c pcm.c vorbis.c faad.c mpg.c
+-      flac.c pcm.c mad.c vorbis.c mpg.c
++      flac.c pcm.c vorbis.c mpg.c
  
  SOURCES_DSD      = dsd.c dop.c dsd2pcm/dsd2pcm.c
  SOURCES_FF       = ffmpeg.c
-@@ -25,7 +25,7 @@ SOURCES_IR       = ir.c
+@@ -30,7 +30,7 @@ SOURCES_FAAD     = faad.c
  LINK_LINUX       = -ldl
+ LINK_RPI         = -lwiringPi
  
--LINKALL          = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123
-+LINKALL          = -lFLAC -lvorbisfile -lfaad -lmpg123
+-LINKALL          = -lFLAC -lmad -lvorbisfile -lmpg123
++LINKALL          = -lFLAC -lvorbisfile -lmpg123
  LINKALL_FF       = -lavcodec -lavformat -lavutil
  LINKALL_RESAMPLE = -lsoxr
  LINKALL_IR       = -llirc_client
---- a/decode.c
-+++ b/decode.c
-@@ -145,8 +145,8 @@ void decode_init(log_level level, const
-       if (!strstr(exclude_codecs, "pcm")  && (!include_codecs || strstr(include_codecs, "pcm")))  codecs[i++] = register_pcm();
+Index: squeezelite-1.9.1-1130/decode.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/decode.c
++++ squeezelite-1.9.1-1130/decode.c
+@@ -176,11 +176,7 @@ void decode_init(log_level level, const
+       if (!strstr(exclude_codecs, "pcm")      && (!include_codecs || (order_codecs = strstr(include_codecs, "pcm"))))
+               sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_pcm());
  
-       // try mad then mpg for mp3 unless command line option passed
+-      // try mad then mpg for mp3 unless command line option passed
 -      if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) &&
--              (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mad")))    codecs[i] = register_mad();
-+//    if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) &&
-+//            (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mad")))    codecs[i] = register_mad();
-       if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) && !codecs[i] &&
-               (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mpg")))    codecs[i] = register_mpg();
+-              (!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mad"))))
+-              sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mad());
+-      else if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) &&
++      if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) &&
+               (!include_codecs || (order_codecs = strstr(include_codecs, "mp3")) || (order_codecs = strstr(include_codecs, "mpg"))))
+               sort_codecs((include_codecs ? order_codecs - include_codecs : i), register_mpg());
  
---- a/main.c
-+++ b/main.c
-@@ -39,7 +39,8 @@
+Index: squeezelite-1.9.1-1130/main.c
+===================================================================
+--- squeezelite-1.9.1-1130.orig/main.c
++++ squeezelite-1.9.1-1130/main.c
+@@ -44,7 +44,7 @@
  #else
  #define CODECS_DSD  ""
  #endif
 -#define CODECS_MP3  " (mad,mpg for specific mp3 codec)"
-+//#define CODECS_MP3  " (mad,mpg for specific mp3 codec)"
-+#define CODECS_MP3  " (mpg123 for specific mp3 codec)"
++#define CODECS_MP3  ""
  
- #define CODECS CODECS_BASE CODECS_FF CODECS_DSD CODECS_MP3
+ #define CODECS CODECS_BASE CODECS_AAC CODECS_FF CODECS_DSD CODECS_MP3
  
---- a/squeezelite.h
-+++ b/squeezelite.h
-@@ -154,7 +154,7 @@
+Index: squeezelite-1.9.1-1130/squeezelite.h
+===================================================================
+--- squeezelite-1.9.1-1130.orig/squeezelite.h
++++ squeezelite-1.9.1-1130/squeezelite.h
+@@ -163,7 +163,6 @@
  
  #if LINUX
  #define LIBFLAC "libFLAC.so.8"
 -#define LIBMAD  "libmad.so.0"
-+//#define LIBMAD  "libmad.so.0"
  #define LIBMPG "libmpg123.so.0"
  #define LIBVORBIS "libvorbisfile.so.3"
  #define LIBTREMOR "libvorbisidec.so.1"
-@@ -168,7 +168,7 @@
+@@ -177,7 +176,6 @@
  
  #if OSX
  #define LIBFLAC "libFLAC.8.dylib"
 -#define LIBMAD  "libmad.0.dylib"
-+//#define LIBMAD  "libmad.0.dylib"
  #define LIBMPG "libmpg123.0.dylib"
  #define LIBVORBIS "libvorbisfile.3.dylib"
  #define LIBTREMOR "libvorbisidec.1.dylib"
-@@ -181,7 +181,7 @@
+@@ -190,7 +188,6 @@
  
  #if WIN
  #define LIBFLAC "libFLAC.dll"
 -#define LIBMAD  "libmad-0.dll"
-+//#define LIBMAD  "libmad-0.dll"
  #define LIBMPG "libmpg123-0.dll"
  #define LIBVORBIS "libvorbisfile.dll"
  #define LIBTREMOR "libvorbisidec.dll"
-@@ -194,7 +194,7 @@
+@@ -203,7 +200,6 @@
  
  #if FREEBSD
  #define LIBFLAC "libFLAC.so.11"
 -#define LIBMAD  "libmad.so.2"
-+//#define LIBMAD  "libmad.so.2"
  #define LIBMPG "libmpg123.so.0"
  #define LIBVORBIS "libvorbisfile.so.6"
  #define LIBTREMOR "libvorbisidec.so.1"
diff --git a/sound/squeezelite/patches/030-fix_musl_compatibilty.patch b/sound/squeezelite/patches/030-fix_musl_compatibilty.patch
deleted file mode 100644 (file)
index 24f00e0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/output_alsa.c
-+++ b/output_alsa.c
-@@ -911,8 +911,11 @@ void output_init_alsa(log_level level, c
-               LOG_INFO("memory locked");
-       }
-+#ifdef M_TRIM_THRESHOLD
-+      // mallopt is not defined in musl libc
-       mallopt(M_TRIM_THRESHOLD, -1);
-       mallopt(M_MMAP_MAX, 0);
-+#endif
-       touch_memory(silencebuf, MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
-       touch_memory(outputbuf->buf, outputbuf->size);
diff --git a/sound/squeezelite/patches/040-clear_dynlink_errors.patch b/sound/squeezelite/patches/040-clear_dynlink_errors.patch
deleted file mode 100644 (file)
index b534a2b..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
---- a/faad.c
-+++ b/faad.c
-@@ -594,6 +594,8 @@ static bool load_faad() {
-               return false;
-       }
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       a->NeAACDecGetCurrentConfiguration = dlsym(handle, "NeAACDecGetCurrentConfiguration");
-       a->NeAACDecSetConfiguration = dlsym(handle, "NeAACDecSetConfiguration");
-       a->NeAACDecOpen = dlsym(handle, "NeAACDecOpen");
---- a/ffmpeg.c
-+++ b/ffmpeg.c
-@@ -620,6 +620,8 @@ static bool load_ff() {
-               return false;
-       }
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       sprintf(name, LIBAVFORMAT, LIBAVFORMAT_VERSION_MAJOR);
-       handle_format = dlopen(name, RTLD_NOW);
-       if (!handle_format) {
---- a/flac.c
-+++ b/flac.c
-@@ -241,6 +241,8 @@ static bool load_flac() {
-               return false;
-       }
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       f->FLAC__StreamDecoderErrorStatusString = dlsym(handle, "FLAC__StreamDecoderErrorStatusString");
-       f->FLAC__StreamDecoderStateString = dlsym(handle, "FLAC__StreamDecoderStateString");
-       f->FLAC__stream_decoder_new = dlsym(handle, "FLAC__stream_decoder_new");
---- a/ir.c
-+++ b/ir.c
-@@ -168,10 +168,10 @@ static void *ir_thread() {
-                       UNLOCK_I;
-                       wake_controller();
-               }
--              
-+
-               free(code);
-       }
--      
-+
-       return 0;
- }
-@@ -185,6 +185,8 @@ static bool load_lirc() {
-               return false;
-       }
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       i->lirc_init = dlsym(handle, "lirc_init");
-       i->lirc_deinit = dlsym(handle, "lirc_deinit");
-       i->lirc_readconfig = dlsym(handle, "lirc_readconfig");
---- a/mad.c
-+++ b/mad.c
-@@ -365,7 +365,9 @@ static bool load_mad() {
-               LOG_INFO("dlerror: %s", dlerror());
-               return false;
-       }
--      
-+
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       m->mad_stream_init = dlsym(handle, "mad_stream_init");
-       m->mad_frame_init = dlsym(handle, "mad_frame_init");
-       m->mad_synth_init = dlsym(handle, "mad_synth_init");
---- a/mpg.c
-+++ b/mpg.c
-@@ -222,7 +222,9 @@ static bool load_mpg() {
-               LOG_INFO("dlerror: %s", dlerror());
-               return false;
-       }
--      
-+
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       m->mpg123_init = dlsym(handle, "mpg123_init");
-       m->mpg123_feature = dlsym(handle, "mpg123_feature");
-       m->mpg123_rates = dlsym(handle, "mpg123_rates");
---- a/resample.c
-+++ b/resample.c
-@@ -251,6 +251,8 @@ static bool load_soxr(void) {
-               return false;
-       }
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       r->soxr_io_spec = dlsym(handle, "soxr_io_spec");
-       r->soxr_quality_spec = dlsym(handle, "soxr_quality_spec");
-       r->soxr_create = dlsym(handle, "soxr_create");
---- a/vorbis.c
-+++ b/vorbis.c
-@@ -287,6 +287,8 @@ static bool load_vorbis() {
-               }
-       }
-+      err = dlerror();        // Reset previous dynamic linking error string (if there was)
-+
-       v->ov_read = tremor ? NULL : dlsym(handle, "ov_read");
-       v->ov_read_tremor = tremor ? dlsym(handle, "ov_read") : NULL;
-       v->ov_info = dlsym(handle, "ov_info");
index d1419ae1a0ab143a9a73175a70e3cac8012136f8..1af7779fc0d47ebcf5623b680e05cf94aa1e1442 100644 (file)
@@ -5,8 +5,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=attendedsysupgrade-common
-PKG_VERSION:=0.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.2
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
@@ -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
@@ -51,6 +52,9 @@ endef
 define Package/attendedsysupgrade-common/install
        $(INSTALL_DIR) $(1)/etc/uci-defaults/
        $(INSTALL_BIN) ./files/attendedsysupgrade.defaults $(1)/etc/uci-defaults/attendedsysupgrade
+
+       $(INSTALL_DIR) $(1)/etc/opkg/keys/
+       $(INSTALL_BIN) ./files/c06d891233ba699 $(1)/etc/opkg/keys/c06d891233ba699
 endef
 
 $(eval $(call BuildPackage,attendedsysupgrade-common))
index f7fb1ebdebbf2ce4db17066ff5fbcf5918841147..3d65afba3d51887903eebc542573728e1142bda6 100644 (file)
@@ -6,7 +6,7 @@ touch /etc/config/attendedsysupgrade
 
 uci -q batch <<EOF
 set attendedsysupgrade.server=server
-set attendedsysupgrade.server.url='https://example.org'
+set attendedsysupgrade.server.url='https://chef.libremesh.org'
 
 set attendedsysupgrade.client=client
 set attendedsysupgrade.client.upgrade_packages='1'
diff --git a/utils/attendedsysupgrade-common/files/c06d891233ba699 b/utils/attendedsysupgrade-common/files/c06d891233ba699
new file mode 100644 (file)
index 0000000..94edfd8
--- /dev/null
@@ -0,0 +1,2 @@
+untrusted comment: public key c06d891233ba699
+RWQMBtiRIzummeTc81jtKdJ3XwnaZGtHLRwjls0ovGsKoTnTmS7fj4Na
index 444067010a2ca437974be7c5bd67a4e7438782e2..0b44d0e5d72579010c1b077404d3221c30665a47 100644 (file)
@@ -5,8 +5,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=auc
-PKG_VERSION:=0.0.9
-PKG_RELEASE:=2
+PKG_VERSION:=0.1.4
+PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0
 
 include $(INCLUDE_DIR)/package.mk
@@ -17,7 +17,7 @@ define Package/auc
   CATEGORY:=Base system
   TITLE:=Attended sysUpgrade CLI (EXPERIMENTAL)
   DEPENDS:=+attendedsysupgrade-common +libblobmsg-json +libubox +libubus \
-           +libuci +libuclient +rpcd-mod-rpcsys
+           +libuci +libuclient +rpcd-mod-rpcsys +ucert
 endef
 
 define Package/auc/description
index 6c53b1bb5f9268c83578d71d3e137e742366f338..9bdd5298fa9e3047f27dddd563cf3afb633257ab 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #define _GNU_SOURCE
-#define AUC_VERSION "0.0.9"
+#define AUC_VERSION "0.1.4"
 
 #include <fcntl.h>
 #include <dlfcn.h>
@@ -61,8 +61,8 @@ static bool cur_resume;
 static int output_fd = -1;
 static int retry, imagebuilder, building, ibready;
 static char *board_name = NULL;
-static char *target = NULL, *subtarget = NULL;
-static char *distribution = NULL, *version = NULL;
+static char *target = NULL;
+static char *distribution = NULL, *version = NULL, *revision = NULL;
 static int uptodate;
 static char *filename = NULL;
 static int rc;
@@ -93,6 +93,7 @@ static const struct blobmsg_policy board_policy[__BOARD_MAX] = {
 enum {
        RELEASE_DISTRIBUTION,
        RELEASE_VERSION,
+       RELEASE_REVISION,
        RELEASE_TARGET,
        __RELEASE_MAX,
 };
@@ -100,6 +101,7 @@ enum {
 static const struct blobmsg_policy release_policy[__RELEASE_MAX] = {
        [RELEASE_DISTRIBUTION] = { .name = "distribution", .type = BLOBMSG_TYPE_STRING },
        [RELEASE_VERSION] = { .name = "version", .type = BLOBMSG_TYPE_STRING },
+       [RELEASE_REVISION] = { .name = "revision", .type = BLOBMSG_TYPE_STRING },
        [RELEASE_TARGET] = { .name = "target", .type = BLOBMSG_TYPE_STRING },
 };
 
@@ -122,13 +124,13 @@ static const struct blobmsg_policy packagelist_policy[__PACKAGELIST_MAX] = {
  */
 enum {
        UPGTEST_CODE,
-       UPGTEST_STDOUT,
+       UPGTEST_STDERR,
        __UPGTEST_MAX,
 };
 
 static const struct blobmsg_policy upgtest_policy[__UPGTEST_MAX] = {
        [UPGTEST_CODE] = { .name = "code", .type = BLOBMSG_TYPE_INT32 },
-       [UPGTEST_STDOUT] = { .name = "stdout", .type = BLOBMSG_TYPE_STRING },
+       [UPGTEST_STDERR] = { .name = "stderr", .type = BLOBMSG_TYPE_STRING },
 };
 
 
@@ -167,7 +169,6 @@ enum {
 
 static const struct blobmsg_policy image_policy[__IMAGE_MAX] = {
        [IMAGE_REQHASH] = { .name = "request_hash", .type = BLOBMSG_TYPE_STRING },
-       [IMAGE_URL] = { .name = "url", .type = BLOBMSG_TYPE_STRING },
        [IMAGE_FILES] = { .name = "files", .type = BLOBMSG_TYPE_STRING },
        [IMAGE_SYSUPGRADE] = { .name = "sysupgrade", .type = BLOBMSG_TYPE_STRING },
 };
@@ -252,7 +253,7 @@ static void pkglist_check_cb(struct ubus_request *req, int type, struct blob_att
                return;
        }
 
-       blobmsg_add_field(buf, BLOBMSG_TYPE_TABLE, "packages", blobmsg_data(tb[PACKAGELIST_PACKAGES]), blobmsg_data_len(tb[PACKAGELIST_PACKAGES]));
+       blobmsg_add_field(buf, BLOBMSG_TYPE_TABLE, "installed", blobmsg_data(tb[PACKAGELIST_PACKAGES]), blobmsg_data_len(tb[PACKAGELIST_PACKAGES]));
 };
 
 /*
@@ -309,23 +310,24 @@ static void board_cb(struct ubus_request *req, int type, struct blob_attr *msg)
        blobmsg_parse(release_policy, __RELEASE_MAX, rel,
                        blobmsg_data(tb[BOARD_RELEASE]), blobmsg_data_len(tb[BOARD_RELEASE]));
 
-       if (!rel[RELEASE_TARGET]) {
-               fprintf(stderr, "No target received\n");
+       if (!rel[RELEASE_TARGET] ||
+           !rel[RELEASE_DISTRIBUTION] ||
+           !rel[RELEASE_VERSION] ||
+           !rel[RELEASE_REVISION]) {
+               fprintf(stderr, "No release information received\n");
                rc=-1;
                return;
        }
 
        target = strdup(blobmsg_get_string(rel[RELEASE_TARGET]));
-       subtarget = strchr(target, '/');
-       *subtarget++ = '\0';
-
        distribution = strdup(blobmsg_get_string(rel[RELEASE_DISTRIBUTION]));
        version = strdup(blobmsg_get_string(rel[RELEASE_VERSION]));
+       revision = strdup(blobmsg_get_string(rel[RELEASE_REVISION]));
 
        blobmsg_add_string(buf, "distro", distribution);
        blobmsg_add_string(buf, "target", target);
-       blobmsg_add_string(buf, "subtarget", subtarget);
        blobmsg_add_string(buf, "version", version);
+       blobmsg_add_string(buf, "revision", revision);
 }
 
 /*
@@ -344,8 +346,13 @@ static void upgtest_cb(struct ubus_request *req, int type, struct blob_attr *msg
        }
 
        *valid = (blobmsg_get_u32(tb[UPGTEST_CODE]) == 0)?1:0;
-       if (*valid == 0)
-               fprintf(stderr, "%s", blobmsg_get_string(tb[UPGTEST_STDOUT]));
+
+       if (tb[UPGTEST_STDERR])
+               fprintf(stderr, "%s", blobmsg_get_string(tb[UPGTEST_STDERR]));
+       else if (*valid == 0)
+               fprintf(stderr, "image verification failed\n");
+       else
+               fprintf(stderr, "image verification succeeded\n");
 };
 
 /**
@@ -433,9 +440,14 @@ static void header_done_cb(struct uclient *cl)
                request_done(cl);
                rc=-1;
                break;
+       case 409:
+               fprintf(stderr, "Conflicting packages requested\n");
+               request_done(cl);
+               rc=-2;
+               break;
        case 412:
-               fprintf(stderr, "%s target %s/%s (%s) not found. Please report this at %s\n",
-                       distribution, target, subtarget, board_name, server_issues);
+               fprintf(stderr, "%s target %s (%s) not found. Please report this at %s\n",
+                       distribution, target, board_name, server_issues);
                request_done(cl);
                rc=-2;
                break;
@@ -703,98 +715,6 @@ static int init_ustream_ssl(void) {
        return 0;
 }
 
-/**
- * use busybox sha256sum to verify sha256sums file
- */
-static int sha256sum_v(const char *sha256file, const char *msgfile) {
-       pid_t pid;
-       int fds[2];
-       int status;
-       FILE *f = fopen(sha256file, "r");
-       char sumline[512] = {};
-       char *fname;
-       unsigned int fnlen;
-       unsigned int cnt = 0;
-
-       if (pipe(fds))
-               return -1;
-
-       if (!f)
-               return -1;
-
-
-       pid = fork();
-       switch (pid) {
-       case -1:
-               return -1;
-
-       case 0:
-               uloop_done();
-
-               dup2(fds[0], 0);
-               close(1);
-               close(2);
-               close(fds[0]);
-               close(fds[1]);
-               if (execl("/bin/busybox", "/bin/busybox", "sha256sum", "-s", "-c", NULL));
-                       return -1;
-
-               break;
-
-       default:
-               while (fgets(sumline, sizeof(sumline), f)) {
-                       fname = &sumline[66];
-                       fnlen = strlen(fname);
-                       fname[fnlen-1] = '\0';
-                       if (!strcmp(fname, msgfile)) {
-                               fname[fnlen-1] = '\n';
-                               write(fds[1], sumline, strlen(sumline));
-                               cnt++;
-                       }
-               }
-               fclose(f);
-               close(fds[1]);
-               waitpid(pid, &status, 0);
-               close(fds[0]);
-
-               if (cnt == 1)
-                       return WEXITSTATUS(status);
-               else
-                       return -1;
-       }
-
-       return -1;
-}
-
-/**
- * use usign to verify sha256sums.sig
- */
-static int usign_v(const char *file) {
-       pid_t pid;
-       int status;
-
-       pid = fork();
-       switch (pid) {
-       case -1:
-               return -1;
-
-       case 0:
-               uloop_done();
-
-               if (execl("/usr/bin/usign", "/usr/bin/usign",
-                         "-V", "-q", "-P", PUBKEY_PATH, "-m", file, NULL));
-                       return -1;
-
-               break;
-
-       default:
-               waitpid(pid, &status, 0);
-               return WEXITSTATUS(status);
-       }
-
-       return -1;
-}
-
 static int ask_user(void)
 {
        fprintf(stderr, "Are you sure you want to continue the upgrade process? [N/y] ");
@@ -828,10 +748,8 @@ int main(int args, char *argv[]) {
        char *newversion = NULL;
        struct blob_attr *tb[__IMAGE_MAX];
        struct blob_attr *tbc[__CHECK_MAX];
-       char *tmp;
        struct stat imgstat;
        int check_only = 0;
-       int ignore_sig = 0;
        unsigned char argc = 1;
 
        snprintf(user_agent, sizeof(user_agent), "%s (%s)", argv[0], AUC_VERSION);
@@ -858,9 +776,6 @@ int main(int args, char *argv[]) {
                if (!strncmp(argv[argc], "-c", 3))
                        check_only = 1;
 
-               if (!strncmp(argv[argc], "-F", 3))
-                       ignore_sig = 1;
-
                argc++;
        };
 
@@ -878,17 +793,19 @@ int main(int args, char *argv[]) {
                goto freeconfig;
        }
 
-       rc = init_ustream_ssl();
-       if (rc == -2) {
-               fprintf(stderr, "No CA certificates loaded, please install ca-certificates\n");
-               rc=-1;
-               goto freessl;
-       }
+       if (!strncmp(serverurl, "https", 5)) {
+               rc = init_ustream_ssl();
+               if (rc == -2) {
+                       fprintf(stderr, "No CA certificates loaded, please install ca-certificates\n");
+                       rc=-1;
+                       goto freessl;
+               }
 
-       if (rc || !ssl_ctx) {
-               fprintf(stderr, "SSL support not available, please install ustream-ssl\n");
-               rc=-1;
-               goto freessl;
+               if (rc || !ssl_ctx) {
+                       fprintf(stderr, "SSL support not available, please install ustream-ssl\n");
+                       rc=-1;
+                       goto freessl;
+               }
        }
 
        blobmsg_buf_init(&checkbuf);
@@ -923,8 +840,8 @@ int main(int args, char *argv[]) {
 
        blobmsg_add_u32(&checkbuf, "upgrade_packages", upgrade_packages);
 
-       fprintf(stdout, "running %s %s on %s/%s (%s)\n", distribution,
-               version, target, subtarget, board_name);
+       fprintf(stdout, "running %s %s on %s (%s)\n", distribution,
+               version, target, board_name);
 
        fprintf(stdout, "checking %s for release upgrade%s\n", serverurl,
                upgrade_packages?" or updated packages":"");
@@ -986,7 +903,6 @@ int main(int args, char *argv[]) {
 
        blobmsg_add_string(&reqbuf, "distro", distribution);
        blobmsg_add_string(&reqbuf, "target", target);
-       blobmsg_add_string(&reqbuf, "subtarget", subtarget);
        blobmsg_add_string(&reqbuf, "board", board_name);
 
        blob_buf_init(&allpkg, 0);
@@ -1038,7 +954,17 @@ int main(int args, char *argv[]) {
                goto freeboard;
        }
 
-       strncpy(url, blobmsg_get_string(tb[IMAGE_SYSUPGRADE]), sizeof(url));
+       if (!tb[IMAGE_FILES]) {
+               if (!rc) {
+                       fprintf(stderr, "no path to image files returned\n");
+                       rc=-1;
+               }
+               goto freeboard;
+       }
+
+       snprintf(url, sizeof(url), "%s/%s/%s", serverurl,
+                blobmsg_get_string(tb[IMAGE_FILES]),
+                blobmsg_get_string(tb[IMAGE_SYSUPGRADE]));
 
        server_request(url, NULL, NULL);
 
@@ -1057,73 +983,6 @@ int main(int args, char *argv[]) {
                goto freeboard;
        }
 
-       tmp=strrchr(url, '/');
-
-       strcpy(tmp, "/sha256sums");
-       server_request(url, NULL, NULL);
-
-       if (stat("sha256sums", &imgstat)) {
-               fprintf(stderr, "sha256sums download failed\n");
-               rc=-1;
-               goto freeboard;
-       }
-
-       if ((intmax_t)imgstat.st_size != out_len) {
-               fprintf(stderr, "sha256sums download incomplete\n");
-               unlink("sha256sums");
-               rc=-1;
-               goto freeboard;
-       }
-
-       if (out_len < 68) {
-               fprintf(stderr, "sha256sums size mismatch\n");
-               unlink("sha256sums");
-               rc=-1;
-               goto freeboard;
-       }
-
-       if (sha256sum_v("sha256sums", filename)) {
-               fprintf(stderr, "checksum verification failed\n");
-               unlink(filename);
-               unlink("sha256sums");
-               rc=-1;
-               goto freeboard;
-       }
-
-       strcpy(tmp, "/sha256sums.sig");
-       server_request(url, NULL, NULL);
-
-       if (stat("sha256sums.sig", &imgstat)) {
-               fprintf(stderr, "sha256sums.sig download failed\n");
-               rc=-1;
-               goto freeboard;
-       }
-
-       if ((intmax_t)imgstat.st_size != out_len) {
-               fprintf(stderr, "sha256sums.sig download incomplete\n");
-               unlink("sha256sums.sig");
-               rc=-1;
-               goto freeboard;
-       }
-
-       if (out_len < 16) {
-               fprintf(stderr, "sha256sums.sig size mismatch\n");
-               unlink("sha256sums.sig");
-               rc=-1;
-               goto freeboard;
-       }
-
-       if (usign_v("sha256sums")) {
-               fprintf(stderr, "signature verification failed\n");
-               if (!ignore_sig) {
-                       unlink(filename);
-                       unlink("sha256sums");
-                       unlink("sha256sums.sig");
-                       rc=-1;
-                       goto freeboard;
-               }
-       };
-
        if (strcmp(filename, "firmware.bin")) {
                if (rename(filename, "firmware.bin")) {
                        fprintf(stderr, "can't rename to firmware.bin\n");
@@ -1134,20 +993,20 @@ int main(int args, char *argv[]) {
        }
 
        valid = 0;
-       ubus_invoke(ctx, id, "upgrade_test", NULL, upgtest_cb, &valid, 3000);
+       ubus_invoke(ctx, id, "upgrade_test", NULL, upgtest_cb, &valid, 15000);
        if (!valid) {
                rc=-1;
                goto freeboard;
        }
 
+       fprintf(stderr, "invoking sysupgrade\n");
+
        blobmsg_add_u8(&upgbuf, "keep", 1);
-       fprintf(stdout, "invoking sysupgrade\n");
-       ubus_invoke(ctx, id, "upgrade_start", upgbuf.head, NULL, NULL, 3000);
+       ubus_invoke(ctx, id, "upgrade_start", upgbuf.head, NULL, NULL, 120000);
 
 freeboard:
        free(board_name);
        free(target);
-       /* subtarget is a pointer within target, don't free */
        free(distribution);
        free(version);
 
index 571290e8996a32028a94fb41e01f48fe272dc602..06c51382d1ca34346fc62629f687deb71dfeaf18 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bash
 PKG_VERSION:=5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/bash
diff --git a/utils/bash/patches/101-bash50-001.patch b/utils/bash/patches/101-bash50-001.patch
new file mode 100644 (file)
index 0000000..09e0fcb
--- /dev/null
@@ -0,0 +1,166 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release:  5.0
+Patch-ID:      bash50-001
+
+Bug-Reported-by:       axel@freakout.de
+Bug-Reference-ID:      <201901082050.x08KoShS006731@bongo.freakout.de>
+Bug-Reference-URL:     http://lists.gnu.org/archive/html/bug-bash/2019-01/msg00079.html
+
+Bug-Description:
+
+Under certain circumstances, the glob expansion code did not remove
+backslashes escaping characters in directory names (or portions of a
+pattern preceding a slash).
+
+Patch (apply with `patch -p0'):
+
+*** a/bashline.c       2018-11-27 13:20:16.000000000 -0500
+--- b/bashline.c       2019-01-16 16:06:03.000000000 -0500
+***************
+*** 232,235 ****
+--- 232,236 ----
+  static int bash_possible_command_completions __P((int, int));
+  
++ static int completion_glob_pattern __P((char *));
+  static char *glob_complete_word __P((const char *, int));
+  static int bash_glob_completion_internal __P((int));
+***************
+*** 1742,1746 ****
+    /* This could be a globbing pattern, so try to expand it using pathname
+       expansion. */
+!   if (!matches && glob_pattern_p (text))
+      {
+        matches = rl_completion_matches (text, glob_complete_word);
+--- 1743,1747 ----
+    /* This could be a globbing pattern, so try to expand it using pathname
+       expansion. */
+!   if (!matches && completion_glob_pattern ((char *)text))
+      {
+        matches = rl_completion_matches (text, glob_complete_word);
+***************
+*** 1851,1855 ****
+       }
+  
+!       globpat = glob_pattern_p (hint_text);
+  
+        /* If this is an absolute program name, do not check it against
+--- 1852,1856 ----
+       }
+  
+!       globpat = completion_glob_pattern ((char *)hint_text);
+  
+        /* If this is an absolute program name, do not check it against
+***************
+*** 3714,3717 ****
+--- 3715,3773 ----
+  }
+  
++ static int
++ completion_glob_pattern (string)
++      char *string;
++ {
++   register int c;
++   char *send;
++   int open;
++ 
++   DECLARE_MBSTATE;
++ 
++   open = 0;
++   send = string + strlen (string);
++ 
++   while (c = *string++)
++     {
++       switch (c)
++      {
++      case '?':
++      case '*':
++        return (1);
++ 
++      case '[':
++        open++;
++        continue;
++ 
++      case ']':
++        if (open)
++          return (1);
++        continue;
++ 
++      case '+':
++      case '@':
++      case '!':
++        if (*string == '(')   /*)*/
++          return (1);
++        continue;
++ 
++      case '\\':
++        if (*string == 0)
++          return (0);           
++      }
++ 
++       /* Advance one fewer byte than an entire multibyte character to
++       account for the auto-increment in the loop above. */
++ #ifdef HANDLE_MULTIBYTE
++       string--;
++       ADVANCE_CHAR_P (string, send - string);
++       string++;
++ #else
++       ADVANCE_CHAR_P (string, send - string);
++ #endif
++     }
++   return (0);
++ }
++ 
+  static char *globtext;
+  static char *globorig;
+***************
+*** 3878,3882 ****
+      }      
+  
+!   if (t && glob_pattern_p (t) == 0)
+      rl_explicit_arg = 1;     /* XXX - force glob_complete_word to append `*' */
+    FREE (t);
+--- 3934,3938 ----
+      }      
+  
+!   if (t && completion_glob_pattern (t) == 0)
+      rl_explicit_arg = 1;     /* XXX - force glob_complete_word to append `*' */
+    FREE (t);
+*** a/lib/glob/glob_loop.c     2018-12-31 13:35:15.000000000 -0500
+--- b/lib/glob/glob_loop.c     2019-01-09 09:44:36.000000000 -0500
+***************
+*** 55,59 ****
+  
+        case L('\\'):
+- #if 0
+       /* Don't let the pattern end in a backslash (GMATCH returns no match
+          if the pattern ends in a backslash anyway), but otherwise return 1,
+--- 55,58 ----
+***************
+*** 61,69 ****
+          and it can be removed. */
+       return (*p != L('\0'));
+- #else
+-      /* The pattern may not end with a backslash. */
+-      if (*p++ == L('\0'))
+-        return 0;
+- #endif
+        }
+  
+--- 60,63 ----
+*** a/patchlevel.h     2016-06-22 14:51:03.000000000 -0400
+--- b/patchlevel.h     2016-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 0
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 1
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bash/patches/102-bash50-002.patch b/utils/bash/patches/102-bash50-002.patch
new file mode 100644 (file)
index 0000000..6ead763
--- /dev/null
@@ -0,0 +1,113 @@
+                            BASH PATCH REPORT
+                            =================
+
+Bash-Release:  5.0
+Patch-ID:      bash50-002
+
+Bug-Reported-by:       Ante Peric <synthmeat@gmail.com>
+Bug-Reference-ID:      <B7E3B567-2467-4F7B-B6B9-CA4E75A9C93F@gmail.com>
+Bug-Reference-URL:     http://lists.gnu.org/archive/html/bug-bash/2019-01/msg00095.html
+
+Bug-Description:
+
+When an alias value ends with an unquoted literal tab (not part of a quoted
+string or comment), alias expansion cannot correctly detect the end of the
+alias value after expanding it.
+
+Patch (apply with `patch -p0'):
+
+*** a/parser.h 2018-12-28 19:11:18.000000000 -0500
+--- b/parser.h 2019-01-11 15:13:03.000000000 -0500
+***************
+*** 48,51 ****
+--- 48,52 ----
+  #define PST_REDIRLIST        0x080000        /* parsing a list of redirections preceding a simple command name */
+  #define PST_COMMENT  0x100000        /* parsing a shell comment; used by aliases */
++ #define PST_ENDALIAS 0x200000        /* just finished expanding and consuming an alias */
+  
+  /* Definition of the delimiter stack.  Needed by parse.y and bashhist.c. */
+*** a/parse.y  2019-01-02 13:57:34.000000000 -0500
+--- b/parse.y  2019-01-14 08:23:31.000000000 -0500
+***************
+*** 2558,2567 ****
+        pushed_string_list->flags != PSH_DPAREN &&
+        (parser_state & PST_COMMENT) == 0 &&
+        shell_input_line_index > 0 &&
+!       shell_input_line[shell_input_line_index-1] != ' ' &&
+        shell_input_line[shell_input_line_index-1] != '\n' &&
+        shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+        (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+      {
+        return ' ';    /* END_ALIAS */
+      }
+--- 2558,2569 ----
+        pushed_string_list->flags != PSH_DPAREN &&
+        (parser_state & PST_COMMENT) == 0 &&
++       (parser_state & PST_ENDALIAS) == 0 &&  /* only once */
+        shell_input_line_index > 0 &&
+!       shellblank (shell_input_line[shell_input_line_index-1]) == 0 &&
+        shell_input_line[shell_input_line_index-1] != '\n' &&
+        shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+        (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+      {
++       parser_state |= PST_ENDALIAS;
+        return ' ';    /* END_ALIAS */
+      }
+***************
+*** 2572,2575 ****
+--- 2574,2578 ----
+    if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE)
+      {
++       parser_state &= ~PST_ENDALIAS;
+        pop_string ();
+        uc = shell_input_line[shell_input_line_index];
+*** a/y.tab.c  2019-01-02 13:57:43.000000000 -0500
+--- b/y.tab.c  2019-01-14 08:39:23.000000000 -0500
+***************
+*** 4874,4883 ****
+        pushed_string_list->flags != PSH_DPAREN &&
+        (parser_state & PST_COMMENT) == 0 &&
+        shell_input_line_index > 0 &&
+!       shell_input_line[shell_input_line_index-1] != ' ' &&
+        shell_input_line[shell_input_line_index-1] != '\n' &&
+        shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+        (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+      {
+        return ' ';    /* END_ALIAS */
+      }
+--- 4874,4885 ----
+        pushed_string_list->flags != PSH_DPAREN &&
+        (parser_state & PST_COMMENT) == 0 &&
++       (parser_state & PST_ENDALIAS) == 0 &&  /* only once */
+        shell_input_line_index > 0 &&
+!       shellblank (shell_input_line[shell_input_line_index-1]) == 0 &&
+        shell_input_line[shell_input_line_index-1] != '\n' &&
+        shellmeta (shell_input_line[shell_input_line_index-1]) == 0 &&
+        (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"'))
+      {
++       parser_state |= PST_ENDALIAS;
+        return ' ';    /* END_ALIAS */
+      }
+***************
+*** 4888,4891 ****
+--- 4890,4894 ----
+    if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE)
+      {
++       parser_state &= ~PST_ENDALIAS;
+        pop_string ();
+        uc = shell_input_line[shell_input_line_index];
+*** a/patchlevel.h     2016-06-22 14:51:03.000000000 -0400
+--- b/patchlevel.h     2016-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 1
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 2
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/utils/bigclown/bigclown-control-tool/Makefile b/utils/bigclown/bigclown-control-tool/Makefile
new file mode 100644 (file)
index 0000000..e9ec484
--- /dev/null
@@ -0,0 +1,36 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-control-tool
+PKG_VERSION:=0.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-control-tool/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=c79a76e0940958e4ddcf51e57fadfb127f568b6c1ceb02033c3630bab2dee612
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-control-tool-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  URL:=https://github.com/bigclownlabs/bch-control-tool
+  TITLE:=BigCLown control tool
+  DEPENDS:=+python3-click-log +python3-paho-mqtt +python3-pyserial +python3-yaml +python3-simplejson
+endef
+
+define Build/Compile
+       sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+       $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/utils/bigclown/bigclown-gateway/Makefile b/utils/bigclown/bigclown-gateway/Makefile
new file mode 100644 (file)
index 0000000..55ddefb
--- /dev/null
@@ -0,0 +1,59 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-gateway
+PKG_VERSION:=1.16.2
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-gateway/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=9d3208bf4cffec507d992485104fcbba2b9bc02cf7b290dfe13f98e5916ee1ca
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-gateway-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  URL:=https://github.com/bigclownlabs/bch-gateway
+  TITLE:=BigCLown gateway
+  DEPENDS:= \
+    +kmod-usb-serial-ftdi \
+    +kmod-usb-acm \
+    +python3-click-log \
+    +python3-paho-mqtt \
+    +python3-pyserial \
+    +python3-yaml \
+    +python3-simplejson \
+    +python3-schema \
+    +python3-appdirs
+endef
+
+define Py3Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/config $(1)/etc/config/bigclown-gateway
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-gateway
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/config/bigclown-gateway
+endef
+
+define Build/Compile
+       sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+       $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/utils/bigclown/bigclown-gateway/files/config b/utils/bigclown/bigclown-gateway/files/config
new file mode 100644 (file)
index 0000000..6a60ae4
--- /dev/null
@@ -0,0 +1,10 @@
+
+config gateway 'gateway'
+       option enabled '0'
+       option name 'usb-dongle'
+       option device '/dev/ttyUSB0'
+       option automatic_rename_kit_nodes '1'
+
+config mqtt 'mqtt'
+       option host 'localhost'
+       option port '1883'
diff --git a/utils/bigclown/bigclown-gateway/files/init b/utils/bigclown/bigclown-gateway/files/init
new file mode 100755 (executable)
index 0000000..37ddd0d
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh /etc/rc.common
+
+START=98
+STOP=1
+
+USE_PROCD=1
+
+PROG=/usr/bin/bcg
+CONF=/tmp/etc/bigclown-gateway.conf
+
+append() {
+       local cfg="$1"
+       local uci_name="$2"
+       local out_name="$3"
+       local default="$4"
+       config_get val $cfg $uci_name $default
+       if [ -n "$val" ]; then
+         echo "$out_name $val" >> $CONF
+       fi
+}
+
+start_service() {
+       config_load bigclown-gateway
+
+       local enabled
+       config_get_bool enabled gateway enabled "0"
+       [ "$enabled" = "1" ] || {
+               echo "Bigclown gateway service disabled"
+               exit 1
+       }
+
+       rm -rf $CONF
+       echo "Generating bigclown-gateway config file in $CONF"
+
+       append gateway name 'name:' usb-dongle
+       # TODO add hotplug script and use different default here
+       append gateway device 'device:' /dev/ttyUSB0
+       append gateway automatic_rename_kit_nodes 'automatic_rename_kit_nodes:' 1
+       append gateway base_topic_prefix 'base_topic_prefix:'
+
+       echo "mqtt:" >> $CONF
+       append mqtt host '  host:' localhost
+       append mqtt port '  port:' 1883
+       append mqtt cafile '  cafile:'
+       append mqtt certfile '  certfile:'
+       append mqtt keyfile '  keyfile:'
+
+       procd_open_instance
+       procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+       procd_set_param command "$PROG" -c "$CONF"
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
+}
+
+service_triggers() {
+       procd_add_reload_trigger 'bigclown-gateway'
+}
diff --git a/utils/bigclown/bigclown-mqtt2influxdb/Makefile b/utils/bigclown/bigclown-mqtt2influxdb/Makefile
new file mode 100644 (file)
index 0000000..14a462f
--- /dev/null
@@ -0,0 +1,49 @@
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bigclown-mqtt2influxdb
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=https://codeload.github.com/bigclownlabs/bch-mqtt2influxdb/tar.gz/v$(PKG_VERSION)?
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=5be14132311e85215abbfd732fe6cd652522ea0a343ee8ba7abab3ec7578eb99
+PKG_LICENSE:=MIT
+PKG_MAINTAINER:=Karel Kočí <cynerd@email.cz>
+PKG_BUILD_DIR:=$(BUILD_DIR)/bch-mqtt2influxdb-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../../../lang/python/python3-package.mk
+
+define Package/$(PKG_NAME)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=BigClown
+  URL:=https://github.com/bigclownlabs/bch-mqtt2influxdb
+  TITLE:=BigCLown MQTT to Influxdb bridge
+  DEPENDS:=+python3-paho-mqtt +python3-yaml +python3-influxdb +python3-jsonpath-ng +python3-schema
+endef
+
+define Py3Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/init $(1)/etc/init.d/bigclown-mqtt2influxdb
+       $(INSTALL_DATA) ./files/config.yml $(1)/etc/bigclown-mqtt2influxdb.yml
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/bigclown-mqtt2influxdb.yml
+endef
+
+define Build/Compile
+       sed -i 's/@@VERSION@@/$(PKG_VERSION)/' "$(PKG_BUILD_DIR)/setup.py"
+       $(call Py3Build/Compile/Default)
+endef
+
+$(eval $(call Py3Package,$(PKG_NAME)))
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/utils/bigclown/bigclown-mqtt2influxdb/files/config.yml b/utils/bigclown/bigclown-mqtt2influxdb/files/config.yml
new file mode 100644 (file)
index 0000000..350c85a
--- /dev/null
@@ -0,0 +1,67 @@
+## Example bigclown-mqtt2influxdb configuration
+
+# MQTT configuration
+mqtt:
+  #host: 127.0.0.1
+  #port: 1883
+
+# InfluxDB configuration
+influxdb:
+  #host: 127.0.0.1
+  #port: 8086
+  #database: node
+
+# This is default configuration used to mirror all values produced by default
+# BigClown modules firmware. You might want to add your topics or drop those for
+# modules you don't own.
+points:
+  - measurement: temperature
+    topic: node/+/thermometer/+/temperature
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+      channel: $.topic[3]
+
+  - measurement: relative-humidity
+    topic: node/+/hygrometer/0:4/relative-humidity
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: illuminance
+    topic: node/+/lux-meter/0:0/illuminance
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: pressure
+    topic: node/+/barometer/0:0/pressure
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: co2
+    topic: node/+/co2-meter/-/concentration
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: voltage
+    topic: node/+/battery/+/voltage
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+
+  - measurement: button
+    topic: node/+/push-button/+/event-count
+    fields:
+      value: $.payload
+    tags:
+      id: $.topic[1]
+      channel: $.topic[3]
diff --git a/utils/bigclown/bigclown-mqtt2influxdb/files/init b/utils/bigclown/bigclown-mqtt2influxdb/files/init
new file mode 100644 (file)
index 0000000..55a3e66
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+STOP=1
+
+USE_PROCD=1
+
+PROG=/usr/bin/mqtt2influxdb
+CONF=/etc/bigclown-mqtt2influxdb.yml
+
+start_service() {
+       procd_open_instance
+       procd_set_param respawn 3600 5 5
+       procd_set_param command "$PROG" -c "$CONF"
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_close_instance
+}
+
+stop_service() {
+       service_stop "$PROG"
+}
index 953701e6d1892985d706b3d2a394a0c99bf7f30a..2c0a3dfc11a454f171344860f1508f4e802f1dc3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bluez
 PKG_VERSION:=5.50
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
@@ -118,32 +118,32 @@ endef
 
 define Package/bluez-utils/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_BUILD_DIR)/tools/bdaddr $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
-       $(CP) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/bdaddr $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btattach $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpris-proxy $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/
 endef
 
 define Package/bluez-daemon/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bluetooth.conf $(1)/etc/dbus-1/system.d/bluetooth.conf
        $(INSTALL_DIR) $(1)/etc/bluetooth
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
index 3a1d58cb63e136dda220671dbad0c56de3c84cdb..632d348eb4b53eb15862a0fa930040366e29d728 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bonnie++
-PKG_VERSION:=1.97.3
-PKG_RELEASE:=2
+PKG_VERSION:=1.98
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://www.coker.com.au/bonnie++/
-PKG_HASH:=e27b386ae0dc054fa7b530aab6bdead7aea6337a864d1f982bc9ebacb320746e
+PKG_HASH:=6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04
 
 PKG_MAINTAINER:=Florian Fainelli <florian@openwrt.org>
 PKG_LICENSE:=GPL-2.0
@@ -39,19 +39,10 @@ define Package/bonniexx/description
 endef
 
 ifeq ($(CONFIG_USE_UCLIBCXX),y)
-TARGET_LDFLAGS +=-nodefaultlibs
+TARGET_LDFLAGS += -nodefaultlibs
 endif
 
-TARGET_CXXFLAGS +=-fno-rtti
-
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               TARGET_CXX="$(TARGET_CXX)" \
-               TARGET_LINK="$(TARGET_CXX)" \
-               MORECFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS)" \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all
-endef
+TARGET_CXXFLAGS += -fno-rtti -flto
 
 define Package/bonniexx/install
        $(INSTALL_DIR) $(1)/usr/bin
diff --git a/utils/bonnie++/patches/001-cross_compile_fix.patch b/utils/bonnie++/patches/001-cross_compile_fix.patch
deleted file mode 100644 (file)
index e3ff56b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-Index: bonnie++-1.97.3/configure
-===================================================================
---- bonnie++-1.97.3.orig/configure
-+++ bonnie++-1.97.3/configure
-@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj
- if test "$cross_compiling" = yes; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5 ; }
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} }
- else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
-Index: bonnie++-1.97.3/Makefile
-===================================================================
---- bonnie++-1.97.3.orig/Makefile
-+++ bonnie++-1.97.3/Makefile
-@@ -1,5 +1,7 @@
- EXES=bonnie++ zcav getc_putc getc_putc_helper
- EXE=bon_csv2html generate_randfile
-+TARGET_CXX=g++
-+TARGET_LINK=g++
- all: $(EXE) $(EXES)
-@@ -10,8 +12,8 @@ eprefix=${prefix}
- #MORE_WARNINGS=-Weffc++
- WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
- CFLAGS=-O2  -DNDEBUG $(WFLAGS) $(MORECFLAGS)
--CXX=g++ $(CFLAGS)
--LINK=g++
-+CXX=$(TARGET_CXX) $(CFLAGS)
-+LINK=$(TARGET_LINK)
- THREAD_LFLAGS=-lpthread
- INSTALL=/usr/bin/install -c
index ccec8e8f10d8b93d3ed92178995b53758b68df77..521ca9c54c1ed275fd592a6e51eac4a73850c2a5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/bon_file.cpp
 +++ b/bon_file.cpp
-@@ -464,25 +464,37 @@ int COpenTest::delete_sequential(BonTime
+@@ -469,25 +469,37 @@ int COpenTest::delete_sequential(BonTime
      }
      if(m_number_directories != 1)
      {
diff --git a/utils/bonnie++/patches/010-openwrt-fixes.patch b/utils/bonnie++/patches/010-openwrt-fixes.patch
new file mode 100644 (file)
index 0000000..a26b64a
--- /dev/null
@@ -0,0 +1,81 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,12 +7,6 @@ SCRIPTS=bon_csv2txt
+ prefix=@prefix@
+ eprefix=@exec_prefix@
+-#MORE_WARNINGS=-Weffc++
+-WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
+-CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
+-CXX=@CXX@ $(CFLAGS)
+-LINK=@CXX@
+-THREAD_LFLAGS=@thread_ldflags@
+ INSTALL=@INSTALL@
+ INSTALL_PROGRAM=@INSTALL_PROGRAM@
+@@ -34,22 +28,22 @@ GETCHSRC=getc_putc_helper.cpp duration.cpp
+ GETCHOBJS=$(GETCHSRC:.cpp=.o)
+ bonnie++: $(BONOBJS)
+-      $(LINK) -o bonnie++ $(BONOBJS) $(THREAD_LFLAGS)
++      $(CXX) $(CXXFLAGS) -o bonnie++ $(BONOBJS)
+ zcav: $(ZCAVOBJS)
+-      $(LINK) -o zcav $(ZCAVOBJS) $(THREAD_LFLAGS)
++      $(CXX) $(CXXFLAGS) -o zcav $(ZCAVOBJS)
+ getc_putc: $(GETCOBJS) getc_putc_helper
+-      $(LINK) -o getc_putc $(GETCOBJS) $(THREAD_LFLAGS)
++      $(CXX) $(CXXFLAGS) -o getc_putc $(GETCOBJS)
+ getc_putc_helper: $(GETCHOBJS)
+-      $(CXX) -o getc_putc_helper $(GETCHOBJS)
++      $(CXX) $(CXXFLAGS) -o getc_putc_helper $(GETCHOBJS)
+ bon_csv2html: bon_csv2html.o
+-      $(LINK) bon_csv2html.o -o bon_csv2html
++      $(CXX) $(CXXFLAGS) bon_csv2html.o -o bon_csv2html
+ generate_randfile: generate_randfile.o
+-      $(LINK) generate_randfile.o -o generate_randfile
++      $(CXX) $(CXXFLAGS) generate_randfile.o -o generate_randfile
+ install-bin: $(EXE) $(EXES)
+       mkdir -p $(eprefix)/bin $(eprefix)/sbin
+@@ -63,7 +57,7 @@ install: install-bin
+       @INSTALL_DATA@ $(MAN8) @mandir@/man8
+ %.o: %.cpp
+-      $(CXX) -c $<
++      $(CXX) $(CXXFLAGS) -c $<
+ clean:
+       rm -f $(EXE) $(EXES) *.o build-stamp install-stamp
+--- a/configure.in
++++ b/configure.in
+@@ -31,7 +31,6 @@ fi
+ dnl Checks for programs.
+ AC_LANG_CPLUSPLUS
+-AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_CXXCPP
+ AC_PROG_INSTALL
+@@ -66,7 +65,7 @@ AC_SUBST(linux_pthread)
+ AC_TRY_COMPILE([#define _GNU_SOURCE
+ #include <pthread.h>
+ ] , [pthread_mutexattr_t attr;
+-    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
++    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);]
+   , linux_pthread="yes")
+ if [[ -n "$linux_pthread" ]]; then
+    linux_pthread="#define LINUX_PTHREAD"
+@@ -83,7 +82,7 @@ void * thread_func(void * param) { return NULL; }
+   , thread_ldflags="-pthread")
+ AC_SUBST(large_file)
+-AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
++AC_TRY_COMPILE([#ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #include <stdio.h>
diff --git a/utils/bonnie++/patches/010-uclibcxx.patch b/utils/bonnie++/patches/010-uclibcxx.patch
deleted file mode 100644 (file)
index e05b89d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/configure.in
-+++ b/configure.in
-@@ -31,7 +31,6 @@ fi
- dnl Checks for programs.
- AC_LANG_CPLUSPLUS
--AC_PROG_CC
- AC_PROG_CXX
- AC_PROG_CXXCPP
- AC_PROG_INSTALL
-@@ -60,13 +59,13 @@ if [[ -n "$snprintf" ]]; then
-    snprintf="#define NO_SNPRINTF"
- fi
--AC_CHECK_HEADERS(algorithm algo.h algo)
-+AC_CHECK_HEADERS(algorithm)
- AC_SUBST(linux_pthread)
- AC_TRY_COMPILE([#define _GNU_SOURCE
- #include <pthread.h>
- ] , [pthread_mutexattr_t attr;
--    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
-+    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);]
-   , linux_pthread="yes")
- if [[ -n "$linux_pthread" ]]; then
-    linux_pthread="#define LINUX_PTHREAD"
-@@ -83,7 +82,7 @@ void * thread_func(void * param) { return NULL; }
-   , thread_ldflags="-pthread")
- AC_SUBST(large_file)
--AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
-+AC_TRY_COMPILE([#ifndef _LARGEFILE64_SOURCE
- #define _LARGEFILE64_SOURCE
- #endif
- #include <stdio.h>
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 25a24fd96509673f60990a731ad7f678bc4b74de..6da2bff6e141757bfce77bfced1fccca7173c3a7 100644 (file)
@@ -6,15 +6,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=btrfs-progs
-PKG_VERSION:=4.20.1
-PKG_RELEASE:=1
+PKG_VERSION:=4.20.2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
-PKG_HASH:=562f5d1ff1d17867c4c2be2768c653b62f1f257c42f9bb3e1a36380c02ec4fcd
+PKG_HASH:=890f8b7e162f2bbfaa5c7b23e8b6f791fd3f325239a0510871fa4b45e4a80e7c
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
 
-PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
+PKG_MAINTAINER:=Karel Kočí <karel.koci@nic.cz>
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
@@ -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,34 +40,37 @@ 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 fsck.btrfs mkfs.btrfs
+       btrfs-select-super btrfstune mkfs.btrfs
+
+TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
+
+EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
 
 CONFIGURE_ARGS += \
        --disable-backtrace \
        --disable-convert \
        --disable-documentation \
-       --disable-python \
-       --disable-zstd
-
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -flto
-
-EXTRA_CFLAGS=$(TARGET_CPPFLAGS)
+       --disable-python
+ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
+CONFIGURE_ARGS += --disable-zstd
+endif
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/include/* \
-               $(1)/usr/include/
-       $(CP) \
-               $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.{a,so*} \
-               $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs* $(1)/usr/lib/
 endef
 
 define Package/btrfs-progs/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbtrfsutil.so* $(1)/usr/lib
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/
        $(LN) btrfs $(1)/usr/bin/btrfsck
index 9ef88d05fa727bcacef245c0aa2714c0d60d2bb6..c6d2e992e6aee95d6d0148d00002fe76238d4313 100644 (file)
@@ -8,64 +8,42 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cryptsetup
-PKG_VERSION:=2.0.6
+PKG_VERSION:=2.1.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.0
-PKG_HASH:=7c51fae0f0e7ea9af0f515b2ac77009fb2969a6619ebab47d097dca38b083d30
+PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.1
+PKG_HASH:=a3eeb2741f8f3376d16585191f3c60e067dd987e096c3c4b073fab7748b1c897
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPL-2.0+ LGPL-2.1+
 PKG_LICENSE_FILES:=COPYING COPYING.LGPL
-PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 
-TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
-
-define Package/cryptsetup/Default
+define Package/cryptsetup
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Encryption
   TITLE:=Cryptsetup
-  DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +libjson-c +@KERNEL_DIRECT_IO
+  DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +libjson-c +@KERNEL_DIRECT_IO +kmod-crypto-user
   URL:=https://gitlab.com/cryptsetup/cryptsetup/
 endef
 
-define Package/cryptsetup
-$(call Package/cryptsetup/Default)
-  DEPENDS+=+libgcrypt
-  VARIANT:=gcrypt
-endef
-
-define Package/cryptsetup-openssl
-$(call Package/cryptsetup/Default)
-  TITLE+= (with openssl support)
-  DEPENDS+=+libopenssl
-  VARIANT:=openssl
-endef
-
-define Package/cryptsetup/Default/description
-       Cryptsetup-luks
-endef
-
 define Package/cryptsetup/description
-$(call Package/cryptsetup/Default/description)
-linked against libgcrypt
+  Cryptsetup is utility used to conveniently setup disk encryption based on DMCrypt kernel module.
 endef
 
-
-define Package/cryptsetup-openssl/description
-$(call Package/cryptsetup/Default/description)
-linked against openssl
-endef
-
-ifeq ($(BUILD_VARIANT),openssl)
-CONFIGURE_ARGS+= \
-        --with-crypto_backend=openssl
-endif
+CONFIGURE_ARGS += \
+       --disable-cryptsetup-reencrypt \
+       --disable-integritysetup \
+       --disable-selinux \
+       --disable-rpath \
+       --disable-veritysetup \
+       --disable-udev \
+       --with-default-luks-format=LUKS2 \
+       --with-crypto_backend=kernel
 
 define Package/cryptsetup/install
        $(INSTALL_DIR) $(1)/usr/sbin
@@ -74,7 +52,4 @@ define Package/cryptsetup/install
        $(CP) $(PKG_BUILD_DIR)/.libs/libcryptsetup.so* $(1)/usr/lib
 endef
 
-Package/cryptsetup-openssl/install = $(Package/cryptsetup/install)
-
 $(eval $(call BuildPackage,cryptsetup))
-$(eval $(call BuildPackage,cryptsetup-openssl))
diff --git a/utils/fft-eval/Makefile b/utils/fft-eval/Makefile
new file mode 100644 (file)
index 0000000..d0de014
--- /dev/null
@@ -0,0 +1,39 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fft-eval
+PKG_VERSION:=2017-06-28
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_VERSION:=3cc175570379da172b0b2bcdbb8d2a42f83dad88
+PKG_SOURCE:=FFT_eval-$(PKG_SOURCE_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/simonwunderlich/FFT_eval/tar.gz/$(PKG_SOURCE_VERSION)?
+PKG_HASH:=9d70125fffc83918e6613d5938c4a9925aea07323e09470cf059cf0026e5937c
+PKG_BUILD_DIR:=$(BUILD_DIR)/FFT_eval-$(PKG_SOURCE_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+       SECTION:=utils
+       CATEGORY:=Utilities
+       MAINTAINER:=Nicolas Pace <nicopace@altermundi.net>
+       URL:=https://github.com/simonwunderlich/FFT_eval
+       TITLE:=Evaluates FFT samples from ath9k driver
+       DEPENDS:= +libc @PACKAGE_ATH_DEBUG @PACKAGE_ATH_SPECTRAL
+endef
+
+define Package/$(PKG_NAME)/description
+       Evaluates FFT samples from diferent wifi boards drivers
+endef
+
+TARGET_CFLAGS  += -ffunction-sections -fdata-sections -flto
+
+define Build/Compile
+       $(TARGET_CC) -D__NOSDL__ $(PKG_BUILD_DIR)/fft_eval.c -o $(PKG_BUILD_DIR)/fft_eval -lm
+endef
+
+define Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/fft_eval $(1)/usr/bin/fft_eval
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
index bd0cdc2548806247c5ce333fa87f38e27490f5c4..5d8bdf2b23fba76eeb3ffa7430b56ed67efd9a52 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fio
-PKG_VERSION:=3.12
-PKG_RELEASE:=1
+PKG_VERSION:=3.13
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=http://brick.kernel.dk/snaps
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=f73ec0a84834a058adcaf9964eb7e9a7af0a6e41a4e5eff781438c12b99b3b9d
+PKG_HASH:=a21d1e50c18eecbd5ee6f7c3c0a8c8605bbe31b91e07c387b2144b02ea3fb235
 
 PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
 
+PKG_BUILD_PARALLEL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/fio
@@ -38,6 +40,7 @@ define Package/fio/description
 endef
 
 TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+TARGET_LDFLAGS += -Wl,--gc-sections
 
 CONFIGURE_ARGS = \
        --disable-numa \
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 e50d108532fc07a1b73454c17d7da2a75469db15..51307c14654fee9ef0a0327923c766b8646acd32 100644 (file)
@@ -5,18 +5,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fish
-PKG_VERSION:=3.0.0
-PKG_RELEASE:=3
+PKG_VERSION:=3.0.2
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/fish-shell/fish-shell/tar.gz/$(PKG_VERSION)?
-PKG_HASH:=a16b0ff31111167ef4f3831ef428bb236bef592b7f49a2867bf42405ee95ff33
-PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>
+PKG_SOURCE_URL:=https://github.com/fish-shell/fish-shell/releases/download/$(PKG_VERSION)
+PKG_HASH:=14728ccc6b8e053d01526ebbd0822ca4eb0235e6487e832ec1d0d22f1395430e
+PKG_MAINTAINER:=Curtis Jiang <jqqqqqqqqqq@gmail.com>, Hao Dong <halbertdong@gmail.com>
 PKG_LICENSE:=GPL-2.0
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/fish-shell-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 
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 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 f47b001b152ed25b234cdef23ef864fef85aabec..87df54aa95278daa379838555efd99e7005524ce 100644 (file)
@@ -15,17 +15,19 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools
 PKG_HASH:=57b219efd183795bd545dd5a60d9eabbe9dcb6f8fb92bc7ba2122b87f98527d5
 
-PKG_BUILD_PARALLEL:=1
-PKG_BUILD_DEPENDS:=PACKAGE_python-smbus:python
-
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
 
+PKG_BUILD_PARALLEL:=1
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-i2c-tools-$(PKG_VERSION)
+
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python-package.mk
 include ../../lang/python/python3-package.mk
 
+PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xJf $(DL_DIR)/$(PKG_SOURCE)
+
 define Package/i2c/Default
   URL:=https://i2c.wiki.kernel.org/index.php/I2C_Tools
   TITLE:=I2C
@@ -36,6 +38,7 @@ define Package/libi2c
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE+=library for i2c-tools
+  VARIANT:=bin
 endef
 
 define Package/i2c-tools
@@ -44,6 +47,7 @@ define Package/i2c-tools
   CATEGORY:=Utilities
   TITLE+=tools for Linux
   DEPENDS:=+libi2c
+  VARIANT:=bin
 endef
 
 define Package/python-smbus
@@ -52,7 +56,8 @@ define Package/python-smbus
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Python bindings for the SMBUS
-  DEPENDS:=+libi2c +python-light
+  DEPENDS:=+PACKAGE_python-smbus:libi2c +PACKAGE_python-smbus:python-light
+  VARIANT:=python
 endef
 
 define Package/python3-smbus
@@ -61,7 +66,8 @@ define Package/python3-smbus
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Python bindings for the SMBUS
-  DEPENDS:=+libi2c +python3-light
+  DEPENDS:=+PACKAGE_python3-smbus:libi2c +PACKAGE_python3-smbus:python3-light
+  VARIANT:=python3
 endef
 
 define Package/libi2c/description
@@ -78,28 +84,10 @@ define Package/python-smbus/description
 endef
 
 define Package/python3-smbus/description
- This package contain the python bindings for Linux SMBus access through i2c-dev.
+ This package contain the Python3 bindings for Linux SMBus access through i2c-dev.
 endef
 
-TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include
-
-ifdef CONFIG_PACKAGE_python-smbus
-  define Build/Compile/python-smbus
-       $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
-       $(call Build/Compile/PyMod,./py-smbus/, \
-               install --prefix="$(PKG_INSTALL_DIR)/usr", \
-       )
-  endef
-endif
-
-ifdef CONFIG_PACKAGE_python3-smbus
-  define Build/Compile/python3-smbus
-       $(if $(Build/Compile/Py3Mod),,@echo Python3 packaging code not found.; false)
-       $(call Build/Compile/Py3Mod,./py-smbus/, \
-               install --prefix="$(PKG_INSTALL_DIR)/usr", \
-       )
-  endef
-endif
+ifeq ($(BUILD_VARIANT),bin)
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
@@ -108,10 +96,22 @@ define Build/Compile
                STAGING_DIR="$(STAGING_DIR)" \
                LDFLAGS="$(TARGET_LDFLAGS)" \
                CFLAGS="$(TARGET_CFLAGS)"
-       $(Build/Compile/python-smbus)
-       $(Build/Compile/python3-smbus)
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/include/i2c $(1)/usr/include/
+       $(CP) $(PKG_BUILD_DIR)/lib/libi2c.{a,so*} $(1)/usr/lib/
+endef
+
+endif # ifeq
+
+PYTHON_PKG_SETUP_ARGS:=
+PYTHON3_PKG_SETUP_ARGS:=
+
+PYTHON_PKG_SETUP_DIR:=py-smbus
+PYTHON3_PKG_SETUP_DIR:=py-smbus
+
 define Package/libi2c/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/
@@ -125,17 +125,9 @@ define Package/i2c-tools/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cget $(1)/usr/sbin/
 endef
 
-define PyPackage/python-smbus/filespec
-+|$(PYTHON_PKG_DIR)
-endef
-
-define PyPackage/python3-smbus/filespec
-+|$(PYTHON3_PKG_DIR)
-endef
-
 $(eval $(call BuildPackage,libi2c))
 $(eval $(call BuildPackage,i2c-tools))
 $(eval $(call PyPackage,python-smbus))
 $(eval $(call BuildPackage,python-smbus))
-$(eval $(call PyPackage,python3-smbus))
+$(eval $(call Py3Package,python3-smbus))
 $(eval $(call BuildPackage,python3-smbus))
index 053063e33c3798442dacfa1119c6de6d106f473a..d5ffdd0916c45d463310f3f5faf8200418f36703 100644 (file)
@@ -24,7 +24,7 @@ ifdef CONFIG_USE_MIPS16
   TARGET_CFLAGS += -fno-ipa-sra
 endif
 
-TARGET_CFLAGS += -std=c99
+TARGET_CFLAGS += -std=c99 -D_GNU_SOURCE
 
 CONFIGURE_ARGS+= \
        --disable-docs \
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"
 
index 6a987d1c07f3b6f7e0b8bdd67b63bbc85a81adf7..cd153d0b11181514a5172fb6532512a89801e430 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mariadb
-PKG_VERSION:=10.2.21
+PKG_VERSION:=10.2.22
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -18,7 +18,7 @@ PKG_SOURCE_URL := \
        https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
        https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
 
-PKG_HASH:=637f0808b65ec06902897a2f885a60377828d019d35802402dca541f8113536c
+PKG_HASH:=42f4c54c29b7c196bd105bbf4d2ea721f869b14cb7ba436c3566e6dd2760614c
 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
 PKG_LICENSE:=GPL-2.0 LGPL-2.1
 PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
@@ -171,11 +171,14 @@ include $(INCLUDE_DIR)/nls.mk
 
 MARIADB_COMMON_DEPENDS := \
        $(ICONV_DEPENDS) \
-       +libatomic \
        +libopenssl \
-       +libstdcpp \
        +zlib
 
+MARIADB_COMMON_DEPENDS_EXE := \
+       $(MARIADB_COMMON_DEPENDS) \
+       +libatomic \
+       +libstdcpp
+
 # Pass CPPFLAGS in the CFLAGS as otherwise the build system will
 # ignore them.
 TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
@@ -256,7 +259,7 @@ define Package/mariadb-client-base
   $(call Package/mariadb/Default)
   TITLE:=MariaDB database client base
   DEPENDS:=mariadb-common \
-         $(MARIADB_COMMON_DEPENDS) \
+         $(MARIADB_COMMON_DEPENDS_EXE) \
          +libedit
 endef
 
@@ -324,7 +327,7 @@ endef
 define Package/mariadb-server-base
   $(call Package/mariadb/Default)
   DEPENDS:=mariadb-common \
-         $(MARIADB_COMMON_DEPENDS) \
+         $(MARIADB_COMMON_DEPENDS_EXE) \
          +!arc:libaio \
          +liblzma \
          +libpcre \
index 829b98fb287242d0208fa7579351c528c91c3562..d428a7b7e65a874d99717ab179aa28626d982119 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/mysql_install_db.sh
 +++ b/scripts/mysql_install_db.sh
-@@ -388,7 +388,7 @@ fi
+@@ -399,7 +399,7 @@ fi
  
  
  # Try to determine the hostname
diff --git a/utils/mariadb/patches/200-openssl-deprecated.patch b/utils/mariadb/patches/200-openssl-deprecated.patch
deleted file mode 100644 (file)
index 2e49918..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/libmariadb/libmariadb/secure/openssl.c
-+++ b/libmariadb/libmariadb/secure/openssl.c
-@@ -419,8 +419,10 @@ void ma_tls_end()
-     if (mariadb_deinitialize_ssl)
-     {
- #ifndef HAVE_OPENSSL_1_1_API
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10000000L
-       ERR_remove_state(0);
-+#else
-+      ERR_remove_thread_state(NULL);
- #endif
-       EVP_cleanup();
-       CRYPTO_cleanup_all_ex_data();
index 00355a1a8170f6dff400c8fa7db95386ba29968d..51e28235bfa9024721e4bd8c41f77d8dbfc997e3 100644 (file)
@@ -8,13 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=moreutils
-PKG_VERSION:=0.62
+PKG_VERSION:=0.63
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://git.kitenet.net/index.cgi/moreutils.git/snapshot
-PKG_HASH:=812ac4e9e09dbfb812c64fb1929ed5275c279312d78e3fe1c30b01380c902db9
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
+PKG_HASH:=4fc86d56a8a276a0cec71cdabda5ccca50c7a44a2a1ccd888476741d1ce6831d
 
 PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
 PKG_LICENSE:=GPL-2.0
index a8f2b7b712129a8ebe5b20e29abafe15062702ed..181419b0900b6666bf69314eac856b13f8beee42 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nano
-PKG_VERSION:=3.2
+PKG_VERSION:=4.0
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/nano
-PKG_HASH:=d12773af3589994b2e4982c5792b07c6240da5b86c5aef2103ab13b401fe6349
+PKG_HASH:=1e2fcfea35784624a7d86785768b772d58bb3995d1aec9176a27a113b1e9bac3
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
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
diff --git a/utils/open-vm-tools/Makefile b/utils/open-vm-tools/Makefile
new file mode 100644 (file)
index 0000000..9f63758
--- /dev/null
@@ -0,0 +1,115 @@
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=open-vm-tools
+PKG_VERSION:=10.3.5
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-10430147.tar.gz
+PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
+PKG_HASH:=364cd0fdfa5a05e872d08609659e6231ec99788669f7ebba24bfb8c94168daef
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-10430147
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/open-vm-tools
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=@TARGET_x86 +glib2 +libpthread +libtirpc
+  TITLE:=open-vm-tools
+  URL:=https://github.com/vmware/open-vm-tools
+  MAINTAINER:=Yuhei OKAWA <tochiro.srchack@gmail.com>
+endef
+
+define Package/open-vm-tools-vm-tools/description
+       Open Virtual Machine Tools for VMware guest OS
+endef
+
+
+CONFIGURE_ARGS+= \
+       --without-icu \
+       --disable-multimon \
+       --disable-docs \
+       --disable-tests \
+       --without-gtkmm \
+       --without-gtkmm3 \
+       --without-xerces \
+       --without-pam \
+       --disable-grabbitmqproxy \
+       --disable-vgauth \
+       --disable-deploypkg \
+       --without-root-privileges \
+       --without-kernel-modules \
+       --without-dnet \
+       --with-tirpc \
+       --without-x \
+       --without-gtk2 \
+       --without-gtk3 \
+       --without-xerces \
+       --enable-resolutionkms=no
+
+
+define Package/open-vm-tools/install
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd
+
+       $(INSTALL_DIR) $(1)/etc/vmware-tools/
+       $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/
+       $(CP) $(PKG_INSTALL_DIR)/etc/vmware-tools $(1)/etc/
+
+       $(INSTALL_DIR) $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmtoolsd $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-checkvm $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-hgfsclient $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-namespace-cmd $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-rpctool $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-toolbox-cmd $(1)/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-xferlogs $(1)/bin/
+
+       $(INSTALL_DIR) $(1)/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mount.vmhgfs $(1)/sbin/
+       $(INSTALL_BIN) ./files/shutdown $(1)/sbin/
+
+       $(INSTALL_DIR) $(1)/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libguestlib.so* $(1)/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhgfs.so* $(1)/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvmtools.so* $(1)/lib/
+
+       $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/
+
+       $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
+
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/block/
+       $(INSTALL_BIN) ./files/vmware-scsi.hotplug $(1)/etc/hotplug.d/block/80-vmware-scsi
+
+       $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/de/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
+       $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ko/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
+       $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/zh_CN/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/zh_CN/
+       $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ja/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
+endef
+
+$(eval $(call BuildPackage,open-vm-tools))
diff --git a/utils/open-vm-tools/files/shutdown b/utils/open-vm-tools/files/shutdown
new file mode 100644 (file)
index 0000000..e814571
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+#compatibility script for openvmtools
+
+if [ "$1" == "-r" ]; then
+  /sbin/reboot
+else
+  /sbin/poweroff
+fi
diff --git a/utils/open-vm-tools/files/tools.conf b/utils/open-vm-tools/files/tools.conf
new file mode 100644 (file)
index 0000000..f6cae70
--- /dev/null
@@ -0,0 +1,2 @@
+[guestinfo]
+disable-perf-mon=1
diff --git a/utils/open-vm-tools/files/vmtoolsd.init b/utils/open-vm-tools/files/vmtoolsd.init
new file mode 100644 (file)
index 0000000..cb4eac3
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=10
+
+USE_PROCD=1
+PROG=/bin/vmtoolsd
+
+start_service() {
+       procd_open_instance
+       procd_set_param command "$PROG"
+       procd_set_param respawn
+       procd_close_instance
+}
diff --git a/utils/open-vm-tools/files/vmware-scsi.hotplug b/utils/open-vm-tools/files/vmware-scsi.hotplug
new file mode 100644 (file)
index 0000000..c2aba60
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ "$DEVTYPE" = disk ]; then
+    if [ "$ACTION" = add ]; then
+        vendor=`cat /sys/block/$DEVNAME/device/vendor`
+        case "$vendor" in
+        "VMware"*)
+            model=`cat /sys/block/$DEVNAME/device/model`
+            case "$model" in
+            "Virtual disk"*)
+                echo 180 > /sys/block/$DEVNAME/device/timeout
+                ;;
+            "VMware Virtual S")
+                echo 180 > /sys/block/$DEVNAME/device/timeout
+                ;;
+            esac
+            ;;
+        esac
+    fi
+fi
diff --git a/utils/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch b/utils/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch
new file mode 100644 (file)
index 0000000..6f96368
--- /dev/null
@@ -0,0 +1,21 @@
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -949,7 +949,7 @@
+       AC_VMW_CHECK_LIB([dnet],
+                        [DNET],
+                        [],
+-                       [dnet-config],
++                       [],
+                        [],
+                        [dnet.h],
+                        [intf_open],
+@@ -959,7 +959,7 @@
+    if test $have_dnet = "no"; then
+               AC_MSG_ERROR(
+-                 [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
++                 [dnet was not found. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
+    fi
+ fi
diff --git a/utils/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch b/utils/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch
new file mode 100644 (file)
index 0000000..8413162
--- /dev/null
@@ -0,0 +1,13 @@
+diff -urN a/lib/wiper/wiperPosix.c b/lib/wiper/wiperPosix.c
+--- a/lib/wiper/wiperPosix.c
++++ b/lib/wiper/wiperPosix.c
+@@ -43,6 +43,9 @@
+ #  include <libgen.h>
+ # endif /* __FreeBSD_version >= 500000 */
+ #endif
++#if defined(__linux__)
++#include <sys/sysmacros.h>
++#endif
+ #include <unistd.h>
+ #include "vmware.h"
diff --git a/utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch b/utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch
new file mode 100644 (file)
index 0000000..d3f2719
--- /dev/null
@@ -0,0 +1,29 @@
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -1208,6 +1208,7 @@
+ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
++AC_CHECK_MEMBERS([struct timespec.tv_sec],[],[],[[#include <time.h>]])
+ AC_HEADER_TIME
+ AC_STRUCT_TM
+ AC_C_VOLATILE
+diff -urN a/lib/include/hgfsUtil.h b/lib/include/hgfsUtil.h
+--- a/lib/include/hgfsUtil.h
++++ b/lib/include/hgfsUtil.h
+@@ -53,13 +53,7 @@
+ #      include <time.h>
+ #   endif
+ #   include "vm_basic_types.h"
+-#   if !defined _STRUCT_TIMESPEC &&   \
+-       !defined _TIMESPEC_DECLARED && \
+-       !defined __timespec_defined && \
+-       !defined sun && \
+-       !defined __FreeBSD__ && \
+-       !__APPLE__ && \
+-       !defined _WIN32
++#   if !defined HAVE_STRUCT_TIMESPEC_TV_SEC
+ struct timespec {
+    time_t tv_sec;
+    long   tv_nsec;
diff --git a/utils/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch b/utils/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
new file mode 100644 (file)
index 0000000..b007042
--- /dev/null
@@ -0,0 +1,40 @@
+diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
+--- a/lib/hgfsServer/hgfsServerLinux.c
++++ b/lib/hgfsServer/hgfsServerLinux.c
+@@ -105,11 +105,13 @@
+ #endif
+ /*
+- * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
+- * Solaris version of <sys/stat.h>.
++ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in
++ * POSIX.
+  */
+-#ifdef sun
++#ifndef ACCESSPERMS
+ #   define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++#ifndef ALLPERMS
+ #   define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
+ #endif
+diff -urN a/services/plugins/dndcp/dnd/dndLinux.c b/services/plugins/dndcp/dnd/dndLinux.c
+--- a/services/plugins/dndcp/dnd/dndLinux.c
++++ b/services/plugins/dndcp/dnd/dndLinux.c
+@@ -52,7 +52,7 @@
+ #define DND_ROOTDIR_PERMS     (S_IRWXU | S_IRWXG | S_IRWXO)
+ #define DND_STAGINGDIR_PERMS  (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
+-#ifdef sun
++#ifndef ACCESSPERMS
+ #define ACCESSPERMS           (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
+ #ifdef __ANDROID__
+@@ -61,7 +61,6 @@
+  */
+ #define NO_SETMNTENT
+ #define NO_ENDMNTENT
+-#define ACCESSPERMS           (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
diff --git a/utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch b/utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
new file mode 100644 (file)
index 0000000..6dbbb4e
--- /dev/null
@@ -0,0 +1,105 @@
+diff -urN a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -897,6 +897,7 @@
+ AC_CHECK_FUNCS([ecvt])
+ AC_CHECK_FUNCS([fcvt])
++AC_CHECK_FUNCS([getifaddrs getauxval issetugid __secure_getenv])
+ AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes])
+@@ -1145,10 +1146,13 @@
+ ###
+ AC_CHECK_HEADERS([crypt.h])
++AC_CHECK_HEADERS([ifaddrs.h])
+ AC_CHECK_HEADERS([inttypes.h])
+ AC_CHECK_HEADERS([stdint.h])
+ AC_CHECK_HEADERS([stdlib.h])
+ AC_CHECK_HEADERS([wchar.h])
++AC_CHECK_HEADERS([net/if.h])
++AC_CHECK_HEADERS([sys/auxv.h])
+ AC_CHECK_HEADERS([sys/inttypes.h])
+ AC_CHECK_HEADERS([sys/io.h])
+ AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD
+diff -urN a/lib/misc/idLinux.c b/lib/misc/idLinux.c
+--- a/lib/misc/idLinux.c
++++ b/lib/misc/idLinux.c
+@@ -27,12 +27,9 @@
+ #include <sys/syscall.h>
+ #include <string.h>
+ #include <unistd.h>
+-#ifdef __linux__
+-#if defined(__GLIBC__) && \
+-           (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16))
++#ifdef HAVE_SYS_AUXV_H
+ #include <sys/auxv.h>
+ #endif
+-#endif
+ #ifdef __APPLE__
+ #include <sys/socket.h>
+ #include <TargetConditionals.h>
+@@ -997,31 +994,32 @@
+ static Bool
+ IdIsSetUGid(void)
+ {
+-#if defined(__ANDROID__)
+-   /* Android does not have a secure_getenv, so be conservative. */
+-   return TRUE;
+-#else
+    /*
+     * We use __secure_getenv, which returns NULL if the binary is
+-    * setuid or setgid. Alternatives include,
++    * setuid or setgid, when issetugid or getauxval(AT_SECURE) is not
++    * available. Alternatives include,
+     *
+-    *   a) getauxval(AT_SECURE); not available until glibc 2.16.
+-    *   b) __libc_enable_secure; may not be exported.
++    *   a) issetugid(); not (yet?) available in glibc.
++    *   b) getauxval(AT_SECURE); not available until glibc 2.16.
++    *   c) __libc_enable_secure; may not be exported.
+     *
+-    * Use (a) when we are based on glibc 2.16, or newer.
++    * Use (b) when we are based on glibc 2.16, or newer.
+     */
+-#if defined(__GLIBC__) && \
+-           (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16))
++#if HAVE_ISSETUGID
++   return issetugid();
++#elif HAVE_GETAUXVAL
+    return getauxval(AT_SECURE) != 0;
+-#else
++#elif HAVE___SECURE_GETENV
+    static const char envName[] = "VMW_SETUGID_TEST";
+    if (setenv(envName, "1", TRUE) == -1) {
+       return TRUE; /* Conservative */
+    }
+    return __secure_getenv(envName) == NULL;
+-#endif
++#else
++   /* Android does not have a secure_getenv, so be conservative. */
++   return TRUE;
+ #endif
+ }
+ #endif
+diff -urN a/lib/nicInfo/nicInfoPosix.c b/lib/nicInfo/nicInfoPosix.c
+--- a/lib/nicInfo/nicInfoPosix.c
++++ b/lib/nicInfo/nicInfoPosix.c
+@@ -34,9 +34,13 @@
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+-#if defined(__FreeBSD__) || defined(__APPLE__)
++#if HAVE_SYS_SYSCTL_H
+ # include <sys/sysctl.h>
++#endif
++#if HAVE_IFADDRS_H
+ # include <ifaddrs.h>
++#endif
++#if HAVE_NET_IF_H
+ # include <net/if.h>
+ #endif
+ #ifndef NO_DNET
diff --git a/utils/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch b/utils/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch
new file mode 100644 (file)
index 0000000..be27ef3
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN a/services/plugins/vix/vixTools.c b/services/plugins/vix/vixTools.c
+--- a/services/plugins/vix/vixTools.c
++++ b/services/plugins/vix/vixTools.c
+@@ -66,7 +66,7 @@
+ #include <unistd.h>
+ #endif
+-#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__)
++#ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
diff --git a/utils/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch b/utils/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch
new file mode 100644 (file)
index 0000000..7433d23
--- /dev/null
@@ -0,0 +1,13 @@
+diff -urN a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
+--- a/lib/asyncsocket/asyncsocket.c
++++ b/lib/asyncsocket/asyncsocket.c
+@@ -69,8 +69,8 @@
+ #else
+ #include <stddef.h>
+ #include <ctype.h>
++#include <poll.h>
+ #include <sys/types.h>
+-#include <sys/poll.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #include <netdb.h>
diff --git a/utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch b/utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch
new file mode 100644 (file)
index 0000000..ceef794
--- /dev/null
@@ -0,0 +1,94 @@
+diff --git a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
+index e0a68e7e..b9675674 100644
+--- a/lib/asyncsocket/asyncsocket.c
++++ b/lib/asyncsocket/asyncsocket.c
+@@ -86,7 +86,7 @@
+ #include "random.h"
+ #include "asyncsocket.h"
+ #include "asyncSocketBase.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "log.h"
+ #include "err.h"
+ #include "hostinfo.h"
+diff --git a/lib/hgfsServer/hgfsServer.c b/lib/hgfsServer/hgfsServer.c
+index 991a7941..ed0c09f9 100644
+--- a/lib/hgfsServer/hgfsServer.c
++++ b/lib/hgfsServer/hgfsServer.c
+@@ -48,7 +48,7 @@
+ #include "hgfsServerOplock.h"
+ #include "hgfsDirNotify.h"
+ #include "userlock.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "mutexRankLib.h"
+ #include "vm_basic_asm.h"
+ #include "unicodeOperations.h"
+diff --git a/lib/include/asyncsocket.h b/lib/include/asyncsocket.h
+index 524147ea..103f944f 100644
+--- a/lib/include/asyncsocket.h
++++ b/lib/include/asyncsocket.h
+@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket;
+  * Or the client can specify its favorite poll class and locking behavior.
+  * Use of IVmdbPoll is only supported for regular sockets and for Attach.
+  */
+-#include "poll.h"
++#include "vm_poll.h"
+ struct IVmdbPoll;
+ typedef struct AsyncSocketPollParams {
+    int flags;               /* Default 0, only POLL_FLAG_NO_BULL is valid */
+diff --git a/lib/include/pollImpl.h b/lib/include/pollImpl.h
+index 46442e55..8bc66997 100644
+--- a/lib/include/pollImpl.h
++++ b/lib/include/pollImpl.h
+@@ -44,7 +44,7 @@
+ #define INCLUDE_ALLOW_USERLEVEL
+ #include "includeCheck.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "vm_basic_asm.h"
+ #if defined(__cplusplus)
+diff --git a/lib/include/poll.h b/lib/include/vm_poll.h
+similarity index 99%
+rename from a/lib/include/poll.h
+rename to a/lib/include/vm_poll.h
+index 988fe6d0..e9e74fb5 100644
+--- a/lib/include/poll.h
++++ b/lib/include/vm_poll.h
+@@ -60,7 +60,7 @@ extern "C" {
+ #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
+ #include <sys/kernel.h>
+ #endif
+-#include <sys/poll.h>
++#include <poll.h>
+ #define HZ 100
+ #endif
+ #ifdef __ANDROID__
+diff --git a/lib/rpcIn/rpcin.c b/lib/rpcIn/rpcin.c
+index c2c51583..d6c62f10 100644
+--- a/lib/rpcIn/rpcin.c
++++ b/lib/rpcIn/rpcin.c
+@@ -57,7 +57,7 @@
+ #if defined(VMTOOLS_USE_VSOCKET)
+ #  include <glib.h>
+-#  include "poll.h"
++#  include "vm_poll.h"
+ #  include "asyncsocket.h"
+ #  include "vmci_defs.h"
+ #include "dataMap.h"
+diff --git a/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
+index 03700937..f0b49ad7 100644
+--- a/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
++++ b/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
+@@ -48,7 +48,7 @@
+ #include "rpcout.h"
+ #include "rabbitmqProxyConst.h"
+ #include "vm_basic_types.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #ifdef OPEN_VM_TOOLS
+ #include "vmci_sockets.h"
+ #include "sslDirect.h"
diff --git a/utils/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch b/utils/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch
new file mode 100644 (file)
index 0000000..7ad9b03
--- /dev/null
@@ -0,0 +1,28 @@
+diff -urN a/lib/err/errPosix.c b/lib/err/errPosix.c
+--- a/lib/err/errPosix.c
++++ b/lib/err/errPosix.c
+@@ -31,6 +31,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <locale.h>
++#include <stdio.h>
+ #include "vmware.h"
+ #include "errInt.h"
+@@ -63,11 +64,13 @@
+ {
+    char *p;
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if defined(__GLIBC__) && !defined(__ANDROID__)
+    p = strerror_r(errorNumber, buf, bufSize);
+ #else
+-   p = strerror(errorNumber);
+-#endif
++   if (strerror_r(errorNumber, buf, bufSize) != 0)
++      snprintf(buf, bufSize, "unknown error %i", errorNumber);
++   p = buf;
++#endif /* defined __GLIBC__ */
+    ASSERT(p != NULL);
+    return p;
+ }
diff --git a/utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch b/utils/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch
new file mode 100644 (file)
index 0000000..46feed5
--- /dev/null
@@ -0,0 +1,14 @@
+diff -urN a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
+--- a/lib/hgfsServer/hgfsServerLinux.c
++++ b/lib/hgfsServer/hgfsServerLinux.c
+@@ -5294,8 +5294,8 @@
+       goto exit;
+    }
+-   LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n",
+-           __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max));
++   LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n",
++           __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max));
+    /*
+     * Check the offset is within the file size range.
diff --git a/utils/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch b/utils/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch
new file mode 100644 (file)
index 0000000..857c673
--- /dev/null
@@ -0,0 +1,16 @@
+diff -urN a/lib/file/fileIOPosix.c b/lib/file/fileIOPosix.c
+--- a/lib/file/fileIOPosix.c
++++ b/lib/file/fileIOPosix.c
+@@ -206,10 +206,10 @@
+        * the symbols (and anyone building XOPEN<700 gets nothing).
+        */
+       extern ssize_t preadv64(int fd, const struct iovec *iov, int iovcnt,
+-                          __off64_t offset) __attribute__ ((weak));
++                          off64_t offset) __attribute__ ((weak));
+       extern ssize_t pwritev64(int fd, const struct iovec *iov, int iovcnt,
+-                          __off64_t offset) __attribute__ ((weak));
++                          off64_t offset) __attribute__ ((weak));
+    #else
+       #error "Large file support unavailable. Aborting."
+    #endif
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
new file mode 100644 (file)
index 0000000..9974ada
--- /dev/null
@@ -0,0 +1,90 @@
+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
+
diff --git a/utils/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch b/utils/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch
new file mode 100644 (file)
index 0000000..e8b8be8
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/vmhgfs-fuse/fsutil.h
++++ b/vmhgfs-fuse/fsutil.h
+@@ -32,9 +32,7 @@
+ #include "hgfsProto.h"
+ #include <fuse.h>
+-#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
+ typedef long long loff_t;
+-#endif
+ /*
+  * Struct used to pass around attributes.
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 887744a151e8402fd120e6593226a9a3080f1bb1..b6d829b857c99b2821e49f7336eff27ef0f67b15 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=owfs
-PKG_VERSION:=3.2p2
+PKG_VERSION:=3.2p3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/owfs/owfs/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=904ee3ab1d80e9d3461b310f0cc78b2175e24aa0075edc4f7f92371c667d0bb6
+PKG_SOURCE_URL:=https://github.com/owfs/owfs/releases/download/v$(PKG_VERSION)
+PKG_HASH:=b8d33eba57d4a2f6c8a11ff23f233e3248bd75a42c8219b058a888846edd8717
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
 PKG_LICENSE:=GPL-2.0
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))
index 9e41612da22ac442fc7784cd6c94a400dfa18143..c7670444497e26140dbb63c03de16b131807f126 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcsc-lite
-PKG_VERSION:=1.8.23
+PKG_VERSION:=1.8.24
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://pcsclite.apdu.fr/files/
-PKG_HASH:=5a27262586eff39cfd5c19aadc8891dd71c0818d3d629539bd631b958be689c9
+PKG_HASH:=b81864fa6a5ec776639c02ae89998955f7702a8d10e8b8f70023c5a599d97568
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
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..18638b39e04ef9104d68b18fcf0bdcfc8bc46a6d 100644 (file)
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
 PKG_VERSION:=2018.12.30
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 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 1329386dd2a5986cd35eda6c4e7a411dd8b12404..1728893612b107fcd049be7acd3f6d24f2d456b2 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.8.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}?
-PKG_HASH:=3ece7541e090e6c11c0c35a0856b99005094aded0152e1e3e71ea2390ac8069f
+PKG_HASH:=691fdadf5913c17ac0bedc1e8c2b865fd2958800b9cb118b1139e58a1963a11f
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
diff --git a/utils/prometheus/patches/no_bzr.patch b/utils/prometheus/patches/no_bzr.patch
new file mode 100644 (file)
index 0000000..ddba321
--- /dev/null
@@ -0,0 +1,270 @@
+diff --git a/go.mod b/go.mod
+index 35693e6d..e58ee088 100644
+--- a/go.mod
++++ b/go.mod
+@@ -7,7 +7,6 @@ require (
+       github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f // indirect
+       github.com/VividCortex/ewma v1.1.1 // indirect
+       github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf
+-      github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
+       github.com/aws/aws-sdk-go v0.0.0-20180507225419-00862f899353
+       github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8 // indirect
+       github.com/cenk/backoff v2.0.0+incompatible // indirect
+@@ -35,7 +34,6 @@ require (
+       github.com/gogo/protobuf v1.2.0
+       github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 // indirect
+       github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec
+-      github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a // indirect
+       github.com/google/gofuzz v0.0.0-20150304233714-bbcb9da2d746 // indirect
+       github.com/google/pprof v0.0.0-20180605153948-8b03ce837f34
+       github.com/googleapis/gnostic v0.0.0-20180520015035-48a0ecefe2e4 // indirect
+@@ -46,14 +44,8 @@ require (
+       github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
+       github.com/hashicorp/consul v0.0.0-20180615161029-bed22a81e9fd
+       github.com/hashicorp/go-cleanhttp v0.0.0-20160407174126-ad28ea4487f0 // indirect
+-      github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
+-      github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c // indirect
+-      github.com/hashicorp/go-multierror v1.0.0 // indirect
+       github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 // indirect
+-      github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect
+-      github.com/hashicorp/memberlist v0.1.0 // indirect
+-      github.com/hashicorp/serf v0.0.0-20161007004122-1d4fa605f6ff // indirect
+-      github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
++      github.com/hashicorp/serf v0.8.2 // indirect
+       github.com/hpcloud/tail v1.0.0 // indirect
+       github.com/influxdata/influxdb v0.0.0-20170331210902-15e594fc09f1
+       github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
+@@ -82,7 +74,6 @@ require (
+       github.com/opentracing-contrib/go-stdlib v0.0.0-20170113013457-1de4cc2120e7
+       github.com/opentracing/basictracer-go v1.0.0 // indirect
+       github.com/opentracing/opentracing-go v1.0.1
+-      github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect
+       github.com/peterbourgon/diskv v0.0.0-20180312054125-0646ccaebea1 // indirect
+       github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect
+       github.com/petermattis/goid v0.0.0-20170504144140-0ded85884ba5 // indirect
+@@ -97,16 +88,14 @@ require (
+       github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13
+       github.com/sasha-s/go-deadlock v0.0.0-20161201235124-341000892f3d // indirect
+       github.com/satori/go.uuid v1.2.0 // indirect
+-      github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
+       github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
+       github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371
+       github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04
+       github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
+       github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
+       github.com/spf13/pflag v1.0.3 // indirect
+-      github.com/stretchr/testify v1.2.2
+-      golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8 // indirect
+-      golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
++      github.com/stretchr/testify v1.3.0
++      golang.org/x/net v0.0.0-20181201002055-351d144fa1fc
+       golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
+       golang.org/x/time v0.0.0-20170424234030-8be79e1e0910
+       golang.org/x/tools v0.0.0-20181023010539-40a48ad93fbe
+@@ -118,15 +107,12 @@ require (
+       gopkg.in/fsnotify/fsnotify.v1 v1.3.0
+       gopkg.in/inf.v0 v0.9.0 // indirect
+       gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
+-      gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect
+       gopkg.in/yaml.v2 v2.2.1
+       k8s.io/api v0.0.0-20181213150558-05914d821849
+       k8s.io/apimachinery v0.0.0-20181127025237-2b1284ed4c93
+       k8s.io/client-go v2.0.0-alpha.0.0.20181121191925-a47917edff34+incompatible
+       k8s.io/klog v0.1.0
+       k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a // indirect
+-      labix.org/v2/mgo v0.0.0-20140701140051-000000000287 // indirect
+-      launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect
+       sigs.k8s.io/yaml v1.1.0 // indirect
+ )
+diff --git a/go.sum b/go.sum
+index 2e938c06..e37c7504 100644
+--- a/go.sum
++++ b/go.sum
+@@ -17,12 +17,15 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5Vpd
+ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
+ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
++github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
+ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
++github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+ github.com/aws/aws-sdk-go v0.0.0-20180507225419-00862f899353 h1:qFKf58XUUvHaEz0zFkLJsQ4dzoAyrQ8QyhK4nHGHBI4=
+ github.com/aws/aws-sdk-go v0.0.0-20180507225419-00862f899353/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k=
+ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
+ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
++github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+ github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8 h1:tYoz1OeRpx3dJZlh9T4dQt4kAndcmpl+VNdzbSgFC/0=
+ github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8/go.mod h1:Iev9Q3MErcn+w3UOJD/DkEzllvugfdx7bGcMOFhvr/4=
+ github.com/cenk/backoff v2.0.0+incompatible h1:7vXVw3g7XE+Vnj0A9TmFGtMeP4oZQ5ZzpPvKhLFa80E=
+@@ -46,6 +49,7 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T
+ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
+ github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
+ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
++github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+ github.com/dgrijalva/jwt-go v0.0.0-20161101193935-9ed569b5d1ac h1:xrQJVwQCGqDvOO7/0+RyIq5J2M3Q4ZF7Ug/BMQtML1E=
+@@ -61,6 +65,7 @@ github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7Vpz
+ github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw=
+ github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA=
++github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+ github.com/getsentry/raven-go v0.1.0 h1:lc5jnN9D+q3panDpihwShgaOVvP6esoMEKbID2yhLoQ=
+@@ -93,8 +98,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM
+ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+ github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec h1:ZaSUjYC8aWT/om43c8YVz0SqjT8ABtqw7REbZGsCroE=
+ github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+-github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a h1:ZJu5NB1Bk5ms4vw0Xu4i+jD32SE9jQXyfnOvwhHqlT0=
+-github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
++github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw=
++github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+ github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
+ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+ github.com/google/gofuzz v0.0.0-20150304233714-bbcb9da2d746 h1:M6d2zDTA4cKXT6OwFsJxlo5tWrAukj3KfvJ1zcBatnA=
+@@ -122,24 +127,28 @@ github.com/hashicorp/go-cleanhttp v0.0.0-20160407174126-ad28ea4487f0 h1:2l0haPDq
+ github.com/hashicorp/go-cleanhttp v0.0.0-20160407174126-ad28ea4487f0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+ github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=
+ github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+-github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c h1:BTAbnbegUIMB6xmQCwWE8yRzbA4XSpnZY5hvRJC188I=
+-github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
++github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=
++github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+ github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
+ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+ github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E=
+ github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90/go.mod h1:o4zcYY1e0GEZI6eSEr+43QDYmuGglw1qSO6qdHUHCgg=
+-github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM=
+-github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
++github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
++github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
++github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+ github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
+ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
++github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
++github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
++github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
+ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
+ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+-github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU1hzH8=
+-github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE=
+-github.com/hashicorp/serf v0.0.0-20161007004122-1d4fa605f6ff h1:3QdMaUEV3zE0VcBgBj+P3GQ26ZKmhb5gLea1hqAZ50U=
+-github.com/hashicorp/serf v0.0.0-20161007004122-1d4fa605f6ff/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE=
+-github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
+-github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
++github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
++github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
++github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=
++github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
++github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=
++github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+ github.com/influxdata/influxdb v0.0.0-20170331210902-15e594fc09f1 h1:O08dwjOwv9CYlJJEUZKAazSoQDKlsN34Bq3dnhqhyVI=
+@@ -170,16 +179,23 @@ github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
+ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+ github.com/lightstep/lightstep-tracer-go v0.15.6 h1:D0GGa7afJ7GcQvu5as6ssLEEKYXvRgKI5d5cevtz8r4=
+ github.com/lightstep/lightstep-tracer-go v0.15.6/go.mod h1:6AMpwZpsyCFwSovxzM78e+AsYxE8sGwiM6C3TytaWeI=
++github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
++github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+ github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
+ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
+ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
++github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+ github.com/miekg/dns v1.1.4 h1:rCMZsU2ScVSYcAsOXgmC6+AKOK+6pmQTOcw03nfwYV0=
+ github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
++github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
+ github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9 h1:Y94YB7jrsihrbGSqRNMwRWJ2/dCxr0hdC2oPRohkx0A=
+ github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+ github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
+ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
++github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
++github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
++github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+ github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
+ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+@@ -219,6 +235,7 @@ github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
+ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
++github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+ github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+ github.com/prometheus/client_golang v0.9.1 h1:K47Rk0v/fkEfwfQet2KWhscE0cJzjgCCDBG2KHZoVno=
+ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+@@ -239,6 +256,7 @@ github.com/rlmcpherson/s3gof3r v0.5.0 h1:1izOJpTiohSibfOHuNyEA/yQnAirh05enzEdmhe
+ github.com/rlmcpherson/s3gof3r v0.5.0/go.mod h1:s7vv7SMDPInkitQMuZzH615G7yWHdrU2r/Go7Bo71Rs=
+ github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk=
+ github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A=
++github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+ github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13 h1:4AQBn5RJY4WH8t8TLEMZUsWeXHAUcoao42TCAfpEJJE=
+ github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
+ github.com/sasha-s/go-deadlock v0.0.0-20161201235124-341000892f3d h1:yVBZEAirqhDYAc7xftf/swe8eHcg63jqfwdqN8KSoR8=
+@@ -253,7 +271,6 @@ github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371 h1:SWV2fHctRpRrp49
+ github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
+ github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04 h1:y0cMJ0qjii33BnD6tMGcF/+gHYsoKQ6tbwQpy233OII=
+ github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
+-github.com/simonpasquier/klog-gokit v0.1.0 h1:l3GGzgwlUF4vC1ApCOEsMsV+6nJPM01VoVCUCZgOIUw=
+ github.com/simonpasquier/klog-gokit v0.1.0/go.mod h1:4lorAA0CyDox4KO34BrvNAJk8J2Ma/M9Q2BDkR38vSI=
+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+@@ -263,25 +280,35 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1
+ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+ github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
+ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
++github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
+ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
++github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
++github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+ go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b h1:6ayHMBPtdP3jNuk+Sfhso+PTB7ZJQ5E1FBo403m2H8w=
+ go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
+-golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8 h1:h7zdf0RiEvWbYBKIx4b+q41xoUVnMmvsGZnIVE5syG8=
+-golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
++golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs=
++golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+ golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d h1:g9qWBGx4puODJTMVyoPrpoxPFgVGd+z1DZwjfRu4d0I=
+ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
+ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
++golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
++golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
++golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
+ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
+ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
++golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
++golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
++golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
++golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8 h1:YoY1wS6JYVRpIfFngRf2HHo9R9dAne3xbkGOQ5rJXjU=
+ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+@@ -315,8 +342,6 @@ gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o=
+ gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+-gopkg.in/vmihailenco/msgpack.v2 v2.9.1 h1:kb0VV7NuIojvRfzwslQeP3yArBqJHW9tOl4t38VS1jM=
+-gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8=
+ gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
+ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+ honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+@@ -328,9 +353,5 @@ k8s.io/client-go v2.0.0-alpha.0.0.20181121191925-a47917edff34+incompatible h1:7J
+ k8s.io/client-go v2.0.0-alpha.0.0.20181121191925-a47917edff34+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
+ k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a h1:tHgpQvrWaYfrnC8G4N0Oszw5HHCsZxKilDi2R7HuCSM=
+ k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
+-labix.org/v2/mgo v0.0.0-20140701140051-000000000287 h1:L0cnkNl4TfAXzvdrqsYEmxOHOCv2p5I3taaReO8BWFs=
+-labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4=
+-launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54=
+-launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM=
+ sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
+ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
index 681e3cadb846631e93063ce748d3b310fbe5fb06..0dc4d5c5f829e421411347156c2acfc662e27768 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
 PKG_SOURCE_URL:=http://download.qemu.org/
@@ -193,68 +193,74 @@ CONFIGURE_ARGS +=                 \
        --disable-fortify-source        \
        --disable-stack-protector       \
 
+# Make a list from QEMU source code for reference
+#
+#      grep -E '^\s*--disable-[^)]+\)' configure | cut -f1 -d')' | sort -u
+#
 CONFIGURE_ARGS +=                      \
        --audio-drv-list=''             \
-       --disable-debug-info            \
-       --disable-modules               \
-       --disable-sdl                   \
-       --disable-qom-cast-debug        \
-       --disable-virtfs                \
-       --disable-vnc                   \
-       --disable-debug-tcg             \
-       --disable-sparse                \
-       --disable-strip                 \
-       --disable-vnc-sasl              \
-       --disable-vnc-jpeg              \
-       --disable-vnc-png               \
-       --disable-uuid                  \
-       --disable-vde                   \
-       --disable-netmap                \
-       --disable-xen                   \
-       --disable-xen-pci-passthrough   \
-       --disable-xen-pv-domain-build   \
-       --disable-brlapi                \
+       --disable-attr                  \
        --disable-bluez                 \
-       --disable-tcg-interpreter       \
+       --disable-brlapi                \
+       --disable-bsd-user              \
+       --disable-bzip2                 \
        --disable-cap-ng                \
-       --disable-spice                 \
-       --disable-libiscsi              \
-       --disable-libnfs                \
        --disable-cocoa                 \
-       --disable-bsd-user              \
        --disable-curl                  \
-       --disable-linux-aio             \
-       --disable-attr                  \
+       --disable-debug-info            \
+       --disable-debug-tcg             \
        --disable-docs                  \
+       --disable-gcrypt                \
+       --disable-glusterfs             \
+       --disable-gnutls                \
+       --disable-gtk                   \
+       --disable-guest-agent-msi       \
+       --disable-jemalloc              \
+       --disable-libiscsi              \
+       --disable-libnfs                \
+       --disable-libpmem               \
+       --disable-libssh2               \
+       --disable-libudev               \
+       --disable-libusb                \
+       --disable-libxml2               \
+       --disable-linux-aio             \
+       --disable-lzo                   \
+       --disable-modules               \
+       --disable-netmap                \
+       --disable-nettle                \
+       --disable-numa                  \
        --disable-opengl                \
+       --disable-qom-cast-debug        \
        --disable-rbd                   \
-       --disable-xfsctl                \
+       --disable-rdma                  \
+       --disable-sdl                   \
+       --disable-seccomp               \
        --disable-smartcard             \
-       --disable-libusb                \
-       --disable-usb-redir             \
-       --disable-zlib-test             \
-       --disable-lzo                   \
        --disable-snappy                \
-       --disable-bzip2                 \
-       --disable-guest-agent-msi       \
+       --disable-sparse                \
+       --disable-spice                 \
+       --disable-strip                 \
+       --disable-tcg-interpreter       \
+       --disable-tcmalloc              \
        --disable-tools                 \
-       --disable-seccomp               \
-       --disable-glusterfs             \
-       --disable-gtk                   \
-       --disable-gnutls                \
-       --disable-nettle                \
-       --disable-gcrypt                \
-       --disable-rdma                  \
-       --disable-vte                   \
-       --disable-virglrenderer         \
        --disable-tpm                   \
-       --disable-libssh2               \
+       --disable-usb-redir             \
+       --disable-uuid                  \
+       --disable-vde                   \
        --disable-vhdx                  \
-       --disable-numa                  \
-       --disable-tcmalloc              \
-       --disable-jemalloc              \
-       --disable-strip                 \
+       --disable-virglrenderer         \
+       --disable-virtfs                \
+       --disable-vnc                   \
+       --disable-vnc-jpeg              \
+       --disable-vnc-png               \
+       --disable-vnc-sasl              \
+       --disable-vte                   \
        --disable-werror                \
+       --disable-xen                   \
+       --disable-xen-pci-passthrough   \
+       --disable-xen-pv-domain-build   \
+       --disable-xfsctl                \
+       --disable-zlib-test             \
 
 CONFIGURE_ARGS += --target-list='$(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
 CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
index 8c11f00ad6e15ea77fd3401c0c76eb38f7549500..9759cfa57bd50c45dcae00caff4d2006280d1ced 100644 (file)
@@ -1,7 +1,7 @@
-From 0b4011cd0983ced6e065f397049f967656494793 Mon Sep 17 00:00:00 2001
+From 82d1bb429533dcab4278ed21afc19ee303d7d3f5 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:43:19 +0800
-Subject: [PATCH 1/3] configure: allow disable fortify_source
+Subject: [PATCH 1/4] configure: allow disable fortify_source
 
 Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
 OpenWrt base build system decide flavor of fortify_source to use
@@ -10,18 +10,15 @@ OpenWrt base build system decide flavor of fortify_source to use
  1 file changed, 2 insertions(+)
 
 diff --git a/configure b/configure
-index 0c6e757..8ea3fdd 100755
+index 0a3c6a72c3..d274df816c 100755
 --- a/configure
 +++ b/configure
-@@ -1313,6 +1313,8 @@ for opt do
+@@ -1491,6 +1491,8 @@ for opt do
    ;;
-   --disable-git-update) git_update=no
+   --disable-libpmem) libpmem=no
    ;;
 +  --disable-fortify-source) fortify_source="no"
 +  ;;
    *)
        echo "ERROR: unknown option $opt"
        echo "Try '$0 --help' for more information"
--- 
-1.8.3.1
-
diff --git a/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch b/utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
new file mode 100644 (file)
index 0000000..4a42957
--- /dev/null
@@ -0,0 +1,25 @@
+From 4d7955f069922c482886e03e5cd352281dbce146 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Tue, 2 Apr 2019 06:31:31 +0000
+Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
+ line
+
+---
+ configure | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure b/configure
+index d274df816c..a138faeb72 100755
+--- a/configure
++++ b/configure
+@@ -1491,6 +1491,10 @@ for opt do
+   ;;
+   --disable-libpmem) libpmem=no
+   ;;
++  --enable-libudev) libudev=yes
++  ;;
++  --disable-libudev) libudev=no
++  ;;
+   --disable-fortify-source) fortify_source="no"
+   ;;
+   *)
diff --git a/utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0002-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
deleted file mode 100644 (file)
index bd1ac2d..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-From 83e72b93889fbcbbfff281b0dbcc58c5a7455257 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 2/3] disas: fix compilation failure when isnan is a macro
-
----
- disas/libvixl/vixl/utils.h | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
-index 5ab134e..df30663 100644
---- a/disas/libvixl/vixl/utils.h
-+++ b/disas/libvixl/vixl/utils.h
-@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
- // An fpclassify() function for 16-bit half-precision floats.
- int float16classify(float16 value);
-+#ifdef isnan
-+#define isnan_ isnan
-+#else
-+#define isnan_ std::isnan
-+#endif
-+
- // NaN tests.
- inline bool IsSignallingNaN(double num) {
-   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
-   uint64_t raw = double_to_rawbits(num);
--  if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-+  if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-     return true;
-   }
-   return false;
-@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
- inline bool IsSignallingNaN(float num) {
-   const uint32_t kFP32QuietNaNMask = 0x00400000;
-   uint32_t raw = float_to_rawbits(num);
--  if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-+  if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-     return true;
-   }
-   return false;
-@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
- template <typename T>
- inline bool IsQuietNaN(T num) {
--  return std::isnan(num) && !IsSignallingNaN(num);
-+  return isnan_(num) && !IsSignallingNaN(num);
- }
- // Convert the NaN in 'num' to a quiet NaN.
- inline double ToQuietNaN(double num) {
-   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
--  VIXL_ASSERT(std::isnan(num));
-+  VIXL_ASSERT(isnan_(num));
-   return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
- }
- inline float ToQuietNaN(float num) {
-   const uint32_t kFP32QuietNaNMask = 0x00400000;
--  VIXL_ASSERT(std::isnan(num));
-+  VIXL_ASSERT(isnan_(num));
-   return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
- }
--- 
-1.8.3.1
-
diff --git a/utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
new file mode 100644 (file)
index 0000000..ece3670
--- /dev/null
@@ -0,0 +1,66 @@
+From c480c25cf9265fe8e90c2c26d65c8a2fa174b0ea Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sat, 24 Feb 2018 13:45:25 +0800
+Subject: [PATCH 3/4] disas: fix compilation failure when isnan is a macro
+
+---
+ disas/libvixl/vixl/utils.h | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/disas/libvixl/vixl/utils.h b/disas/libvixl/vixl/utils.h
+index 5ab134e240..df30663df8 100644
+--- a/disas/libvixl/vixl/utils.h
++++ b/disas/libvixl/vixl/utils.h
+@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64_t exp, uint64_t mantissa);
+ // An fpclassify() function for 16-bit half-precision floats.
+ int float16classify(float16 value);
++#ifdef isnan
++#define isnan_ isnan
++#else
++#define isnan_ std::isnan
++#endif
++
+ // NaN tests.
+ inline bool IsSignallingNaN(double num) {
+   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+   uint64_t raw = double_to_rawbits(num);
+-  if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
++  if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
+     return true;
+   }
+   return false;
+@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) {
+ inline bool IsSignallingNaN(float num) {
+   const uint32_t kFP32QuietNaNMask = 0x00400000;
+   uint32_t raw = float_to_rawbits(num);
+-  if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
++  if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
+     return true;
+   }
+   return false;
+@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) {
+ template <typename T>
+ inline bool IsQuietNaN(T num) {
+-  return std::isnan(num) && !IsSignallingNaN(num);
++  return isnan_(num) && !IsSignallingNaN(num);
+ }
+ // Convert the NaN in 'num' to a quiet NaN.
+ inline double ToQuietNaN(double num) {
+   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
+-  VIXL_ASSERT(std::isnan(num));
++  VIXL_ASSERT(isnan_(num));
+   return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
+ }
+ inline float ToQuietNaN(float num) {
+   const uint32_t kFP32QuietNaNMask = 0x00400000;
+-  VIXL_ASSERT(std::isnan(num));
++  VIXL_ASSERT(isnan_(num));
+   return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
+ }
diff --git a/utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0003-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
deleted file mode 100644 (file)
index 374afc2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From b6d4bff30f2bdc3a6f26c9f6c7f32e352270d119 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 3/3] pc-bios: fix compilation when $(AS) is actually gcc
- driver
-
----
- pc-bios/optionrom/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
-index a9a9e5e..f88b3ee 100644
---- a/pc-bios/optionrom/Makefile
-+++ b/pc-bios/optionrom/Makefile
-@@ -34,7 +34,7 @@ endif
- QEMU_INCLUDES += -I$(SRC_PATH)
- Wa = -Wa,
--ASFLAGS += -32
-+ASFLAGS += $(Wa)-32
- QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
- build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
-@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
- %.o: %.S
--      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
-+      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
- %.img: %.o
-       $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
--- 
-1.8.3.1
-
diff --git a/utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
new file mode 100644 (file)
index 0000000..f63f015
--- /dev/null
@@ -0,0 +1,32 @@
+From e030d1c14119e880a52788dd04325d489cf455ae Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sat, 24 Feb 2018 13:46:31 +0800
+Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
+ driver
+
+---
+ pc-bios/optionrom/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
+index a9a9e5e7eb..f88b3ee446 100644
+--- a/pc-bios/optionrom/Makefile
++++ b/pc-bios/optionrom/Makefile
+@@ -34,7 +34,7 @@ endif
+ QEMU_INCLUDES += -I$(SRC_PATH)
+ Wa = -Wa,
+-ASFLAGS += -32
++ASFLAGS += $(Wa)-32
+ QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
+ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
+@@ -44,7 +44,7 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
+ %.o: %.S
+-      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
++      $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$(TARGET_DIR)$@")
+ %.img: %.o
+       $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
index 13f6f1387a2ade7449ca095af8c046927a693849..a4a9863fd9b82a3868119fc5060ab7e4791a66fa 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtl-ais
 PKG_VERSION:=0.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/dgiardini/rtl-ais/tar.gz/v$(PKG_VERSION)?
index 4900c34de3976dfae43ff071ec98414c172e6e27..efcd99ea0e2ef9e71b70cffb2eaff4bfc790c1d9 100644 (file)
@@ -6,7 +6,7 @@ USE_PROCD=1
 PROG=/usr/bin/rtl_ais
 
 validate_rtl_ais_section() {
-       uci_validate_section "rtl_ais" "rtl_ais" "$1" \
+       uci_load_validate "rtl_ais" "rtl_ais" "$1" "$2" \
                'enabled:bool' \
                'ppm:range(-100,100):0'
 }
@@ -14,22 +14,21 @@ validate_rtl_ais_section() {
 load_rtl_ais() {
        local cfg="$1"
 
-       local enabled ppm
-       validate_rtl_ais_section "$cfg" || { echo "validation failed"; return 1; }
+       [ "$2" = 0 ] || { echo "validation failed"; return 1; }
 
        [ "$enabled" = "1" ] || return 1
 
-        procd_open_instance
-        procd_set_param command "$PROG" -p "$ppm"
+       procd_open_instance
+       procd_set_param command "$PROG" -p "$ppm"
        procd_set_param stdout 1
        procd_set_param stderr 1
-        procd_set_param respawn
-        procd_close_instance
+       procd_set_param respawn
+       procd_close_instance
 }
 
 start_service() {
        config_load "rtl_ais"
-       config_foreach load_rtl_ais "rtl_ais"
+       config_foreach validate_rtl_ais_section "rtl_ais" load_rtl_ais
 }
 
 service_triggers() {
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 dab12099a6e6d2c3db94920dd48f1080d5e9195f..34bc91517f738a77ca3e7e2714c2a599ed4b1821 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/uclibc++.mk
 
 PKG_NAME:=smartmontools
 PKG_VERSION:=7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/smartmontools
@@ -28,13 +28,13 @@ include $(INCLUDE_DIR)/package.mk
 define Package/smartmontools/Default
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=$(CXX_DEPENDS)
   TITLE:=S.M.A.R.T Monitoring
-  URL:=http://smartmontools.sourceforge.net/
+  URL:=https://www.smartmontools.org/
 endef
 
 define Package/smartmontools
   $(call Package/smartmontools/Default)
+  DEPENDS:=$(CXX_DEPENDS)
   TITLE+= Tool
 endef
 
@@ -47,6 +47,7 @@ endef
 
 define Package/smartd
   $(call Package/smartmontools/Default)
+  DEPENDS:=$(CXX_DEPENDS)
   TITLE+= Daemon
 endef
 
@@ -57,6 +58,16 @@ define Package/smartd/description
   ATA and SCSI disks. It is derived from smartsuite.
 endef
 
+define Package/smartmontools-drivedb
+  $(call Package/smartmontools/Default)
+  TITLE+= Drive database
+  PKGARCH=all
+endef
+
+define Package/smartmontools-drivedb/description
+  Database of known drives and USB bridges for smartctl and smartd.
+endef
+
 ifeq ($(CONFIG_USE_UCLIBCXX),y)
 TARGET_LDFLAGS +=-nodefaultlibs
 else
@@ -83,8 +94,6 @@ CONFIGURE_VARS += \
 define Package/smartmontools/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
-       $(INSTALL_DIR) $(1)/usr/share
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools
 endef
 
 define Package/smartd/install
@@ -96,9 +105,15 @@ define Package/smartd/install
        $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
 endef
 
+define Package/smartmontools-drivedb/install
+       $(INSTALL_DIR) $(1)/usr/share/smartmontools/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools/
+endef
+
 define Package/smartd/conffiles
 /etc/smartd.conf
 endef
 
 $(eval $(call BuildPackage,smartmontools))
 $(eval $(call BuildPackage,smartd))
+$(eval $(call BuildPackage,smartmontools-drivedb))
diff --git a/utils/smartmontools/patches/001-use-external-drivedb.patch b/utils/smartmontools/patches/001-use-external-drivedb.patch
new file mode 100644 (file)
index 0000000..69007d1
--- /dev/null
@@ -0,0 +1,92 @@
+diff --git i/knowndrives.cpp w/knowndrives.cpp
+index 072160a..d57417b 100644
+--- i/knowndrives.cpp
++++ w/knowndrives.cpp
+@@ -40,11 +40,84 @@ const char * knowndrives_cpp_cvsid = "$Id: knowndrives.cpp 4842 2018-12-02 16:07
+ // see read_default_drive_databases() below.
+ // The drive_settings structure is described in drivedb.h.
+ const drive_settings builtin_knowndrives[] = {
+-#include "drivedb.h"
++  { "DEFAULT",
++    "-", "-",
++    "Default settings",
++    "-v 1,raw48,Raw_Read_Error_Rate "
++    "-v 2,raw48,Throughput_Performance "
++    "-v 3,raw16(avg16),Spin_Up_Time "
++    "-v 4,raw48,Start_Stop_Count "
++    "-v 5,raw16(raw16),Reallocated_Sector_Ct "
++    "-v 6,raw48,Read_Channel_Margin,HDD "
++    "-v 7,raw48,Seek_Error_Rate,HDD "
++    "-v 8,raw48,Seek_Time_Performance,HDD "
++    "-v 9,raw24(raw8),Power_On_Hours "
++    "-v 10,raw48,Spin_Retry_Count,HDD "
++    "-v 11,raw48,Calibration_Retry_Count,HDD "
++    "-v 12,raw48,Power_Cycle_Count "
++    "-v 13,raw48,Read_Soft_Error_Rate "
++    //  14-174 Unknown_Attribute
++    "-v 175,raw48,Program_Fail_Count_Chip,SSD "
++    "-v 176,raw48,Erase_Fail_Count_Chip,SSD "
++    "-v 177,raw48,Wear_Leveling_Count,SSD "
++    "-v 178,raw48,Used_Rsvd_Blk_Cnt_Chip,SSD "
++    "-v 179,raw48,Used_Rsvd_Blk_Cnt_Tot,SSD "
++    "-v 180,raw48,Unused_Rsvd_Blk_Cnt_Tot,SSD "
++    "-v 181,raw48,Program_Fail_Cnt_Total "
++    "-v 182,raw48,Erase_Fail_Count_Total,SSD "
++    "-v 183,raw48,Runtime_Bad_Block "
++    "-v 184,raw48,End-to-End_Error "
++    //  185-186 Unknown_Attribute
++    "-v 187,raw48,Reported_Uncorrect "
++    "-v 188,raw48,Command_Timeout "
++    "-v 189,raw48,High_Fly_Writes,HDD "
++    "-v 190,tempminmax,Airflow_Temperature_Cel "
++    "-v 191,raw48,G-Sense_Error_Rate,HDD "
++    "-v 192,raw48,Power-Off_Retract_Count "
++    "-v 193,raw48,Load_Cycle_Count,HDD "
++    "-v 194,tempminmax,Temperature_Celsius "
++    "-v 195,raw48,Hardware_ECC_Recovered "
++    "-v 196,raw16(raw16),Reallocated_Event_Count "
++    "-v 197,raw48,Current_Pending_Sector "
++    "-v 198,raw48,Offline_Uncorrectable "
++    "-v 199,raw48,UDMA_CRC_Error_Count "
++    "-v 200,raw48,Multi_Zone_Error_Rate,HDD "
++    "-v 201,raw48,Soft_Read_Error_Rate,HDD "
++    "-v 202,raw48,Data_Address_Mark_Errs,HDD "
++    "-v 203,raw48,Run_Out_Cancel "
++    "-v 204,raw48,Soft_ECC_Correction "
++    "-v 205,raw48,Thermal_Asperity_Rate "
++    "-v 206,raw48,Flying_Height,HDD "
++    "-v 207,raw48,Spin_High_Current,HDD "
++    "-v 208,raw48,Spin_Buzz,HDD "
++    "-v 209,raw48,Offline_Seek_Performnce,HDD "
++    //  210-219 Unknown_Attribute
++    "-v 220,raw48,Disk_Shift,HDD "
++    "-v 221,raw48,G-Sense_Error_Rate,HDD "
++    "-v 222,raw48,Loaded_Hours,HDD "
++    "-v 223,raw48,Load_Retry_Count,HDD "
++    "-v 224,raw48,Load_Friction,HDD "
++    "-v 225,raw48,Load_Cycle_Count,HDD "
++    "-v 226,raw48,Load-in_Time,HDD "
++    "-v 227,raw48,Torq-amp_Count,HDD "
++    "-v 228,raw48,Power-off_Retract_Count "
++    //  229 Unknown_Attribute
++    "-v 230,raw48,Head_Amplitude,HDD "
++    "-v 231,raw48,Temperature_Celsius "
++    "-v 232,raw48,Available_Reservd_Space "
++    "-v 233,raw48,Media_Wearout_Indicator,SSD "
++    //  234-239 Unknown_Attribute
++    "-v 240,raw24(raw8),Head_Flying_Hours,HDD "
++    "-v 241,raw48,Total_LBAs_Written "
++    "-v 242,raw48,Total_LBAs_Read "
++    //  243-249 Unknown_Attribute
++    "-v 250,raw48,Read_Error_Retry_Rate "
++    //  251-253 Unknown_Attribute
++    "-v 254,raw48,Free_Fall_Sensor,HDD"
++  },
+ };
+-const unsigned builtin_knowndrives_size =
+-  sizeof(builtin_knowndrives) / sizeof(builtin_knowndrives[0]);
++const unsigned builtin_knowndrives_size = 1;
+ /// Drive database class. Stores custom entries read from file.
+ /// Provides transparent access to concatenation of custom and
diff --git a/utils/ssdeep/Makefile b/utils/ssdeep/Makefile
new file mode 100644 (file)
index 0000000..f089756
--- /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:=ssdeep
+PKG_VERSION:=2.14.1
+PKG_RELEASE=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/ssdeep-project/ssdeep/releases/download/release-$(PKG_VERSION)/
+PKG_HASH:=ff2eabc78106f009b4fb2def2d76fb0ca9e12acf624cbbfad9b3eb390d931313
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ssdeep
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=A program to compute and match fuzzy hashes
+  URL:=https://ssdeep-project.github.io/ssdeep
+  DEPENDS:=$(CXX_DEPENDS)
+endef
+
+define Package/ssdeep/description
+ ssdeep is a program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies.
+endef
+
+define Package/ssdeep/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssdeep $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,ssdeep))
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 fb5277091b741245923dc9f5b6598dbf07f0783c..8b65d1a50d85c459c91b4afcb645437c57bf4005 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tar
-PKG_VERSION:=1.30
+PKG_VERSION:=1.32
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=f1bf92dbb1e1ab27911a861ea8dde8208ee774866c46c0bb6ead41f4d1f4d2d3
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_HASH:=d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8
 
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
 PKG_LICENSE:=GPL-3.0
 PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:gnu:tar
 
+PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=xz
@@ -31,7 +33,7 @@ define Package/tar
   DEPENDS:=+PACKAGE_TAR_POSIX_ACL:libacl +PACKAGE_TAR_XATTR:libattr +PACKAGE_TAR_BZIP2:bzip2
   EXTRA_DEPENDS:=$(if $(CONFIG_PACKAGE_TAR_XZ),xz)
   TITLE:=GNU tar
-  URL:=http://www.gnu.org/software/tar/
+  URL:=https://www.gnu.org/software/tar/
   MENU:=1
 endef
 
index 1aa563713b58ccf290870b3db81424390c5b009a..5ca7c70024615656137a732a2d1017eafab65179 100644 (file)
@@ -8,18 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=taskwarrior
-PKG_VERSION:=2.4.4
+PKG_VERSION:=2.5.1
 PKG_RELEASE:=1
 
-PKG_LICENSE:=MIT
-
 PKG_SOURCE:=task-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.taskwarrior.org/download/
-PKG_HASH:=7ff406414e0be480f91981831507ac255297aab33d8246f98dbfd2b1b2df8e3b
-PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
-
+PKG_SOURCE_URL:=https://www.taskwarrior.org/download
+PKG_HASH:=d87bcee58106eb8a79b850e9abc153d98b79e00d50eade0d63917154984f2a15
 PKG_BUILD_DIR:=$(BUILD_DIR)/task-$(PKG_VERSION)
 
+PKG_MAINTAINER:=
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -31,11 +31,9 @@ define Package/taskwarrior
   SECTION:=utils
   CATEGORY:=Utilities
   DEPENDS:=+libstdcpp +libuuid +libgnutls
-  URL:=http://taskwarrior.org/
+  URL:=https://taskwarrior.org/
 endef
 
-TARGET_LDFLAGS += -ldl
-
 define Package/taskwarrior/description
  taskwarrior is a command-line todo list manager
 endef
diff --git a/utils/telldus-core/Makefile b/utils/telldus-core/Makefile
new file mode 100644 (file)
index 0000000..0dbe28f
--- /dev/null
@@ -0,0 +1,61 @@
+# 
+# Copyright (C) 2010 Telldus Technologies AB
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=telldus-core
+PKG_VERSION:=2.1.2
+PKG_RELEASE:=1
+
+PKG_LICENSE:=LGPL-2.1
+PKG_BUILD_DEPENDS:=argp-standalone 
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download.telldus.com/TellStick/Software/telldus-core/
+PKG_HASH:=a20f6c74814afc23312d2c93ebbb37fdea9deaaee05ae7b6a6275e11e4662014
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/telldus-core
+       SECTION:=utils
+       CATEGORY:=Utilities
+       TITLE:=Telldus TellStick USB interface
+       URL:=http://www.telldus.com
+       MAINTAINER:=Peter Liedholm <PeterFromSwe884@gmail.com>
+       DEPENDS:=+confuse +libftdi +libstdcpp $(ICONV_DEPENDS)
+endef
+
+define Package/telldus-core/description
+       Telldus driver for USB-based 433 MHz RF transceiver for home automation.
+       MUST be built with full language support, (don't know how to DEPEND that)
+endef
+
+CMAKE_OPTIONS+=\
+       -DBUILD_LIBTELLDUS-CORE=1 \
+       -DBUILD_TDTOOL=1 \
+       -DGENERATE_MAN=0 \
+       -DICONV_LIBRARY=-liconv
+
+define Package/telldus-core/conffiles
+/etc/tellstick.conf
+endef
+
+define Package/telldus-core/install
+       $(INSTALL_DIR)  $(1)/usr/bin
+       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/bin/tdtool $(1)/usr/bin
+       $(INSTALL_DIR)  $(1)/usr/sbin
+       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/sbin/telldusd $(1)/usr/sbin
+       $(INSTALL_BIN)  $(PKG_INSTALL_DIR)/usr/sbin/tdadmin $(1)/usr/sbin
+       $(INSTALL_DIR)  $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtelldus* $(1)/usr/lib
+       $(INSTALL_DIR)  $(1)/etc/config
+       $(INSTALL_CONF) ./files/tellstick.conf $(1)/etc
+       $(INSTALL_DIR)  $(1)/etc/init.d
+       $(INSTALL_BIN)  ./files/telldusd $(1)/etc/init.d
+endef
+
+$(eval $(call BuildPackage,telldus-core))
diff --git a/utils/telldus-core/files/telldusd b/utils/telldus-core/files/telldusd
new file mode 100644 (file)
index 0000000..1c75cb5
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh /etc/rc.common
+
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/sbin/telldusd
+CONFFILE=/etc/tellstick.conf
+
+start_service() {
+       procd_open_instance
+       procd_set_param command $PROG
+       procd_append_param command --nodaemon # foreground required by procd
+       procd_set_param file $CONFFILE
+       procd_set_param term_timeout 10 # telldusd is slow to exit of some reason
+       procd_set_param respawn  # respawn the service if it exits
+       procd_set_param stdout 1 # forward stdout of the command to logd
+       procd_set_param stderr 1 # same for stderr
+       procd_close_instance
+}
diff --git a/utils/telldus-core/files/tellstick.conf b/utils/telldus-core/files/tellstick.conf
new file mode 100644 (file)
index 0000000..ec76d01
--- /dev/null
@@ -0,0 +1,21 @@
+user = "root"
+group = "root"
+ignoreControllerConfirmation = "false"
+device {
+  id = 1
+  name = "Example device"
+  protocol = "arctech"
+  model = "codeswitch"
+  parameters {
+    house = "A"
+    unit = "1"
+  }
+}
+
+# Example controller (tellstick duo)
+#controller {
+  #id=1
+  # name=""
+  #type=2
+  #serial="A501IVK7"
+#}
diff --git a/utils/telldus-core/patches/100-add_includes.patch b/utils/telldus-core/patches/100-add_includes.patch
new file mode 100644 (file)
index 0000000..f4e8232
--- /dev/null
@@ -0,0 +1,21 @@
+Added missing includes required by openwrt. Expected to be portable.
+--- a/common/Socket_unix.cpp
++++ b/common/Socket_unix.cpp
+@@ -8,6 +8,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <sys/select.h> // POSIX.1-2001
+ #include <sys/un.h>
+ #include <fcntl.h>
+ #include <math.h>
+--- a/service/ConnectionListener_unix.cpp
++++ b/service/ConnectionListener_unix.cpp
+@@ -13,6 +13,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <string>
++#include <cstring> // strcpy
+ #include "service/ConnectionListener.h"
+ #include "common/Socket.h"
diff --git a/utils/telldus-core/patches/110-fix_warnings.patch b/utils/telldus-core/patches/110-fix_warnings.patch
new file mode 100644 (file)
index 0000000..f47327c
--- /dev/null
@@ -0,0 +1,23 @@
+Added a typecast (signed/unsigned char problem). Should be portable.
+--- a/service/ProtocolIkea.cpp
++++ b/service/ProtocolIkea.cpp
+@@ -23,7 +23,7 @@ int ProtocolIkea::methods() const {
+ std::string ProtocolIkea::getStringForMethod(int method, unsigned char level, Controller *) {
+       const char B1[] = {84, 84, 0};
+-      const char B0[] = {170, 0};
++      const char B0[] = {(char)170, 0};
+       int intSystem = this->getIntParameter(L"system", 1, 16)-1;
+       int intFadeStyle = TelldusCore::comparei(this->getStringParameter(L"fade", L"true"), L"true");
+--- a/service/ProtocolX10.cpp
++++ b/service/ProtocolX10.cpp
+@@ -22,7 +22,7 @@ int ProtocolX10::methods() const {
+ std::string ProtocolX10::getStringForMethod(int method, unsigned char data, Controller *controller) {
+       const unsigned char S = 59, L = 169;
+       const char B0[] = {S, S, 0};
+-      const char B1[] = {S, L, 0};
++      const char B1[] = {S, (char)L, 0};
+       const unsigned char START_CODE[] = {'S', 255, 1, 255, 1, 255, 1, 100, 255, 1, 180, 0};
+       const unsigned char STOP_CODE[] = {S, 0};
diff --git a/utils/telldus-core/patches/120-fix_missing_var_conf.patch b/utils/telldus-core/patches/120-fix_missing_var_conf.patch
new file mode 100644 (file)
index 0000000..d148423
--- /dev/null
@@ -0,0 +1,11 @@
+Added a missing initialisation that under special circumstanses causes seg fault.
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -435,6 +435,7 @@ bool readVarConfig(cfg_t **cfg) {
+       FILE *fp = fopen(VAR_CONFIG_FILE, "re");  // e for setting O_CLOEXEC on the file handle
+       if (!fp) {
++              (*cfg) = 0;
+               Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
+               return false;
+       }
diff --git a/utils/telldus-core/patches/900-openwrt_fixes_cmake.patch b/utils/telldus-core/patches/900-openwrt_fixes_cmake.patch
new file mode 100644 (file)
index 0000000..b20bbe3
--- /dev/null
@@ -0,0 +1,45 @@
+Adopted to OpenWrt target. Most likely these changes go elsewhere when done right.
+--- a/service/CMakeLists.txt
++++ b/service/CMakeLists.txt
+@@ -98,7 +98,7 @@ IF (UNIX AND NOT APPLE)
+       IF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+               SET(DEFAULT_STATE_INSTALL_DIR "/var/spool")
+       ELSE ()
+-              SET(DEFAULT_STATE_INSTALL_DIR "/var/state")
++              SET(DEFAULT_STATE_INSTALL_DIR "/tmp/state") # OpenWrt has var as symlink to tmp
+       ENDIF ()
+       SET(STATE_INSTALL_DIR "${DEFAULT_STATE_INSTALL_DIR}" CACHE PATH "The directory to store state information of the devices")
+--- a/tdadmin/CMakeLists.txt
++++ b/tdadmin/CMakeLists.txt
+@@ -38,8 +38,11 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeB
+               ${ARGP_LIBRARY}
+       )
+ ELSE (WIN32)
++      # Linux, in this case openwrt that requires argp-standalone
++      FIND_LIBRARY(ARGP_LIBRARY argp)
+       TARGET_LINK_LIBRARIES(tdadmin
+               ${CMAKE_BINARY_DIR}/client/libtelldus-core.so
++              ${ARGP_LIBRARY}
+       )
+ ENDIF (WIN32)
+--- a/common/CMakeLists.txt
++++ b/common/CMakeLists.txt
+@@ -66,12 +66,16 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeB
+       )
+ ELSE (APPLE)
+       #### Linux ####
++      #FIND_LIBRARY(ICONV_LIBRARY iconv) Does not work
+       ADD_DEFINITIONS( -D_LINUX )
+       LIST(APPEND  telldus-common_SRCS
+               Event_unix.cpp
+               EventHandler_unix.cpp
+               Socket_unix.cpp
+       )
++      LIST(APPEND telldus-common_LIBRARIES
++              ${ICONV_LIBRARY}
++      )
+ ENDIF (APPLE)
diff --git a/utils/telldus-core/patches/920-openwrt_missing_var_conf.patch b/utils/telldus-core/patches/920-openwrt_missing_var_conf.patch
new file mode 100644 (file)
index 0000000..be87bf8
--- /dev/null
@@ -0,0 +1,18 @@
+On OpenWrt targets the tmp filesystem is wiped upon power cycle, so files 
+requires to be created.
+--- a/service/SettingsConfuse.cpp
++++ b/service/SettingsConfuse.cpp
+@@ -436,6 +436,13 @@ bool readVarConfig(cfg_t **cfg) {
+       FILE *fp = fopen(VAR_CONFIG_FILE, "re");  // e for setting O_CLOEXEC on the file handle
+       if (!fp) {
+               (*cfg) = 0;
++              fp = fopen(VAR_CONFIG_FILE, "we"); // If missing, create file if possible
++              if(fp) {
++                      fclose(fp);
++              }
++              else {
++                      Log::warning("Unable to create var config file, %s", VAR_CONFIG_FILE);
++              }
+               Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
+               return false;
+       }
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 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 11f247b1a165740652ea4d7913689c382739f253..7b8088354000dd2458ce6ffb7077199c2550d435 100644 (file)
@@ -10,15 +10,16 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xz
 PKG_VERSION:=5.2.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/lzmautils
 PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf
 
+PKG_MAINTAINER:=
 PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+
 PKG_LICENSE_FILES:=COPYING
-PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
+PKG_CPE_ID:=cpe:/a:tukaani:xz
 
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -69,16 +70,18 @@ define BuildSubPackage
   $$(eval $$(call BuildPackage,$(1)))
 endef
 
+TARGET_LDFLAGS += -Wl,--gc-sections -flto
 
 CONFIGURE_ARGS += \
        --enable-small \
        --enable-assume-ram=4 \
        --disable-assembler \
+       --disable-debug \
+       --disable-doc \
+       --disable-rpath \
+       --disable-symbol-versions \
        --disable-werror \
-
-# API uses "restrict" keyword introduced in C99 standard
-TARGET_CFLAGS += \
-       -std=c99 \
+       --with-pic
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
diff --git a/utils/ykclient/Makefile b/utils/ykclient/Makefile
new file mode 100644 (file)
index 0000000..673364c
--- /dev/null
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ykclient
+PKG_VERSION:=2.15
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ykclient-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubico-c-client/Releases/
+PKG_HASH:=f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+PKG_BUILD_DEPENDS:=curl
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ykclient-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ykclient
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=The Yuibco yubikey c client library
+  URL:=https://developers.yubico.com/yubico-c-client/
+  DEPENDS:=curl
+endef
+
+define Package/ykclient/description
+       YubiKey C Client Library (libykclient)
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/ykclient*.h $(STAGING_DIR)/usr/include
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libykclient.so* $(STAGING_DIR)/usr/lib
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static
+
+define Package/ykclient/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykclient $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libykclient.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,ykclient))
diff --git a/utils/ykpers/Makefile b/utils/ykpers/Makefile
new file mode 100644 (file)
index 0000000..c2bd1e7
--- /dev/null
@@ -0,0 +1,54 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ykpers
+PKG_VERSION:=1.19.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=ykpers-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://developers.yubico.com/yubikey-personalization/Releases
+PKG_HASH:=2bc8afa16d495a486582bad916d16de1f67c0cce9bb0a35c3123376c2d609480
+PKG_MAINTAINER:=Stuart B. Wilkins <stuwilkins@mac.com>
+PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=BSD-2-Clause
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/ykpers-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=libyubikey
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ykpers
+  SECTION:=utils       
+  CATEGORY:=Utilities
+  TITLE:=The Yuibco personalization package
+  URL:=https://developers.yubico.com/yubikey-personalization/
+  DEPENDS:=+curl +libyubikey +libjson-c +libusb-1.0
+endef
+
+define Package/ykpers/description
+       The YubiKey Personalization package contains a library and command 
+       line tool used to personalize (i.e., set a AES key) YubiKeys.
+endef
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --disable-static
+
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/ykcore/*.h $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/*.h $(STAGING_DIR)/usr/include
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libykpers-1.so* $(STAGING_DIR)/usr/lib
+endef
+
+define Package/ykpers/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykchalresp $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykinfo $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/ykpersonalize $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libykpers-1.so* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,ykpers))
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..2f956a2
--- /dev/null
@@ -0,0 +1,81 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zstd
+PKG_VERSION:=1.3.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/zstd/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=90d902a1282cc4e197a8023b6d6e8d331c1fd1dfe60f7f8e4ee9da40da886dc3
+
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILE:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+CMAKE_SOURCE_SUBDIR:=build/cmake
+CMAKE_INSTALL:=1
+
+ifeq ($(CONFIG_ZSTD_OPTIMIZE_O3),y)
+       TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
+       TARGET_CFLAGS += -O3
+       TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS))
+       TARGET_CXXFLAGS += -O3
+endif
+
+define Package/zstd/Default
+       SUBMENU:=Compression
+       URL:=https://github.com/facebook/zstd
+       MAINTAINER:=Amol Bhave <ambhave@fb.com>
+endef
+
+define Package/libzstd
+$(call Package/zstd/Default)
+       SECTION:=libs
+       CATEGORY:=Libraries
+       TITLE:=zstd library.
+endef
+
+define Package/libzstd/description
+       Zstandard - Fast real-time compression algorithm.
+       This package provides libzstd library.
+endef
+
+define Package/libzstd/config
+       config ZSTD_OPTIMIZE_O3
+               bool "Use all optimizations (-O3)"
+               default y
+               help
+                       This enables additional optmizations using the -O3 compilation flag.
+endef
+
+define Package/zstd
+$(call Package/zstd/Default)
+       SECTION:=utils
+       CATEGORY:=Utilities
+       DEPENDS:=+libzstd
+       TITLE:=Fast real-time compression algorithm.
+endef
+
+define Package/zstd/description
+       Zstandard - Fast real-time compression algorithm.
+       This package provides the zstd binaries.
+endef
+
+define Package/libzstd/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libzstd.so* $(1)/usr/lib/
+endef
+
+define Package/zstd/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{unzstd,zstd,zstdcat,zstdmt} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libzstd))
+$(eval $(call BuildPackage,zstd))
+$(eval $(call HostBuild))